@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,102 @@
|
|
|
1
|
+
import { jsx as o, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { useId as p } from "react";
|
|
3
|
+
import { Field as I } from "../field/index.js";
|
|
4
|
+
import { Fieldset as x } from "../fieldset/index.js";
|
|
5
|
+
import g from "./form-toggle.module.scss.js";
|
|
6
|
+
const u = ({
|
|
7
|
+
id: e,
|
|
8
|
+
field: r,
|
|
9
|
+
toggleOnEnter: t,
|
|
10
|
+
testingKey: l,
|
|
11
|
+
error: a,
|
|
12
|
+
...d
|
|
13
|
+
}) => {
|
|
14
|
+
const i = p(), c = e ?? i, n = (s) => {
|
|
15
|
+
s.key === "Enter" && (s.currentTarget.checked = !s.currentTarget.checked);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ F("div", { className: g.toggle, children: [
|
|
18
|
+
/* @__PURE__ */ o(
|
|
19
|
+
"input",
|
|
20
|
+
{
|
|
21
|
+
id: c,
|
|
22
|
+
className: g.control,
|
|
23
|
+
type: "checkbox",
|
|
24
|
+
...r,
|
|
25
|
+
...d,
|
|
26
|
+
role: "switch",
|
|
27
|
+
"aria-describedby": `${a ? "error" : "helper-text"}-${e}`,
|
|
28
|
+
onKeyDown: t ? n : void 0,
|
|
29
|
+
"data-testid": l
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ o("div", { className: g.facade })
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
u.displayName = "ToggleBase";
|
|
36
|
+
const T = ({
|
|
37
|
+
isInvalid: e,
|
|
38
|
+
isRequired: r,
|
|
39
|
+
isOptional: t,
|
|
40
|
+
id: l,
|
|
41
|
+
label: a,
|
|
42
|
+
helperText: d,
|
|
43
|
+
error: i,
|
|
44
|
+
field: c,
|
|
45
|
+
className: n,
|
|
46
|
+
testingKey: s,
|
|
47
|
+
...f
|
|
48
|
+
}) => {
|
|
49
|
+
const h = p(), m = l ?? h;
|
|
50
|
+
return /* @__PURE__ */ o(
|
|
51
|
+
I,
|
|
52
|
+
{
|
|
53
|
+
label: a,
|
|
54
|
+
helperText: d,
|
|
55
|
+
error: i,
|
|
56
|
+
isRequired: r,
|
|
57
|
+
isOptional: t,
|
|
58
|
+
id: m,
|
|
59
|
+
layout: "flag",
|
|
60
|
+
className: n,
|
|
61
|
+
children: /* @__PURE__ */ o(
|
|
62
|
+
u,
|
|
63
|
+
{
|
|
64
|
+
id: m,
|
|
65
|
+
field: c,
|
|
66
|
+
testingKey: s,
|
|
67
|
+
...f
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
T.displayName = "ToggleField";
|
|
74
|
+
const y = ({
|
|
75
|
+
layout: e = "vertical",
|
|
76
|
+
legend: r,
|
|
77
|
+
isOptional: t,
|
|
78
|
+
isRequired: l,
|
|
79
|
+
children: a
|
|
80
|
+
}) => /* @__PURE__ */ o(
|
|
81
|
+
x,
|
|
82
|
+
{
|
|
83
|
+
layout: e,
|
|
84
|
+
legend: r,
|
|
85
|
+
isOptional: t,
|
|
86
|
+
isRequired: l,
|
|
87
|
+
children: a
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
y.displayName = "ToggleGroupRoot";
|
|
91
|
+
const N = (e) => /* @__PURE__ */ o(T, { ...e, className: e.className });
|
|
92
|
+
N.displayName = "ToggleGroupField";
|
|
93
|
+
const j = {
|
|
94
|
+
Root: y,
|
|
95
|
+
Field: N
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
u as ToggleBase,
|
|
99
|
+
T as ToggleField,
|
|
100
|
+
j as ToggleGroup
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/toggle/index.tsx"],"sourcesContent":["import { useId } from 'react'\nimport type { ReactNode, HTMLProps, ComponentProps } from 'react'\nimport { Field } from '../field'\nimport { Fieldset } from '../fieldset'\nimport s from './form-toggle.module.scss'\n\ninterface ToggleBaseProps {\n\tid?: string\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\ttoggleOnEnter?: boolean\n\ttestingKey?: string\n\terror?: ReactNode\n}\n\nconst ToggleBase = ({\n\tid,\n\tfield,\n\ttoggleOnEnter,\n\ttestingKey,\n\terror,\n\t...rest\n}: ToggleBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\tconst handleEnterKey = (event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tif (event.key === 'Enter') {\n\t\t\tevent.currentTarget.checked = !event.currentTarget.checked\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className={s.toggle}>\n\t\t\t<input\n\t\t\t\tid={inputId}\n\t\t\t\tclassName={s.control}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t{...field}\n\t\t\t\t{...rest}\n\t\t\t\trole=\"switch\"\n\t\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t\tonKeyDown={toggleOnEnter ? handleEnterKey : undefined}\n\t\t\t\tdata-testid={testingKey}\n\t\t\t/>\n\t\t\t<div className={s.facade}></div>\n\t\t</div>\n\t)\n}\n\nToggleBase.displayName = 'ToggleBase'\n\ninterface ToggleFieldProps {\n\t/**\n\t * Applies an “invalid” appearance to the control but doesn’t modify its logical validity.\n\t */\n\tisInvalid?: boolean\n\n\t/**\n\t * Appends a `Required` indicator next to the label text and sets the `required` attribute on the control when user input is required.\n\t */\n\tisRequired?: boolean\n\n\t/**\n\t * Appends an `Optional` indicator next to the label text when user input is optional.\n\t */\n\tisOptional?: boolean\n\n\t/**\n\t * Input control’s ID attribute.\n\t *\n\t * By default, the ID is automatically generated by the component. Use this argument to pass a custom ID.\n\t */\n\tid?: string\n\n\t/**\n\t * Container that renders its content inside the `<label>` element. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `for` attribute of the label is automatically generated using the `controlId` value of the control.\n\t */\n\tlabel?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"helper text\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the message is automatically generated using the `controlId` value of the control.\n\t */\n\thelperText?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"error\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the error message is automatically generated using the `controlId` value of the control.\n\t */\n\terror?: ReactNode\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst ToggleField = ({\n\tisInvalid,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\ttestingKey,\n\t...rest\n}: ToggleFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"flag\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<ToggleBase\n\t\t\t\tid={inputId}\n\t\t\t\tfield={field}\n\t\t\t\ttestingKey={testingKey}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nToggleField.displayName = 'ToggleField'\n\ninterface ToggleGroupProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n}\n\nconst ToggleGroupRoot = ({\n\tlayout = 'vertical',\n\tlegend,\n\tisOptional,\n\tisRequired,\n\tchildren,\n}: ToggleGroupProps) => {\n\treturn (\n\t\t<Fieldset\n\t\t\tlayout={layout}\n\t\t\tlegend={legend}\n\t\t\tisOptional={isOptional}\n\t\t\tisRequired={isRequired}\n\t\t>\n\t\t\t{children}\n\t\t</Fieldset>\n\t)\n}\n\nToggleGroupRoot.displayName = 'ToggleGroupRoot'\n\nconst ToggleGroupField = (props: ToggleFieldProps) => {\n\treturn <ToggleField {...props} className={props.className} />\n}\n\nToggleGroupField.displayName = 'ToggleGroupField'\n\nconst ToggleGroup = {\n\tRoot: ToggleGroupRoot,\n\tField: ToggleGroupField,\n}\n\nexport { ToggleBase, ToggleField, ToggleGroup }\n"],"names":["ToggleBase","id","field","toggleOnEnter","testingKey","error","rest","generatedId","useId","inputId","handleEnterKey","event","jsxs","s","jsx","ToggleField","isInvalid","isRequired","isOptional","label","helperText","className","Field","ToggleGroupRoot","layout","legend","children","Fieldset","ToggleGroupField","props","ToggleGroup"],"mappings":";;;;;AAkBA,MAAMA,IAAa,CAAC;AAAA,EACnB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACJ,MAAuB;AACtB,QAAMC,IAAcC,EAAA,GACdC,IAAUR,KAAMM,GAEhBG,IAAiB,CAACC,MAAiD;AACxE,IAAIA,EAAM,QAAQ,YACjBA,EAAM,cAAc,UAAU,CAACA,EAAM,cAAc;AAAA,EAErD;AAEA,SACC,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAE,QACjB,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,IAAIL;AAAA,QACJ,WAAWI,EAAE;AAAA,QACb,MAAK;AAAA,QACJ,GAAGX;AAAA,QACH,GAAGI;AAAA,QACJ,MAAK;AAAA,QACL,oBAAkB,GAAGD,IAAQ,UAAU,aAAa,IAAIJ,CAAE;AAAA,QAC1D,WAAWE,IAAgBO,IAAiB;AAAA,QAC5C,eAAaN;AAAA,MAAA;AAAA,IAAA;AAAA,IAEd,gBAAAU,EAAC,OAAA,EAAI,WAAWD,EAAE,OAAA,CAAQ;AAAA,EAAA,GAC3B;AAEF;AAEAb,EAAW,cAAc;AAsDzB,MAAMe,IAAc,CAAC;AAAA,EACpB,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,IAAAjB;AAAA,EACA,OAAAkB;AAAA,EACA,YAAAC;AAAA,EACA,OAAAf;AAAA,EACA,OAAAH;AAAA,EACA,WAAAmB;AAAA,EACA,YAAAjB;AAAA,EACA,GAAGE;AACJ,MAAwB;AACvB,QAAMC,IAAcC,EAAA,GACdC,IAAUR,KAAMM;AACtB,SACC,gBAAAO;AAAA,IAACQ;AAAA,IAAA;AAAA,MACA,OAAAH;AAAA,MACA,YAAAC;AAAA,MACA,OAAAf;AAAA,MACA,YAAAY;AAAA,MACA,YAAAC;AAAA,MACA,IAAIT;AAAA,MACJ,QAAO;AAAA,MACP,WAAAY;AAAA,MAEA,UAAA,gBAAAP;AAAA,QAACd;AAAA,QAAA;AAAA,UACA,IAAIS;AAAA,UACJ,OAAAP;AAAA,UACA,YAAAE;AAAA,UACC,GAAGE;AAAA,QAAA;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGH;AAEAS,EAAY,cAAc;AAM1B,MAAMQ,IAAkB,CAAC;AAAA,EACxB,QAAAC,IAAS;AAAA,EACT,QAAAC;AAAA,EACA,YAAAP;AAAA,EACA,YAAAD;AAAA,EACA,UAAAS;AACD,MAEE,gBAAAZ;AAAA,EAACa;AAAA,EAAA;AAAA,IACA,QAAAH;AAAA,IACA,QAAAC;AAAA,IACA,YAAAP;AAAA,IACA,YAAAD;AAAA,IAEC,UAAAS;AAAA,EAAA;AAAA;AAKJH,EAAgB,cAAc;AAE9B,MAAMK,IAAmB,CAACC,wBACjBd,GAAA,EAAa,GAAGc,GAAO,WAAWA,EAAM,WAAW;AAG5DD,EAAiB,cAAc;AAE/B,MAAME,IAAc;AAAA,EACnB,MAAMP;AAAA,EACN,OAAOK;AACR;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TippyProps } from '@tippyjs/react';
|
|
2
|
+
import { Plugin } from 'tippy.js';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
options?: TippyProps;
|
|
6
|
+
children: TippyProps['children'];
|
|
7
|
+
text: string | ReactElement;
|
|
8
|
+
}
|
|
9
|
+
export interface HideOnEsc extends Plugin {
|
|
10
|
+
name: 'hideOnEsc';
|
|
11
|
+
defaultValue: true;
|
|
12
|
+
}
|
|
13
|
+
export declare const Tooltip: ({ options, children, text }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import s from "@tippyjs/react";
|
|
4
|
+
import { followCursor as d } from "tippy.js";
|
|
5
|
+
import "tippy.js/dist/svg-arrow.css";
|
|
6
|
+
const n = {
|
|
7
|
+
name: "hideOnEsc",
|
|
8
|
+
defaultValue: !0,
|
|
9
|
+
fn(e) {
|
|
10
|
+
function o(t) {
|
|
11
|
+
t.key === "Escape" && e.hide();
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
onShow() {
|
|
15
|
+
document.addEventListener("keydown", o);
|
|
16
|
+
},
|
|
17
|
+
onHide() {
|
|
18
|
+
document.removeEventListener("keydown", o);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}, w = ({ options: e = {}, children: o, text: t }) => {
|
|
23
|
+
const r = e.followCursor !== void 0 ? [n, d] : [n];
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
25
|
+
s,
|
|
26
|
+
{
|
|
27
|
+
theme: "hds",
|
|
28
|
+
arrow: `<svg
|
|
29
|
+
className="hds-tooltip-pointer"
|
|
30
|
+
width="16"
|
|
31
|
+
height="7"
|
|
32
|
+
viewBox="0 0 16 7"
|
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
34
|
+
>
|
|
35
|
+
<path d="M0 7H16L9.11989 0.444571C8.49776 -0.148191 7.50224 -0.148191 6.88011 0.444572L0 7Z" />
|
|
36
|
+
</svg>`,
|
|
37
|
+
interactive: !0,
|
|
38
|
+
aria: {
|
|
39
|
+
content: "describedby"
|
|
40
|
+
},
|
|
41
|
+
plugins: r,
|
|
42
|
+
content: t,
|
|
43
|
+
...e,
|
|
44
|
+
children: o
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
w as Tooltip
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../../src/components/hds/wrappers/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport Tippy, { type TippyProps } from '@tippyjs/react'\nimport { followCursor, type Plugin } from 'tippy.js'\nimport type { ReactElement } from 'react'\nimport 'tippy.js/dist/svg-arrow.css'\n\nexport interface TooltipProps {\n\toptions?: TippyProps\n\tchildren: TippyProps['children']\n\ttext: string | ReactElement\n}\n\nexport interface HideOnEsc extends Plugin {\n\tname: 'hideOnEsc'\n\tdefaultValue: true\n}\n\nconst hideOnEsc = {\n\tname: 'hideOnEsc',\n\tdefaultValue: true,\n\tfn(instance: { hide: () => void }) {\n\t\tfunction onKeyDown(event: KeyboardEvent): void {\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tinstance.hide()\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tonShow() {\n\t\t\t\tdocument.addEventListener('keydown', onKeyDown)\n\t\t\t},\n\t\t\tonHide() {\n\t\t\t\tdocument.removeEventListener('keydown', onKeyDown)\n\t\t\t},\n\t\t}\n\t},\n}\n\nexport const Tooltip = ({ options = {}, children, text }: TooltipProps) => {\n\tconst plugins =\n\t\toptions.followCursor !== undefined ? [hideOnEsc, followCursor] : [hideOnEsc]\n\n\treturn (\n\t\t<Tippy\n\t\t\ttheme=\"hds\"\n\t\t\tarrow={`<svg\n\t\t\t\t\tclassName=\"hds-tooltip-pointer\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"7\"\n\t\t\t\t\tviewBox=\"0 0 16 7\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<path d=\"M0 7H16L9.11989 0.444571C8.49776 -0.148191 7.50224 -0.148191 6.88011 0.444572L0 7Z\" />\n\t\t\t\t</svg>`}\n\t\t\tinteractive\n\t\t\taria={{\n\t\t\t\tcontent: 'describedby',\n\t\t\t}}\n\t\t\tplugins={plugins}\n\t\t\tcontent={text}\n\t\t\t{...options}\n\t\t>\n\t\t\t{children}\n\t\t</Tippy>\n\t)\n}\n"],"names":["hideOnEsc","instance","onKeyDown","event","options","text","followCursor","jsx","Tippy","plugins","children"],"mappings":";;;;;AAkBkB,MACjBA,IAAM;AAAA,EACN,MAAA;AAAA,EACA,cAAmC;AAAA,EAClC,GAAAC,GAAS;AACR,aAAIC;AACH,MAAAC,EAAA,QAAc,YACfF,EAAA,KAAA;AAAA,IAGD;AAAO;MAEL;AACD,iBAAA,iBAAA,WAAAC,CAAA;AAAA,MACA;AAAA,MACC;AACD,iBAAA,oBAAA,WAAAA,CAAA;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEO,OACA,CAAA,EACL,SAAAE,qBAAyB,MAAAC,EAAA;AAE1B,cACC,iBAAA,SAAA,CAAAL,GAAAM,CAAA,IAAA,CAAAN,CAAA;AAAA,SAAC,gBAAAO;AAAA,IAAAC;AAAA,IAAA;AAAA,MAEA,OAAO;AAAA,MAAA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUP,aAAM;AAAA,MAAA;QAEN,SAAA;AAAA,MACA;AAAA,MACA,SAAAC;AAAA,MACC,SAAGJ;AAAA,MAEH,GAAAD;AAAA,MAAA,UAAAM;AAAA,IACF;AAAA,EAEF;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
type BaseProps = {
|
|
3
|
+
size: 'small' | 'medium' | 'large';
|
|
4
|
+
iconSecondary?: string;
|
|
5
|
+
color?: 'neutral' | 'boundary' | 'consul' | 'nomad' | 'packer' | 'terraform' | 'vagrant' | 'vault' | 'vault-secrets' | 'waypoint';
|
|
6
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>;
|
|
7
|
+
type WithLogo = {
|
|
8
|
+
logo: 'hcp' | 'boundary' | 'consul' | 'nomad' | 'packer' | 'terraform' | 'vagrant' | 'vault' | 'vault-secrets' | 'waypoint';
|
|
9
|
+
icon?: never;
|
|
10
|
+
};
|
|
11
|
+
type WithIcon = {
|
|
12
|
+
icon: string;
|
|
13
|
+
logo?: never;
|
|
14
|
+
};
|
|
15
|
+
type IconTileProps = BaseProps & (WithLogo | WithIcon);
|
|
16
|
+
declare const IconTile: {
|
|
17
|
+
({ size, logo, icon, iconSecondary, color, ...rest }: IconTileProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export type { IconTileProps };
|
|
21
|
+
export { IconTile };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import N from "classnames";
|
|
3
|
+
import { FlightIcon as t } from "../flight-icon/index.js";
|
|
4
|
+
import e from "./style.module.scss.js";
|
|
5
|
+
const f = {
|
|
6
|
+
small: 12,
|
|
7
|
+
medium: 16,
|
|
8
|
+
large: 16
|
|
9
|
+
}, h = ({
|
|
10
|
+
size: i = "medium",
|
|
11
|
+
logo: r,
|
|
12
|
+
icon: m,
|
|
13
|
+
iconSecondary: s,
|
|
14
|
+
color: n = "neutral",
|
|
15
|
+
...a
|
|
16
|
+
}) => {
|
|
17
|
+
const c = r ? `${r}-color` : m;
|
|
18
|
+
if (c) {
|
|
19
|
+
const l = i === "small" ? 16 : 24, d = r ? "logo" : "icon", p = r || n;
|
|
20
|
+
return /* @__PURE__ */ u(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: N(
|
|
24
|
+
e["icon-tile"],
|
|
25
|
+
e[`type-${d}`],
|
|
26
|
+
e[`size-${i}`],
|
|
27
|
+
e[`color-${p}`]
|
|
28
|
+
),
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
...a,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ o("div", { className: r ? e.logo : e.icon, children: /* @__PURE__ */ o(t, { name: c, size: l, stretched: !0 }) }),
|
|
33
|
+
s && /* @__PURE__ */ o("div", { className: e.extra, children: /* @__PURE__ */ o(
|
|
34
|
+
t,
|
|
35
|
+
{
|
|
36
|
+
name: s,
|
|
37
|
+
size: f[i],
|
|
38
|
+
color: "var(--mds-color-foreground-strong)"
|
|
39
|
+
}
|
|
40
|
+
) })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
h.displayName = "IconTile";
|
|
47
|
+
export {
|
|
48
|
+
h as IconTile
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/icon-tile/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { FlightIconSize } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport type { HTMLAttributes } from 'react'\nimport s from './style.module.scss'\n\ntype BaseProps = {\n\tsize: 'small' | 'medium' | 'large'\n\ticonSecondary?: string\n\tcolor?:\n\t\t| 'neutral'\n\t\t| 'boundary'\n\t\t| 'consul'\n\t\t| 'nomad'\n\t\t| 'packer'\n\t\t| 'terraform'\n\t\t| 'vagrant'\n\t\t| 'vault'\n\t\t| 'vault-secrets'\n\t\t| 'waypoint'\n} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>\n\ntype WithLogo = {\n\tlogo:\n\t\t| 'hcp'\n\t\t| 'boundary'\n\t\t| 'consul'\n\t\t| 'nomad'\n\t\t| 'packer'\n\t\t| 'terraform'\n\t\t| 'vagrant'\n\t\t| 'vault'\n\t\t| 'vault-secrets'\n\t\t| 'waypoint'\n\ticon?: never\n}\n\ntype WithIcon = {\n\ticon: string\n\tlogo?: never\n}\n\ntype IconTileProps = BaseProps & (WithLogo | WithIcon)\n\nconst EXTRA_ICON_SIZE_MAP = {\n\tsmall: 12,\n\tmedium: 16,\n\tlarge: 16,\n} as const satisfies Record<'small' | 'medium' | 'large', FlightIconSize>\n\nconst IconTile = ({\n\tsize = 'medium',\n\tlogo,\n\ticon,\n\ticonSecondary,\n\tcolor = 'neutral',\n\t...rest\n}: IconTileProps) => {\n\tconst iconName = logo ? `${logo}-color` : icon\n\n\tif (iconName) {\n\t\tconst iconSize = size === 'small' ? 16 : 24\n\t\tconst entity = logo ? 'logo' : 'icon'\n\t\tconst colorUse = logo ? logo : color\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['icon-tile'],\n\t\t\t\t\ts[`type-${entity}`],\n\t\t\t\t\ts[`size-${size}`],\n\t\t\t\t\ts[`color-${colorUse}`]\n\t\t\t\t)}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t<div className={logo ? s.logo : s.icon}>\n\t\t\t\t\t<FlightIcon name={iconName} size={iconSize} stretched />\n\t\t\t\t</div>\n\t\t\t\t{iconSecondary && (\n\t\t\t\t\t<div className={s.extra}>\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={iconSecondary}\n\t\t\t\t\t\t\tsize={EXTRA_ICON_SIZE_MAP[size]}\n\t\t\t\t\t\t\tcolor=\"var(--mds-color-foreground-strong)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nIconTile.displayName = 'IconTile'\n\nexport type { IconTileProps }\nexport { IconTile }\n"],"names":["EXTRA_ICON_SIZE_MAP","IconTile","size","logo","icon","iconSecondary","color","rest","iconName","iconSize","entity","colorUse","jsxs","classNames","s","jsx","FlightIcon"],"mappings":";;;;AA4CA,MAAMA,IAAsB;AAAA,EAC3B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACR,GAEMC,IAAW,CAAC;AAAA,EACjB,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAqB;AACpB,QAAMC,IAAWL,IAAO,GAAGA,CAAI,WAAWC;AAE1C,MAAII,GAAU;AACb,UAAMC,IAAWP,MAAS,UAAU,KAAK,IACnCQ,IAASP,IAAO,SAAS,QACzBQ,IAAWR,KAAcG;AAE/B,WACC,gBAAAM;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,WAAWC;AAAA,UACVC,EAAE,WAAW;AAAA,UACbA,EAAE,QAAQJ,CAAM,EAAE;AAAA,UAClBI,EAAE,QAAQZ,CAAI,EAAE;AAAA,UAChBY,EAAE,SAASH,CAAQ,EAAE;AAAA,QAAA;AAAA,QAEtB,eAAY;AAAA,QACX,GAAGJ;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAQ,EAAC,OAAA,EAAI,WAAWZ,IAAOW,EAAE,OAAOA,EAAE,MACjC,UAAA,gBAAAC,EAACC,GAAA,EAAW,MAAMR,GAAU,MAAMC,GAAU,WAAS,IAAC,GACvD;AAAA,UACCJ,KACA,gBAAAU,EAAC,OAAA,EAAI,WAAWD,EAAE,OACjB,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACA,MAAMX;AAAA,cACN,MAAML,EAAoBE,CAAI;AAAA,cAC9B,OAAM;AAAA,YAAA;AAAA,UAAA,EACP,CACD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIJ;AACD;AAEAD,EAAS,cAAc;"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
$hds-icon-tile-sizes: ('small', 'medium', 'large');
|
|
2
|
+
$hds-icon-tile-colors-products: (
|
|
3
|
+
'boundary',
|
|
4
|
+
'consul',
|
|
5
|
+
'hcp',
|
|
6
|
+
'nomad',
|
|
7
|
+
'packer',
|
|
8
|
+
'terraform',
|
|
9
|
+
'vagrant',
|
|
10
|
+
'vault',
|
|
11
|
+
'vault-secrets',
|
|
12
|
+
'waypoint'
|
|
13
|
+
);
|
|
14
|
+
$size-props: (
|
|
15
|
+
'small': (
|
|
16
|
+
'size': 1.75rem,
|
|
17
|
+
// 28px
|
|
18
|
+
'border-radius': 5px,
|
|
19
|
+
'icon-size': 1rem,
|
|
20
|
+
// 16px
|
|
21
|
+
'logo-size': 1.125rem,
|
|
22
|
+
// 18px
|
|
23
|
+
'extra-size': 1.125rem,
|
|
24
|
+
// 18px
|
|
25
|
+
'extra-border-radius': 4px,
|
|
26
|
+
),
|
|
27
|
+
'medium': (
|
|
28
|
+
'size': 2.5rem,
|
|
29
|
+
// 40px
|
|
30
|
+
'border-radius': 6px,
|
|
31
|
+
'icon-size': 1.5rem,
|
|
32
|
+
// 24px
|
|
33
|
+
'logo-size': 1.75rem,
|
|
34
|
+
// 28px
|
|
35
|
+
'extra-size': 1.5rem,
|
|
36
|
+
// 24px
|
|
37
|
+
'extra-border-radius': 5px,
|
|
38
|
+
),
|
|
39
|
+
'large': (
|
|
40
|
+
'size': 3rem,
|
|
41
|
+
// 48px
|
|
42
|
+
'border-radius': 6px,
|
|
43
|
+
'icon-size': 1.5rem,
|
|
44
|
+
// 24px
|
|
45
|
+
'logo-size': 2rem,
|
|
46
|
+
// 32px
|
|
47
|
+
'extra-size': 1.5rem,
|
|
48
|
+
// 24px
|
|
49
|
+
'extra-border-radius': 5px,
|
|
50
|
+
),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
.icon-tile {
|
|
54
|
+
position: relative;
|
|
55
|
+
display: flex;
|
|
56
|
+
border: 1px solid transparent;
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
box-shadow: var(--mds-elevation-low-box-shadow);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.icon,
|
|
62
|
+
.logo {
|
|
63
|
+
display: flex;
|
|
64
|
+
margin: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.extra {
|
|
68
|
+
position: absolute;
|
|
69
|
+
right: -6px;
|
|
70
|
+
bottom: -6px;
|
|
71
|
+
display: grid;
|
|
72
|
+
place-content: center;
|
|
73
|
+
box-sizing: content-box; // the border is outside
|
|
74
|
+
background-color: var(--mds-color-surface-primary);
|
|
75
|
+
border: 1px solid var(--mds-color-border-primary);
|
|
76
|
+
box-shadow: var(--mds-elevation-low-box-shadow);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@each $size in $hds-icon-tile-sizes {
|
|
80
|
+
.size-#{$size} {
|
|
81
|
+
width: map-get($size-props, $size, 'size');
|
|
82
|
+
height: map-get($size-props, $size, 'size');
|
|
83
|
+
border-radius: map-get($size-props, $size, 'border-radius');
|
|
84
|
+
|
|
85
|
+
.icon {
|
|
86
|
+
width: map-get($size-props, $size, 'icon-size');
|
|
87
|
+
height: map-get($size-props, $size, 'icon-size');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.logo {
|
|
91
|
+
width: map-get($size-props, $size, 'logo-size');
|
|
92
|
+
height: map-get($size-props, $size, 'logo-size');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.extra {
|
|
96
|
+
width: map-get($size-props, $size, 'extra-size');
|
|
97
|
+
height: map-get($size-props, $size, 'extra-size');
|
|
98
|
+
border-radius: map-get($size-props, $size, 'extra-border-radius');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.type-logo {
|
|
104
|
+
// notice: we are using colored icons so we don't need to set the "color" property here
|
|
105
|
+
background-color: var(--mds-color-surface-primary);
|
|
106
|
+
border-color: var(--mds-color-border-primary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.type-icon {
|
|
110
|
+
&.color-neutral {
|
|
111
|
+
color: var(--mds-color-foreground-faint);
|
|
112
|
+
background-color: var(--mds-color-surface-faint);
|
|
113
|
+
border-color: var(--mds-color-border-primary);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@each $product in $hds-icon-tile-colors-products {
|
|
117
|
+
@if ($product == 'hcp') {
|
|
118
|
+
// exception for HCP (we use neutral colors, we don't have specific product colors for foreground/background)
|
|
119
|
+
&.color-hcp {
|
|
120
|
+
color: var(--mds-color-hcp-brand);
|
|
121
|
+
background-color: var(--mds-color-surface-faint);
|
|
122
|
+
border-color: var(--mds-color-border-primary);
|
|
123
|
+
}
|
|
124
|
+
} @else {
|
|
125
|
+
&.color-#{$product} {
|
|
126
|
+
color: var(--mds-color-#{$product}-foreground);
|
|
127
|
+
background: linear-gradient(
|
|
128
|
+
135deg,
|
|
129
|
+
var(--mds-color-#{$product}-gradient-faint-start) 0%,
|
|
130
|
+
var(--mds-color-#{$product}-gradient-faint-stop) 100%
|
|
131
|
+
);
|
|
132
|
+
border-color: var(--mds-color-#{$product}-border);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const o = "icon__aQOfk", r = "logo__3zBXv", l = "extra__5VSha", c = {
|
|
2
|
+
"icon-tile": "icon-tile__8Lxip",
|
|
3
|
+
icon: o,
|
|
4
|
+
logo: r,
|
|
5
|
+
extra: l,
|
|
6
|
+
"size-small": "size-small__eKjTy",
|
|
7
|
+
"size-medium": "size-medium__Cpd2c",
|
|
8
|
+
"size-large": "size-large__0nIKA",
|
|
9
|
+
"type-logo": "type-logo__bXQnG",
|
|
10
|
+
"type-icon": "type-icon__DoyiK",
|
|
11
|
+
"color-neutral": "color-neutral__s-i4y",
|
|
12
|
+
"color-boundary": "color-boundary__TWXib",
|
|
13
|
+
"color-consul": "color-consul__qHXGr",
|
|
14
|
+
"color-hcp": "color-hcp__T1Cpx",
|
|
15
|
+
"color-nomad": "color-nomad__OPKVc",
|
|
16
|
+
"color-packer": "color-packer__VbjYn",
|
|
17
|
+
"color-terraform": "color-terraform__CzLAd",
|
|
18
|
+
"color-vagrant": "color-vagrant__GMAgE",
|
|
19
|
+
"color-vault": "color-vault__yHn5Z",
|
|
20
|
+
"color-vault-secrets": "color-vault-secrets__GiX0y",
|
|
21
|
+
"color-waypoint": "color-waypoint__YASrb"
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
c as default,
|
|
25
|
+
l as extra,
|
|
26
|
+
o as icon,
|
|
27
|
+
r as logo
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type { AccordionProps } from './accordion';
|
|
2
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionToggle, } from './accordion';
|
|
3
|
+
export type { BadgeColor, BadgeProps, BadgeSize, BadgeType } from './badge';
|
|
4
|
+
export { BADGE_COLORS, BADGE_SIZES, BADGE_TYPES, Badge } from './badge';
|
|
5
|
+
export type { BadgeCountProps } from './badge-count';
|
|
6
|
+
export { BadgeCount } from './badge-count';
|
|
7
|
+
export type { AlertProps, AlertColor } from './alert';
|
|
8
|
+
export { Alert, AlertActions, AlertButton, AlertStandaloneLink } from './alert';
|
|
9
|
+
export type { BreadcrumbItemProps, BreadcrumbProps, BreadcrumbTruncationProps, } from './breadcrumbs/types';
|
|
10
|
+
export { Breadcrumbs } from './breadcrumbs';
|
|
11
|
+
export type { ButtonProps, ButtonColor, ButtonIconPosition, ButtonSize, } from './button';
|
|
12
|
+
export { Button, BUTTON_COLORS, BUTTON_ICON_POSITIONS, BUTTON_SIZES, } from './button';
|
|
13
|
+
export type { CardProps, CardThumbnailProps } from './card/types';
|
|
14
|
+
export { Card } from './card';
|
|
15
|
+
export type { CodeBlockProps } from './code-block';
|
|
16
|
+
export { CodeBlock } from './code-block';
|
|
17
|
+
export { DisclosurePrimitive } from './disclosure-primitive';
|
|
18
|
+
export { useDisclosurePrimitive } from './disclosure-primitive/use-disclosure-primitive';
|
|
19
|
+
export type { DropdownContentProps, DropdownHeaderFooterProps, DropdownProps, DropdownToggleButtonProps, } from './dropdown';
|
|
20
|
+
export { Dropdown } from './dropdown';
|
|
21
|
+
export type { FlightIconName, FlightIconProps, FlightIconSize, } from './flight-icon';
|
|
22
|
+
export { FLIGHT_ICON_SIZES, FlightIcon } from './flight-icon';
|
|
23
|
+
export { CheckboxField, CheckboxGroup, CheckboxBase } from './form/checkbox';
|
|
24
|
+
export { Error } from './form/error';
|
|
25
|
+
export { Field } from './form/field';
|
|
26
|
+
export { Fieldset } from './form/fieldset';
|
|
27
|
+
export { FileInputField, FileInputBase } from './form/file-input';
|
|
28
|
+
export { HelperText } from './form/helper-text';
|
|
29
|
+
export { Indicator } from './form/indicator';
|
|
30
|
+
export { Label } from './form/label';
|
|
31
|
+
export { Legend } from './form/legend';
|
|
32
|
+
export { RadioGroup, RadioBase, RadioField } from './form/radio';
|
|
33
|
+
export { RadioCard, RadioCardGroup } from './form/radio-card';
|
|
34
|
+
export { SelectField } from './form/select';
|
|
35
|
+
export type { SuperSelectSearchInputProps, TSuperSelectOption, SuperSelectOptionProps, } from './form/super-select';
|
|
36
|
+
export { SuperSelectField } from './form/super-select';
|
|
37
|
+
export { TextInput, TextInputBase } from './form/text-input';
|
|
38
|
+
export { TextAreaField } from './form/textarea';
|
|
39
|
+
export { ToggleField, ToggleBase, ToggleGroup } from './form/toggle';
|
|
40
|
+
export type { IconTileProps } from './icon-tile';
|
|
41
|
+
export { IconTile } from './icon-tile';
|
|
42
|
+
export type { InlineLinkProps } from './inline-link';
|
|
43
|
+
export { InlineLink } from './inline-link';
|
|
44
|
+
export { MDSButton } from './legacy-button';
|
|
45
|
+
export { ModalProvider, useModal } from './modal';
|
|
46
|
+
export type { SeparatorProps } from './separator';
|
|
47
|
+
export { Separator } from './separator';
|
|
48
|
+
export type { StandaloneLinkColor, StandaloneLinkIconPosition, StandaloneLinkProps, StandaloneLinkSize, } from './standalone-link';
|
|
49
|
+
export { StandaloneLink, STANDALONE_LINK_COLORS, STANDALONE_LINK_ICON_POSITIONS, STANDALONE_LINK_SIZES, } from './standalone-link';
|
|
50
|
+
export type { TableProps } from './table';
|
|
51
|
+
export { Table } from './table';
|
|
52
|
+
export { getDensity, getHorizontalAlignment, getScope, getVerticalAlignment, } from './table/utils';
|
|
53
|
+
export type { TabsListProps, TabsProps } from './tabs';
|
|
54
|
+
export { Tabs } from './tabs';
|
|
55
|
+
export { useTabsContext } from './tabs/use-tabs-context';
|
|
56
|
+
export { Text, TEXT_COLORS, TEXT_WEIGHTS } from './text';
|
|
57
|
+
export type { BarChartProps } from './visualizations/bar-chart';
|
|
58
|
+
export { BarChart } from './visualizations/bar-chart';
|
|
59
|
+
export type { DonutChartData } from './visualizations/donut-chart/types';
|
|
60
|
+
export { DonutChart } from './visualizations/donut-chart';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Accordion as e } from "./accordion/index.js";
|
|
2
|
+
import { BADGE_COLORS as p, BADGE_SIZES as x, BADGE_TYPES as m, Badge as f } from "./badge/index.js";
|
|
3
|
+
import { BadgeCount as l } from "./badge-count/index.js";
|
|
4
|
+
import { Alert as a, AlertActions as d, AlertButton as T, AlertStandaloneLink as S } from "./alert/index.js";
|
|
5
|
+
import { Breadcrumbs as c } from "./breadcrumbs/index.js";
|
|
6
|
+
import { BUTTON_COLORS as O, BUTTON_ICON_POSITIONS as u, BUTTON_SIZES as B, Button as C } from "./button/index.js";
|
|
7
|
+
import { Card as s } from "./card/index.js";
|
|
8
|
+
import { CodeBlock as N } from "./code-block/index.js";
|
|
9
|
+
import { DisclosurePrimitive as E } from "./disclosure-primitive/index.js";
|
|
10
|
+
import { useDisclosurePrimitive as D } from "./disclosure-primitive/use-disclosure-primitive.js";
|
|
11
|
+
import { Dropdown as R } from "./dropdown/index.js";
|
|
12
|
+
import { FLIGHT_ICON_SIZES as k, FlightIcon as h } from "./flight-icon/index.js";
|
|
13
|
+
import { CheckboxBase as H, CheckboxField as Z, CheckboxGroup as v } from "./form/checkbox/index.js";
|
|
14
|
+
import { Error as M } from "./form/error/index.js";
|
|
15
|
+
import { Field as X } from "./form/field/index.js";
|
|
16
|
+
import { Fieldset as y } from "./form/fieldset/index.js";
|
|
17
|
+
import { FileInputBase as V, FileInputField as W } from "./form/file-input/index.js";
|
|
18
|
+
import { HelperText as j } from "./form/helper-text/index.js";
|
|
19
|
+
import { Indicator as J } from "./form/indicator/index.js";
|
|
20
|
+
import { Label as $ } from "./form/label/index.js";
|
|
21
|
+
import { Legend as ro } from "./form/legend/index.js";
|
|
22
|
+
import { RadioBase as to, RadioField as po, RadioGroup as xo } from "./form/radio/index.js";
|
|
23
|
+
import { RadioCard as fo } from "./form/radio-card/index.js";
|
|
24
|
+
import { SelectField as lo } from "./form/select/index.js";
|
|
25
|
+
import { SuperSelectField as ao } from "./form/super-select/index.js";
|
|
26
|
+
import { TextInput as So, TextInputBase as Io } from "./form/text-input/index.js";
|
|
27
|
+
import { TextAreaField as Ao } from "./form/textarea/index.js";
|
|
28
|
+
import { ToggleBase as uo, ToggleField as Bo, ToggleGroup as Co } from "./form/toggle/index.js";
|
|
29
|
+
import { IconTile as so } from "./icon-tile/index.js";
|
|
30
|
+
import { InlineLink as No } from "./inline-link/index.js";
|
|
31
|
+
import { MDSButton as Eo } from "./legacy-button/index.js";
|
|
32
|
+
import { ModalProvider as Do } from "./modal/index.js";
|
|
33
|
+
import { Separator as Ro } from "./separator/index.js";
|
|
34
|
+
import { STANDALONE_LINK_COLORS as ko, STANDALONE_LINK_ICON_POSITIONS as ho, STANDALONE_LINK_SIZES as Po, StandaloneLink as Ho } from "./standalone-link/index.js";
|
|
35
|
+
import { Table as vo } from "./table/index.js";
|
|
36
|
+
import { getDensity as Mo, getHorizontalAlignment as Uo, getScope as Xo, getVerticalAlignment as wo } from "./table/utils.js";
|
|
37
|
+
import { Tabs as zo } from "./tabs/index.js";
|
|
38
|
+
import { useTabsContext as Wo } from "./tabs/use-tabs-context.js";
|
|
39
|
+
import { TEXT_COLORS as jo, TEXT_WEIGHTS as qo, Text as Jo } from "./text/index.js";
|
|
40
|
+
import { BarChart as $o } from "./visualizations/bar-chart/index.js";
|
|
41
|
+
import { DonutChart as rr } from "./visualizations/donut-chart/index.js";
|
|
42
|
+
import { AccordionContent as tr, AccordionItem as pr, AccordionToggle as xr } from "./accordion/item/index.js";
|
|
43
|
+
import { RadioCardGroup as fr } from "./form/radio-card/group.js";
|
|
44
|
+
import { useModal as lr } from "./modal/use-modal.js";
|
|
45
|
+
export {
|
|
46
|
+
e as Accordion,
|
|
47
|
+
tr as AccordionContent,
|
|
48
|
+
pr as AccordionItem,
|
|
49
|
+
xr as AccordionToggle,
|
|
50
|
+
a as Alert,
|
|
51
|
+
d as AlertActions,
|
|
52
|
+
T as AlertButton,
|
|
53
|
+
S as AlertStandaloneLink,
|
|
54
|
+
p as BADGE_COLORS,
|
|
55
|
+
x as BADGE_SIZES,
|
|
56
|
+
m as BADGE_TYPES,
|
|
57
|
+
O as BUTTON_COLORS,
|
|
58
|
+
u as BUTTON_ICON_POSITIONS,
|
|
59
|
+
B as BUTTON_SIZES,
|
|
60
|
+
f as Badge,
|
|
61
|
+
l as BadgeCount,
|
|
62
|
+
$o as BarChart,
|
|
63
|
+
c as Breadcrumbs,
|
|
64
|
+
C as Button,
|
|
65
|
+
s as Card,
|
|
66
|
+
H as CheckboxBase,
|
|
67
|
+
Z as CheckboxField,
|
|
68
|
+
v as CheckboxGroup,
|
|
69
|
+
N as CodeBlock,
|
|
70
|
+
E as DisclosurePrimitive,
|
|
71
|
+
rr as DonutChart,
|
|
72
|
+
R as Dropdown,
|
|
73
|
+
M as Error,
|
|
74
|
+
k as FLIGHT_ICON_SIZES,
|
|
75
|
+
X as Field,
|
|
76
|
+
y as Fieldset,
|
|
77
|
+
V as FileInputBase,
|
|
78
|
+
W as FileInputField,
|
|
79
|
+
h as FlightIcon,
|
|
80
|
+
j as HelperText,
|
|
81
|
+
so as IconTile,
|
|
82
|
+
J as Indicator,
|
|
83
|
+
No as InlineLink,
|
|
84
|
+
$ as Label,
|
|
85
|
+
ro as Legend,
|
|
86
|
+
Eo as MDSButton,
|
|
87
|
+
Do as ModalProvider,
|
|
88
|
+
to as RadioBase,
|
|
89
|
+
fo as RadioCard,
|
|
90
|
+
fr as RadioCardGroup,
|
|
91
|
+
po as RadioField,
|
|
92
|
+
xo as RadioGroup,
|
|
93
|
+
ko as STANDALONE_LINK_COLORS,
|
|
94
|
+
ho as STANDALONE_LINK_ICON_POSITIONS,
|
|
95
|
+
Po as STANDALONE_LINK_SIZES,
|
|
96
|
+
lo as SelectField,
|
|
97
|
+
Ro as Separator,
|
|
98
|
+
Ho as StandaloneLink,
|
|
99
|
+
ao as SuperSelectField,
|
|
100
|
+
jo as TEXT_COLORS,
|
|
101
|
+
qo as TEXT_WEIGHTS,
|
|
102
|
+
vo as Table,
|
|
103
|
+
zo as Tabs,
|
|
104
|
+
Jo as Text,
|
|
105
|
+
Ao as TextAreaField,
|
|
106
|
+
So as TextInput,
|
|
107
|
+
Io as TextInputBase,
|
|
108
|
+
uo as ToggleBase,
|
|
109
|
+
Bo as ToggleField,
|
|
110
|
+
Co as ToggleGroup,
|
|
111
|
+
Mo as getDensity,
|
|
112
|
+
Uo as getHorizontalAlignment,
|
|
113
|
+
Xo as getScope,
|
|
114
|
+
wo as getVerticalAlignment,
|
|
115
|
+
D as useDisclosurePrimitive,
|
|
116
|
+
lr as useModal,
|
|
117
|
+
Wo as useTabsContext
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FlightIconName } from '../flight-icon';
|
|
2
|
+
interface InlineLinkProps {
|
|
3
|
+
/**
|
|
4
|
+
* There are two available colors for an `<InlineLink />`: primary and secondary.
|
|
5
|
+
*/
|
|
6
|
+
color?: 'primary' | 'secondary';
|
|
7
|
+
/**
|
|
8
|
+
* Use this parameter to show an icon.
|
|
9
|
+
*/
|
|
10
|
+
icon?: FlightIconName;
|
|
11
|
+
/**
|
|
12
|
+
* Positions the icon before or after the text.
|
|
13
|
+
*/
|
|
14
|
+
iconPosition?: 'leading' | 'trailing';
|
|
15
|
+
/**
|
|
16
|
+
* URL parameter that’s passed down to the `<a>` element.
|
|
17
|
+
*/
|
|
18
|
+
href: string;
|
|
19
|
+
/**
|
|
20
|
+
* Controls if the <a> link is external. For security reasons, we add the target="_blank" and rel="noopener noreferrer" attributes to it by default.
|
|
21
|
+
* default: `false`
|
|
22
|
+
*/
|
|
23
|
+
isHrefExternal?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The content of the <a> HTML element.
|
|
26
|
+
*/
|
|
27
|
+
text: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional class name to add to the component.
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
prefetch?: boolean;
|
|
33
|
+
locale?: string;
|
|
34
|
+
}
|
|
35
|
+
declare const InlineLink: {
|
|
36
|
+
({ text, color, icon, iconPosition, className, isHrefExternal, ...props }: InlineLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
export type { InlineLinkProps };
|
|
40
|
+
export { InlineLink };
|