@cloudscape-design/components-themeable 3.0.1392 → 3.0.1394

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.
Files changed (71) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/input/styles.scss +104 -189
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/scss/segmented-control/styles.scss +1 -0
  5. package/lib/internal/template/button/interfaces.d.ts +3 -1
  6. package/lib/internal/template/button/interfaces.d.ts.map +1 -1
  7. package/lib/internal/template/button/interfaces.js.map +1 -1
  8. package/lib/internal/template/button-dropdown/interfaces.d.ts +6 -3
  9. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  10. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  11. package/lib/internal/template/button-group/interfaces.d.ts +22 -13
  12. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  13. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  14. package/lib/internal/template/calendar/grid/index.js.map +1 -1
  15. package/lib/internal/template/calendar/interfaces.d.ts +3 -1
  16. package/lib/internal/template/calendar/interfaces.d.ts.map +1 -1
  17. package/lib/internal/template/calendar/interfaces.js.map +1 -1
  18. package/lib/internal/template/copy-to-clipboard/interfaces.d.ts +3 -1
  19. package/lib/internal/template/copy-to-clipboard/interfaces.d.ts.map +1 -1
  20. package/lib/internal/template/copy-to-clipboard/interfaces.js.map +1 -1
  21. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.d.ts +1 -1
  22. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
  23. package/lib/internal/template/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
  24. package/lib/internal/template/date-range-picker/interfaces.d.ts +3 -1
  25. package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
  26. package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
  27. package/lib/internal/template/drawer/interfaces.d.ts +3 -1
  28. package/lib/internal/template/drawer/interfaces.d.ts.map +1 -1
  29. package/lib/internal/template/drawer/interfaces.js.map +1 -1
  30. package/lib/internal/template/input/internal.d.ts.map +1 -1
  31. package/lib/internal/template/input/internal.js +14 -18
  32. package/lib/internal/template/input/internal.js.map +1 -1
  33. package/lib/internal/template/input/styles.css.js +37 -38
  34. package/lib/internal/template/input/styles.scoped.css +172 -248
  35. package/lib/internal/template/input/styles.selectors.js +37 -38
  36. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  37. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  38. package/lib/internal/template/internal/components/autosuggest-input/index.js +5 -2
  39. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  40. package/lib/internal/template/internal/components/option/interfaces.d.ts +1 -1
  41. package/lib/internal/template/internal/components/option/interfaces.d.ts.map +1 -1
  42. package/lib/internal/template/internal/components/option/interfaces.js.map +1 -1
  43. package/lib/internal/template/internal/environment.js +2 -2
  44. package/lib/internal/template/internal/environment.json +2 -2
  45. package/lib/internal/template/internal/generated/styles/tokens.js +1167 -1167
  46. package/lib/internal/template/internal/generated/theming/index.cjs +1167 -1167
  47. package/lib/internal/template/internal/generated/theming/index.js +1167 -1167
  48. package/lib/internal/template/internal/hooks/use-hidden-description/index.d.ts +2 -1
  49. package/lib/internal/template/internal/hooks/use-hidden-description/index.d.ts.map +1 -1
  50. package/lib/internal/template/internal/hooks/use-hidden-description/index.js.map +1 -1
  51. package/lib/internal/template/segmented-control/interfaces.d.ts +2 -2
  52. package/lib/internal/template/segmented-control/interfaces.d.ts.map +1 -1
  53. package/lib/internal/template/segmented-control/interfaces.js.map +1 -1
  54. package/lib/internal/template/select/interfaces.d.ts +1 -1
  55. package/lib/internal/template/select/interfaces.js.map +1 -1
  56. package/lib/internal/template/table/body-cell/disabled-inline-editor.d.ts +2 -1
  57. package/lib/internal/template/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
  58. package/lib/internal/template/table/body-cell/disabled-inline-editor.js.map +1 -1
  59. package/lib/internal/template/table/interfaces.d.ts +5 -3
  60. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  61. package/lib/internal/template/table/interfaces.js.map +1 -1
  62. package/lib/internal/template/tabs/interfaces.d.ts +4 -2
  63. package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
  64. package/lib/internal/template/tabs/interfaces.js.map +1 -1
  65. package/lib/internal/template/toggle-button/interfaces.d.ts +3 -1
  66. package/lib/internal/template/toggle-button/interfaces.d.ts.map +1 -1
  67. package/lib/internal/template/toggle-button/interfaces.js.map +1 -1
  68. package/lib/internal/template/types/option.d.ts +1 -1
  69. package/lib/internal/template/types/option.d.ts.map +1 -1
  70. package/lib/internal/template/types/option.js.map +1 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/tabs/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from '../button/interfaces';\nimport { ContainerProps } from '../container/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FocusRingStyle } from '../types/utils';\n\nexport interface TabsProps extends BaseComponentProps {\n /**\n * Specifies the tabs to display. Each tab object has the following properties:\n *\n * - `id` (string) - The tab identifier. This value needs to be passed to the Tabs component as `activeTabId` to select this tab.\n * - `label` (ReactNode) - Tab label shown in the UI.\n * - `content` (ReactNode) - (Optional) Tab content to render in the container.\n * - `disabled` (boolean) - (Optional) Specifies if this tab is disabled.\n * - `disabledReason` (string) - (Optional) Displays tooltip near the tab when disabled. Use to provide additional context.\n * - `dismissible` (boolean) - (Optional) Determines whether the tab includes a dismiss icon button. By default, the dismiss button is not included.\n * - `dismissLabel` (boolean) - (Optional) Specifies an aria-label for the dismiss icon button.\n * - `dismissDisabled` (boolean) - (Optional) Determines whether the dismiss button is disabled.\n * - `action` (ReactNode) - (Optional) Action for the tab, rendered next to its corresponding label.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add\n * an icon button or icon button dropdown.\n * - `onDismiss` (ButtonProps['onClick']) - (Optional) Called when a user clicks on the dismiss button.\n * - `href` (string) - (Optional) You can use this parameter to change the default `href` of the internal tab anchor. The\n * `click` event default behavior is prevented, unless the user clicks the tab with a key modifier (that is, CTRL,\n * ALT, SHIFT, META). This enables the user to open new browser tabs with an initially selected component tab,\n * if your application routing can handle such deep links. You can manually update routing on the current page\n * using the `activeTabHref` property of the `change` event's detail.\n * - `contentRenderStrategy` (string) - (Optional) Determines when tab content is rendered:\n - `'active'`: (Default) Only render content when the tab is active.\n * - `'eager'`: Always render tab content (hidden when the tab is not active).\n * - `'lazy'`: Like 'eager', but content is only rendered after the tab is first activated.\n */\n tabs: ReadonlyArray<TabsProps.Tab>;\n\n /**\n * Actions for the tabs header, displayed next to the list of tabs.\n * Use this to add a button or button dropdown that performs actions on the\n * entire tab list. We recommend a maximum of one interactive element to\n * minimize the number of keyboard tab stops between the tab list and content.\n */\n actions?: React.ReactNode;\n\n /**\n * The possible visual variants of tabs are the following:\n * * `default` - Use in any context.\n * * `container` - Use this variant to have the tabs displayed within a container header.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * @visualrefresh `stacked` variant\n */\n variant?: TabsProps.Variant;\n\n /**\n * Called whenever the user selects a different tab.\n * The event's `detail` contains the new `activeTabId`.\n */\n onChange?: NonCancelableEventHandler<TabsProps.ChangeDetail>;\n\n /**\n * The `id` of the currently active tab.\n * * If you don't set this property, the component activates the first tab and switches tabs automatically when a tab header is clicked (that is, uncontrolled behavior).\n * * If you explicitly set this property, you must set define an `onChange` handler to update the property when a tab header is clicked (that is, controlled behavior).\n */\n activeTabId?: string;\n\n /**\n * Provides an `aria-label` to the tab container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets the `aria-labelledby` property on the tab container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * Determines whether the tab content has padding. If `true`, removes the default padding from the tab content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: TabsProps.I18nStrings;\n /**\n * Enabling this property makes the tab content fit to the available height.\n * If the tab content is too short, it will stretch. If the tab content is too long, a vertical scrollbar will be shown.\n */\n fitHeight?: boolean;\n /**\n * Determines how the active tab is switched when navigating using\n * the keyboard. The options are:\n * - 'automatic' (default): the active tab is switched using the arrow keys.\n * - 'manual': a tab must be explicitly activated using the enter/space key.\n * We recommend using 'automatic' in most situations to provide consistent\n * and quick switching between tabs. Use 'manual' only if there is a specific\n * need to introduce friction to the switching of tabs.\n */\n keyboardActivationMode?: 'automatic' | 'manual';\n\n /**\n * An object containing CSS properties to customize the tabs' visual appearance.\n * Refer to the [style](/components/tabs/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: TabsProps.Style;\n}\nexport namespace TabsProps {\n export type Variant = 'default' | 'container' | 'stacked';\n\n export interface Tab {\n /**\n * The tab id. This value will be need to be passed to the Tabs component as `activeTabId` to select this tab.\n */\n id: string;\n /**\n * Tab label shown in the UI.\n */\n label: React.ReactNode;\n /**\n * Tab content to render in the container.\n */\n content?: React.ReactNode;\n /**\n * Whether this tab is disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why this tab is disabled.\n */\n disabledReason?: string;\n /**\n * (Optional) Determines whether the tab includes a dismiss icon button. By default, the dismiss button is not included.\n * When a user clicks on this button the onDismiss handler is called.\n */\n dismissible?: boolean;\n /**\n * (Optional) Specifies an aria-label for the dismiss icon button.\n */\n dismissLabel?: string;\n /**\n * (Optional) Determines whether the dismiss button is disabled.\n */\n dismissDisabled?: boolean;\n /**\n * (Optional) Action for the tab, rendered next to its corresponding label.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add\n * an icon button or icon button dropdown.\n */\n action?: React.ReactNode;\n /**\n * (event => void) Called when a user clicks on the dismiss button.\n */\n onDismiss?: ButtonProps['onClick'];\n /**\n * You can use this parameter to change the default `href` of the internal tab anchor. The\n * `click` event default behavior is prevented, unless the user clicks the tab with a key modifier (CTRL,\n * ALT, SHIFT, META). This allows to open new browser tabs with an initially selected component tab,\n * when the routing can handle such deep links. You can manually update routing on the current page\n * using the `activeTabHref` property of the `change` event's detail.\n */\n href?: string;\n /**\n * Determines when tab content is rendered:\n * - 'active' (default): Only render content when the tab is active.\n * - 'eager': Always render tab content (hidden when the tab is not active).\n * - 'lazy': Like 'eager', but content is only rendered after the tab is first activated.\n */\n contentRenderStrategy?: 'active' | 'eager' | 'lazy';\n }\n\n export interface ChangeDetail {\n /**\n * The ID of the clicked tab.\n */\n activeTabId: string;\n /**\n * The `href` attribute of the clicked tab, if defined.\n */\n activeTabHref?: string;\n }\n\n export interface I18nStrings {\n /**\n * ARIA label for the scroll left button that appears when the tab header is wider than the container.\n */\n scrollLeftAriaLabel?: string;\n /**\n * ARIA label for the scroll right button that appears when the tab header is wider than the container.\n */\n scrollRightAriaLabel?: string;\n /**\n * ARIA role description for the Tabs component when an action or dismissible prop is in use. This is used\n * with role=\"application\" to provide further information on the purpose of this component\n */\n tabsWithActionsAriaRoleDescription?: string;\n }\n\n export interface Style {\n container?: ContainerProps.Style;\n tab?: {\n backgroundColor?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n fontSize?: string;\n fontWeight?: string;\n focusRing?: FocusRingStyle;\n paddingBlock?: string;\n paddingInline?: string;\n activeIndicator?: {\n color?: string;\n width?: string;\n borderRadius?: string;\n };\n };\n tabSeparator?: {\n color?: string;\n width?: string;\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/tabs/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ButtonProps } from '../button/interfaces';\nimport { ContainerProps } from '../container/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FocusRingStyle } from '../types/utils';\n\nexport interface TabsProps extends BaseComponentProps {\n /**\n * Specifies the tabs to display. Each tab object has the following properties:\n *\n * - `id` (string) - The tab identifier. This value needs to be passed to the Tabs component as `activeTabId` to select this tab.\n * - `label` (ReactNode) - Tab label shown in the UI.\n * - `content` (ReactNode) - (Optional) Tab content to render in the container.\n * - `disabled` (boolean) - (Optional) Specifies if this tab is disabled.\n * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the tab when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.\n * - `dismissible` (boolean) - (Optional) Determines whether the tab includes a dismiss icon button. By default, the dismiss button is not included.\n * - `dismissLabel` (boolean) - (Optional) Specifies an aria-label for the dismiss icon button.\n * - `dismissDisabled` (boolean) - (Optional) Determines whether the dismiss button is disabled.\n * - `action` (ReactNode) - (Optional) Action for the tab, rendered next to its corresponding label.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add\n * an icon button or icon button dropdown.\n * - `onDismiss` (ButtonProps['onClick']) - (Optional) Called when a user clicks on the dismiss button.\n * - `href` (string) - (Optional) You can use this parameter to change the default `href` of the internal tab anchor. The\n * `click` event default behavior is prevented, unless the user clicks the tab with a key modifier (that is, CTRL,\n * ALT, SHIFT, META). This enables the user to open new browser tabs with an initially selected component tab,\n * if your application routing can handle such deep links. You can manually update routing on the current page\n * using the `activeTabHref` property of the `change` event's detail.\n * - `contentRenderStrategy` (string) - (Optional) Determines when tab content is rendered:\n - `'active'`: (Default) Only render content when the tab is active.\n * - `'eager'`: Always render tab content (hidden when the tab is not active).\n * - `'lazy'`: Like 'eager', but content is only rendered after the tab is first activated.\n */\n tabs: ReadonlyArray<TabsProps.Tab>;\n\n /**\n * Actions for the tabs header, displayed next to the list of tabs.\n * Use this to add a button or button dropdown that performs actions on the\n * entire tab list. We recommend a maximum of one interactive element to\n * minimize the number of keyboard tab stops between the tab list and content.\n */\n actions?: React.ReactNode;\n\n /**\n * The possible visual variants of tabs are the following:\n * * `default` - Use in any context.\n * * `container` - Use this variant to have the tabs displayed within a container header.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * @visualrefresh `stacked` variant\n */\n variant?: TabsProps.Variant;\n\n /**\n * Called whenever the user selects a different tab.\n * The event's `detail` contains the new `activeTabId`.\n */\n onChange?: NonCancelableEventHandler<TabsProps.ChangeDetail>;\n\n /**\n * The `id` of the currently active tab.\n * * If you don't set this property, the component activates the first tab and switches tabs automatically when a tab header is clicked (that is, uncontrolled behavior).\n * * If you explicitly set this property, you must set define an `onChange` handler to update the property when a tab header is clicked (that is, controlled behavior).\n */\n activeTabId?: string;\n\n /**\n * Provides an `aria-label` to the tab container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets the `aria-labelledby` property on the tab container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * Determines whether the tab content has padding. If `true`, removes the default padding from the tab content area.\n */\n disableContentPaddings?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: TabsProps.I18nStrings;\n /**\n * Enabling this property makes the tab content fit to the available height.\n * If the tab content is too short, it will stretch. If the tab content is too long, a vertical scrollbar will be shown.\n */\n fitHeight?: boolean;\n /**\n * Determines how the active tab is switched when navigating using\n * the keyboard. The options are:\n * - 'automatic' (default): the active tab is switched using the arrow keys.\n * - 'manual': a tab must be explicitly activated using the enter/space key.\n * We recommend using 'automatic' in most situations to provide consistent\n * and quick switching between tabs. Use 'manual' only if there is a specific\n * need to introduce friction to the switching of tabs.\n */\n keyboardActivationMode?: 'automatic' | 'manual';\n\n /**\n * An object containing CSS properties to customize the tabs' visual appearance.\n * Refer to the [style](/components/tabs/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: TabsProps.Style;\n}\nexport namespace TabsProps {\n export type Variant = 'default' | 'container' | 'stacked';\n\n export interface Tab {\n /**\n * The tab id. This value will be need to be passed to the Tabs component as `activeTabId` to select this tab.\n */\n id: string;\n /**\n * Tab label shown in the UI.\n */\n label: React.ReactNode;\n /**\n * Tab content to render in the container.\n */\n content?: React.ReactNode;\n /**\n * Whether this tab is disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why this tab is disabled.\n *\n * Do not place interactive elements like links or buttons.\n */\n disabledReason?: React.ReactNode;\n /**\n * (Optional) Determines whether the tab includes a dismiss icon button. By default, the dismiss button is not included.\n * When a user clicks on this button the onDismiss handler is called.\n */\n dismissible?: boolean;\n /**\n * (Optional) Specifies an aria-label for the dismiss icon button.\n */\n dismissLabel?: string;\n /**\n * (Optional) Determines whether the dismiss button is disabled.\n */\n dismissDisabled?: boolean;\n /**\n * (Optional) Action for the tab, rendered next to its corresponding label.\n * Although it is technically possible to insert any content, our UX guidelines only allow you to add\n * an icon button or icon button dropdown.\n */\n action?: React.ReactNode;\n /**\n * (event => void) Called when a user clicks on the dismiss button.\n */\n onDismiss?: ButtonProps['onClick'];\n /**\n * You can use this parameter to change the default `href` of the internal tab anchor. The\n * `click` event default behavior is prevented, unless the user clicks the tab with a key modifier (CTRL,\n * ALT, SHIFT, META). This allows to open new browser tabs with an initially selected component tab,\n * when the routing can handle such deep links. You can manually update routing on the current page\n * using the `activeTabHref` property of the `change` event's detail.\n */\n href?: string;\n /**\n * Determines when tab content is rendered:\n * - 'active' (default): Only render content when the tab is active.\n * - 'eager': Always render tab content (hidden when the tab is not active).\n * - 'lazy': Like 'eager', but content is only rendered after the tab is first activated.\n */\n contentRenderStrategy?: 'active' | 'eager' | 'lazy';\n }\n\n export interface ChangeDetail {\n /**\n * The ID of the clicked tab.\n */\n activeTabId: string;\n /**\n * The `href` attribute of the clicked tab, if defined.\n */\n activeTabHref?: string;\n }\n\n export interface I18nStrings {\n /**\n * ARIA label for the scroll left button that appears when the tab header is wider than the container.\n */\n scrollLeftAriaLabel?: string;\n /**\n * ARIA label for the scroll right button that appears when the tab header is wider than the container.\n */\n scrollRightAriaLabel?: string;\n /**\n * ARIA role description for the Tabs component when an action or dismissible prop is in use. This is used\n * with role=\"application\" to provide further information on the purpose of this component\n */\n tabsWithActionsAriaRoleDescription?: string;\n }\n\n export interface Style {\n container?: ContainerProps.Style;\n tab?: {\n backgroundColor?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n fontSize?: string;\n fontWeight?: string;\n focusRing?: FocusRingStyle;\n paddingBlock?: string;\n paddingInline?: string;\n activeIndicator?: {\n color?: string;\n width?: string;\n borderRadius?: string;\n };\n };\n tabSeparator?: {\n color?: string;\n width?: string;\n };\n }\n}\n"]}
