@cloudscape-design/components-themeable 3.0.1390 → 3.0.1392

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 (164) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/box/visual-accent.scss +0 -24
  3. package/lib/internal/scss/button/constants.scss +15 -0
  4. package/lib/internal/scss/button/styles.scss +21 -1
  5. package/lib/internal/scss/input/styles.scss +15 -29
  6. package/lib/internal/scss/internal/components/autosuggest-input/styles.scss +138 -0
  7. package/lib/internal/scss/internal/components/autosuggest-input/test-classes/styles.scss +19 -0
  8. package/lib/internal/scss/internal/components/button-trigger/styles.scss +20 -1
  9. package/lib/internal/scss/internal/components/control-group/styles.scss +39 -15
  10. package/lib/internal/scss/internal/components/control-group/test-classes/styles.scss +16 -0
  11. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  12. package/lib/internal/scss/internal/styles/forms/grouped-control.scss +65 -0
  13. package/lib/internal/scss/internal/styles/forms/index.scss +1 -0
  14. package/lib/internal/scss/internal/styles/forms/mixins.scss +41 -43
  15. package/lib/internal/scss/internal/styles/utils/mixins.scss +10 -0
  16. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  17. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js +3 -2
  18. package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  19. package/lib/internal/template/autosuggest/i18n-utils.d.ts +12 -0
  20. package/lib/internal/template/autosuggest/i18n-utils.d.ts.map +1 -0
  21. package/lib/internal/template/autosuggest/i18n-utils.js +15 -0
  22. package/lib/internal/template/autosuggest/i18n-utils.js.map +1 -0
  23. package/lib/internal/template/autosuggest/index.d.ts.map +1 -1
  24. package/lib/internal/template/autosuggest/index.js +3 -0
  25. package/lib/internal/template/autosuggest/index.js.map +1 -1
  26. package/lib/internal/template/autosuggest/interfaces.d.ts +94 -1
  27. package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
  29. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  30. package/lib/internal/template/autosuggest/internal.js +21 -12
  31. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  32. package/lib/internal/template/autosuggest/options-controller.d.ts +2 -1
  33. package/lib/internal/template/autosuggest/options-controller.d.ts.map +1 -1
  34. package/lib/internal/template/autosuggest/options-controller.js +3 -6
  35. package/lib/internal/template/autosuggest/options-controller.js.map +1 -1
  36. package/lib/internal/template/box/interfaces.d.ts +4 -1
  37. package/lib/internal/template/box/interfaces.d.ts.map +1 -1
  38. package/lib/internal/template/box/interfaces.js.map +1 -1
  39. package/lib/internal/template/box/styles.css.js +214 -220
  40. package/lib/internal/template/box/styles.scoped.css +259 -289
  41. package/lib/internal/template/box/styles.selectors.js +214 -220
  42. package/lib/internal/template/button/internal.d.ts +2 -2
  43. package/lib/internal/template/button/internal.d.ts.map +1 -1
  44. package/lib/internal/template/button/internal.js +9 -1
  45. package/lib/internal/template/button/internal.js.map +1 -1
  46. package/lib/internal/template/button/styles.css.js +24 -23
  47. package/lib/internal/template/button/styles.scoped.css +116 -70
  48. package/lib/internal/template/button/styles.selectors.js +24 -23
  49. package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
  50. package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -1
  51. package/lib/internal/template/i18n/messages/all.all.js +1 -1
  52. package/lib/internal/template/i18n/messages/all.all.json +1 -1
  53. package/lib/internal/template/i18n/messages/all.de.js +1 -1
  54. package/lib/internal/template/i18n/messages/all.de.json +1 -1
  55. package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
  56. package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
  57. package/lib/internal/template/i18n/messages/all.en.js +1 -1
  58. package/lib/internal/template/i18n/messages/all.en.json +1 -1
  59. package/lib/internal/template/i18n/messages/all.es.js +1 -1
  60. package/lib/internal/template/i18n/messages/all.es.json +1 -1
  61. package/lib/internal/template/i18n/messages/all.fr.js +1 -1
  62. package/lib/internal/template/i18n/messages/all.fr.json +1 -1
  63. package/lib/internal/template/i18n/messages/all.id.js +1 -1
  64. package/lib/internal/template/i18n/messages/all.id.json +1 -1
  65. package/lib/internal/template/i18n/messages/all.it.js +1 -1
  66. package/lib/internal/template/i18n/messages/all.it.json +1 -1
  67. package/lib/internal/template/i18n/messages/all.ja.js +1 -1
  68. package/lib/internal/template/i18n/messages/all.ja.json +1 -1
  69. package/lib/internal/template/i18n/messages/all.ko.js +1 -1
  70. package/lib/internal/template/i18n/messages/all.ko.json +1 -1
  71. package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
  72. package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
  73. package/lib/internal/template/i18n/messages/all.tr.js +1 -1
  74. package/lib/internal/template/i18n/messages/all.tr.json +1 -1
  75. package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
  76. package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
  77. package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
  78. package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
  79. package/lib/internal/template/i18n/messages-types.d.ts +13 -0
  80. package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
  81. package/lib/internal/template/i18n/messages-types.js.map +1 -1
  82. package/lib/internal/template/input/internal.d.ts +1 -0
  83. package/lib/internal/template/input/internal.d.ts.map +1 -1
  84. package/lib/internal/template/input/internal.js +2 -2
  85. package/lib/internal/template/input/internal.js.map +1 -1
  86. package/lib/internal/template/input/styles.css.js +38 -36
  87. package/lib/internal/template/input/styles.scoped.css +89 -76
  88. package/lib/internal/template/input/styles.selectors.js +38 -36
  89. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  90. package/lib/internal/template/internal/base-theme/styles.scoped.css +0 -61
  91. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +5 -0
  92. package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
  93. package/lib/internal/template/internal/components/autosuggest-input/index.js +154 -11
  94. package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
  95. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts +21 -0
  96. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -0
  97. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js +95 -0
  98. package/lib/internal/template/internal/components/autosuggest-input/inline-tokens.js.map +1 -0
  99. package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.d.ts +16 -0
  100. package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.d.ts.map +1 -0
  101. package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.js +94 -0
  102. package/lib/internal/template/internal/components/autosuggest-input/overflow-dropdown.js.map +1 -0
  103. package/lib/internal/template/internal/components/autosuggest-input/styles.css.js +27 -2
  104. package/lib/internal/template/internal/components/autosuggest-input/styles.scoped.css +195 -2
  105. package/lib/internal/template/internal/components/autosuggest-input/styles.selectors.js +27 -2
  106. package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.css.js +9 -0
  107. package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.scoped.css +19 -0
  108. package/lib/internal/template/internal/components/autosuggest-input/test-classes/styles.selectors.js +10 -0
  109. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts +21 -0
  110. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -0
  111. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js +63 -0
  112. package/lib/internal/template/internal/components/autosuggest-input/use-token-overflow.js.map +1 -0
  113. package/lib/internal/template/internal/components/button-trigger/index.d.ts +4 -1
  114. package/lib/internal/template/internal/components/button-trigger/index.d.ts.map +1 -1
  115. package/lib/internal/template/internal/components/button-trigger/index.js +5 -3
  116. package/lib/internal/template/internal/components/button-trigger/index.js.map +1 -1
  117. package/lib/internal/template/internal/components/button-trigger/styles.css.js +23 -21
  118. package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +79 -36
  119. package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +23 -21
  120. package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts +1 -1
  121. package/lib/internal/template/internal/components/control-group/grouped-control-styles.d.ts.map +1 -1
  122. package/lib/internal/template/internal/components/control-group/grouped-control-styles.js +3 -2
  123. package/lib/internal/template/internal/components/control-group/grouped-control-styles.js.map +1 -1
  124. package/lib/internal/template/internal/components/control-group/index.d.ts +3 -9
  125. package/lib/internal/template/internal/components/control-group/index.d.ts.map +1 -1
  126. package/lib/internal/template/internal/components/control-group/index.js +16 -10
  127. package/lib/internal/template/internal/components/control-group/index.js.map +1 -1
  128. package/lib/internal/template/internal/components/control-group/interfaces.d.ts +43 -0
  129. package/lib/internal/template/internal/components/control-group/interfaces.d.ts.map +1 -0
  130. package/lib/internal/template/internal/components/control-group/interfaces.js +2 -0
  131. package/lib/internal/template/internal/components/control-group/interfaces.js.map +1 -0
  132. package/lib/internal/template/internal/components/control-group/styles.css.js +16 -11
  133. package/lib/internal/template/internal/components/control-group/styles.scoped.css +34 -14
  134. package/lib/internal/template/internal/components/control-group/styles.selectors.js +16 -11
  135. package/lib/internal/template/internal/components/control-group/test-classes/styles.css.js +8 -0
  136. package/lib/internal/template/internal/components/control-group/test-classes/styles.scoped.css +15 -0
  137. package/lib/internal/template/internal/components/control-group/test-classes/styles.selectors.js +9 -0
  138. package/lib/internal/template/internal/context/control-group-context.d.ts +5 -0
  139. package/lib/internal/template/internal/context/control-group-context.d.ts.map +1 -1
  140. package/lib/internal/template/internal/context/control-group-context.js +1 -0
  141. package/lib/internal/template/internal/context/control-group-context.js.map +1 -1
  142. package/lib/internal/template/internal/environment.js +2 -2
  143. package/lib/internal/template/internal/environment.json +2 -2
  144. package/lib/internal/template/segmented-control/styles.css.js +27 -26
  145. package/lib/internal/template/segmented-control/styles.scoped.css +51 -47
  146. package/lib/internal/template/segmented-control/styles.selectors.js +27 -26
  147. package/lib/internal/template/select/parts/filter.d.ts +1 -1
  148. package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
  149. package/lib/internal/template/test-utils/dom/autosuggest/index.d.ts +39 -0
  150. package/lib/internal/template/test-utils/dom/autosuggest/index.js +68 -16
  151. package/lib/internal/template/test-utils/dom/autosuggest/index.js.map +1 -1
  152. package/lib/internal/template/test-utils/dom/internal/control-group.d.ts +5 -0
  153. package/lib/internal/template/test-utils/dom/internal/control-group.js +9 -2
  154. package/lib/internal/template/test-utils/dom/internal/control-group.js.map +1 -1
  155. package/lib/internal/template/test-utils/selectors/autosuggest/index.d.ts +53 -0
  156. package/lib/internal/template/test-utils/selectors/autosuggest/index.js +84 -16
  157. package/lib/internal/template/test-utils/selectors/autosuggest/index.js.map +1 -1
  158. package/lib/internal/template/test-utils/selectors/internal/control-group.d.ts +5 -0
  159. package/lib/internal/template/test-utils/selectors/internal/control-group.js +9 -2
  160. package/lib/internal/template/test-utils/selectors/internal/control-group.js.map +1 -1
  161. package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
  162. package/lib/internal/template/token/dismiss-button.js +6 -3
  163. package/lib/internal/template/token/dismiss-button.js.map +1 -1
  164. package/package.json +1 -1
