Loading modules/uswds_blb_configuration_media_library/.gitignore 0 → 100644 +2 −0 Original line number Diff line number Diff line node_modules modules/uswds_blb_configuration_media_library/.sass-lint.yml 0 → 100644 +117 −0 Original line number Diff line number Diff line files: include: 'scss/**/*.s+(a|c)ss' ignore: ['bower_components/**/*.s+(a|c)ss', 'scss/vendor/*.scss', 'scss/core/_normalize.scss'] options: formatter: stylish merge-default-rules: false rules: border-zero: 2 brace-style: - 2 - allow-single-line: false class-name-format: - 2 - convention: hyphenatedbem clean-import-paths: - 2 - filename-extension: false leading-underscore: false empty-line-between-blocks: - 2 - ignore-single-line-rulesets: false extends-before-declarations: 1 extends-before-mixins: 1 final-newline: - 2 - include: true force-attribute-nesting: 2 force-element-nesting: 2 force-pseudo-nesting: 2 function-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase hex-length: - 2 - style: long hex-notation: - 2 - style: lowercase id-name-format: - 2 - convention: hyphenatedbem indentation: - 2 - size: 2 leading-zero: - 2 - include: true mixin-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase mixins-before-declarations: - 1 - exclude: ['respond-to', 'rtl', 'ltr'] nesting-depth: - 2 - max-depth: 5 no-color-keywords: 2 no-color-literals: - 0 - allow-rgba: true no-css-comments: 0 no-debug: 2 no-duplicate-properties: 2 no-empty-rulesets: 2 no-ids: 2 no-invalid-hex: 2 no-mergeable-selectors: 0 no-misspelled-properties: - 2 - extra-properties: - text-size-adjust no-qualifying-elements: - 2 - allow-element-with-attribute: false allow-element-with-class: false allow-element-with-id: false no-trailing-zero: 2 no-url-protocols: 1 placeholder-in-extend: 2 placeholder-name-format: - 2 - convention: hyphenatedbem property-sort-order: - 2 - order: 'concentric' - ignore-custom-properties: false quotes: - 2 - style: single shorthand-values: 2 single-line-per-selector: 2 space-after-bang: - 2 - include: false space-after-colon: - 2 - include: true space-after-comma: 1 space-before-bang: - 2 - include: true space-before-brace: - 2 - include: true space-before-colon: 1 space-between-parens: - 2 - include: false trailing-semicolon: 2 url-quotes: 2 variable-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase zero-unit: 2 modules/uswds_blb_configuration_media_library/css/theme/media-library.css 0 → 100644 +950 −0 Original line number Diff line number Diff line /* Custom CSS on top of Media Library */ .media-library-views-form .media-library-item--grid { height: 250px; } .media-library-views-form .js-pager__items { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; margin: 1rem 0; list-style: none; text-align: center; } .media-library-views-form .js-pager__items li { margin: 6px; } .media-library-wrapper .usa-label { margin-top: unset !important; max-width: unset !important; line-height: unset !important; font-size: unset !important; font-weight: unset !important; } .media-library-wrapper article { height: 100%; } .media-library-wrapper article .media-library-item__preview { padding-bottom: unset !important; height: 80%; } .media-library-wrapper article .media-library-item__preview .field__item { height: 100%; } .media-library-wrapper article .media-library-item__preview .field__item img { padding-right: 4px; width: 100%; height: 100%; } .media-library-wrapper article .media-library-item__attributes { position: unset !important; } .media-library-wrapper .usa-form { padding-top: 1.5rem; } .media-library-wrapper { display: flex; margin: -1em; } .media-library-wrapper .media-library-view { display: flex; position: relative; flex-wrap: wrap; justify-content: space-between; } .media-library-wrapper .media-library-view .view-content { flex: 0 0 100%; } .media-library-wrapper .view-header { align-self: flex-end; margin: 1em 0; text-align: right; } .media-library-wrapper .views-display-link { margin: 0; padding-left: 22px; line-height: 16px; color: #333333; font-size: 15px; } .media-library-wrapper .views-display-link.is-active { font-weight: bold; } .media-library-wrapper .views-display-link-widget { margin-right: 15px; background: url("../../../../../../../core/misc/icons/333333/grid.svg") left 0 no-repeat; } .media-library-wrapper .views-display-link-widget_table { background: url("../../../../../../../core/misc/icons/333333/table.svg") left 0 no-repeat; } .media-library-menu { display: block; margin: 0; border-bottom: 1px solid #cccccc; background-color: #e6e5e1; padding: 0; width: 600px; max-width: 20%; line-height: 1; } .media-library-menu li { display: block; padding: 0; list-style: none; } [dir='rtl'] .media-library-menu { margin: 0; } [dir='rtl'] .media-library-menu__link.active { margin-right: 0; margin-left: -1px; border-right: 0; border-left: 1px solid #fcfcfa; } [dir='rtl'] .media-library-content { border-right: 1px solid #b3b2ad; border-left: 0; } [dir='rtl'] .media-library-select-all input { margin-left: 10px; } [dir='rtl'] .media-library-wrapper .view-header { text-align: left; } [dir='rtl'] .media-library-wrapper .views-display-link { padding-right: 22px; padding-left: 0; } [dir='rtl'] .media-library-wrapper .views-display-link-widget { background-position: right 0; } [dir='rtl'] .media-library-wrapper .views-display-link-widget_table { background-position: right 0; } [dir='rtl'] .media-library-item__click-to-select-checkbox { right: 16px; left: auto; } [dir='rtl'] .media-library-item__status { right: 5px; left: auto; } [dir='rtl'] .button.media-library-open-button { margin-right: 0; margin-left: 1em; } [dir='rtl'] .media-library-widget__toggle-weight { right: auto; left: 5px; } [dir='rtl'] .media-library-item__edit { right: auto; left: 40px; } [dir='rtl'] .media-library-item__remove { right: auto; left: 10px; } [dir='rtl'] .media-library-add-form__preview { margin-right: 0; margin-left: 20px; } [dir='rtl'] .media-library-add-form__remove-button[type='submit'] { right: auto; left: 13px; background-position: left 2px; padding: 2px 2px 2px 20px; } [dir='rtl'] .media-library-add-form__remove-button:focus { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:disabled { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:disabled:active { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:focus { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:hover { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button:hover { background-position: left 2px; } .media-library-menu__link { display: block; position: relative; border-bottom: 1px solid #b3b2ad; background-color: #f2f2f0; padding: 15px; text-decoration: none; text-shadow: 0 1px rgba(255, 255, 255, 0.6); box-sizing: border-box; } .media-library-menu__link:active { outline: none; background: #fcfcfa; text-shadow: none; } .media-library-menu__link:hover { background: #fcfcfa; text-shadow: none; } .media-library-menu__link:focus { outline: none; background: #fcfcfa; text-shadow: none; } .media-library-menu__link.active { z-index: 1; margin-right: -1px; border-right: 1px solid #fcfcfa; border-bottom: 1px solid #b3b2ad; box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.3); background-color: #ffffff; color: #000000; } .media-library-content { outline: none; border-left: 1px solid #b3b2ad; padding: 1em; width: 100%; } .media-library-add-form--without-input .form-item { margin: 0 0 1em; } .media-library-add-form__added-media { margin: 0; outline: none; padding: 0; } .media-library-add-form__input-wrapper { border: 1px solid #bfbfbf; border-radius: 2px; background: #fcfcfa; padding: 16px; } .media-library-add-form--upload.media-library-add-form--without-input .form-item-upload { margin-bottom: 0; } .media-library-add-form .file-upload-help { margin: 8px 0 0; } .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: flex; } .media-library-add-form--oembed.media-library-add-form--without-input .form-item-url { margin-bottom: 0; } @media screen and (max-width: 370.5em) { .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: block; } } .media-library-add-form-oembed-url { width: 100%; } .button.media-library-add-form-oembed-submit { align-self: center; } .button.media-library-open-button { margin-bottom: 1em; margin-left: 0; } .media-library-add-form__selected-media { margin-top: 1em; } .media-library-add-form__selected-media .details-wrapper { display: flex; flex-wrap: wrap; padding: 0 10px 1em; } .media-library-add-form__selected-media .media-library-item .field--name-thumbnail img { height: 100px; } .media-library-add-form__selected-media .media-library-item--small { width: 33.3%; } .media-library-select-all { flex-basis: 100%; margin: 10px 8px; width: 100%; } .media-library-select-all input { margin-right: 10px; } .media-library-views-form { display: flex; flex-wrap: wrap; } .media-library-views-form > .form-actions { flex-basis: 100%; } .media-library-views-form > table { width: 100%; } .media-library-selection { display: flex; flex-wrap: wrap; margin: 1em -8px; } .media-library-views-form__bulk_form { display: flex; flex-wrap: wrap; } .media-library-view .form--inline { display: flex; flex-wrap: wrap; } .media-library-view .form-actions { align-self: flex-end; margin: 0.75em 0; } .media-library-view .media-library-view--form-actions { align-self: flex-end; clear: left; margin: 0.75em 0; } .media-library-views-form__header { flex-basis: 100%; } .media-library-views-form__header .form-item { margin-right: 8px; } .media-library-views-form__rows { display: flex; flex-basis: 100%; flex-wrap: wrap; margin: 0 -8px; } @media screen and (max-width: 600px) { .media-library-view .form-actions { flex-basis: 100%; } } .media-library-item { position: relative; } .media-library-item label { display: inline-block; } .media-library-item--grid { justify-content: center; outline: none; background: #ffffff; padding: 8px; width: 50%; vertical-align: top; box-sizing: border-box; } .media-library-item--grid:before { position: absolute; top: 7px; left: 7px; transition: border-color 0.2s, color 0.2s, background 0.2s; border: 1px solid #dbdbdb; width: calc(100% - 16px); height: calc(100% - 16px); content: ''; pointer-events: none; } .media-library-item--grid .form-item { margin: 0.75em; } .media-library-item--grid .field--name-thumbnail { background-color: #ebebeb; overflow: hidden; text-align: center; } .media-library-item--grid .field--name-thumbnail img { height: 180px; object-fit: contain; object-position: center center; } .media-library-item--grid.is-hover:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #40b6ff; } .media-library-item--grid.checked:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #0076c0; } .media-library-item--grid.checked .media-library-item__name { white-space: normal; } .media-library-item--grid.is-focus:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #40b6ff; } .media-library-item--grid.is-focus .media-library-item__name { white-space: normal; } .media-library-widget-modal .ui-dialog-buttonpane { display: flex; align-items: center; } .media-library-widget-modal .ui-dialog-buttonpane .form-actions { flex: 1; } .ui-dialog--narrow.media-library-widget-modal { max-width: 75%; } @media screen and (min-width: 45em) { .media-library-item--grid { width: 33.3%; } .media-library-widget-modal .media-library-item--grid { width: 50%; } .media-library-selection .media-library-item--grid { width: 50%; } .media-library-add-form__selected-media .media-library-item--small { width: 25%; } } @media screen and (min-width: 60em) { .media-library-item--grid { width: 25%; } .media-library-widget-modal .media-library-item--grid { width: 33.3%; } .media-library-selection .media-library-item--grid { width: 33.3%; } .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } @media screen and (min-width: 77em) { .media-library-item--grid { width: 16.6%; } .media-library-widget-modal .media-library-item--grid { width: 25%; } .media-library-selection .media-library-item--grid { width: 25%; } .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } .media-library-item__click-to-select-checkbox { display: block; position: absolute; top: 16px; left: 16px; z-index: 1; } .media-library-item__click-to-select-checkbox input { width: 20px; height: 20px; } .media-library-item__click-to-select-checkbox .form-item { margin: 0; } .media-library-item__click-to-select-trigger { cursor: pointer; height: 100%; overflow: hidden; } .media-library-item--table img { max-width: 100px; height: auto; } .media-library-item__preview { padding-bottom: 34px; } .field--widget-media-library-widget .media-library-item__preview { cursor: move; } .field--widget-media-library-widget .js-media-library-item:only-child .media-library-item__preview { cursor: inherit; } .media-library-item__status { position: absolute; top: 40px; left: 5px; background: #666666; padding: 5px 10px; color: #e4e4e4; font-size: 12px; font-style: italic; pointer-events: none; } .media-library-item__attributes { display: block; position: absolute; bottom: 0; background: #ffffff; padding: 5px; max-width: calc(100% - 10px); max-height: calc(100% - 50px); overflow: hidden; } .media-library-item__attributes:hover .media-library-item__name { white-space: normal; } .media-library-item__name { display: block; margin: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .media-library-item__type { color: #696969; font-size: 12px; } .media-library-item--disabled { opacity: 0.5; pointer-events: none; } .media-library-widget { position: relative; } .media-library-widget__toggle-weight { position: absolute; top: 5px; right: 5px; } .media-library-item__edit { position: absolute; top: 10px; right: 40px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/pencil.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__edit:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__edit:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove { position: absolute; top: 10px; right: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:first-child { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:disabled { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:disabled:active { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-add-form__media { display: flex; position: relative; outline: none; border-bottom: 1px solid #c0c0c0; padding: 1em 0; } .media-library-add-form__media:first-child { padding-top: 0; } .media-library-add-form__media:first-child .media-library-add-form__remove-button[type='submit'] { top: 5px; } .media-library-add-form__media:last-child { border-bottom: 0; padding-bottom: 0; } .media-library-add-form__preview { display: flex; align-items: center; justify-content: center; margin-right: 20px; background: #ebebeb; width: 220px; } .media-library-add-form__remove-button[type='submit'] { position: absolute; top: 25px; right: 6px; margin: 0; border: 0; border-radius: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; padding: 2px 20px 2px 2px; width: auto; text-transform: lowercase; line-height: 16px; color: transparent; font-weight: normal; } .media-library-add-form__remove-button:focus { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:disabled { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:disabled:active { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:focus { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:hover { border: 0; box-shadow: none; background: transparent url("../../../../../../../core/misc/icons/ee0000/ex.svg") right 2px no-repeat; color: #ee0000; } .media-library-add-form__remove-button:hover { border: 0; box-shadow: none; background: transparent url("../../../../../../../core/misc/icons/ee0000/ex.svg") right 2px no-repeat; color: #ee0000; } .views-live-preview .media-library-view div.views-row + div.views-row { margin-top: 0; } modules/uswds_blb_configuration_media_library/package-lock.json 0 → 100644 +10624 −0 File added.Preview size limit exceeded, changes collapsed. Show changes modules/uswds_blb_configuration_media_library/package.json 0 → 100644 +20 −0 Original line number Diff line number Diff line { "name": "uswds_blb_configuration_media_library", "description": "Templates for media library working with USWDS", "author": "Stephen Mustgrave", "version": "1.0.0", "scripts": { "css:compile": "node-sass --importer node_modules/node-sass-magic-importer/dist/cli.js scss/ --output-style expanded -o css/", "css:build": "npm run css:compile", "css:watch": "nodemon -e scss -x \"npm run css:build\" --ignore dist", "watch": "nodemon -e scss -x \"npm run build\" --ignore dist", "build": "npm run css:build" }, "dependencies": { "autoprefixer": "^10.4.5", "node-sass": "^7.0.0", "node-sass-magic-importer": "^5.3.0", "nodemon": "^2.0.15", "postcss-cli": "^9.1.0" } } Loading
modules/uswds_blb_configuration_media_library/.gitignore 0 → 100644 +2 −0 Original line number Diff line number Diff line node_modules
modules/uswds_blb_configuration_media_library/.sass-lint.yml 0 → 100644 +117 −0 Original line number Diff line number Diff line files: include: 'scss/**/*.s+(a|c)ss' ignore: ['bower_components/**/*.s+(a|c)ss', 'scss/vendor/*.scss', 'scss/core/_normalize.scss'] options: formatter: stylish merge-default-rules: false rules: border-zero: 2 brace-style: - 2 - allow-single-line: false class-name-format: - 2 - convention: hyphenatedbem clean-import-paths: - 2 - filename-extension: false leading-underscore: false empty-line-between-blocks: - 2 - ignore-single-line-rulesets: false extends-before-declarations: 1 extends-before-mixins: 1 final-newline: - 2 - include: true force-attribute-nesting: 2 force-element-nesting: 2 force-pseudo-nesting: 2 function-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase hex-length: - 2 - style: long hex-notation: - 2 - style: lowercase id-name-format: - 2 - convention: hyphenatedbem indentation: - 2 - size: 2 leading-zero: - 2 - include: true mixin-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase mixins-before-declarations: - 1 - exclude: ['respond-to', 'rtl', 'ltr'] nesting-depth: - 2 - max-depth: 5 no-color-keywords: 2 no-color-literals: - 0 - allow-rgba: true no-css-comments: 0 no-debug: 2 no-duplicate-properties: 2 no-empty-rulesets: 2 no-ids: 2 no-invalid-hex: 2 no-mergeable-selectors: 0 no-misspelled-properties: - 2 - extra-properties: - text-size-adjust no-qualifying-elements: - 2 - allow-element-with-attribute: false allow-element-with-class: false allow-element-with-id: false no-trailing-zero: 2 no-url-protocols: 1 placeholder-in-extend: 2 placeholder-name-format: - 2 - convention: hyphenatedbem property-sort-order: - 2 - order: 'concentric' - ignore-custom-properties: false quotes: - 2 - style: single shorthand-values: 2 single-line-per-selector: 2 space-after-bang: - 2 - include: false space-after-colon: - 2 - include: true space-after-comma: 1 space-before-bang: - 2 - include: true space-before-brace: - 2 - include: true space-before-colon: 1 space-between-parens: - 2 - include: false trailing-semicolon: 2 url-quotes: 2 variable-name-format: - 2 - allow-leading-underscore: true convention: hyphenatedlowercase zero-unit: 2
modules/uswds_blb_configuration_media_library/css/theme/media-library.css 0 → 100644 +950 −0 Original line number Diff line number Diff line /* Custom CSS on top of Media Library */ .media-library-views-form .media-library-item--grid { height: 250px; } .media-library-views-form .js-pager__items { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; margin: 1rem 0; list-style: none; text-align: center; } .media-library-views-form .js-pager__items li { margin: 6px; } .media-library-wrapper .usa-label { margin-top: unset !important; max-width: unset !important; line-height: unset !important; font-size: unset !important; font-weight: unset !important; } .media-library-wrapper article { height: 100%; } .media-library-wrapper article .media-library-item__preview { padding-bottom: unset !important; height: 80%; } .media-library-wrapper article .media-library-item__preview .field__item { height: 100%; } .media-library-wrapper article .media-library-item__preview .field__item img { padding-right: 4px; width: 100%; height: 100%; } .media-library-wrapper article .media-library-item__attributes { position: unset !important; } .media-library-wrapper .usa-form { padding-top: 1.5rem; } .media-library-wrapper { display: flex; margin: -1em; } .media-library-wrapper .media-library-view { display: flex; position: relative; flex-wrap: wrap; justify-content: space-between; } .media-library-wrapper .media-library-view .view-content { flex: 0 0 100%; } .media-library-wrapper .view-header { align-self: flex-end; margin: 1em 0; text-align: right; } .media-library-wrapper .views-display-link { margin: 0; padding-left: 22px; line-height: 16px; color: #333333; font-size: 15px; } .media-library-wrapper .views-display-link.is-active { font-weight: bold; } .media-library-wrapper .views-display-link-widget { margin-right: 15px; background: url("../../../../../../../core/misc/icons/333333/grid.svg") left 0 no-repeat; } .media-library-wrapper .views-display-link-widget_table { background: url("../../../../../../../core/misc/icons/333333/table.svg") left 0 no-repeat; } .media-library-menu { display: block; margin: 0; border-bottom: 1px solid #cccccc; background-color: #e6e5e1; padding: 0; width: 600px; max-width: 20%; line-height: 1; } .media-library-menu li { display: block; padding: 0; list-style: none; } [dir='rtl'] .media-library-menu { margin: 0; } [dir='rtl'] .media-library-menu__link.active { margin-right: 0; margin-left: -1px; border-right: 0; border-left: 1px solid #fcfcfa; } [dir='rtl'] .media-library-content { border-right: 1px solid #b3b2ad; border-left: 0; } [dir='rtl'] .media-library-select-all input { margin-left: 10px; } [dir='rtl'] .media-library-wrapper .view-header { text-align: left; } [dir='rtl'] .media-library-wrapper .views-display-link { padding-right: 22px; padding-left: 0; } [dir='rtl'] .media-library-wrapper .views-display-link-widget { background-position: right 0; } [dir='rtl'] .media-library-wrapper .views-display-link-widget_table { background-position: right 0; } [dir='rtl'] .media-library-item__click-to-select-checkbox { right: 16px; left: auto; } [dir='rtl'] .media-library-item__status { right: 5px; left: auto; } [dir='rtl'] .button.media-library-open-button { margin-right: 0; margin-left: 1em; } [dir='rtl'] .media-library-widget__toggle-weight { right: auto; left: 5px; } [dir='rtl'] .media-library-item__edit { right: auto; left: 40px; } [dir='rtl'] .media-library-item__remove { right: auto; left: 10px; } [dir='rtl'] .media-library-add-form__preview { margin-right: 0; margin-left: 20px; } [dir='rtl'] .media-library-add-form__remove-button[type='submit'] { right: auto; left: 13px; background-position: left 2px; padding: 2px 2px 2px 20px; } [dir='rtl'] .media-library-add-form__remove-button:focus { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:disabled { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:disabled:active { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:focus { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button.button:hover { background-position: left 2px; } [dir='rtl'] .media-library-add-form__remove-button:hover { background-position: left 2px; } .media-library-menu__link { display: block; position: relative; border-bottom: 1px solid #b3b2ad; background-color: #f2f2f0; padding: 15px; text-decoration: none; text-shadow: 0 1px rgba(255, 255, 255, 0.6); box-sizing: border-box; } .media-library-menu__link:active { outline: none; background: #fcfcfa; text-shadow: none; } .media-library-menu__link:hover { background: #fcfcfa; text-shadow: none; } .media-library-menu__link:focus { outline: none; background: #fcfcfa; text-shadow: none; } .media-library-menu__link.active { z-index: 1; margin-right: -1px; border-right: 1px solid #fcfcfa; border-bottom: 1px solid #b3b2ad; box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.3); background-color: #ffffff; color: #000000; } .media-library-content { outline: none; border-left: 1px solid #b3b2ad; padding: 1em; width: 100%; } .media-library-add-form--without-input .form-item { margin: 0 0 1em; } .media-library-add-form__added-media { margin: 0; outline: none; padding: 0; } .media-library-add-form__input-wrapper { border: 1px solid #bfbfbf; border-radius: 2px; background: #fcfcfa; padding: 16px; } .media-library-add-form--upload.media-library-add-form--without-input .form-item-upload { margin-bottom: 0; } .media-library-add-form .file-upload-help { margin: 8px 0 0; } .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: flex; } .media-library-add-form--oembed.media-library-add-form--without-input .form-item-url { margin-bottom: 0; } @media screen and (max-width: 370.5em) { .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: block; } } .media-library-add-form-oembed-url { width: 100%; } .button.media-library-add-form-oembed-submit { align-self: center; } .button.media-library-open-button { margin-bottom: 1em; margin-left: 0; } .media-library-add-form__selected-media { margin-top: 1em; } .media-library-add-form__selected-media .details-wrapper { display: flex; flex-wrap: wrap; padding: 0 10px 1em; } .media-library-add-form__selected-media .media-library-item .field--name-thumbnail img { height: 100px; } .media-library-add-form__selected-media .media-library-item--small { width: 33.3%; } .media-library-select-all { flex-basis: 100%; margin: 10px 8px; width: 100%; } .media-library-select-all input { margin-right: 10px; } .media-library-views-form { display: flex; flex-wrap: wrap; } .media-library-views-form > .form-actions { flex-basis: 100%; } .media-library-views-form > table { width: 100%; } .media-library-selection { display: flex; flex-wrap: wrap; margin: 1em -8px; } .media-library-views-form__bulk_form { display: flex; flex-wrap: wrap; } .media-library-view .form--inline { display: flex; flex-wrap: wrap; } .media-library-view .form-actions { align-self: flex-end; margin: 0.75em 0; } .media-library-view .media-library-view--form-actions { align-self: flex-end; clear: left; margin: 0.75em 0; } .media-library-views-form__header { flex-basis: 100%; } .media-library-views-form__header .form-item { margin-right: 8px; } .media-library-views-form__rows { display: flex; flex-basis: 100%; flex-wrap: wrap; margin: 0 -8px; } @media screen and (max-width: 600px) { .media-library-view .form-actions { flex-basis: 100%; } } .media-library-item { position: relative; } .media-library-item label { display: inline-block; } .media-library-item--grid { justify-content: center; outline: none; background: #ffffff; padding: 8px; width: 50%; vertical-align: top; box-sizing: border-box; } .media-library-item--grid:before { position: absolute; top: 7px; left: 7px; transition: border-color 0.2s, color 0.2s, background 0.2s; border: 1px solid #dbdbdb; width: calc(100% - 16px); height: calc(100% - 16px); content: ''; pointer-events: none; } .media-library-item--grid .form-item { margin: 0.75em; } .media-library-item--grid .field--name-thumbnail { background-color: #ebebeb; overflow: hidden; text-align: center; } .media-library-item--grid .field--name-thumbnail img { height: 180px; object-fit: contain; object-position: center center; } .media-library-item--grid.is-hover:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #40b6ff; } .media-library-item--grid.checked:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #0076c0; } .media-library-item--grid.checked .media-library-item__name { white-space: normal; } .media-library-item--grid.is-focus:before { top: 5px; left: 5px; border-width: 3px; border-radius: 3px; border-color: #40b6ff; } .media-library-item--grid.is-focus .media-library-item__name { white-space: normal; } .media-library-widget-modal .ui-dialog-buttonpane { display: flex; align-items: center; } .media-library-widget-modal .ui-dialog-buttonpane .form-actions { flex: 1; } .ui-dialog--narrow.media-library-widget-modal { max-width: 75%; } @media screen and (min-width: 45em) { .media-library-item--grid { width: 33.3%; } .media-library-widget-modal .media-library-item--grid { width: 50%; } .media-library-selection .media-library-item--grid { width: 50%; } .media-library-add-form__selected-media .media-library-item--small { width: 25%; } } @media screen and (min-width: 60em) { .media-library-item--grid { width: 25%; } .media-library-widget-modal .media-library-item--grid { width: 33.3%; } .media-library-selection .media-library-item--grid { width: 33.3%; } .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } @media screen and (min-width: 77em) { .media-library-item--grid { width: 16.6%; } .media-library-widget-modal .media-library-item--grid { width: 25%; } .media-library-selection .media-library-item--grid { width: 25%; } .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } .media-library-item__click-to-select-checkbox { display: block; position: absolute; top: 16px; left: 16px; z-index: 1; } .media-library-item__click-to-select-checkbox input { width: 20px; height: 20px; } .media-library-item__click-to-select-checkbox .form-item { margin: 0; } .media-library-item__click-to-select-trigger { cursor: pointer; height: 100%; overflow: hidden; } .media-library-item--table img { max-width: 100px; height: auto; } .media-library-item__preview { padding-bottom: 34px; } .field--widget-media-library-widget .media-library-item__preview { cursor: move; } .field--widget-media-library-widget .js-media-library-item:only-child .media-library-item__preview { cursor: inherit; } .media-library-item__status { position: absolute; top: 40px; left: 5px; background: #666666; padding: 5px 10px; color: #e4e4e4; font-size: 12px; font-style: italic; pointer-events: none; } .media-library-item__attributes { display: block; position: absolute; bottom: 0; background: #ffffff; padding: 5px; max-width: calc(100% - 10px); max-height: calc(100% - 50px); overflow: hidden; } .media-library-item__attributes:hover .media-library-item__name { white-space: normal; } .media-library-item__name { display: block; margin: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .media-library-item__type { color: #696969; font-size: 12px; } .media-library-item--disabled { opacity: 0.5; pointer-events: none; } .media-library-widget { position: relative; } .media-library-widget__toggle-weight { position: absolute; top: 5px; right: 5px; } .media-library-item__edit { position: absolute; top: 10px; right: 40px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/pencil.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__edit:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__edit:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove { position: absolute; top: 10px; right: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:first-child { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:disabled { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #cccccc; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:disabled:active { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:hover { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-item__remove.button:focus { position: absolute; top: 10px; transition: 0.2s border-color; z-index: 1; margin: 5px; border: 2px solid #40b6ff; border-radius: 20px; background: url("../../../../../../../core/misc/icons/787878/ex.svg") #ffffff center no-repeat; background-size: 13px; padding: 0; width: 21px; height: 21px; overflow: hidden; text-shadow: none; color: transparent; font-size: 0; } .media-library-add-form__media { display: flex; position: relative; outline: none; border-bottom: 1px solid #c0c0c0; padding: 1em 0; } .media-library-add-form__media:first-child { padding-top: 0; } .media-library-add-form__media:first-child .media-library-add-form__remove-button[type='submit'] { top: 5px; } .media-library-add-form__media:last-child { border-bottom: 0; padding-bottom: 0; } .media-library-add-form__preview { display: flex; align-items: center; justify-content: center; margin-right: 20px; background: #ebebeb; width: 220px; } .media-library-add-form__remove-button[type='submit'] { position: absolute; top: 25px; right: 6px; margin: 0; border: 0; border-radius: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; padding: 2px 20px 2px 2px; width: auto; text-transform: lowercase; line-height: 16px; color: transparent; font-weight: normal; } .media-library-add-form__remove-button:focus { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:disabled { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:disabled:active { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:focus { border: 0; background: transparent url("../../../../../../../core/misc/icons/787878/ex.svg") right 2px no-repeat; color: #787878; } .media-library-add-form__remove-button.button:hover { border: 0; box-shadow: none; background: transparent url("../../../../../../../core/misc/icons/ee0000/ex.svg") right 2px no-repeat; color: #ee0000; } .media-library-add-form__remove-button:hover { border: 0; box-shadow: none; background: transparent url("../../../../../../../core/misc/icons/ee0000/ex.svg") right 2px no-repeat; color: #ee0000; } .views-live-preview .media-library-view div.views-row + div.views-row { margin-top: 0; }
modules/uswds_blb_configuration_media_library/package-lock.json 0 → 100644 +10624 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
modules/uswds_blb_configuration_media_library/package.json 0 → 100644 +20 −0 Original line number Diff line number Diff line { "name": "uswds_blb_configuration_media_library", "description": "Templates for media library working with USWDS", "author": "Stephen Mustgrave", "version": "1.0.0", "scripts": { "css:compile": "node-sass --importer node_modules/node-sass-magic-importer/dist/cli.js scss/ --output-style expanded -o css/", "css:build": "npm run css:compile", "css:watch": "nodemon -e scss -x \"npm run css:build\" --ignore dist", "watch": "nodemon -e scss -x \"npm run build\" --ignore dist", "build": "npm run css:build" }, "dependencies": { "autoprefixer": "^10.4.5", "node-sass": "^7.0.0", "node-sass-magic-importer": "^5.3.0", "nodemon": "^2.0.15", "postcss-cli": "^9.1.0" } }