@hashicorp/mds-react 0.9.3 → 0.9.5
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/components/accordion/index.js +9 -0
- package/components/accordion/index.js.map +1 -0
- package/components/accordion/item/button.js +44 -0
- package/components/accordion/item/button.js.map +1 -0
- package/components/accordion/item/index.js +59 -0
- package/components/accordion/item/index.js.map +1 -0
- package/components/accordion/style.module.scss.js +24 -0
- package/components/accordion/style.module.scss.js.map +1 -0
- package/components/alert/alert.module.scss.js +29 -0
- package/components/alert/alert.module.scss.js.map +1 -0
- package/components/alert/icon.js +34 -0
- package/components/alert/icon.js.map +1 -0
- package/components/alert/index.js +97 -0
- package/components/alert/index.js.map +1 -0
- package/components/badge/index.js +50 -0
- package/components/badge/index.js.map +1 -0
- package/components/badge/style.module.scss +8 -6
- package/components/badge/style.module.scss.js +22 -0
- package/components/badge/style.module.scss.js.map +1 -0
- package/components/badge-count/index.js +29 -0
- package/components/badge-count/index.js.map +1 -0
- package/components/badge-count/style.module.scss +7 -6
- package/components/badge-count/style.module.scss.js +15 -0
- package/components/badge-count/style.module.scss.js.map +1 -0
- package/components/breadcrumbs/index.js +38 -0
- package/components/breadcrumbs/index.js.map +1 -0
- package/components/breadcrumbs/item/index.js +32 -0
- package/components/breadcrumbs/item/index.js.map +1 -0
- package/components/breadcrumbs/style.module.scss.js +27 -0
- package/components/breadcrumbs/style.module.scss.js.map +1 -0
- package/components/breadcrumbs/truncation-button/index.js +25 -0
- package/components/breadcrumbs/truncation-button/index.js.map +1 -0
- package/components/button/button-primitive.d.ts +5 -0
- package/components/button/button-primitive.js +59 -0
- package/components/button/button-primitive.js.map +1 -0
- package/components/button/index.d.ts +4 -5
- package/components/button/index.js +69 -0
- package/components/button/index.js.map +1 -0
- package/components/button/styles.module.scss.js +32 -0
- package/components/button/styles.module.scss.js.map +1 -0
- package/components/card/card-thumbnail/card-thumbnail.module.css.js +8 -0
- package/components/card/card-thumbnail/card-thumbnail.module.css.js.map +1 -0
- package/components/card/card-thumbnail/index.js +23 -0
- package/components/card/card-thumbnail/index.js.map +1 -0
- package/components/card/index.d.ts +2 -1
- package/components/card/index.js +160 -0
- package/components/card/index.js.map +1 -0
- package/components/card/styles.module.css.js +29 -0
- package/components/card/styles.module.css.js.map +1 -0
- package/components/card/types.d.ts +1 -0
- package/components/code-block/code-block.module.scss.js +34 -0
- package/components/code-block/code-block.module.scss.js.map +1 -0
- package/components/code-block/code-lines/index.js +59 -0
- package/components/code-block/code-lines/index.js.map +1 -0
- package/components/code-block/code-lines/utils/split-html-into-lines.js +19 -0
- package/components/code-block/code-lines/utils/split-html-into-lines.js.map +1 -0
- package/components/code-block/code-lines/utils/split-jsx-into-lines.js +31 -0
- package/components/code-block/code-lines/utils/split-jsx-into-lines.js.map +1 -0
- package/components/code-block/hidden-copy-content/index.js +13 -0
- package/components/code-block/hidden-copy-content/index.js.map +1 -0
- package/components/code-block/index.js +88 -0
- package/components/code-block/index.js.map +1 -0
- package/components/code-block/utils/parse-highlighted-lines.js +39 -0
- package/components/code-block/utils/parse-highlighted-lines.js.map +1 -0
- package/components/code-block/utils/process-snippet.js +20 -0
- package/components/code-block/utils/process-snippet.js.map +1 -0
- package/components/code-block/utils/shellwords.js +33 -0
- package/components/code-block/utils/shellwords.js.map +1 -0
- package/components/combo-box-primitive/index.js +302 -0
- package/components/combo-box-primitive/index.js.map +1 -0
- package/components/dialog-primitive/dialog.module.scss.js +12 -0
- package/components/dialog-primitive/dialog.module.scss.js.map +1 -0
- package/components/dialog-primitive/index.js +15 -0
- package/components/dialog-primitive/index.js.map +1 -0
- package/components/disclosure-primitive/index.js +57 -0
- package/components/disclosure-primitive/index.js.map +1 -0
- package/components/disclosure-primitive/styles.module.css.js +7 -0
- package/components/disclosure-primitive/styles.module.css.js.map +1 -0
- package/components/disclosure-primitive/use-disclosure-primitive.js +17 -0
- package/components/disclosure-primitive/use-disclosure-primitive.js.map +1 -0
- package/components/dismiss-button/index.js +22 -0
- package/components/dismiss-button/index.js.map +1 -0
- package/components/dismiss-button/styles.module.scss.js +7 -0
- package/components/dismiss-button/styles.module.scss.js.map +1 -0
- package/components/dropdown/index.js +79 -0
- package/components/dropdown/index.js.map +1 -0
- package/components/dropdown/list-item/custom.js +9 -0
- package/components/dropdown/list-item/custom.js.map +1 -0
- package/components/dropdown/list-item/index.js +14 -0
- package/components/dropdown/list-item/index.js.map +1 -0
- package/components/dropdown/list-item/interactive.js +49 -0
- package/components/dropdown/list-item/interactive.js.map +1 -0
- package/components/dropdown/list-item/separator.js +17 -0
- package/components/dropdown/list-item/separator.js.map +1 -0
- package/components/dropdown/list-item/styles.module.css.js +26 -0
- package/components/dropdown/list-item/styles.module.css.js.map +1 -0
- package/components/dropdown/list-item/title.js +9 -0
- package/components/dropdown/list-item/title.js.map +1 -0
- package/components/dropdown/styles.module.css.js +24 -0
- package/components/dropdown/styles.module.css.js.map +1 -0
- package/components/dropdown/toggle-button/index.js +54 -0
- package/components/dropdown/toggle-button/index.js.map +1 -0
- package/components/dropdown/toggle-button/styles.module.scss.js +14 -0
- package/components/dropdown/toggle-button/styles.module.scss.js.map +1 -0
- package/components/flight-icon/flight-icon.module.css.js +12 -0
- package/components/flight-icon/flight-icon.module.css.js.map +1 -0
- package/components/flight-icon/index.js +58 -0
- package/components/flight-icon/index.js.map +1 -0
- package/components/form/checkbox/form-checkbox.module.css.js +8 -0
- package/components/form/checkbox/form-checkbox.module.css.js.map +1 -0
- package/components/form/checkbox/index.js +109 -0
- package/components/form/checkbox/index.js.map +1 -0
- package/components/form/error/form-error.module.css.js +14 -0
- package/components/form/error/form-error.module.css.js.map +1 -0
- package/components/form/error/index.js +22 -0
- package/components/form/error/index.js.map +1 -0
- package/components/form/field/form-field.module.css.js +17 -0
- package/components/form/field/form-field.module.css.js.map +1 -0
- package/components/form/field/index.js +46 -0
- package/components/form/field/index.js.map +1 -0
- package/components/form/fieldset/form-fieldset.module.css.js +19 -0
- package/components/form/fieldset/form-fieldset.module.css.js.map +1 -0
- package/components/form/fieldset/index.d.ts +1 -2
- package/components/form/fieldset/index.js +65 -0
- package/components/form/fieldset/index.js.map +1 -0
- package/components/form/file-input/form-file-input.module.scss +2 -2
- package/components/form/file-input/form-file-input.module.scss.js +7 -0
- package/components/form/file-input/form-file-input.module.scss.js.map +1 -0
- package/components/form/file-input/index.js +68 -0
- package/components/form/file-input/index.js.map +1 -0
- package/components/form/helper-text/form-helper-text.module.css.js +7 -0
- package/components/form/helper-text/form-helper-text.module.css.js.map +1 -0
- package/components/form/helper-text/index.js +22 -0
- package/components/form/helper-text/index.js.map +1 -0
- package/components/form/indicator/form-indicator.module.css.js +8 -0
- package/components/form/indicator/form-indicator.module.css.js.map +1 -0
- package/components/form/indicator/index.js +23 -0
- package/components/form/indicator/index.js.map +1 -0
- package/components/form/label/form-label.module.css.js +10 -0
- package/components/form/label/form-label.module.css.js.map +1 -0
- package/components/form/label/index.js +33 -0
- package/components/form/label/index.js.map +1 -0
- package/components/form/legend/form-legend.module.css.js +10 -0
- package/components/form/legend/form-legend.module.css.js.map +1 -0
- package/components/form/legend/index.js +19 -0
- package/components/form/legend/index.js.map +1 -0
- package/components/form/radio/form-radio.module.scss.js +8 -0
- package/components/form/radio/form-radio.module.scss.js.map +1 -0
- package/components/form/radio/index.d.ts +3 -5
- package/components/form/radio/index.js +100 -0
- package/components/form/radio/index.js.map +1 -0
- package/components/form/radio-card/RadioCardStory.css +21 -0
- package/components/form/radio-card/description.js +10 -0
- package/components/form/radio-card/description.js.map +1 -0
- package/components/form/radio-card/form-radio-card.module.css.js +30 -0
- package/components/form/radio-card/form-radio-card.module.css.js.map +1 -0
- package/components/form/radio-card/group.js +31 -0
- package/components/form/radio-card/group.js.map +1 -0
- package/components/form/radio-card/index.js +67 -0
- package/components/form/radio-card/index.js.map +1 -0
- package/components/form/radio-card/label.js +10 -0
- package/components/form/radio-card/label.js.map +1 -0
- package/components/form/select/form-select.module.css.js +14 -0
- package/components/form/select/form-select.module.css.js.map +1 -0
- package/components/form/select/index.js +79 -0
- package/components/form/select/index.js.map +1 -0
- package/components/form/super-select/form-super-select.module.css.js +22 -0
- package/components/form/super-select/form-super-select.module.css.js.map +1 -0
- package/components/form/super-select/index.js +170 -0
- package/components/form/super-select/index.js.map +1 -0
- package/components/form/text-input/index.js +91 -0
- package/components/form/text-input/index.js.map +1 -0
- package/components/form/text-input/styles.module.css.js +15 -0
- package/components/form/text-input/styles.module.css.js.map +1 -0
- package/components/form/textarea/form-textarea.module.css.js +14 -0
- package/components/form/textarea/form-textarea.module.css.js.map +1 -0
- package/components/form/textarea/index.js +74 -0
- package/components/form/textarea/index.js.map +1 -0
- package/components/form/toggle/form-toggle.module.scss.js +12 -0
- package/components/form/toggle/form-toggle.module.scss.js.map +1 -0
- package/components/form/toggle/index.js +102 -0
- package/components/form/toggle/index.js.map +1 -0
- package/components/hds/wrappers/tooltip.js +51 -0
- package/components/hds/wrappers/tooltip.js.map +1 -0
- package/components/icon-tile/index.js +50 -0
- package/components/icon-tile/index.js.map +1 -0
- package/components/icon-tile/style.module.scss +12 -10
- package/components/icon-tile/style.module.scss.js +29 -0
- package/components/icon-tile/style.module.scss.js.map +1 -0
- package/components/index.d.ts +1 -1
- package/components/index.js +116 -73
- package/components/index.js.map +1 -1
- package/components/inline-link/index.js +34 -0
- package/components/inline-link/index.js.map +1 -0
- package/components/inline-link/inline-link.module.css.js +11 -0
- package/components/inline-link/inline-link.module.css.js.map +1 -0
- package/components/interactive/index.js +59 -0
- package/components/interactive/index.js.map +1 -0
- package/components/legacy-button/index.js +65 -0
- package/components/legacy-button/index.js.map +1 -0
- package/components/legacy-button/utils.js +39 -0
- package/components/legacy-button/utils.js.map +1 -0
- package/components/menu-primitive/index.js +68 -0
- package/components/menu-primitive/index.js.map +1 -0
- package/components/menu-primitive/styles.module.css.js +12 -0
- package/components/menu-primitive/styles.module.css.js.map +1 -0
- package/components/menu-primitive/use-menu-primitive.js +17 -0
- package/components/menu-primitive/use-menu-primitive.js.map +1 -0
- package/components/modal/index.js +61 -0
- package/components/modal/index.js.map +1 -0
- package/components/modal/modal.module.css +5 -0
- package/components/modal/modal.module.css.js +8 -0
- package/components/modal/modal.module.css.js.map +1 -0
- package/components/modal/use-modal.js +17 -0
- package/components/modal/use-modal.js.map +1 -0
- package/components/separator/index.js +15 -0
- package/components/separator/index.js.map +1 -0
- package/components/separator/separator.module.css.js +10 -0
- package/components/separator/separator.module.css.js.map +1 -0
- package/components/standalone-link/index.js +54 -0
- package/components/standalone-link/index.js.map +1 -0
- package/components/standalone-link/styles.module.scss.js +17 -0
- package/components/standalone-link/styles.module.scss.js.map +1 -0
- package/components/table/index.js +52 -0
- package/components/table/index.js.map +1 -0
- package/components/table/table.module.scss.js +33 -0
- package/components/table/table.module.scss.js.map +1 -0
- package/components/table/td.js +28 -0
- package/components/table/td.js.map +1 -0
- package/components/table/th-button-tooltip.js +24 -0
- package/components/table/th-button-tooltip.js.map +1 -0
- package/components/table/th.js +43 -0
- package/components/table/th.js.map +1 -0
- package/components/table/tr.js +9 -0
- package/components/table/tr.js.map +1 -0
- package/components/table/utils.js +28 -0
- package/components/table/utils.js.map +1 -0
- package/components/tabs/index.js +115 -0
- package/components/tabs/index.js.map +1 -0
- package/components/tabs/tab-panel.js +35 -0
- package/components/tabs/tab-panel.js.map +1 -0
- package/components/tabs/tab.js +70 -0
- package/components/tabs/tab.js.map +1 -0
- package/components/tabs/tabs.module.scss.js +22 -0
- package/components/tabs/tabs.module.scss.js.map +1 -0
- package/components/tabs/use-tabs-context.js +16 -0
- package/components/tabs/use-tabs-context.js.map +1 -0
- package/components/text/index.js +112 -0
- package/components/text/index.js.map +1 -0
- package/components/text/style.module.scss.js +9 -0
- package/components/text/style.module.scss.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js +62 -0
- package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js +20 -0
- package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/index.js +104 -0
- package/components/visualizations/bar-chart/horizontal-chart/index.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/legend/index.js +13 -0
- package/components/visualizations/bar-chart/horizontal-chart/legend/index.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js +14 -0
- package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js.map +1 -0
- package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js +28 -0
- package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js.map +1 -0
- package/components/visualizations/bar-chart/index.js +37 -0
- package/components/visualizations/bar-chart/index.js.map +1 -0
- package/components/visualizations/bar-chart/style.module.css.js +12 -0
- package/components/visualizations/bar-chart/style.module.css.js.map +1 -0
- package/components/visualizations/donut-chart/components/arc-tooltip/index.js +14 -0
- package/components/visualizations/donut-chart/components/arc-tooltip/index.js.map +1 -0
- package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js +10 -0
- package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js.map +1 -0
- package/components/visualizations/donut-chart/components/external-arc-label/index.js +58 -0
- package/components/visualizations/donut-chart/components/external-arc-label/index.js.map +1 -0
- package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js +16 -0
- package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js.map +1 -0
- package/components/visualizations/donut-chart/components/internal-arc-label/index.js +42 -0
- package/components/visualizations/donut-chart/components/internal-arc-label/index.js.map +1 -0
- package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js +14 -0
- package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js.map +1 -0
- package/components/visualizations/donut-chart/index.js +90 -0
- package/components/visualizations/donut-chart/index.js.map +1 -0
- package/components/visualizations/donut-chart/styles.module.css.js +20 -0
- package/components/visualizations/donut-chart/styles.module.css.js.map +1 -0
- package/hooks/use-media-query/index.js +16 -0
- package/hooks/use-media-query/index.js.map +1 -0
- package/index.js +155 -101
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/patterns/card/newsroom-card/index.js +26 -0
- package/patterns/card/newsroom-card/index.js.map +1 -0
- package/patterns/card/newsroom-card/style.module.css.js +8 -0
- package/patterns/card/newsroom-card/style.module.css.js.map +1 -0
- package/patterns/card/partner-card/index.js +42 -0
- package/patterns/card/partner-card/index.js.map +1 -0
- package/patterns/card/partner-card/style.module.css.js +12 -0
- package/patterns/card/partner-card/style.module.css.js.map +1 -0
- package/patterns/card/person-card/index.js +54 -0
- package/patterns/card/person-card/index.js.map +1 -0
- package/patterns/card/person-card/style.module.css.js +12 -0
- package/patterns/card/person-card/style.module.css.js.map +1 -0
- package/patterns/card/primitives.js +77 -0
- package/patterns/card/primitives.js.map +1 -0
- package/patterns/card/promo-card/index.js +36 -0
- package/patterns/card/promo-card/index.js.map +1 -0
- package/patterns/card/resource-card/index.js +26 -0
- package/patterns/card/resource-card/index.js.map +1 -0
- package/patterns/card/style.module.css.js +30 -0
- package/patterns/card/style.module.css.js.map +1 -0
- package/patterns/card/thumbnails/index.js +25 -0
- package/patterns/card/thumbnails/index.js.map +1 -0
- package/patterns/card/unified-card/index.js +37 -0
- package/patterns/card/unified-card/index.js.map +1 -0
- package/patterns/copy-button/clipboard.js +78 -0
- package/patterns/copy-button/clipboard.js.map +1 -0
- package/patterns/copy-button/index.js +57 -0
- package/patterns/copy-button/index.js.map +1 -0
- package/patterns/copy-button/style.module.css.js +13 -0
- package/patterns/copy-button/style.module.css.js.map +1 -0
- package/patterns/index.js +32 -22
- package/patterns/index.js.map +1 -1
- package/patterns/layout/index.js +47 -0
- package/patterns/layout/index.js.map +1 -0
- package/patterns/layout/layout.module.css.js +20 -0
- package/patterns/layout/layout.module.css.js.map +1 -0
- package/patterns/product-badge/index.js +22 -0
- package/patterns/product-badge/index.js.map +1 -0
- package/patterns/product-badge/style.module.css.js +8 -0
- package/patterns/product-badge/style.module.css.js.map +1 -0
- package/patterns/product-logo/index.js +130 -0
- package/patterns/product-logo/index.js.map +1 -0
- package/patterns/product-logo/product-logo.module.css.js +13 -0
- package/patterns/product-logo/product-logo.module.css.js.map +1 -0
- package/patterns/related-content/index.js +65 -0
- package/patterns/related-content/index.js.map +1 -0
- package/patterns/related-content/style.module.css.js +22 -0
- package/patterns/related-content/style.module.css.js.map +1 -0
- package/style.css +1 -1
- package/utils/get-contrast-yiq.js +13 -0
- package/utils/get-contrast-yiq.js.map +1 -0
- package/utils/hooks/use-screen-size.js +10 -0
- package/utils/hooks/use-screen-size.js.map +1 -0
- package/utils/i18n/constants/index.js +98 -0
- package/utils/i18n/constants/index.js.map +1 -0
- package/utils/i18n/helpers/locale-provider.js +9 -0
- package/utils/i18n/helpers/locale-provider.js.map +1 -0
- package/utils/i18n/helpers/to-smart-sentence-case.js +12 -0
- package/utils/i18n/helpers/to-smart-sentence-case.js.map +1 -0
- package/utils/i18n/helpers/to-smart-title-case.js +10 -0
- package/utils/i18n/helpers/to-smart-title-case.js.map +1 -0
- package/utils/i18n/helpers/use-locale.js +14 -0
- package/utils/i18n/helpers/use-locale.js.map +1 -0
- package/utils/i18n/index.js +41 -0
- package/utils/i18n/index.js.map +1 -0
- package/utils/i18n/index2.js +33 -0
- package/utils/i18n/index2.js.map +1 -0
- package/utils/index.js +7 -7
- package/utils/make-normalizer/index.js +34 -0
- package/utils/make-normalizer/index.js.map +1 -0
- package/{index-DBjAbGt7.js → utils/mds-context/index.js} +20 -19
- package/utils/mds-context/index.js.map +1 -0
- package/index-B9mPJh9w.js +0 -579
- package/index-B9mPJh9w.js.map +0 -1
- package/index-BHBlMMNF.js +0 -16
- package/index-BHBlMMNF.js.map +0 -1
- package/index-C4GBbW3N.js +0 -3567
- package/index-C4GBbW3N.js.map +0 -1
- package/index-DBjAbGt7.js.map +0 -1
- package/index-WkGIywHj.js +0 -767
- package/index-WkGIywHj.js.map +0 -1
- package/use-screen-size-BOnkX_K-.js +0 -9
- package/use-screen-size-BOnkX_K-.js.map +0 -1
package/index-WkGIywHj.js
DELETED
|
@@ -1,767 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as _, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { useId as M, createElement as T, forwardRef as v, useState as X, useRef as q } from "react";
|
|
3
|
-
import { u as H, a as J } from "./index-DBjAbGt7.js";
|
|
4
|
-
import g from "classnames";
|
|
5
|
-
import { IconArrowRight24 as Y } from "@hashicorp/flight-icons/svg-react/arrow-right-24";
|
|
6
|
-
import x from "@hashicorp/flight-icons/svg-sprite/svg-sprite.svg";
|
|
7
|
-
const Q = "loading__-Ng-b", V = "running__6uXP5", E = {
|
|
8
|
-
"flight-icon": "flight-icon__f6lPO",
|
|
9
|
-
"display-inline": "display-inline__ItStG",
|
|
10
|
-
loading: Q,
|
|
11
|
-
running: V
|
|
12
|
-
}, sr = [12, 16, 24, 32], oo = {
|
|
13
|
-
12: 16,
|
|
14
|
-
16: 16,
|
|
15
|
-
24: 24,
|
|
16
|
-
32: 24
|
|
17
|
-
}, D = typeof x == "string" ? x : x.src, k = ({
|
|
18
|
-
name: o,
|
|
19
|
-
color: r = "currentColor",
|
|
20
|
-
size: e = 16,
|
|
21
|
-
stretched: s = !1,
|
|
22
|
-
isInlineBlock: n = !0,
|
|
23
|
-
title: a,
|
|
24
|
-
className: i,
|
|
25
|
-
...c
|
|
26
|
-
}) => {
|
|
27
|
-
const l = M(), u = M(), d = oo[e];
|
|
28
|
-
return /* @__PURE__ */ t(
|
|
29
|
-
"svg",
|
|
30
|
-
{
|
|
31
|
-
className: g(
|
|
32
|
-
E["flight-icon"],
|
|
33
|
-
`flight-icon-${o}`,
|
|
34
|
-
{
|
|
35
|
-
[E["display-inline"]]: n && !s,
|
|
36
|
-
[E.loading]: o === "loading",
|
|
37
|
-
[E.running]: o === "running"
|
|
38
|
-
},
|
|
39
|
-
i
|
|
40
|
-
),
|
|
41
|
-
...c,
|
|
42
|
-
"aria-hidden": a ? "false" : "true",
|
|
43
|
-
"aria-labelledby": a ? u : void 0,
|
|
44
|
-
fill: r,
|
|
45
|
-
id: l,
|
|
46
|
-
role: a ? "img" : void 0,
|
|
47
|
-
width: s ? "100%" : e,
|
|
48
|
-
height: s ? "100%" : e,
|
|
49
|
-
viewBox: `0 0 ${d} ${d}`,
|
|
50
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
-
children: a ? /* @__PURE__ */ _($, { children: [
|
|
52
|
-
/* @__PURE__ */ t("title", { id: u, children: a }),
|
|
53
|
-
/* @__PURE__ */ t("g", { role: "presentation", children: /* @__PURE__ */ t("use", { href: `${D}#flight-${o}-${d}` }) })
|
|
54
|
-
] }) : /* @__PURE__ */ t("use", { href: `${D}#flight-${o}-${d}` })
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
k.displayName = "FlightIcon";
|
|
59
|
-
const ro = {
|
|
60
|
-
"align-left": "align-left__Twy3l",
|
|
61
|
-
"align-center": "align-center__iK1pm",
|
|
62
|
-
"align-right": "align-right__YgPRT"
|
|
63
|
-
}, eo = [
|
|
64
|
-
"primary",
|
|
65
|
-
"strong",
|
|
66
|
-
"faint",
|
|
67
|
-
"disabled",
|
|
68
|
-
"high-contrast",
|
|
69
|
-
"action",
|
|
70
|
-
"action-hover",
|
|
71
|
-
"action-active",
|
|
72
|
-
"highlight",
|
|
73
|
-
"highlight-on-surface",
|
|
74
|
-
"highlight-high-contrast",
|
|
75
|
-
"success",
|
|
76
|
-
"success-on-surface",
|
|
77
|
-
"success-high-contrast",
|
|
78
|
-
"warning",
|
|
79
|
-
"warning-on-surface",
|
|
80
|
-
"warning-high-contrast",
|
|
81
|
-
"critical",
|
|
82
|
-
"critical-on-surface",
|
|
83
|
-
"critical-high-contrast"
|
|
84
|
-
], ar = ["regular", "medium", "semibold", "bold"];
|
|
85
|
-
function to(o, r) {
|
|
86
|
-
return {
|
|
87
|
-
"hds-body": `mds-typography-legacy-body-${r}`,
|
|
88
|
-
code: `mds-typography-code-${r}`,
|
|
89
|
-
"display-expressive": `mds-typography-display-expressive-${r}`,
|
|
90
|
-
label: "mds-typography-label",
|
|
91
|
-
body: `mds-typography-body-${r}`
|
|
92
|
-
}[o];
|
|
93
|
-
}
|
|
94
|
-
const C = ({
|
|
95
|
-
tag: o,
|
|
96
|
-
group: r,
|
|
97
|
-
size: e = "200",
|
|
98
|
-
weight: s,
|
|
99
|
-
align: n,
|
|
100
|
-
color: a,
|
|
101
|
-
children: i,
|
|
102
|
-
className: c,
|
|
103
|
-
...l
|
|
104
|
-
}) => {
|
|
105
|
-
const u = o ?? "span", d = to(r, e), p = eo.includes(a);
|
|
106
|
-
return /* @__PURE__ */ t(
|
|
107
|
-
u,
|
|
108
|
-
{
|
|
109
|
-
className: g(
|
|
110
|
-
d,
|
|
111
|
-
{
|
|
112
|
-
[ro[`align-${n}`]]: n,
|
|
113
|
-
[`mds-typography-font-weight-${s}`]: s,
|
|
114
|
-
[`mds-foreground-${a}`]: a && p
|
|
115
|
-
},
|
|
116
|
-
c
|
|
117
|
-
),
|
|
118
|
-
style: a && !p ? { color: a } : {},
|
|
119
|
-
...l,
|
|
120
|
-
children: i
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
}, no = ({
|
|
124
|
-
size: o = "300",
|
|
125
|
-
...r
|
|
126
|
-
}) => T(C, {
|
|
127
|
-
...r,
|
|
128
|
-
size: o,
|
|
129
|
-
group: "body"
|
|
130
|
-
}), so = ({
|
|
131
|
-
size: o = "200",
|
|
132
|
-
...r
|
|
133
|
-
}) => T(C, {
|
|
134
|
-
...r,
|
|
135
|
-
size: o,
|
|
136
|
-
group: "display-expressive"
|
|
137
|
-
}), ao = (o) => T(C, {
|
|
138
|
-
...o,
|
|
139
|
-
group: "label"
|
|
140
|
-
}), io = ({
|
|
141
|
-
size: o = "200",
|
|
142
|
-
weight: r = "regular",
|
|
143
|
-
...e
|
|
144
|
-
}) => T(C, {
|
|
145
|
-
...e,
|
|
146
|
-
size: o,
|
|
147
|
-
weight: r,
|
|
148
|
-
group: "hds-body"
|
|
149
|
-
}), co = ({
|
|
150
|
-
size: o = "200",
|
|
151
|
-
weight: r = "regular",
|
|
152
|
-
...e
|
|
153
|
-
}) => T(C, {
|
|
154
|
-
...e,
|
|
155
|
-
size: o,
|
|
156
|
-
weight: r,
|
|
157
|
-
group: "code"
|
|
158
|
-
}), I = {
|
|
159
|
-
Body: no,
|
|
160
|
-
DisplayExpressive: so,
|
|
161
|
-
Label: ao,
|
|
162
|
-
HDSBody: io,
|
|
163
|
-
Code: co
|
|
164
|
-
}, lo = "badge__zns82", uo = "text__WoM4W", w = {
|
|
165
|
-
badge: lo,
|
|
166
|
-
text: uo,
|
|
167
|
-
"size-small": "size-small__8xHdE",
|
|
168
|
-
"size-medium": "size-medium__xqCpO",
|
|
169
|
-
"size-large": "size-large__Pviip",
|
|
170
|
-
"color-neutral": "color-neutral__6Csf4",
|
|
171
|
-
"type-filled": "type-filled__ZaWsu",
|
|
172
|
-
"type-inverted": "type-inverted__A3554",
|
|
173
|
-
"type-outlined": "type-outlined__l0zjH",
|
|
174
|
-
"color-neutral-dark-mode": "color-neutral-dark-mode__C1TO4",
|
|
175
|
-
"color-highlight": "color-highlight__eWwJ5",
|
|
176
|
-
"color-success": "color-success__EuxKz",
|
|
177
|
-
"color-warning": "color-warning__gCbUY",
|
|
178
|
-
"color-critical": "color-critical__hV-l-"
|
|
179
|
-
}, ir = ["small", "medium", "large"], cr = ["filled", "inverted", "outlined"], lr = [
|
|
180
|
-
"neutral",
|
|
181
|
-
"neutral-dark-mode",
|
|
182
|
-
"highlight",
|
|
183
|
-
"success",
|
|
184
|
-
"warning",
|
|
185
|
-
"critical"
|
|
186
|
-
], mo = {
|
|
187
|
-
small: 12,
|
|
188
|
-
medium: 16,
|
|
189
|
-
large: 16
|
|
190
|
-
}, R = ({
|
|
191
|
-
icon: o,
|
|
192
|
-
iconColor: r,
|
|
193
|
-
iconOnly: e,
|
|
194
|
-
text: s,
|
|
195
|
-
size: n = "medium",
|
|
196
|
-
type: a = "filled",
|
|
197
|
-
color: i = "neutral",
|
|
198
|
-
className: c,
|
|
199
|
-
...l
|
|
200
|
-
}) => /* @__PURE__ */ _(
|
|
201
|
-
"div",
|
|
202
|
-
{
|
|
203
|
-
className: g(
|
|
204
|
-
w.badge,
|
|
205
|
-
w[`size-${n}`],
|
|
206
|
-
w[`type-${a}`],
|
|
207
|
-
w[`color-${i}`],
|
|
208
|
-
c
|
|
209
|
-
),
|
|
210
|
-
...l,
|
|
211
|
-
children: [
|
|
212
|
-
o && /* @__PURE__ */ t(k, { name: o, color: r, size: mo[n] }),
|
|
213
|
-
e && o ? /* @__PURE__ */ t("span", { className: "sr-only", children: s }) : /* @__PURE__ */ t("div", { className: w.text, children: s })
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
R.displayName = "Badge";
|
|
218
|
-
const z = v((o, r) => {
|
|
219
|
-
const e = H(), {
|
|
220
|
-
href: s,
|
|
221
|
-
className: n,
|
|
222
|
-
isHrefExternal: a,
|
|
223
|
-
onClick: i,
|
|
224
|
-
children: c,
|
|
225
|
-
locale: l,
|
|
226
|
-
...u
|
|
227
|
-
} = o;
|
|
228
|
-
return s ? /* @__PURE__ */ t(
|
|
229
|
-
e,
|
|
230
|
-
{
|
|
231
|
-
className: n,
|
|
232
|
-
target: a ? "_blank" : void 0,
|
|
233
|
-
rel: a ? "noopener noreferrer" : void 0,
|
|
234
|
-
onClick: i,
|
|
235
|
-
...po(s, l, a),
|
|
236
|
-
...u,
|
|
237
|
-
ref: r,
|
|
238
|
-
children: c
|
|
239
|
-
}
|
|
240
|
-
) : /* @__PURE__ */ t(
|
|
241
|
-
"button",
|
|
242
|
-
{
|
|
243
|
-
type: "button",
|
|
244
|
-
className: n,
|
|
245
|
-
onClick: i,
|
|
246
|
-
...u,
|
|
247
|
-
ref: r,
|
|
248
|
-
children: c
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
});
|
|
252
|
-
z.displayName = "Interactive";
|
|
253
|
-
const po = (o, r, e) => e ? {
|
|
254
|
-
href: o,
|
|
255
|
-
hrefLang: void 0
|
|
256
|
-
} : ["en", "de", "es", "fr", "ja", "ko", "pt", "id"].includes(
|
|
257
|
-
o.substring(1, 3)
|
|
258
|
-
) ? {
|
|
259
|
-
href: o,
|
|
260
|
-
hrefLang: o.substring(1, 3)
|
|
261
|
-
} : o.startsWith("/") && r ? {
|
|
262
|
-
href: `/${r}${o}`,
|
|
263
|
-
hrefLang: r
|
|
264
|
-
} : {
|
|
265
|
-
href: o,
|
|
266
|
-
hrefLang: void 0
|
|
267
|
-
}, go = "text__2B7Ih", N = {
|
|
268
|
-
"standalone-link": "standalone-link__85Pyl",
|
|
269
|
-
"icon-position-leading": "icon-position-leading__KE5kn",
|
|
270
|
-
"icon-position-trailing": "icon-position-trailing__Mygyz",
|
|
271
|
-
text: go,
|
|
272
|
-
"size-small": "size-small__pf7gu",
|
|
273
|
-
"size-medium": "size-medium__r6Rbi",
|
|
274
|
-
"size-large": "size-large__aue6M",
|
|
275
|
-
"color-primary": "color-primary__7WaoM",
|
|
276
|
-
"color-secondary": "color-secondary__4qYkh",
|
|
277
|
-
"color-secondary-inverted": "color-secondary-inverted__ILbsj"
|
|
278
|
-
}, dr = ["small", "medium", "large"], ur = [
|
|
279
|
-
"primary",
|
|
280
|
-
"secondary",
|
|
281
|
-
"secondary-inverted"
|
|
282
|
-
], mr = ["leading", "trailing"], L = v(
|
|
283
|
-
({
|
|
284
|
-
text: o,
|
|
285
|
-
size: r = "medium",
|
|
286
|
-
color: e = "primary",
|
|
287
|
-
icon: s,
|
|
288
|
-
iconPosition: n = "leading",
|
|
289
|
-
className: a,
|
|
290
|
-
"data-testid": i,
|
|
291
|
-
locale: c,
|
|
292
|
-
...l
|
|
293
|
-
}, u) => {
|
|
294
|
-
const d = s && /* @__PURE__ */ t(k, { name: s, size: 16 });
|
|
295
|
-
return /* @__PURE__ */ _(
|
|
296
|
-
z,
|
|
297
|
-
{
|
|
298
|
-
...l,
|
|
299
|
-
ref: u,
|
|
300
|
-
className: g(
|
|
301
|
-
N["standalone-link"],
|
|
302
|
-
N[`size-${r}`],
|
|
303
|
-
N[`color-${e}`],
|
|
304
|
-
N[`icon-position-${n}`],
|
|
305
|
-
a
|
|
306
|
-
),
|
|
307
|
-
"data-testid": i,
|
|
308
|
-
locale: c,
|
|
309
|
-
children: [
|
|
310
|
-
d && n === "leading" && d,
|
|
311
|
-
/* @__PURE__ */ t("span", { className: N.text, children: o }),
|
|
312
|
-
d && n === "trailing" && d
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
);
|
|
318
|
-
L.displayName = "StandaloneLink";
|
|
319
|
-
const _o = "button__gOWvd", yo = "text__KbKvH", f = {
|
|
320
|
-
button: _o,
|
|
321
|
-
"width-full": "width-full__juTUO",
|
|
322
|
-
text: yo,
|
|
323
|
-
"color-primary": "color-primary__rWbwp",
|
|
324
|
-
"color-secondary": "color-secondary__-5Q4d",
|
|
325
|
-
"color-tertiary": "color-tertiary__rw4Ww",
|
|
326
|
-
"color-critical": "color-critical__-8hXs",
|
|
327
|
-
"color-primary-white": "color-primary-white__2JDoz",
|
|
328
|
-
"color-primary-black": "color-primary-black__zTF4n",
|
|
329
|
-
"color-secondary-white": "color-secondary-white__AseI0",
|
|
330
|
-
"color-secondary-black": "color-secondary-black__b-umt",
|
|
331
|
-
"color-secondary-high-contrast": "color-secondary-high-contrast__3bxg3",
|
|
332
|
-
"color-boundary": "color-boundary__xJtzy",
|
|
333
|
-
"color-consul": "color-consul__5lFsa",
|
|
334
|
-
"color-nomad": "color-nomad__HGWXf",
|
|
335
|
-
"color-packer": "color-packer__vbRu0",
|
|
336
|
-
"color-terraform": "color-terraform__DQMD5",
|
|
337
|
-
"color-vagrant": "color-vagrant__iNokw",
|
|
338
|
-
"color-vault": "color-vault__Q6Qbm",
|
|
339
|
-
"color-waypoint": "color-waypoint__8j-Oi",
|
|
340
|
-
"size-small": "size-small__kT0Jp",
|
|
341
|
-
"icon-only": "icon-only__5c-is",
|
|
342
|
-
"size-medium": "size-medium__HxMcm",
|
|
343
|
-
"size-large": "size-large__MEpK3"
|
|
344
|
-
}, pr = ["small", "medium", "large"], gr = ["leading", "trailing"], _r = [
|
|
345
|
-
"primary",
|
|
346
|
-
"primary-black",
|
|
347
|
-
"primary-white",
|
|
348
|
-
"secondary",
|
|
349
|
-
// deprecated; maps to secondary-white
|
|
350
|
-
"secondary-high-contrast",
|
|
351
|
-
// alternates based on theme
|
|
352
|
-
"secondary-white",
|
|
353
|
-
"secondary-black",
|
|
354
|
-
"tertiary",
|
|
355
|
-
"critical",
|
|
356
|
-
"boundary",
|
|
357
|
-
"consul",
|
|
358
|
-
"nomad",
|
|
359
|
-
"packer",
|
|
360
|
-
"terraform",
|
|
361
|
-
"vagrant",
|
|
362
|
-
"vault",
|
|
363
|
-
"waypoint",
|
|
364
|
-
"hashicorp"
|
|
365
|
-
// alias to primary
|
|
366
|
-
], ho = {
|
|
367
|
-
primary: "primary",
|
|
368
|
-
"primary-black": "custom",
|
|
369
|
-
"primary-white": "custom",
|
|
370
|
-
secondary: "custom",
|
|
371
|
-
"secondary-high-contrast": "custom",
|
|
372
|
-
"secondary-white": "custom",
|
|
373
|
-
"secondary-black": "custom",
|
|
374
|
-
tertiary: "tertiary",
|
|
375
|
-
critical: "critical",
|
|
376
|
-
boundary: "custom",
|
|
377
|
-
consul: "custom",
|
|
378
|
-
nomad: "custom",
|
|
379
|
-
packer: "custom",
|
|
380
|
-
terraform: "custom",
|
|
381
|
-
vagrant: "custom",
|
|
382
|
-
vault: "custom",
|
|
383
|
-
waypoint: "custom",
|
|
384
|
-
hashicorp: "primary"
|
|
385
|
-
}, fo = {
|
|
386
|
-
small: 12,
|
|
387
|
-
medium: 16,
|
|
388
|
-
large: 24
|
|
389
|
-
}, F = v(
|
|
390
|
-
({
|
|
391
|
-
size: o = "medium",
|
|
392
|
-
color: r = "primary",
|
|
393
|
-
isFullWidth: e,
|
|
394
|
-
isIconOnly: s,
|
|
395
|
-
icon: n,
|
|
396
|
-
iconPosition: a = "leading",
|
|
397
|
-
text: i,
|
|
398
|
-
href: c,
|
|
399
|
-
isHrefExternal: l,
|
|
400
|
-
className: u,
|
|
401
|
-
locale: d,
|
|
402
|
-
...p
|
|
403
|
-
}, y) => {
|
|
404
|
-
const h = s && !!n, b = n && /* @__PURE__ */ t(k, { name: n, size: fo[o] });
|
|
405
|
-
return /* @__PURE__ */ t(
|
|
406
|
-
z,
|
|
407
|
-
{
|
|
408
|
-
className: g(
|
|
409
|
-
f.button,
|
|
410
|
-
f[`size-${o}`],
|
|
411
|
-
{
|
|
412
|
-
[f["width-full"]]: e,
|
|
413
|
-
[f["icon-only"]]: h
|
|
414
|
-
},
|
|
415
|
-
r !== "custom" && f[`color-${r}`],
|
|
416
|
-
u
|
|
417
|
-
),
|
|
418
|
-
href: p.disabled ? "" : c,
|
|
419
|
-
isHrefExternal: l,
|
|
420
|
-
"aria-label": h ? i : void 0,
|
|
421
|
-
locale: d,
|
|
422
|
-
...p,
|
|
423
|
-
ref: y,
|
|
424
|
-
children: h && n ? b : /* @__PURE__ */ _($, { children: [
|
|
425
|
-
n && a === "leading" && b,
|
|
426
|
-
/* @__PURE__ */ t("div", { className: f.text, children: i }),
|
|
427
|
-
n && a === "trailing" && b
|
|
428
|
-
] })
|
|
429
|
-
}
|
|
430
|
-
);
|
|
431
|
-
}
|
|
432
|
-
);
|
|
433
|
-
F.displayName = "ButtonPrimitive";
|
|
434
|
-
const U = v(({ color: o = "primary", className: r, ...e }, s) => {
|
|
435
|
-
const n = ho[o], i = n === "custom" ? f[`color-${{
|
|
436
|
-
hashicorp: "primary",
|
|
437
|
-
secondary: "secondary-white"
|
|
438
|
-
}[o] ?? o}`] : void 0;
|
|
439
|
-
return /* @__PURE__ */ t(
|
|
440
|
-
F,
|
|
441
|
-
{
|
|
442
|
-
...e,
|
|
443
|
-
color: n,
|
|
444
|
-
className: g(i, r),
|
|
445
|
-
ref: s
|
|
446
|
-
}
|
|
447
|
-
);
|
|
448
|
-
});
|
|
449
|
-
U.displayName = "Button";
|
|
450
|
-
const bo = "thumbnail__f0mUs", wo = {
|
|
451
|
-
thumbnail: bo
|
|
452
|
-
}, No = ({
|
|
453
|
-
alt: o,
|
|
454
|
-
aspectRatio: r,
|
|
455
|
-
src: e
|
|
456
|
-
}) => {
|
|
457
|
-
const s = J();
|
|
458
|
-
return e ? /* @__PURE__ */ t(
|
|
459
|
-
"div",
|
|
460
|
-
{
|
|
461
|
-
className: wo.thumbnail,
|
|
462
|
-
style: { "--aspect-ratio": r },
|
|
463
|
-
children: /* @__PURE__ */ t(s, { fill: !0, alt: o, src: e })
|
|
464
|
-
}
|
|
465
|
-
) : null;
|
|
466
|
-
}, To = "card__HomZw", vo = "interactive__Irpce", Co = "arrow__qnBL7", So = "link__Dz3Nf", Eo = "cta__UfNG2", ko = "content__SiycH", Io = "subheading__MM0J8", Oo = "contentLockup__08EYi", xo = "badges__GrCpe", Lo = "meta__8eKyE", $o = "metaSeparator__44API", m = {
|
|
467
|
-
card: To,
|
|
468
|
-
interactive: vo,
|
|
469
|
-
arrow: Co,
|
|
470
|
-
link: So,
|
|
471
|
-
cta: Eo,
|
|
472
|
-
content: ko,
|
|
473
|
-
"has-thumbnail": "has-thumbnail__ftF14",
|
|
474
|
-
subheading: Io,
|
|
475
|
-
contentLockup: Oo,
|
|
476
|
-
badges: xo,
|
|
477
|
-
meta: Lo,
|
|
478
|
-
metaSeparator: $o
|
|
479
|
-
}, W = v(
|
|
480
|
-
({
|
|
481
|
-
children: o,
|
|
482
|
-
className: r,
|
|
483
|
-
content: e,
|
|
484
|
-
ctaLabel: s,
|
|
485
|
-
href: n,
|
|
486
|
-
standaloneLink: a,
|
|
487
|
-
isExternal: i,
|
|
488
|
-
onClickCapture: c,
|
|
489
|
-
"aria-label": l
|
|
490
|
-
}, u) => {
|
|
491
|
-
const d = H(), p = n && !s, y = i ? { target: "_blank", rel: "noopener noreferrer" } : {};
|
|
492
|
-
return /* @__PURE__ */ _(
|
|
493
|
-
"div",
|
|
494
|
-
{
|
|
495
|
-
ref: u,
|
|
496
|
-
className: g(
|
|
497
|
-
m.card,
|
|
498
|
-
{ [m.interactive]: p },
|
|
499
|
-
r
|
|
500
|
-
),
|
|
501
|
-
children: [
|
|
502
|
-
p && /* @__PURE__ */ t(
|
|
503
|
-
d,
|
|
504
|
-
{
|
|
505
|
-
href: n,
|
|
506
|
-
className: m.link,
|
|
507
|
-
draggable: "false",
|
|
508
|
-
onClickCapture: c,
|
|
509
|
-
"aria-label": l,
|
|
510
|
-
...y
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
e && /* @__PURE__ */ t(
|
|
514
|
-
zo,
|
|
515
|
-
{
|
|
516
|
-
badges: e.badges,
|
|
517
|
-
description: e.description,
|
|
518
|
-
eyebrow: e.eyebrow,
|
|
519
|
-
heading: e.heading,
|
|
520
|
-
subheading: e.subheading,
|
|
521
|
-
thumbnail: e.thumbnail,
|
|
522
|
-
showArrow: e.showArrow && !!p,
|
|
523
|
-
cta: {
|
|
524
|
-
ctaLabel: s,
|
|
525
|
-
href: n,
|
|
526
|
-
standaloneLink: a,
|
|
527
|
-
onClickCapture: c,
|
|
528
|
-
isExternal: i
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
),
|
|
532
|
-
o,
|
|
533
|
-
o && /* @__PURE__ */ t(
|
|
534
|
-
K,
|
|
535
|
-
{
|
|
536
|
-
ctaLabel: s,
|
|
537
|
-
href: n,
|
|
538
|
-
standaloneLink: a,
|
|
539
|
-
onClickCapture: c,
|
|
540
|
-
isExternal: i
|
|
541
|
-
}
|
|
542
|
-
)
|
|
543
|
-
]
|
|
544
|
-
}
|
|
545
|
-
);
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
W.displayName = "Card";
|
|
549
|
-
const zo = ({
|
|
550
|
-
badges: o,
|
|
551
|
-
description: r,
|
|
552
|
-
eyebrow: e,
|
|
553
|
-
heading: s,
|
|
554
|
-
thumbnail: n,
|
|
555
|
-
subheading: a,
|
|
556
|
-
cta: i,
|
|
557
|
-
showArrow: c
|
|
558
|
-
}) => /* @__PURE__ */ _("div", { className: g(m.content, { [m["has-thumbnail"]]: n }), children: [
|
|
559
|
-
n && /* @__PURE__ */ t(No, { ...n }),
|
|
560
|
-
/* @__PURE__ */ _("div", { className: m.contentLockup, children: [
|
|
561
|
-
/* @__PURE__ */ t(Ao, { children: e }),
|
|
562
|
-
/* @__PURE__ */ t(Do, { children: s }),
|
|
563
|
-
/* @__PURE__ */ t(Bo, { children: a }),
|
|
564
|
-
/* @__PURE__ */ t(Po, { children: r }),
|
|
565
|
-
/* @__PURE__ */ t(Ho, { badges: o }),
|
|
566
|
-
i && /* @__PURE__ */ t(
|
|
567
|
-
K,
|
|
568
|
-
{
|
|
569
|
-
ctaLabel: i.ctaLabel,
|
|
570
|
-
href: i.href,
|
|
571
|
-
standaloneLink: i.standaloneLink,
|
|
572
|
-
isExternal: i.isExternal,
|
|
573
|
-
onClickCapture: i.onClickCapture
|
|
574
|
-
}
|
|
575
|
-
),
|
|
576
|
-
c ? /* @__PURE__ */ t("div", { className: m.arrow, children: /* @__PURE__ */ t(Y, {}) }) : null
|
|
577
|
-
] })
|
|
578
|
-
] }), K = ({
|
|
579
|
-
href: o,
|
|
580
|
-
ctaLabel: r,
|
|
581
|
-
standaloneLink: e,
|
|
582
|
-
isExternal: s,
|
|
583
|
-
onClickCapture: n
|
|
584
|
-
}) => {
|
|
585
|
-
const a = o && !r;
|
|
586
|
-
if (e) {
|
|
587
|
-
const i = {
|
|
588
|
-
...e,
|
|
589
|
-
icon: e.icon || "chevron-right",
|
|
590
|
-
iconPosition: e.iconPosition || "trailing"
|
|
591
|
-
};
|
|
592
|
-
return /* @__PURE__ */ t(L, { className: m.cta, ...i });
|
|
593
|
-
}
|
|
594
|
-
return o && !a && r ? /* @__PURE__ */ t(
|
|
595
|
-
L,
|
|
596
|
-
{
|
|
597
|
-
className: m.cta,
|
|
598
|
-
text: r,
|
|
599
|
-
href: o,
|
|
600
|
-
icon: "chevron-right",
|
|
601
|
-
iconPosition: "trailing",
|
|
602
|
-
color: "secondary",
|
|
603
|
-
onClickCapture: n,
|
|
604
|
-
isHrefExternal: s
|
|
605
|
-
}
|
|
606
|
-
) : null;
|
|
607
|
-
}, Ao = ({ children: o }) => o ? Array.isArray(o) ? /* @__PURE__ */ t(Mo, { items: Array.from(o) }) : /* @__PURE__ */ t(G, { children: o }) : null, Mo = ({ items: o }) => /* @__PURE__ */ t("ul", { className: m.meta, children: o.map((r, e) => /* @__PURE__ */ _("li", { children: [
|
|
608
|
-
/* @__PURE__ */ t(G, { children: r }),
|
|
609
|
-
e < o.length - 1 ? /* @__PURE__ */ t("span", { className: m.metaSeparator, "aria-hidden": !0, children: "|" }) : null
|
|
610
|
-
] }, r)) }), G = ({ children: o }) => o ? /* @__PURE__ */ t(I.Label, { color: "faint", weight: "medium", children: o }) : null, Do = ({ children: o }) => o ? /* @__PURE__ */ t(
|
|
611
|
-
I.DisplayExpressive,
|
|
612
|
-
{
|
|
613
|
-
tag: "span",
|
|
614
|
-
size: "200",
|
|
615
|
-
weight: "semibold",
|
|
616
|
-
color: "strong",
|
|
617
|
-
children: o
|
|
618
|
-
}
|
|
619
|
-
) : null, Bo = ({ children: o }) => o ? /* @__PURE__ */ t(I.Body, { tag: "span", size: "200", className: m.subheading, color: "primary", children: o }) : null, Po = ({ children: o }) => o ? typeof o == "string" ? /* @__PURE__ */ t(I.Body, { tag: "span", size: "200", color: "primary", children: o }) : /* @__PURE__ */ t($, { children: o }) : null, Ho = ({ badges: o }) => o && o.length > 0 ? /* @__PURE__ */ t("div", { className: m.badges, children: o.map((r) => /* @__PURE__ */ t(R, { ...r }, r.text)) }) : null;
|
|
620
|
-
W.displayName = "Card";
|
|
621
|
-
const Ro = (o) => {
|
|
622
|
-
let r;
|
|
623
|
-
if (o)
|
|
624
|
-
if (typeof o == "string")
|
|
625
|
-
r = o;
|
|
626
|
-
else if (
|
|
627
|
-
// context: https://github.com/hashicorp/design-system/pull/1564
|
|
628
|
-
typeof o == "number" || typeof o == "bigint"
|
|
629
|
-
)
|
|
630
|
-
r = o.toString();
|
|
631
|
-
else
|
|
632
|
-
throw new Error(
|
|
633
|
-
`\`hds-clipboard\` modifier - \`text\` argument must be a string - provided: ${typeof o}`
|
|
634
|
-
);
|
|
635
|
-
return r;
|
|
636
|
-
}, Fo = (o) => {
|
|
637
|
-
let r;
|
|
638
|
-
if (typeof o == "string") {
|
|
639
|
-
if (r = document.querySelector(o), !r) {
|
|
640
|
-
console.error(
|
|
641
|
-
"`hds-clipboard` modifier - `target` selector provided does not point to an existing DOM node, check your selector string",
|
|
642
|
-
r
|
|
643
|
-
);
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
} else if (o instanceof Node && o.nodeType === Node.ELEMENT_NODE)
|
|
647
|
-
r = o;
|
|
648
|
-
else
|
|
649
|
-
throw o instanceof NodeList ? new Error(
|
|
650
|
-
"`hds-clipboard` modifier - `target` argument must be a string or a DOM node - provided: a list of DOM nodes"
|
|
651
|
-
) : new Error(
|
|
652
|
-
`\`hds-clipboard\` modifier - \`target\` argument must be a string or a DOM node - provided: ${typeof o}`
|
|
653
|
-
);
|
|
654
|
-
return r;
|
|
655
|
-
}, Uo = (o) => {
|
|
656
|
-
let r;
|
|
657
|
-
return o instanceof Node && o.nodeType === Node.ELEMENT_NODE && (o instanceof HTMLInputElement || // targetElement.nodeName === 'INPUT' ||
|
|
658
|
-
o instanceof HTMLTextAreaElement || // targetElement.nodeName === 'TEXTAREA' ||
|
|
659
|
-
o instanceof HTMLSelectElement ? r = o.value : r = o.innerText), r;
|
|
660
|
-
}, Wo = async (o) => {
|
|
661
|
-
if (o)
|
|
662
|
-
try {
|
|
663
|
-
return await navigator.clipboard.writeText(o), !0;
|
|
664
|
-
} catch {
|
|
665
|
-
return console.warn(
|
|
666
|
-
"copy action failed, please check your browser‘s permissions",
|
|
667
|
-
{
|
|
668
|
-
id: "hds-clipboard.write-text-to-clipboard.catch-error"
|
|
669
|
-
}
|
|
670
|
-
), !1;
|
|
671
|
-
}
|
|
672
|
-
else
|
|
673
|
-
return !1;
|
|
674
|
-
}, Ko = async (o, r, e) => {
|
|
675
|
-
let s;
|
|
676
|
-
if (e)
|
|
677
|
-
s = e();
|
|
678
|
-
else if (o)
|
|
679
|
-
s = Ro(o);
|
|
680
|
-
else if (r) {
|
|
681
|
-
const a = Fo(r);
|
|
682
|
-
s = Uo(a);
|
|
683
|
-
} else
|
|
684
|
-
throw new Error(
|
|
685
|
-
"`hds-clipboard` modifier - either a `getTextFn`, `text`, or a `target` argument is required"
|
|
686
|
-
);
|
|
687
|
-
return await Wo(s);
|
|
688
|
-
}, Go = (o) => {
|
|
689
|
-
const { text: r, target: e, getTextFn: s, onSuccess: n, onError: a } = o;
|
|
690
|
-
return { onClick: async (c) => {
|
|
691
|
-
const l = c.currentTarget;
|
|
692
|
-
await Ko(r, e, s) ? typeof n == "function" && n({ trigger: l, text: r, target: e }) : typeof a == "function" && a({ trigger: l, text: r, target: e });
|
|
693
|
-
} };
|
|
694
|
-
}, Zo = "idle__1ofXr", jo = "success__9mXCl", Xo = "error__a3l-p", B = {
|
|
695
|
-
"copy-button": "copy-button__uXOTd",
|
|
696
|
-
idle: Zo,
|
|
697
|
-
success: jo,
|
|
698
|
-
error: Xo
|
|
699
|
-
}, qo = "clipboard-copy", Jo = "clipboard-checked", Yo = "clipboard-x", P = "idle", Qo = ({
|
|
700
|
-
size: o = "medium",
|
|
701
|
-
isIconOnly: r = !1,
|
|
702
|
-
isFullWidth: e = !1,
|
|
703
|
-
text: s,
|
|
704
|
-
textToCopy: n,
|
|
705
|
-
getTextFn: a,
|
|
706
|
-
targetToCopy: i,
|
|
707
|
-
onSuccess: c,
|
|
708
|
-
onError: l,
|
|
709
|
-
className: u,
|
|
710
|
-
defaultIcon: d,
|
|
711
|
-
...p
|
|
712
|
-
}) => {
|
|
713
|
-
const [y, S] = X(P), h = q(null), b = y === "idle" ? d || qo : y === "success" ? Jo : Yo, A = () => {
|
|
714
|
-
h.current && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
715
|
-
S(P);
|
|
716
|
-
}, 1500);
|
|
717
|
-
}, Z = (O) => {
|
|
718
|
-
S("success"), A(), c && c(O);
|
|
719
|
-
}, j = (O) => {
|
|
720
|
-
S("error"), A(), l && l(O);
|
|
721
|
-
};
|
|
722
|
-
return /* @__PURE__ */ t(
|
|
723
|
-
U,
|
|
724
|
-
{
|
|
725
|
-
className: g(B["copy-button"], B[y], u),
|
|
726
|
-
size: o,
|
|
727
|
-
isFullWidth: e,
|
|
728
|
-
text: s,
|
|
729
|
-
icon: b,
|
|
730
|
-
isIconOnly: r,
|
|
731
|
-
color: "secondary",
|
|
732
|
-
iconPosition: "trailing",
|
|
733
|
-
...Go({
|
|
734
|
-
text: n,
|
|
735
|
-
getTextFn: a,
|
|
736
|
-
target: i,
|
|
737
|
-
onSuccess: Z,
|
|
738
|
-
onError: j
|
|
739
|
-
}),
|
|
740
|
-
...p
|
|
741
|
-
}
|
|
742
|
-
);
|
|
743
|
-
};
|
|
744
|
-
Qo.displayName = "CopyButton";
|
|
745
|
-
export {
|
|
746
|
-
lr as B,
|
|
747
|
-
W as C,
|
|
748
|
-
sr as F,
|
|
749
|
-
z as I,
|
|
750
|
-
L as S,
|
|
751
|
-
I as T,
|
|
752
|
-
ir as a,
|
|
753
|
-
cr as b,
|
|
754
|
-
R as c,
|
|
755
|
-
U as d,
|
|
756
|
-
_r as e,
|
|
757
|
-
gr as f,
|
|
758
|
-
pr as g,
|
|
759
|
-
k as h,
|
|
760
|
-
ur as i,
|
|
761
|
-
mr as j,
|
|
762
|
-
dr as k,
|
|
763
|
-
eo as l,
|
|
764
|
-
ar as m,
|
|
765
|
-
Qo as n
|
|
766
|
-
};
|
|
767
|
-
//# sourceMappingURL=index-WkGIywHj.js.map
|