@@ -3,27 +3,33 @@
3
3
  import React from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
6
+ import { InternalButton } from '../../../button/internal';
6
7
  import { getBaseProps } from '../../base-component';
7
- import { GroupedControlContext, } from '../../context/control-group-context';
8
+ import { GroupedControlContext } from '../../context/control-group-context';
8
9
  import { flattenChildren } from '../../utils/flatten-children';
9
10
  import styles from './styles.css.js';
10
- export default function InternalControlGroup({ children, direction = 'horizontal', inlineLabelText, ...props }) {
11
+ import testUtilStyles from './test-classes/styles.css.js';
12
+ export default function ControlGroup({ children, direction = 'horizontal', inlineLabelText, actionButton, ...props }) {
11
13
  const baseProps = getBaseProps(props);
12
14
  const labelId = useUniqueId('control-group-label');
13
15
  const flattenedChildren = flattenChildren(children, 'ControlGroup');
14
16
  const controlCount = flattenedChildren.length;
15
- const controls = flattenedChildren.map((child, index) => {
17
+ const rootClassnames = [styles.root, baseProps.className, testUtilStyles.root];
18
+ const controls = (React.createElement("div", { ...(inlineLabelText ? { 'aria-labelledby': labelId } : actionButton ? {} : baseProps), role: "group", className: clsx(styles.controls, styles[`controls-${direction}`], !actionButton && !inlineLabelText && rootClassnames) }, flattenedChildren.map((child, index) => {
16
19
  const key = child && typeof child === 'object' ? child.key : undefined;
17
20
  const position = controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';
18
21
  return (React.createElement("div", { key: key ? String(key) : index, className: clsx(styles.control, styles[`control-${position}-${direction}`]) },
19
- React.createElement(GroupedControlContext.Provider, { value: { position, direction } }, child)));
20
- });
22
+ React.createElement(GroupedControlContext.Provider, { value: { position, direction, hasAction: !!actionButton } }, child)));
23
+ })));
24
+ const controlsWithAction = actionButton ? (React.createElement("div", { ...(inlineLabelText ? {} : baseProps), className: clsx(styles['group-layout'], styles[`group-layout-${direction}`], !inlineLabelText && rootClassnames) },
25
+ controls,
26
+ React.createElement("div", { className: styles['action-slot'] },
27
+ React.createElement(InternalButton, { className: testUtilStyles['action-button'], variant: "control-group-action", formAction: "none", iconName: actionButton.iconName, ariaLabel: actionButton.ariaLabel, disabled: actionButton.disabled, disabledReason: actionButton.disabledReason, ariaDescribedby: actionButton.ariaDescribedby, onClick: actionButton.onClick })))) : (controls);
21
28
  if (inlineLabelText) {
22
- return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles['inline-label-wrapper']) },
23
- React.createElement("label", { id: labelId, className: clsx(styles['inline-label']) }, inlineLabelText),
24
- React.createElement("div", { className: styles['inline-label-trigger-wrapper'] },
25
- React.createElement("div", { role: "group", "aria-labelledby": labelId, className: clsx(styles.root, styles[`root-${direction}`]) }, controls))));
29
+ return (React.createElement("div", { ...baseProps, className: clsx(...rootClassnames, styles['inline-label-wrapper']) },
30
+ React.createElement("label", { id: labelId, className: clsx(styles['inline-label'], testUtilStyles['inline-label']) }, inlineLabelText),
31
+ React.createElement("div", { className: styles['inline-label-trigger-wrapper'] }, controlsWithAction)));
26
32
  }
