@cloudscape-design/components 3.0.1401 → 3.0.1403
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/action-card/styles.css.js +17 -17
- package/action-card/styles.scoped.css +267 -267
- package/action-card/styles.selectors.js +17 -17
- package/alert/actions-wrapper/styles.css.js +1 -1
- package/alert/actions-wrapper/styles.scoped.css +3 -3
- package/alert/actions-wrapper/styles.selectors.js +1 -1
- package/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +97 -97
- package/alert/styles.selectors.js +27 -27
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +64 -64
- package/anchor-navigation/styles.selectors.js +8 -8
- package/annotation-context/annotation/styles.css.js +13 -13
- package/annotation-context/annotation/styles.scoped.css +36 -36
- package/annotation-context/annotation/styles.selectors.js +13 -13
- package/app-layout/content-wrapper/styles.css.js +3 -3
- package/app-layout/content-wrapper/styles.scoped.css +10 -10
- package/app-layout/content-wrapper/styles.selectors.js +3 -3
- package/app-layout/drawer/styles.css.js +14 -14
- package/app-layout/drawer/styles.scoped.css +34 -34
- package/app-layout/drawer/styles.selectors.js +14 -14
- package/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/app-layout/mobile-toolbar/styles.scoped.css +18 -18
- package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/resize/styles.css.js +5 -5
- package/app-layout/resize/styles.scoped.css +14 -14
- package/app-layout/resize/styles.selectors.js +5 -5
- package/app-layout/styles.css.js +12 -12
- package/app-layout/styles.scoped.css +21 -21
- package/app-layout/styles.selectors.js +12 -12
- package/app-layout/toggles/styles.css.js +2 -2
- package/app-layout/toggles/styles.scoped.css +20 -20
- package/app-layout/toggles/styles.selectors.js +2 -2
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +265 -265
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +144 -144
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +14 -14
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
- package/app-layout/visual-refresh-toolbar/notifications/styles.css.js +3 -3
- package/app-layout/visual-refresh-toolbar/notifications/styles.scoped.css +5 -5
- package/app-layout/visual-refresh-toolbar/notifications/styles.selectors.js +3 -3
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +87 -87
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +15 -15
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +62 -62
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +15 -15
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +6 -6
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +34 -34
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +6 -6
- package/area-chart/styles.css.js +6 -6
- package/area-chart/styles.scoped.css +16 -16
- package/area-chart/styles.selectors.js +6 -6
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +49 -49
- package/attribute-editor/styles.selectors.js +15 -15
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +62 -62
- package/badge/styles.selectors.js +10 -10
- package/box/styles.css.js +214 -214
- package/box/styles.scoped.css +542 -542
- package/box/styles.selectors.js +214 -214
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +44 -44
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/breadcrumb-group/styles.css.js +14 -14
- package/breadcrumb-group/styles.scoped.css +59 -59
- package/breadcrumb-group/styles.selectors.js +14 -14
- package/button/interfaces.d.ts +3 -1
- package/button/interfaces.d.ts.map +1 -1
- package/button/interfaces.js.map +1 -1
- package/button/styles.css.js +24 -24
- package/button/styles.scoped.css +227 -227
- package/button/styles.selectors.js +24 -24
- package/button-dropdown/category-elements/styles.css.js +18 -18
- package/button-dropdown/category-elements/styles.scoped.css +61 -61
- package/button-dropdown/category-elements/styles.selectors.js +18 -18
- package/button-dropdown/interfaces.d.ts +6 -3
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +21 -21
- package/button-dropdown/item-element/styles.scoped.css +86 -86
- package/button-dropdown/item-element/styles.selectors.js +21 -21
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +11 -11
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/button-dropdown/styles.css.js +23 -23
- package/button-dropdown/styles.scoped.css +45 -45
- package/button-dropdown/styles.selectors.js +23 -23
- package/button-group/interfaces.d.ts +22 -13
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/button-group/styles.css.js +4 -4
- package/button-group/styles.scoped.css +13 -13
- package/button-group/styles.selectors.js +4 -4
- package/calendar/grid/index.js.map +1 -1
- package/calendar/interfaces.d.ts +3 -1
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/calendar/styles.css.js +21 -21
- package/calendar/styles.scoped.css +133 -133
- package/calendar/styles.selectors.js +21 -21
- package/cards/styles.css.js +39 -39
- package/cards/styles.scoped.css +70 -70
- package/cards/styles.selectors.js +39 -39
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +20 -20
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/resizable-box/styles.css.js +4 -4
- package/code-editor/resizable-box/styles.scoped.css +9 -9
- package/code-editor/resizable-box/styles.selectors.js +4 -4
- package/code-editor/styles.css.js +33 -33
- package/code-editor/styles.scoped.css +262 -262
- package/code-editor/styles.selectors.js +33 -33
- package/collection-preferences/styles.css.js +38 -38
- package/collection-preferences/styles.scoped.css +85 -85
- package/collection-preferences/styles.selectors.js +38 -38
- package/column-layout/flexible-column-layout/styles.css.js +5 -5
- package/column-layout/flexible-column-layout/styles.scoped.css +13 -13
- package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +59 -59
- package/column-layout/styles.selectors.js +13 -13
- package/container/styles.css.js +34 -34
- package/container/styles.scoped.css +136 -136
- package/container/styles.selectors.js +34 -34
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/copy-to-clipboard/interfaces.d.ts +3 -1
- package/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/copy-to-clipboard/interfaces.js.map +1 -1
- package/copy-to-clipboard/styles.css.js +5 -5
- package/copy-to-clipboard/styles.scoped.css +7 -7
- package/copy-to-clipboard/styles.selectors.js +5 -5
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +20 -20
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/grid-cell.d.ts +1 -1
- package/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +30 -30
- package/date-range-picker/calendar/grids/styles.scoped.css +127 -127
- package/date-range-picker/calendar/grids/styles.selectors.js +30 -30
- package/date-range-picker/interfaces.d.ts +3 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/date-range-picker/relative-range/styles.css.js +6 -6
- package/date-range-picker/relative-range/styles.scoped.css +13 -13
- package/date-range-picker/relative-range/styles.selectors.js +6 -6
- package/date-range-picker/styles.css.js +23 -23
- package/date-range-picker/styles.scoped.css +72 -72
- package/date-range-picker/styles.selectors.js +23 -23
- package/dialog/styles.css.js +8 -8
- package/dialog/styles.scoped.css +46 -46
- package/dialog/styles.selectors.js +8 -8
- package/divider/styles.css.js +6 -6
- package/divider/styles.scoped.css +16 -16
- package/divider/styles.selectors.js +6 -6
- package/drawer/interfaces.d.ts +3 -1
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/drawer/styles.css.js +29 -29
- package/drawer/styles.scoped.css +79 -79
- package/drawer/styles.selectors.js +29 -29
- package/dropdown/styles.css.js +20 -20
- package/dropdown/styles.scoped.css +66 -66
- package/dropdown/styles.selectors.js +20 -20
- package/expandable-section/styles.css.js +44 -44
- package/expandable-section/styles.scoped.css +172 -172
- package/expandable-section/styles.selectors.js +44 -44
- package/file-dropzone/styles.css.js +3 -3
- package/file-dropzone/styles.scoped.css +19 -19
- package/file-dropzone/styles.selectors.js +3 -3
- package/file-input/styles.css.js +5 -5
- package/file-input/styles.scoped.css +28 -28
- package/file-input/styles.selectors.js +5 -5
- package/file-token-group/styles.css.js +23 -23
- package/file-token-group/styles.scoped.css +84 -84
- package/file-token-group/styles.selectors.js +23 -23
- package/file-upload/styles.css.js +2 -2
- package/file-upload/styles.scoped.css +4 -4
- package/file-upload/styles.selectors.js +2 -2
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +263 -263
- package/flashbar/styles.selectors.js +50 -50
- package/form/styles.css.js +8 -8
- package/form/styles.scoped.css +21 -21
- package/form/styles.selectors.js +8 -8
- package/form-field/styles.css.js +24 -24
- package/form-field/styles.scoped.css +69 -69
- package/form-field/styles.selectors.js +24 -24
- package/grid/styles.css.js +53 -53
- package/grid/styles.scoped.css +63 -63
- package/grid/styles.selectors.js +53 -53
- package/header/styles.css.js +35 -35
- package/header/styles.scoped.css +146 -146
- package/header/styles.selectors.js +35 -35
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +192 -192
- package/help-panel/styles.selectors.js +6 -6
- package/hotspot/styles.css.js +7 -7
- package/hotspot/styles.scoped.css +10 -10
- package/hotspot/styles.selectors.js +7 -7
- package/icon/styles.css.js +43 -43
- package/icon/styles.scoped.css +174 -174
- package/icon/styles.selectors.js +43 -43
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +14 -18
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +37 -38
- package/input/styles.scoped.css +220 -296
- package/input/styles.selectors.js +37 -38
- package/internal/base-component/styles.scoped.css +2 -2
- package/internal/base-theme/styles.scoped.css +2578 -2578
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +28 -28
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +5 -2
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/autosuggest-input/styles.css.js +27 -27
- package/internal/components/autosuggest-input/styles.scoped.css +79 -79
- package/internal/components/autosuggest-input/styles.selectors.js +27 -27
- package/internal/components/button-trigger/styles.css.js +23 -23
- package/internal/components/button-trigger/styles.scoped.css +131 -131
- package/internal/components/button-trigger/styles.selectors.js +23 -23
- package/internal/components/cartesian-chart/styles.css.js +28 -28
- package/internal/components/cartesian-chart/styles.scoped.css +44 -44
- package/internal/components/cartesian-chart/styles.selectors.js +28 -28
- package/internal/components/chart-filter/styles.css.js +3 -3
- package/internal/components/chart-filter/styles.scoped.css +8 -8
- package/internal/components/chart-filter/styles.selectors.js +3 -3
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +26 -26
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/styles.css.js +5 -5
- package/internal/components/chart-plot/styles.scoped.css +6 -6
- package/internal/components/chart-plot/styles.selectors.js +5 -5
- package/internal/components/chart-popover/styles.css.js +3 -3
- package/internal/components/chart-popover/styles.scoped.css +12 -12
- package/internal/components/chart-popover/styles.selectors.js +3 -3
- package/internal/components/chart-series-details/styles.css.js +19 -19
- package/internal/components/chart-series-details/styles.scoped.css +58 -58
- package/internal/components/chart-series-details/styles.selectors.js +19 -19
- package/internal/components/chart-series-marker/styles.css.js +5 -5
- package/internal/components/chart-series-marker/styles.scoped.css +15 -15
- package/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/internal/components/chart-status-container/styles.css.js +2 -2
- package/internal/components/chart-status-container/styles.scoped.css +3 -3
- package/internal/components/chart-status-container/styles.selectors.js +2 -2
- package/internal/components/chart-wrapper/styles.css.js +9 -9
- package/internal/components/chart-wrapper/styles.scoped.css +16 -16
- package/internal/components/chart-wrapper/styles.selectors.js +9 -9
- package/internal/components/checkbox-icon/styles.css.js +9 -9
- package/internal/components/checkbox-icon/styles.scoped.css +20 -20
- package/internal/components/checkbox-icon/styles.selectors.js +9 -9
- package/internal/components/control-group/styles.css.js +16 -16
- package/internal/components/control-group/styles.scoped.css +34 -34
- package/internal/components/control-group/styles.selectors.js +16 -16
- package/internal/components/drag-handle/styles.css.js +14 -14
- package/internal/components/drag-handle/styles.scoped.css +32 -32
- package/internal/components/drag-handle/styles.selectors.js +14 -14
- package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/internal/components/drag-handle-wrapper/styles.scoped.css +80 -80
- package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/internal/components/dropdown-footer/styles.css.js +3 -3
- package/internal/components/dropdown-footer/styles.scoped.css +10 -10
- package/internal/components/dropdown-footer/styles.selectors.js +3 -3
- package/internal/components/dropdown-status/styles.css.js +2 -2
- package/internal/components/dropdown-status/styles.scoped.css +11 -11
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/expand-toggle-button/styles.css.js +4 -4
- package/internal/components/expand-toggle-button/styles.scoped.css +34 -34
- package/internal/components/expand-toggle-button/styles.selectors.js +4 -4
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +35 -35
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/option/interfaces.d.ts +1 -1
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/components/option/styles.css.js +17 -17
- package/internal/components/option/styles.scoped.css +50 -50
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/components/options-list/styles.css.js +3 -3
- package/internal/components/options-list/styles.scoped.css +12 -12
- package/internal/components/options-list/styles.selectors.js +3 -3
- package/internal/components/panel-resize-handle/styles.css.js +3 -3
- package/internal/components/panel-resize-handle/styles.scoped.css +12 -12
- package/internal/components/panel-resize-handle/styles.selectors.js +3 -3
- package/internal/components/radio-button/styles.css.js +7 -7
- package/internal/components/radio-button/styles.scoped.css +33 -33
- package/internal/components/radio-button/styles.selectors.js +7 -7
- package/internal/components/selectable-item/styles.css.js +22 -22
- package/internal/components/selectable-item/styles.scoped.css +118 -118
- package/internal/components/selectable-item/styles.selectors.js +22 -22
- package/internal/components/sortable-area/styles.css.js +8 -8
- package/internal/components/sortable-area/styles.scoped.css +50 -50
- package/internal/components/sortable-area/styles.selectors.js +8 -8
- package/internal/components/structured-item/styles.css.js +7 -7
- package/internal/components/structured-item/styles.scoped.css +16 -16
- package/internal/components/structured-item/styles.selectors.js +7 -7
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +55 -55
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.js +1167 -1167
- package/internal/generated/theming/index.cjs +1167 -1167
- package/internal/generated/theming/index.js +1167 -1167
- package/internal/hooks/use-hidden-description/index.d.ts +2 -1
- package/internal/hooks/use-hidden-description/index.d.ts.map +1 -1
- package/internal/hooks/use-hidden-description/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/item-card/styles.css.js +14 -14
- package/item-card/styles.scoped.css +114 -114
- package/item-card/styles.selectors.js +14 -14
- package/key-value-pairs/styles.css.js +8 -8
- package/key-value-pairs/styles.scoped.css +32 -32
- package/key-value-pairs/styles.selectors.js +8 -8
- package/link/styles.css.js +21 -21
- package/link/styles.scoped.css +187 -187
- package/link/styles.selectors.js +21 -21
- package/list/styles.css.js +5 -5
- package/list/styles.scoped.css +15 -15
- package/list/styles.selectors.js +5 -5
- package/manifest.json +2 -2
- package/mixed-line-bar-chart/styles.css.js +11 -11
- package/mixed-line-bar-chart/styles.scoped.css +22 -22
- package/mixed-line-bar-chart/styles.selectors.js +11 -11
- package/modal/styles.css.js +32 -32
- package/modal/styles.scoped.css +90 -90
- package/modal/styles.selectors.js +32 -32
- package/multiselect/styles.css.js +5 -5
- package/multiselect/styles.scoped.css +16 -16
- package/multiselect/styles.selectors.js +5 -5
- package/package.json +1 -1
- package/pagination/styles.css.js +12 -12
- package/pagination/styles.scoped.css +67 -67
- package/pagination/styles.selectors.js +12 -12
- package/panel-layout/styles.css.js +7 -7
- package/panel-layout/styles.scoped.css +25 -25
- package/panel-layout/styles.selectors.js +7 -7
- package/pie-chart/styles.css.js +27 -27
- package/pie-chart/styles.scoped.css +73 -73
- package/pie-chart/styles.selectors.js +27 -27
- package/popover/styles.css.js +58 -58
- package/popover/styles.scoped.css +171 -171
- package/popover/styles.selectors.js +58 -58
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +58 -58
- package/progress-bar/styles.selectors.js +19 -19
- package/prompt-input/styles.css.js +26 -26
- package/prompt-input/styles.scoped.css +167 -167
- package/prompt-input/styles.selectors.js +26 -26
- package/property-filter/filtering-token/styles.css.js +18 -18
- package/property-filter/filtering-token/styles.scoped.css +85 -85
- package/property-filter/filtering-token/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +39 -39
- package/property-filter/styles.scoped.css +109 -109
- package/property-filter/styles.selectors.js +39 -39
- package/radio-button/styles.css.js +1 -1
- package/radio-button/styles.scoped.css +6 -6
- package/radio-button/styles.selectors.js +1 -1
- package/radio-group/styles.css.js +5 -5
- package/radio-group/styles.scoped.css +15 -15
- package/radio-group/styles.selectors.js +5 -5
- package/s3-resource-selector/s3-in-context/styles.css.js +7 -7
- package/s3-resource-selector/s3-in-context/styles.scoped.css +14 -14
- package/s3-resource-selector/s3-in-context/styles.selectors.js +7 -7
- package/s3-resource-selector/s3-modal/styles.css.js +3 -3
- package/s3-resource-selector/s3-modal/styles.scoped.css +7 -7
- package/s3-resource-selector/s3-modal/styles.selectors.js +3 -3
- package/segmented-control/interfaces.d.ts +2 -2
- package/segmented-control/interfaces.d.ts.map +1 -1
- package/segmented-control/interfaces.js.map +1 -1
- package/segmented-control/styles.css.js +27 -27
- package/segmented-control/styles.scoped.css +109 -109
- package/segmented-control/styles.selectors.js +27 -27
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/parts/styles.css.js +21 -21
- package/select/parts/styles.scoped.css +46 -46
- package/select/parts/styles.selectors.js +21 -21
- package/select/styles.css.js +3 -3
- package/select/styles.scoped.css +8 -8
- package/select/styles.selectors.js +3 -3
- package/side-navigation/styles.css.js +64 -64
- package/side-navigation/styles.scoped.css +237 -237
- package/side-navigation/styles.selectors.js +64 -64
- package/skeleton/styles.css.js +15 -15
- package/skeleton/styles.scoped.css +47 -47
- package/skeleton/styles.selectors.js +15 -15
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +201 -201
- package/slider/styles.selectors.js +26 -26
- package/space-between/styles.css.js +24 -24
- package/space-between/styles.scoped.css +41 -41
- package/space-between/styles.selectors.js +24 -24
- package/spinner/styles.css.js +14 -14
- package/spinner/styles.scoped.css +42 -42
- package/spinner/styles.selectors.js +14 -14
- package/split-panel/icons/styles.css.js +22 -22
- package/split-panel/icons/styles.scoped.css +47 -47
- package/split-panel/icons/styles.selectors.js +22 -22
- package/split-panel/styles.css.js +38 -38
- package/split-panel/styles.scoped.css +109 -109
- package/split-panel/styles.selectors.js +38 -38
- package/status-indicator/styles.css.js +26 -26
- package/status-indicator/styles.scoped.css +90 -90
- package/status-indicator/styles.selectors.js +26 -26
- package/steps/styles.css.js +17 -17
- package/steps/styles.scoped.css +60 -60
- package/steps/styles.selectors.js +17 -17
- package/table/body-cell/disabled-inline-editor.d.ts +2 -1
- package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
- package/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/table/body-cell/styles.css.js +47 -47
- package/table/body-cell/styles.scoped.css +886 -886
- package/table/body-cell/styles.selectors.js +47 -47
- package/table/header-cell/styles.css.js +39 -39
- package/table/header-cell/styles.scoped.css +225 -225
- package/table/header-cell/styles.selectors.js +39 -39
- package/table/interfaces.d.ts +5 -3
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/resizer/styles.css.js +17 -17
- package/table/resizer/styles.scoped.css +54 -54
- package/table/resizer/styles.selectors.js +17 -17
- package/table/selection/styles.css.js +4 -4
- package/table/selection/styles.scoped.css +6 -6
- package/table/selection/styles.selectors.js +4 -4
- package/table/sticky-scrollbar/styles.css.js +6 -6
- package/table/sticky-scrollbar/styles.scoped.css +12 -12
- package/table/sticky-scrollbar/styles.selectors.js +6 -6
- package/table/styles.css.js +37 -37
- package/table/styles.scoped.css +93 -93
- package/table/styles.selectors.js +37 -37
- package/table-body-cell/styles.css.js +2 -2
- package/table-body-cell/styles.scoped.css +12 -12
- package/table-body-cell/styles.selectors.js +2 -2
- package/table-header-cell/styles.css.js +6 -6
- package/table-header-cell/styles.scoped.css +14 -14
- package/table-header-cell/styles.selectors.js +6 -6
- package/table-root/styles.css.js +5 -5
- package/table-root/styles.scoped.css +17 -17
- package/table-root/styles.selectors.js +5 -5
- package/table-row/styles.css.js +2 -2
- package/table-row/styles.scoped.css +13 -13
- package/table-row/styles.selectors.js +2 -2
- package/tabs/interfaces.d.ts +4 -2
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/tabs/styles.css.js +30 -30
- package/tabs/styles.scoped.css +123 -123
- package/tabs/styles.selectors.js +30 -30
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +29 -29
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +149 -149
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/styles.css.js +3 -3
- package/text-filter/styles.scoped.css +11 -11
- package/text-filter/styles.selectors.js +3 -3
- package/textarea/styles.css.js +9 -9
- package/textarea/styles.scoped.css +62 -62
- package/textarea/styles.selectors.js +9 -9
- package/tiles/styles.css.js +30 -30
- package/tiles/styles.scoped.css +165 -165
- package/tiles/styles.selectors.js +30 -30
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +38 -38
- package/toggle/styles.selectors.js +10 -10
- package/toggle-button/interfaces.d.ts +3 -1
- package/toggle-button/interfaces.d.ts.map +1 -1
- package/toggle-button/interfaces.js.map +1 -1
- package/toggle-button/styles.css.js +4 -4
- package/toggle-button/styles.scoped.css +12 -12
- package/toggle-button/styles.selectors.js +4 -4
- package/token/styles.css.js +14 -14
- package/token/styles.scoped.css +80 -80
- package/token/styles.selectors.js +14 -14
- package/token-group/styles.css.js +5 -5
- package/token-group/styles.scoped.css +10 -10
- package/token-group/styles.selectors.js +5 -5
- package/tooltip/styles.css.js +2 -2
- package/tooltip/styles.scoped.css +5 -5
- package/tooltip/styles.selectors.js +2 -2
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +168 -168
- package/top-navigation/styles.selectors.js +47 -47
- package/tree-view/styles.css.js +2 -2
- package/tree-view/styles.scoped.css +12 -12
- package/tree-view/styles.selectors.js +2 -2
- package/tree-view/tree-item/styles.css.js +10 -10
- package/tree-view/tree-item/styles.scoped.css +20 -20
- package/tree-view/tree-item/styles.selectors.js +10 -10
- package/tree-view/vertical-connector/styles.css.js +3 -3
- package/tree-view/vertical-connector/styles.scoped.css +8 -8
- package/tree-view/vertical-connector/styles.selectors.js +3 -3
- package/truncated-text/styles.css.js +1 -1
- package/truncated-text/styles.scoped.css +10 -10
- package/truncated-text/styles.selectors.js +1 -1
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +45 -45
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +63 -63
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/tutorial-panel/styles.css.js +1 -1
- package/tutorial-panel/styles.scoped.css +17 -17
- package/tutorial-panel/styles.selectors.js +1 -1
- package/types/option.d.ts +1 -1
- package/types/option.d.ts.map +1 -1
- package/types/option.js.map +1 -1
- package/wizard/styles.css.js +30 -30
- package/wizard/styles.scoped.css +122 -122
- package/wizard/styles.selectors.js +30 -30
|
@@ -6,133 +6,133 @@
|
|
|
6
6
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
7
7
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
8
8
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
9
|
-
.awsui_button-
|
|
9
|
+
.awsui_button-dropdown_sne0l_v85dm_9:not(#\9) {
|
|
10
10
|
display: inline-block;
|
|
11
11
|
}
|
|
12
|
-
.awsui_button-
|
|
12
|
+
.awsui_button-dropdown_sne0l_v85dm_9.awsui_full-width_sne0l_v85dm_12:not(#\9) {
|
|
13
13
|
inline-size: 100%;
|
|
14
14
|
display: block;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.awsui_items-list-
|
|
17
|
+
.awsui_items-list-container_sne0l_v85dm_17:not(#\9) {
|
|
18
18
|
padding-block: 0;
|
|
19
19
|
padding-inline: 0;
|
|
20
20
|
margin-block: 0;
|
|
21
21
|
margin-inline: 0;
|
|
22
|
-
animation: awsui_awsui-motion-fade-in-
|
|
22
|
+
animation: awsui_awsui-motion-fade-in-0_sne0l_v85dm_1 500ms var(--motion-easing-show-quick-mfgaht, ease-out);
|
|
23
23
|
animation-fill-mode: none;
|
|
24
24
|
}
|
|
25
25
|
@media (prefers-reduced-motion: reduce) {
|
|
26
|
-
.awsui_items-list-
|
|
26
|
+
.awsui_items-list-container_sne0l_v85dm_17:not(#\9) {
|
|
27
27
|
animation: none;
|
|
28
28
|
transition: none;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
.awsui-motion-disabled .awsui_items-list-
|
|
31
|
+
.awsui-motion-disabled .awsui_items-list-container_sne0l_v85dm_17:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_v85dm_17:not(#\9) {
|
|
32
32
|
animation: none;
|
|
33
33
|
transition: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.awsui_rotate_sne0l_v85dm_36:not(#\9) {
|
|
37
37
|
transform: rotate(0deg);
|
|
38
|
-
transition: transform var(--motion-duration-rotate-180-
|
|
38
|
+
transition: transform var(--motion-duration-rotate-180-sdkywx, 135ms) var(--motion-easing-rotate-180-oh461e, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
39
39
|
}
|
|
40
40
|
@media (prefers-reduced-motion: reduce) {
|
|
41
|
-
.
|
|
41
|
+
.awsui_rotate_sne0l_v85dm_36:not(#\9) {
|
|
42
42
|
animation: none;
|
|
43
43
|
transition: none;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
.awsui-motion-disabled .
|
|
46
|
+
.awsui-motion-disabled .awsui_rotate_sne0l_v85dm_36:not(#\9), .awsui-mode-entering .awsui_rotate_sne0l_v85dm_36:not(#\9) {
|
|
47
47
|
animation: none;
|
|
48
48
|
transition: none;
|
|
49
49
|
}
|
|
50
|
-
.awsui_rotate-
|
|
50
|
+
.awsui_rotate-open_sne0l_v85dm_50:not(#\9) {
|
|
51
51
|
transform: rotate(-180deg);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
.awsui_header_sne0l_v85dm_54:not(#\9) {
|
|
55
55
|
display: flex;
|
|
56
56
|
flex-direction: column;
|
|
57
57
|
list-style: none;
|
|
58
|
-
padding-block: var(--space-s-
|
|
59
|
-
padding-inline: var(--space-l-
|
|
60
|
-
border-block-start: var(--border-width-dropdown-
|
|
61
|
-
border-block-end: var(--border-width-dropdown-
|
|
62
|
-
border-inline: var(--border-width-dropdown-
|
|
58
|
+
padding-block: var(--space-s-f4zmjb, 12px);
|
|
59
|
+
padding-inline: var(--space-l-e5i7qp, 20px);
|
|
60
|
+
border-block-start: var(--border-width-dropdown-wkfz4e, 2px) solid transparent;
|
|
61
|
+
border-block-end: var(--border-width-dropdown-wkfz4e, 2px) solid var(--color-border-dropdown-group-xlzbiz, #c6c6cd);
|
|
62
|
+
border-inline: var(--border-width-dropdown-wkfz4e, 2px) solid transparent;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
66
|
-
.
|
|
67
|
-
color: var(--color-text-top-navigation-title-
|
|
65
|
+
.awsui_title_sne0l_v85dm_65:not(#\9),
|
|
66
|
+
.awsui_description_sne0l_v85dm_66:not(#\9) {
|
|
67
|
+
color: var(--color-text-top-navigation-title-pcgx23, #0f141a);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.awsui_trigger-
|
|
70
|
+
.awsui_trigger-button_sne0l_v85dm_70.awsui_full-width_sne0l_v85dm_12:not(#\9) {
|
|
71
71
|
display: grid;
|
|
72
72
|
grid-template-columns: 1fr auto;
|
|
73
73
|
}
|
|
74
|
-
.awsui_trigger-
|
|
74
|
+
.awsui_trigger-button_sne0l_v85dm_70.awsui_full-width_sne0l_v85dm_12.awsui_loading_sne0l_v85dm_74:not(#\9) {
|
|
75
75
|
grid-template-columns: auto 1fr auto;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.awsui_split-trigger-
|
|
78
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78:not(#\9) {
|
|
79
79
|
display: flex;
|
|
80
80
|
}
|
|
81
|
-
.awsui_split-trigger-
|
|
81
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81 > .awsui_trigger-button_sne0l_v85dm_70:not(#\9):focus, .awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81 > .awsui_trigger-button_sne0l_v85dm_70:not(#\9):hover {
|
|
82
82
|
z-index: 1;
|
|
83
83
|
}
|
|
84
|
-
.awsui_split-trigger-
|
|
84
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_v85dm_70 {
|
|
85
85
|
border-start-end-radius: 0;
|
|
86
86
|
border-end-end-radius: 0;
|
|
87
|
-
padding-inline-end: var(--space-m-
|
|
88
|
-
margin-inline-end: var(--space-xxxs-
|
|
87
|
+
padding-inline-end: var(--space-m-txio36, 16px);
|
|
88
|
+
margin-inline-end: var(--space-xxxs-elf9ja, 2px);
|
|
89
89
|
}
|
|
90
|
-
.awsui_split-trigger-
|
|
91
|
-
padding-inline: var(--space-button-icon-only-horizontal-
|
|
90
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_v85dm_70.awsui_has-no-text_sne0l_v85dm_90 {
|
|
91
|
+
padding-inline: var(--space-button-icon-only-horizontal-4f7dwa, 6px);
|
|
92
92
|
}
|
|
93
|
-
.awsui_split-trigger-
|
|
94
|
-
padding-inline-start: calc(var(--space-s-
|
|
93
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_v85dm_70.awsui_has-no-text_sne0l_v85dm_90.awsui_visual-refresh_sne0l_v85dm_93 {
|
|
94
|
+
padding-inline-start: calc(var(--space-s-f4zmjb, 12px) - 2px);
|
|
95
95
|
}
|
|
96
|
-
.awsui_split-trigger-
|
|
96
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_v85dm_70 {
|
|
97
97
|
border-start-start-radius: 0;
|
|
98
98
|
border-end-start-radius: 0;
|
|
99
|
-
padding-inline: calc(var(--space-xs-
|
|
99
|
+
padding-inline: calc(var(--space-xs-3yjatw, 8px) - 2px);
|
|
100
100
|
}
|
|
101
|
-
.awsui_split-trigger-
|
|
102
|
-
padding-inline-end: calc(var(--space-s-
|
|
101
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_v85dm_93 > .awsui_trigger-button_sne0l_v85dm_70 {
|
|
102
|
+
padding-inline-end: calc(var(--space-s-f4zmjb, 12px) - 2px);
|
|
103
103
|
}
|
|
104
|
-
.awsui_split-trigger-
|
|
104
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81:not(#\9):not(:first-child).awsui_has-trigger-text_sne0l_v85dm_104 {
|
|
105
105
|
/* this comment keeps the class in the style sheet */
|
|
106
106
|
}
|
|
107
|
-
.awsui_split-trigger-
|
|
107
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81.awsui_variant-normal_sne0l_v85dm_107:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_v85dm_70 {
|
|
108
108
|
margin-inline-end: 0;
|
|
109
109
|
}
|
|
110
|
-
.awsui_split-trigger-
|
|
111
|
-
margin-inline-start: calc(var(--border-width-button-
|
|
110
|
+
.awsui_split-trigger-wrapper_sne0l_v85dm_78 > .awsui_trigger-item_sne0l_v85dm_81.awsui_variant-normal_sne0l_v85dm_107:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_v85dm_70 {
|
|
111
|
+
margin-inline-start: calc(var(--border-width-button-7l951k, 2px) * -1);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.awsui_split-
|
|
114
|
+
.awsui_split-trigger_sne0l_v85dm_78:not(#\9) {
|
|
115
115
|
display: contents;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.awsui_dropdown-
|
|
118
|
+
.awsui_dropdown-trigger_sne0l_v85dm_118:not(#\9) {
|
|
119
119
|
display: contents;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
.awsui_main-action-full-
|
|
122
|
+
.awsui_main-action-full-width_sne0l_v85dm_122:not(#\9) {
|
|
123
123
|
flex: 1 1 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.awsui_main-action-trigger-full-
|
|
126
|
+
.awsui_main-action-trigger-full-width_sne0l_v85dm_126:not(#\9) {
|
|
127
127
|
flex: 0 0 auto;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.
|
|
130
|
+
.awsui_filter_sne0l_v85dm_130:not(#\9) {
|
|
131
131
|
position: relative;
|
|
132
132
|
z-index: 4;
|
|
133
133
|
flex-shrink: 0;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.awsui_test-utils-button-
|
|
136
|
+
.awsui_test-utils-button-trigger_sne0l_v85dm_136:not(#\9) {
|
|
137
137
|
/* used in test-utils */
|
|
138
138
|
}
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button-dropdown": "awsui_button-
|
|
6
|
-
"full-width": "awsui_full-
|
|
7
|
-
"items-list-container": "awsui_items-list-
|
|
8
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
9
|
-
"rotate": "
|
|
10
|
-
"rotate-open": "awsui_rotate-
|
|
11
|
-
"header": "
|
|
12
|
-
"title": "
|
|
13
|
-
"description": "
|
|
14
|
-
"trigger-button": "awsui_trigger-
|
|
15
|
-
"loading": "
|
|
16
|
-
"split-trigger-wrapper": "awsui_split-trigger-
|
|
17
|
-
"trigger-item": "awsui_trigger-
|
|
18
|
-
"has-no-text": "awsui_has-no-
|
|
19
|
-
"visual-refresh": "awsui_visual-
|
|
20
|
-
"has-trigger-text": "awsui_has-trigger-
|
|
21
|
-
"variant-normal": "awsui_variant-
|
|
22
|
-
"split-trigger": "awsui_split-
|
|
23
|
-
"dropdown-trigger": "awsui_dropdown-
|
|
24
|
-
"main-action-full-width": "awsui_main-action-full-
|
|
25
|
-
"main-action-trigger-full-width": "awsui_main-action-trigger-full-
|
|
26
|
-
"filter": "
|
|
27
|
-
"test-utils-button-trigger": "awsui_test-utils-button-
|
|
5
|
+
"button-dropdown": "awsui_button-dropdown_sne0l_v85dm_9",
|
|
6
|
+
"full-width": "awsui_full-width_sne0l_v85dm_12",
|
|
7
|
+
"items-list-container": "awsui_items-list-container_sne0l_v85dm_17",
|
|
8
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_v85dm_1",
|
|
9
|
+
"rotate": "awsui_rotate_sne0l_v85dm_36",
|
|
10
|
+
"rotate-open": "awsui_rotate-open_sne0l_v85dm_50",
|
|
11
|
+
"header": "awsui_header_sne0l_v85dm_54",
|
|
12
|
+
"title": "awsui_title_sne0l_v85dm_65",
|
|
13
|
+
"description": "awsui_description_sne0l_v85dm_66",
|
|
14
|
+
"trigger-button": "awsui_trigger-button_sne0l_v85dm_70",
|
|
15
|
+
"loading": "awsui_loading_sne0l_v85dm_74",
|
|
16
|
+
"split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_v85dm_78",
|
|
17
|
+
"trigger-item": "awsui_trigger-item_sne0l_v85dm_81",
|
|
18
|
+
"has-no-text": "awsui_has-no-text_sne0l_v85dm_90",
|
|
19
|
+
"visual-refresh": "awsui_visual-refresh_sne0l_v85dm_93",
|
|
20
|
+
"has-trigger-text": "awsui_has-trigger-text_sne0l_v85dm_104",
|
|
21
|
+
"variant-normal": "awsui_variant-normal_sne0l_v85dm_107",
|
|
22
|
+
"split-trigger": "awsui_split-trigger_sne0l_v85dm_78",
|
|
23
|
+
"dropdown-trigger": "awsui_dropdown-trigger_sne0l_v85dm_118",
|
|
24
|
+
"main-action-full-width": "awsui_main-action-full-width_sne0l_v85dm_122",
|
|
25
|
+
"main-action-trigger-full-width": "awsui_main-action-trigger-full-width_sne0l_v85dm_126",
|
|
26
|
+
"filter": "awsui_filter_sne0l_v85dm_130",
|
|
27
|
+
"test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_v85dm_136"
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ export interface ButtonGroupProps extends BaseComponentProps {
|
|
|
35
35
|
* * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.
|
|
36
36
|
* * `text` (string) - The name shown as a tooltip for this button.
|
|
37
37
|
* * `disabled` (optional, boolean) - The disabled state indication for this button.
|
|
38
|
-
* * `disabledReason` (optional,
|
|
38
|
+
* * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.
|
|
39
39
|
* * `loading` (optional, boolean) - The loading state indication for this button.
|
|
40
40
|
* * `loadingText` (optional, string) - The loading text announced to screen readers.
|
|
41
41
|
* * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).
|
|
@@ -54,7 +54,7 @@ export interface ButtonGroupProps extends BaseComponentProps {
|
|
|
54
54
|
* * `pressed` (boolean) - The toggle button pressed state.
|
|
55
55
|
* * `text` (string) - The name shown as a tooltip for this button.
|
|
56
56
|
* * `disabled` (optional, boolean) - The disabled state indication for this button.
|
|
57
|
-
* * `disabledReason` (optional,
|
|
57
|
+
* * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.
|
|
58
58
|
* * `loading` (optional, boolean) - The loading state indication for this button.
|
|
59
59
|
* * `loadingText` (optional, string) - The loading text announced to screen readers.
|
|
60
60
|
* * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).
|
|
@@ -78,7 +78,7 @@ export interface ButtonGroupProps extends BaseComponentProps {
|
|
|
78
78
|
* * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.
|
|
79
79
|
* * `text` (string) - The name of the menu button shown as a tooltip.
|
|
80
80
|
* * `disabled` (optional, boolean) - The disabled state indication for the menu button.
|
|
81
|
-
* * `disabledReason` (optional,
|
|
81
|
+
* * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.
|
|
82
82
|
* * `loading` (optional, boolean) - The loading state indication for the menu button.
|
|
83
83
|
* * `loadingText` (optional, string) - The loading text announced to screen readers.
|
|
84
84
|
* * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/). Defaults to `ellipsis`.
|
|
@@ -95,7 +95,7 @@ export interface ButtonGroupProps extends BaseComponentProps {
|
|
|
95
95
|
* * `copySuccessText` (string) - The message announced to screen readers and shown as a popover when the text is copied successfully.
|
|
96
96
|
* * `copyErrorText` (string) - The message announced to screen readers and shown as a popover when the text fails to copy.
|
|
97
97
|
* * `disabled` (optional, boolean) - The disabled state indication for this button.
|
|
98
|
-
* * `disabledReason` (optional,
|
|
98
|
+
* * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.
|
|
99
99
|
*
|
|
100
100
|
* ### group
|
|
101
101
|
*
|
|
@@ -126,18 +126,27 @@ export interface ButtonGroupProps extends BaseComponentProps {
|
|
|
126
126
|
*/
|
|
127
127
|
style?: ButtonGroupProps.Style;
|
|
128
128
|
}
|
|
129
|
-
export interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {
|
|
129
|
+
export interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback' | 'disabledReason'> {
|
|
130
130
|
iconSvg?: string;
|
|
131
|
+
disabledReason?: string;
|
|
131
132
|
}
|
|
132
|
-
export interface IconToggleButtonRuntime extends Omit<ButtonGroupProps.IconToggleButton, 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'> {
|
|
133
|
+
export interface IconToggleButtonRuntime extends Omit<ButtonGroupProps.IconToggleButton, 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback' | 'disabledReason'> {
|
|
133
134
|
iconSvg?: string;
|
|
134
135
|
pressedIconSvg?: string;
|
|
136
|
+
disabledReason?: string;
|
|
135
137
|
}
|
|
136
|
-
export interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg'> {
|
|
138
|
+
export interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg' | 'disabledReason'> {
|
|
137
139
|
iconSvg?: string;
|
|
140
|
+
disabledReason?: string;
|
|
138
141
|
}
|
|
139
|
-
export
|
|
140
|
-
|
|
142
|
+
export interface IconCopyToClipboardRuntime extends Omit<ButtonGroupProps.IconCopyToClipboard, 'disabledReason'> {
|
|
143
|
+
disabledReason?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface GroupRuntime extends Omit<ButtonGroupProps.Group, 'items'> {
|
|
146
|
+
items: ReadonlyArray<ItemRuntime>;
|
|
147
|
+
}
|
|
148
|
+
export type ItemOrGroupRuntime = ItemRuntime | GroupRuntime;
|
|
149
|
+
export type ItemRuntime = IconButtonRuntime | IconToggleButtonRuntime | ButtonGroupProps.IconFileInput | MenuDropdownRuntime | IconCopyToClipboardRuntime;
|
|
141
150
|
export declare namespace ButtonGroupProps {
|
|
142
151
|
type Variant = 'icon';
|
|
143
152
|
type ItemOrGroup = Item | Group;
|
|
@@ -147,7 +156,7 @@ export declare namespace ButtonGroupProps {
|
|
|
147
156
|
id: string;
|
|
148
157
|
text: string;
|
|
149
158
|
disabled?: boolean;
|
|
150
|
-
disabledReason?:
|
|
159
|
+
disabledReason?: React.ReactNode;
|
|
151
160
|
loading?: boolean;
|
|
152
161
|
loadingText?: string;
|
|
153
162
|
iconName?: IconProps.Name;
|
|
@@ -166,7 +175,7 @@ export declare namespace ButtonGroupProps {
|
|
|
166
175
|
text: string;
|
|
167
176
|
pressed: boolean;
|
|
168
177
|
disabled?: boolean;
|
|
169
|
-
disabledReason?:
|
|
178
|
+
disabledReason?: React.ReactNode;
|
|
170
179
|
loading?: boolean;
|
|
171
180
|
loadingText?: string;
|
|
172
181
|
iconName?: IconProps.Name;
|
|
@@ -190,7 +199,7 @@ export declare namespace ButtonGroupProps {
|
|
|
190
199
|
id: string;
|
|
191
200
|
text: string;
|
|
192
201
|
disabled?: boolean;
|
|
193
|
-
disabledReason?:
|
|
202
|
+
disabledReason?: React.ReactNode;
|
|
194
203
|
loading?: boolean;
|
|
195
204
|
loadingText?: string;
|
|
196
205
|
iconName?: IconProps.Name;
|
|
@@ -207,7 +216,7 @@ export declare namespace ButtonGroupProps {
|
|
|
207
216
|
copySuccessText: string;
|
|
208
217
|
copyErrorText: string;
|
|
209
218
|
disabled?: boolean;
|
|
210
|
-
disabledReason?:
|
|
219
|
+
disabledReason?: React.ReactNode;
|
|
211
220
|
}
|
|
212
221
|
interface Group {
|
|
213
222
|
type: 'group';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO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[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `href` (optional, string) - Renders the button as a link with the specified URL. Use for actions that navigate, such as opening a page in a new browser tab.\n * * `target` (optional, string) - Specifies where to open the linked URL (for example, `_blank` to open in a new tab). This property only applies when `href` is set.\n * * `rel` (optional, string) - Adds a `rel` attribute to the link. By default, the component sets `rel` to \"noopener noreferrer\" when `target` is `\"_blank\"`. This property only applies when `href` is set.\n * * `download` (optional, boolean | string) - Specifies whether the linked URL, when selected, prompts the user to download instead of navigate. You can provide a string to suggest a file name. This property only applies when `href` is set.\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * * ### file-input\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.\n * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/). Defaults to `ellipsis`.\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### icon-copy-to-clipboard\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onCopySuccess` and `onCopyFailure` handlers and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `textToCopy` (string) - The text that is copied to the clipboard when the button is activated.\n * * `copySuccessText` (string) - The message announced to screen readers and shown as a popover when the text is copied successfully.\n * * `copyErrorText` (string) - The message announced to screen readers and shown as a popover when the text fails to copy.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n /**\n * Called when the user uploads files. The event detail object contains the id and files from the file input item.\n */\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n /**\n * Called when the text is successfully copied to the clipboard.\n */\n onCopySuccess?: NonCancelableEventHandler<ButtonGroupProps.CopySuccessDetail>;\n /**\n * Called when the copy operation fails.\n */\n onCopyFailure?: NonCancelableEventHandler<ButtonGroupProps.CopyFailureDetail>;\n /**\n * An object containing CSS properties to customize the button group's visual appearance.\n * Refer to the [style](/components/button-group/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\nexport interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {\n iconSvg?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n}\nexport interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg'> {\n iconSvg?: string;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | MenuDropdownRuntime\n | ButtonGroupProps.IconCopyToClipboard;\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown | IconCopyToClipboard;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface IconFileInput {\n type: 'icon-file-input';\n id: string;\n text: string;\n accept?: string;\n multiple?: boolean;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface IconCopyToClipboard {\n type: 'icon-copy-to-clipboard';\n id: string;\n text: string;\n textToCopy: string;\n copySuccessText: string;\n copyErrorText: string;\n disabled?: boolean;\n disabledReason?: string;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface FilesChangeDetails {\n id: string;\n files: File[];\n }\n export interface CopySuccessDetail {\n id: string;\n text: string;\n }\n\n export interface CopyFailureDetail {\n id: string;\n text: string;\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `href` (optional, string) - Renders the button as a link with the specified URL. Use for actions that navigate, such as opening a page in a new browser tab.\n * * `target` (optional, string) - Specifies where to open the linked URL (for example, `_blank` to open in a new tab). This property only applies when `href` is set.\n * * `rel` (optional, string) - Adds a `rel` attribute to the link. By default, the component sets `rel` to \"noopener noreferrer\" when `target` is `\"_blank\"`. This property only applies when `href` is set.\n * * `download` (optional, boolean | string) - Specifies whether the linked URL, when selected, prompts the user to download instead of navigate. You can provide a string to suggest a file name. This property only applies when `href` is set.\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * * ### file-input\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.\n * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/). Defaults to `ellipsis`.\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### icon-copy-to-clipboard\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onCopySuccess` and `onCopyFailure` handlers and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `textToCopy` (string) - The text that is copied to the clipboard when the button is activated.\n * * `copySuccessText` (string) - The message announced to screen readers and shown as a popover when the text is copied successfully.\n * * `copyErrorText` (string) - The message announced to screen readers and shown as a popover when the text fails to copy.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `disabledReason` (optional, ReactNode) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable. Do not place interactive elements like links or buttons.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n /**\n * Called when the user uploads files. The event detail object contains the id and files from the file input item.\n */\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n /**\n * Called when the text is successfully copied to the clipboard.\n */\n onCopySuccess?: NonCancelableEventHandler<ButtonGroupProps.CopySuccessDetail>;\n /**\n * Called when the copy operation fails.\n */\n onCopyFailure?: NonCancelableEventHandler<ButtonGroupProps.CopyFailureDetail>;\n /**\n * An object containing CSS properties to customize the button group's visual appearance.\n * Refer to the [style](/components/button-group/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\n// The runtime plugin API cannot carry React nodes, so node-typed properties are omitted or narrowed\n// to a string.\nexport interface IconButtonRuntime\n extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback' | 'disabledReason'> {\n iconSvg?: string;\n disabledReason?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback' | 'disabledReason'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n disabledReason?: string;\n}\nexport interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg' | 'disabledReason'> {\n iconSvg?: string;\n disabledReason?: string;\n}\nexport interface IconCopyToClipboardRuntime extends Omit<ButtonGroupProps.IconCopyToClipboard, 'disabledReason'> {\n disabledReason?: string;\n}\nexport interface GroupRuntime extends Omit<ButtonGroupProps.Group, 'items'> {\n items: ReadonlyArray<ItemRuntime>;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | GroupRuntime;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | MenuDropdownRuntime\n | IconCopyToClipboardRuntime;\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown | IconCopyToClipboard;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface IconFileInput {\n type: 'icon-file-input';\n id: string;\n text: string;\n accept?: string;\n multiple?: boolean;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface IconCopyToClipboard {\n type: 'icon-copy-to-clipboard';\n id: string;\n text: string;\n textToCopy: string;\n copySuccessText: string;\n copyErrorText: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface FilesChangeDetails {\n id: string;\n files: File[];\n }\n export interface CopySuccessDetail {\n id: string;\n text: string;\n }\n\n export interface CopyFailureDetail {\n id: string;\n text: string;\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"item-wrapper": "awsui_item-
|
|
6
|
-
"group": "
|
|
7
|
-
"divider": "
|
|
4
|
+
"root": "awsui_root_vdkpj_bqcy8_9",
|
|
5
|
+
"item-wrapper": "awsui_item-wrapper_vdkpj_bqcy8_45",
|
|
6
|
+
"group": "awsui_group_vdkpj_bqcy8_49",
|
|
7
|
+
"divider": "awsui_divider_vdkpj_bqcy8_53"
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
7
7
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
8
8
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
9
|
-
.
|
|
9
|
+
.awsui_root_vdkpj_bqcy8_9:not(#\9) {
|
|
10
10
|
border-collapse: separate;
|
|
11
11
|
border-spacing: 0;
|
|
12
12
|
box-sizing: border-box;
|
|
@@ -29,29 +29,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
29
29
|
visibility: visible;
|
|
30
30
|
white-space: normal;
|
|
31
31
|
word-spacing: normal;
|
|
32
|
-
font-size: var(--font-size-body-m-
|
|
33
|
-
line-height: var(--line-height-body-m-
|
|
34
|
-
color: var(--color-text-body-default-
|
|
35
|
-
font-weight: var(--font-weight-normal-
|
|
36
|
-
font-family: var(--font-family-base-
|
|
32
|
+
font-size: var(--font-size-body-m-diae7s, 14px);
|
|
33
|
+
line-height: var(--line-height-body-m-18p63n, 20px);
|
|
34
|
+
color: var(--color-text-body-default-9im48h, #0f141a);
|
|
35
|
+
font-weight: var(--font-weight-normal-jditlz, 400);
|
|
36
|
+
font-family: var(--font-family-base-khplu5, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
37
37
|
-webkit-font-smoothing: auto;
|
|
38
38
|
-moz-osx-font-smoothing: auto;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: row;
|
|
41
41
|
flex-wrap: wrap;
|
|
42
|
-
gap: var(--space-scaled-xs-
|
|
42
|
+
gap: var(--space-scaled-xs-65ylh6, 8px);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.awsui_item-
|
|
45
|
+
.awsui_item-wrapper_vdkpj_bqcy8_45:not(#\9) {
|
|
46
46
|
display: inline-block;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.awsui_group_vdkpj_bqcy8_49:not(#\9) {
|
|
50
50
|
display: contents;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.
|
|
54
|
-
background-color: var(--color-border-divider-default-
|
|
55
|
-
inline-size: var(--border-divider-section-width-
|
|
56
|
-
margin-block: var(--space-static-xs-
|
|
53
|
+
.awsui_divider_vdkpj_bqcy8_53:not(#\9) {
|
|
54
|
+
background-color: var(--color-border-divider-default-8vuq97, #c6c6cd);
|
|
55
|
+
inline-size: var(--border-divider-section-width-ljhehl, 1px);
|
|
56
|
+
margin-block: var(--space-static-xs-b6kz15, 8px);
|
|
57
57
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"item-wrapper": "awsui_item-
|
|
7
|
-
"group": "
|
|
8
|
-
"divider": "
|
|
5
|
+
"root": "awsui_root_vdkpj_bqcy8_9",
|
|
6
|
+
"item-wrapper": "awsui_item-wrapper_vdkpj_bqcy8_45",
|
|
7
|
+
"group": "awsui_group_vdkpj_bqcy8_49",
|
|
8
|
+
"divider": "awsui_divider_vdkpj_bqcy8_53"
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/calendar/grid/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAoB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,OAAO,gBAAgB,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE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C,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,mBACjC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,mBAClC,CAAC,SAAS;gBACzB,+FAA+F;gBAC/F,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EACzD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE;oBACrE,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC;oBAC3D,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,SAAS;oBAC5C,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,UAAU;oBAC9C,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,aAAa;oBAChD,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,EAAE,SAAS;iBAC3C,CAAC,EACF,cAAc,EAAE,oBAAoB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EACjE,UAAU,EAAE,UAAU;gBAEtB,8BAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,iBAAc,MAAM,IACtD,UAAU,CAAC,IAAI,CAAC,CACZ;gBAEP,oBAAC,gBAAgB,QAAE,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAoB,CACzE,CACZ,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACF,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, TdHTMLAttributes, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DatePickerProps } from '../../date-picker/interfaces';\nimport ScreenreaderOnly from '../../internal/components/screenreader-only/index.js';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { applyDisplayName } from '../../internal/utils/apply-display-name';\nimport Tooltip from '../../tooltip/internal.js';\nimport { CalendarProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\n/**\n * Calendar grid supports two mechanisms of keyboard navigation:\n * - Native screen-reader table navigation (semantic table markup);\n * - Keyboard arrow-keys navigation (a custom key-down handler).\n *\n * The implementation largely follows the w3 example (https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog) and shares the following issues:\n * - (table navigation) Chrome+VO - weekday is announced twice when navigating to the calendar's header;\n * - (table navigation) Safari+VO - \"dimmed\" state is announced twice;\n * - (table navigation) Firefox/Chrome+NVDA - cannot use table navigation if any cell has a focus;\n * - (keyboard navigation) Firefox+NVDA - every date is announced as \"not selected\";\n * - (keyboard navigation) Safari/Chrome+VO - weekdays are not announced;\n * - (keyboard navigation) Safari/Chrome+VO - dates are not announced as interactive (clickable or selectable);\n * - (keyboard navigation) Safari/Chrome+VO - date announcements are not interruptive and can be missed if navigating fast.\n */\n\nexport interface GridProps {\n isDateEnabled: DatePickerProps.IsDateEnabledFunction;\n dateDisabledReason: CalendarProps.DateDisabledReasonFunction;\n focusedDate: Date | null;\n focusableDate: Date | null;\n onSelectDate: (date: Date) => void;\n onFocusDate: (date: null | Date) => void;\n onChangePage: (date: Date) => void;\n selectedDate: Date | null;\n ariaLabelledby: string;\n header?: React.ReactNode;\n rows: ReadonlyArray<ReadonlyArray<Date>>;\n isCurrentPage: (date: Date) => boolean;\n renderDate: (date: Date) => string;\n renderDateAnnouncement: (date: Date, isOnCurrentDate: boolean) => string;\n isSameDate: (date: Date, baseDate: Date) => boolean;\n onGridKeyDownHandler: (event: React.KeyboardEvent<HTMLElement>) => void;\n referrerId?: string;\n}\n\ninterface GridCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n disabledReason?: string;\n referrerId?: string;\n}\n\nconst GridCell = forwardRef((props: GridCellProps, focusedDateRef: React.Ref<HTMLTableCellElement>) => {\n const { disabledReason, referrerId, ...rest } = props;\n const isDisabledWithReason = !!disabledReason;\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n const cellRef = useRef<HTMLTableCellElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n return (\n <td\n ref={useMergeRefs(focusedDateRef, cellRef)}\n {...(isDisabledWithReason ? targetProps : {})}\n {...rest}\n onFocus={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onBlur={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n onMouseEnter={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onMouseLeave={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n >\n {props.children}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n getTrack={() => cellRef.current}\n content={disabledReason!}\n onEscape={() => setShowTooltip(false)}\n referrerId={referrerId}\n />\n )}\n </>\n )}\n </td>\n );\n});\n\napplyDisplayName(GridCell, 'GridCell');\n\nexport default function Grid({\n isDateEnabled,\n dateDisabledReason,\n focusedDate,\n focusableDate,\n onSelectDate,\n selectedDate,\n ariaLabelledby,\n header,\n rows,\n isCurrentPage,\n renderDate,\n renderDateAnnouncement,\n isSameDate,\n onGridKeyDownHandler,\n referrerId,\n}: GridProps) {\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n // The focused date changes as a feedback to keyboard navigation in the grid.\n // Once changed, the corresponding date button needs to receive the actual focus.\n useEffectOnUpdate(() => {\n if (focusedDate && focusedDateRef.current) {\n (focusedDateRef.current as HTMLDivElement).focus();\n }\n }, [focusedDate]);\n\n const rowLength = rows[0].length;\n\n const denseGrid = rowLength > 3;\n\n return (\n <table\n role=\"grid\"\n className={clsx(styles['calendar-grid'], denseGrid && styles['calendar-grid-dense'])}\n aria-labelledby={ariaLabelledby}\n >\n {header}\n <tbody onKeyDown={onGridKeyDownHandler}>\n {rows.map((row, rowIndex) => (\n <tr key={rowIndex} className={styles['calendar-row']}>\n {row.map((date, dateIndex) => {\n const isFocusable = !!focusableDate && isSameDate(date, focusableDate);\n const isSelected = !!selectedDate && isSameDate(date, selectedDate);\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const disabledReason = dateDisabledReason(date);\n const isDisabledWithReason = !isEnabled && !!disabledReason;\n const isCurrentDate = isSameDate(date, new Date());\n\n // Can't be focused.\n let tabIndex = undefined;\n if (isFocusable && (isEnabled || isDisabledWithReason)) {\n // Next focus target.\n tabIndex = 0;\n } else if (isEnabled || isDisabledWithReason) {\n // Can be focused programmatically.\n tabIndex = -1;\n }\n\n return (\n <GridCell\n key={`${rowIndex}:${dateIndex}`}\n ref={tabIndex === 0 ? focusedDateRef : undefined}\n tabIndex={tabIndex}\n aria-current={isCurrentDate ? 'date' : undefined}\n aria-selected={isEnabled ? isSelected : undefined}\n aria-disabled={!isEnabled}\n // Do not attach click event when the date is disabled, otherwise VO+safari announces clickable\n onClick={isEnabled ? () => onSelectDate(date) : undefined}\n className={clsx(styles['calendar-grid-cell'], styles['calendar-date'], {\n [styles['calendar-date-current-page']]: isCurrentPage(date),\n [styles['calendar-date-enabled']]: isEnabled,\n [styles['calendar-date-selected']]: isSelected,\n [styles['calendar-date-current']]: isCurrentDate,\n [styles['calendar-date-dense']]: denseGrid,\n })}\n disabledReason={isDisabledWithReason ? disabledReason : undefined}\n referrerId={referrerId}\n >\n <span className={styles['date-inner']} aria-hidden=\"true\">\n {renderDate(date)}\n </span>\n {/* Screen-reader announcement for the focused date. */}\n <ScreenreaderOnly>{renderDateAnnouncement(date, isCurrentDate)}</ScreenreaderOnly>\n </GridCell>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cal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a,CAAC,CAAoB,CACzE,CACZ,CAAC;QACJ,CAAC,CAAC,CACC,CACN,CAAC,CACI,CACF,CACT,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, TdHTMLAttributes, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DatePickerProps } from '../../date-picker/interfaces';\nimport ScreenreaderOnly from '../../internal/components/screenreader-only/index.js';\nimport { useEffectOnUpdate } from '../../internal/hooks/use-effect-on-update';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { applyDisplayName } from '../../internal/utils/apply-display-name';\nimport Tooltip from '../../tooltip/internal.js';\nimport { CalendarProps } from '../interfaces';\n\nimport styles from '../styles.css.js';\n\n/**\n * Calendar grid supports two mechanisms of keyboard navigation:\n * - Native screen-reader table navigation (semantic table markup);\n * - Keyboard arrow-keys navigation (a custom key-down handler).\n *\n * The implementation largely follows the w3 example (https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog) and shares the following issues:\n * - (table navigation) Chrome+VO - weekday is announced twice when navigating to the calendar's header;\n * - (table navigation) Safari+VO - \"dimmed\" state is announced twice;\n * - (table navigation) Firefox/Chrome+NVDA - cannot use table navigation if any cell has a focus;\n * - (keyboard navigation) Firefox+NVDA - every date is announced as \"not selected\";\n * - (keyboard navigation) Safari/Chrome+VO - weekdays are not announced;\n * - (keyboard navigation) Safari/Chrome+VO - dates are not announced as interactive (clickable or selectable);\n * - (keyboard navigation) Safari/Chrome+VO - date announcements are not interruptive and can be missed if navigating fast.\n */\n\nexport interface GridProps {\n isDateEnabled: DatePickerProps.IsDateEnabledFunction;\n dateDisabledReason: CalendarProps.DateDisabledReasonFunction;\n focusedDate: Date | null;\n focusableDate: Date | null;\n onSelectDate: (date: Date) => void;\n onFocusDate: (date: null | Date) => void;\n onChangePage: (date: Date) => void;\n selectedDate: Date | null;\n ariaLabelledby: string;\n header?: React.ReactNode;\n rows: ReadonlyArray<ReadonlyArray<Date>>;\n isCurrentPage: (date: Date) => boolean;\n renderDate: (date: Date) => string;\n renderDateAnnouncement: (date: Date, isOnCurrentDate: boolean) => string;\n isSameDate: (date: Date, baseDate: Date) => boolean;\n onGridKeyDownHandler: (event: React.KeyboardEvent<HTMLElement>) => void;\n referrerId?: string;\n}\n\ninterface GridCellProps extends TdHTMLAttributes<HTMLTableCellElement> {\n disabledReason?: React.ReactNode;\n referrerId?: string;\n}\n\nconst GridCell = forwardRef((props: GridCellProps, focusedDateRef: React.Ref<HTMLTableCellElement>) => {\n const { disabledReason, referrerId, ...rest } = props;\n const isDisabledWithReason = !!disabledReason;\n const { targetProps, descriptionEl } = useHiddenDescription(disabledReason);\n const cellRef = useRef<HTMLTableCellElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n return (\n <td\n ref={useMergeRefs(focusedDateRef, cellRef)}\n {...(isDisabledWithReason ? targetProps : {})}\n {...rest}\n onFocus={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onBlur={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n onMouseEnter={() => (isDisabledWithReason ? setShowTooltip(true) : undefined)}\n onMouseLeave={() => (isDisabledWithReason ? setShowTooltip(false) : undefined)}\n >\n {props.children}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {showTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n getTrack={() => cellRef.current}\n content={disabledReason!}\n onEscape={() => setShowTooltip(false)}\n referrerId={referrerId}\n />\n )}\n </>\n )}\n </td>\n );\n});\n\napplyDisplayName(GridCell, 'GridCell');\n\nexport default function Grid({\n isDateEnabled,\n dateDisabledReason,\n focusedDate,\n focusableDate,\n onSelectDate,\n selectedDate,\n ariaLabelledby,\n header,\n rows,\n isCurrentPage,\n renderDate,\n renderDateAnnouncement,\n isSameDate,\n onGridKeyDownHandler,\n referrerId,\n}: GridProps) {\n const focusedDateRef = useRef<HTMLTableCellElement>(null);\n\n // The focused date changes as a feedback to keyboard navigation in the grid.\n // Once changed, the corresponding date button needs to receive the actual focus.\n useEffectOnUpdate(() => {\n if (focusedDate && focusedDateRef.current) {\n (focusedDateRef.current as HTMLDivElement).focus();\n }\n }, [focusedDate]);\n\n const rowLength = rows[0].length;\n\n const denseGrid = rowLength > 3;\n\n return (\n <table\n role=\"grid\"\n className={clsx(styles['calendar-grid'], denseGrid && styles['calendar-grid-dense'])}\n aria-labelledby={ariaLabelledby}\n >\n {header}\n <tbody onKeyDown={onGridKeyDownHandler}>\n {rows.map((row, rowIndex) => (\n <tr key={rowIndex} className={styles['calendar-row']}>\n {row.map((date, dateIndex) => {\n const isFocusable = !!focusableDate && isSameDate(date, focusableDate);\n const isSelected = !!selectedDate && isSameDate(date, selectedDate);\n const isEnabled = !isDateEnabled || isDateEnabled(date);\n const disabledReason = dateDisabledReason(date);\n const isDisabledWithReason = !isEnabled && !!disabledReason;\n const isCurrentDate = isSameDate(date, new Date());\n\n // Can't be focused.\n let tabIndex = undefined;\n if (isFocusable && (isEnabled || isDisabledWithReason)) {\n // Next focus target.\n tabIndex = 0;\n } else if (isEnabled || isDisabledWithReason) {\n // Can be focused programmatically.\n tabIndex = -1;\n }\n\n return (\n <GridCell\n key={`${rowIndex}:${dateIndex}`}\n ref={tabIndex === 0 ? focusedDateRef : undefined}\n tabIndex={tabIndex}\n aria-current={isCurrentDate ? 'date' : undefined}\n aria-selected={isEnabled ? isSelected : undefined}\n aria-disabled={!isEnabled}\n // Do not attach click event when the date is disabled, otherwise VO+safari announces clickable\n onClick={isEnabled ? () => onSelectDate(date) : undefined}\n className={clsx(styles['calendar-grid-cell'], styles['calendar-date'], {\n [styles['calendar-date-current-page']]: isCurrentPage(date),\n [styles['calendar-date-enabled']]: isEnabled,\n [styles['calendar-date-selected']]: isSelected,\n [styles['calendar-date-current']]: isCurrentDate,\n [styles['calendar-date-dense']]: denseGrid,\n })}\n disabledReason={isDisabledWithReason ? disabledReason : undefined}\n referrerId={referrerId}\n >\n <span className={styles['date-inner']} aria-hidden=\"true\">\n {renderDate(date)}\n </span>\n {/* Screen-reader announcement for the focused date. */}\n <ScreenreaderOnly>{renderDateAnnouncement(date, isCurrentDate)}</ScreenreaderOnly>\n </GridCell>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n"]}
|
package/calendar/interfaces.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface CalendarProps extends BaseComponentProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Provides a reason why a particular date in the calendar is not enabled (only when `isDateEnabled` returns `false`).
|
|
19
19
|
* If provided, the date becomes focusable.
|
|
20
|
+
*
|
|
21
|
+
* Do not place interactive elements like links or buttons.
|
|
20
22
|
* @param date
|
|
21
23
|
*/
|
|
22
24
|
dateDisabledReason?: CalendarProps.DateDisabledReasonFunction;
|
|
@@ -88,7 +90,7 @@ export declare namespace CalendarProps {
|
|
|
88
90
|
(date: Date): boolean;
|
|
89
91
|
}
|
|
90
92
|
interface DateDisabledReasonFunction {
|
|
91
|
-
(date: Date):
|
|
93
|
+
(date: Date): React.ReactNode;
|
|
92
94
|
}
|
|
93
95
|
type Granularity = DateGranularity;
|
|
94
96
|
interface I18nStrings {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/calendar/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC;IAEpD
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