@hashicorp/mds-react 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +336 -0
- package/README.md +109 -0
- package/dist/components/accordion/index.d.ts +14 -0
- package/dist/components/accordion/index.js +9 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/accordion/item/button.d.ts +6 -0
- package/dist/components/accordion/item/button.js +44 -0
- package/dist/components/accordion/item/button.js.map +1 -0
- package/dist/components/accordion/item/index.d.ts +24 -0
- package/dist/components/accordion/item/index.js +59 -0
- package/dist/components/accordion/item/index.js.map +1 -0
- package/dist/components/accordion/style.module.scss +110 -0
- package/dist/components/accordion/style.module.scss.js +24 -0
- package/dist/components/accordion/style.module.scss.js.map +1 -0
- package/dist/components/alert/alert.module.scss +229 -0
- package/dist/components/alert/alert.module.scss.js +29 -0
- package/dist/components/alert/alert.module.scss.js.map +1 -0
- package/dist/components/alert/icon.d.ts +9 -0
- package/dist/components/alert/icon.js +34 -0
- package/dist/components/alert/icon.js.map +1 -0
- package/dist/components/alert/index.d.ts +62 -0
- package/dist/components/alert/index.js +97 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/badge/index.d.ts +30 -0
- package/dist/components/badge/index.js +50 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/badge/style.module.scss +130 -0
- package/dist/components/badge/style.module.scss.js +22 -0
- package/dist/components/badge/style.module.scss.js.map +1 -0
- package/dist/components/badge-count/index.d.ts +16 -0
- package/dist/components/badge-count/index.js +29 -0
- package/dist/components/badge-count/index.js.map +1 -0
- package/dist/components/badge-count/style.module.scss +108 -0
- package/dist/components/badge-count/style.module.scss.js +15 -0
- package/dist/components/badge-count/style.module.scss.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +7 -0
- package/dist/components/breadcrumbs/index.js +38 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/breadcrumbs/item/index.d.ts +2 -0
- package/dist/components/breadcrumbs/item/index.js +32 -0
- package/dist/components/breadcrumbs/item/index.js.map +1 -0
- package/dist/components/breadcrumbs/style.module.scss +183 -0
- package/dist/components/breadcrumbs/style.module.scss.js +27 -0
- package/dist/components/breadcrumbs/style.module.scss.js.map +1 -0
- package/dist/components/breadcrumbs/truncation-button/index.d.ts +3 -0
- package/dist/components/breadcrumbs/truncation-button/index.js +25 -0
- package/dist/components/breadcrumbs/truncation-button/index.js.map +1 -0
- package/dist/components/breadcrumbs/types/index.d.ts +51 -0
- package/dist/components/button/index.d.ts +31 -0
- package/dist/components/button/index.js +119 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/styles.module.scss +221 -0
- package/dist/components/button/styles.module.scss.js +32 -0
- package/dist/components/button/styles.module.scss.js.map +1 -0
- package/dist/components/card/card-thumbnail/card-thumbnail.module.css +10 -0
- package/dist/components/card/card-thumbnail/card-thumbnail.module.css.js +8 -0
- package/dist/components/card/card-thumbnail/card-thumbnail.module.css.js.map +1 -0
- package/dist/components/card/card-thumbnail/index.d.ts +2 -0
- package/dist/components/card/card-thumbnail/index.js +23 -0
- package/dist/components/card/card-thumbnail/index.js.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.js +157 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/card/styles.module.css +98 -0
- package/dist/components/card/styles.module.css.js +29 -0
- package/dist/components/card/styles.module.css.js.map +1 -0
- package/dist/components/card/types.d.ts +52 -0
- package/dist/components/code-block/code-block.module.scss +511 -0
- package/dist/components/code-block/code-block.module.scss.js +34 -0
- package/dist/components/code-block/code-block.module.scss.js.map +1 -0
- package/dist/components/code-block/code-lines/index.d.ts +12 -0
- package/dist/components/code-block/code-lines/index.js +59 -0
- package/dist/components/code-block/code-lines/index.js.map +1 -0
- package/dist/components/code-block/code-lines/utils/split-html-into-lines.d.ts +19 -0
- package/dist/components/code-block/code-lines/utils/split-html-into-lines.js +19 -0
- package/dist/components/code-block/code-lines/utils/split-html-into-lines.js.map +1 -0
- package/dist/components/code-block/code-lines/utils/split-jsx-into-lines.d.ts +21 -0
- package/dist/components/code-block/code-lines/utils/split-jsx-into-lines.js +31 -0
- package/dist/components/code-block/code-lines/utils/split-jsx-into-lines.js.map +1 -0
- package/dist/components/code-block/hidden-copy-content/index.d.ts +5 -0
- package/dist/components/code-block/hidden-copy-content/index.js +13 -0
- package/dist/components/code-block/hidden-copy-content/index.js.map +1 -0
- package/dist/components/code-block/index.d.ts +55 -0
- package/dist/components/code-block/index.js +88 -0
- package/dist/components/code-block/index.js.map +1 -0
- package/dist/components/code-block/utils/parse-highlighted-lines.d.ts +2 -0
- package/dist/components/code-block/utils/parse-highlighted-lines.js +39 -0
- package/dist/components/code-block/utils/parse-highlighted-lines.js.map +1 -0
- package/dist/components/code-block/utils/process-snippet.d.ts +12 -0
- package/dist/components/code-block/utils/process-snippet.js +20 -0
- package/dist/components/code-block/utils/process-snippet.js.map +1 -0
- package/dist/components/code-block/utils/shellwords.d.ts +14 -0
- package/dist/components/code-block/utils/shellwords.js +33 -0
- package/dist/components/code-block/utils/shellwords.js.map +1 -0
- package/dist/components/combo-box-primitive/index.d.ts +69 -0
- package/dist/components/combo-box-primitive/index.js +302 -0
- package/dist/components/combo-box-primitive/index.js.map +1 -0
- package/dist/components/dialog-primitive/dialog.module.scss +38 -0
- package/dist/components/dialog-primitive/dialog.module.scss.js +12 -0
- package/dist/components/dialog-primitive/dialog.module.scss.js.map +1 -0
- package/dist/components/dialog-primitive/index.d.ts +12 -0
- package/dist/components/dialog-primitive/index.js +15 -0
- package/dist/components/dialog-primitive/index.js.map +1 -0
- package/dist/components/disclosure-primitive/index.d.ts +19 -0
- package/dist/components/disclosure-primitive/index.js +57 -0
- package/dist/components/disclosure-primitive/index.js.map +1 -0
- package/dist/components/disclosure-primitive/styles.module.css +3 -0
- package/dist/components/disclosure-primitive/styles.module.css.js +7 -0
- package/dist/components/disclosure-primitive/styles.module.css.js.map +1 -0
- package/dist/components/disclosure-primitive/use-disclosure-primitive.d.ts +11 -0
- package/dist/components/disclosure-primitive/use-disclosure-primitive.js +17 -0
- package/dist/components/disclosure-primitive/use-disclosure-primitive.js.map +1 -0
- package/dist/components/dismiss-button/index.d.ts +9 -0
- package/dist/components/dismiss-button/index.js +22 -0
- package/dist/components/dismiss-button/index.js.map +1 -0
- package/dist/components/dismiss-button/styles.module.scss +31 -0
- package/dist/components/dismiss-button/styles.module.scss.js +7 -0
- package/dist/components/dismiss-button/styles.module.scss.js.map +1 -0
- package/dist/components/dropdown/index.d.ts +72 -0
- package/dist/components/dropdown/index.js +79 -0
- package/dist/components/dropdown/index.js.map +1 -0
- package/dist/components/dropdown/list-item/custom.d.ts +10 -0
- package/dist/components/dropdown/list-item/custom.js +9 -0
- package/dist/components/dropdown/list-item/custom.js.map +1 -0
- package/dist/components/dropdown/list-item/index.d.ts +19 -0
- package/dist/components/dropdown/list-item/index.js +14 -0
- package/dist/components/dropdown/list-item/index.js.map +1 -0
- package/dist/components/dropdown/list-item/interactive.d.ts +29 -0
- package/dist/components/dropdown/list-item/interactive.js +49 -0
- package/dist/components/dropdown/list-item/interactive.js.map +1 -0
- package/dist/components/dropdown/list-item/separator.d.ts +8 -0
- package/dist/components/dropdown/list-item/separator.js +17 -0
- package/dist/components/dropdown/list-item/separator.js.map +1 -0
- package/dist/components/dropdown/list-item/styles.module.css +222 -0
- package/dist/components/dropdown/list-item/styles.module.css.js +26 -0
- package/dist/components/dropdown/list-item/styles.module.css.js.map +1 -0
- package/dist/components/dropdown/list-item/title.d.ts +10 -0
- package/dist/components/dropdown/list-item/title.js +9 -0
- package/dist/components/dropdown/list-item/title.js.map +1 -0
- package/dist/components/dropdown/styles.module.css +74 -0
- package/dist/components/dropdown/styles.module.css.js +24 -0
- package/dist/components/dropdown/styles.module.css.js.map +1 -0
- package/dist/components/dropdown/toggle-button/index.d.ts +30 -0
- package/dist/components/dropdown/toggle-button/index.js +54 -0
- package/dist/components/dropdown/toggle-button/index.js.map +1 -0
- package/dist/components/dropdown/toggle-button/styles.module.scss +54 -0
- package/dist/components/dropdown/toggle-button/styles.module.scss.js +14 -0
- package/dist/components/dropdown/toggle-button/styles.module.scss.js.map +1 -0
- package/dist/components/flight-icon/flight-icon.module.css +31 -0
- package/dist/components/flight-icon/flight-icon.module.css.js +12 -0
- package/dist/components/flight-icon/flight-icon.module.css.js.map +1 -0
- package/dist/components/flight-icon/index.d.ts +44 -0
- package/dist/components/flight-icon/index.js +58 -0
- package/dist/components/flight-icon/index.js.map +1 -0
- package/dist/components/form/checkbox/form-checkbox.module.css +88 -0
- package/dist/components/form/checkbox/form-checkbox.module.css.js +8 -0
- package/dist/components/form/checkbox/form-checkbox.module.css.js.map +1 -0
- package/dist/components/form/checkbox/index.d.ts +45 -0
- package/dist/components/form/checkbox/index.js +109 -0
- package/dist/components/form/checkbox/index.js.map +1 -0
- package/dist/components/form/error/form-error.module.css +23 -0
- package/dist/components/form/error/form-error.module.css.js +14 -0
- package/dist/components/form/error/form-error.module.css.js.map +1 -0
- package/dist/components/form/error/index.d.ts +16 -0
- package/dist/components/form/error/index.js +22 -0
- package/dist/components/form/error/index.js.map +1 -0
- package/dist/components/form/field/form-field.module.css +79 -0
- package/dist/components/form/field/form-field.module.css.js +17 -0
- package/dist/components/form/field/form-field.module.css.js.map +1 -0
- package/dist/components/form/field/index.d.ts +19 -0
- package/dist/components/form/field/index.js +46 -0
- package/dist/components/form/field/index.js.map +1 -0
- package/dist/components/form/fieldset/form-fieldset.module.css +48 -0
- package/dist/components/form/fieldset/form-fieldset.module.css.js +19 -0
- package/dist/components/form/fieldset/form-fieldset.module.css.js.map +1 -0
- package/dist/components/form/fieldset/index.d.ts +19 -0
- package/dist/components/form/fieldset/index.js +65 -0
- package/dist/components/form/fieldset/index.js.map +1 -0
- package/dist/components/form/file-input/form-file-input.module.scss +81 -0
- package/dist/components/form/file-input/form-file-input.module.scss.js +7 -0
- package/dist/components/form/file-input/form-file-input.module.scss.js.map +1 -0
- package/dist/components/form/file-input/index.d.ts +27 -0
- package/dist/components/form/file-input/index.js +68 -0
- package/dist/components/form/file-input/index.js.map +1 -0
- package/dist/components/form/helper-text/form-helper-text.module.css +10 -0
- package/dist/components/form/helper-text/form-helper-text.module.css.js +7 -0
- package/dist/components/form/helper-text/form-helper-text.module.css.js.map +1 -0
- package/dist/components/form/helper-text/index.d.ts +11 -0
- package/dist/components/form/helper-text/index.js +22 -0
- package/dist/components/form/helper-text/index.js.map +1 -0
- package/dist/components/form/indicator/form-indicator.module.css +10 -0
- package/dist/components/form/indicator/form-indicator.module.css.js +8 -0
- package/dist/components/form/indicator/form-indicator.module.css.js.map +1 -0
- package/dist/components/form/indicator/index.d.ts +9 -0
- package/dist/components/form/indicator/index.js +22 -0
- package/dist/components/form/indicator/index.js.map +1 -0
- package/dist/components/form/label/form-label.module.css +15 -0
- package/dist/components/form/label/form-label.module.css.js +10 -0
- package/dist/components/form/label/form-label.module.css.js.map +1 -0
- package/dist/components/form/label/index.d.ts +14 -0
- package/dist/components/form/label/index.js +33 -0
- package/dist/components/form/label/index.js.map +1 -0
- package/dist/components/form/legend/form-legend.module.css +17 -0
- package/dist/components/form/legend/form-legend.module.css.js +10 -0
- package/dist/components/form/legend/form-legend.module.css.js.map +1 -0
- package/dist/components/form/legend/index.d.ts +12 -0
- package/dist/components/form/legend/index.js +19 -0
- package/dist/components/form/legend/index.js.map +1 -0
- package/dist/components/form/radio/form-radio.module.scss +74 -0
- package/dist/components/form/radio/form-radio.module.scss.js +8 -0
- package/dist/components/form/radio/form-radio.module.scss.js.map +1 -0
- package/dist/components/form/radio/index.d.ts +44 -0
- package/dist/components/form/radio/index.js +100 -0
- package/dist/components/form/radio/index.js.map +1 -0
- package/dist/components/form/radio-card/description.d.ts +3 -0
- package/dist/components/form/radio-card/description.js +10 -0
- package/dist/components/form/radio-card/description.js.map +1 -0
- package/dist/components/form/radio-card/form-radio-card.module.css +153 -0
- package/dist/components/form/radio-card/form-radio-card.module.css.js +30 -0
- package/dist/components/form/radio-card/form-radio-card.module.css.js.map +1 -0
- package/dist/components/form/radio-card/group.d.ts +11 -0
- package/dist/components/form/radio-card/group.js +31 -0
- package/dist/components/form/radio-card/group.js.map +1 -0
- package/dist/components/form/radio-card/index.d.ts +48 -0
- package/dist/components/form/radio-card/index.js +67 -0
- package/dist/components/form/radio-card/index.js.map +1 -0
- package/dist/components/form/radio-card/label.d.ts +3 -0
- package/dist/components/form/radio-card/label.js +10 -0
- package/dist/components/form/radio-card/label.js.map +1 -0
- package/dist/components/form/select/form-select.module.css +89 -0
- package/dist/components/form/select/form-select.module.css.js +14 -0
- package/dist/components/form/select/form-select.module.css.js.map +1 -0
- package/dist/components/form/select/index.d.ts +21 -0
- package/dist/components/form/select/index.js +79 -0
- package/dist/components/form/select/index.js.map +1 -0
- package/dist/components/form/super-select/form-super-select.module.css +155 -0
- package/dist/components/form/super-select/form-super-select.module.css.js +22 -0
- package/dist/components/form/super-select/form-super-select.module.css.js.map +1 -0
- package/dist/components/form/super-select/index.d.ts +55 -0
- package/dist/components/form/super-select/index.js +170 -0
- package/dist/components/form/super-select/index.js.map +1 -0
- package/dist/components/form/text-input/index.d.ts +98 -0
- package/dist/components/form/text-input/index.js +91 -0
- package/dist/components/form/text-input/index.js.map +1 -0
- package/dist/components/form/text-input/styles.module.css +158 -0
- package/dist/components/form/text-input/styles.module.css.js +15 -0
- package/dist/components/form/text-input/styles.module.css.js.map +1 -0
- package/dist/components/form/textarea/form-textarea.module.css +88 -0
- package/dist/components/form/textarea/form-textarea.module.css.js +14 -0
- package/dist/components/form/textarea/form-textarea.module.css.js.map +1 -0
- package/dist/components/form/textarea/index.d.ts +19 -0
- package/dist/components/form/textarea/index.js +74 -0
- package/dist/components/form/textarea/index.js.map +1 -0
- package/dist/components/form/toggle/form-toggle.module.scss +164 -0
- package/dist/components/form/toggle/form-toggle.module.scss.js +12 -0
- package/dist/components/form/toggle/form-toggle.module.scss.js.map +1 -0
- package/dist/components/form/toggle/index.d.ts +78 -0
- package/dist/components/form/toggle/index.js +102 -0
- package/dist/components/form/toggle/index.js.map +1 -0
- package/dist/components/hds/wrappers/tooltip.d.ts +13 -0
- package/dist/components/hds/wrappers/tooltip.js +51 -0
- package/dist/components/hds/wrappers/tooltip.js.map +1 -0
- package/dist/components/icon-tile/index.d.ts +21 -0
- package/dist/components/icon-tile/index.js +50 -0
- package/dist/components/icon-tile/index.js.map +1 -0
- package/dist/components/icon-tile/style.module.scss +136 -0
- package/dist/components/icon-tile/style.module.scss.js +29 -0
- package/dist/components/icon-tile/style.module.scss.js.map +1 -0
- package/dist/components/index.d.ts +60 -0
- package/dist/components/index.js +119 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/inline-link/index.d.ts +40 -0
- package/dist/components/inline-link/index.js +33 -0
- package/dist/components/inline-link/index.js.map +1 -0
- package/dist/components/inline-link/inline-link.module.css +49 -0
- package/dist/components/inline-link/inline-link.module.css.js +11 -0
- package/dist/components/inline-link/inline-link.module.css.js.map +1 -0
- package/dist/components/interactive/index.d.ts +26 -0
- package/dist/components/interactive/index.js +59 -0
- package/dist/components/interactive/index.js.map +1 -0
- package/dist/components/legacy-button/index.d.ts +5 -0
- package/dist/components/legacy-button/index.js +65 -0
- package/dist/components/legacy-button/index.js.map +1 -0
- package/dist/components/legacy-button/types.d.ts +37 -0
- package/dist/components/legacy-button/utils.d.ts +9 -0
- package/dist/components/legacy-button/utils.js +39 -0
- package/dist/components/legacy-button/utils.js.map +1 -0
- package/dist/components/menu-primitive/index.d.ts +14 -0
- package/dist/components/menu-primitive/index.js +68 -0
- package/dist/components/menu-primitive/index.js.map +1 -0
- package/dist/components/menu-primitive/styles.module.css +16 -0
- package/dist/components/menu-primitive/styles.module.css.js +12 -0
- package/dist/components/menu-primitive/styles.module.css.js.map +1 -0
- package/dist/components/menu-primitive/use-menu-primitive.d.ts +9 -0
- package/dist/components/menu-primitive/use-menu-primitive.js +17 -0
- package/dist/components/menu-primitive/use-menu-primitive.js.map +1 -0
- package/dist/components/modal/index.d.ts +13 -0
- package/dist/components/modal/index.js +61 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/modal.module.css +22 -0
- package/dist/components/modal/modal.module.css.js +8 -0
- package/dist/components/modal/modal.module.css.js.map +1 -0
- package/dist/components/modal/use-modal.d.ts +8 -0
- package/dist/components/modal/use-modal.js +17 -0
- package/dist/components/modal/use-modal.js.map +1 -0
- package/dist/components/separator/index.d.ts +10 -0
- package/dist/components/separator/index.js +15 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/separator/separator.module.css +15 -0
- package/dist/components/separator/separator.module.css.js +10 -0
- package/dist/components/separator/separator.module.css.js.map +1 -0
- package/dist/components/standalone-link/index.d.ts +23 -0
- package/dist/components/standalone-link/index.js +54 -0
- package/dist/components/standalone-link/index.js.map +1 -0
- package/dist/components/standalone-link/styles.module.scss +166 -0
- package/dist/components/standalone-link/styles.module.scss.js +17 -0
- package/dist/components/standalone-link/styles.module.scss.js.map +1 -0
- package/dist/components/table/index.d.ts +58 -0
- package/dist/components/table/index.js +52 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.module.scss +192 -0
- package/dist/components/table/table.module.scss.js +33 -0
- package/dist/components/table/table.module.scss.js.map +1 -0
- package/dist/components/table/td.d.ts +17 -0
- package/dist/components/table/td.js +28 -0
- package/dist/components/table/td.js.map +1 -0
- package/dist/components/table/th-button-tooltip.d.ts +6 -0
- package/dist/components/table/th-button-tooltip.js +24 -0
- package/dist/components/table/th-button-tooltip.js.map +1 -0
- package/dist/components/table/th.d.ts +34 -0
- package/dist/components/table/th.js +43 -0
- package/dist/components/table/th.js.map +1 -0
- package/dist/components/table/tr.d.ts +12 -0
- package/dist/components/table/tr.js +9 -0
- package/dist/components/table/tr.js.map +1 -0
- package/dist/components/table/utils.d.ts +16 -0
- package/dist/components/table/utils.js +28 -0
- package/dist/components/table/utils.js.map +1 -0
- package/dist/components/tabs/index.d.ts +21 -0
- package/dist/components/tabs/index.js +117 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tab-panel.d.ts +5 -0
- package/dist/components/tabs/tab-panel.js +35 -0
- package/dist/components/tabs/tab-panel.js.map +1 -0
- package/dist/components/tabs/tab.d.ts +24 -0
- package/dist/components/tabs/tab.js +70 -0
- package/dist/components/tabs/tab.js.map +1 -0
- package/dist/components/tabs/tabs.module.scss +163 -0
- package/dist/components/tabs/tabs.module.scss.js +22 -0
- package/dist/components/tabs/tabs.module.scss.js.map +1 -0
- package/dist/components/tabs/use-tabs-context.d.ts +15 -0
- package/dist/components/tabs/use-tabs-context.js +16 -0
- package/dist/components/tabs/use-tabs-context.js.map +1 -0
- package/dist/components/text/index.d.ts +44 -0
- package/dist/components/text/index.js +112 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text/style.module.scss +11 -0
- package/dist/components/text/style.module.scss.js +9 -0
- package/dist/components/text/style.module.scss.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.d.ts +8 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js +62 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css +76 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js +20 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/index.d.ts +44 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/index.js +104 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/index.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/index.d.ts +10 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/index.js +13 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/index.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css +29 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js +14 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js.map +1 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/style.module.css +76 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/style.module.css.js +28 -0
- package/dist/components/visualizations/bar-chart/horizontal-chart/style.module.css.js.map +1 -0
- package/dist/components/visualizations/bar-chart/index.d.ts +13 -0
- package/dist/components/visualizations/bar-chart/index.js +37 -0
- package/dist/components/visualizations/bar-chart/index.js.map +1 -0
- package/dist/components/visualizations/bar-chart/style.module.css +39 -0
- package/dist/components/visualizations/bar-chart/style.module.css.js +12 -0
- package/dist/components/visualizations/bar-chart/style.module.css.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/index.d.ts +3 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/index.js +14 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/index.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css +14 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js +10 -0
- package/dist/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/index.d.ts +3 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/index.js +58 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/index.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/styles.module.css +32 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js +16 -0
- package/dist/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/index.d.ts +3 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/index.d.ts +3 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/index.js +42 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/index.js.map +1 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css +20 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js +14 -0
- package/dist/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js.map +1 -0
- package/dist/components/visualizations/donut-chart/index.d.ts +10 -0
- package/dist/components/visualizations/donut-chart/index.js +90 -0
- package/dist/components/visualizations/donut-chart/index.js.map +1 -0
- package/dist/components/visualizations/donut-chart/styles.module.css +73 -0
- package/dist/components/visualizations/donut-chart/styles.module.css.js +20 -0
- package/dist/components/visualizations/donut-chart/styles.module.css.js.map +1 -0
- package/dist/components/visualizations/donut-chart/types.d.ts +16 -0
- package/dist/hooks/use-media-query/index.js +16 -0
- package/dist/hooks/use-media-query/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +158 -0
- package/dist/index.js.map +1 -0
- package/dist/patterns/card/index.d.ts +5 -0
- package/dist/patterns/card/newsroom-card/index.d.ts +15 -0
- package/dist/patterns/card/newsroom-card/index.js +26 -0
- package/dist/patterns/card/newsroom-card/index.js.map +1 -0
- package/dist/patterns/card/newsroom-card/style.module.css +12 -0
- package/dist/patterns/card/newsroom-card/style.module.css.js +8 -0
- package/dist/patterns/card/newsroom-card/style.module.css.js.map +1 -0
- package/dist/patterns/card/partner-card/index.d.ts +18 -0
- package/dist/patterns/card/partner-card/index.js +42 -0
- package/dist/patterns/card/partner-card/index.js.map +1 -0
- package/dist/patterns/card/partner-card/style.module.css +24 -0
- package/dist/patterns/card/partner-card/style.module.css.js +12 -0
- package/dist/patterns/card/partner-card/style.module.css.js.map +1 -0
- package/dist/patterns/card/person-card/index.d.ts +15 -0
- package/dist/patterns/card/person-card/index.js +52 -0
- package/dist/patterns/card/person-card/index.js.map +1 -0
- package/dist/patterns/card/person-card/style.module.css +28 -0
- package/dist/patterns/card/person-card/style.module.css.js +12 -0
- package/dist/patterns/card/person-card/style.module.css.js.map +1 -0
- package/dist/patterns/card/primitives.d.ts +37 -0
- package/dist/patterns/card/primitives.js +77 -0
- package/dist/patterns/card/primitives.js.map +1 -0
- package/dist/patterns/card/promo-card/index.d.ts +18 -0
- package/dist/patterns/card/promo-card/index.js +36 -0
- package/dist/patterns/card/promo-card/index.js.map +1 -0
- package/dist/patterns/card/resource-card/index.d.ts +16 -0
- package/dist/patterns/card/resource-card/index.js +26 -0
- package/dist/patterns/card/resource-card/index.js.map +1 -0
- package/dist/patterns/card/style.module.css +121 -0
- package/dist/patterns/card/style.module.css.js +30 -0
- package/dist/patterns/card/style.module.css.js.map +1 -0
- package/dist/patterns/card/thumbnails/index.d.ts +13 -0
- package/dist/patterns/card/thumbnails/index.js +25 -0
- package/dist/patterns/card/thumbnails/index.js.map +1 -0
- package/dist/patterns/card/types.d.ts +41 -0
- package/dist/patterns/card/unified-card/index.d.ts +10 -0
- package/dist/patterns/card/unified-card/index.js +37 -0
- package/dist/patterns/card/unified-card/index.js.map +1 -0
- package/dist/patterns/copy-button/clipboard.d.ts +16 -0
- package/dist/patterns/copy-button/clipboard.js +78 -0
- package/dist/patterns/copy-button/clipboard.js.map +1 -0
- package/dist/patterns/copy-button/index.d.ts +19 -0
- package/dist/patterns/copy-button/index.js +57 -0
- package/dist/patterns/copy-button/index.js.map +1 -0
- package/dist/patterns/copy-button/style.module.css +23 -0
- package/dist/patterns/copy-button/style.module.css.js +13 -0
- package/dist/patterns/copy-button/style.module.css.js.map +1 -0
- package/dist/patterns/index.d.ts +15 -0
- package/dist/patterns/index.js +35 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/layout/index.d.ts +69 -0
- package/dist/patterns/layout/index.js +47 -0
- package/dist/patterns/layout/index.js.map +1 -0
- package/dist/patterns/layout/layout.module.css +72 -0
- package/dist/patterns/layout/layout.module.css.js +20 -0
- package/dist/patterns/layout/layout.module.css.js.map +1 -0
- package/dist/patterns/product-badge/index.d.ts +11 -0
- package/dist/patterns/product-badge/index.js +22 -0
- package/dist/patterns/product-badge/index.js.map +1 -0
- package/dist/patterns/product-badge/style.module.css +3 -0
- package/dist/patterns/product-badge/style.module.css.js +8 -0
- package/dist/patterns/product-badge/style.module.css.js.map +1 -0
- package/dist/patterns/product-logo/index.d.ts +48 -0
- package/dist/patterns/product-logo/index.js +130 -0
- package/dist/patterns/product-logo/index.js.map +1 -0
- package/dist/patterns/product-logo/product-logo.module.css +24 -0
- package/dist/patterns/product-logo/product-logo.module.css.js +13 -0
- package/dist/patterns/product-logo/product-logo.module.css.js.map +1 -0
- package/dist/patterns/related-content/index.d.ts +6 -0
- package/dist/patterns/related-content/index.js +65 -0
- package/dist/patterns/related-content/index.js.map +1 -0
- package/dist/patterns/related-content/style.module.css +74 -0
- package/dist/patterns/related-content/style.module.css.js +22 -0
- package/dist/patterns/related-content/style.module.css.js.map +1 -0
- package/dist/patterns/related-content/types.d.ts +14 -0
- package/dist/style.css +1 -0
- package/dist/styles/mixins/button.scss +284 -0
- package/dist/styles/mixins/focus-ring.scss +75 -0
- package/dist/utils/get-contrast-yiq.d.ts +20 -0
- package/dist/utils/get-contrast-yiq.js +13 -0
- package/dist/utils/get-contrast-yiq.js.map +1 -0
- package/dist/utils/hooks/use-screen-size.d.ts +5 -0
- package/dist/utils/hooks/use-screen-size.js +10 -0
- package/dist/utils/hooks/use-screen-size.js.map +1 -0
- package/dist/utils/i18n/index.d.ts +1 -0
- package/dist/utils/i18n/index.js +41 -0
- package/dist/utils/i18n/index.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/make-normalizer/index.d.ts +30 -0
- package/dist/utils/make-normalizer/index.js +34 -0
- package/dist/utils/make-normalizer/index.js.map +1 -0
- package/dist/utils/mds-context/index.d.ts +59 -0
- package/dist/utils/mds-context/index.js +85 -0
- package/dist/utils/mds-context/index.js.map +1 -0
- package/package.json +113 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use 'styles/mixins/focus-ring' as *;
|
|
2
|
+
|
|
3
|
+
.dismiss-button {
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 0;
|
|
6
|
+
color: var(--mds-color-foreground-faint);
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
border: none;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
&::before {
|
|
13
|
+
/* we re-use the pseudo-element created by the "focus-ring" mixin */
|
|
14
|
+
background-color: var(--mds-color-palette-alpha-100);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:active {
|
|
19
|
+
&::before {
|
|
20
|
+
background-color: var(--mds-color-palette-alpha-200);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* notice: this is used not only for the focus, but also to increase the clickable area */
|
|
25
|
+
@include hds-focus-ring-with-pseudo-element(
|
|
26
|
+
$top: -4px,
|
|
27
|
+
$right: -4px,
|
|
28
|
+
$bottom: -4px,
|
|
29
|
+
$left: -4px
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { DropdownToggleButtonProps } from './toggle-button';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* If true, container is given full width styles. (Added by web presence team)
|
|
6
|
+
*/
|
|
7
|
+
isFullWidth?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Callback function invoked when the Dropdown is closed, if provided.
|
|
10
|
+
*/
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
}
|
|
13
|
+
interface DropdownContentProps {
|
|
14
|
+
listPosition?: 'right' | 'left' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
15
|
+
width?: `${number}px` | `${number}em` | `${number}%`;
|
|
16
|
+
/**
|
|
17
|
+
* If a height prop is provided then the list will have a fixed height.
|
|
18
|
+
*/
|
|
19
|
+
height?: `${number}px` | `${number}em`;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
interface DropdownHeaderFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
hasDivider?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const Dropdown: {
|
|
26
|
+
Root: {
|
|
27
|
+
({ isFullWidth, onClose, children, className, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
ToggleButton: {
|
|
31
|
+
({ text, color, size, icon, isFullWidth, count, badge, badgeIcon, disabled, ...rest }: DropdownToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
Content: {
|
|
35
|
+
({ listPosition, width, height, children, }: DropdownContentProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
List: {
|
|
39
|
+
({ children }: {
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
Header: {
|
|
45
|
+
({ hasDivider, children, ...rest }: DropdownHeaderFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
Footer: {
|
|
49
|
+
({ hasDivider, children, ...rest }: DropdownHeaderFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
ListItem: {
|
|
53
|
+
Interactive: {
|
|
54
|
+
({ text, color, icon, isLoading, trailingIcon, ...rest }: import('./list-item/interactive').ListItemInteractiveProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
Title: {
|
|
58
|
+
({ text, ...rest }: import('./list-item/title').ListItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
61
|
+
Separator: {
|
|
62
|
+
(props: import('./list-item/separator').ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
Custom: {
|
|
66
|
+
({ children }: import('./list-item/custom').ListItemCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type { DropdownProps, DropdownContentProps, DropdownHeaderFooterProps, DropdownToggleButtonProps, };
|
|
72
|
+
export { Dropdown };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import s from "classnames";
|
|
3
|
+
import { Content as N, Provider as f } from "../menu-primitive/index.js";
|
|
4
|
+
import { ToggleButton as w } from "./toggle-button/index.js";
|
|
5
|
+
import { ListItem as u } from "./list-item/index.js";
|
|
6
|
+
import t from "./styles.module.css.js";
|
|
7
|
+
const a = ({
|
|
8
|
+
isFullWidth: o,
|
|
9
|
+
onClose: e,
|
|
10
|
+
children: r,
|
|
11
|
+
className: i,
|
|
12
|
+
...l
|
|
13
|
+
}) => /* @__PURE__ */ n(
|
|
14
|
+
f,
|
|
15
|
+
{
|
|
16
|
+
className: s(
|
|
17
|
+
{
|
|
18
|
+
[t["width-full"]]: o
|
|
19
|
+
},
|
|
20
|
+
i
|
|
21
|
+
),
|
|
22
|
+
onClose: e,
|
|
23
|
+
isFullWidth: o,
|
|
24
|
+
...l,
|
|
25
|
+
children: r
|
|
26
|
+
}
|
|
27
|
+
), d = ({
|
|
28
|
+
listPosition: o = "bottom-right",
|
|
29
|
+
width: e,
|
|
30
|
+
height: r,
|
|
31
|
+
children: i
|
|
32
|
+
}) => /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: s(
|
|
36
|
+
t.content,
|
|
37
|
+
t[`content-position-${o}`],
|
|
38
|
+
{ [t["content-fixed-width"]]: !!e }
|
|
39
|
+
),
|
|
40
|
+
style: { width: e, height: r },
|
|
41
|
+
children: i
|
|
42
|
+
}
|
|
43
|
+
) }), m = ({ children: o }) => /* @__PURE__ */ n("ul", { className: t.list, children: o }), p = ({
|
|
44
|
+
hasDivider: o,
|
|
45
|
+
children: e,
|
|
46
|
+
...r
|
|
47
|
+
}) => /* @__PURE__ */ n(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: s(t.header, {
|
|
51
|
+
[t["header-with-divider"]]: o
|
|
52
|
+
}),
|
|
53
|
+
...r,
|
|
54
|
+
children: e
|
|
55
|
+
}
|
|
56
|
+
), c = ({
|
|
57
|
+
hasDivider: o,
|
|
58
|
+
children: e,
|
|
59
|
+
...r
|
|
60
|
+
}) => /* @__PURE__ */ n(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: s(t.footer, {
|
|
64
|
+
[t["footer-with-divider"]]: o
|
|
65
|
+
}),
|
|
66
|
+
...r,
|
|
67
|
+
children: e
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
a.displayName = "Dropdown.Root";
|
|
71
|
+
d.displayName = "Dropdown.Content";
|
|
72
|
+
m.displayName = "Dropdown.List";
|
|
73
|
+
p.displayName = "Dropdown.Header";
|
|
74
|
+
c.displayName = "Dropdown.Footer";
|
|
75
|
+
const x = { Root: a, ToggleButton: w, Content: d, List: m, Header: p, Footer: c, ListItem: u };
|
|
76
|
+
export {
|
|
77
|
+
x as Dropdown
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/dropdown/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport * as MenuPrimitive from '../menu-primitive'\nimport { ToggleButton } from './toggle-button'\nimport type { DropdownToggleButtonProps } from './toggle-button'\nimport { ListItem } from './list-item'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport s from './styles.module.css'\n\ninterface DropdownProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * If true, container is given full width styles. (Added by web presence team)\n\t */\n\tisFullWidth?: boolean\n\t/**\n\t * Callback function invoked when the Dropdown is closed, if provided.\n\t */\n\tonClose?: () => void\n}\n\nconst Root = ({\n\tisFullWidth,\n\tonClose,\n\tchildren,\n\tclassName,\n\t...rest\n}: DropdownProps) => {\n\treturn (\n\t\t<MenuPrimitive.Provider\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t[s['width-full']]: isFullWidth,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tonClose={onClose}\n\t\t\tisFullWidth={isFullWidth}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</MenuPrimitive.Provider>\n\t)\n}\n\ninterface DropdownContentProps {\n\tlistPosition?:\n\t\t| 'right'\n\t\t| 'left'\n\t\t| 'bottom-left'\n\t\t| 'bottom-right'\n\t\t| 'top-left'\n\t\t| 'top-right'\n\twidth?: `${number}px` | `${number}em` | `${number}%`\n\t/**\n\t * If a height prop is provided then the list will have a fixed height.\n\t */\n\theight?: `${number}px` | `${number}em`\n\tchildren: ReactNode\n}\n\nconst Content = ({\n\tlistPosition = 'bottom-right',\n\twidth,\n\theight,\n\tchildren,\n}: DropdownContentProps) => {\n\treturn (\n\t\t<MenuPrimitive.Content>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts.content,\n\t\t\t\t\ts[`content-position-${listPosition}`],\n\t\t\t\t\t{ [s['content-fixed-width']]: !!width }\n\t\t\t\t)}\n\t\t\t\tstyle={{ width, height }}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</MenuPrimitive.Content>\n\t)\n}\n\nconst List = ({ children }: { children: ReactNode }) => {\n\treturn <ul className={s.list}>{children}</ul>\n}\n\ninterface DropdownHeaderFooterProps extends HTMLAttributes<HTMLDivElement> {\n\thasDivider?: boolean\n}\n\nconst Header = ({\n\thasDivider,\n\tchildren,\n\t...rest\n}: DropdownHeaderFooterProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s.header, {\n\t\t\t\t[s['header-with-divider']]: hasDivider,\n\t\t\t})}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nconst Footer = ({\n\thasDivider,\n\tchildren,\n\t...rest\n}: DropdownHeaderFooterProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s.footer, {\n\t\t\t\t[s['footer-with-divider']]: hasDivider,\n\t\t\t})}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nRoot.displayName = 'Dropdown.Root'\nContent.displayName = 'Dropdown.Content'\nList.displayName = 'Dropdown.List'\nHeader.displayName = 'Dropdown.Header'\nFooter.displayName = 'Dropdown.Footer'\n\nconst Dropdown = { Root, ToggleButton, Content, List, Header, Footer, ListItem }\n\nexport type {\n\tDropdownProps,\n\tDropdownContentProps,\n\tDropdownHeaderFooterProps,\n\tDropdownToggleButtonProps,\n}\nexport { Dropdown }\n"],"names":["Root","isFullWidth","onClose","children","className","rest","jsx","MenuPrimitive.Provider","classNames","s","Content","listPosition","width","height","MenuPrimitive.Content","List","Header","hasDivider","Footer","Dropdown","ToggleButton","ListItem"],"mappings":";;;;;;AAmBA,MAAMA,IAAO,CAAC;AAAA,EACb,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACA,WAAWC;AAAA,MACV;AAAA,QACC,CAACC,EAAE,YAAY,CAAC,GAAGR;AAAA,MAAA;AAAA,MAEpBG;AAAA,IAAA;AAAA,IAED,SAAAF;AAAA,IACA,aAAAD;AAAA,IACC,GAAGI;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA,GAqBEO,IAAU,CAAC;AAAA,EAChB,cAAAC,IAAe;AAAA,EACf,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAV;AACD,MAEE,gBAAAG,EAACQ,GAAA,EACA,UAAA,gBAAAR;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWE;AAAA,MACVC,EAAE;AAAA,MACFA,EAAE,oBAAoBE,CAAY,EAAE;AAAA,MACpC,EAAE,CAACF,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAACG,EAAA;AAAA,IAAM;AAAA,IAEvC,OAAO,EAAE,OAAAA,GAAO,QAAAC,EAAA;AAAA,IAEf,UAAAV;AAAA,EAAA;AAAA,GAEH,GAIIY,IAAO,CAAC,EAAE,UAAAZ,QACR,gBAAAG,EAAC,MAAA,EAAG,WAAWG,EAAE,MAAO,UAAAN,GAAS,GAOnCa,IAAS,CAAC;AAAA,EACf,YAAAC;AAAA,EACA,UAAAd;AAAA,EACA,GAAGE;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWE,EAAWC,EAAE,QAAQ;AAAA,MAC/B,CAACA,EAAE,qBAAqB,CAAC,GAAGQ;AAAA,IAAA,CAC5B;AAAA,IACA,GAAGZ;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA,GAKEe,IAAS,CAAC;AAAA,EACf,YAAAD;AAAA,EACA,UAAAd;AAAA,EACA,GAAGE;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWE,EAAWC,EAAE,QAAQ;AAAA,MAC/B,CAACA,EAAE,qBAAqB,CAAC,GAAGQ;AAAA,IAAA,CAC5B;AAAA,IACA,GAAGZ;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA;AAKJH,EAAK,cAAc;AACnBU,EAAQ,cAAc;AACtBK,EAAK,cAAc;AACnBC,EAAO,cAAc;AACrBE,EAAO,cAAc;AAErB,MAAMC,IAAW,EAAE,MAAAnB,GAAM,cAAAoB,GAAc,SAAAV,GAAS,MAAAK,GAAM,QAAAC,GAAQ,QAAAE,GAAQ,UAAAG,EAAA;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ListItemCustomProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const ListItemCustom: {
|
|
6
|
+
({ children }: ListItemCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export type { ListItemCustomProps };
|
|
10
|
+
export { ListItemCustom };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import o from "classnames";
|
|
3
|
+
import m from "./styles.module.css.js";
|
|
4
|
+
const r = ({ children: s }) => /* @__PURE__ */ t("li", { className: o(m["list-item"], m.custom), children: s });
|
|
5
|
+
r.displayName = "Dropdown.ListItem.Custom";
|
|
6
|
+
export {
|
|
7
|
+
r as ListItemCustom
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.js","sources":["../../../../src/components/dropdown/list-item/custom.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport s from './styles.module.css'\n\ninterface ListItemCustomProps {\n\tchildren: ReactNode\n}\n\nconst ListItemCustom = ({ children }: ListItemCustomProps) => {\n\treturn <li className={classNames(s['list-item'], s.custom)}>{children}</li>\n}\n\nListItemCustom.displayName = 'Dropdown.ListItem.Custom'\n\nexport type { ListItemCustomProps }\nexport { ListItemCustom }\n"],"names":["ListItemCustom","children","jsx","classNames","s"],"mappings":";;;AAQA,MAAMA,IAAiB,CAAC,EAAE,UAAAC,QAClB,gBAAAC,EAAC,MAAA,EAAG,WAAWC,EAAWC,EAAE,WAAW,GAAGA,EAAE,MAAM,GAAI,UAAAH,EAAA,CAAS;AAGvED,EAAe,cAAc;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const ListItem: {
|
|
2
|
+
Interactive: {
|
|
3
|
+
({ text, color, icon, isLoading, trailingIcon, ...rest }: import('./interactive').ListItemInteractiveProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
Title: {
|
|
7
|
+
({ text, ...rest }: import('./title').ListItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
Separator: {
|
|
11
|
+
(props: import('./separator').ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
Custom: {
|
|
15
|
+
({ children }: import('./custom').ListItemCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export { ListItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ListItemInteractive as t } from "./interactive.js";
|
|
2
|
+
import { ListItemTitle as m } from "./title.js";
|
|
3
|
+
import { ListItemSeparator as r } from "./separator.js";
|
|
4
|
+
import { ListItemCustom as e } from "./custom.js";
|
|
5
|
+
const I = {
|
|
6
|
+
Interactive: t,
|
|
7
|
+
Title: m,
|
|
8
|
+
Separator: r,
|
|
9
|
+
Custom: e
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
I as ListItem
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/dropdown/list-item/index.tsx"],"sourcesContent":["import { ListItemInteractive } from './interactive'\nimport { ListItemTitle } from './title'\nimport { ListItemSeparator } from './separator'\nimport { ListItemCustom } from './custom'\n\nconst ListItem = {\n\tInteractive: ListItemInteractive,\n\tTitle: ListItemTitle,\n\tSeparator: ListItemSeparator,\n\tCustom: ListItemCustom,\n}\n\nexport { ListItem }\n"],"names":["ListItem","ListItemInteractive","ListItemTitle","ListItemSeparator","ListItemCustom"],"mappings":";;;;AAKA,MAAMA,IAAW;AAAA,EAChB,aAAaC;AAAA,EACb,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,QAAQC;AACT;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InteractiveProps } from '../../interactive';
|
|
2
|
+
interface ListItemInteractiveProps extends Omit<InteractiveProps, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* Text to be used in the item. If no text value is defined, an error will be thrown.
|
|
5
|
+
*/
|
|
6
|
+
text: string;
|
|
7
|
+
/**
|
|
8
|
+
* Color applied to the text and (optional) icons.
|
|
9
|
+
*/
|
|
10
|
+
color?: 'action' | 'critical';
|
|
11
|
+
/**
|
|
12
|
+
* Leading icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.
|
|
13
|
+
*/
|
|
14
|
+
icon?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Trailing icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.
|
|
17
|
+
*/
|
|
18
|
+
trailingIcon?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Controls if the item is in “loading” state. When in this state, the item is not actually interactive, but you can pass the other expected arguments for the item (they’re simply ignored).
|
|
21
|
+
*/
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const ListItemInteractive: {
|
|
25
|
+
({ text, color, icon, isLoading, trailingIcon, ...rest }: ListItemInteractiveProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
export type { ListItemInteractiveProps };
|
|
29
|
+
export { ListItemInteractive };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import { FlightIcon as a } from "../../flight-icon/index.js";
|
|
4
|
+
import { Interactive as d } from "../../interactive/index.js";
|
|
5
|
+
import e from "./styles.module.css.js";
|
|
6
|
+
const v = ({
|
|
7
|
+
text: r,
|
|
8
|
+
color: m = "action",
|
|
9
|
+
icon: c,
|
|
10
|
+
isLoading: l,
|
|
11
|
+
trailingIcon: n,
|
|
12
|
+
...o
|
|
13
|
+
}) => /* @__PURE__ */ i(
|
|
14
|
+
"li",
|
|
15
|
+
{
|
|
16
|
+
className: t(e["list-item"], e.interactive, e[`color-${m}`]),
|
|
17
|
+
children: l ? /* @__PURE__ */ s("div", { className: e["loading-wrapper"], children: [
|
|
18
|
+
/* @__PURE__ */ i(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
name: "loading",
|
|
22
|
+
className: t(e["interactive-icon"], e.leading)
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ i("div", { className: t(e["interactive-text"], e["text-regular"]), children: r })
|
|
26
|
+
] }) : /* @__PURE__ */ s(d, { ...o, children: [
|
|
27
|
+
c && /* @__PURE__ */ i(
|
|
28
|
+
a,
|
|
29
|
+
{
|
|
30
|
+
name: c,
|
|
31
|
+
className: t(e["interactive-icon"], e.leading)
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ i("div", { className: t(e["interactive-text"], e["text-large"]), children: r }),
|
|
35
|
+
n && /* @__PURE__ */ i(
|
|
36
|
+
a,
|
|
37
|
+
{
|
|
38
|
+
name: n,
|
|
39
|
+
className: t(e["interactive-icon"], e.trailing)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] })
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
v.displayName = "Dropdown.ListItem.Interactive";
|
|
46
|
+
export {
|
|
47
|
+
v as ListItemInteractive
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=interactive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive.js","sources":["../../../../src/components/dropdown/list-item/interactive.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FlightIcon } from '../../flight-icon'\nimport { Interactive, type InteractiveProps } from '../../interactive'\nimport s from './styles.module.css'\n\ninterface ListItemInteractiveProps extends Omit<InteractiveProps, 'children'> {\n\t/**\n\t * Text to be used in the item. If no text value is defined, an error will be thrown.\n\t */\n\ttext: string\n\t/**\n\t * Color applied to the text and (optional) icons.\n\t */\n\tcolor?: 'action' | 'critical'\n\t/**\n\t * Leading icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ticon?: string\n\t/**\n\t * Trailing icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ttrailingIcon?: string\n\t/**\n\t * Controls if the item is in “loading” state. When in this state, the item is not actually interactive, but you can pass the other expected arguments for the item (they’re simply ignored).\n\t */\n\tisLoading?: boolean\n}\n\nconst ListItemInteractive = ({\n\ttext,\n\tcolor = 'action',\n\ticon,\n\tisLoading,\n\ttrailingIcon,\n\t...rest\n}: ListItemInteractiveProps) => {\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames(s['list-item'], s.interactive, s[`color-${color}`])}\n\t\t>\n\t\t\t{isLoading ? (\n\t\t\t\t<div className={s['loading-wrapper']}>\n\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\tname=\"loading\"\n\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.leading)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={classNames(s['interactive-text'], s['text-regular'])}>\n\t\t\t\t\t\t{text}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<Interactive {...rest}>\n\t\t\t\t\t{icon && (\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={icon}\n\t\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.leading)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className={classNames(s['interactive-text'], s['text-large'])}>\n\t\t\t\t\t\t{text}\n\t\t\t\t\t</div>\n\t\t\t\t\t{trailingIcon && (\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={trailingIcon}\n\t\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.trailing)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Interactive>\n\t\t\t)}\n\t\t</li>\n\t)\n}\n\nListItemInteractive.displayName = 'Dropdown.ListItem.Interactive'\n\nexport type { ListItemInteractiveProps }\nexport { ListItemInteractive }\n"],"names":["ListItemInteractive","text","color","icon","isLoading","trailingIcon","rest","jsx","classNames","s","jsxs","FlightIcon","Interactive"],"mappings":";;;;;AA4BA,MAAMA,IAAsB,CAAC;AAAA,EAC5B,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC,EAAWC,EAAE,WAAW,GAAGA,EAAE,aAAaA,EAAE,SAASP,CAAK,EAAE,CAAC;AAAA,IAEvE,cACA,gBAAAQ,EAAC,OAAA,EAAI,WAAWD,EAAE,iBAAiB,GAClC,UAAA;AAAA,MAAA,gBAAAF;AAAA,QAACI;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAWH,EAAWC,EAAE,kBAAkB,GAAGA,EAAE,OAAO;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvD,gBAAAF,EAAC,OAAA,EAAI,WAAWC,EAAWC,EAAE,kBAAkB,GAAGA,EAAE,cAAc,CAAC,GACjE,UAAAR,EAAA,CACF;AAAA,IAAA,EAAA,CACD,IAEA,gBAAAS,EAACE,GAAA,EAAa,GAAGN,GACf,UAAA;AAAA,MAAAH,KACA,gBAAAI;AAAA,QAACI;AAAA,QAAA;AAAA,UACA,MAAMR;AAAA,UACN,WAAWK,EAAWC,EAAE,kBAAkB,GAAGA,EAAE,OAAO;AAAA,QAAA;AAAA,MAAA;AAAA,MAGxD,gBAAAF,EAAC,OAAA,EAAI,WAAWC,EAAWC,EAAE,kBAAkB,GAAGA,EAAE,YAAY,CAAC,GAC/D,UAAAR,EAAA,CACF;AAAA,MACCI,KACA,gBAAAE;AAAA,QAACI;AAAA,QAAA;AAAA,UACA,MAAMN;AAAA,UACN,WAAWG,EAAWC,EAAE,kBAAkB,GAAGA,EAAE,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACxD,EAAA,CAEF;AAAA,EAAA;AAAA;AAMJT,EAAoB,cAAc;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
type ListItemSeparatorProps = Omit<HTMLAttributes<HTMLLIElement>, 'className' | 'aria-hidden' | 'role'>;
|
|
3
|
+
declare const ListItemSeparator: {
|
|
4
|
+
(props: ListItemSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export type { ListItemSeparatorProps };
|
|
8
|
+
export { ListItemSeparator };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import e from "classnames";
|
|
3
|
+
import r from "./styles.module.css.js";
|
|
4
|
+
const o = (t) => /* @__PURE__ */ a(
|
|
5
|
+
"li",
|
|
6
|
+
{
|
|
7
|
+
className: e(r["list-item"], r.separator),
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
role: "separator",
|
|
10
|
+
...t
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
o.displayName = "Dropdown.ListItem.Separator";
|
|
14
|
+
export {
|
|
15
|
+
o as ListItemSeparator
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sources":["../../../../src/components/dropdown/list-item/separator.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './styles.module.css'\n\ntype ListItemSeparatorProps = Omit<\n\tHTMLAttributes<HTMLLIElement>,\n\t'className' | 'aria-hidden' | 'role'\n>\n\nconst ListItemSeparator = (props: ListItemSeparatorProps) => {\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames(s['list-item'], s.separator)}\n\t\t\taria-hidden=\"true\"\n\t\t\trole=\"separator\"\n\t\t\t{...props}\n\t\t></li>\n\t)\n}\n\nListItemSeparator.displayName = 'Dropdown.ListItem.Separator'\n\nexport type { ListItemSeparatorProps }\nexport { ListItemSeparator }\n"],"names":["ListItemSeparator","props","jsx","classNames","s"],"mappings":";;;AASA,MAAMA,IAAoB,CAACC,MAEzB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC,EAAWC,EAAE,WAAW,GAAGA,EAAE,SAAS;AAAA,IACjD,eAAY;AAAA,IACZ,MAAK;AAAA,IACJ,GAAGH;AAAA,EAAA;AAAA;AAKPD,EAAkB,cAAc;"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
.list-item[disabled],
|
|
2
|
+
.list-item[disabled]:hover {
|
|
3
|
+
color: var(--mds-color-foreground-disabled);
|
|
4
|
+
cursor: not-allowed;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.interactive {
|
|
8
|
+
position: relative;
|
|
9
|
+
min-height: 36px;
|
|
10
|
+
isolation: isolate; /* used to create a new stacking context (needed to have the pseudo element below text/icon but not the parent container) */
|
|
11
|
+
|
|
12
|
+
/* need to reset a few extra things to make the button visually appear the same as the link */
|
|
13
|
+
& button {
|
|
14
|
+
width: 100%;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* shared styles for links and buttons */
|
|
23
|
+
& a,
|
|
24
|
+
& button {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
padding: 7px 9px 7px 15px; /* notice: we're subtracting 1px because of the transparent border */
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
border: 1px solid transparent; /* because a border for the button is needed for a11y, we apply it to both the button and the link so they have the same height */
|
|
30
|
+
outline-style: solid; /* used to avoid double outline+focus-ring in Safari (see https://github.com/hashicorp/design-system-components/issues/161#issuecomment-1031548656) */
|
|
31
|
+
outline-color: transparent;
|
|
32
|
+
|
|
33
|
+
/* this is used for the left "hover" indicator */
|
|
34
|
+
&::before {
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 6px;
|
|
37
|
+
bottom: 6px;
|
|
38
|
+
left: 4px;
|
|
39
|
+
z-index: -1;
|
|
40
|
+
width: 2px;
|
|
41
|
+
border-radius: 1px;
|
|
42
|
+
content: '';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Notice: this is used for the active/focus states which have very specific positions
|
|
46
|
+
and also has a background color, so we can't use the existing focus-ring mixins */
|
|
47
|
+
&::after {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 4px;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
left: 10px;
|
|
53
|
+
z-index: -1;
|
|
54
|
+
border-radius: 5px;
|
|
55
|
+
content: '';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Notice: to avoid too much duplication we define two local CSS variables
|
|
59
|
+
and define their values in the color variants below */
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
color: var(--current-color-hover);
|
|
63
|
+
|
|
64
|
+
&::before {
|
|
65
|
+
background-color: currentColor;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* default focus for browsers that still rely on ":focus" */
|
|
70
|
+
&:focus {
|
|
71
|
+
color: var(--current-color-focus);
|
|
72
|
+
|
|
73
|
+
&::after {
|
|
74
|
+
left: 4px;
|
|
75
|
+
box-shadow: var(--current-focus-ring-box-shadow);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* undo the previous declaration for browsers that support ":focus-visible" but wouldn't normally show default focus styles */
|
|
80
|
+
&:focus:not(:focus-visible) {
|
|
81
|
+
&::after {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
box-shadow: none;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* set focus for browsers that support ":focus-visible" */
|
|
88
|
+
&:focus-visible {
|
|
89
|
+
color: var(--current-color-focus);
|
|
90
|
+
|
|
91
|
+
&::after {
|
|
92
|
+
left: 4px;
|
|
93
|
+
box-shadow: var(--current-focus-ring-box-shadow);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* remove the focus ring on "active + focused" state (by design) */
|
|
98
|
+
&:focus:active,
|
|
99
|
+
&:focus-visible:active {
|
|
100
|
+
&::after {
|
|
101
|
+
left: 10px;
|
|
102
|
+
background-color: var(--current-background-color);
|
|
103
|
+
box-shadow: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:active {
|
|
108
|
+
color: var(--current-color-active);
|
|
109
|
+
|
|
110
|
+
&::before {
|
|
111
|
+
background-color: currentColor;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.color-action {
|
|
118
|
+
& a,
|
|
119
|
+
& button {
|
|
120
|
+
color: var(--mds-color-foreground-primary);
|
|
121
|
+
|
|
122
|
+
/* assign the values to the local CSS variables used above */
|
|
123
|
+
--current-color-hover: var(--mds-color-foreground-action-hover);
|
|
124
|
+
--current-color-focus: var(--mds-color-foreground-action-active);
|
|
125
|
+
--current-color-active: var(--mds-color-foreground-action-active);
|
|
126
|
+
|
|
127
|
+
&::after {
|
|
128
|
+
--current-focus-ring-box-shadow: var(
|
|
129
|
+
--mds-focus-ring-action-box-shadow
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.color-critical {
|
|
136
|
+
& a,
|
|
137
|
+
& button {
|
|
138
|
+
color: var(--mds-color-foreground-critical);
|
|
139
|
+
|
|
140
|
+
/* assign the values to the local CSS variables used above */
|
|
141
|
+
--current-color-hover: var(--mds-color-palette-red-300);
|
|
142
|
+
--current-color-focus: var(--mds-color-palette-red-400);
|
|
143
|
+
--current-color-active: var(--mds-color-palette-red-400);
|
|
144
|
+
|
|
145
|
+
&::after {
|
|
146
|
+
--current-background-color: var(--mds-color-surface-critical);
|
|
147
|
+
--current-focus-ring-box-shadow: var(
|
|
148
|
+
--mds-focus-ring-critical-box-shadow
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.custom {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: flex-start;
|
|
157
|
+
padding: 7px 9px 7px 15px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.interactive-icon {
|
|
161
|
+
display: block;
|
|
162
|
+
margin-top: 2px;
|
|
163
|
+
|
|
164
|
+
&.leading {
|
|
165
|
+
margin-right: 8px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.trailing {
|
|
169
|
+
margin-left: 8px;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.interactive-text {
|
|
174
|
+
flex: 1;
|
|
175
|
+
text-align: left;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.loading-wrapper {
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
padding: 8px 10px 8px 16px;
|
|
182
|
+
|
|
183
|
+
& .interactive-text {
|
|
184
|
+
color: var(--mds-color-foreground-faint);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
& .interactive-icon {
|
|
188
|
+
color: var(--mds-color-foreground-primary);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.text-regular {
|
|
193
|
+
composes: mds-typography-legacy-body-100 from global;
|
|
194
|
+
composes: mds-typography-font-weight-regular from global;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.text-large {
|
|
198
|
+
composes: mds-typography-legacy-body-200 from global;
|
|
199
|
+
composes: mds-typography-font-weight-medium from global;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.separator {
|
|
203
|
+
position: relative;
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: 4px;
|
|
206
|
+
|
|
207
|
+
&::before {
|
|
208
|
+
position: absolute;
|
|
209
|
+
right: 6px;
|
|
210
|
+
bottom: 0;
|
|
211
|
+
left: 6px;
|
|
212
|
+
border-bottom: 1px solid var(--mds-color-border-primary);
|
|
213
|
+
content: '';
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.title {
|
|
218
|
+
composes: mds-typography-legacy-body-100 from global;
|
|
219
|
+
composes: mds-typography-font-weight-semibold from global;
|
|
220
|
+
padding: 10px 16px 4px;
|
|
221
|
+
color: var(--mds-color-foreground-strong);
|
|
222
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const t = "interactive__IkSoP", e = "custom__lrM-c", i = "leading__uGWjP", a = "trailing__46J03", o = "separator__cop56", r = "title__XkdBJ mds-typography-legacy-body-100 mds-typography-font-weight-semibold", c = {
|
|
2
|
+
"list-item": "list-item__p6gnG",
|
|
3
|
+
interactive: t,
|
|
4
|
+
"color-action": "color-action__zG8cO",
|
|
5
|
+
"color-critical": "color-critical__3USEd",
|
|
6
|
+
custom: e,
|
|
7
|
+
"interactive-icon": "interactive-icon__2sVuv",
|
|
8
|
+
leading: i,
|
|
9
|
+
trailing: a,
|
|
10
|
+
"interactive-text": "interactive-text__9tKHU",
|
|
11
|
+
"loading-wrapper": "loading-wrapper__RMG87",
|
|
12
|
+
"text-regular": "text-regular__nmwqr mds-typography-legacy-body-100 mds-typography-font-weight-regular",
|
|
13
|
+
"text-large": "text-large__gU2cx mds-typography-legacy-body-200 mds-typography-font-weight-medium",
|
|
14
|
+
separator: o,
|
|
15
|
+
title: r
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as custom,
|
|
19
|
+
c as default,
|
|
20
|
+
t as interactive,
|
|
21
|
+
i as leading,
|
|
22
|
+
o as separator,
|
|
23
|
+
r as title,
|
|
24
|
+
a as trailing
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=styles.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface ListItemTitleProps extends Omit<HTMLAttributes<HTMLLIElement>, 'className'> {
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ListItemTitle: {
|
|
6
|
+
({ text, ...rest }: ListItemTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export type { ListItemTitleProps };
|
|
10
|
+
export { ListItemTitle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import s from "classnames";
|
|
3
|
+
import t from "./styles.module.css.js";
|
|
4
|
+
const r = ({ text: i, ...e }) => /* @__PURE__ */ m("li", { className: s(t["list-item"], t.title), ...e, children: i });
|
|
5
|
+
r.displayName = "Dropdown.ListItem.Title";
|
|
6
|
+
export {
|
|
7
|
+
r as ListItemTitle
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=title.js.map
|