@cloudscape-design/components-themeable 3.0.1126 → 3.0.1128
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/app-layout/resize/styles.scss +1 -1
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/drawer/styles.scss +40 -0
- package/lib/internal/scss/app-layout/visual-refresh-toolbar/skeleton/styles.scss +20 -3
- package/lib/internal/scss/input/styles.scss +62 -9
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +99 -86
- package/lib/internal/scss/internal/styles/forms/mixins.scss +42 -19
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +50 -50
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +32 -32
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/resize/styles.css.js +5 -5
- package/lib/internal/template/app-layout/resize/styles.scoped.css +13 -13
- package/lib/internal/template/app-layout/resize/styles.selectors.js +5 -5
- package/lib/internal/template/app-layout/runtime-drawer/index.d.ts +1 -0
- package/lib/internal/template/app-layout/runtime-drawer/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
- package/lib/internal/template/app-layout/utils/use-drawers.d.ts +1 -1
- package/lib/internal/template/app-layout/utils/use-drawers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/utils/use-drawers.js +4 -2
- package/lib/internal/template/app-layout/utils/use-drawers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts +13 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +186 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts +2 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +27 -26
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +110 -76
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +27 -26
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/use-resize.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +15 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.d.ts +2 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js +3 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js +4 -5
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/skeleton-parts.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js +8 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -25
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -52
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -25
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts +20 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +19 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +2 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts +4 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.js +12 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js +0 -17
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js +108 -12
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +33 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js +85 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +3 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts +8 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +34 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts +5 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +14 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js +7 -3
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/after-main-slot.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js +6 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js.map +1 -1
- package/lib/internal/template/attribute-editor/interfaces.d.ts +2 -0
- package/lib/internal/template/attribute-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/interfaces.js.map +1 -1
- package/lib/internal/template/attribute-editor/row.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/row.js +2 -2
- package/lib/internal/template/attribute-editor/row.js.map +1 -1
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/index.js +3 -2
- package/lib/internal/template/autosuggest/index.js.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.d.ts +4 -0
- package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +3 -3
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +256 -256
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/button-dropdown/interfaces.d.ts +3 -1
- package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.js +1 -1
- package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +16 -16
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +27 -27
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +16 -16
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts +2 -2
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.js +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
- package/lib/internal/template/button-group/interfaces.d.ts +4 -1
- package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-group/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +11 -11
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +18 -5
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.d.ts +2 -1
- package/lib/internal/template/date-range-picker/dropdown.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.js +2 -2
- package/lib/internal/template/date-range-picker/dropdown.js.map +1 -1
- package/lib/internal/template/date-range-picker/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/index.js +2 -2
- package/lib/internal/template/date-range-picker/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +6 -0
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/relative-range/index.d.ts +2 -1
- package/lib/internal/template/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/relative-range/index.js +4 -1
- package/lib/internal/template/date-range-picker/relative-range/index.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +187 -187
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +73 -73
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/input/index.d.ts.map +1 -1
- package/lib/internal/template/input/index.js +3 -2
- package/lib/internal/template/input/index.js.map +1 -1
- package/lib/internal/template/input/interfaces.d.ts +48 -0
- package/lib/internal/template/input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/input/interfaces.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +3 -2
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +13 -13
- package/lib/internal/template/input/styles.d.ts +3 -0
- package/lib/internal/template/input/styles.d.ts.map +1 -0
- package/lib/internal/template/input/styles.js +42 -0
- package/lib/internal/template/input/styles.js.map +1 -0
- package/lib/internal/template/input/styles.scoped.css +66 -49
- package/lib/internal/template/input/styles.selectors.js +13 -13
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +1 -0
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js +5 -2
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/lib/internal/template/internal/analytics/interfaces.d.ts +1 -0
- package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +30 -7
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +20 -20
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +38 -38
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +13 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +98 -85
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +0 -4
- package/lib/internal/template/internal/generated/styles/tokens.js +0 -4
- package/lib/internal/template/internal/generated/theming/index.cjs +0 -84
- package/lib/internal/template/internal/generated/theming/index.js +0 -84
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget/index.d.ts +6 -1
- package/lib/internal/template/internal/plugins/widget/index.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/index.js +11 -1
- package/lib/internal/template/internal/plugins/widget/index.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts +2 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts +1 -1
- package/lib/internal/template/internal/plugins/widget.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget.js +1 -1
- package/lib/internal/template/internal/plugins/widget.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +103 -103
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/popover/container.d.ts.map +1 -1
- package/lib/internal/template/popover/container.js +2 -5
- package/lib/internal/template/popover/container.js.map +1 -1
- package/lib/internal/template/popover/use-position-observer.d.ts +1 -2
- package/lib/internal/template/popover/use-position-observer.d.ts.map +1 -1
- package/lib/internal/template/popover/use-position-observer.js +10 -8
- package/lib/internal/template/popover/use-position-observer.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +10 -10
- package/lib/internal/template/radio-group/styles.scoped.css +22 -22
- package/lib/internal/template/radio-group/styles.selectors.js +10 -10
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.d.ts +4 -0
- package/lib/internal/template/side-navigation/interfaces.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/parts.js +4 -1
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +86 -86
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/test-utils/dom/multiselect/index.d.ts +8 -0
- package/lib/internal/template/test-utils/dom/multiselect/index.js +18 -4
- package/lib/internal/template/test-utils/dom/multiselect/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/multiselect/index.d.ts +8 -0
- package/lib/internal/template/test-utils/selectors/multiselect/index.js +18 -4
- package/lib/internal/template/test-utils/selectors/multiselect/index.js.map +1 -1
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +23 -23
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/toggle-button/internal.d.ts +1 -0
- package/lib/internal/template/toggle-button/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle-button/internal.js +2 -2
- package/lib/internal/template/toggle-button/internal.js.map +1 -1
- package/lib/internal/template/top-navigation/interfaces.d.ts +1 -1
- package/lib/internal/template/top-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/top-navigation/internal.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/internal.js +0 -9
- package/lib/internal/template/top-navigation/internal.js.map +1 -1
- package/lib/internal/template/top-navigation/parts/utility.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/parts/utility.js +1 -15
- package/lib/internal/template/top-navigation/parts/utility.js.map +1 -1
- package/lib/internal/template/wizard/index.d.ts.map +1 -1
- package/lib/internal/template/wizard/index.js +2 -1
- package/lib/internal/template/wizard/index.js.map +1 -1
- package/package.json +1 -1
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js
CHANGED
|
@@ -16,7 +16,7 @@ export const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, app
|
|
|
16
16
|
if (!isWidgetReady(appLayoutState)) {
|
|
17
17
|
return (React.createElement(BeforeMainSlotSkeleton, { toolbarProps: toolbarProps, appLayoutProps: appLayoutProps, appLayoutState: appLayoutState }));
|
|
18
18
|
}
|
|
19
|
-
const { activeDrawer, navigationOpen, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, } = appLayoutState.widgetizedState;
|
|
19
|
+
const { activeDrawer, navigationOpen, navigation, expandedDrawerId, setExpandedDrawerId, navigationAnimationDisabled, activeAiDrawerId, aiDrawerExpandedMode, aiDrawer, activeAiDrawerSize, minAiDrawerSize, maxAiDrawerSize, onActiveAiDrawerResize, aiDrawerFocusControl, ariaLabels, isMobile, drawersOpenQueue, onActiveAiDrawerChange, activeAiDrawer, bottomDrawerReportedSize, } = appLayoutState.widgetizedState;
|
|
20
20
|
const drawerExpandedMode = !!expandedDrawerId;
|
|
21
21
|
const toolsOpen = !!activeDrawer;
|
|
22
22
|
// Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar
|
|
@@ -42,7 +42,7 @@ export const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, app
|
|
|
42
42
|
setExpandedDrawerId,
|
|
43
43
|
} })))))),
|
|
44
44
|
navigation && (React.createElement("div", { className: clsx(styles.navigation, !navigationOpen && styles['panel-hidden'], toolsOpen && styles['unfocusable-mobile'], !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'], (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden) },
|
|
45
|
-
React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals })))));
|
|
45
|
+
React.createElement(AppLayoutNavigation, { appLayoutInternals: appLayoutState.appLayoutInternals, bottomDrawerReportedSize: bottomDrawerReportedSize })))));
|
|
46
46
|
};
|
|
47
47
|
export const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(BeforeMainSlotImplementation, BeforeMainSlotSkeleton);
|
|
48
48
|
//# sourceMappingURL=before-main-slot.js.map
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAClH,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,CACL,oBAAC,sBAAsB,IACrB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;KACH;IACD,MAAM,EACJ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"before-main-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,iCAAiC,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,8BAA8B,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IAClH,MAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,CACL,oBAAC,sBAAsB,IACrB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;KACH;IACD,MAAM,EACJ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,QAA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E,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EAChC,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,aAAa,EAAE;wBACb,kBAAkB,EAAE,kBAAmB;wBACvC,eAAe,EAAE,eAAgB;wBACjC,eAAe,EAAE,eAAgB;wBACjC,QAAQ,EAAE,QAAS;wBACnB,UAAU;wBACV,oBAAoB;wBACpB,QAAQ;wBACR,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;wBAChE,gBAAgB;wBAChB,mBAAmB;qBACpB,GACD,CACD,CACJ,CAC6B,CAC5B,CACP;QACA,UAAU,IAAI,CACb,6BACE,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,UAAU,EACjB,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,EACzC,SAAS,IAAI,MAAM,CAAC,oBAAoB,CAAC,EACzC,CAAC,2BAA2B,IAAI,YAAY,CAAC,wBAAwB,CAAC,EACtE,CAAC,kBAAkB,IAAI,+BAA+B,CAAC,IAAI,MAAM,CAAC,MAAM,CACzE;YAED,oBAAC,mBAAmB,IAClB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,wBAAwB,EAAE,wBAAwB,GAClD,CACE,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,yBAAyB,CAC9E,4BAA4B,EAC5B,sBAAsB,CACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { ActiveDrawersContext } from '../../utils/visibility-context';\nimport { AppLayoutGlobalAiDrawerImplementation } from '../drawer/global-ai-drawer';\nimport { AppLayoutNavigationImplementation as AppLayoutNavigation } from '../navigation';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { BeforeMainSlotSkeleton } from '../skeleton/skeleton-parts';\nimport { isWidgetReady } from '../state/invariants';\nimport { AppLayoutToolbarImplementation as AppLayoutToolbar } from '../toolbar';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BeforeMainSlotImplementation = ({ toolbarProps, appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n const wasAiDrawerOpenRef = useRef(false);\n if (!isWidgetReady(appLayoutState)) {\n return (\n <BeforeMainSlotSkeleton\n toolbarProps={toolbarProps}\n appLayoutProps={appLayoutProps}\n appLayoutState={appLayoutState}\n />\n );\n }\n const {\n activeDrawer,\n navigationOpen,\n navigation,\n expandedDrawerId,\n setExpandedDrawerId,\n navigationAnimationDisabled,\n activeAiDrawerId,\n aiDrawerExpandedMode,\n aiDrawer,\n activeAiDrawerSize,\n minAiDrawerSize,\n maxAiDrawerSize,\n onActiveAiDrawerResize,\n aiDrawerFocusControl,\n ariaLabels,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n activeAiDrawer,\n bottomDrawerReportedSize,\n } = appLayoutState.widgetizedState;\n const drawerExpandedMode = !!expandedDrawerId;\n const toolsOpen = !!activeDrawer;\n // Must use `toolbarProps` because all layouts have to apply this mode, not just the one with toolbar\n const drawerExpandedModeInChildLayout = !!toolbarProps?.expandedDrawerId;\n const { __embeddedViewMode: embeddedViewMode } = appLayoutProps as any;\n return (\n <>\n {!!toolbarProps && !embeddedViewMode && !aiDrawerExpandedMode && (\n <AppLayoutToolbar appLayoutInternals={appLayoutState.appLayoutInternals} toolbarProps={toolbarProps} />\n )}\n {aiDrawer && (\n <div\n className={clsx(\n styles['ai-drawer'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && !aiDrawerExpandedMode && styles.hidden\n )}\n >\n <ActiveDrawersContext.Provider value={activeAiDrawer ? [activeAiDrawer.id] : []}>\n {(!!activeAiDrawerId || (aiDrawer?.preserveInactiveContent && wasAiDrawerOpenRef.current)) && (\n <>\n {(wasAiDrawerOpenRef.current = true)}\n <AppLayoutGlobalAiDrawerImplementation\n show={!!activeAiDrawerId}\n activeAiDrawer={aiDrawer ?? null}\n appLayoutInternals={appLayoutState.appLayoutInternals}\n aiDrawerProps={{\n activeAiDrawerSize: activeAiDrawerSize!,\n minAiDrawerSize: minAiDrawerSize!,\n maxAiDrawerSize: maxAiDrawerSize!,\n aiDrawer: aiDrawer!,\n ariaLabels,\n aiDrawerFocusControl,\n isMobile,\n drawersOpenQueue,\n onActiveAiDrawerChange,\n onActiveDrawerResize: ({ size }) => onActiveAiDrawerResize(size),\n expandedDrawerId,\n setExpandedDrawerId,\n }}\n />\n </>\n )}\n </ActiveDrawersContext.Provider>\n </div>\n )}\n {navigation && (\n <div\n className={clsx(\n styles.navigation,\n !navigationOpen && styles['panel-hidden'],\n toolsOpen && styles['unfocusable-mobile'],\n !navigationAnimationDisabled && sharedStyles['with-motion-horizontal'],\n (drawerExpandedMode || drawerExpandedModeInChildLayout) && styles.hidden\n )}\n >\n <AppLayoutNavigation\n appLayoutInternals={appLayoutState.appLayoutInternals}\n bottomDrawerReportedSize={bottomDrawerReportedSize}\n />\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBeforeMainSlot = createWidgetizedComponent(\n BeforeMainSlotImplementation,\n BeforeMainSlotSkeleton\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"bottom-content-slot.d.ts","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAO3D,eAAO,MAAM,+BAA+B,uCAAwC,iBAAiB,uBA0BpG,CAAC;AAEF,eAAO,MAAM,0CAA0C,kDA5B6B,iBAAiB,8EAAjB,iBAAiB,uBA4Be,CAAC"}
|
package/lib/internal/template/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
4
5
|
import { createWidgetizedComponent } from '../../../internal/widgets';
|
|
5
6
|
import { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';
|
|
6
7
|
import { isWidgetReady } from '../state/invariants';
|
|
8
|
+
import sharedStyles from '../../resize/styles.css.js';
|
|
7
9
|
import styles from '../skeleton/styles.css.js';
|
|
8
10
|
export const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }) => {
|
|
9
11
|
if (!isWidgetReady(appLayoutState)) {
|
|
10
12
|
return null;
|
|
11
13
|
}
|
|
12
|
-
const { splitPanelPosition, placement } = appLayoutState.widgetizedState;
|
|
13
|
-
return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: styles['split-panel-bottom'], style: {
|
|
14
|
+
const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } = appLayoutState.widgetizedState;
|
|
15
|
+
return (React.createElement(React.Fragment, null, splitPanelPosition === 'bottom' && (React.createElement("div", { className: clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical']), style: {
|
|
16
|
+
insetBlockEnd: placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),
|
|
17
|
+
} },
|
|
14
18
|
React.createElement(AppLayoutSplitPanelBottom, { appLayoutInternals: appLayoutState.appLayoutInternals, splitPanelInternals: appLayoutState.splitPanelInternals }, appLayoutProps.splitPanel)))));
|
|
15
19
|
};
|
|
16
20
|
export const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bottom-content-slot.js","sourceRoot":"","sources":["../../../../../src/app-layout/visual-refresh-toolbar/widget-areas/bottom-content-slot.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,6CAA6C,IAAI,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAE,cAAc,EAAE,cAAc,EAAqB,EAAE,EAAE;IACvG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,QAAQ,EAAE,GACrG,cAAc,CAAC,eAAe,CAAC;IACjC,OAAO,CACL,0CACG,kBAAkB,KAAK,QAAQ,IAAI,CAClC,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC,EACnF,KAAK,EAAE;YACL,aAAa,EACX,SAAS,CAAC,aAAa,GAAG,CAAC,0BAA0B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;SACrG;QAED,oBAAC,yBAAyB,IACxB,kBAAkB,EAAE,cAAc,CAAC,kBAAkB,EACrD,mBAAmB,EAAE,cAAc,CAAC,mBAAmB,IAEtD,cAAc,CAAC,UAAU,CACA,CACxB,CACP,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAAG,yBAAyB,CAAC,+BAA+B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { createWidgetizedComponent } from '../../../internal/widgets';\nimport { SkeletonPartProps } from '../skeleton/interfaces';\nimport { AppLayoutSplitPanelDrawerBottomImplementation as AppLayoutSplitPanelBottom } from '../split-panel';\nimport { isWidgetReady } from '../state/invariants';\n\nimport sharedStyles from '../../resize/styles.css.js';\nimport styles from '../skeleton/styles.css.js';\n\nexport const BottomContentSlotImplementation = ({ appLayoutState, appLayoutProps }: SkeletonPartProps) => {\n if (!isWidgetReady(appLayoutState)) {\n return null;\n }\n const { splitPanelPosition, placement, activeGlobalBottomDrawerId, bottomDrawerReportedSize, isMobile } =\n appLayoutState.widgetizedState;\n return (\n <>\n {splitPanelPosition === 'bottom' && (\n <div\n className={clsx(styles['split-panel-bottom'], sharedStyles['with-motion-vertical'])}\n style={{\n insetBlockEnd:\n placement.insetBlockEnd + (activeGlobalBottomDrawerId && !isMobile ? bottomDrawerReportedSize : 0),\n }}\n >\n <AppLayoutSplitPanelBottom\n appLayoutInternals={appLayoutState.appLayoutInternals}\n splitPanelInternals={appLayoutState.splitPanelInternals}\n >\n {appLayoutProps.splitPanel}\n </AppLayoutSplitPanelBottom>\n </div>\n )}\n </>\n );\n};\n\nexport const createWidgetizedAppLayoutBottomContentSlot = createWidgetizedComponent(BottomContentSlotImplementation);\n"]}
|
|
@@ -15,6 +15,7 @@ export declare namespace AttributeEditorProps {
|
|
|
15
15
|
type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;
|
|
16
16
|
interface FieldDefinition<T> {
|
|
17
17
|
label?: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
18
19
|
info?: React.ReactNode;
|
|
19
20
|
control?: FieldRenderable<T> | React.ReactNode;
|
|
20
21
|
errorText?: FieldRenderable<T> | React.ReactNode;
|
|
@@ -109,6 +110,7 @@ export interface AttributeEditorProps<T> extends BaseComponentProps {
|
|
|
109
110
|
* If more than 6 attributes are specified, a `gridLayout` must be provided.
|
|
110
111
|
*
|
|
111
112
|
* * `label` (ReactNode) - Text label for the form field.
|
|
113
|
+
* * `description` (ReactNode) - Additional description for the form field.
|
|
112
114
|
* * `info` (ReactNode) - Info link for the form field.
|
|
113
115
|
* * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.
|
|
114
116
|
* It renders the form field as invalid if the returned value is not `null` or `undefined`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/attribute-editor/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAY/D,MAAM,WAAW,6BAA6B;IAC5C,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,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,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAE5C;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAEzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAElE;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,gBAAgB,CAAC;IAEzD;;;;;;;;;;;;;OAaG;IACH,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAE5D;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvF;;OAEG;IACH,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAE7C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAE9F;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/attribute-editor/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { Breakpoint as InternalBreakpoint } from '../internal/breakpoints';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n warningText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export type AddButtonVariant = 'normal' | 'inline-link';\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface RowActionsProps<T> {\n item: T;\n itemIndex: number;\n ref: React.Ref<ButtonDropdownProps.Ref>;\n breakpoint: Breakpoint | null;\n ownRow: boolean;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n\n /**\n * @deprecated Use `removeButtonAriaLabel` on the component instead.\n */\n removeButtonAriaLabel?: (item: T) => string;\n }\n\n export type Breakpoint = InternalBreakpoint;\n\n export interface GridLayout {\n breakpoint?: Breakpoint;\n rows: ReadonlyArray<ReadonlyArray<number>>;\n removeButton?: {\n ownRow?: boolean;\n width?: number | 'auto';\n };\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n * @i18n\n */\n removeButtonText?: string;\n\n /**\n * Adds an `aria-label` to the remove button.\n */\n removeButtonAriaLabel?: (item: T) => string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Specifies the variant to use for the add button. By default a normal button is used.\n * Use `inline-link` when using an attribute editor nested inside complex attribute editing\n * with expandable sections.\n */\n addButtonVariant?: AttributeEditorProps.AddButtonVariant;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * If more than 6 attributes are specified, a `gridLayout` must be provided.\n *\n * * `label` (ReactNode) - Text label for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `warningText` ((item, itemIndex) => ReactNode) - Warning message text to display as a control validation message.\n * It renders the form field in a warning state if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Optionally specifies the layout of the attributes. By default, all attributes will be\n * equally spaced and wrapped into multiple rows on smaller viewports.\n *\n * A `gridLayout` is an array of breakpoint definitions. Each definition consists of:\n * - `rows` (`number[][]`): the rows in which to display the attributes. Each row consists of a list of numbers indicating\n * the relative width of each attribute. For example, `[[1, 1, 1, 1]]` is a single row of four evenly-spaced attributes,\n * or `[[1, 2], [1, 1, 1]]` splits five attributes onto two rows.\n * - `breakpoint` (`string`): optionally specifies that the given entry should only be used when at least that much width is available.\n * - `removeButton`: optionally configures the remove (or row action) button placement. If this is not provided, the button will be\n * placed at the end of a single row, or below if multiple rows are present. The `removeButton` property supports contains two properties:\n * - `ownRow` (`boolean`): forces the remove button onto its own row.\n * - `width` (`number | 'auto'`): a number indicating the relative width (equivalent to a `rows` entry), or 'auto' to fit to the button width.\n */\n gridLayout?: ReadonlyArray<AttributeEditorProps.GridLayout>;\n\n /**\n * Specifies a custom action trigger for each row, in place of the remove button.\n * Only button and button dropdown components are supported.\n * If you provide this, `removeButtonText`, `removeButtonAriaLabel`,\n * and `onRemoveButtonClick` will be ignored.\n * The trigger must be given the provided `ref` in order for `focusRemoveButton`\n * to work.\n * The function receives the following properties:\n * - `item`: The item being rendered in the current row.\n * - `itemIndex` (`number`): The index of the item.\n * - `ref` (`ReactRef`): A React ref that should be passed to the rendered button.\n * - `breakpoint` (`Breakpoint`): The current breakpoint, for responsive behavior.\n * - `ownRow` (`boolean`): Whether the button is rendered on its own row.\n */\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: AttributeEditorProps.I18nStrings<T>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/attribute-editor/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { Breakpoint as InternalBreakpoint } from '../internal/breakpoints';\nimport { NonCancelableEventHandler } from '../internal/events';\n\n/*\n * HACK: Cast the component to a named parametrized interface.\n *\n * This lets us use React.forwardRef and still let the component have type\n * parameters, and the naming convention lets the documenter know that this is\n * a forwardRef-wrapped component.\n *\n * We don't need to expose this type to customers because it's just a simple\n * function type.\n */\nexport interface AttributeEditorForwardRefType {\n <T>(props: AttributeEditorProps<T> & { ref?: React.Ref<AttributeEditorProps.Ref> }): JSX.Element;\n}\n\nexport namespace AttributeEditorProps {\n export interface IsItemRemovableFunction<T> {\n (item: T): boolean;\n }\n\n export type FieldRenderable<T> = (item: T, itemIndex: number) => React.ReactNode;\n export interface FieldDefinition<T> {\n label?: React.ReactNode;\n description?: React.ReactNode;\n info?: React.ReactNode;\n control?: FieldRenderable<T> | React.ReactNode;\n errorText?: FieldRenderable<T> | React.ReactNode;\n warningText?: FieldRenderable<T> | React.ReactNode;\n constraintText?: FieldRenderable<T> | React.ReactNode;\n }\n\n export type AddButtonVariant = 'normal' | 'inline-link';\n\n export interface RemoveButtonClickDetail {\n itemIndex: number;\n }\n\n export interface Ref {\n /**\n * Focuses the 'remove' button for the given row index.\n */\n focusRemoveButton(itemIndex: number): void;\n /**\n * Focuses the 'add' button. Use this, for example, after a user removes the last row.\n */\n focusAddButton(): void;\n }\n\n export interface RowActionsProps<T> {\n item: T;\n itemIndex: number;\n ref: React.Ref<ButtonDropdownProps.Ref>;\n breakpoint: Breakpoint | null;\n ownRow: boolean;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n export interface I18nStrings<T = any> {\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n itemRemovedAriaLive?: string;\n\n /**\n * @deprecated Use `removeButtonAriaLabel` on the component instead.\n */\n removeButtonAriaLabel?: (item: T) => string;\n }\n\n export type Breakpoint = InternalBreakpoint;\n\n export interface GridLayout {\n breakpoint?: Breakpoint;\n rows: ReadonlyArray<ReadonlyArray<number>>;\n removeButton?: {\n ownRow?: boolean;\n width?: number | 'auto';\n };\n }\n}\n\nexport interface AttributeEditorProps<T> extends BaseComponentProps {\n /**\n * Displayed when there are no items to display.\n */\n empty?: React.ReactNode;\n\n /**\n * Displayed below the add button. Use it for additional information related to the attribute editor.\n */\n additionalInfo?: React.ReactNode;\n\n /**\n * Specifies the text that's displayed in the add button.\n */\n addButtonText: string;\n\n /**\n * Specifies the text that's displayed in the remove button.\n * @i18n\n */\n removeButtonText?: string;\n\n /**\n * Adds an `aria-label` to the remove button.\n */\n removeButtonAriaLabel?: (item: T) => string;\n\n /**\n * Specifies the items that serve as the data source for all rows.\n * The display of a row is handled by the `definition` property.\n */\n items?: ReadonlyArray<T>;\n\n /**\n * Function that determines whether an item is removable. When this function returns `false`, the remove\n * button is not rendered and the user can't remove the item.\n * By default, all items are removable.\n */\n isItemRemovable?: AttributeEditorProps.IsItemRemovableFunction<T>;\n\n /**\n * Determines whether the add button is disabled.\n */\n disableAddButton?: boolean;\n\n /**\n * Specifies the variant to use for the add button. By default a normal button is used.\n * Use `inline-link` when using an attribute editor nested inside complex attribute editing\n * with expandable sections.\n */\n addButtonVariant?: AttributeEditorProps.AddButtonVariant;\n\n /**\n * Defines the editor configuration. Each object in the array represents one form field in the row.\n * If more than 6 attributes are specified, a `gridLayout` must be provided.\n *\n * * `label` (ReactNode) - Text label for the form field.\n * * `description` (ReactNode) - Additional description for the form field.\n * * `info` (ReactNode) - Info link for the form field.\n * * `errorText` ((item, itemIndex) => ReactNode) - Error message text to display as a control validation message.\n * It renders the form field as invalid if the returned value is not `null` or `undefined`.\n * * `warningText` ((item, itemIndex) => ReactNode) - Warning message text to display as a control validation message.\n * It renders the form field in a warning state if the returned value is not `null` or `undefined`.\n * * `constraintText` ((item, itemIndex) => ReactNode) - Text to display as a constraint message below the field.\n * * `control` ((item, itemIndex) => ReactNode) - A control to use as the input for the field.\n */\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n\n /**\n * Optionally specifies the layout of the attributes. By default, all attributes will be\n * equally spaced and wrapped into multiple rows on smaller viewports.\n *\n * A `gridLayout` is an array of breakpoint definitions. Each definition consists of:\n * - `rows` (`number[][]`): the rows in which to display the attributes. Each row consists of a list of numbers indicating\n * the relative width of each attribute. For example, `[[1, 1, 1, 1]]` is a single row of four evenly-spaced attributes,\n * or `[[1, 2], [1, 1, 1]]` splits five attributes onto two rows.\n * - `breakpoint` (`string`): optionally specifies that the given entry should only be used when at least that much width is available.\n * - `removeButton`: optionally configures the remove (or row action) button placement. If this is not provided, the button will be\n * placed at the end of a single row, or below if multiple rows are present. The `removeButton` property supports contains two properties:\n * - `ownRow` (`boolean`): forces the remove button onto its own row.\n * - `width` (`number | 'auto'`): a number indicating the relative width (equivalent to a `rows` entry), or 'auto' to fit to the button width.\n */\n gridLayout?: ReadonlyArray<AttributeEditorProps.GridLayout>;\n\n /**\n * Specifies a custom action trigger for each row, in place of the remove button.\n * Only button and button dropdown components are supported.\n * If you provide this, `removeButtonText`, `removeButtonAriaLabel`,\n * and `onRemoveButtonClick` will be ignored.\n * The trigger must be given the provided `ref` in order for `focusRemoveButton`\n * to work.\n * The function receives the following properties:\n * - `item`: The item being rendered in the current row.\n * - `itemIndex` (`number`): The index of the item.\n * - `ref` (`ReactRef`): A React ref that should be passed to the rendered button.\n * - `breakpoint` (`Breakpoint`): The current breakpoint, for responsive behavior.\n * - `ownRow` (`boolean`): Whether the button is rendered on its own row.\n */\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n\n /**\n * Called when add button is clicked.\n */\n onAddButtonClick?: NonCancelableEventHandler;\n\n /**\n * Called when remove button is clicked.\n * The event `detail` contains the index of the corresponding item.\n */\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: AttributeEditorProps.I18nStrings<T>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,QAAQ,CAAC,CAAC;IAClB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,WAAW,EAAE,oBAAoB,CAAC,WAAW,GAAG,SAAS,CAAC;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;IACrD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACvF,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAC9F,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7C;AAiBD,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAKpD,UAAU,QAAQ,CAAC,CAAC;IAClB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,aAAa,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,WAAW,EAAE,oBAAoB,CAAC,WAAW,GAAG,SAAS,CAAC;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;IACrD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACvF,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,CAAC;IAC9F,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7C;AAiBD,eAAO,MAAM,GAAG,6BAgGgB,WAAW,CAAC"}
|
|
@@ -39,9 +39,9 @@ export const Row = React.memo(({ breakpoint, item, definition, layout, i18nStrin
|
|
|
39
39
|
ownRow: !removeButtonOnSameLine,
|
|
40
40
|
});
|
|
41
41
|
return (React.createElement("div", { className: clsx(styles.row, layout.rows.length === 1 && styles['single-row']), role: "group", "aria-labelledby": `${firstControlId}-label ${firstControlId}` },
|
|
42
|
-
definition.map(({ info, label, constraintText, errorText, warningText, control }, defIndex) => {
|
|
42
|
+
definition.map(({ info, label, description, constraintText, errorText, warningText, control }, defIndex) => {
|
|
43
43
|
({ gridColumnStart, gridColumnEnd } = getItemGridColumns(layout, defIndex));
|
|
44
|
-
return (React.createElement(InternalFormField, { key: defIndex, className: styles.field, __style: { gridColumnStart, gridColumnEnd }, label: label, info: info, constraintText: render(item, index, constraintText), errorText: render(item, index, errorText), warningText: render(item, index, warningText), stretch: true, i18nStrings: {
|
|
44
|
+
return (React.createElement(InternalFormField, { key: defIndex, className: styles.field, __style: { gridColumnStart, gridColumnEnd }, label: label, description: description, info: info, constraintText: render(item, index, constraintText), errorText: render(item, index, errorText), warningText: render(item, index, warningText), stretch: true, i18nStrings: {
|
|
45
45
|
errorIconAriaLabel: i18nStrings.errorIconAriaLabel,
|
|
46
46
|
warningIconAriaLabel: i18nStrings.warningIconAriaLabel,
|
|
47
47
|
}, __hideLabel: index !== 0 && removeButtonOnSameLine, controlId: defIndex === 0 ? firstControlId : undefined }, render(item, index, control)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../src/attribute-editor/row.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EA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,CAAC,CAAC;QACF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,EAAE;gBACjD,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC,EAAE,sBAAsB,IAAI,KAAK,KAAK,CAAC;gBAC9E,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,sBAAsB;aAC3D,CAAC,EACF,KAAK,oBAAO,0BAA0B,CAAC,MAAM,EAAE,aAAa,CAAC,KAE5D,SAAS;YACR,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,CAC7B,aAAa,CACd,CAAC,CAAC,CAAC,CACF,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAClC,UAAU,EAAC,MAAM,EACjB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAA,CAAC,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,WAAW,CAAC,qBAAqB,CAAC,0CAAG,IAAI,CAAC,EAC/E,OAAO,EAAE,iBAAiB,IAEzB,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAC5B,CAClB,CAAC,CACA;QACL,CAAC,sBAAsB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI,CAC1D,CACP,CAAC;AACJ,CAAC,CACwC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { InternalButton } from '../button/internal';\nimport InternalFormField from '../form-field/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { Breakpoint } from '../internal/breakpoints';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events';\nimport { AttributeEditorProps } from './interfaces';\nimport { getItemGridColumns, getRemoveButtonGridColumns, isRemoveButtonOnSameLine } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface RowProps<T> {\n breakpoint: Breakpoint | null;\n layout: AttributeEditorProps.GridLayout;\n item: T;\n definition: ReadonlyArray<AttributeEditorProps.FieldDefinition<T>>;\n i18nStrings: AttributeEditorProps.I18nStrings | undefined;\n index: number;\n removable: boolean;\n removeButtonText?: string;\n removeButtonRefs: Array<ButtonProps.Ref | undefined>;\n customRowActions?: (props: AttributeEditorProps.RowActionsProps<T>) => React.ReactNode;\n onRemoveButtonClick?: NonCancelableEventHandler<AttributeEditorProps.RemoveButtonClickDetail>;\n removeButtonAriaLabel?: (item: T) => string;\n}\n\nfunction render<T>(\n item: T,\n itemIndex: number,\n slot: AttributeEditorProps.FieldRenderable<T> | React.ReactNode | undefined\n) {\n if (isSlotFunction(slot)) {\n return slot(item, itemIndex);\n }\n return slot;\n\n function isSlotFunction(slot: unknown): slot is AttributeEditorProps.FieldRenderable<T> {\n return typeof slot === 'function';\n }\n}\n\nexport const Row = React.memo(\n <T,>({\n breakpoint,\n item,\n definition,\n layout,\n i18nStrings = {},\n index,\n removable,\n removeButtonText,\n removeButtonRefs,\n customRowActions,\n onRemoveButtonClick,\n removeButtonAriaLabel,\n }: RowProps<T>) => {\n const i18n = useInternalI18n('attribute-editor');\n\n const handleRemoveClick = useCallback(() => {\n fireNonCancelableEvent(onRemoveButtonClick, { itemIndex: index });\n }, [onRemoveButtonClick, index]);\n\n const firstControlId = useUniqueId('first-control-id-');\n\n const buttonRef = (ref: ButtonProps.Ref | null) => {\n removeButtonRefs[index] = ref ?? undefined;\n };\n\n let gridColumnStart = 1;\n let gridColumnEnd = 1;\n const removeButtonOnSameLine = isRemoveButtonOnSameLine(layout);\n\n const customActions = customRowActions?.({\n item,\n itemIndex: index,\n ref: buttonRef,\n breakpoint,\n ownRow: !removeButtonOnSameLine,\n });\n\n return (\n <div\n className={clsx(styles.row, layout.rows.length === 1 && styles['single-row'])}\n role=\"group\"\n aria-labelledby={`${firstControlId}-label ${firstControlId}`}\n >\n {definition.map(({ info, label, description, constraintText, errorText, warningText, control }, defIndex) => {\n ({ gridColumnStart, gridColumnEnd } = getItemGridColumns(layout, defIndex));\n return (\n <InternalFormField\n key={defIndex}\n className={styles.field}\n __style={{ gridColumnStart, gridColumnEnd }}\n label={label}\n description={description}\n info={info}\n constraintText={render(item, index, constraintText)}\n errorText={render(item, index, errorText)}\n warningText={render(item, index, warningText)}\n stretch={true}\n i18nStrings={{\n errorIconAriaLabel: i18nStrings.errorIconAriaLabel,\n warningIconAriaLabel: i18nStrings.warningIconAriaLabel,\n }}\n __hideLabel={index !== 0 && removeButtonOnSameLine}\n controlId={defIndex === 0 ? firstControlId : undefined}\n >\n {render(item, index, control)}\n </InternalFormField>\n );\n })}\n <div\n className={clsx(styles['remove-button-container'], {\n [styles['remove-button-field-padding']]: removeButtonOnSameLine && index === 0,\n [styles['remove-button-own-row']]: !removeButtonOnSameLine,\n })}\n style={{ ...getRemoveButtonGridColumns(layout, gridColumnEnd) }}\n >\n {removable &&\n (customActions !== undefined ? (\n customActions\n ) : (\n <InternalButton\n className={styles['remove-button']}\n formAction=\"none\"\n ref={buttonRef}\n ariaLabel={(removeButtonAriaLabel ?? i18nStrings.removeButtonAriaLabel)?.(item)}\n onClick={handleRemoveClick}\n >\n {i18n('removeButtonText', removeButtonText)}\n </InternalButton>\n ))}\n </div>\n {!removeButtonOnSameLine && <div className={styles.divider} />}\n </div>\n );\n }\n) as <T>(props: RowProps<T>) => JSX.Element;\n"]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"empty-appear": "awsui_empty-
|
|
5
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
6
|
-
"root": "
|
|
7
|
-
"empty": "
|
|
8
|
-
"row": "
|
|
9
|
-
"divider": "
|
|
10
|
-
"row-control": "awsui_row-
|
|
11
|
-
"field": "
|
|
12
|
-
"additional-info": "awsui_additional-
|
|
13
|
-
"add-row": "awsui_add-
|
|
14
|
-
"add-button": "awsui_add-
|
|
15
|
-
"remove-button-container": "awsui_remove-button-
|
|
16
|
-
"remove-button-field-padding": "awsui_remove-button-field-
|
|
17
|
-
"remove-button-own-row": "awsui_remove-button-own-
|
|
18
|
-
"remove-button": "awsui_remove-
|
|
4
|
+
"empty-appear": "awsui_empty-appear_n4qlp_9hu3t_153",
|
|
5
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_9hu3t_1",
|
|
6
|
+
"root": "awsui_root_n4qlp_9hu3t_175",
|
|
7
|
+
"empty": "awsui_empty_n4qlp_9hu3t_153",
|
|
8
|
+
"row": "awsui_row_n4qlp_9hu3t_218",
|
|
9
|
+
"divider": "awsui_divider_n4qlp_9hu3t_222",
|
|
10
|
+
"row-control": "awsui_row-control_n4qlp_9hu3t_227",
|
|
11
|
+
"field": "awsui_field_n4qlp_9hu3t_231",
|
|
12
|
+
"additional-info": "awsui_additional-info_n4qlp_9hu3t_235",
|
|
13
|
+
"add-row": "awsui_add-row_n4qlp_9hu3t_281",
|
|
14
|
+
"add-button": "awsui_add-button_n4qlp_9hu3t_285",
|
|
15
|
+
"remove-button-container": "awsui_remove-button-container_n4qlp_9hu3t_289",
|
|
16
|
+
"remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_9hu3t_293",
|
|
17
|
+
"remove-button-own-row": "awsui_remove-button-own-row_n4qlp_9hu3t_297",
|
|
18
|
+
"remove-button": "awsui_remove-button_n4qlp_9hu3t_289"
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -150,10 +150,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.awsui_empty-
|
|
154
|
-
animation: awsui_awsui-motion-fade-
|
|
153
|
+
.awsui_empty-appear_n4qlp_9hu3t_153:not(#\9) {
|
|
154
|
+
animation: awsui_awsui-motion-fade-in_n4qlp_9hu3t_1 var(--motion-duration-transition-show-paced-0w35xp, 180ms) var(--motion-easing-transition-show-paced-ufdgkj, ease-out);
|
|
155
155
|
}
|
|
156
|
-
@keyframes awsui_awsui-motion-fade-
|
|
156
|
+
@keyframes awsui_awsui-motion-fade-in_n4qlp_9hu3t_1 {
|
|
157
157
|
from {
|
|
158
158
|
opacity: 0.2;
|
|
159
159
|
}
|
|
@@ -162,17 +162,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
@media (prefers-reduced-motion: reduce) {
|
|
165
|
-
.awsui_empty-
|
|
165
|
+
.awsui_empty-appear_n4qlp_9hu3t_153:not(#\9) {
|
|
166
166
|
animation: none;
|
|
167
167
|
transition: none;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
.awsui-motion-disabled .awsui_empty-
|
|
170
|
+
.awsui-motion-disabled .awsui_empty-appear_n4qlp_9hu3t_153:not(#\9), .awsui-mode-entering .awsui_empty-appear_n4qlp_9hu3t_153:not(#\9) {
|
|
171
171
|
animation: none;
|
|
172
172
|
transition: none;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.
|
|
175
|
+
.awsui_root_n4qlp_9hu3t_175:not(#\9) {
|
|
176
176
|
border-collapse: separate;
|
|
177
177
|
border-spacing: 0;
|
|
178
178
|
box-sizing: border-box;
|
|
@@ -208,31 +208,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
208
208
|
align-items: start;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
.
|
|
211
|
+
.awsui_empty_n4qlp_9hu3t_153:not(#\9) {
|
|
212
212
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
213
213
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
214
214
|
color: var(--color-text-empty-vtt4l2, #687078);
|
|
215
215
|
grid-column: 1/-1;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.
|
|
218
|
+
.awsui_row_n4qlp_9hu3t_218:not(#\9) {
|
|
219
219
|
display: contents;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.
|
|
222
|
+
.awsui_divider_n4qlp_9hu3t_222:not(#\9) {
|
|
223
223
|
grid-column: 1/-1;
|
|
224
224
|
border-block-start: var(--border-divider-section-width-sznrdy, 1px) solid var(--color-border-divider-default-ipvpev, #eaeded);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.awsui_row-
|
|
227
|
+
.awsui_row-control_n4qlp_9hu3t_227:not(#\9) {
|
|
228
228
|
/* used in test-utils */
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.
|
|
231
|
+
.awsui_field_n4qlp_9hu3t_231:not(#\9) {
|
|
232
232
|
/* used in test-utils */
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.awsui_additional-
|
|
235
|
+
.awsui_additional-info_n4qlp_9hu3t_235:not(#\9) {
|
|
236
236
|
color: var(--color-text-form-secondary-4sp9un, #687078);
|
|
237
237
|
font-size: var(--font-size-body-s-psgqn2, 12px);
|
|
238
238
|
line-height: var(--line-height-body-s-otgtsr, 16px);
|
|
@@ -242,10 +242,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
242
242
|
margin-block-start: var(--space-xxs-jnczic, 4px);
|
|
243
243
|
/* stylelint-disable-next-line selector-max-type */
|
|
244
244
|
}
|
|
245
|
-
.awsui_additional-
|
|
245
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9) {
|
|
246
246
|
text-underline-offset: 0.3em;
|
|
247
247
|
text-decoration-thickness: 1px;
|
|
248
|
-
color: var(--awsui-style-color-default-
|
|
248
|
+
color: var(--awsui-style-color-default-b75yp7, var(--color-text-link-default-x6cnv5, #0073bb));
|
|
249
249
|
font-weight: inherit;
|
|
250
250
|
letter-spacing: normal;
|
|
251
251
|
text-decoration-line: underline;
|
|
@@ -256,50 +256,50 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
256
256
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
257
257
|
}
|
|
258
258
|
@media (prefers-reduced-motion: reduce) {
|
|
259
|
-
.awsui_additional-
|
|
259
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9) {
|
|
260
260
|
animation: none;
|
|
261
261
|
transition: none;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
.awsui-motion-disabled .awsui_additional-
|
|
264
|
+
.awsui-motion-disabled .awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9), .awsui-mode-entering .awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9) {
|
|
265
265
|
animation: none;
|
|
266
266
|
transition: none;
|
|
267
267
|
}
|
|
268
|
-
.awsui_additional-
|
|
268
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):hover {
|
|
269
269
|
cursor: pointer;
|
|
270
|
-
color: var(--awsui-style-color-hover-
|
|
270
|
+
color: var(--awsui-style-color-hover-b75yp7, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
271
271
|
}
|
|
272
|
-
.awsui_additional-
|
|
272
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):focus {
|
|
273
273
|
outline: none;
|
|
274
274
|
}
|
|
275
|
-
.awsui_additional-
|
|
276
|
-
color: var(--awsui-style-color-active-
|
|
275
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):active {
|
|
276
|
+
color: var(--awsui-style-color-active-b75yp7, var(--color-text-link-hover-tk5gkv, #0a4a74));
|
|
277
277
|
}
|
|
278
|
-
.awsui_additional-
|
|
278
|
+
.awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):active, .awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):focus, .awsui_additional-info_n4qlp_9hu3t_235 > a:not(#\9):hover {
|
|
279
279
|
text-decoration-line: underline;
|
|
280
280
|
text-decoration-color: currentColor;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_add-
|
|
283
|
+
.awsui_add-row_n4qlp_9hu3t_281:not(#\9) {
|
|
284
284
|
grid-column: 1/-1;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.awsui_add-
|
|
287
|
+
.awsui_add-button_n4qlp_9hu3t_285:not(#\9) {
|
|
288
288
|
/* used in test-utils */
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.awsui_remove-button-
|
|
291
|
+
.awsui_remove-button-container_n4qlp_9hu3t_289:not(#\9) {
|
|
292
292
|
display: inline-block;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.awsui_remove-button-field-
|
|
295
|
+
.awsui_remove-button-field-padding_n4qlp_9hu3t_293:not(#\9) {
|
|
296
296
|
padding-block-start: calc(var(--space-xxs-jnczic, 4px) + var(--line-height-body-m-bedeoh, 22px));
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_remove-button-own-
|
|
299
|
+
.awsui_remove-button-own-row_n4qlp_9hu3t_297:not(#\9) {
|
|
300
300
|
justify-self: end;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
.awsui_remove-
|
|
303
|
+
.awsui_remove-button_n4qlp_9hu3t_289:not(#\9) {
|
|
304
304
|
/* used in test-utils */
|
|
305
305
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"empty-appear": "awsui_empty-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"empty": "
|
|
9
|
-
"row": "
|
|
10
|
-
"divider": "
|
|
11
|
-
"row-control": "awsui_row-
|
|
12
|
-
"field": "
|
|
13
|
-
"additional-info": "awsui_additional-
|
|
14
|
-
"add-row": "awsui_add-
|
|
15
|
-
"add-button": "awsui_add-
|
|
16
|
-
"remove-button-container": "awsui_remove-button-
|
|
17
|
-
"remove-button-field-padding": "awsui_remove-button-field-
|
|
18
|
-
"remove-button-own-row": "awsui_remove-button-own-
|
|
19
|
-
"remove-button": "awsui_remove-
|
|
5
|
+
"empty-appear": "awsui_empty-appear_n4qlp_9hu3t_153",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_n4qlp_9hu3t_1",
|
|
7
|
+
"root": "awsui_root_n4qlp_9hu3t_175",
|
|
8
|
+
"empty": "awsui_empty_n4qlp_9hu3t_153",
|
|
9
|
+
"row": "awsui_row_n4qlp_9hu3t_218",
|
|
10
|
+
"divider": "awsui_divider_n4qlp_9hu3t_222",
|
|
11
|
+
"row-control": "awsui_row-control_n4qlp_9hu3t_227",
|
|
12
|
+
"field": "awsui_field_n4qlp_9hu3t_231",
|
|
13
|
+
"additional-info": "awsui_additional-info_n4qlp_9hu3t_235",
|
|
14
|
+
"add-row": "awsui_add-row_n4qlp_9hu3t_281",
|
|
15
|
+
"add-button": "awsui_add-button_n4qlp_9hu3t_285",
|
|
16
|
+
"remove-button-container": "awsui_remove-button-container_n4qlp_9hu3t_289",
|
|
17
|
+
"remove-button-field-padding": "awsui_remove-button-field-padding_n4qlp_9hu3t_293",
|
|
18
|
+
"remove-button-own-row": "awsui_remove-button-own-row_n4qlp_9hu3t_297",
|
|
19
|
+
"remove-button": "awsui_remove-button_n4qlp_9hu3t_289"
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FA8ChB,CAAC;AAGF,eAAe,WAAW,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
|
9
9
|
import { getExternalProps } from '../internal/utils/external-props';
|
|
10
10
|
import InternalAutosuggest from './internal';
|
|
11
11
|
const Autosuggest = React.forwardRef((_a, ref) => {
|
|
12
|
-
var { filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false } = _a, props = __rest(_a, ["filteringType", "statusType", "disableBrowserAutocorrect"]);
|
|
12
|
+
var { filteringType = 'auto', statusType = 'finished', disableBrowserAutocorrect = false, hideEnteredTextOption = false } = _a, props = __rest(_a, ["filteringType", "statusType", "disableBrowserAutocorrect", "hideEnteredTextOption"]);
|
|
13
13
|
const baseComponentProps = useBaseComponent('Autosuggest', {
|
|
14
14
|
props: {
|
|
15
15
|
autoFocus: props.autoFocus,
|
|
@@ -18,6 +18,7 @@ const Autosuggest = React.forwardRef((_a, ref) => {
|
|
|
18
18
|
filteringType,
|
|
19
19
|
readOnly: props.readOnly,
|
|
20
20
|
virtualScroll: props.virtualScroll,
|
|
21
|
+
hideEnteredTextOption,
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
const componentAnalyticsMetadata = {
|
|
@@ -29,7 +30,7 @@ const Autosuggest = React.forwardRef((_a, ref) => {
|
|
|
29
30
|
},
|
|
30
31
|
};
|
|
31
32
|
const externalProps = getExternalProps(props);
|
|
32
|
-
return (React.createElement(InternalAutosuggest, Object.assign({ filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect }, externalProps, baseComponentProps, { ref: ref }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }))));
|
|
33
|
+
return (React.createElement(InternalAutosuggest, Object.assign({ filteringType: filteringType, statusType: statusType, disableBrowserAutocorrect: disableBrowserAutocorrect, hideEnteredTextOption: hideEnteredTextOption }, externalProps, baseComponentProps, { ref: ref }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }))));
|
|
33
34
|
});
|
|
34
35
|
applyDisplayName(Autosuggest, 'Autosuggest');
|
|
35
36
|
export default Autosuggest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,mBAAmB,MAAM,YAAY,CAAC;AAI7C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/autosuggest/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EA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Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { GeneratedAnalyticsMetadataAutosuggestComponent } from './analytics-metadata/interfaces';\nimport { AutosuggestProps } from './interfaces';\nimport InternalAutosuggest from './internal';\n\nexport { AutosuggestProps };\n\nconst Autosuggest = React.forwardRef(\n (\n {\n filteringType = 'auto',\n statusType = 'finished',\n disableBrowserAutocorrect = false,\n hideEnteredTextOption = false,\n ...props\n }: AutosuggestProps,\n ref: React.Ref<AutosuggestProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Autosuggest', {\n props: {\n autoFocus: props.autoFocus,\n disableBrowserAutocorrect,\n expandToViewport: props.expandToViewport,\n filteringType,\n readOnly: props.readOnly,\n virtualScroll: props.virtualScroll,\n hideEnteredTextOption,\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAutosuggestComponent = {\n name: 'awsui.Autosuggest',\n label: 'input',\n properties: {\n disabled: `${!!props.disabled}`,\n value: props.value || '',\n },\n };\n\n const externalProps = getExternalProps(props);\n return (\n <InternalAutosuggest\n filteringType={filteringType}\n statusType={statusType}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n hideEnteredTextOption={hideEnteredTextOption}\n {...externalProps}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Autosuggest, 'Autosuggest');\nexport default Autosuggest;\n"]}
|
|
@@ -63,6 +63,10 @@ export interface AutosuggestProps extends BaseComponentProps, BaseInputProps, In
|
|
|
63
63
|
* @i18n
|
|
64
64
|
*/
|
|
65
65
|
enteredTextLabel?: AutosuggestProps.EnteredTextLabel;
|
|
66
|
+
/**
|
|
67
|
+
* Defines whether entered text option is shown as the first option in the dropdown when value is non-empty.
|
|
68
|
+
*/
|
|
69
|
+
hideEnteredTextOption?: boolean;
|
|
66
70
|
/**
|
|
67
71
|
* Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.
|
|
68
72
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/autosuggest/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,gBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,mBAAmB;IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA+BI;IACJ,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC;IACnC;;;;;;;;;;;;;;;;QAgBI;IACJ,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAErC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAErD;;;;;OAKG;IACH,oBAAoB,CAAC,EAA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