27
- return (React.createElement("div", { ...baseProps, role: "group", className: clsx(baseProps.className, styles.root, styles[`root-${direction}`]) }, controls));
33
+ return controlsWithAction;
28
34
  }
29
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG5E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,qBAAqB,GAGtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,QAAQ,EACR,SAAS,GAAG,YAAY,EACxB,eAAe,EACf,GAAG,KAAK,EACkB;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAEnD,MAAM,iBAAiB,GAAG,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACpE,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAE9C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACtD,MAAM,GAAG,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAgC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QACnG,MAAM,QAAQ,GACZ,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QACvG,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC;YAC9G,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAG,KAAK,CAAkC,CACpG,CACP,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,CACL,gCAAS,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACtF,+BAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,IACxD,eAAe,CACV;YACR,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC;gBACpD,6BAAK,IAAI,EAAC,OAAO,qBAAkB,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,IAClG,QAAQ,CACL,CACF,CACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,gCAAS,SAAS,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,IAC5G,QAAQ,CACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { getBaseProps } from '../../base-component';\nimport {\n GroupedControlContext,\n GroupedControlDirection,\n GroupedControlPosition,\n} from '../../context/control-group-context';\nimport { flattenChildren } from '../../utils/flatten-children';\n\nimport styles from './styles.css.js';\n\nexport interface InternalControlGroupProps extends BaseComponentProps {\n children?: React.ReactNode;\n direction?: GroupedControlDirection;\n inlineLabelText?: string;\n}\n\nexport default function InternalControlGroup({\n children,\n direction = 'horizontal',\n inlineLabelText,\n ...props\n}: InternalControlGroupProps) {\n const baseProps = getBaseProps(props);\n const labelId = useUniqueId('control-group-label');\n\n const flattenedChildren = flattenChildren(children, 'ControlGroup');\n const controlCount = flattenedChildren.length;\n\n const controls = flattenedChildren.map((child, index) => {\n const key = child && typeof child === 'object' ? (child as Record<'key', unknown>).key : undefined;\n const position: GroupedControlPosition =\n controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';\n return (\n <div key={key ? String(key) : index} className={clsx(styles.control, styles[`control-${position}-${direction}`])}>\n <GroupedControlContext.Provider value={{ position, direction }}>{child}</GroupedControlContext.Provider>\n </div>\n );\n });\n\n if (inlineLabelText) {\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['inline-label-wrapper'])}>\n <label id={labelId} className={clsx(styles['inline-label'])}>\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>\n <div role=\"group\" aria-labelledby={labelId} className={clsx(styles.root, styles[`root-${direction}`])}>\n {controls}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div {...baseProps} role=\"group\" className={clsx(baseProps.className, styles.root, styles[`root-${direction}`])}>\n {controls}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/index.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { InternalButton } from '../../../button/internal';\nimport { getBaseProps } from '../../base-component';\nimport { GroupedControlContext, GroupedControlPosition } from '../../context/control-group-context';\nimport { flattenChildren } from '../../utils/flatten-children';\nimport { ControlGroupProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport { ControlGroupProps };\n\nexport default function ControlGroup({\n children,\n direction = 'horizontal',\n inlineLabelText,\n actionButton,\n ...props\n}: ControlGroupProps) {\n const baseProps = getBaseProps(props);\n const labelId = useUniqueId('control-group-label');\n\n const flattenedChildren = flattenChildren(children, 'ControlGroup');\n const controlCount = flattenedChildren.length;\n\n const rootClassnames = [styles.root, baseProps.className, testUtilStyles.root];\n\n const controls = (\n <div\n {...(inlineLabelText ? { 'aria-labelledby': labelId } : actionButton ? {} : baseProps)}\n role=\"group\"\n className={clsx(\n styles.controls,\n styles[`controls-${direction}`],\n !actionButton && !inlineLabelText && rootClassnames\n )}\n >\n {flattenedChildren.map((child, index) => {\n const key = child && typeof child === 'object' ? (child as Record<'key', unknown>).key : undefined;\n const position: GroupedControlPosition =\n controlCount === 1 ? 'only' : index === 0 ? 'first' : index === controlCount - 1 ? 'last' : 'middle';\n return (\n <div\n key={key ? String(key) : index}\n className={clsx(styles.control, styles[`control-${position}-${direction}`])}\n >\n <GroupedControlContext.Provider value={{ position, direction, hasAction: !!actionButton }}>\n {child}\n </GroupedControlContext.Provider>\n </div>\n );\n })}\n </div>\n );\n\n const controlsWithAction = actionButton ? (\n <div\n {...(inlineLabelText ? {} : baseProps)}\n className={clsx(styles['group-layout'], styles[`group-layout-${direction}`], !inlineLabelText && rootClassnames)}\n >\n {controls}\n <div className={styles['action-slot']}>\n <InternalButton\n className={testUtilStyles['action-button']}\n variant=\"control-group-action\"\n formAction=\"none\"\n iconName={actionButton.iconName}\n ariaLabel={actionButton.ariaLabel}\n disabled={actionButton.disabled}\n disabledReason={actionButton.disabledReason}\n ariaDescribedby={actionButton.ariaDescribedby}\n onClick={actionButton.onClick}\n />\n </div>\n </div>\n ) : (\n controls\n );\n\n if (inlineLabelText) {\n return (\n <div {...baseProps} className={clsx(...rootClassnames, styles['inline-label-wrapper'])}>\n <label id={labelId} className={clsx(styles['inline-label'], testUtilStyles['inline-label'])}>\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{controlsWithAction}</div>\n </div>\n );\n }\n\n return controlsWithAction;\n}\n"]}
@@ -0,0 +1,43 @@
1
+ import { ButtonProps } from '../../../button/interfaces';
2
+ import { IconProps } from '../../../icon/interfaces';
3
+ import { BaseComponentProps } from '../../../types/base-component';
4
+ import { GroupedControlDirection } from '../../context/control-group-context';
5
+ import { CancelableEventHandler } from '../../events';
6
+ export interface ControlGroupProps extends BaseComponentProps {
7
+ children?: React.ReactNode;
8
+ direction?: GroupedControlDirection;
9
+ inlineLabelText?: string;
10
+ /**
11
+ * Specifies an action button rendered next to the grouped controls.
12
+ */
13
+ actionButton?: ControlGroupProps.ActionButton;
14
+ }
15
+ export declare namespace ControlGroupProps {
16
+ interface ActionButton {
17
+ /**
18
+ * Called when the user clicks on the button and the button is not disabled.
19
+ */
20
+ onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;
21
+ /**
22
+ * Renders the button as disabled and prevents clicks.
23
+ */
24
+ disabled?: boolean;
25
+ /**
26
+ * Provides a reason why the button is disabled (only when `disabled` is `true`).
27
+ * If provided, the button becomes focusable.
28
+ */
29
+ disabledReason?: string;
30
+ /**
31
+ * Adds `aria-label` to the button element.
32
+ * The text will also be added to the `title` attribute of the button.
33
+ */
34
+ ariaLabel: string;
35
+ /**
36
+ * Adds `aria-describedby` to the button.
37
+ */
38
+ ariaDescribedby?: string;
39
+ /** Specifies the icon to display (for example `remove` or `close`). */
40
+ iconName: IconProps.Name;
41
+ }
42
+ }
43
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC;CAC/C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,YAAY;QAC3B;;WAEG;QACH,OAAO,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE1D;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,uEAAuE;QACvE,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC;KAC1B;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/control-group/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 { IconProps } from '../../../icon/interfaces';\nimport { BaseComponentProps } from '../../../types/base-component';\nimport { GroupedControlDirection } from '../../context/control-group-context';\nimport { CancelableEventHandler } from '../../events';\n\nexport interface ControlGroupProps extends BaseComponentProps {\n children?: React.ReactNode;\n direction?: GroupedControlDirection;\n inlineLabelText?: string;\n /**\n * Specifies an action button rendered next to the grouped controls.\n */\n actionButton?: ControlGroupProps.ActionButton;\n}\n\nexport namespace ControlGroupProps {\n export interface ActionButton {\n /**\n * Called when the user clicks on the button and the button is not disabled.\n */\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n\n /**\n * Renders the button as disabled and prevents clicks.\n */\n disabled?: 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 */\n disabledReason?: string;\n\n /**\n * Adds `aria-label` to the button element.\n * The text will also be added to the `title` attribute of the button.\n */\n ariaLabel: string;\n\n /**\n * Adds `aria-describedby` to the button.\n */\n ariaDescribedby?: string;\n\n /** Specifies the icon to display (for example `remove` or `close`). */\n iconName: IconProps.Name;\n }\n}\n"]}
@@ -1,16 +1,21 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_o08jm_1akgb_9",
5
- "root-horizontal": "awsui_root-horizontal_o08jm_1akgb_41",
6
- "root-vertical": "awsui_root-vertical_o08jm_1akgb_46",
7
- "control": "awsui_control_o08jm_1akgb_51",
8
- "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_1akgb_58",
9
- "control-last-horizontal": "awsui_control-last-horizontal_o08jm_1akgb_58",
10
- "control-middle-vertical": "awsui_control-middle-vertical_o08jm_1akgb_61",
11
- "control-last-vertical": "awsui_control-last-vertical_o08jm_1akgb_61",
12
- "inline-label": "awsui_inline-label_o08jm_1akgb_65",
13
- "inline-label-wrapper": "awsui_inline-label-wrapper_o08jm_1akgb_90",
14
- "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_o08jm_1akgb_95"
4
+ "root": "awsui_root_o08jm_1h1xd_9",
5
+ "action-slot": "awsui_action-slot_o08jm_1h1xd_41",
6
+ "group-layout": "awsui_group-layout_o08jm_1h1xd_46",
7
+ "group-layout-horizontal": "awsui_group-layout-horizontal_o08jm_1h1xd_50",
8
+ "group-layout-vertical": "awsui_group-layout-vertical_o08jm_1h1xd_53",
9
+ "controls": "awsui_controls_o08jm_1h1xd_57",
10
+ "controls-horizontal": "awsui_controls-horizontal_o08jm_1h1xd_61",
11
+ "controls-vertical": "awsui_controls-vertical_o08jm_1h1xd_65",
12
+ "control": "awsui_control_o08jm_1h1xd_57",
13
+ "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_1h1xd_73",
14
+ "control-last-horizontal": "awsui_control-last-horizontal_o08jm_1h1xd_73",
15
+ "control-middle-vertical": "awsui_control-middle-vertical_o08jm_1h1xd_76",
16
+ "control-last-vertical": "awsui_control-last-vertical_o08jm_1h1xd_76",
17
+ "inline-label": "awsui_inline-label_o08jm_1h1xd_85",
18
+ "inline-label-wrapper": "awsui_inline-label-wrapper_o08jm_1h1xd_110",
19
+ "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_o08jm_1h1xd_115"
15
20
  };
16
21
 
@@ -6,7 +6,7 @@
6
6
  /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
7
7
  /* Style used for links in slots/components that are text heavy, to help links stand out among
8
8
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
9
- .awsui_root_o08jm_1akgb_9:not(#\9) {
9
+ .awsui_root_o08jm_1h1xd_9:not(#\9) {
10
10
  border-collapse: separate;
11
11
  border-spacing: 0;
12
12
  box-sizing: border-box;
@@ -36,33 +36,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
36
36
  font-family: var(--font-family-base-c9u5cr, "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
37
37
  -webkit-font-smoothing: auto;
38
38
  -moz-osx-font-smoothing: auto;
39
+ }
40
+
41
+ .awsui_action-slot_o08jm_1h1xd_41:not(#\9) {
39
42
  display: flex;
43
+ margin-inline-start: calc(-1 * var(--border-width-field-2365x3, 1px));
40
44
  }
41
- .awsui_root-horizontal_o08jm_1akgb_41:not(#\9) {
45
+
46
+ .awsui_group-layout_o08jm_1h1xd_46:not(#\9) {
47
+ display: flex;
42
48
  flex-direction: row;
43
- flex-wrap: nowrap;
49
+ }
50
+ .awsui_group-layout-horizontal_o08jm_1h1xd_50:not(#\9) {
44
51
  align-items: flex-end;
45
52
  }
46
- .awsui_root-vertical_o08jm_1akgb_46:not(#\9) {
47
- flex-direction: column;
53
+ .awsui_group-layout-vertical_o08jm_1h1xd_53:not(#\9), .awsui_group-layout-vertical_o08jm_1h1xd_53 > .awsui_action-slot_o08jm_1h1xd_41:not(#\9) {
54
+ align-items: stretch;
55
+ }
56
+
57
+ .awsui_controls_o08jm_1h1xd_57:not(#\9) {
58
+ display: flex;
48
59
  align-items: stretch;
49
60
  }
61
+ .awsui_controls-horizontal_o08jm_1h1xd_61:not(#\9) {
62
+ flex-direction: row;
63
+ flex-wrap: nowrap;
64
+ }
65
+ .awsui_controls-vertical_o08jm_1h1xd_65:not(#\9) {
66
+ flex-direction: column;
67
+ }
50
68
 
51
- .awsui_control_o08jm_1akgb_51:not(#\9) {
69
+ .awsui_control_o08jm_1h1xd_57:not(#\9) {
52
70
  min-inline-size: 0;
53
71
  isolation: isolate;
54
72
  }
55
- .awsui_control_o08jm_1akgb_51:not(#\9):focus-within {
56
- z-index: 1;
57
- }
58
- .awsui_control-middle-horizontal_o08jm_1akgb_58:not(#\9), .awsui_control-last-horizontal_o08jm_1akgb_58:not(#\9) {
73
+ .awsui_control-middle-horizontal_o08jm_1h1xd_73:not(#\9), .awsui_control-last-horizontal_o08jm_1h1xd_73:not(#\9) {
59
74
  margin-inline-start: calc(-1 * var(--border-width-field-2365x3, 1px));
60
75
  }
61
- .awsui_control-middle-vertical_o08jm_1akgb_61:not(#\9), .awsui_control-last-vertical_o08jm_1akgb_61:not(#\9) {
76
+ .awsui_control-middle-vertical_o08jm_1h1xd_76:not(#\9), .awsui_control-last-vertical_o08jm_1h1xd_76:not(#\9) {
62
77
  margin-block-start: calc(-1 * var(--border-width-field-2365x3, 1px));
63
78
  }
64
79
 
65
- .awsui_inline-label_o08jm_1akgb_65:not(#\9) {
80
+ .awsui_action-slot_o08jm_1h1xd_41:not(#\9):focus-within,
81
+ .awsui_control_o08jm_1h1xd_57:not(#\9):focus-within {
82
+ z-index: 1;
83
+ }
84
+
85
+ .awsui_inline-label_o08jm_1h1xd_85:not(#\9) {
66
86
  background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-ka4djm, var(--color-background-layout-main-y4565g, #f2f3f3)), var(--color-background-input-default-1u0v1p, #ffffff));
67
87
  border-start-start-radius: 2px;
68
88
  border-start-end-radius: 2px;
@@ -87,11 +107,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
87
107
  z-index: 2;
88
108
  }
89
109
 
90
- .awsui_inline-label-wrapper_o08jm_1akgb_90:not(#\9) {
110
+ .awsui_inline-label-wrapper_o08jm_1h1xd_110:not(#\9) {
91
111
  margin-block-start: calc(var(--space-scaled-xs-pajbd1, 8px) * -1);
92
112
  isolation: isolate;
93
113
  }
94
114
 
95
- .awsui_inline-label-trigger-wrapper_o08jm_1akgb_95:not(#\9) {
115
+ .awsui_inline-label-trigger-wrapper_o08jm_1h1xd_115:not(#\9) {
96
116
  margin-block-start: -7px;
97
117
  }
@@ -2,16 +2,21 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_o08jm_1akgb_9",
6
- "root-horizontal": "awsui_root-horizontal_o08jm_1akgb_41",
7
- "root-vertical": "awsui_root-vertical_o08jm_1akgb_46",
8
- "control": "awsui_control_o08jm_1akgb_51",
9
- "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_1akgb_58",
10
- "control-last-horizontal": "awsui_control-last-horizontal_o08jm_1akgb_58",
11
- "control-middle-vertical": "awsui_control-middle-vertical_o08jm_1akgb_61",
12
- "control-last-vertical": "awsui_control-last-vertical_o08jm_1akgb_61",
13
- "inline-label": "awsui_inline-label_o08jm_1akgb_65",
14
- "inline-label-wrapper": "awsui_inline-label-wrapper_o08jm_1akgb_90",
15
- "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_o08jm_1akgb_95"
5
+ "root": "awsui_root_o08jm_1h1xd_9",
6
+ "action-slot": "awsui_action-slot_o08jm_1h1xd_41",
7
+ "group-layout": "awsui_group-layout_o08jm_1h1xd_46",
8
+ "group-layout-horizontal": "awsui_group-layout-horizontal_o08jm_1h1xd_50",
9
+ "group-layout-vertical": "awsui_group-layout-vertical_o08jm_1h1xd_53",
10
+ "controls": "awsui_controls_o08jm_1h1xd_57",
11
+ "controls-horizontal": "awsui_controls-horizontal_o08jm_1h1xd_61",
12
+ "controls-vertical": "awsui_controls-vertical_o08jm_1h1xd_65",
13
+ "control": "awsui_control_o08jm_1h1xd_57",
14
+ "control-middle-horizontal": "awsui_control-middle-horizontal_o08jm_1h1xd_73",
15
+ "control-last-horizontal": "awsui_control-last-horizontal_o08jm_1h1xd_73",
16
+ "control-middle-vertical": "awsui_control-middle-vertical_o08jm_1h1xd_76",
17
+ "control-last-vertical": "awsui_control-last-vertical_o08jm_1h1xd_76",
18
+ "inline-label": "awsui_inline-label_o08jm_1h1xd_85",
19
+ "inline-label-wrapper": "awsui_inline-label-wrapper_o08jm_1h1xd_110",
20
+ "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_o08jm_1h1xd_115"
16
21
  };
17
22
 
@@ -0,0 +1,8 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_1gp1v_ju9sr_5",
5
+ "action-button": "awsui_action-button_1gp1v_ju9sr_9",
6
+ "inline-label": "awsui_inline-label_1gp1v_ju9sr_13"
7
+ };
8
+
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ .awsui_root_1gp1v_ju9sr_5:not(#\9) {
6
+ /* used in test-utils */
7
+ }
8
+
9
+ .awsui_action-button_1gp1v_ju9sr_9:not(#\9) {
10
+ /* used in test-utils */
11
+ }
12
+
13
+ .awsui_inline-label_1gp1v_ju9sr_13:not(#\9) {
14
+ /* used in test-utils */
15
+ }
@@ -0,0 +1,9 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "root": "awsui_root_1gp1v_ju9sr_5",
6
+ "action-button": "awsui_action-button_1gp1v_ju9sr_9",
7
+ "inline-label": "awsui_inline-label_1gp1v_ju9sr_13"
8
+ };
9
+
@@ -12,6 +12,11 @@ export interface GroupedControlContextProps {
12
12
  * controls.
13
13
  */
14
14
  direction: GroupedControlDirection;
15
+ /**
16
+ * Whether an action is fused onto the group's inline-end. Controls square the
17
+ * inline-end corners facing the action so it owns the only rounded ones.
18
+ */
19
+ hasAction?: boolean;
15
20
  }
