@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,27 @@
|
|
|
1
|
+
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
interface FileInputBaseProps {
|
|
3
|
+
isRequired?: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Can be used to supply any props that the native `<input>` element supports.
|
|
8
|
+
* Since this is for file input, we omit `type`, see here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
|
|
9
|
+
*/
|
|
10
|
+
field: Omit<HTMLProps<HTMLInputElement>, 'type' | 'id'>;
|
|
11
|
+
error?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const FileInputBase: {
|
|
14
|
+
({ isRequired, className, id, field, error, ...rest }: FileInputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
interface FileInputFieldProps extends FileInputBaseProps {
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
helperText?: ReactNode;
|
|
20
|
+
error?: ReactNode;
|
|
21
|
+
isOptional?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const FileInputField: {
|
|
24
|
+
({ id, label, helperText, error, field, className, isRequired, isOptional, ...rest }: FileInputFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { FileInputBase, FileInputField };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useId as a } from "react";
|
|
3
|
+
import { Field as I } from "../field/index.js";
|
|
4
|
+
import F from "./form-file-input.module.scss.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
isRequired: i,
|
|
7
|
+
className: l,
|
|
8
|
+
id: e,
|
|
9
|
+
field: r,
|
|
10
|
+
error: n,
|
|
11
|
+
...d
|
|
12
|
+
}) => {
|
|
13
|
+
const t = a();
|
|
14
|
+
return /* @__PURE__ */ p(
|
|
15
|
+
"input",
|
|
16
|
+
{
|
|
17
|
+
type: "file",
|
|
18
|
+
required: i,
|
|
19
|
+
id: e ?? t,
|
|
20
|
+
className: F["file-input"],
|
|
21
|
+
"aria-describedby": `${n ? "error" : "helper-text"}-${e}`,
|
|
22
|
+
...r,
|
|
23
|
+
...d
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
u.displayName = "FileInputBase";
|
|
28
|
+
const f = ({
|
|
29
|
+
id: i,
|
|
30
|
+
label: l,
|
|
31
|
+
helperText: e,
|
|
32
|
+
error: r,
|
|
33
|
+
field: n,
|
|
34
|
+
className: d,
|
|
35
|
+
isRequired: t,
|
|
36
|
+
isOptional: o,
|
|
37
|
+
...m
|
|
38
|
+
}) => {
|
|
39
|
+
const c = a(), s = i ?? c;
|
|
40
|
+
return /* @__PURE__ */ p(
|
|
41
|
+
I,
|
|
42
|
+
{
|
|
43
|
+
label: l,
|
|
44
|
+
helperText: e,
|
|
45
|
+
error: r,
|
|
46
|
+
isRequired: t,
|
|
47
|
+
isOptional: o,
|
|
48
|
+
id: s,
|
|
49
|
+
layout: "vertical",
|
|
50
|
+
className: d,
|
|
51
|
+
children: /* @__PURE__ */ p(
|
|
52
|
+
u,
|
|
53
|
+
{
|
|
54
|
+
id: s,
|
|
55
|
+
isRequired: t,
|
|
56
|
+
field: n,
|
|
57
|
+
...m
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
f.displayName = "FileInputField";
|
|
64
|
+
export {
|
|
65
|
+
u as FileInputBase,
|
|
66
|
+
f as FileInputField
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/file-input/index.tsx"],"sourcesContent":["import type { HTMLProps, ReactNode } from 'react'\nimport { useId } from 'react'\nimport { Field } from '../field'\nimport s from './form-file-input.module.scss'\n\ninterface FileInputBaseProps {\n\tisRequired?: boolean\n\tclassName?: string\n\tid?: string\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports.\n\t * Since this is for file input, we omit `type`, see here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n\t */\n\tfield: Omit<HTMLProps<HTMLInputElement>, 'type' | 'id'>\n\terror?: ReactNode\n}\n\nconst FileInputBase = ({\n\tisRequired,\n\tclassName,\n\tid,\n\tfield,\n\terror,\n\t...rest\n}: FileInputBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\trequired={isRequired}\n\t\t\tid={inputId}\n\t\t\tclassName={s['file-input']}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t{...field}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\nFileInputBase.displayName = 'FileInputBase'\n\ninterface FileInputFieldProps extends FileInputBaseProps {\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tisOptional?: boolean\n}\n\nconst FileInputField = ({\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\tisRequired,\n\tisOptional,\n\t...rest\n}: FileInputFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\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=\"vertical\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<FileInputBase\n\t\t\t\tid={inputId}\n\t\t\t\tisRequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nFileInputField.displayName = 'FileInputField'\n\nexport { FileInputBase, FileInputField }\n"],"names":["FileInputBase","isRequired","className","id","field","error","rest","generatedId","useId","jsx","s","FileInputField","label","helperText","isOptional","inputId","Field"],"mappings":";;;;AAkBA,MAAMA,IAAgB,CAAC;AAAA,EACtB,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACJ,MAA0B;AACzB,QAAMC,IAAcC,EAAA;AAGpB,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,MAAK;AAAA,MACL,UAAUR;AAAA,MACV,IANcE,KAAMI;AAAA,MAOpB,WAAWG,EAAE,YAAY;AAAA,MACzB,oBAAkB,GAAGL,IAAQ,UAAU,aAAa,IAAIF,CAAE;AAAA,MACzD,GAAGC;AAAA,MACH,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;AAEAN,EAAc,cAAc;AAS5B,MAAMW,IAAiB,CAAC;AAAA,EACvB,IAAAR;AAAA,EACA,OAAAS;AAAA,EACA,YAAAC;AAAA,EACA,OAAAR;AAAA,EACA,OAAAD;AAAA,EACA,WAAAF;AAAA,EACA,YAAAD;AAAA,EACA,YAAAa;AAAA,EACA,GAAGR;AACJ,MAA2B;AAC1B,QAAMC,IAAcC,EAAA,GACdO,IAAUZ,KAAMI;AAEtB,SACC,gBAAAE;AAAA,IAACO;AAAA,IAAA;AAAA,MACA,OAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,OAAAR;AAAA,MACA,YAAAJ;AAAA,MACA,YAAAa;AAAA,MACA,IAAIC;AAAA,MACJ,QAAO;AAAA,MACP,WAAAb;AAAA,MAEA,UAAA,gBAAAO;AAAA,QAACT;AAAA,QAAA;AAAA,UACA,IAAIe;AAAA,UACJ,YAAAd;AAAA,UACA,OAAAG;AAAA,UACC,GAAGE;AAAA,QAAA;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGH;AAEAK,EAAe,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-helper-text.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface HelperTextProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
controlId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const HelperText: {
|
|
8
|
+
({ children, className, controlId, ...rest }: HelperTextProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export { HelperText };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import s from "classnames";
|
|
3
|
+
import i from "./form-helper-text.module.css.js";
|
|
4
|
+
const o = ({
|
|
5
|
+
children: r,
|
|
6
|
+
className: t,
|
|
7
|
+
controlId: e,
|
|
8
|
+
...m
|
|
9
|
+
}) => /* @__PURE__ */ p(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
className: s(i["helper-text"], t),
|
|
13
|
+
id: e ? `helper-text-${e}` : void 0,
|
|
14
|
+
...m,
|
|
15
|
+
children: r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
o.displayName = "HelperText";
|
|
19
|
+
export {
|
|
20
|
+
o as HelperText
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/helper-text/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport s from './form-helper-text.module.css'\n\ninterface HelperTextProps {\n\tchildren: ReactNode\n\tclassName?: string\n\tcontrolId?: string\n}\n\nconst HelperText = ({\n\tchildren,\n\tclassName,\n\tcontrolId,\n\t...rest\n}: HelperTextProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s['helper-text'], className)}\n\t\t\tid={controlId ? `helper-text-${controlId}` : undefined}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nHelperText.displayName = 'HelperText'\n\nexport { HelperText }\n"],"names":["HelperText","children","className","controlId","rest","jsx","classNames","s"],"mappings":";;;AAUA,MAAMA,IAAa,CAAC;AAAA,EACnB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC,EAAWC,EAAE,aAAa,GAAGL,CAAS;AAAA,IACjD,IAAIC,IAAY,eAAeA,CAAS,KAAK;AAAA,IAC5C,GAAGC;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA;AAKJD,EAAW,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-indicator.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as a } from "../../badge/index.js";
|
|
3
|
+
import { localize as i } from "../../../utils/i18n/index.js";
|
|
4
|
+
import { useLocale as n } from "@web/utils/i18n/helpers";
|
|
5
|
+
import m from "./form-indicator.module.css.js";
|
|
6
|
+
const s = ({ isOptional: r, isRequired: l }) => {
|
|
7
|
+
const e = n(), t = r ? m.optional : null;
|
|
8
|
+
return r ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: t, children: `(${i("optional", e, "title")})` }) : l ? /* @__PURE__ */ o(
|
|
9
|
+
a,
|
|
10
|
+
{
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
className: t,
|
|
13
|
+
size: "small",
|
|
14
|
+
text: i("required", e, "title")
|
|
15
|
+
}
|
|
16
|
+
) : null;
|
|
17
|
+
};
|
|
18
|
+
s.displayName = "Indicator";
|
|
19
|
+
export {
|
|
20
|
+
s as Indicator
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/indicator/index.tsx"],"sourcesContent":["import { Badge } from '../../badge'\nimport { localize } from '../../../utils/i18n'\nimport { useLocale } from '@web/utils/i18n/helpers'\nimport s from './form-indicator.module.css'\n\ninterface IndicatorProps {\n\tisOptional?: boolean\n\tisRequired?: boolean\n}\n\nconst Indicator = ({ isOptional, isRequired }: IndicatorProps) => {\n\tconst locale = useLocale()\n\n\tconst className = isOptional ? s.optional : null\n\n\tif (isOptional) {\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={className}>\n\t\t\t\t{`(${localize('optional', locale, 'title')})`}\n\t\t\t</span>\n\t\t)\n\t} else if (isRequired) {\n\t\treturn (\n\t\t\t<Badge\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={className}\n\t\t\t\tsize=\"small\"\n\t\t\t\ttext={localize('required', locale, 'title')}\n\t\t\t/>\n\t\t)\n\t}\n\n\treturn null\n}\n\nIndicator.displayName = 'Indicator'\n\nexport { Indicator }\n"],"names":["Indicator","isOptional","isRequired","locale","useLocale","className","s","jsx","localize","Badge"],"mappings":";;;;;AAUA,MAAMA,IAAY,CAAC,EAAE,YAAAC,GAAY,YAAAC,QAAiC;AACjE,QAAMC,IAASC,EAAA,GAETC,IAAYJ,IAAaK,EAAE,WAAW;AAE5C,SAAIL,IAEF,gBAAAM,EAAC,QAAA,EAAK,eAAY,QAAO,WAAAF,GACvB,UAAA,IAAIG,EAAS,YAAYL,GAAQ,OAAO,CAAC,KAC3C,IAESD,IAET,gBAAAK;AAAA,IAACE;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ,WAAAJ;AAAA,MACA,MAAK;AAAA,MACL,MAAMG,EAAS,YAAYL,GAAQ,OAAO;AAAA,IAAA;AAAA,EAAA,IAKtC;AACR;AAEAH,EAAU,cAAc;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.badges {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: baseline;
|
|
4
|
+
gap: var(--mds-spacing-01);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.label {
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: var(--mds-spacing-01);
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
color: var(--mds-form-label-color);
|
|
13
|
+
composes: mds-typography-legacy-body-200 from global;
|
|
14
|
+
composes: mds-typography-font-weight-semibold from global;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const a = "badges__fd5n1", e = "label__p8mfL mds-typography-legacy-body-200 mds-typography-font-weight-semibold", s = {
|
|
2
|
+
badges: a,
|
|
3
|
+
label: e
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
a as badges,
|
|
7
|
+
s as default,
|
|
8
|
+
e as label
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=form-label.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-label.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface LabelProps {
|
|
3
|
+
badgeText?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
controlId: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
isOptional?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Label: {
|
|
11
|
+
({ badgeText, className, controlId, children, isRequired, isOptional, ...rest }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export { Label };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as a, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import c from "classnames";
|
|
3
|
+
import { Indicator as i } from "../indicator/index.js";
|
|
4
|
+
import { Badge as f } from "../../badge/index.js";
|
|
5
|
+
import o from "./form-label.module.css.js";
|
|
6
|
+
const N = ({
|
|
7
|
+
badgeText: l,
|
|
8
|
+
className: e,
|
|
9
|
+
controlId: t,
|
|
10
|
+
children: n,
|
|
11
|
+
isRequired: r,
|
|
12
|
+
isOptional: s,
|
|
13
|
+
...p
|
|
14
|
+
}) => /* @__PURE__ */ a(
|
|
15
|
+
"label",
|
|
16
|
+
{
|
|
17
|
+
className: c(o.label, e),
|
|
18
|
+
htmlFor: t,
|
|
19
|
+
...p,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ m("span", { children: n }),
|
|
22
|
+
s || r || l ? /* @__PURE__ */ a("span", { className: o.badges, children: [
|
|
23
|
+
l ? /* @__PURE__ */ m(f, { size: "small", text: l }) : null,
|
|
24
|
+
/* @__PURE__ */ m(i, { isRequired: r, isOptional: s })
|
|
25
|
+
] }) : null
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
N.displayName = "Label";
|
|
30
|
+
export {
|
|
31
|
+
N as Label
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/label/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { Indicator } from '../indicator'\nimport { Badge } from '../../badge'\nimport type { ReactNode } from 'react'\nimport s from './form-label.module.css'\n\ninterface LabelProps {\n\tbadgeText?: string\n\tclassName?: string\n\tcontrolId: string\n\tchildren: ReactNode\n\tisRequired?: boolean\n\tisOptional?: boolean\n}\n\nconst Label = ({\n\tbadgeText,\n\tclassName,\n\tcontrolId,\n\tchildren,\n\tisRequired,\n\tisOptional,\n\t...rest\n}: LabelProps) => {\n\treturn (\n\t\t<label\n\t\t\tclassName={classNames(s.label, className)}\n\t\t\thtmlFor={controlId}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<span>{children}</span>\n\t\t\t{isOptional || isRequired || badgeText ? (\n\t\t\t\t<span className={s.badges}>\n\t\t\t\t\t{badgeText ? <Badge size=\"small\" text={badgeText} /> : null}\n\t\t\t\t\t<Indicator isRequired={isRequired} isOptional={isOptional} />\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t</label>\n\t)\n}\n\nLabel.displayName = 'Label'\n\nexport { Label }\n"],"names":["Label","badgeText","className","controlId","children","isRequired","isOptional","rest","jsxs","classNames","s","jsx","Badge","Indicator"],"mappings":";;;;;AAeA,MAAMA,IAAQ,CAAC;AAAA,EACd,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC,EAAWC,EAAE,OAAOR,CAAS;AAAA,IACxC,SAASC;AAAA,IACR,GAAGI;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAI,EAAC,UAAM,UAAAP,GAAS;AAAA,MACfE,KAAcD,KAAcJ,sBAC3B,QAAA,EAAK,WAAWS,EAAE,QACjB,UAAA;AAAA,QAAAT,sBAAaW,GAAA,EAAM,MAAK,SAAQ,MAAMX,GAAW,IAAK;AAAA,QACvD,gBAAAU,EAACE,GAAA,EAAU,YAAAR,GAAwB,YAAAC,EAAA,CAAwB;AAAA,MAAA,EAAA,CAC5D,IACG;AAAA,IAAA;AAAA,EAAA;AAAA;AAKPN,EAAM,cAAc;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FORM > LEGEND
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.legend {
|
|
6
|
+
display: block;
|
|
7
|
+
color: var(--mds-form-legend-color);
|
|
8
|
+
composes: mds-typography-legacy-body-200 from global;
|
|
9
|
+
composes: mds-typography-font-weight-semibold from global;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.badge {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: baseline;
|
|
15
|
+
gap: var(--mds-spacing-01);
|
|
16
|
+
margin-left: var(--mds-spacing-01);
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const e = "legend__O8-rs mds-typography-legacy-body-200 mds-typography-font-weight-semibold", d = "badge__rqzw5", g = {
|
|
2
|
+
legend: e,
|
|
3
|
+
badge: d
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
d as badge,
|
|
7
|
+
g as default,
|
|
8
|
+
e as legend
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=form-legend.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-legend.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface LegendProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
isOptional?: boolean;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Legend: {
|
|
9
|
+
({ className, isRequired, isOptional, children, ...rest }: LegendProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export { Legend };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import d from "classnames";
|
|
3
|
+
import { Indicator as c } from "../indicator/index.js";
|
|
4
|
+
import m from "./form-legend.module.css.js";
|
|
5
|
+
const p = ({
|
|
6
|
+
className: a,
|
|
7
|
+
isRequired: r,
|
|
8
|
+
isOptional: s,
|
|
9
|
+
children: n,
|
|
10
|
+
...o
|
|
11
|
+
}) => /* @__PURE__ */ l("legend", { className: d(m.legend, a), ...o, children: [
|
|
12
|
+
/* @__PURE__ */ e("span", { children: n }),
|
|
13
|
+
s || r ? /* @__PURE__ */ e("span", { className: m.badge, children: /* @__PURE__ */ e(c, { isRequired: r, isOptional: s }) }) : null
|
|
14
|
+
] });
|
|
15
|
+
p.displayName = "Legend";
|
|
16
|
+
export {
|
|
17
|
+
p as Legend
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/legend/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport classNames from 'classnames'\nimport { Indicator } from '../indicator'\nimport s from './form-legend.module.css'\n\ninterface LegendProps {\n\tclassName?: string\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tchildren: ReactNode\n}\n\nconst Legend = ({\n\tclassName,\n\tisRequired,\n\tisOptional,\n\tchildren,\n\t...rest\n}: LegendProps) => {\n\treturn (\n\t\t<legend className={classNames(s.legend, className)} {...rest}>\n\t\t\t<span>{children}</span>\n\t\t\t{isOptional || isRequired ? (\n\t\t\t\t<span className={s.badge}>\n\t\t\t\t\t<Indicator isRequired={isRequired} isOptional={isOptional} />\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t</legend>\n\t)\n}\n\nLegend.displayName = 'Legend'\n\nexport { Legend }\n"],"names":["Legend","className","isRequired","isOptional","children","rest","jsxs","classNames","s","jsx","Indicator"],"mappings":";;;;AAYA,MAAMA,IAAS,CAAC;AAAA,EACf,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC,EAAC,YAAO,WAAWC,EAAWC,EAAE,QAAQP,CAAS,GAAI,GAAGI,GACvD,UAAA;AAAA,EAAA,gBAAAI,EAAC,UAAM,UAAAL,GAAS;AAAA,EACfD,KAAcD,IACd,gBAAAO,EAAC,QAAA,EAAK,WAAWD,EAAE,OAClB,UAAA,gBAAAC,EAACC,GAAA,EAAU,YAAAR,GAAwB,YAAAC,EAAA,CAAwB,EAAA,CAC5D,IACG;AAAA,GACL;AAIFH,EAAO,cAAc;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FORM > RADIO
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* "BASE" CONTROL */
|
|
6
|
+
|
|
7
|
+
.radio {
|
|
8
|
+
width: var(--mds-form-radio-size);
|
|
9
|
+
height: var(--mds-form-radio-size);
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
background-position: center center;
|
|
13
|
+
background-size: var(--mds-form-radio-background-image-size)
|
|
14
|
+
var(--mds-form-radio-background-image-size);
|
|
15
|
+
border-style: solid;
|
|
16
|
+
border-width: var(--mds-form-radio-border-width);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
appearance: none;
|
|
20
|
+
|
|
21
|
+
/* STATUS */
|
|
22
|
+
|
|
23
|
+
/* base (default) */
|
|
24
|
+
|
|
25
|
+
&:not(:checked) {
|
|
26
|
+
background-color: var(--mds-form-control-base-surface-color-default);
|
|
27
|
+
border-color: var(--mds-form-control-base-border-color-default);
|
|
28
|
+
box-shadow: var(--mds-elevation-inset-box-shadow);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:checked {
|
|
32
|
+
background-color: var(--mds-form-control-checked-surface-color-default);
|
|
33
|
+
background-image: var(--mds-form-radio-background-image-data-url);
|
|
34
|
+
border-color: var(--mds-form-control-checked-border-color-default);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* hover */
|
|
38
|
+
|
|
39
|
+
&:hover:not(:checked) {
|
|
40
|
+
background-color: var(--mds-form-control-base-surface-color-hover);
|
|
41
|
+
border-color: var(--mds-form-control-base-border-color-hover);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:hover:checked {
|
|
45
|
+
background-color: var(--mds-form-control-checked-border-color-default);
|
|
46
|
+
border-color: var(--mds-form-control-checked-border-color-hover);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* focus (same for all the states) */
|
|
50
|
+
|
|
51
|
+
&:focus {
|
|
52
|
+
outline: 3px solid var(--mds-color-focus-action-external);
|
|
53
|
+
outline-offset: 1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* DISABLED */
|
|
57
|
+
|
|
58
|
+
&:disabled:not(:checked) {
|
|
59
|
+
background-color: var(--mds-form-control-disabled-surface-color);
|
|
60
|
+
border-color: var(--mds-form-control-disabled-border-color);
|
|
61
|
+
box-shadow: none;
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:disabled:checked {
|
|
66
|
+
background-color: var(--mds-form-control-disabled-surface-color);
|
|
67
|
+
background-image: var(
|
|
68
|
+
--mds-form-radio-background-image-data-url-disabled
|
|
69
|
+
);
|
|
70
|
+
border-color: var(--mds-form-control-disabled-border-color);
|
|
71
|
+
box-shadow: none;
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-radio.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentProps, HTMLProps, ReactNode } from 'react';
|
|
2
|
+
import { Fieldset } from '../fieldset';
|
|
3
|
+
interface RadioBaseProps {
|
|
4
|
+
id: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
field: HTMLProps<HTMLInputElement>;
|
|
7
|
+
className?: string;
|
|
8
|
+
testingKey?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const RadioBase: {
|
|
11
|
+
({ id, required, field, className, testingKey, }: RadioBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
interface RadioFieldProps {
|
|
15
|
+
isInvalid?: boolean;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
isOptional?: boolean;
|
|
19
|
+
id?: string;
|
|
20
|
+
label?: ReactNode;
|
|
21
|
+
helperText?: ReactNode;
|
|
22
|
+
error?: ReactNode;
|
|
23
|
+
field: HTMLProps<HTMLInputElement>;
|
|
24
|
+
className?: string;
|
|
25
|
+
testingKey?: string;
|
|
26
|
+
}
|
|
27
|
+
declare const RadioField: {
|
|
28
|
+
({ isInvalid, isLoading, isRequired, isOptional, id, label, helperText, error, field, className, testingKey, ...rest }: RadioFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
interface RadioGroupProps extends ComponentProps<typeof Fieldset> {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}
|
|
34
|
+
declare const RadioGroup: {
|
|
35
|
+
Root: {
|
|
36
|
+
({ layout, legend, isOptional, isRequired, children, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
Field: {
|
|
40
|
+
(props: RadioFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export { RadioGroup, RadioBase, RadioField };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useId as g } from "react";
|
|
3
|
+
import { Field as G } from "../field/index.js";
|
|
4
|
+
import { Fieldset as I } from "../fieldset/index.js";
|
|
5
|
+
import b from "classnames";
|
|
6
|
+
import v from "./form-radio.module.scss.js";
|
|
7
|
+
const s = ({
|
|
8
|
+
id: o,
|
|
9
|
+
required: r,
|
|
10
|
+
field: i,
|
|
11
|
+
className: e,
|
|
12
|
+
testingKey: a
|
|
13
|
+
}) => /* @__PURE__ */ d(
|
|
14
|
+
"input",
|
|
15
|
+
{
|
|
16
|
+
id: o,
|
|
17
|
+
type: "radio",
|
|
18
|
+
className: b(v.radio, e),
|
|
19
|
+
required: r,
|
|
20
|
+
"data-testid": a,
|
|
21
|
+
...i
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
s.displayName = "RadioBase";
|
|
25
|
+
const l = ({
|
|
26
|
+
isInvalid: o,
|
|
27
|
+
isLoading: r,
|
|
28
|
+
isRequired: i,
|
|
29
|
+
isOptional: e,
|
|
30
|
+
id: a,
|
|
31
|
+
label: p,
|
|
32
|
+
helperText: c,
|
|
33
|
+
error: u,
|
|
34
|
+
field: R,
|
|
35
|
+
className: y,
|
|
36
|
+
testingKey: f,
|
|
37
|
+
...N
|
|
38
|
+
}) => {
|
|
39
|
+
const F = g(), t = a ?? F;
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
|
+
G,
|
|
42
|
+
{
|
|
43
|
+
label: p,
|
|
44
|
+
helperText: c,
|
|
45
|
+
error: u,
|
|
46
|
+
isRequired: i,
|
|
47
|
+
isOptional: e,
|
|
48
|
+
id: t,
|
|
49
|
+
layout: "flag",
|
|
50
|
+
className: y,
|
|
51
|
+
children: /* @__PURE__ */ d(
|
|
52
|
+
s,
|
|
53
|
+
{
|
|
54
|
+
id: t,
|
|
55
|
+
required: i,
|
|
56
|
+
field: { ...R, "aria-describedby": `error-${a}` },
|
|
57
|
+
testingKey: f,
|
|
58
|
+
...N
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
l.displayName = "RadioField";
|
|
65
|
+
const m = ({
|
|
66
|
+
layout: o = "vertical",
|
|
67
|
+
legend: r,
|
|
68
|
+
isOptional: i,
|
|
69
|
+
isRequired: e,
|
|
70
|
+
children: a
|
|
71
|
+
}) => /* @__PURE__ */ d(
|
|
72
|
+
I,
|
|
73
|
+
{
|
|
74
|
+
layout: o,
|
|
75
|
+
legend: r,
|
|
76
|
+
isOptional: i,
|
|
77
|
+
isRequired: e,
|
|
78
|
+
children: a
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
m.displayName = "RadioGroupRoot";
|
|
82
|
+
const n = (o) => /* @__PURE__ */ d(
|
|
83
|
+
l,
|
|
84
|
+
{
|
|
85
|
+
...o,
|
|
86
|
+
testingKey: o.testingKey,
|
|
87
|
+
className: o.className
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
n.displayName = "RadioGroupField";
|
|
91
|
+
const $ = {
|
|
92
|
+
Root: m,
|
|
93
|
+
Field: n
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
s as RadioBase,
|
|
97
|
+
l as RadioField,
|
|
98
|
+
$ as RadioGroup
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/form/radio/index.tsx"],"sourcesContent":["import {\n\tuseId,\n\ttype ComponentProps,\n\ttype HTMLProps,\n\ttype ReactNode,\n} from 'react'\nimport { Field } from '../field'\nimport { Fieldset } from '../fieldset'\nimport classNames from 'classnames'\nimport s from './form-radio.module.scss'\n\ninterface RadioBaseProps {\n\tid: string\n\trequired?: boolean\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst RadioBase = ({\n\tid,\n\trequired,\n\tfield,\n\tclassName,\n\ttestingKey,\n}: RadioBaseProps) => {\n\treturn (\n\t\t<input\n\t\t\tid={id}\n\t\t\ttype=\"radio\"\n\t\t\tclassName={classNames(s.radio, className)}\n\t\t\trequired={required}\n\t\t\tdata-testid={testingKey}\n\t\t\t{...field}\n\t\t/>\n\t)\n}\n\nRadioBase.displayName = 'RadioBase'\n\ninterface RadioFieldProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tid?: string\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst RadioField = ({\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\ttestingKey,\n\t...rest\n}: RadioFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\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<RadioBase\n\t\t\t\tid={inputId}\n\t\t\t\trequired={isRequired}\n\t\t\t\tfield={{ ...field, 'aria-describedby': `error-${id}` }}\n\t\t\t\ttestingKey={testingKey}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nRadioField.displayName = 'RadioField'\n\ninterface RadioGroupProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n}\n\nconst RadioGroupRoot = ({\n\tlayout = 'vertical',\n\tlegend,\n\tisOptional,\n\tisRequired,\n\tchildren,\n}: RadioGroupProps) => {\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\nRadioGroupRoot.displayName = 'RadioGroupRoot'\n\nconst RadioGroupField = (props: RadioFieldProps) => {\n\treturn (\n\t\t<RadioField\n\t\t\t{...props}\n\t\t\ttestingKey={props.testingKey}\n\t\t\tclassName={props.className}\n\t\t/>\n\t)\n}\n\nRadioGroupField.displayName = 'RadioGroupField'\n\nconst RadioGroup = {\n\tRoot: RadioGroupRoot,\n\tField: RadioGroupField,\n}\n\nexport { RadioGroup, RadioBase, RadioField }\n"],"names":["RadioBase","id","required","field","className","testingKey","jsx","classNames","s","RadioField","isInvalid","isLoading","isRequired","isOptional","label","helperText","error","rest","generatedId","useId","inputId","Field","RadioGroupRoot","layout","legend","children","Fieldset","RadioGroupField","props","RadioGroup"],"mappings":";;;;;;AAmBA,MAAMA,IAAY,CAAC;AAAA,EAClB,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACD,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,IAAAL;AAAA,IACA,MAAK;AAAA,IACL,WAAWM,EAAWC,EAAE,OAAOJ,CAAS;AAAA,IACxC,UAAAF;AAAA,IACA,eAAaG;AAAA,IACZ,GAAGF;AAAA,EAAA;AAAA;AAKPH,EAAU,cAAc;AAgBxB,MAAMS,IAAa,CAAC;AAAA,EACnB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,IAAAZ;AAAA,EACA,OAAAa;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAb;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGY;AACJ,MAAuB;AACtB,QAAMC,IAAcC,EAAA,GACdC,IAAUnB,KAAMiB;AAEtB,SACC,gBAAAZ;AAAA,IAACe;AAAA,IAAA;AAAA,MACA,OAAAP;AAAA,MACA,YAAAC;AAAA,MACA,OAAAC;AAAA,MACA,YAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,IAAIO;AAAA,MACJ,QAAO;AAAA,MACP,WAAAhB;AAAA,MAEA,UAAA,gBAAAE;AAAA,QAACN;AAAA,QAAA;AAAA,UACA,IAAIoB;AAAA,UACJ,UAAUR;AAAA,UACV,OAAO,EAAE,GAAGT,GAAO,oBAAoB,SAASF,CAAE,GAAA;AAAA,UAClD,YAAAI;AAAA,UACC,GAAGY;AAAA,QAAA;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGH;AAEAR,EAAW,cAAc;AAMzB,MAAMa,IAAiB,CAAC;AAAA,EACvB,QAAAC,IAAS;AAAA,EACT,QAAAC;AAAA,EACA,YAAAX;AAAA,EACA,YAAAD;AAAA,EACA,UAAAa;AACD,MAEE,gBAAAnB;AAAA,EAACoB;AAAA,EAAA;AAAA,IACA,QAAAH;AAAA,IACA,QAAAC;AAAA,IACA,YAAAX;AAAA,IACA,YAAAD;AAAA,IAEC,UAAAa;AAAA,EAAA;AAAA;AAKJH,EAAe,cAAc;AAE7B,MAAMK,IAAkB,CAACC,MAEvB,gBAAAtB;AAAA,EAACG;AAAA,EAAA;AAAA,IACC,GAAGmB;AAAA,IACJ,YAAYA,EAAM;AAAA,IAClB,WAAWA,EAAM;AAAA,EAAA;AAAA;AAKpBD,EAAgB,cAAc;AAE9B,MAAME,IAAa;AAAA,EAClB,MAAMP;AAAA,EACN,OAAOK;AACR;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Text as i } from "../../text/index.js";
|
|
3
|
+
import t from "./form-radio-card.module.css.js";
|
|
4
|
+
function n({ description: r }) {
|
|
5
|
+
return /* @__PURE__ */ o(i.HDSBody, { className: t.description, size: "100", children: r });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
n as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=description.js.map
|