@@ -55,8 +55,10 @@ export interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonPr
55
55
  * Provides a reason why the button is disabled (only when `disabled` is `true`).
56
56
  * If provided, the button becomes focusable.
57
57
  * Applicable only for the normal variant.
58
+ *
59
+ * Do not place interactive elements like links or buttons.
58
60
  */
59
- disabledReason?: string;
61
+ disabledReason?: React.ReactNode;
60
62
  /**
61
63
  * Called when the user changes their selection.
62
64
  * The event `detail` contains the current value for the `pressed` property.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle-button/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,K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B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,wBAAwB,CAAC;IAC5G;;;;;OAKG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;CACtE;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAExC,UAAiB,YAAY;QAC3B,OAAO,EAAE,OAAO,CAAC;KAClB;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;KACrC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle-button/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 { BaseButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonProps, 'nativeAnchorAttributes'> {\n /** Determines the general styling of the toggle button as follows:\n * * `normal` for secondary buttons.\n * * `icon` to display an icon only (no text).\n *\n * Defaults to `normal` if not specified.\n */\n variant?: ToggleButtonProps.Variant;\n\n /**\n * Displays an icon next to the text.\n */\n iconName?: IconProps.Name;\n\n /**\n * Displays an icon next to the text in pressed state.\n */\n pressedIconName?: IconProps.Name;\n\n /**\n * Specifies the URL of a custom icon in pressed state. Use this property if the icon needed for your use case isn't available.\n *\n * `pressedIconSvg` will take precedence if you set both `pressedIconUrl` and `pressedIconSvg`.\n */\n pressedIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon in pressed state.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`\n * - has `viewBox=\"0 0 16 16\"`\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically:\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `pressedIconUrl` and `pressedIconSvg`, `pressedIconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n pressedIconSvg?: React.ReactNode;\n\n /**\n * Sets the toggle button to pressed state.\n */\n pressed: boolean;\n\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable only for the normal variant.\n */\n disabledReason?: string;\n\n /**\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `pressed` property.\n */\n onChange?: NonCancelableEventHandler<ToggleButtonProps.ChangeDetail>;\n}\n\nexport namespace ToggleButtonProps {\n export type Variant = 'normal' | 'icon';\n\n export interface ChangeDetail {\n pressed: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(options?: FocusOptions): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle-button/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 { BaseButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonProps, 'nativeAnchorAttributes'> {\n /** Determines the general styling of the toggle button as follows:\n * * `normal` for secondary buttons.\n * * `icon` to display an icon only (no text).\n *\n * Defaults to `normal` if not specified.\n */\n variant?: ToggleButtonProps.Variant;\n\n /**\n * Displays an icon next to the text.\n */\n iconName?: IconProps.Name;\n\n /**\n * Displays an icon next to the text in pressed state.\n */\n pressedIconName?: IconProps.Name;\n\n /**\n * Specifies the URL of a custom icon in pressed state. Use this property if the icon needed for your use case isn't available.\n *\n * `pressedIconSvg` will take precedence if you set both `pressedIconUrl` and `pressedIconSvg`.\n */\n pressedIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon in pressed state.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`\n * - has `viewBox=\"0 0 16 16\"`\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically:\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `pressedIconUrl` and `pressedIconSvg`, `pressedIconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n pressedIconSvg?: React.ReactNode;\n\n /**\n * Sets the toggle button to pressed state.\n */\n pressed: boolean;\n\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable only for the normal variant.\n *\n * Do not place interactive elements like links or buttons.\n */\n disabledReason?: React.ReactNode;\n\n /**\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `pressed` property.\n */\n onChange?: NonCancelableEventHandler<ToggleButtonProps.ChangeDetail>;\n}\n\nexport namespace ToggleButtonProps {\n export type Variant = 'normal' | 'icon';\n\n export interface ChangeDetail {\n pressed: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(options?: FocusOptions): void;\n }\n}\n"]}
