@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,22 @@
|
|
|
1
|
+
.modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 50;
|
|
4
|
+
height: fit-content;
|
|
5
|
+
max-height: 95vh;
|
|
6
|
+
inset: 0;
|
|
7
|
+
margin: auto; /* needed to center the modal dialog on the viewport */
|
|
8
|
+
box-shadow: var(--mds-surface-overlay-box-shadow);
|
|
9
|
+
|
|
10
|
+
/* the `<dialog>` element uses a special "open" attribute to determine its visibility status */
|
|
11
|
+
&:not([open]) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* we hide the native `::backdrop` pseudo-element in favor of using
|
|
17
|
+
* a custom `overlay` element to detect click events with more ease
|
|
18
|
+
*/
|
|
19
|
+
&::backdrop {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ModalContextState {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
openModal: (content: ReactNode) => void;
|
|
5
|
+
closeModal: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ModalContext: import('react').Context<ModalContextState | undefined>;
|
|
8
|
+
export declare function useModal(): ModalContextState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, useContext as n } from "react";
|
|
3
|
+
const o = e(
|
|
4
|
+
void 0
|
|
5
|
+
);
|
|
6
|
+
o.displayName = "ModalContext";
|
|
7
|
+
function d() {
|
|
8
|
+
const t = n(o);
|
|
9
|
+
if (t === void 0)
|
|
10
|
+
throw new Error("useModal must be used within a ModalContext.Provider");
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
o as ModalContext,
|
|
15
|
+
d as useModal
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=use-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-modal.js","sources":["../../../src/components/modal/use-modal.ts"],"sourcesContent":["'use client'\n\nimport { createContext, useContext } from 'react'\nimport type { ReactNode } from 'react'\n\nexport interface ModalContextState {\n\tisOpen: boolean\n\topenModal: (content: ReactNode) => void\n\tcloseModal: () => void\n}\n\nexport const ModalContext = createContext<ModalContextState | undefined>(\n\tundefined\n)\nModalContext.displayName = 'ModalContext'\n\nexport function useModal(): ModalContextState {\n\tconst context = useContext(ModalContext)\n\tif (context === undefined) {\n\t\tthrow new Error('useModal must be used within a ModalContext.Provider')\n\t}\n\treturn context\n}\n"],"names":["ModalContext","createContext","useModal","context","useContext"],"mappings":";;AAW4B,MAC3BA,IAAAC;AAAA,EACD;AACA;AAEOD,gBAAuC;AAC7C,SAAME,IAAU;AAChB,QAAIC,IAAYC,EAAWJ,CAAA;AAC1B,MAAAG,MAAU;AACX,UAAA,IAAA,MAAA,sDAAA;AAED,SAAAA;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface SeparatorProps extends HTMLAttributes<HTMLHRElement> {
|
|
3
|
+
spacing?: '0' | '24';
|
|
4
|
+
}
|
|
5
|
+
declare const Separator: {
|
|
6
|
+
({ spacing, className, ...rest }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export type { SeparatorProps };
|
|
10
|
+
export { Separator };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import r from "./separator.module.css.js";
|
|
4
|
+
const t = ({ spacing: a = "24", className: o, ...s }) => /* @__PURE__ */ m(
|
|
5
|
+
"hr",
|
|
6
|
+
{
|
|
7
|
+
className: p(r.separator, r[`spacing-${a}`], o),
|
|
8
|
+
...s
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
t.displayName = "Separator";
|
|
12
|
+
export {
|
|
13
|
+
t as Separator
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/separator/index.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './separator.module.css'\n\ninterface SeparatorProps extends HTMLAttributes<HTMLHRElement> {\n\tspacing?: '0' | '24'\n}\n\nconst Separator = ({ spacing = '24', className, ...rest }: SeparatorProps) => {\n\treturn (\n\t\t<hr\n\t\t\tclassName={classNames(s.separator, s[`spacing-${spacing}`], className)}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\nSeparator.displayName = 'Separator'\n\nexport type { SeparatorProps }\nexport { Separator }\n"],"names":["Separator","spacing","className","rest","jsx","classNames","s"],"mappings":";;;AAQA,MAAMA,IAAY,CAAC,EAAE,SAAAC,IAAU,MAAM,WAAAC,GAAW,GAAGC,QAEjD,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC,EAAWC,EAAE,WAAWA,EAAE,WAAWL,CAAO,EAAE,GAAGC,CAAS;AAAA,IACpE,GAAGC;AAAA,EAAA;AAAA;AAKPH,EAAU,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InteractiveProps } from '../interactive';
|
|
2
|
+
declare const STANDALONE_LINK_SIZES: readonly ["small", "medium", "large"];
|
|
3
|
+
type StandaloneLinkSize = (typeof STANDALONE_LINK_SIZES)[number];
|
|
4
|
+
declare const STANDALONE_LINK_COLORS: readonly ["primary", "secondary", "secondary-inverted"];
|
|
5
|
+
type StandaloneLinkColor = (typeof STANDALONE_LINK_COLORS)[number];
|
|
6
|
+
declare const STANDALONE_LINK_ICON_POSITIONS: readonly ["leading", "trailing"];
|
|
7
|
+
type StandaloneLinkIconPosition = (typeof STANDALONE_LINK_ICON_POSITIONS)[number];
|
|
8
|
+
interface StandaloneLinkProps extends Omit<InteractiveProps, 'color' | 'size'> {
|
|
9
|
+
text: string;
|
|
10
|
+
size?: StandaloneLinkSize;
|
|
11
|
+
color?: StandaloneLinkColor;
|
|
12
|
+
icon?: string;
|
|
13
|
+
iconPosition?: StandaloneLinkIconPosition;
|
|
14
|
+
href?: string;
|
|
15
|
+
locale?: string;
|
|
16
|
+
isHrefExternal?: boolean;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const StandaloneLink: import('react').ForwardRefExoticComponent<StandaloneLinkProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
22
|
+
export type { StandaloneLinkSize, StandaloneLinkColor, StandaloneLinkIconPosition, StandaloneLinkProps, };
|
|
23
|
+
export { STANDALONE_LINK_SIZES, STANDALONE_LINK_COLORS, STANDALONE_LINK_ICON_POSITIONS, StandaloneLink, };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as S } from "react";
|
|
3
|
+
import I from "classnames";
|
|
4
|
+
import { Interactive as L } from "../interactive/index.js";
|
|
5
|
+
import { FlightIcon as f } from "../flight-icon/index.js";
|
|
6
|
+
import a from "./styles.module.scss.js";
|
|
7
|
+
const T = ["small", "medium", "large"], h = [
|
|
8
|
+
"primary",
|
|
9
|
+
"secondary",
|
|
10
|
+
"secondary-inverted"
|
|
11
|
+
], k = ["leading", "trailing"], O = S(
|
|
12
|
+
({
|
|
13
|
+
text: i,
|
|
14
|
+
size: m = "medium",
|
|
15
|
+
color: s = "primary",
|
|
16
|
+
icon: t,
|
|
17
|
+
iconPosition: r = "leading",
|
|
18
|
+
className: o,
|
|
19
|
+
"data-testid": l,
|
|
20
|
+
locale: d,
|
|
21
|
+
...N
|
|
22
|
+
}, c) => {
|
|
23
|
+
const e = t && /* @__PURE__ */ n(f, { name: t, size: 16 });
|
|
24
|
+
return /* @__PURE__ */ p(
|
|
25
|
+
L,
|
|
26
|
+
{
|
|
27
|
+
...N,
|
|
28
|
+
ref: c,
|
|
29
|
+
className: I(
|
|
30
|
+
a["standalone-link"],
|
|
31
|
+
a[`size-${m}`],
|
|
32
|
+
a[`color-${s}`],
|
|
33
|
+
a[`icon-position-${r}`],
|
|
34
|
+
o
|
|
35
|
+
),
|
|
36
|
+
"data-testid": l,
|
|
37
|
+
locale: d,
|
|
38
|
+
children: [
|
|
39
|
+
e && r === "leading" && e,
|
|
40
|
+
/* @__PURE__ */ n("span", { className: a.text, children: i }),
|
|
41
|
+
e && r === "trailing" && e
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
O.displayName = "StandaloneLink";
|
|
48
|
+
export {
|
|
49
|
+
h as STANDALONE_LINK_COLORS,
|
|
50
|
+
k as STANDALONE_LINK_ICON_POSITIONS,
|
|
51
|
+
T as STANDALONE_LINK_SIZES,
|
|
52
|
+
O as StandaloneLink
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/standalone-link/index.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport classNames from 'classnames'\nimport type { InteractiveProps } from '../interactive'\nimport { Interactive } from '../interactive'\nimport { FlightIcon } from '../flight-icon'\nimport s from './styles.module.scss'\n\nconst STANDALONE_LINK_SIZES = ['small', 'medium', 'large'] as const\ntype StandaloneLinkSize = (typeof STANDALONE_LINK_SIZES)[number]\n\nconst STANDALONE_LINK_COLORS = [\n\t'primary',\n\t'secondary',\n\t'secondary-inverted',\n] as const\ntype StandaloneLinkColor = (typeof STANDALONE_LINK_COLORS)[number]\n\nconst STANDALONE_LINK_ICON_POSITIONS = ['leading', 'trailing'] as const\ntype StandaloneLinkIconPosition =\n\t(typeof STANDALONE_LINK_ICON_POSITIONS)[number]\n\ninterface StandaloneLinkProps extends Omit<InteractiveProps, 'color' | 'size'> {\n\ttext: string\n\tsize?: StandaloneLinkSize\n\tcolor?: StandaloneLinkColor\n\ticon?: string\n\ticonPosition?: StandaloneLinkIconPosition\n\thref?: string\n\tlocale?: string\n\tisHrefExternal?: boolean\n\tonClick?: () => void\n\tclassName?: string\n\t'data-testid'?: string\n}\n\nconst StandaloneLink = forwardRef<\n\tHTMLAnchorElement | HTMLButtonElement,\n\tStandaloneLinkProps\n>(\n\t(\n\t\t{\n\t\t\ttext,\n\t\t\tsize = 'medium',\n\t\t\tcolor = 'primary',\n\t\t\ticon,\n\t\t\ticonPosition = 'leading',\n\t\t\tclassName,\n\t\t\t'data-testid': dataTestId,\n\t\t\tlocale,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst iconElement = icon && <FlightIcon name={icon} size={16} />\n\n\t\treturn (\n\t\t\t<Interactive\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['standalone-link'],\n\t\t\t\t\ts[`size-${size}`],\n\t\t\t\t\ts[`color-${color}`],\n\t\t\t\t\ts[`icon-position-${iconPosition}`],\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdata-testid={dataTestId}\n\t\t\t\tlocale={locale}\n\t\t\t>\n\t\t\t\t{iconElement && iconPosition === 'leading' && iconElement}\n\t\t\t\t<span className={s.text}>{text}</span>\n\t\t\t\t{iconElement && iconPosition === 'trailing' && iconElement}\n\t\t\t</Interactive>\n\t\t)\n\t}\n)\n\nStandaloneLink.displayName = 'StandaloneLink'\n\nexport type {\n\tStandaloneLinkSize,\n\tStandaloneLinkColor,\n\tStandaloneLinkIconPosition,\n\tStandaloneLinkProps,\n}\nexport {\n\tSTANDALONE_LINK_SIZES,\n\tSTANDALONE_LINK_COLORS,\n\tSTANDALONE_LINK_ICON_POSITIONS,\n\tStandaloneLink,\n}\n"],"names":["STANDALONE_LINK_SIZES","STANDALONE_LINK_COLORS","STANDALONE_LINK_ICON_POSITIONS","StandaloneLink","forwardRef","text","size","color","icon","iconPosition","className","dataTestId","locale","props","ref","iconElement","jsx","FlightIcon","jsxs","Interactive","classNames","s"],"mappings":";;;;;;AAOA,MAAMA,IAAwB,CAAC,SAAS,UAAU,OAAO,GAGnDC,IAAyB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,GAGMC,IAAiC,CAAC,WAAW,UAAU,GAkBvDC,IAAiBC;AAAA,EAItB,CACC;AAAA,IACC,MAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,MAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,WAAAC;AAAA,IACA,eAAeC;AAAA,IACf,QAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEJC,MACI;AACJ,UAAMC,IAAcP,KAAQ,gBAAAQ,EAACC,KAAW,MAAMT,GAAM,MAAM,IAAI;AAE9D,WACC,gBAAAU;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,GAAGN;AAAA,QACJ,KAAAC;AAAA,QACA,WAAWM;AAAA,UACVC,EAAE,iBAAiB;AAAA,UACnBA,EAAE,QAAQf,CAAI,EAAE;AAAA,UAChBe,EAAE,SAASd,CAAK,EAAE;AAAA,UAClBc,EAAE,iBAAiBZ,CAAY,EAAE;AAAA,UACjCC;AAAA,QAAA;AAAA,QAED,eAAaC;AAAA,QACb,QAAAC;AAAA,QAEC,UAAA;AAAA,UAAAG,KAAeN,MAAiB,aAAaM;AAAA,UAC9C,gBAAAC,EAAC,QAAA,EAAK,WAAWK,EAAE,MAAO,UAAAhB,GAAK;AAAA,UAC9BU,KAAeN,MAAiB,cAAcM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlD;AACD;AAEAZ,EAAe,cAAc;"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
@use 'styles/mixins/focus-ring' as *;
|
|
2
|
+
|
|
3
|
+
$standalone-link-border-width: 1px;
|
|
4
|
+
$standalone-link-focus-border-radius: 5px;
|
|
5
|
+
|
|
6
|
+
// this is how much the focus is visually "shifted" from the bounding box of the
|
|
7
|
+
// notice: you have to take in account also the inset shadow of the focus (see Figma file and also "focus-ring" mixin)
|
|
8
|
+
$standalone-link-focus-shift: 4px;
|
|
9
|
+
|
|
10
|
+
.standalone-link {
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: 0.25rem;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
width: fit-content;
|
|
16
|
+
padding-top: 4px;
|
|
17
|
+
padding-bottom: 4px;
|
|
18
|
+
font-weight: var(--mds-typography-font-weight-medium);
|
|
19
|
+
font-family: var(--mds-typography-font-stack-text);
|
|
20
|
+
background-color: transparent; // needs to exist for a11y
|
|
21
|
+
border: $standalone-link-border-width solid transparent; // needs to exist AND be transparent for a11y
|
|
22
|
+
// notice: the text decoration is applied directly to the "text" container because of a bug in Safari (see https://github.com/hashicorp/design-system-components/issues/159)
|
|
23
|
+
text-decoration-color: transparent;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
// the position absolute of an element is computed from the inside of the border of the container
|
|
27
|
+
// so we have to take in account the border width of the pseudo-element container itself
|
|
28
|
+
$shift: $standalone-link-focus-shift + $standalone-link-border-width;
|
|
29
|
+
// for visual/optical balance we add an extra 2px to the "shift" near the text (opposite the icon)
|
|
30
|
+
$shift-extra: $shift + 2px;
|
|
31
|
+
|
|
32
|
+
// notice: this is used not only for the focus, but also to increase the clickable area
|
|
33
|
+
@include hds-focus-ring-with-pseudo-element(
|
|
34
|
+
$right: -$shift,
|
|
35
|
+
$left: -$shift,
|
|
36
|
+
$radius: $standalone-link-focus-border-radius
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// we need to override a couple of values for better visual alignment
|
|
40
|
+
&.icon-position-leading::before {
|
|
41
|
+
right: -$shift-extra;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.icon-position-trailing::before {
|
|
45
|
+
left: -$shift-extra;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& svg {
|
|
49
|
+
transition: color 0.15s ease-in;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.text {
|
|
54
|
+
flex: 1 0 0;
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
text-decoration-color: transparent;
|
|
57
|
+
transition: text-decoration-color 0.15s ease-in, color 0.15s ease-in;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.size-small {
|
|
61
|
+
& .text {
|
|
62
|
+
font-size: var(--mds-typography-body-100-font-size);
|
|
63
|
+
line-height: var(--mds-typography-body-100-line-height);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.size-medium {
|
|
68
|
+
& .text {
|
|
69
|
+
font-size: var(--mds-typography-body-200-font-size);
|
|
70
|
+
line-height: var(--mds-typography-body-200-line-height);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.size-large {
|
|
75
|
+
& .text {
|
|
76
|
+
font-size: var(--mds-typography-body-300-font-size);
|
|
77
|
+
line-height: var(--mds-typography-body-300-line-height);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.color-primary {
|
|
82
|
+
color: var(--mds-color-foreground-action);
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
color: var(--mds-color-foreground-action-hover);
|
|
86
|
+
|
|
87
|
+
.text {
|
|
88
|
+
text-decoration-color: #4e81e8; // custom color by design
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:active {
|
|
93
|
+
color: var(--mds-color-foreground-action-active);
|
|
94
|
+
|
|
95
|
+
.text {
|
|
96
|
+
text-decoration-color: #396ed6; // custom color by design
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&::before {
|
|
100
|
+
background-color: var(--mds-color-surface-action);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.color-secondary {
|
|
106
|
+
color: var(--mds-color-foreground-strong);
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
.text {
|
|
110
|
+
text-decoration-color: #4d4d4f; // custom color by design
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:active {
|
|
115
|
+
color: var(--mds-color-foreground-primary);
|
|
116
|
+
|
|
117
|
+
.text {
|
|
118
|
+
text-decoration-color: #6e7075; // custom color by design
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&::before {
|
|
122
|
+
background-color: var(--mds-color-surface-interactive-active);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:global(.mds-dark-mode),
|
|
128
|
+
:global([data-theme='dark']) {
|
|
129
|
+
& .color-secondary {
|
|
130
|
+
&:hover {
|
|
131
|
+
.text {
|
|
132
|
+
text-decoration-color: var(--mds-color-foreground-strong);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:active {
|
|
137
|
+
.text {
|
|
138
|
+
text-decoration-color: var(--mds-color-foreground-strong);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.color-secondary-inverted {
|
|
145
|
+
color: var(--mds-color-palette-neutral-50);
|
|
146
|
+
|
|
147
|
+
&:hover {
|
|
148
|
+
color: var(--mds-color-palette-neutral-300);
|
|
149
|
+
|
|
150
|
+
.text {
|
|
151
|
+
text-decoration-color: var(--mds-color-palette-neutral-300);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:active {
|
|
156
|
+
color: var(--mds-color-palette-neutral-300);
|
|
157
|
+
|
|
158
|
+
.text {
|
|
159
|
+
text-decoration-color: var(--mds-color-palette-neutral-300);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&::before {
|
|
163
|
+
background-color: var(--mds-color-palette-neutral-600);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const o = "text__2B7Ih", i = {
|
|
2
|
+
"standalone-link": "standalone-link__85Pyl",
|
|
3
|
+
"icon-position-leading": "icon-position-leading__KE5kn",
|
|
4
|
+
"icon-position-trailing": "icon-position-trailing__Mygyz",
|
|
5
|
+
text: o,
|
|
6
|
+
"size-small": "size-small__pf7gu",
|
|
7
|
+
"size-medium": "size-medium__r6Rbi",
|
|
8
|
+
"size-large": "size-large__aue6M",
|
|
9
|
+
"color-primary": "color-primary__7WaoM",
|
|
10
|
+
"color-secondary": "color-secondary__4qYkh",
|
|
11
|
+
"color-secondary-inverted": "color-secondary-inverted__ILbsj"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default,
|
|
15
|
+
o as text
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=styles.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { Density, VerticalAlignment } from './utils';
|
|
3
|
+
export interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Define on the table invocation. If set to `true`, even-numbered rows will have a different background color from odd-numbered rows.
|
|
6
|
+
*/
|
|
7
|
+
isStriped?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* If set to `true`, the `table-display`(CSS) property will be set to fixed. See [MDN reference on table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) for more details.
|
|
10
|
+
*/
|
|
11
|
+
isFixedLayout?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If set, determines the density (height) of the table body’s rows.
|
|
14
|
+
*/
|
|
15
|
+
density?: Density;
|
|
16
|
+
/**
|
|
17
|
+
* Determines the vertical alignment for content in a table. Does not apply to table headers (`th`). See [MDN reference on vertical-align](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) for more details.
|
|
18
|
+
*/
|
|
19
|
+
valign?: VerticalAlignment;
|
|
20
|
+
/**
|
|
21
|
+
* Adds a (non-visible) caption for users with assistive technology. If set on a sortable table, the provided table caption is paired with the automatically generated sorted message text.
|
|
22
|
+
*/
|
|
23
|
+
caption?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function Root({ caption, density, valign, isStriped, isFixedLayout, children, className, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare namespace Root {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
declare function THead({ children }: {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare namespace THead {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
declare function TBody({ children }: {
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare namespace TBody {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
41
|
+
declare const Table: {
|
|
42
|
+
Root: typeof Root;
|
|
43
|
+
TR: {
|
|
44
|
+
({ children, className, ...rest }: import('./tr').TRProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
THead: typeof THead;
|
|
48
|
+
TH: {
|
|
49
|
+
({ align, width, scope, tooltip, isVisuallyHidden, children, className, ...rest }: import('./th').THProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
TBody: typeof TBody;
|
|
53
|
+
TD: {
|
|
54
|
+
({ align, children, className, ...rest }: import('./td').TDProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export { Table };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import { TD as N } from "./td.js";
|
|
4
|
+
import { TH as y } from "./th.js";
|
|
5
|
+
import { TR as u } from "./tr.js";
|
|
6
|
+
import { DEFAULT_DENSITY as b, DEFAULT_VERTICAL_ALIGNMENT as E } from "./utils.js";
|
|
7
|
+
import o from "./table.module.scss.js";
|
|
8
|
+
function r({
|
|
9
|
+
caption: a,
|
|
10
|
+
density: s = b,
|
|
11
|
+
valign: i = E,
|
|
12
|
+
isStriped: l,
|
|
13
|
+
isFixedLayout: d,
|
|
14
|
+
children: n,
|
|
15
|
+
className: T,
|
|
16
|
+
...p
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ c(
|
|
19
|
+
"table",
|
|
20
|
+
{
|
|
21
|
+
className: f(
|
|
22
|
+
o.table,
|
|
23
|
+
o[`density-${s}`],
|
|
24
|
+
o[`valign-${i}`],
|
|
25
|
+
{
|
|
26
|
+
[o.striped]: l,
|
|
27
|
+
[o["layout-fixed"]]: d
|
|
28
|
+
},
|
|
29
|
+
T
|
|
30
|
+
),
|
|
31
|
+
...p,
|
|
32
|
+
children: [
|
|
33
|
+
a && /* @__PURE__ */ e("caption", { className: "sr-only", children: a }),
|
|
34
|
+
n
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
r.displayName = "Table";
|
|
40
|
+
function t({ children: a }) {
|
|
41
|
+
return /* @__PURE__ */ e("thead", { className: o.thead, children: a });
|
|
42
|
+
}
|
|
43
|
+
t.displayName = "T.Head";
|
|
44
|
+
function m({ children: a }) {
|
|
45
|
+
return /* @__PURE__ */ e("tbody", { className: o.tbody, children: a });
|
|
46
|
+
}
|
|
47
|
+
m.displayName = "T.Body";
|
|
48
|
+
const R = { Root: r, TR: u, THead: t, TH: y, TBody: m, TD: N };
|
|
49
|
+
export {
|
|
50
|
+
R as Table
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/table/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { TD } from './td'\nimport { TH } from './th'\nimport { TR } from './tr'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport {\n\tDEFAULT_DENSITY,\n\tDEFAULT_VERTICAL_ALIGNMENT,\n\ttype Density,\n\ttype VerticalAlignment,\n} from './utils'\nimport s from './table.module.scss'\n\nexport interface TableProps extends HTMLAttributes<HTMLTableElement> {\n\t/**\n\t * Define on the table invocation. If set to `true`, even-numbered rows will have a different background color from odd-numbered rows.\n\t */\n\tisStriped?: boolean\n\t/**\n\t * If set to `true`, the `table-display`(CSS) property will be set to fixed. See [MDN reference on table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) for more details.\n\t */\n\tisFixedLayout?: boolean\n\t/**\n\t * If set, determines the density (height) of the table body’s rows.\n\t */\n\tdensity?: Density\n\t/**\n\t * Determines the vertical alignment for content in a table. Does not apply to table headers (`th`). See [MDN reference on vertical-align](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) for more details.\n\t */\n\tvalign?: VerticalAlignment\n\t/**\n\t * Adds a (non-visible) caption for users with assistive technology. If set on a sortable table, the provided table caption is paired with the automatically generated sorted message text.\n\t */\n\tcaption?: string\n}\n\nfunction Root({\n\tcaption,\n\tdensity = DEFAULT_DENSITY,\n\tvalign = DEFAULT_VERTICAL_ALIGNMENT,\n\tisStriped,\n\tisFixedLayout,\n\tchildren,\n\tclassName,\n\t...rest\n}: TableProps) {\n\treturn (\n\t\t<table\n\t\t\tclassName={classNames(\n\t\t\t\ts.table,\n\t\t\t\ts[`density-${density}`],\n\t\t\t\ts[`valign-${valign}`],\n\t\t\t\t{\n\t\t\t\t\t[s.striped]: isStriped,\n\t\t\t\t\t[s['layout-fixed']]: isFixedLayout,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{caption && <caption className=\"sr-only\">{caption}</caption>}\n\t\t\t{children}\n\t\t</table>\n\t)\n}\nRoot.displayName = 'Table'\n\nfunction THead({ children }: { children: ReactNode }) {\n\treturn <thead className={s.thead}>{children}</thead>\n}\nTHead.displayName = 'T.Head'\n\nfunction TBody({ children }: { children: ReactNode }) {\n\treturn <tbody className={s.tbody}>{children}</tbody>\n}\nTBody.displayName = 'T.Body'\n\nconst Table = { Root, TR, THead, TH, TBody, TD }\n\nexport { Table }\n"],"names":["Root","caption","density","DEFAULT_DENSITY","valign","DEFAULT_VERTICAL_ALIGNMENT","isStriped","isFixedLayout","children","className","rest","jsxs","classNames","s","jsx","THead","TBody","Table","TR","TH","TD"],"mappings":";;;;;;;AAoCA,SAASA,EAAK;AAAA,EACb,SAAAC;AAAA,EACA,SAAAC,IAAUC;AAAA,EACV,QAAAC,IAASC;AAAA,EACT,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,GAAe;AACd,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACVC,EAAE;AAAA,QACFA,EAAE,WAAWX,CAAO,EAAE;AAAA,QACtBW,EAAE,UAAUT,CAAM,EAAE;AAAA,QACpB;AAAA,UACC,CAACS,EAAE,OAAO,GAAGP;AAAA,UACb,CAACO,EAAE,cAAc,CAAC,GAAGN;AAAA,QAAA;AAAA,QAEtBE;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAT,KAAW,gBAAAa,EAAC,WAAA,EAAQ,WAAU,WAAW,UAAAb,GAAQ;AAAA,QACjDO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGJ;AACAR,EAAK,cAAc;AAEnB,SAASe,EAAM,EAAE,UAAAP,KAAqC;AACrD,SAAO,gBAAAM,EAAC,SAAA,EAAM,WAAWD,EAAE,OAAQ,UAAAL,GAAS;AAC7C;AACAO,EAAM,cAAc;AAEpB,SAASC,EAAM,EAAE,UAAAR,KAAqC;AACrD,SAAO,gBAAAM,EAAC,SAAA,EAAM,WAAWD,EAAE,OAAQ,UAAAL,GAAS;AAC7C;AACAQ,EAAM,cAAc;AAEpB,MAAMC,IAAQ,EAAE,MAAAjB,GAAM,IAAAkB,GAAI,OAAAH,GAAO,IAAAI,GAAI,OAAAH,GAAO,IAAAI,EAAA;"}
|