@cloudscape-design/components-themeable 3.0.1316 → 3.0.1318
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/action-card/interfaces.d.ts +3 -3
- package/lib/internal/template/action-card/interfaces.d.ts.map +1 -1
- package/lib/internal/template/action-card/interfaces.js.map +1 -1
- package/lib/internal/template/alert/interfaces.d.ts +3 -3
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/anchor-navigation/interfaces.d.ts +2 -2
- package/lib/internal/template/anchor-navigation/interfaces.d.ts.map +1 -1
- package/lib/internal/template/anchor-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/annotation-context/interfaces.d.ts +1 -1
- package/lib/internal/template/annotation-context/interfaces.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/classic.d.ts +1 -1
- package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts +1 -1
- package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts.map +1 -1
- package/lib/internal/template/app-layout/drawer/overflow-menu.js.map +1 -1
- package/lib/internal/template/app-layout/index.js.map +1 -1
- package/lib/internal/template/app-layout/interfaces.d.ts +3 -3
- package/lib/internal/template/app-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/internal.d.ts +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.d.ts +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/index.d.ts +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +4 -4
- package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
- package/lib/internal/template/area-chart/elements/use-highlight-details.d.ts +1 -1
- package/lib/internal/template/area-chart/elements/use-highlight-details.d.ts.map +1 -1
- package/lib/internal/template/area-chart/elements/use-highlight-details.js.map +1 -1
- package/lib/internal/template/area-chart/interfaces.d.ts +1 -1
- package/lib/internal/template/area-chart/interfaces.d.ts.map +1 -1
- package/lib/internal/template/area-chart/interfaces.js.map +1 -1
- package/lib/internal/template/area-chart/model/compute-chart-props.d.ts +2 -2
- package/lib/internal/template/area-chart/model/compute-chart-props.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/compute-chart-props.js +2 -0
- package/lib/internal/template/area-chart/model/compute-chart-props.js.map +1 -1
- package/lib/internal/template/area-chart/model/index.d.ts +1 -1
- package/lib/internal/template/area-chart/model/index.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/index.js.map +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.d.ts +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
- package/lib/internal/template/area-chart/model/use-filter-props.d.ts +1 -1
- package/lib/internal/template/area-chart/model/use-filter-props.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/use-filter-props.js.map +1 -1
- package/lib/internal/template/area-chart/model/use-highlight-props.d.ts +1 -1
- package/lib/internal/template/area-chart/model/use-highlight-props.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/use-highlight-props.js.map +1 -1
- package/lib/internal/template/area-chart/model/utils.d.ts +1 -1
- package/lib/internal/template/area-chart/model/utils.d.ts.map +1 -1
- package/lib/internal/template/area-chart/model/utils.js.map +1 -1
- package/lib/internal/template/attribute-editor/interfaces.d.ts +3 -3
- package/lib/internal/template/attribute-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/interfaces.js.map +1 -1
- package/lib/internal/template/attribute-editor/row.d.ts +2 -2
- package/lib/internal/template/attribute-editor/row.d.ts.map +1 -1
- package/lib/internal/template/attribute-editor/row.js.map +1 -1
- package/lib/internal/template/autosuggest/autosuggest-option.d.ts +1 -1
- package/lib/internal/template/autosuggest/autosuggest-option.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/autosuggest-option.js.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.d.ts +5 -5
- package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +1 -1
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/autosuggest/load-more-controller.d.ts +1 -1
- package/lib/internal/template/autosuggest/load-more-controller.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/load-more-controller.js.map +1 -1
- package/lib/internal/template/badge/interfaces.d.ts +2 -2
- package/lib/internal/template/badge/interfaces.d.ts.map +1 -1
- package/lib/internal/template/badge/interfaces.js.map +1 -1
- package/lib/internal/template/bar-chart/interfaces.d.ts +1 -1
- package/lib/internal/template/bar-chart/interfaces.d.ts.map +1 -1
- package/lib/internal/template/bar-chart/interfaces.js.map +1 -1
- package/lib/internal/template/box/interfaces.d.ts +2 -2
- package/lib/internal/template/box/interfaces.d.ts.map +1 -1
- package/lib/internal/template/box/interfaces.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/all-items-dropdown.d.ts +1 -1
- package/lib/internal/template/breadcrumb-group/all-items-dropdown.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/all-items-dropdown.js.map +1 -1
- package/lib/internal/template/breadcrumb-group/interfaces.d.ts +2 -2
- package/lib/internal/template/breadcrumb-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/breadcrumb-group/interfaces.js.map +1 -1
- package/lib/internal/template/button/interfaces.d.ts +3 -3
- package/lib/internal/template/button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.d.ts +3 -3
- package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/lib/internal/template/button-group/file-input-item.d.ts +1 -1
- package/lib/internal/template/button-group/file-input-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/file-input-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.d.ts +1 -1
- package/lib/internal/template/button-group/icon-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.js +1 -1
- package/lib/internal/template/button-group/icon-button-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
- package/lib/internal/template/button-group/interfaces.d.ts +10 -2
- package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-group/interfaces.js.map +1 -1
- package/lib/internal/template/button-group/item-element.d.ts +1 -1
- package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
- package/lib/internal/template/button-group/item-element.js.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.d.ts +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.js.map +1 -1
- package/lib/internal/template/calendar/interfaces.d.ts +3 -3
- package/lib/internal/template/calendar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/calendar/interfaces.js.map +1 -1
- package/lib/internal/template/cards/interfaces.d.ts +2 -2
- package/lib/internal/template/cards/interfaces.d.ts.map +1 -1
- package/lib/internal/template/cards/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/base-checkbox.d.ts +3 -3
- package/lib/internal/template/checkbox/base-checkbox.d.ts.map +1 -1
- package/lib/internal/template/checkbox/base-checkbox.js.map +1 -1
- package/lib/internal/template/checkbox/interfaces.d.ts +2 -2
- package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
- package/lib/internal/template/checkbox/interfaces.js.map +1 -1
- package/lib/internal/template/code-editor/error-screen.d.ts +1 -1
- package/lib/internal/template/code-editor/error-screen.d.ts.map +1 -1
- package/lib/internal/template/code-editor/error-screen.js.map +1 -1
- package/lib/internal/template/code-editor/interfaces.d.ts +3 -3
- package/lib/internal/template/code-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/code-editor/interfaces.js.map +1 -1
- package/lib/internal/template/code-editor/listeners.d.ts +1 -1
- package/lib/internal/template/code-editor/listeners.d.ts.map +1 -1
- package/lib/internal/template/code-editor/listeners.js.map +1 -1
- package/lib/internal/template/code-editor/preferences-modal.js.map +1 -1
- package/lib/internal/template/collection-preferences/interfaces.d.ts +4 -4
- package/lib/internal/template/collection-preferences/interfaces.d.ts.map +1 -1
- package/lib/internal/template/collection-preferences/interfaces.js.map +1 -1
- package/lib/internal/template/column-layout/interfaces.d.ts +1 -1
- package/lib/internal/template/column-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/column-layout/interfaces.js.map +1 -1
- package/lib/internal/template/container/interfaces.d.ts +1 -1
- package/lib/internal/template/container/interfaces.d.ts.map +1 -1
- package/lib/internal/template/container/interfaces.js.map +1 -1
- package/lib/internal/template/content-layout/interfaces.d.ts +1 -1
- package/lib/internal/template/content-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/content-layout/interfaces.js.map +1 -1
- package/lib/internal/template/contexts/form-field.d.ts +2 -1
- package/lib/internal/template/contexts/form-field.d.ts.map +1 -1
- package/lib/internal/template/contexts/form-field.js +1 -1
- package/lib/internal/template/contexts/form-field.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/interfaces.d.ts +2 -2
- package/lib/internal/template/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/interfaces.js.map +1 -1
- package/lib/internal/template/date-input/interfaces.d.ts +3 -3
- package/lib/internal/template/date-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-input/interfaces.js.map +1 -1
- package/lib/internal/template/date-input/internal.d.ts.map +1 -1
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/date-picker/interfaces.d.ts +4 -4
- package/lib/internal/template/date-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-picker/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +4 -4
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/divider/interfaces.d.ts +2 -2
- package/lib/internal/template/divider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/divider/interfaces.js.map +1 -1
- package/lib/internal/template/drawer/interfaces.d.ts +2 -2
- package/lib/internal/template/drawer/interfaces.d.ts.map +1 -1
- package/lib/internal/template/drawer/interfaces.js.map +1 -1
- package/lib/internal/template/dropdown/interfaces.d.ts +1 -1
- package/lib/internal/template/dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/dropdown/internal.d.ts +1 -1
- package/lib/internal/template/dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/dropdown/internal.js.map +1 -1
- package/lib/internal/template/error-boundary/interfaces.d.ts +1 -1
- package/lib/internal/template/error-boundary/interfaces.d.ts.map +1 -1
- package/lib/internal/template/error-boundary/interfaces.js.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.d.ts +2 -2
- package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
- package/lib/internal/template/file-dropzone/interfaces.d.ts +2 -2
- package/lib/internal/template/file-dropzone/interfaces.d.ts.map +1 -1
- package/lib/internal/template/file-dropzone/interfaces.js.map +1 -1
- package/lib/internal/template/file-input/interfaces.d.ts +3 -3
- package/lib/internal/template/file-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/file-input/interfaces.js.map +1 -1
- package/lib/internal/template/file-token-group/file-token.d.ts +1 -1
- package/lib/internal/template/file-token-group/file-token.d.ts.map +1 -1
- package/lib/internal/template/file-token-group/file-token.js.map +1 -1
- package/lib/internal/template/file-token-group/interfaces.d.ts +2 -2
- package/lib/internal/template/file-token-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/file-token-group/interfaces.js.map +1 -1
- package/lib/internal/template/file-upload/interfaces.d.ts +3 -3
- package/lib/internal/template/file-upload/interfaces.d.ts.map +1 -1
- package/lib/internal/template/file-upload/interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/common.d.ts +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +2 -2
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/form/interfaces.d.ts +2 -2
- package/lib/internal/template/form/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form/interfaces.js.map +1 -1
- package/lib/internal/template/form-field/interfaces.d.ts +2 -2
- package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
- package/lib/internal/template/form-field/interfaces.js.map +1 -1
- package/lib/internal/template/grid/interfaces.d.ts +2 -2
- package/lib/internal/template/grid/interfaces.d.ts.map +1 -1
- package/lib/internal/template/grid/interfaces.js.map +1 -1
- package/lib/internal/template/grid/internal.d.ts +1 -1
- package/lib/internal/template/grid/internal.d.ts.map +1 -1
- package/lib/internal/template/grid/internal.js.map +1 -1
- package/lib/internal/template/header/interfaces.d.ts +1 -1
- package/lib/internal/template/header/interfaces.d.ts.map +1 -1
- package/lib/internal/template/header/interfaces.js.map +1 -1
- package/lib/internal/template/help-panel/interfaces.d.ts +1 -1
- package/lib/internal/template/help-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/help-panel/interfaces.js.map +1 -1
- package/lib/internal/template/hotspot/interfaces.d.ts +1 -1
- package/lib/internal/template/hotspot/interfaces.d.ts.map +1 -1
- package/lib/internal/template/hotspot/interfaces.js.map +1 -1
- package/lib/internal/template/icon/interfaces.d.ts +2 -2
- package/lib/internal/template/icon/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon/interfaces.js.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/input/interfaces.d.ts +4 -4
- package/lib/internal/template/input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/input/interfaces.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts +3 -3
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/interfaces.d.ts +1 -1
- package/lib/internal/template/interfaces.d.ts.map +1 -1
- package/lib/internal/template/interfaces.js.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts +2 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/lib/internal/template/internal/analytics/context/analytics-context.d.ts +2 -1
- package/lib/internal/template/internal/analytics/context/analytics-context.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/context/analytics-context.js.map +1 -1
- package/lib/internal/template/internal/analytics/interfaces.d.ts +2 -15
- package/lib/internal/template/internal/analytics/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/analytics/interfaces.js.map +1 -1
- package/lib/internal/template/internal/base-component/index.d.ts +3 -15
- package/lib/internal/template/internal/base-component/index.d.ts.map +1 -1
- package/lib/internal/template/internal/base-component/index.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +23 -17
- package/lib/internal/template/internal/breakpoints.d.ts +2 -1
- package/lib/internal/template/internal/breakpoints.d.ts.map +1 -1
- package/lib/internal/template/internal/breakpoints.js.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +3 -3
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.d.ts +2 -2
- package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.d.ts +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.d.ts.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/block-end-labels.js.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/interfaces.d.ts +1 -209
- package/lib/internal/template/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/interfaces.js +2 -0
- package/lib/internal/template/internal/components/cartesian-chart/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/label-utils.d.ts +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/label-utils.d.ts.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/label-utils.js.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/scales.d.ts +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/scales.d.ts.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/scales.js +0 -2
- package/lib/internal/template/internal/components/cartesian-chart/scales.js.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/ticks.d.ts +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/ticks.d.ts.map +1 -1
- package/lib/internal/template/internal/components/cartesian-chart/ticks.js.map +1 -1
- package/lib/internal/template/internal/components/chart-filter/index.d.ts +1 -1
- package/lib/internal/template/internal/components/chart-filter/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-filter/index.js.map +1 -1
- package/lib/internal/template/internal/components/chart-series-details/index.d.ts +1 -1
- package/lib/internal/template/internal/components/chart-series-details/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-series-details/index.js.map +1 -1
- package/lib/internal/template/internal/components/chart-series-marker/index.d.ts +1 -1
- package/lib/internal/template/internal/components/chart-series-marker/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-series-marker/index.js.map +1 -1
- package/lib/internal/template/internal/components/chart-status-container/index.d.ts +2 -2
- package/lib/internal/template/internal/components/chart-status-container/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-status-container/index.js.map +1 -1
- package/lib/internal/template/internal/components/chart-wrapper/index.d.ts +1 -1
- package/lib/internal/template/internal/components/chart-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.d.ts +1 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.js.map +1 -1
- package/lib/internal/template/internal/components/dropdown-status/index.d.ts +3 -3
- package/lib/internal/template/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown-status/index.js.map +1 -1
- package/lib/internal/template/internal/components/masked-input/interfaces.d.ts +2 -2
- package/lib/internal/template/internal/components/masked-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/masked-input/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/masked-input/use-mask.d.ts +1 -1
- package/lib/internal/template/internal/components/masked-input/use-mask.d.ts.map +1 -1
- package/lib/internal/template/internal/components/masked-input/use-mask.js.map +1 -1
- package/lib/internal/template/internal/components/option/interfaces.d.ts +3 -26
- package/lib/internal/template/internal/components/option/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/option/option-announcer.d.ts +1 -1
- package/lib/internal/template/internal/components/option/option-announcer.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/option-announcer.js.map +1 -1
- package/lib/internal/template/internal/components/option/utils/filter-options.d.ts +2 -1
- package/lib/internal/template/internal/components/option/utils/filter-options.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/utils/filter-options.js.map +1 -1
- package/lib/internal/template/internal/components/option/utils/flatten-options.d.ts +2 -1
- package/lib/internal/template/internal/components/option/utils/flatten-options.d.ts.map +1 -1
- package/lib/internal/template/internal/components/option/utils/flatten-options.js.map +1 -1
- package/lib/internal/template/internal/components/options-list/index.d.ts +3 -3
- package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/options-list/index.js +1 -1
- package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts +1 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
- package/lib/internal/template/internal/components/options-list/utils/use-keyboard.js.map +1 -1
- package/lib/internal/template/internal/components/radio-button/index.d.ts +1 -1
- package/lib/internal/template/internal/components/radio-button/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/radio-button/index.js.map +1 -1
- package/lib/internal/template/internal/components/radio-button/interfaces.d.ts +1 -128
- package/lib/internal/template/internal/components/radio-button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/radio-button/interfaces.js +2 -0
- package/lib/internal/template/internal/components/radio-button/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts +1 -1
- package/lib/internal/template/internal/components/selectable-item/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/selectable-item/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts +3 -9
- package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/sortable-area/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/token-list/token-limit-toggle.d.ts +1 -1
- package/lib/internal/template/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
- package/lib/internal/template/internal/components/token-list/token-limit-toggle.js.map +1 -1
- package/lib/internal/template/internal/context/form-field-context.d.ts +2 -54
- package/lib/internal/template/internal/context/form-field-context.d.ts.map +1 -1
- package/lib/internal/template/internal/context/form-field-context.js.map +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.d.ts +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/interfaces.js.map +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/internal.d.ts +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/internal.d.ts.map +1 -1
- package/lib/internal/template/internal/do-not-use/feature-prompt/internal.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/events/index.d.ts +2 -24
- package/lib/internal/template/internal/events/index.d.ts.map +1 -1
- package/lib/internal/template/internal/events/index.js.map +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.d.ts +1 -0
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -0
- package/lib/internal/template/internal/generated/theming/index.cjs +60 -21
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +36 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +36 -0
- package/lib/internal/template/internal/generated/theming/index.js +60 -21
- package/lib/internal/template/internal/hooks/check-controlled/index.d.ts +1 -1
- package/lib/internal/template/internal/hooks/check-controlled/index.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/check-controlled/index.js.map +1 -1
- package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.d.ts +1 -1
- package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
- package/lib/internal/template/internal/hooks/use-base-component/index.d.ts +1 -1
- package/lib/internal/template/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/use-base-component/index.js.map +1 -1
- package/lib/internal/template/internal/hooks/use-focus-tracker.d.ts +1 -1
- package/lib/internal/template/internal/hooks/use-focus-tracker.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/use-focus-tracker.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/widget/interfaces.js.map +1 -1
- package/lib/internal/template/internal/utils/date-time/interfaces.d.ts +1 -16
- package/lib/internal/template/internal/utils/date-time/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/date-time/interfaces.js.map +1 -1
- package/lib/internal/template/internal/utils/with-native-attributes.d.ts +2 -1
- package/lib/internal/template/internal/utils/with-native-attributes.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/with-native-attributes.js.map +1 -1
- package/lib/internal/template/item-card/interfaces.d.ts +2 -2
- package/lib/internal/template/item-card/interfaces.d.ts.map +1 -1
- package/lib/internal/template/item-card/interfaces.js.map +1 -1
- package/lib/internal/template/key-value-pairs/interfaces.d.ts +1 -1
- package/lib/internal/template/key-value-pairs/interfaces.d.ts.map +1 -1
- package/lib/internal/template/key-value-pairs/interfaces.js.map +1 -1
- package/lib/internal/template/link/interfaces.d.ts +3 -3
- package/lib/internal/template/link/interfaces.d.ts.map +1 -1
- package/lib/internal/template/link/interfaces.js.map +1 -1
- package/lib/internal/template/list/interfaces.d.ts +3 -3
- package/lib/internal/template/list/interfaces.d.ts.map +1 -1
- package/lib/internal/template/list/interfaces.js.map +1 -1
- package/lib/internal/template/live-region/interfaces.d.ts +1 -1
- package/lib/internal/template/live-region/interfaces.d.ts.map +1 -1
- package/lib/internal/template/live-region/interfaces.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts +1 -1
- package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts +1 -1
- package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/format-highlighted.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts +1 -1
- package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/interfaces.js.map +1 -1
- package/lib/internal/template/modal/interfaces.d.ts +3 -3
- package/lib/internal/template/modal/interfaces.d.ts.map +1 -1
- package/lib/internal/template/modal/interfaces.js.map +1 -1
- package/lib/internal/template/multiselect/embedded.d.ts +2 -2
- package/lib/internal/template/multiselect/interfaces.d.ts +2 -2
- package/lib/internal/template/multiselect/interfaces.d.ts.map +1 -1
- package/lib/internal/template/multiselect/interfaces.js.map +1 -1
- package/lib/internal/template/multiselect/internal.d.ts +1 -1
- package/lib/internal/template/multiselect/use-multiselect.d.ts +8 -8
- package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
- package/lib/internal/template/navigable-group/interfaces.d.ts +1 -1
- package/lib/internal/template/navigable-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/navigable-group/interfaces.js.map +1 -1
- package/lib/internal/template/pagination/interfaces.d.ts +1 -1
- package/lib/internal/template/pagination/interfaces.d.ts.map +1 -1
- package/lib/internal/template/pagination/interfaces.js.map +1 -1
- package/lib/internal/template/pagination/internal.d.ts.map +1 -1
- package/lib/internal/template/pagination/internal.js.map +1 -1
- package/lib/internal/template/panel-layout/interfaces.d.ts +2 -2
- package/lib/internal/template/panel-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/panel-layout/interfaces.js.map +1 -1
- package/lib/internal/template/pie-chart/interfaces.d.ts +2 -2
- package/lib/internal/template/pie-chart/interfaces.d.ts.map +1 -1
- package/lib/internal/template/pie-chart/interfaces.js.map +1 -1
- package/lib/internal/template/popover/interfaces.d.ts +1 -1
- package/lib/internal/template/popover/interfaces.d.ts.map +1 -1
- package/lib/internal/template/popover/interfaces.js.map +1 -1
- package/lib/internal/template/popover/internal.d.ts +1 -1
- package/lib/internal/template/popover/internal.d.ts.map +1 -1
- package/lib/internal/template/popover/internal.js.map +1 -1
- package/lib/internal/template/progress-bar/interfaces.d.ts +2 -2
- package/lib/internal/template/progress-bar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/interfaces.js.map +1 -1
- package/lib/internal/template/prompt-input/core/menu-state.d.ts +2 -2
- package/lib/internal/template/prompt-input/core/menu-state.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/core/menu-state.js.map +1 -1
- package/lib/internal/template/prompt-input/interfaces.d.ts +6 -6
- package/lib/internal/template/prompt-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/controller.d.ts +2 -2
- package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
- package/lib/internal/template/property-filter/controller.js.map +1 -1
- package/lib/internal/template/property-filter/filter-options.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +4 -4
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/property-editor.d.ts +2 -2
- package/lib/internal/template/property-filter/property-editor.d.ts.map +1 -1
- package/lib/internal/template/property-filter/property-editor.js.map +1 -1
- package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts +1 -1
- package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
- package/lib/internal/template/property-filter/property-filter-autosuggest.js +1 -1
- package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.d.ts +2 -2
- package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
- package/lib/internal/template/property-filter/token-editor.d.ts +2 -2
- package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor.js.map +1 -1
- package/lib/internal/template/property-filter/token.d.ts +2 -2
- package/lib/internal/template/property-filter/token.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token.js.map +1 -1
- package/lib/internal/template/property-filter/use-load-items.d.ts +1 -1
- package/lib/internal/template/property-filter/use-load-items.d.ts.map +1 -1
- package/lib/internal/template/property-filter/use-load-items.js.map +1 -1
- package/lib/internal/template/radio-button/interfaces.d.ts +128 -2
- package/lib/internal/template/radio-button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-button/interfaces.js.map +1 -1
- package/lib/internal/template/radio-group/interfaces.d.ts +4 -4
- package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-group/interfaces.js.map +1 -1
- package/lib/internal/template/s3-resource-selector/interfaces.d.ts +2 -2
- package/lib/internal/template/s3-resource-selector/interfaces.d.ts.map +1 -1
- package/lib/internal/template/s3-resource-selector/interfaces.js.map +1 -1
- package/lib/internal/template/s3-resource-selector/s3-in-context/index.d.ts +1 -1
- package/lib/internal/template/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
- package/lib/internal/template/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/lib/internal/template/s3-resource-selector/s3-in-context/use-versions-fetch.d.ts +1 -1
- package/lib/internal/template/segmented-control/interfaces.d.ts +2 -2
- package/lib/internal/template/segmented-control/interfaces.d.ts.map +1 -1
- package/lib/internal/template/segmented-control/interfaces.js.map +1 -1
- package/lib/internal/template/select/interfaces.d.ts +5 -5
- package/lib/internal/template/select/interfaces.d.ts.map +1 -1
- package/lib/internal/template/select/interfaces.js.map +1 -1
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/item.d.ts.map +1 -1
- package/lib/internal/template/select/parts/item.js.map +1 -1
- package/lib/internal/template/select/parts/multiselect-item.d.ts.map +1 -1
- package/lib/internal/template/select/parts/multiselect-item.js.map +1 -1
- package/lib/internal/template/select/parts/trigger.d.ts +2 -2
- package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
- package/lib/internal/template/select/parts/trigger.js.map +1 -1
- package/lib/internal/template/select/utils/connect-options.d.ts +2 -1
- package/lib/internal/template/select/utils/connect-options.d.ts.map +1 -1
- package/lib/internal/template/select/utils/connect-options.js.map +1 -1
- package/lib/internal/template/select/utils/use-announcement.d.ts +1 -1
- package/lib/internal/template/select/utils/use-announcement.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-announcement.js.map +1 -1
- package/lib/internal/template/select/utils/use-load-items.d.ts +2 -2
- package/lib/internal/template/select/utils/use-load-items.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-load-items.js.map +1 -1
- package/lib/internal/template/select/utils/use-native-search.d.ts +2 -1
- package/lib/internal/template/select/utils/use-native-search.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-native-search.js.map +1 -1
- package/lib/internal/template/select/utils/use-select.d.ts +4 -3
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.d.ts +2 -2
- package/lib/internal/template/side-navigation/interfaces.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
- package/lib/internal/template/side-navigation/parts.js.map +1 -1
- package/lib/internal/template/skeleton/interfaces.d.ts +1 -1
- package/lib/internal/template/skeleton/interfaces.d.ts.map +1 -1
- package/lib/internal/template/skeleton/interfaces.js.map +1 -1
- package/lib/internal/template/slider/interfaces.d.ts +3 -3
- package/lib/internal/template/slider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/slider/interfaces.js.map +1 -1
- package/lib/internal/template/space-between/interfaces.d.ts +2 -2
- package/lib/internal/template/space-between/interfaces.d.ts.map +1 -1
- package/lib/internal/template/space-between/interfaces.js.map +1 -1
- package/lib/internal/template/spinner/interfaces.d.ts +2 -2
- package/lib/internal/template/spinner/interfaces.d.ts.map +1 -1
- package/lib/internal/template/spinner/interfaces.js.map +1 -1
- package/lib/internal/template/split-panel/interfaces.d.ts +1 -1
- package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/split-panel/interfaces.js.map +1 -1
- package/lib/internal/template/status-indicator/interfaces.d.ts +2 -2
- package/lib/internal/template/status-indicator/interfaces.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/interfaces.js.map +1 -1
- package/lib/internal/template/steps/interfaces.d.ts +1 -1
- package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
- package/lib/internal/template/steps/interfaces.js.map +1 -1
- package/lib/internal/template/table/interfaces.d.ts +2 -2
- package/lib/internal/template/table/interfaces.d.ts.map +1 -1
- package/lib/internal/template/table/interfaces.js.map +1 -1
- package/lib/internal/template/table/thead.d.ts +1 -1
- package/lib/internal/template/table/thead.d.ts.map +1 -1
- package/lib/internal/template/table/thead.js.map +1 -1
- package/lib/internal/template/table/use-cell-editing.d.ts +1 -1
- package/lib/internal/template/table/use-cell-editing.d.ts.map +1 -1
- package/lib/internal/template/table/use-cell-editing.js.map +1 -1
- package/lib/internal/template/tabs/interfaces.d.ts +2 -2
- package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tabs/interfaces.js.map +1 -1
- package/lib/internal/template/tag-editor/index.d.ts.map +1 -1
- package/lib/internal/template/tag-editor/index.js.map +1 -1
- package/lib/internal/template/tag-editor/interfaces.d.ts +2 -2
- package/lib/internal/template/tag-editor/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tag-editor/interfaces.js.map +1 -1
- package/lib/internal/template/tag-editor/internal.js.map +1 -1
- package/lib/internal/template/text-content/interfaces.d.ts +1 -1
- package/lib/internal/template/text-content/interfaces.d.ts.map +1 -1
- package/lib/internal/template/text-content/interfaces.js.map +1 -1
- package/lib/internal/template/text-filter/interfaces.d.ts +3 -3
- package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/text-filter/interfaces.js.map +1 -1
- package/lib/internal/template/textarea/interfaces.d.ts +4 -4
- package/lib/internal/template/textarea/interfaces.d.ts.map +1 -1
- package/lib/internal/template/textarea/interfaces.js.map +1 -1
- package/lib/internal/template/tiles/interfaces.d.ts +4 -4
- package/lib/internal/template/tiles/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tiles/interfaces.js.map +1 -1
- package/lib/internal/template/time-input/interfaces.d.ts +2 -2
- package/lib/internal/template/time-input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/time-input/interfaces.js.map +1 -1
- package/lib/internal/template/toggle/interfaces.d.ts +2 -2
- package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle/interfaces.js.map +1 -1
- package/lib/internal/template/toggle-button/interfaces.d.ts +2 -2
- package/lib/internal/template/toggle-button/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle-button/interfaces.js.map +1 -1
- package/lib/internal/template/token/dismiss-button.d.ts +1 -1
- package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
- package/lib/internal/template/token/dismiss-button.js.map +1 -1
- package/lib/internal/template/token/interfaces.d.ts +2 -2
- package/lib/internal/template/token/interfaces.d.ts.map +1 -1
- package/lib/internal/template/token/interfaces.js.map +1 -1
- package/lib/internal/template/token-group/interfaces.d.ts +2 -2
- package/lib/internal/template/token-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/token-group/interfaces.js.map +1 -1
- package/lib/internal/template/tooltip/interfaces.d.ts +1 -1
- package/lib/internal/template/tooltip/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tooltip/interfaces.js.map +1 -1
- package/lib/internal/template/top-navigation/interfaces.d.ts +2 -2
- package/lib/internal/template/top-navigation/interfaces.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/interfaces.js.map +1 -1
- package/lib/internal/template/tree-view/interfaces.d.ts +2 -2
- package/lib/internal/template/tree-view/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tree-view/interfaces.js.map +1 -1
- package/lib/internal/template/truncated-text/interfaces.d.ts +1 -1
- package/lib/internal/template/truncated-text/interfaces.d.ts.map +1 -1
- package/lib/internal/template/truncated-text/interfaces.js.map +1 -1
- package/lib/internal/template/tutorial-panel/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.d.ts +2 -2
- package/lib/internal/template/tutorial-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.js.map +1 -1
- package/lib/internal/template/types/analytics.d.ts +16 -0
- package/lib/internal/template/types/analytics.d.ts.map +1 -0
- package/lib/internal/template/types/analytics.js +4 -0
- package/lib/internal/template/types/analytics.js.map +1 -0
- package/lib/internal/template/types/base-component.d.ts +15 -0
- package/lib/internal/template/types/base-component.d.ts.map +1 -0
- package/lib/internal/template/types/base-component.js +4 -0
- package/lib/internal/template/types/base-component.js.map +1 -0
- package/lib/internal/template/types/breakpoint.d.ts +2 -0
- package/lib/internal/template/types/breakpoint.d.ts.map +1 -0
- package/lib/internal/template/types/breakpoint.js +2 -0
- package/lib/internal/template/types/breakpoint.js.map +1 -0
- package/lib/internal/template/types/cartesian-chart.d.ts +210 -0
- package/lib/internal/template/types/cartesian-chart.d.ts.map +1 -0
- package/lib/internal/template/types/cartesian-chart.js +2 -0
- package/lib/internal/template/types/cartesian-chart.js.map +1 -0
- package/lib/internal/template/types/date-time.d.ts +17 -0
- package/lib/internal/template/types/date-time.d.ts.map +1 -0
- package/lib/internal/template/types/date-time.js +4 -0
- package/lib/internal/template/types/date-time.js.map +1 -0
- package/lib/internal/template/{internal/components/dropdown-status/interfaces.d.ts → types/dropdown-status.d.ts} +1 -1
- package/lib/internal/template/types/dropdown-status.d.ts.map +1 -0
- package/lib/internal/template/types/dropdown-status.js +2 -0
- package/lib/internal/template/types/dropdown-status.js.map +1 -0
- package/lib/internal/template/types/events.d.ts +25 -0
- package/lib/internal/template/types/events.d.ts.map +1 -0
- package/lib/internal/template/types/events.js +4 -0
- package/lib/internal/template/types/events.js.map +1 -0
- package/lib/internal/template/types/form-field.d.ts +55 -0
- package/lib/internal/template/types/form-field.d.ts.map +1 -0
- package/lib/internal/template/types/form-field.js +4 -0
- package/lib/internal/template/types/form-field.js.map +1 -0
- package/lib/internal/template/types/native-attributes.d.ts +3 -0
- package/lib/internal/template/types/native-attributes.d.ts.map +1 -0
- package/lib/internal/template/types/native-attributes.js +2 -0
- package/lib/internal/template/types/native-attributes.js.map +1 -0
- package/lib/internal/template/types/option.d.ts +27 -0
- package/lib/internal/template/types/option.d.ts.map +1 -0
- package/lib/internal/template/types/option.js +2 -0
- package/lib/internal/template/types/option.js.map +1 -0
- package/lib/internal/template/types/sortable-area.d.ts +9 -0
- package/lib/internal/template/types/sortable-area.d.ts.map +1 -0
- package/lib/internal/template/types/sortable-area.js +4 -0
- package/lib/internal/template/types/sortable-area.js.map +1 -0
- package/lib/internal/template/wizard/interfaces.d.ts +3 -3
- package/lib/internal/template/wizard/interfaces.d.ts.map +1 -1
- package/lib/internal/template/wizard/interfaces.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/internal/components/dropdown-status/interfaces.d.ts.map +0 -1
- package/lib/internal/template/internal/components/dropdown-status/interfaces.js +0 -2
- package/lib/internal/template/internal/components/dropdown-status/interfaces.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PortalProps } from '@cloudscape-design/component-toolkit/internal';
|
|
3
|
-
import { FlowType } from '../
|
|
4
|
-
import { BaseComponentProps } from '../
|
|
5
|
-
import { NonCancelableEventHandler } from '../
|
|
3
|
+
import { FlowType } from '../types/analytics';
|
|
4
|
+
import { BaseComponentProps } from '../types/base-component';
|
|
5
|
+
import { NonCancelableEventHandler } from '../types/events';
|
|
6
6
|
export interface BaseModalProps {
|
|
7
7
|
/**
|
|
8
8
|
* Use this property to specify a different dynamic modal root for the dialog.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,C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AC,EAAE,QAAQ,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { PortalProps } from '@cloudscape-design/component-toolkit/internal';\n\nimport { FlowType } from '../
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/modal/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { PortalProps } from '@cloudscape-design/component-toolkit/internal';\n\nimport { FlowType } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface BaseModalProps {\n /**\n * Use this property to specify a different dynamic modal root for the dialog.\n * The function will be called when a user clicks on the trigger button.\n */\n getModalRoot?: PortalProps['getContainer'];\n\n /**\n * Use this property when `getModalRoot` is used to clean up the modal root\n * element after a user closes the dialog. The function receives the return value\n * of the most recent getModalRoot call as an argument.\n */\n removeModalRoot?: PortalProps['removeContainer'];\n}\n\nexport interface ModalProps extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies the width of the modal. When provided, takes precedence over the `size` property.\n * If the specified width exceeds available viewport space, the modal will use the maximum available space.\n * The minimum width is 320px (equivalent to the `small` size).\n */\n width?: number;\n\n /**\n * Specifies the height of the modal. When provided, the modal content becomes scrollable if it exceeds the specified height.\n * If the specified height exceeds available viewport space, the modal will use the maximum available space.\n * To make sure the content is accessible, the component will apply a minimum height of 60px for the content area,\n * plus the header height and the footer height.\n */\n height?: number;\n\n /**\n * Sets the width of the modal. `max` uses variable width up to the\n * largest size allowed by the design guidelines. Other sizes have fixed widths:\n * `small` (320px), `medium` (600px), `large` (820px), `x-large` (1024px), `xx-large` (1280px).\n */\n size?: ModalProps.Size;\n /**\n * Controls the vertical positioning of the modal.\n *\n * - `center` (default) - The modal is vertically centered in the viewport and re-centers\n * when content height changes. Use for dialogs with static, predictable content.\n *\n * - `top` - The modal anchors at fixed distance and grows downward\n * as content expands. Use when the content changes dynamically to prevent disruptive\n * vertical repositioning that can cause users to lose context.\n */\n position?: ModalProps.Position;\n /**\n * Determines whether the modal is displayed on the screen. Modals are hidden by default.\n * Set this property to `true` to show them.\n */\n visible: boolean;\n /**\n * Adds an `aria-label` to the close button, for accessibility.\n * @i18n\n */\n closeAriaLabel?: string;\n /**\n * Specifies a title for the modal. Although this can be empty, we suggest that you always provide a title.\n */\n header?: React.ReactNode;\n /**\n * Body of the modal.\n */\n children?: React.ReactNode;\n /**\n * Specifies a footer for the modal. If empty, the footer isn't displayed.\n */\n footer?: React.ReactNode;\n /**\n * Determines whether the modal content has padding. If `true`, removes the default padding from the content area.\n */\n disableContentPaddings?: boolean;\n /**\n * Called when a user closes the modal by using the close icon button,\n * clicking outside of the modal, or pressing ESC.\n * The event detail contains the `reason`, which can be any of the following:\n * `['closeButton', 'overlay', 'keyboard']`.\n */\n onDismiss?: NonCancelableEventHandler<ModalProps.DismissDetail>;\n /**\n * Specifies the HTML element where the modal is rendered.\n * If neither `modalRoot` or `getModalRoot` properties are provided, the modal will\n * render to an element under `document.body`.\n */\n modalRoot?: HTMLElement;\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * @analytics\n */\n analyticsMetadata?: ModalProps.AnalyticsMetadata;\n}\n\nexport namespace ModalProps {\n export type Size = 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'max';\n export type Position = 'center' | 'top';\n\n export interface DismissDetail {\n reason: string;\n }\n\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n }\n}\n"]}
|
|
@@ -4,8 +4,8 @@ import { MultiselectProps } from './interfaces';
|
|
|
4
4
|
export type EmbeddedMultiselectProps = SomeRequired<Pick<MultiselectProps, 'options' | 'selectedOptions' | 'ariaLabel' | 'filteringType' | 'deselectAriaLabel' | 'virtualScroll' | 'statusType' | 'controlId' | 'onChange' | 'onLoadItems' | 'loadingText' | 'finishedText' | 'errorText' | 'recoveryText' | 'empty' | 'noMatch'>, 'options' | 'selectedOptions' | 'filteringType' | 'statusType'> & {
|
|
5
5
|
filteringText?: string;
|
|
6
6
|
};
|
|
7
|
-
declare const EmbeddedMultiselect: React.ForwardRefExoticComponent<Pick<MultiselectProps, "onChange" | "ariaLabel" | "virtualScroll" | "onLoadItems" | "loadingText" | "errorText" | "recoveryText" | "deselectAriaLabel" | "
|
|
8
|
-
statusType: import("../
|
|
7
|
+
declare const EmbeddedMultiselect: React.ForwardRefExoticComponent<Pick<MultiselectProps, "onChange" | "ariaLabel" | "virtualScroll" | "onLoadItems" | "loadingText" | "errorText" | "recoveryText" | "deselectAriaLabel" | "statusType" | "controlId" | "options" | "empty" | "noMatch" | "filteringType" | "selectedOptions" | "finishedText"> & {
|
|
8
|
+
statusType: import("../types/dropdown-status").DropdownStatusProps.StatusType;
|
|
9
9
|
options: import("..").SelectProps.Options;
|
|
10
10
|
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
11
11
|
selectedOptions: ReadonlyArray<MultiselectProps.Option>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { OptionsLoadItemsDetail } from '../dropdown/interfaces';
|
|
3
|
-
import { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';
|
|
4
|
-
import { NonCancelableEventHandler } from '../internal/events';
|
|
5
3
|
import { BaseSelectProps } from '../select/interfaces';
|
|
4
|
+
import { NonCancelableEventHandler } from '../types/events';
|
|
5
|
+
import { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';
|
|
6
6
|
export interface MultiselectProps extends BaseSelectProps {
|
|
7
7
|
/**
|
|
8
8
|
* Specifies the currently selected options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD;;;OAGG;IACH,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAExD;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,yBAAyB,CAAC;IAC/D;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,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AE,MAAM,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,WAAW,EAAE,OAAO,CAAC;QACrB,QAAQ,EAAE,OAAO,CAAC;KACnB;IACD,KAAY,eAAe,GAAG,qBAAqB,GAAG,0BAA0B,GAAG,wBAAwB,CAAC;IAC5G,KAAY,6BAA6B,GAAG,CAAC,KAAK,EAAE;QAClD,IAAI,EAAE,eAAe,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,KAAK,SAAS,GAAG,IAAI,CAAC;IAEvB,KAAY,yBAAyB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACnE,KAAY,cAAc,GAAG,aAAa,GAAG,QAAQ,CAAC;IAEtD,UAAiB,WAAW;QAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IAED,UAAiB,uBAAuB;QACtC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACxC;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport {
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseSelectProps } from '../select/interfaces';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\n\nexport interface MultiselectProps extends BaseSelectProps {\n /**\n * Specifies the currently selected options.\n * Provide an empty array to clear the selection.\n */\n selectedOptions: ReadonlyArray<MultiselectProps.Option>;\n\n /**\n * Specifies an inline label that appears next to the multiselect trigger.\n */\n inlineLabelText?: string;\n /**\n * Determines whether the dropdown list stays open after the user selects an item.\n */\n keepOpen?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Hides the tokens displayed underneath the component.\n * Only use this if the selected options are displayed elsewhere on the page.\n */\n hideTokens?: boolean;\n /**\n * Shows tokens inside the trigger instead of below it.\n */\n inlineTokens?: boolean;\n /**\n * Specifies an `aria-label` for the token deselection button.\n * @i18n\n */\n deselectAriaLabel?: MultiselectProps.DeselectAriaLabelFunction;\n /**\n * An object containing all the localized strings required by the component.\n *\n * * `selectAllText` (string) - Specifies the text to be displayed next to the checkbox that selects or deselects all options.\n * * `tokenLimitShowFewer` (string) - Specifies the text to be displayed in the \"Show fewer\" button for the token group control.\n * * `tokenLimitShowMore` (string) - Specifies the text to be displayed in the \"Show more\" button for the token group control. This string should not contain the number of hidden tokens\n * because this will be added by the component automatically.\n * @i18n\n */\n i18nStrings?: MultiselectProps.I18nStrings;\n onLoadItems?: NonCancelableEventHandler<MultiselectProps.LoadItemsDetail>;\n /**\n * Called when the user selects or deselects an option.\n * The event `detail` contains the current `selectedOptions`.\n */\n onChange?: NonCancelableEventHandler<MultiselectProps.MultiselectChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n\n /**\n * Adds an aria-label to the \"Show fewer\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowFewer` label on one page.\n */\n tokenLimitShowFewerAriaLabel?: string;\n /**\n * Adds an aria-label to the \"Show more\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowMore` label on one page.\n */\n tokenLimitShowMoreAriaLabel?: string;\n /**\n * Enables users to select and deselect all options with a special extra checkbox which is displayed at the start of the dropdown.\n */\n enableSelectAll?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n */\n renderOption?: MultiselectProps.MultiselectOptionItemRenderer;\n}\n\nexport namespace MultiselectProps {\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n export interface MultiselectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n parent: MultiselectOptionGroupItem | null;\n }\n export interface MultiselectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n indeterminate: boolean;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export interface MultiselectSelectAllItem {\n type: 'select-all';\n option: Option;\n indeterminate: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export type MultiselectItem = MultiselectOptionItem | MultiselectOptionGroupItem | MultiselectSelectAllItem;\n export type MultiselectOptionItemRenderer = (props: {\n item: MultiselectItem;\n filterText?: string;\n }) => ReactNode | null;\n\n export type DeselectAriaLabelFunction = (option: Option) => string;\n export type TriggerVariant = 'placeholder' | 'tokens';\n\n export interface I18nStrings {\n selectAllText?: string;\n tokenLimitShowFewer?: string;\n tokenLimitShowMore?: string;\n }\n\n export interface MultiselectChangeDetail {\n selectedOptions: ReadonlyArray<Option>;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';
|
|
3
3
|
import { MultiselectProps } from './interfaces';
|
|
4
4
|
declare const InternalMultiselect: React.ForwardRefExoticComponent<MultiselectProps & {
|
|
5
|
-
statusType: import("../
|
|
5
|
+
statusType: import("../types/dropdown-status").DropdownStatusProps.StatusType;
|
|
6
6
|
options: import("..").SelectProps.Options;
|
|
7
7
|
filteringType: import("../dropdown/interfaces").OptionsFilteringType;
|
|
8
8
|
selectedOptions: ReadonlyArray<MultiselectProps.Option>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DropdownStatusProps } from '../internal/components/dropdown-status';
|
|
3
2
|
import { DropdownOption } from '../internal/components/option/interfaces';
|
|
4
3
|
import { SomeRequired } from '../internal/types';
|
|
5
4
|
import { SelectListProps } from '../select/parts/plain-list';
|
|
6
5
|
import { TokenGroupProps } from '../token-group/interfaces';
|
|
6
|
+
import { DropdownStatusProps } from '../types/dropdown-status';
|
|
7
7
|
import { MultiselectProps } from './interfaces';
|
|
8
8
|
type UseMultiselectOptions = SomeRequired<Pick<MultiselectProps, 'options' | 'selectedOptions' | 'filteringType' | 'filteringResultsText' | 'disabled' | 'noMatch' | 'renderHighlightedAriaLive' | 'deselectAriaLabel' | 'keepOpen' | 'onBlur' | 'onFocus' | 'onLoadItems' | 'onChange' | 'selectedAriaLabel' | 'enableSelectAll' | 'i18nStrings'> & DropdownStatusProps & {
|
|
9
9
|
controlId?: string;
|
|
@@ -36,15 +36,15 @@ export declare function useMultiselect({ options, filteringType, filteringResult
|
|
|
36
36
|
className?: string | undefined;
|
|
37
37
|
id?: string | undefined;
|
|
38
38
|
role?: "listbox" | "list" | "menu" | undefined;
|
|
39
|
-
onFocus?: import("../
|
|
40
|
-
onBlur?: import("../
|
|
39
|
+
onFocus?: import("../types/events").NonCancelableEventHandler | undefined;
|
|
40
|
+
onBlur?: import("../types/events").NonCancelableEventHandler<{
|
|
41
41
|
relatedTarget: Node | null;
|
|
42
42
|
}> | undefined;
|
|
43
|
-
onKeyDown?: import("../
|
|
43
|
+
onKeyDown?: import("../types/events").CancelableEventHandler<import("../types/events").BaseKeyDetail> | undefined;
|
|
44
44
|
onMouseMove?: ((itemIndex: number) => void) | undefined;
|
|
45
45
|
onMouseUp?: ((itemIndex: number) => void) | undefined;
|
|
46
|
-
nativeAttributes?: Record<string, any> | undefined;
|
|
47
46
|
ariaLabel?: string | undefined;
|
|
47
|
+
nativeAttributes?: Record<string, any> | undefined;
|
|
48
48
|
tagOverride?: "div" | "ul" | undefined;
|
|
49
49
|
statusType: DropdownStatusProps.StatusType;
|
|
50
50
|
ariaRequired?: boolean | undefined;
|
|
@@ -55,12 +55,12 @@ export declare function useMultiselect({ options, filteringType, filteringResult
|
|
|
55
55
|
};
|
|
56
56
|
getOptionProps: (option: DropdownOption, index: number) => any;
|
|
57
57
|
getTokenProps: () => {
|
|
58
|
-
onDismiss: import("../
|
|
58
|
+
onDismiss: import("../types/events").NonCancelableEventHandler<TokenGroupProps.DismissDetail>;
|
|
59
59
|
};
|
|
60
60
|
getDropdownProps: () => {
|
|
61
61
|
onMouseDown: (event: React.MouseEvent) => void;
|
|
62
|
-
onFocus?: import("../
|
|
63
|
-
onBlur?: import("../
|
|
62
|
+
onFocus?: import("../types/events").NonCancelableEventHandler<Pick<React.FocusEvent, "target" | "relatedTarget">> | undefined;
|
|
63
|
+
onBlur?: import("../types/events").NonCancelableEventHandler<Pick<React.FocusEvent, "target" | "relatedTarget">> | undefined;
|
|
64
64
|
ariaRole?: string | undefined;
|
|
65
65
|
dropdownContentId?: string | undefined;
|
|
66
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkD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E,CAAC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QACxD,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { DropdownStatusProps, useDropdownStatus } from '../internal/components/dropdown-status';\nimport { DropdownOption, OptionDefinition, OptionGroup } from '../internal/components/option/interfaces';\nimport { isGroup } from '../internal/components/option/utils/filter-options';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { SomeRequired } from '../internal/types';\nimport { joinStrings } from '../internal/utils/strings';\nimport { SelectListProps } from '../select/parts/plain-list';\nimport { checkOptionValueField } from '../select/utils/check-option-value-field.js';\nimport { findOptionIndex } from '../select/utils/connect-options';\nimport { useAnnouncement } from '../select/utils/use-announcement';\nimport { useLoadItems } from '../select/utils/use-load-items';\nimport { useNativeSearch } from '../select/utils/use-native-search';\nimport { useSelect } from '../select/utils/use-select';\nimport { TokenGroupProps } from '../token-group/interfaces';\nimport { MultiselectProps } from './interfaces';\n\ntype UseMultiselectOptions = SomeRequired<\n Pick<\n MultiselectProps,\n | 'options'\n | 'selectedOptions'\n | 'filteringType'\n | 'filteringResultsText'\n | 'disabled'\n | 'noMatch'\n | 'renderHighlightedAriaLive'\n | 'deselectAriaLabel'\n | 'keepOpen'\n | 'onBlur'\n | 'onFocus'\n | 'onLoadItems'\n | 'onChange'\n | 'selectedAriaLabel'\n | 'enableSelectAll'\n | 'i18nStrings'\n > &\n DropdownStatusProps & {\n controlId?: string;\n ariaLabelId: string;\n footerId: string;\n filteringValue: string;\n setFilteringValue?: (value: string) => void;\n externalRef: React.Ref<MultiselectProps.Ref>;\n },\n 'options' | 'selectedOptions' | 'filteringType' | 'statusType' | 'keepOpen'\n> & { embedded?: boolean };\n\nexport function useMultiselect({\n options,\n filteringType,\n filteringResultsText,\n disabled,\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n renderHighlightedAriaLive,\n selectedOptions,\n deselectAriaLabel,\n keepOpen,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n controlId,\n ariaLabelId,\n footerId,\n filteringValue,\n setFilteringValue,\n externalRef,\n embedded,\n enableSelectAll,\n i18nStrings,\n ...restProps\n}: UseMultiselectOptions) {\n checkOptionValueField('Multiselect', 'options', options);\n\n const i18n = useInternalI18n('multiselect');\n const i18nCommon = useInternalI18n('select');\n const recoveryText = i18nCommon('recoveryText', restProps.recoveryText);\n const errorIconAriaLabel = i18nCommon('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18nCommon('selectedAriaLabel', restProps.selectedAriaLabel);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Multiselect', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n const useInteractiveGroups = true;\n const { flatOptions, filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const selectAllOption: DropdownOption = {\n type: 'select-all',\n afterHeader: filteringType !== 'none',\n option: { label: i18n('i18nStrings.selectAllText', i18nStrings?.selectAllText) },\n };\n\n const visibleOptions =\n enableSelectAll && filteredOptions.length ? [selectAllOption, ...filteredOptions] : filteredOptions;\n\n // Includes visible and non-visible (filtered out) options\n const allNonParentOptions = flatOptions.filter(item => item.type !== 'parent').map(option => option.option);\n\n const filteredNonParentOptions = filteredOptions.filter(item => item.type !== 'parent').map(item => item.option);\n\n const selectedValues = useMemo(() => new Set(selectedOptions.map(option => option.value)), [selectedOptions]);\n\n const isSomeSelected = selectedOptions.length > 0;\n const isAllVisibleSelectableSelected =\n isSomeSelected && filteredNonParentOptions.every(option => option.disabled || selectedValues.has(option.value));\n const isAllSelected = allNonParentOptions.every(option => selectedValues.has(option.value));\n\n const toggleAll = () => {\n const filteredNonParentOptionValues = new Set(filteredNonParentOptions.map(option => option.value));\n fireNonCancelableEvent(onChange, {\n selectedOptions: isAllVisibleSelectableSelected\n ? selectedOptions.filter(option => !filteredNonParentOptionValues.has(option.value))\n : allNonParentOptions.filter(\n ({ disabled, value }) =>\n selectedValues.has(value) || (!disabled && filteredNonParentOptionValues.has(value))\n ),\n });\n };\n\n const updateSelectedOption = useCallback(\n (option: OptionDefinition | OptionGroup) => {\n // switch between selection and deselection behavior, ignores disabled options to prevent\n // getting stuck on one behavior when an option is disabled and its state cannot be changed\n const isAllChildrenSelected = (optionsArray: OptionDefinition[]) =>\n optionsArray.every(item => findOptionIndex(selectedOptions, item) > -1 || item.disabled);\n const intersection = (visibleOptions: OptionDefinition[], options: OptionDefinition[]) =>\n visibleOptions.filter(item => findOptionIndex(options, item) > -1 && !item.disabled);\n const union = (visibleOptions: OptionDefinition[], options: OptionDefinition[]) =>\n visibleOptions.filter(item => findOptionIndex(options, item) === -1).concat(options);\n const select = (options: OptionDefinition[], selectedOptions: OptionDefinition[]) => {\n return union(selectedOptions, options);\n };\n const unselect = (options: OptionDefinition[], selectedOptions: OptionDefinition[]) => {\n return selectedOptions.filter(option => findOptionIndex(options, option) === -1);\n };\n let newSelectedOptions = [...selectedOptions];\n\n if (isGroup(option)) {\n const visibleOptions = intersection([...option.options], filteredNonParentOptions);\n newSelectedOptions = isAllChildrenSelected(visibleOptions)\n ? unselect(visibleOptions, newSelectedOptions)\n : select(visibleOptions, newSelectedOptions);\n } else {\n newSelectedOptions = isAllChildrenSelected([option])\n ? unselect([option], newSelectedOptions)\n : select([option], newSelectedOptions);\n }\n\n fireNonCancelableEvent(onChange, {\n selectedOptions: newSelectedOptions,\n });\n },\n [selectedOptions, onChange, filteredNonParentOptions]\n );\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n announceSelected,\n focusActiveRef,\n } = useSelect({\n selectedOptions,\n updateSelectedOption,\n options: visibleOptions,\n filteringType,\n onFocus,\n onBlur,\n externalRef,\n keepOpen,\n fireLoadItems,\n setFilteringValue,\n useInteractiveGroups,\n statusType,\n embedded,\n isAllSelected,\n isSomeSelected,\n toggleAll,\n });\n\n const wrapperOnKeyDown = useNativeSearch({\n isEnabled: filteringType === 'none' && isOpen,\n options: visibleOptions,\n highlightOption: highlightOption,\n highlightedOption: highlightedOption?.option,\n useInteractiveGroups,\n });\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n errorIconAriaLabel: errorIconAriaLabel,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const tokens: TokenGroupProps['items'] = selectedOptions.map(option => ({\n label: option.label,\n disabled: disabled || option.disabled,\n labelTag: option.labelTag,\n description: option.description,\n iconAlt: option.iconAlt,\n iconName: option.iconName,\n iconUrl: option.iconUrl,\n iconSvg: option.iconSvg,\n tags: option.tags,\n dismissLabel: i18n('deselectAriaLabel', deselectAriaLabel?.(option), format =>\n format({ option__label: option.label ?? '' })\n ),\n }));\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownOnMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const tokenOnDismiss: TokenGroupProps['onDismiss'] = ({ detail }) => {\n const optionToDeselect = selectedOptions[detail.itemIndex];\n updateSelectedOption(optionToDeselect);\n const targetRef = getTriggerProps().ref;\n if (targetRef.current) {\n targetRef.current.focus();\n }\n };\n\n return {\n isOpen,\n tokens,\n announcement,\n dropdownStatus,\n filteringValue,\n filteredOptions: visibleOptions,\n highlightType,\n scrollToIndex,\n getFilterProps,\n getTriggerProps,\n getMenuProps: () => ({\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(ariaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n embedded,\n }),\n getOptionProps,\n getTokenProps: () => ({ onDismiss: tokenOnDismiss }),\n getDropdownProps: () => ({ ...getDropdownProps(), onMouseDown: dropdownOnMouseDown }),\n getWrapperProps: () => ({ onKeyDown: wrapperOnKeyDown }),\n highlightedIndex,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"use-multiselect.js","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,OAAO,EAAE,OAAO,EAAE,MAAM,oDAAoD,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAA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GAAG,EAAE,CAAC,CAAC;YACnB,GAAG,YAAY,EAAE;YACjB,UAAU,EAAE,cAAc;YAC1B,cAAc,EAAE,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC;YACnD,eAAe,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YAC9D,QAAQ;SACT,CAAC;QACF,cAAc;QACd,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;QACpD,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,gBAAgB,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;QACrF,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QACxD,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { DropdownOption } from '../internal/components/option/interfaces';\nimport { isGroup } from '../internal/components/option/utils/filter-options';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { SomeRequired } from '../internal/types';\nimport { joinStrings } from '../internal/utils/strings';\nimport { SelectListProps } from '../select/parts/plain-list';\nimport { checkOptionValueField } from '../select/utils/check-option-value-field.js';\nimport { findOptionIndex } from '../select/utils/connect-options';\nimport { useAnnouncement } from '../select/utils/use-announcement';\nimport { useLoadItems } from '../select/utils/use-load-items';\nimport { useNativeSearch } from '../select/utils/use-native-search';\nimport { useSelect } from '../select/utils/use-select';\nimport { TokenGroupProps } from '../token-group/interfaces';\nimport { DropdownStatusProps } from '../types/dropdown-status';\nimport { OptionDefinition, OptionGroup } from '../types/option';\nimport { MultiselectProps } from './interfaces';\n\ntype UseMultiselectOptions = SomeRequired<\n Pick<\n MultiselectProps,\n | 'options'\n | 'selectedOptions'\n | 'filteringType'\n | 'filteringResultsText'\n | 'disabled'\n | 'noMatch'\n | 'renderHighlightedAriaLive'\n | 'deselectAriaLabel'\n | 'keepOpen'\n | 'onBlur'\n | 'onFocus'\n | 'onLoadItems'\n | 'onChange'\n | 'selectedAriaLabel'\n | 'enableSelectAll'\n | 'i18nStrings'\n > &\n DropdownStatusProps & {\n controlId?: string;\n ariaLabelId: string;\n footerId: string;\n filteringValue: string;\n setFilteringValue?: (value: string) => void;\n externalRef: React.Ref<MultiselectProps.Ref>;\n },\n 'options' | 'selectedOptions' | 'filteringType' | 'statusType' | 'keepOpen'\n> & { embedded?: boolean };\n\nexport function useMultiselect({\n options,\n filteringType,\n filteringResultsText,\n disabled,\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n renderHighlightedAriaLive,\n selectedOptions,\n deselectAriaLabel,\n keepOpen,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n controlId,\n ariaLabelId,\n footerId,\n filteringValue,\n setFilteringValue,\n externalRef,\n embedded,\n enableSelectAll,\n i18nStrings,\n ...restProps\n}: UseMultiselectOptions) {\n checkOptionValueField('Multiselect', 'options', options);\n\n const i18n = useInternalI18n('multiselect');\n const i18nCommon = useInternalI18n('select');\n const recoveryText = i18nCommon('recoveryText', restProps.recoveryText);\n const errorIconAriaLabel = i18nCommon('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18nCommon('selectedAriaLabel', restProps.selectedAriaLabel);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Multiselect', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n const useInteractiveGroups = true;\n const { flatOptions, filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const selectAllOption: DropdownOption = {\n type: 'select-all',\n afterHeader: filteringType !== 'none',\n option: { label: i18n('i18nStrings.selectAllText', i18nStrings?.selectAllText) },\n };\n\n const visibleOptions =\n enableSelectAll && filteredOptions.length ? [selectAllOption, ...filteredOptions] : filteredOptions;\n\n // Includes visible and non-visible (filtered out) options\n const allNonParentOptions = flatOptions.filter(item => item.type !== 'parent').map(option => option.option);\n\n const filteredNonParentOptions = filteredOptions.filter(item => item.type !== 'parent').map(item => item.option);\n\n const selectedValues = useMemo(() => new Set(selectedOptions.map(option => option.value)), [selectedOptions]);\n\n const isSomeSelected = selectedOptions.length > 0;\n const isAllVisibleSelectableSelected =\n isSomeSelected && filteredNonParentOptions.every(option => option.disabled || selectedValues.has(option.value));\n const isAllSelected = allNonParentOptions.every(option => selectedValues.has(option.value));\n\n const toggleAll = () => {\n const filteredNonParentOptionValues = new Set(filteredNonParentOptions.map(option => option.value));\n fireNonCancelableEvent(onChange, {\n selectedOptions: isAllVisibleSelectableSelected\n ? selectedOptions.filter(option => !filteredNonParentOptionValues.has(option.value))\n : allNonParentOptions.filter(\n ({ disabled, value }) =>\n selectedValues.has(value) || (!disabled && filteredNonParentOptionValues.has(value))\n ),\n });\n };\n\n const updateSelectedOption = useCallback(\n (option: OptionDefinition | OptionGroup) => {\n // switch between selection and deselection behavior, ignores disabled options to prevent\n // getting stuck on one behavior when an option is disabled and its state cannot be changed\n const isAllChildrenSelected = (optionsArray: OptionDefinition[]) =>\n optionsArray.every(item => findOptionIndex(selectedOptions, item) > -1 || item.disabled);\n const intersection = (visibleOptions: OptionDefinition[], options: OptionDefinition[]) =>\n visibleOptions.filter(item => findOptionIndex(options, item) > -1 && !item.disabled);\n const union = (visibleOptions: OptionDefinition[], options: OptionDefinition[]) =>\n visibleOptions.filter(item => findOptionIndex(options, item) === -1).concat(options);\n const select = (options: OptionDefinition[], selectedOptions: OptionDefinition[]) => {\n return union(selectedOptions, options);\n };\n const unselect = (options: OptionDefinition[], selectedOptions: OptionDefinition[]) => {\n return selectedOptions.filter(option => findOptionIndex(options, option) === -1);\n };\n let newSelectedOptions = [...selectedOptions];\n\n if (isGroup(option)) {\n const visibleOptions = intersection([...option.options], filteredNonParentOptions);\n newSelectedOptions = isAllChildrenSelected(visibleOptions)\n ? unselect(visibleOptions, newSelectedOptions)\n : select(visibleOptions, newSelectedOptions);\n } else {\n newSelectedOptions = isAllChildrenSelected([option])\n ? unselect([option], newSelectedOptions)\n : select([option], newSelectedOptions);\n }\n\n fireNonCancelableEvent(onChange, {\n selectedOptions: newSelectedOptions,\n });\n },\n [selectedOptions, onChange, filteredNonParentOptions]\n );\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n announceSelected,\n focusActiveRef,\n } = useSelect({\n selectedOptions,\n updateSelectedOption,\n options: visibleOptions,\n filteringType,\n onFocus,\n onBlur,\n externalRef,\n keepOpen,\n fireLoadItems,\n setFilteringValue,\n useInteractiveGroups,\n statusType,\n embedded,\n isAllSelected,\n isSomeSelected,\n toggleAll,\n });\n\n const wrapperOnKeyDown = useNativeSearch({\n isEnabled: filteringType === 'none' && isOpen,\n options: visibleOptions,\n highlightOption: highlightOption,\n highlightedOption: highlightedOption?.option,\n useInteractiveGroups,\n });\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n errorIconAriaLabel: errorIconAriaLabel,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const tokens: TokenGroupProps['items'] = selectedOptions.map(option => ({\n label: option.label,\n disabled: disabled || option.disabled,\n labelTag: option.labelTag,\n description: option.description,\n iconAlt: option.iconAlt,\n iconName: option.iconName,\n iconUrl: option.iconUrl,\n iconSvg: option.iconSvg,\n tags: option.tags,\n dismissLabel: i18n('deselectAriaLabel', deselectAriaLabel?.(option), format =>\n format({ option__label: option.label ?? '' })\n ),\n }));\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownOnMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const tokenOnDismiss: TokenGroupProps['onDismiss'] = ({ detail }) => {\n const optionToDeselect = selectedOptions[detail.itemIndex];\n updateSelectedOption(optionToDeselect);\n const targetRef = getTriggerProps().ref;\n if (targetRef.current) {\n targetRef.current.focus();\n }\n };\n\n return {\n isOpen,\n tokens,\n announcement,\n dropdownStatus,\n filteringValue,\n filteredOptions: visibleOptions,\n highlightType,\n scrollToIndex,\n getFilterProps,\n getTriggerProps,\n getMenuProps: () => ({\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(ariaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n embedded,\n }),\n getOptionProps,\n getTokenProps: () => ({ onDismiss: tokenOnDismiss }),\n getDropdownProps: () => ({ ...getDropdownProps(), onMouseDown: dropdownOnMouseDown }),\n getWrapperProps: () => ({ onKeyDown: wrapperOnKeyDown }),\n highlightedIndex,\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../internal/base-component';
|
|
2
1
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
2
|
+
import { BaseComponentProps } from '../types/base-component';
|
|
3
3
|
export interface NavigableGroupProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* The children that will be rendered inside the navigation group.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/navigable-group/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/navigable-group/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;;;;;;;;OASG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC;IAC7C;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;CAC1D;AAED,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB,EAAE,0BAA0B;CAAG;AAEvG,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/navigable-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 {
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/navigable-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 { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface NavigableGroupProps extends BaseComponentProps {\n /**\n * The children that will be rendered inside the navigation group.\n *\n * The following Cloudscape components are supported, but do not\n * need to be direct children of the group:\n * - Button\n * - Button dropdown\n * - Toggle button\n * - Link\n */\n children: React.ReactNode;\n /**\n * A method that should return a unique identifier for a given element.\n * The element passed will be the first focusable descendent of a child component.\n */\n getItemKey: (element: HTMLElement) => string;\n /**\n * Determines which arrow keys move focus sequentially within the group:\n * - `horizontal` - left and right arrow keys\n * - `vertical` - up and down arrow keys\n * - `both` - all arrow keys\n */\n navigationDirection?: 'horizontal' | 'vertical' | 'both';\n}\n\nexport interface InternalNavigableGroupProps extends NavigableGroupProps, InternalBaseComponentProps {}\n\nexport namespace NavigableGroupProps {\n export interface Ref {\n /**\n * Focuses the first focusable element (or previously focused element) in the navigation group.\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,CAAC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AEG;QACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;KACvC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface PaginationProps {\n /**\n * Index of the current page. The first page has an index of 1.\n */\n currentPageIndex: number;\n\n /**\n * Sets the total number of pages. Only positive integers are allowed.\n */\n pagesCount: number;\n\n /**\n * Sets the pagination variant. It can be either default (when setting it to `false`) or open ended (when setting it\n * to `true`). Default pagination navigates you through the items list. The open-end variant enables you\n * to lazy-load your items because it always displays three dots before the next page icon. The next page button is\n * never disabled. When the user clicks on it but there are no more items to show, the\n * `onNextPageClick` handler is called with `requestedPageAvailable: false` in the event detail.\n */\n openEnd?: boolean;\n\n /**\n * If set to `true`, the pagination links will be disabled. Use it, for example, if you want to prevent the user\n * from changing page before items are loaded.\n */\n disabled?: boolean;\n\n /**\n * Adds aria-labels to the pagination buttons:\n * * `paginationLabel` (string) - Label for the entire pagination group. It allows users to distinguish context\n * * in cases of multiple pagination components in a page.\n * * `previousPageLabel` (string) - Previous page button.\n * * `pageLabel` (number => string) - Individual page button, this function is called for every page number that's rendered.\n * * `nextPageLabel` (string) - Next page button\n *\n * Example:\n * ```\n * {\n * nextPageLabel: 'Next page',\n * paginationLabel: 'Table pagination',\n * previousPageLabel: 'Previous page',\n * pageLabel: pageNumber => `Page ${pageNumber}`\n * }\n * ```\n * @i18n\n */\n ariaLabels?: PaginationProps.Labels;\n /**\n * @i18n\n */\n i18nStrings?: PaginationProps.I18nStrings;\n\n /**\n * Called when a user interaction causes a pagination change. The event `detail` contains the new `currentPageIndex`.\n */\n onChange?: NonCancelableEventHandler<PaginationProps.ChangeDetail>;\n\n /**\n * Called when the previous page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Always set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onPreviousPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n\n /**\n * Called when the next page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Indicates whether the requested page is available for display.\n * The value can be `false` when the `openEnd` property is set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onNextPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n /**\n * Jump to page configuration\n */\n jumpToPage?: PaginationProps.JumpToPageProps;\n}\n\nexport namespace PaginationProps {\n export interface Labels {\n nextPageLabel?: string;\n paginationLabel?: string;\n previousPageLabel?: string;\n pageLabel?: (pageNumber: number) => string;\n jumpToPageButton?: string;\n }\n\n export interface I18nStrings {\n /** @i18n */\n jumpToPageInputLabel?: string;\n /** @i18n */\n jumpToPageError?: string;\n /** @i18n */\n jumpToPageLoadingText?: string;\n }\n\n export interface ChangeDetail {\n currentPageIndex: number;\n }\n\n export interface PageClickDetail {\n requestedPageAvailable: boolean;\n requestedPageIndex: number;\n }\n\n export interface JumpToPageProps {\n /**\n * User controlled loading state when jump to page callback is executing\n */\n loading?: boolean;\n }\n\n export interface Ref {\n /**\n * Set error state for jump to page. Component will auto-clear when user types or navigates.\n */\n setError: (hasError: boolean) => void;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAgBhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAgBhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAMlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmF/C,QAAA,MAAM,kBAAkB,0HAwOvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAA4B,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAG7D,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAYrC,SAAS,UAAU,CAAC,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e,IAAI,SAAS,EAC/C,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,eAAe,IAAI,SAAS,EACvC,qBAAqB,EAAE;4BACrB,GAAG,EAAE,CAAC;4BACN,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;yBACvC,EACD,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAChC,SAAS,EAAE,CAAC,CAAC,EAAE;4BACb,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,EAAE,IAAI,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,KAAK,gBAAgB,EAAE,CAAC;gCAC/F,qBAAqB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;4BACjD,CAAC;wBACH,CAAC,GACD,CACE;gBACL,QAAQ,IAAI,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAA,CAAC,CAAC,CAAC,CAClC,oBAAC,eAAe,IACd,IAAI,EAAC,QAAQ,EACb,aAAa,EAAE,KAAK,EACpB,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAC,QAAQ,EACjB,WAAW,EAAC,QAAQ,EACpB,iBAAiB,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,IAEvE,gBAAgB,CACD,CACnB,CAAC,CAAC,CAAC,CACF,gBAAgB,CACjB,CACoB,CACpB,CACN,CACE,CACN,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { BaseChangeDetail } from '../input/interfaces';\nimport InternalInput from '../input/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useTableComponentsContext } from '../internal/context/table-component-context';\nimport { fireNonCancelableEvent, NonCancelableCustomEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport InternalPopover from '../popover/internal';\nimport InternalSpaceBetween from '../space-between/internal';\nimport { GeneratedAnalyticsMetadataPaginationClick } from './analytics-metadata/interfaces';\nimport { PaginationProps } from './interfaces';\nimport { getPaginationState, range } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface PageButtonProps {\n className?: string;\n ariaLabel: string;\n disabled?: boolean;\n pageIndex: number;\n isCurrent?: boolean;\n children?: React.ReactNode;\n onClick: (requestedIndex: number) => void;\n}\n\nfunction PageButton({\n className,\n ariaLabel,\n disabled,\n pageIndex,\n isCurrent = false,\n children,\n onClick,\n ...rest\n}: PageButtonProps) {\n function handleClick(event: React.MouseEvent) {\n if (disabled) {\n return;\n }\n event.preventDefault();\n onClick(pageIndex);\n }\n return (\n <li className={styles['page-item']} {...copyAnalyticsMetadataAttribute(rest)}>\n <button\n className={clsx(\n className,\n styles.button,\n disabled && styles['button-disabled'],\n isCurrent && styles['button-current']\n )}\n type=\"button\"\n aria-label={ariaLabel}\n aria-disabled={disabled ? true : undefined}\n tabIndex={disabled ? -1 : 0}\n onClick={handleClick}\n aria-current={isCurrent}\n {...(disabled\n ? {}\n : getAnalyticsMetadataAttribute({\n action: 'click',\n detail: {\n label: { root: 'self' },\n },\n } as GeneratedAnalyticsMetadataPaginationClick))}\n >\n {children}\n </button>\n </li>\n );\n}\n\nfunction PageNumber({ pageIndex, ...rest }: PageButtonProps) {\n return (\n <PageButton\n className={styles['page-number']}\n pageIndex={pageIndex}\n {...rest}\n {...(rest.disabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: `${pageIndex}`,\n },\n }))}\n >\n {pageIndex}\n </PageButton>\n );\n}\n\ntype InternalPaginationProps = PaginationProps & InternalBaseComponentProps;\n\nconst InternalPagination = React.forwardRef(\n (\n {\n openEnd,\n currentPageIndex,\n ariaLabels,\n i18nStrings,\n pagesCount,\n disabled,\n onChange,\n onNextPageClick,\n onPreviousPageClick,\n __internalRootRef,\n jumpToPage,\n ...rest\n }: InternalPaginationProps,\n ref: React.Ref<PaginationProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const { leftDots, leftIndex, rightIndex, rightDots } = getPaginationState(currentPageIndex, pagesCount, openEnd);\n const [jumpToPageValue, setJumpToPageValue] = useState(currentPageIndex?.toString());\n const previousLoading = usePrevious(jumpToPage?.loading);\n const jumpToPageInputRef = useRef<HTMLInputElement>(null);\n const [hasError, setHasError] = useState(false);\n\n const i18n = useInternalI18n('pagination');\n\n // Expose setError function via ref\n React.useImperativeHandle(ref, () => ({\n setError: (error: boolean) => setHasError(error),\n }));\n\n // Sync input with currentPageIndex after loading completes\n React.useEffect(() => {\n if (previousLoading && !jumpToPage?.loading) {\n setJumpToPageValue(String(currentPageIndex));\n }\n }, [previousLoading, jumpToPage?.loading, currentPageIndex]);\n\n const paginationLabel = ariaLabels?.paginationLabel ?? '';\n const nextPageLabel = i18n('ariaLabels.nextPageLabel', ariaLabels?.nextPageLabel) ?? '';\n const previousPageLabel = i18n('ariaLabels.previousPageLabel', ariaLabels?.previousPageLabel) ?? '';\n const pageNumberLabelFn =\n i18n('ariaLabels.pageLabel', ariaLabels?.pageLabel, format => pageNumber => format({ pageNumber })) ??\n ((pageNumber: number) => `${pageNumber}`);\n\n const jumpToPageLabel = i18n('i18nStrings.jumpToPageInputLabel', i18nStrings?.jumpToPageInputLabel) ?? '';\n const jumpToPageButtonLabel = i18n('ariaLabels.jumpToPageButtonLabel', ariaLabels?.jumpToPageButton) ?? '';\n const jumpToPageError = i18n('i18nStrings.jumpToPageError', i18nStrings?.jumpToPageError) ?? '';\n const jumpToPageLoadingText = i18n('i18nStrings.jumpToPageLoadingText', i18nStrings?.jumpToPageLoadingText) ?? '';\n\n function handlePrevPageClick(requestedPageIndex: number) {\n handlePageClick(requestedPageIndex);\n fireNonCancelableEvent(onPreviousPageClick, {\n requestedPageAvailable: true,\n requestedPageIndex: requestedPageIndex,\n });\n }\n\n function handleNextPageClick(requestedPageIndex: number) {\n handlePageClick(requestedPageIndex);\n fireNonCancelableEvent(onNextPageClick, {\n requestedPageAvailable: currentPageIndex < pagesCount,\n requestedPageIndex: requestedPageIndex,\n });\n }\n\n function handlePageClick(requestedPageIndex: number, errorState?: boolean) {\n setJumpToPageValue(String(requestedPageIndex));\n setHasError(!!errorState); // Clear error on successful navigation\n fireNonCancelableEvent(onChange, { currentPageIndex: requestedPageIndex });\n }\n\n function handleJumpToPageClick(requestedPageIndex: number) {\n const adjustedIndex = Math.max(1, Math.floor(requestedPageIndex));\n\n if (openEnd) {\n // Open-end: always navigate, parent will handle async loading\n handlePageClick(adjustedIndex);\n } else {\n // Closed-end: validate range\n if (adjustedIndex >= 1 && adjustedIndex <= pagesCount) {\n handlePageClick(adjustedIndex);\n } else {\n // Out of range - set error and navigate to last page\n handlePageClick(pagesCount, true);\n }\n }\n jumpToPageInputRef.current?.focus();\n }\n\n // Auto-clear error when user types in the input\n const handleInputChange = (e: NonCancelableCustomEvent<BaseChangeDetail>) => {\n setJumpToPageValue(e.detail.value);\n if (hasError) {\n setHasError(false);\n }\n };\n\n const previousButtonDisabled = disabled || currentPageIndex === 1;\n const nextButtonDisabled = disabled || (!openEnd && (pagesCount === 0 || currentPageIndex === pagesCount));\n const tableComponentContext = useTableComponentsContext();\n if (tableComponentContext?.paginationRef?.current) {\n tableComponentContext.paginationRef.current.currentPageIndex = currentPageIndex;\n tableComponentContext.paginationRef.current.totalPageCount = pagesCount;\n tableComponentContext.paginationRef.current.openEnd = openEnd;\n }\n\n const jumpToPageButton = (\n <InternalButton\n iconName=\"arrow-right\"\n variant=\"icon\"\n loading={jumpToPage?.loading}\n loadingText={jumpToPageLoadingText}\n ariaLabel={jumpToPage?.loading ? jumpToPageLoadingText : jumpToPageButtonLabel}\n onClick={() => handleJumpToPageClick(Number(jumpToPageValue))}\n disabled={!jumpToPageValue || Number(jumpToPageValue) === currentPageIndex}\n />\n );\n\n return (\n <ul\n aria-label={paginationLabel}\n {...baseProps}\n className={clsx(baseProps.className, styles.root, disabled && styles['root-disabled'])}\n ref={__internalRootRef}\n >\n <PageButton\n className={styles.arrow}\n pageIndex={currentPageIndex - 1}\n ariaLabel={previousPageLabel}\n disabled={previousButtonDisabled}\n onClick={handlePrevPageClick}\n {...(previousButtonDisabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: 'prev',\n },\n }))}\n >\n <InternalIcon name=\"angle-left\" variant={disabled ? 'disabled' : 'normal'} />\n </PageButton>\n <PageNumber\n pageIndex={1}\n isCurrent={currentPageIndex === 1}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(1)}\n onClick={handlePageClick}\n />\n {leftDots && <li className={styles.dots}>...</li>}\n {range(leftIndex, rightIndex).map(pageIndex => (\n <PageNumber\n key={pageIndex}\n isCurrent={currentPageIndex === pageIndex}\n pageIndex={pageIndex}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(pageIndex)}\n onClick={handlePageClick}\n />\n ))}\n {rightDots && <li className={styles.dots}>...</li>}\n {!openEnd && pagesCount > 1 && (\n <PageNumber\n isCurrent={currentPageIndex === pagesCount}\n pageIndex={pagesCount}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(pagesCount)}\n onClick={handlePageClick}\n />\n )}\n <PageButton\n className={styles.arrow}\n pageIndex={currentPageIndex + 1}\n ariaLabel={nextPageLabel}\n disabled={nextButtonDisabled}\n onClick={handleNextPageClick}\n {...(nextButtonDisabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: 'next',\n },\n }))}\n >\n <InternalIcon name=\"angle-right\" variant={disabled ? 'disabled' : 'normal'} />\n </PageButton>\n {jumpToPage && (\n <li className={styles['jump-to-page']}>\n <InternalSpaceBetween size=\"xxs\" direction=\"horizontal\" alignItems=\"end\">\n <div className={styles['jump-to-page-input']}>\n <InternalInput\n ref={jumpToPageInputRef}\n type=\"number\"\n value={jumpToPageValue}\n __inlineLabelText={jumpToPageLabel || undefined}\n __fullWidth={true}\n ariaLabel={jumpToPageLabel || undefined}\n nativeInputAttributes={{\n min: 1,\n max: !openEnd ? pagesCount : undefined,\n }}\n onChange={handleInputChange}\n onBlur={() => setHasError(false)}\n onKeyDown={e => {\n if (e.detail.keyCode === 13 && jumpToPageValue && Number(jumpToPageValue) !== currentPageIndex) {\n handleJumpToPageClick(Number(jumpToPageValue));\n }\n }}\n />\n </div>\n {hasError && !jumpToPage?.loading ? (\n <InternalPopover\n size=\"medium\"\n dismissButton={false}\n __visible={true}\n content={jumpToPageError}\n position=\"bottom\"\n triggerType=\"custom\"\n __onVisibleChange={({ detail }) => !detail.visible && setHasError(false)}\n >\n {jumpToPageButton}\n </InternalPopover>\n ) : (\n jumpToPageButton\n )}\n </InternalSpaceBetween>\n </li>\n )}\n </ul>\n );\n }\n);\n\nexport default InternalPagination;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,YAAY,MAAM,kBAAkB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QAAQ,EAAC,QAAQ,EACjB,WAAW,EAAC,QAAQ,EACpB,iBAAiB,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,IAEvE,gBAAgB,CACD,CACnB,CAAC,CAAC,CAAC,CACF,gBAAgB,CACjB,CACoB,CACpB,CACN,CACE,CACN,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport InternalIcon from '../icon/internal';\nimport { BaseChangeDetail } from '../input/interfaces';\nimport InternalInput from '../input/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useTableComponentsContext } from '../internal/context/table-component-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport InternalPopover from '../popover/internal';\nimport InternalSpaceBetween from '../space-between/internal';\nimport { NonCancelableCustomEvent } from '../types/events';\nimport { GeneratedAnalyticsMetadataPaginationClick } from './analytics-metadata/interfaces';\nimport { PaginationProps } from './interfaces';\nimport { getPaginationState, range } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface PageButtonProps {\n className?: string;\n ariaLabel: string;\n disabled?: boolean;\n pageIndex: number;\n isCurrent?: boolean;\n children?: React.ReactNode;\n onClick: (requestedIndex: number) => void;\n}\n\nfunction PageButton({\n className,\n ariaLabel,\n disabled,\n pageIndex,\n isCurrent = false,\n children,\n onClick,\n ...rest\n}: PageButtonProps) {\n function handleClick(event: React.MouseEvent) {\n if (disabled) {\n return;\n }\n event.preventDefault();\n onClick(pageIndex);\n }\n return (\n <li className={styles['page-item']} {...copyAnalyticsMetadataAttribute(rest)}>\n <button\n className={clsx(\n className,\n styles.button,\n disabled && styles['button-disabled'],\n isCurrent && styles['button-current']\n )}\n type=\"button\"\n aria-label={ariaLabel}\n aria-disabled={disabled ? true : undefined}\n tabIndex={disabled ? -1 : 0}\n onClick={handleClick}\n aria-current={isCurrent}\n {...(disabled\n ? {}\n : getAnalyticsMetadataAttribute({\n action: 'click',\n detail: {\n label: { root: 'self' },\n },\n } as GeneratedAnalyticsMetadataPaginationClick))}\n >\n {children}\n </button>\n </li>\n );\n}\n\nfunction PageNumber({ pageIndex, ...rest }: PageButtonProps) {\n return (\n <PageButton\n className={styles['page-number']}\n pageIndex={pageIndex}\n {...rest}\n {...(rest.disabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: `${pageIndex}`,\n },\n }))}\n >\n {pageIndex}\n </PageButton>\n );\n}\n\ntype InternalPaginationProps = PaginationProps & InternalBaseComponentProps;\n\nconst InternalPagination = React.forwardRef(\n (\n {\n openEnd,\n currentPageIndex,\n ariaLabels,\n i18nStrings,\n pagesCount,\n disabled,\n onChange,\n onNextPageClick,\n onPreviousPageClick,\n __internalRootRef,\n jumpToPage,\n ...rest\n }: InternalPaginationProps,\n ref: React.Ref<PaginationProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const { leftDots, leftIndex, rightIndex, rightDots } = getPaginationState(currentPageIndex, pagesCount, openEnd);\n const [jumpToPageValue, setJumpToPageValue] = useState(currentPageIndex?.toString());\n const previousLoading = usePrevious(jumpToPage?.loading);\n const jumpToPageInputRef = useRef<HTMLInputElement>(null);\n const [hasError, setHasError] = useState(false);\n\n const i18n = useInternalI18n('pagination');\n\n // Expose setError function via ref\n React.useImperativeHandle(ref, () => ({\n setError: (error: boolean) => setHasError(error),\n }));\n\n // Sync input with currentPageIndex after loading completes\n React.useEffect(() => {\n if (previousLoading && !jumpToPage?.loading) {\n setJumpToPageValue(String(currentPageIndex));\n }\n }, [previousLoading, jumpToPage?.loading, currentPageIndex]);\n\n const paginationLabel = ariaLabels?.paginationLabel ?? '';\n const nextPageLabel = i18n('ariaLabels.nextPageLabel', ariaLabels?.nextPageLabel) ?? '';\n const previousPageLabel = i18n('ariaLabels.previousPageLabel', ariaLabels?.previousPageLabel) ?? '';\n const pageNumberLabelFn =\n i18n('ariaLabels.pageLabel', ariaLabels?.pageLabel, format => pageNumber => format({ pageNumber })) ??\n ((pageNumber: number) => `${pageNumber}`);\n\n const jumpToPageLabel = i18n('i18nStrings.jumpToPageInputLabel', i18nStrings?.jumpToPageInputLabel) ?? '';\n const jumpToPageButtonLabel = i18n('ariaLabels.jumpToPageButtonLabel', ariaLabels?.jumpToPageButton) ?? '';\n const jumpToPageError = i18n('i18nStrings.jumpToPageError', i18nStrings?.jumpToPageError) ?? '';\n const jumpToPageLoadingText = i18n('i18nStrings.jumpToPageLoadingText', i18nStrings?.jumpToPageLoadingText) ?? '';\n\n function handlePrevPageClick(requestedPageIndex: number) {\n handlePageClick(requestedPageIndex);\n fireNonCancelableEvent(onPreviousPageClick, {\n requestedPageAvailable: true,\n requestedPageIndex: requestedPageIndex,\n });\n }\n\n function handleNextPageClick(requestedPageIndex: number) {\n handlePageClick(requestedPageIndex);\n fireNonCancelableEvent(onNextPageClick, {\n requestedPageAvailable: currentPageIndex < pagesCount,\n requestedPageIndex: requestedPageIndex,\n });\n }\n\n function handlePageClick(requestedPageIndex: number, errorState?: boolean) {\n setJumpToPageValue(String(requestedPageIndex));\n setHasError(!!errorState); // Clear error on successful navigation\n fireNonCancelableEvent(onChange, { currentPageIndex: requestedPageIndex });\n }\n\n function handleJumpToPageClick(requestedPageIndex: number) {\n const adjustedIndex = Math.max(1, Math.floor(requestedPageIndex));\n\n if (openEnd) {\n // Open-end: always navigate, parent will handle async loading\n handlePageClick(adjustedIndex);\n } else {\n // Closed-end: validate range\n if (adjustedIndex >= 1 && adjustedIndex <= pagesCount) {\n handlePageClick(adjustedIndex);\n } else {\n // Out of range - set error and navigate to last page\n handlePageClick(pagesCount, true);\n }\n }\n jumpToPageInputRef.current?.focus();\n }\n\n // Auto-clear error when user types in the input\n const handleInputChange = (e: NonCancelableCustomEvent<BaseChangeDetail>) => {\n setJumpToPageValue(e.detail.value);\n if (hasError) {\n setHasError(false);\n }\n };\n\n const previousButtonDisabled = disabled || currentPageIndex === 1;\n const nextButtonDisabled = disabled || (!openEnd && (pagesCount === 0 || currentPageIndex === pagesCount));\n const tableComponentContext = useTableComponentsContext();\n if (tableComponentContext?.paginationRef?.current) {\n tableComponentContext.paginationRef.current.currentPageIndex = currentPageIndex;\n tableComponentContext.paginationRef.current.totalPageCount = pagesCount;\n tableComponentContext.paginationRef.current.openEnd = openEnd;\n }\n\n const jumpToPageButton = (\n <InternalButton\n iconName=\"arrow-right\"\n variant=\"icon\"\n loading={jumpToPage?.loading}\n loadingText={jumpToPageLoadingText}\n ariaLabel={jumpToPage?.loading ? jumpToPageLoadingText : jumpToPageButtonLabel}\n onClick={() => handleJumpToPageClick(Number(jumpToPageValue))}\n disabled={!jumpToPageValue || Number(jumpToPageValue) === currentPageIndex}\n />\n );\n\n return (\n <ul\n aria-label={paginationLabel}\n {...baseProps}\n className={clsx(baseProps.className, styles.root, disabled && styles['root-disabled'])}\n ref={__internalRootRef}\n >\n <PageButton\n className={styles.arrow}\n pageIndex={currentPageIndex - 1}\n ariaLabel={previousPageLabel}\n disabled={previousButtonDisabled}\n onClick={handlePrevPageClick}\n {...(previousButtonDisabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: 'prev',\n },\n }))}\n >\n <InternalIcon name=\"angle-left\" variant={disabled ? 'disabled' : 'normal'} />\n </PageButton>\n <PageNumber\n pageIndex={1}\n isCurrent={currentPageIndex === 1}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(1)}\n onClick={handlePageClick}\n />\n {leftDots && <li className={styles.dots}>...</li>}\n {range(leftIndex, rightIndex).map(pageIndex => (\n <PageNumber\n key={pageIndex}\n isCurrent={currentPageIndex === pageIndex}\n pageIndex={pageIndex}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(pageIndex)}\n onClick={handlePageClick}\n />\n ))}\n {rightDots && <li className={styles.dots}>...</li>}\n {!openEnd && pagesCount > 1 && (\n <PageNumber\n isCurrent={currentPageIndex === pagesCount}\n pageIndex={pagesCount}\n disabled={disabled}\n ariaLabel={pageNumberLabelFn(pagesCount)}\n onClick={handlePageClick}\n />\n )}\n <PageButton\n className={styles.arrow}\n pageIndex={currentPageIndex + 1}\n ariaLabel={nextPageLabel}\n disabled={nextButtonDisabled}\n onClick={handleNextPageClick}\n {...(nextButtonDisabled\n ? {}\n : getAnalyticsMetadataAttribute({\n detail: {\n position: 'next',\n },\n }))}\n >\n <InternalIcon name=\"angle-right\" variant={disabled ? 'disabled' : 'normal'} />\n </PageButton>\n {jumpToPage && (\n <li className={styles['jump-to-page']}>\n <InternalSpaceBetween size=\"xxs\" direction=\"horizontal\" alignItems=\"end\">\n <div className={styles['jump-to-page-input']}>\n <InternalInput\n ref={jumpToPageInputRef}\n type=\"number\"\n value={jumpToPageValue}\n __inlineLabelText={jumpToPageLabel || undefined}\n __fullWidth={true}\n ariaLabel={jumpToPageLabel || undefined}\n nativeInputAttributes={{\n min: 1,\n max: !openEnd ? pagesCount : undefined,\n }}\n onChange={handleInputChange}\n onBlur={() => setHasError(false)}\n onKeyDown={e => {\n if (e.detail.keyCode === 13 && jumpToPageValue && Number(jumpToPageValue) !== currentPageIndex) {\n handleJumpToPageClick(Number(jumpToPageValue));\n }\n }}\n />\n </div>\n {hasError && !jumpToPage?.loading ? (\n <InternalPopover\n size=\"medium\"\n dismissButton={false}\n __visible={true}\n content={jumpToPageError}\n position=\"bottom\"\n triggerType=\"custom\"\n __onVisibleChange={({ detail }) => !detail.visible && setHasError(false)}\n >\n {jumpToPageButton}\n </InternalPopover>\n ) : (\n jumpToPageButton\n )}\n </InternalSpaceBetween>\n </li>\n )}\n </ul>\n );\n }\n);\n\nexport default InternalPagination;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../
|
|
3
|
-
import { NonCancelableEventHandler } from '../
|
|
2
|
+
import { BaseComponentProps } from '../types/base-component';
|
|
3
|
+
import { NonCancelableEventHandler } from '../types/events';
|
|
4
4
|
export interface PanelLayoutProps extends BaseComponentProps {
|
|
5
5
|
/**
|
|
6
6
|
* Position of the panel with respect to the main content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/panel-layout/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/panel-layout/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC;IAE/C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,WAAW,EAAE,SAAS,CAAC;IAEvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAElD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAEjD;;;;;OAKG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC;IAEnC;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC;IAE3C;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAE9E;;;OAGG;IACH,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;CAChF;AAED,yBAAiB,gBAAgB,CAAC;IAChC,KAAY,aAAa,GAAG,YAAY,GAAG,UAAU,CAAC;IACtD,KAAY,OAAO,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,CAAC;IAEzD,UAAiB,iBAAiB;QAChC,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,eAAe;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;IAED,UAAiB,WAAW;QAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;KAClC;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,iBAAiB,IAAI,IAAI,CAAC;KAC3B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/panel-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/panel-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface PanelLayoutProps extends BaseComponentProps {\n /**\n * Position of the panel with respect to the main content\n */\n panelPosition?: PanelLayoutProps.PanelPosition;\n\n /**\n * Initial panel size, for uncontrolled behavior.\n *\n * The actual size will be constrained by `minPanelSize` and `maxPanelSize`, if set.\n */\n defaultPanelSize?: number;\n\n /**\n * Size of the panel. If provided, and panel is resizable, the component is controlled,\n * so you must also provide `onPanelResize`.\n *\n * The actual size will be constrained by `minPanelSize` and `maxPanelSize`, if set.\n */\n panelSize?: number;\n\n /**\n * The minimum size of the panel.\n */\n minPanelSize?: number;\n\n /**\n * The maximum size of the panel.\n */\n maxPanelSize?: number;\n\n /**\n * Indicates whether the panel is resizable.\n */\n resizable?: boolean;\n\n /**\n * Panel contents.\n */\n panelContent: ReactNode;\n\n /**\n * Main content area displayed next to the panel.\n */\n mainContent: ReactNode;\n\n /**\n * Makes the panel content focusable. This should be used if there are no focusable elements\n * inside the panel, to ensure it is keyboard scrollable.\n *\n * Provide either `{ariaLabel: \"Panel label\"}` or `{ariaLabelledby: \"panel-label-id\"}`\n */\n panelFocusable?: PanelLayoutProps.FocusableConfig;\n\n /**\n * Makes the main content area focusable. This should be used if there are no focusable elements\n * inside the content, to ensure it is keyboard scrollable.\n *\n * Provide either `{ariaLabel: \"Main label\"}` or `{ariaLabelledby: \"main-label-id\"}`\n */\n mainFocusable?: PanelLayoutProps.FocusableConfig;\n\n /**\n * Determines which content is displayed:\n * - 'all': Both panel and main content are displayed.\n * - 'panel-only': Only panel is displayed.\n * - 'main-only': Only main content is displayed.\n */\n display?: PanelLayoutProps.Display;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: PanelLayoutProps.I18nStrings;\n\n /**\n * Called when the user resizes the panel.\n */\n onPanelResize?: NonCancelableEventHandler<PanelLayoutProps.PanelResizeDetail>;\n\n /**\n * Called when the panel and/or main content size changes. This can be due\n * to user resizing or changes to the available space on the page.\n */\n onLayoutChange?: NonCancelableEventHandler<PanelLayoutProps.PanelResizeDetail>;\n}\n\nexport namespace PanelLayoutProps {\n export type PanelPosition = 'side-start' | 'side-end';\n export type Display = 'all' | 'panel-only' | 'main-only';\n\n export interface PanelResizeDetail {\n totalSize: number;\n panelSize: number;\n }\n\n export interface FocusableConfig {\n ariaLabel?: string;\n ariaLabelledby?: string;\n }\n\n export interface I18nStrings {\n resizeHandleAriaLabel?: string;\n resizeHandleTooltipText?: string;\n }\n\n export interface Ref {\n /**\n * Focuses the resize handle of the panel layout.\n */\n focusResizeHandle(): void;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../internal/base-component';
|
|
3
|
-
import { NonCancelableEventHandler } from '../internal/events';
|
|
4
2
|
import { PopoverProps } from '../popover/interfaces';
|
|
3
|
+
import { BaseComponentProps } from '../types/base-component';
|
|
4
|
+
import { NonCancelableEventHandler } from '../types/events';
|
|
5
5
|
export interface SeriesInfo {
|
|
6
6
|
label: string;
|
|
7
7
|
color: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE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