@@ -7,7 +7,7 @@ interface BaseOption {
7
7
  lang?: string;
8
8
  description?: string;
9
9
  disabled?: boolean;
10
- disabledReason?: string;
10
+ disabledReason?: React.ReactNode;
11
11
  labelTag?: string;
12
12
  tags?: ReadonlyArray<string>;
13
13
  filteringTags?: ReadonlyArray<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/types/option.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SA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CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"option.js","sourceRoot":"","sources":["../../../src/types/option.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 { IconProps } from '../icon/interfaces';\n\ninterface BaseOption {\n value?: string;\n label?: string;\n labelContent?: React.ReactNode;\n lang?: string;\n description?: string;\n disabled?: boolean;\n disabledReason?: string;\n labelTag?: string;\n tags?: ReadonlyArray<string>;\n filteringTags?: ReadonlyArray<string>;\n iconAlt?: string;\n iconAriaLabel?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n}\n\nexport interface OptionDefinition extends BaseOption {\n __labelPrefix?: string;\n}\n\nexport interface OptionGroup extends BaseOption {\n options: ReadonlyArray<OptionDefinition>;\n}\n"]}
1
+ {"version":3,"file":"option.js","sourceRoot":"","sources":["../../../src/types/option.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 { IconProps } from '../icon/interfaces';\n\ninterface BaseOption {\n value?: string;\n label?: string;\n labelContent?: React.ReactNode;\n lang?: string;\n description?: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n labelTag?: string;\n tags?: ReadonlyArray<string>;\n filteringTags?: ReadonlyArray<string>;\n iconAlt?: string;\n iconAriaLabel?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n}\n\nexport interface OptionDefinition extends BaseOption {\n __labelPrefix?: string;\n}\n\nexport interface OptionGroup extends BaseOption {\n options: ReadonlyArray<OptionDefinition>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/components-themeable",
3
- "version": "3.0.1392",
3
+ "version": "3.0.1394",
4
4
  "files": [
5
5
  "lib"
6
6
  ],