16
21
  export declare const GroupedControlContext: React.Context<GroupedControlContextProps>;
17
22
  export declare function useGroupedControlContext(): GroupedControlContextProps;
@@ -1 +1 @@
1
- {"version":3,"file":"control-group-context.d.ts","sourceRoot":"","sources":["../../../../src/internal/context/control-group-context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,SAAS,EAAE,uBAAuB,CAAC;CACpC;AAED,eAAO,MAAM,qBAAqB,2CAGhC,CAAC;AAEH,wBAAgB,wBAAwB,+BAEvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAKrF"}
1
+ {"version":3,"file":"control-group-context.d.ts","sourceRoot":"","sources":["../../../../src/internal/context/control-group-context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1E,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACxC;;;OAGG;IACH,SAAS,EAAE,uBAAuB,CAAC;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,qBAAqB,2CAIhC,CAAC;AAEH,wBAAgB,wBAAwB,+BAEvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAKrF"}
@@ -4,6 +4,7 @@ import React, { createContext, useContext } from 'react';
4
4
  export const GroupedControlContext = createContext({
5
5
  position: null,
6
6
  direction: 'horizontal',
7
+ hasAction: false,
7
8
  });
8
9
  export function useGroupedControlContext() {
9
10
  return useContext(GroupedControlContext);
@@ -1 +1 @@
1
- {"version":3,"file":"control-group-context.js","sourceRoot":"","sources":["../../../../src/internal/context/control-group-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAmBzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAA6B;IAC7E,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,YAAY;CACxB,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAE,QAAQ,EAAiC;IACpF,MAAM,EAAE,SAAS,EAAE,GAAG,wBAAwB,EAAE,CAAC;IACjD,OAAO,CACL,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAG,QAAQ,CAAkC,CAClH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { createContext, useContext } from 'react';\n\nexport type GroupedControlPosition = 'first' | 'middle' | 'last' | 'only';\n\nexport type GroupedControlDirection = 'horizontal' | 'vertical';\n\nexport interface GroupedControlContextProps {\n /**\n * The control's position within a control group,\n * or `null` when the control is not in a control group.\n */\n position: GroupedControlPosition | null;\n /**\n * The axis along which the surrounding control group lays out its\n * controls.\n */\n direction: GroupedControlDirection;\n}\n\nexport const GroupedControlContext = createContext<GroupedControlContextProps>({\n position: null,\n direction: 'horizontal',\n});\n\nexport function useGroupedControlContext() {\n return useContext(GroupedControlContext);\n}\n\n/**\n * Resets the grouped-control context back to \"not in a group\" for a subtree.\n *\n * Controls that render caller-supplied content (for example, custom dropdown\n * content) should wrap that content with this provider. Otherwise a nested\n * control rendered inside such a slot would inherit the surrounding group's\n * `position` and incorrectly pick up the grouped-control styling\n * where adjacent borders lose their border radii.\n */\nexport function ResetGroupedControlContext({ children }: { children: React.ReactNode }) {\n const { direction } = useGroupedControlContext();\n return (\n <GroupedControlContext.Provider value={{ position: null, direction }}>{children}</GroupedControlContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"file":"control-group-context.js","sourceRoot":"","sources":["../../../../src/internal/context/control-group-context.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAwBzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAA6B;IAC7E,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,KAAK;CACjB,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB;IACtC,OAAO,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAE,QAAQ,EAAiC;IACpF,MAAM,EAAE,SAAS,EAAE,GAAG,wBAAwB,EAAE,CAAC;IACjD,OAAO,CACL,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAG,QAAQ,CAAkC,CAClH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { createContext, useContext } from 'react';\n\nexport type GroupedControlPosition = 'first' | 'middle' | 'last' | 'only';\n\nexport type GroupedControlDirection = 'horizontal' | 'vertical';\n\nexport interface GroupedControlContextProps {\n /**\n * The control's position within a control group,\n * or `null` when the control is not in a control group.\n */\n position: GroupedControlPosition | null;\n /**\n * The axis along which the surrounding control group lays out its\n * controls.\n */\n direction: GroupedControlDirection;\n /**\n * Whether an action is fused onto the group's inline-end. Controls square the\n * inline-end corners facing the action so it owns the only rounded ones.\n */\n hasAction?: boolean;\n}\n\nexport const GroupedControlContext = createContext<GroupedControlContextProps>({\n position: null,\n direction: 'horizontal',\n hasAction: false,\n});\n\nexport function useGroupedControlContext() {\n return useContext(GroupedControlContext);\n}\n\n/**\n * Resets the grouped-control context back to \"not in a group\" for a subtree.\n *\n * Controls that render caller-supplied content (for example, custom dropdown\n * content) should wrap that content with this provider. Otherwise a nested\n * control rendered inside such a slot would inherit the surrounding group's\n * `position` and incorrectly pick up the grouped-control styling\n * where adjacent borders lose their border radii.\n */\nexport function ResetGroupedControlContext({ children }: { children: React.ReactNode }) {\n const { direction } = useGroupedControlContext();\n return (\n <GroupedControlContext.Provider value={{ position: null, direction }}>{children}</GroupedControlContext.Provider>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (52c638d1)";
3
- export var GIT_SHA = "52c638d1";
2
+ export var PACKAGE_VERSION = "3.0.0 (8bbfddc2)";
3
+ export var GIT_SHA = "8bbfddc2";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "core";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (52c638d1)",
4
- "GIT_SHA": "52c638d1",
3
+ "PACKAGE_VERSION": "3.0.0 (8bbfddc2)",
4
+ "GIT_SHA": "8bbfddc2",
5
5
  "THEME": "default",
6
6
  "SYSTEM": "core",
7
7
  "ALWAYS_VISUAL_REFRESH": false,
@@ -1,31 +1,32 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "segment": "awsui_segment_8cbea_q3zoc_17",
5
- "full-width": "awsui_full-width_8cbea_q3zoc_44",
6
- "refresh": "awsui_refresh_8cbea_q3zoc_47",
7
- "disabled": "awsui_disabled_8cbea_q3zoc_53",
8
- "selected": "awsui_selected_8cbea_q3zoc_110",
9
- "icon": "awsui_icon_8cbea_q3zoc_121",
10
- "with-text": "awsui_with-text_8cbea_q3zoc_125",
11
- "with-no-text": "awsui_with-no-text_8cbea_q3zoc_131",
12
- "root": "awsui_root_8cbea_q3zoc_136",
13
- "segment-part": "awsui_segment-part_8cbea_q3zoc_168",
14
- "grouped": "awsui_grouped_8cbea_q3zoc_189",
15
- "grouped-only": "awsui_grouped-only_8cbea_q3zoc_189",
16
- "grouped-vertical": "awsui_grouped-vertical_8cbea_q3zoc_193",
17
- "grouped-horizontal-first": "awsui_grouped-horizontal-first_8cbea_q3zoc_204",
18
- "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_8cbea_q3zoc_208",
19
- "grouped-horizontal-last": "awsui_grouped-horizontal-last_8cbea_q3zoc_214",
20
- "grouped-vertical-first": "awsui_grouped-vertical-first_8cbea_q3zoc_218",
21
- "grouped-vertical-middle": "awsui_grouped-vertical-middle_8cbea_q3zoc_222",
22
- "grouped-vertical-last": "awsui_grouped-vertical-last_8cbea_q3zoc_228",
23
- "select": "awsui_select_8cbea_q3zoc_110",
24
- "segment-count-2": "awsui_segment-count-2_8cbea_q3zoc_245",
25
- "segment-count-3": "awsui_segment-count-3_8cbea_q3zoc_252",
26
- "segment-count-4": "awsui_segment-count-4_8cbea_q3zoc_259",
27
- "segment-count-5": "awsui_segment-count-5_8cbea_q3zoc_266",
28
- "segment-count-6": "awsui_segment-count-6_8cbea_q3zoc_273",
29
- "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_q3zoc_280"
4
+ "segment": "awsui_segment_8cbea_1ai8f_17",
5
+ "full-width": "awsui_full-width_8cbea_1ai8f_44",
6
+ "refresh": "awsui_refresh_8cbea_1ai8f_47",
7
+ "disabled": "awsui_disabled_8cbea_1ai8f_53",
8
+ "selected": "awsui_selected_8cbea_1ai8f_110",
9
+ "icon": "awsui_icon_8cbea_1ai8f_121",
10
+ "with-text": "awsui_with-text_8cbea_1ai8f_125",
11
+ "with-no-text": "awsui_with-no-text_8cbea_1ai8f_131",
12
+ "root": "awsui_root_8cbea_1ai8f_136",
13
+ "segment-part": "awsui_segment-part_8cbea_1ai8f_168",
14
+ "grouped": "awsui_grouped_8cbea_1ai8f_189",
15
+ "grouped-only": "awsui_grouped-only_8cbea_1ai8f_189",
16
+ "grouped-vertical": "awsui_grouped-vertical_8cbea_1ai8f_193",
17
+ "grouped-horizontal-first": "awsui_grouped-horizontal-first_8cbea_1ai8f_204",
18
+ "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_8cbea_1ai8f_208",
19
+ "grouped-horizontal-last": "awsui_grouped-horizontal-last_8cbea_1ai8f_214",
20
+ "grouped-vertical-first": "awsui_grouped-vertical-first_8cbea_1ai8f_218",
21
+ "grouped-vertical-middle": "awsui_grouped-vertical-middle_8cbea_1ai8f_222",
22
+ "grouped-vertical-last": "awsui_grouped-vertical-last_8cbea_1ai8f_228",
23
+ "grouped-with-action": "awsui_grouped-with-action_8cbea_1ai8f_232",
24
+ "select": "awsui_select_8cbea_1ai8f_110",
25
+ "segment-count-2": "awsui_segment-count-2_8cbea_1ai8f_249",
26
+ "segment-count-3": "awsui_segment-count-3_8cbea_1ai8f_256",
27
+ "segment-count-4": "awsui_segment-count-4_8cbea_1ai8f_263",
28
+ "segment-count-5": "awsui_segment-count-5_8cbea_1ai8f_270",
29
+ "segment-count-6": "awsui_segment-count-6_8cbea_1ai8f_277",
30
+ "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_1ai8f_284"
30
31
  };
31
32