@cloudscape-design/components-themeable 3.0.87 → 3.0.89

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 (76) hide show
  1. package/lib/internal/scss/date-picker/styles.scss +6 -0
  2. package/lib/internal/scss/date-range-picker/styles.scss +4 -0
  3. package/lib/internal/scss/header/styles.scss +2 -0
  4. package/lib/internal/scss/internal/components/abstract-switch/styles.scss +1 -0
  5. package/lib/internal/scss/property-filter/styles.scss +4 -0
  6. package/lib/internal/template/checkbox/internal.d.ts +0 -1
  7. package/lib/internal/template/checkbox/internal.d.ts.map +1 -1
  8. package/lib/internal/template/checkbox/internal.js +9 -11
  9. package/lib/internal/template/checkbox/internal.js.map +1 -1
  10. package/lib/internal/template/date-picker/index.js +1 -1
  11. package/lib/internal/template/date-picker/index.js.map +1 -1
  12. package/lib/internal/template/date-picker/styles.css.js +7 -6
  13. package/lib/internal/template/date-picker/styles.scoped.css +14 -7
  14. package/lib/internal/template/date-picker/styles.selectors.js +7 -6
  15. package/lib/internal/template/date-range-picker/dropdown.js +1 -1
  16. package/lib/internal/template/date-range-picker/dropdown.js.map +1 -1
  17. package/lib/internal/template/date-range-picker/styles.css.js +37 -36
  18. package/lib/internal/template/date-range-picker/styles.scoped.css +48 -44
  19. package/lib/internal/template/date-range-picker/styles.selectors.js +37 -36
  20. package/lib/internal/template/header/styles.css.js +40 -40
  21. package/lib/internal/template/header/styles.scoped.css +45 -43
  22. package/lib/internal/template/header/styles.selectors.js +40 -40
  23. package/lib/internal/template/hotspot/index.d.ts.map +1 -1
  24. package/lib/internal/template/hotspot/index.js +2 -2
  25. package/lib/internal/template/hotspot/index.js.map +1 -1
  26. package/lib/internal/template/internal/components/abstract-switch/index.d.ts +2 -2
  27. package/lib/internal/template/internal/components/abstract-switch/index.d.ts.map +1 -1
  28. package/lib/internal/template/internal/components/abstract-switch/index.js +2 -9
  29. package/lib/internal/template/internal/components/abstract-switch/index.js.map +1 -1
  30. package/lib/internal/template/internal/components/abstract-switch/styles.css.js +12 -12
  31. package/lib/internal/template/internal/components/abstract-switch/styles.scoped.css +20 -19
  32. package/lib/internal/template/internal/components/abstract-switch/styles.selectors.js +12 -12
  33. package/lib/internal/template/internal/components/focus-lock/index.d.ts +2 -1
  34. package/lib/internal/template/internal/components/focus-lock/index.d.ts.map +1 -1
  35. package/lib/internal/template/internal/components/focus-lock/index.js +2 -2
  36. package/lib/internal/template/internal/components/focus-lock/index.js.map +1 -1
  37. package/lib/internal/template/internal/components/screenreader-only/index.js +1 -1
  38. package/lib/internal/template/internal/components/screenreader-only/index.js.map +1 -1
  39. package/lib/internal/template/internal/environment.js +1 -1
  40. package/lib/internal/template/property-filter/controller.d.ts +4 -7
  41. package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
  42. package/lib/internal/template/property-filter/controller.js +3 -2
  43. package/lib/internal/template/property-filter/controller.js.map +1 -1
  44. package/lib/internal/template/property-filter/filter-options.d.ts +3 -0
  45. package/lib/internal/template/property-filter/filter-options.d.ts.map +1 -0
  46. package/lib/internal/template/property-filter/filter-options.js +31 -0
  47. package/lib/internal/template/property-filter/filter-options.js.map +1 -0
  48. package/lib/internal/template/property-filter/index.d.ts.map +1 -1
  49. package/lib/internal/template/property-filter/index.js +0 -5
  50. package/lib/internal/template/property-filter/index.js.map +1 -1
  51. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  52. package/lib/internal/template/property-filter/property-filter-autosuggest.js +9 -7
  53. package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
  54. package/lib/internal/template/property-filter/styles.css.js +33 -32
  55. package/lib/internal/template/property-filter/styles.scoped.css +38 -34
  56. package/lib/internal/template/property-filter/styles.selectors.js +33 -32
  57. package/lib/internal/template/radio-group/radio-button.d.ts +3 -3
  58. package/lib/internal/template/radio-group/radio-button.d.ts.map +1 -1
  59. package/lib/internal/template/radio-group/radio-button.js +18 -6
  60. package/lib/internal/template/radio-group/radio-button.js.map +1 -1
  61. package/lib/internal/template/select/parts/trigger.d.ts.map +1 -1
  62. package/lib/internal/template/select/parts/trigger.js +8 -2
  63. package/lib/internal/template/select/parts/trigger.js.map +1 -1
  64. package/lib/internal/template/table/selection-control/index.js +1 -1
  65. package/lib/internal/template/table/selection-control/index.js.map +1 -1
  66. package/lib/internal/template/tiles/internal.d.ts.map +1 -1
  67. package/lib/internal/template/tiles/internal.js +2 -9
  68. package/lib/internal/template/tiles/internal.js.map +1 -1
  69. package/lib/internal/template/tiles/tile.d.ts +12 -0
  70. package/lib/internal/template/tiles/tile.d.ts.map +1 -0
  71. package/lib/internal/template/tiles/tile.js +27 -0
  72. package/lib/internal/template/tiles/tile.js.map +1 -0
  73. package/lib/internal/template/toggle/internal.d.ts.map +1 -1
  74. package/lib/internal/template/toggle/internal.js +7 -1
  75. package/lib/internal/template/toggle/internal.js.map +1 -1
  76. package/package.json +1 -1
@@ -2,45 +2,45 @@
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_2qdw9_dk6jz_93",
6
- "root-no-actions": "awsui_root-no-actions_2qdw9_dk6jz_108",
7
- "root-variant-h1": "awsui_root-variant-h1_2qdw9_dk6jz_108",
8
- "root-variant-h1-refresh": "awsui_root-variant-h1-refresh_2qdw9_dk6jz_111",
9
- "root-variant-h2": "awsui_root-variant-h2_2qdw9_dk6jz_114",
10
- "root-has-description": "awsui_root-has-description_2qdw9_dk6jz_114",
11
- "root-variant-h2-refresh": "awsui_root-variant-h2-refresh_2qdw9_dk6jz_117",
12
- "root-variant-h3": "awsui_root-variant-h3_2qdw9_dk6jz_120",
13
- "root-variant-h3-refresh": "awsui_root-variant-h3-refresh_2qdw9_dk6jz_123",
14
- "root-no-wrap": "awsui_root-no-wrap_2qdw9_dk6jz_126",
15
- "main": "awsui_main_2qdw9_dk6jz_130",
16
- "main-variant-h1": "awsui_main-variant-h1_2qdw9_dk6jz_138",
17
- "main-variant-h1-refresh": "awsui_main-variant-h1-refresh_2qdw9_dk6jz_141",
18
- "main-variant-h2": "awsui_main-variant-h2_2qdw9_dk6jz_147",
19
- "main-variant-h3": "awsui_main-variant-h3_2qdw9_dk6jz_147",
20
- "main-variant-h2-refresh": "awsui_main-variant-h2-refresh_2qdw9_dk6jz_153",
21
- "actions": "awsui_actions_2qdw9_dk6jz_160",
22
- "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_dk6jz_164",
23
- "actions-variant-h1-refresh": "awsui_actions-variant-h1-refresh_2qdw9_dk6jz_167",
24
- "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_dk6jz_170",
25
- "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_dk6jz_170",
26
- "actions-variant-h2-refresh": "awsui_actions-variant-h2-refresh_2qdw9_dk6jz_176",
27
- "actions-variant-h3-refresh": "awsui_actions-variant-h3-refresh_2qdw9_dk6jz_179",
28
- "title": "awsui_title_2qdw9_dk6jz_183",
29
- "title-variant-h2": "awsui_title-variant-h2_2qdw9_dk6jz_189",
30
- "title-variant-h3": "awsui_title-variant-h3_2qdw9_dk6jz_189",
31
- "title-variant-h2-refresh": "awsui_title-variant-h2-refresh_2qdw9_dk6jz_198",
32
- "info": "awsui_info_2qdw9_dk6jz_208",
33
- "description": "awsui_description_2qdw9_dk6jz_212",
34
- "description-variant-h1": "awsui_description-variant-h1_2qdw9_dk6jz_217",
35
- "description-variant-h1-refresh": "awsui_description-variant-h1-refresh_2qdw9_dk6jz_222",
36
- "description-variant-h2": "awsui_description-variant-h2_2qdw9_dk6jz_225",
37
- "description-variant-h3": "awsui_description-variant-h3_2qdw9_dk6jz_230",
38
- "description-variant-h3-refresh": "awsui_description-variant-h3-refresh_2qdw9_dk6jz_236",
39
- "heading": "awsui_heading_2qdw9_dk6jz_240",
40
- "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_dk6jz_249",
41
- "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_dk6jz_255",
42
- "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_dk6jz_258",
43
- "heading-text": "awsui_heading-text_2qdw9_dk6jz_262",
44
- "counter": "awsui_counter_2qdw9_dk6jz_266"
5
+ "root": "awsui_root_2qdw9_1vobd_93",
6
+ "root-no-actions": "awsui_root-no-actions_2qdw9_1vobd_108",
7
+ "root-variant-h1": "awsui_root-variant-h1_2qdw9_1vobd_108",
8
+ "root-variant-h1-refresh": "awsui_root-variant-h1-refresh_2qdw9_1vobd_111",
9
+ "root-variant-h2": "awsui_root-variant-h2_2qdw9_1vobd_114",
10
+ "root-has-description": "awsui_root-has-description_2qdw9_1vobd_114",
11
+ "root-variant-h2-refresh": "awsui_root-variant-h2-refresh_2qdw9_1vobd_117",
12
+ "root-variant-h3": "awsui_root-variant-h3_2qdw9_1vobd_120",
13
+ "root-variant-h3-refresh": "awsui_root-variant-h3-refresh_2qdw9_1vobd_123",
14
+ "root-no-wrap": "awsui_root-no-wrap_2qdw9_1vobd_126",
15
+ "main": "awsui_main_2qdw9_1vobd_130",
16
+ "main-variant-h1": "awsui_main-variant-h1_2qdw9_1vobd_138",
17
+ "main-variant-h1-refresh": "awsui_main-variant-h1-refresh_2qdw9_1vobd_141",
18
+ "main-variant-h2": "awsui_main-variant-h2_2qdw9_1vobd_147",
19
+ "main-variant-h3": "awsui_main-variant-h3_2qdw9_1vobd_147",
20
+ "main-variant-h2-refresh": "awsui_main-variant-h2-refresh_2qdw9_1vobd_153",
21
+ "actions": "awsui_actions_2qdw9_1vobd_160",
22
+ "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_1vobd_164",
23
+ "actions-variant-h1-refresh": "awsui_actions-variant-h1-refresh_2qdw9_1vobd_167",
24
+ "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_1vobd_170",
25
+ "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_1vobd_170",
26
+ "actions-variant-h2-refresh": "awsui_actions-variant-h2-refresh_2qdw9_1vobd_176",
27
+ "actions-variant-h3-refresh": "awsui_actions-variant-h3-refresh_2qdw9_1vobd_179",
28
+ "title": "awsui_title_2qdw9_1vobd_183",
29
+ "title-variant-h2": "awsui_title-variant-h2_2qdw9_1vobd_189",
30
+ "title-variant-h3": "awsui_title-variant-h3_2qdw9_1vobd_189",
31
+ "title-variant-h2-refresh": "awsui_title-variant-h2-refresh_2qdw9_1vobd_198",
32
+ "info": "awsui_info_2qdw9_1vobd_208",
33
+ "description": "awsui_description_2qdw9_1vobd_212",
34
+ "description-variant-h1": "awsui_description-variant-h1_2qdw9_1vobd_217",
35
+ "description-variant-h1-refresh": "awsui_description-variant-h1-refresh_2qdw9_1vobd_222",
36
+ "description-variant-h2": "awsui_description-variant-h2_2qdw9_1vobd_225",
37
+ "description-variant-h3": "awsui_description-variant-h3_2qdw9_1vobd_230",
38
+ "description-variant-h3-refresh": "awsui_description-variant-h3-refresh_2qdw9_1vobd_236",
39
+ "heading": "awsui_heading_2qdw9_1vobd_240",
40
+ "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_1vobd_249",
41
+ "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_1vobd_255",
42
+ "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_1vobd_259",
43
+ "heading-text": "awsui_heading-text_2qdw9_1vobd_264",
44
+ "counter": "awsui_counter_2qdw9_1vobd_268"
45
45
  };
46
46
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,IAAc,EACd,SAAiB,EACjB,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAkC5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,IAAc,EACd,SAAiB,EACjB,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAqC5B"}
@@ -22,9 +22,9 @@ export default function Hotspot(_a) {
22
22
  if (children) {
23
23
  return (React.createElement("div", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.wrapper), ref: __internalRootRef }),
24
24
  React.createElement("div", { className: styles.elementWrapper }, children),
25
- React.createElement("div", { className: clsx(styles.markerWrapper, styles["placement-".concat(side)]) }, content)));
25
+ React.createElement("div", { className: clsx(styles.markerWrapper, styles["placement-".concat(side)]), onClick: function (e) { return e.stopPropagation(); } }, content)));
26
26
  }
27
- return (React.createElement("span", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.inlineWrapper), ref: __internalRootRef }), content));
27
+ return (React.createElement("span", __assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles.inlineWrapper), ref: __internalRootRef, onClick: function (e) { return e.stopPropagation(); } }), content));
28
28
  }
29
29
  applyDisplayName(Hotspot, 'Hotspot');
30
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hotspot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EA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,OAAO,CACL,yCACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,EACvE,GAAG,EAAE,iBAAiB,KAErB,OAAO,CACH,CACR,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect } from 'react';\n\nimport { HotspotProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { hotspotContext as hotspotContextType } from '../annotation-context/context';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\n\nexport { HotspotProps };\n\nexport default function Hotspot({\n children,\n hotspotId,\n side = 'right',\n direction = 'top',\n ...restProps\n}: HotspotProps): JSX.Element {\n const { __internalRootRef } = useBaseComponent('Hotspot');\n const baseProps = getBaseProps(restProps);\n\n const hotspotContext = useContext(hotspotContextType);\n\n const content = hotspotContext.getContentForId(hotspotId, direction);\n\n const { unregisterHotspot, registerHotspot } = hotspotContext;\n\n useEffect(() => {\n registerHotspot(hotspotId);\n\n return () => unregisterHotspot(hotspotId);\n }, [hotspotId, unregisterHotspot, registerHotspot]);\n\n if (children) {\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root, styles.wrapper)} ref={__internalRootRef}>\n <div className={styles.elementWrapper}>{children}</div>\n <div className={clsx(styles.markerWrapper, styles[`placement-${side}`])}>{content}</div>\n </div>\n );\n }\n\n return (\n <span\n {...baseProps}\n className={clsx(baseProps.className, styles.root, styles.inlineWrapper)}\n ref={__internalRootRef}\n >\n {content}\n </span>\n );\n}\n\napplyDisplayName(Hotspot, 'Hotspot');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hotspot/index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EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,iBAAiB;YAC3G,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,IAAG,QAAQ,CAAO;YACvD,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,oBAAa,IAAI,CAAE,CAAC,CAAC,EAAE,OAAO,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,IACvG,OAAO,CACJ,CACF,CACP,CAAC;KACH;IAED,OAAO,CACL,yCACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,aAAa,CAAC,EACvE,GAAG,EAAE,iBAAiB,EACtB,OAAO,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,KAEhC,OAAO,CACH,CACR,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useContext, useEffect } from 'react';\n\nimport { HotspotProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { hotspotContext as hotspotContextType } from '../annotation-context/context';\nimport clsx from 'clsx';\nimport { getBaseProps } from '../internal/base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\n\nexport { HotspotProps };\n\nexport default function Hotspot({\n children,\n hotspotId,\n side = 'right',\n direction = 'top',\n ...restProps\n}: HotspotProps): JSX.Element {\n const { __internalRootRef } = useBaseComponent('Hotspot');\n const baseProps = getBaseProps(restProps);\n\n const hotspotContext = useContext(hotspotContextType);\n\n const content = hotspotContext.getContentForId(hotspotId, direction);\n\n const { unregisterHotspot, registerHotspot } = hotspotContext;\n\n useEffect(() => {\n registerHotspot(hotspotId);\n\n return () => unregisterHotspot(hotspotId);\n }, [hotspotId, unregisterHotspot, registerHotspot]);\n\n if (children) {\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root, styles.wrapper)} ref={__internalRootRef}>\n <div className={styles.elementWrapper}>{children}</div>\n <div className={clsx(styles.markerWrapper, styles[`placement-${side}`])} onClick={e => e.stopPropagation()}>\n {content}\n </div>\n </div>\n );\n }\n\n return (\n <span\n {...baseProps}\n className={clsx(baseProps.className, styles.root, styles.inlineWrapper)}\n ref={__internalRootRef}\n onClick={e => e.stopPropagation()}\n >\n {content}\n </span>\n );\n}\n\napplyDisplayName(Hotspot, 'Hotspot');\n"]}
@@ -13,7 +13,7 @@ export interface AbstractSwitchProps extends React.HTMLAttributes<HTMLElement>,
13
13
  ariaLabel?: string;
14
14
  ariaLabelledby?: string;
15
15
  ariaDescribedby?: string;
16
- withoutLabel?: boolean;
16
+ onClick: () => void;
17
17
  }
18
- export default function AbstractSwitch({ controlId, controlClassName, outlineClassName, disabled, nativeControl, styledControl, label, description, descriptionBottomPadding, ariaLabel, ariaLabelledby, ariaDescribedby, withoutLabel, __internalRootRef, ...rest }: AbstractSwitchProps): JSX.Element;
18
+ export default function AbstractSwitch({ controlId, controlClassName, outlineClassName, disabled, nativeControl, styledControl, label, description, descriptionBottomPadding, ariaLabel, ariaLabelledby, ariaDescribedby, onClick, __internalRootRef, ...rest }: AbstractSwitchProps): JSX.Element;
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,0BAA0B;IACxG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IAC1F,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAMD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,WAAW,EACX,wBAAwB,EACxB,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAyErB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,0BAA0B;IACxG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IAC1F,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAMD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,WAAW,EACX,wBAAwB,EACxB,SAAS,EACT,cAAc,EACd,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAiErB"}
@@ -11,19 +11,12 @@ function joinString(values) {
11
11
  }
12
12
  export default function AbstractSwitch(_a) {
13
13
  var _b, _c;
14
- var controlId = _a.controlId, controlClassName = _a.controlClassName, outlineClassName = _a.outlineClassName, disabled = _a.disabled, nativeControl = _a.nativeControl, styledControl = _a.styledControl, label = _a.label, description = _a.description, descriptionBottomPadding = _a.descriptionBottomPadding, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, ariaDescribedby = _a.ariaDescribedby, withoutLabel = _a.withoutLabel, __internalRootRef = _a.__internalRootRef, rest = __rest(_a, ["controlId", "controlClassName", "outlineClassName", "disabled", "nativeControl", "styledControl", "label", "description", "descriptionBottomPadding", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "withoutLabel", "__internalRootRef"]);
14
+ var controlId = _a.controlId, controlClassName = _a.controlClassName, outlineClassName = _a.outlineClassName, disabled = _a.disabled, nativeControl = _a.nativeControl, styledControl = _a.styledControl, label = _a.label, description = _a.description, descriptionBottomPadding = _a.descriptionBottomPadding, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, ariaDescribedby = _a.ariaDescribedby, onClick = _a.onClick, __internalRootRef = _a.__internalRootRef, rest = __rest(_a, ["controlId", "controlClassName", "outlineClassName", "disabled", "nativeControl", "styledControl", "label", "description", "descriptionBottomPadding", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "onClick", "__internalRootRef"]);
15
15
  var uniqueId = useUniqueId();
16
16
  var id = controlId || uniqueId;
17
17
  var focusVisible = useFocusVisible();
18
- var wrapperId = "".concat(id, "-wrapper");
19
18
  var labelId = "".concat(id, "-label");
20
19
  var descriptionId = "".concat(id, "-description");
21
- var WrapperElement = withoutLabel ? 'div' : 'label';
22
- var wrapperAttributes = {};
23
- if (!withoutLabel) {
24
- wrapperAttributes.id = wrapperId;
25
- wrapperAttributes.htmlFor = id;
26
- }
27
20
  var ariaLabelledByIds = [];
28
21
  if (label) {
29
22
  ariaLabelledByIds.push(labelId);
@@ -39,7 +32,7 @@ export default function AbstractSwitch(_a) {
39
32
  ariaDescriptons.push(descriptionId);
40
33
  }
41
34
  return (React.createElement("div", __assign({}, rest, { className: clsx(styles.wrapper, rest.className), ref: __internalRootRef }),
42
- React.createElement(WrapperElement, __assign({}, wrapperAttributes, { className: styles['label-wrapper'], "aria-disabled": disabled ? 'true' : undefined }),
35
+ React.createElement("div", { className: styles['label-wrapper'], "aria-disabled": disabled ? 'true' : undefined, onClick: disabled ? undefined : onClick },
43
36
  React.createElement("span", { className: clsx(styles.control, controlClassName) },
44
37
  styledControl,
45
38
  nativeControl(__assign(__assign({}, focusVisible), { id: id, disabled: disabled, className: styles['native-input'], 'aria-describedby': ariaDescriptons.length ? joinString(ariaDescriptons) : undefined, 'aria-labelledby': ariaLabelledByIds.length ? joinString(ariaLabelledByIds) : undefined, 'aria-label': ariaLabel })),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmBxD,SAAS,UAAU,CAAC,MAA8B;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,IAAsB,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAgBjB;;IAfpB,IAAA,SAAS,eAAA,EACT,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,wBAAwB,8BAAA,EACxB,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,YAAY,kBAAA,EACZ,iBAAiB,uBAAA,EACd,IAAI,cAf8B,8OAgBtC,CADQ;IAEP,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,IAAM,EAAE,GAAG,SAAS,IAAI,QAAQ,CAAC;IAEjC,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,SAAS,GAAG,UAAG,EAAE,aAAU,CAAC;IAClC,IAAM,OAAO,GAAG,UAAG,EAAE,WAAQ,CAAC;IAC9B,IAAM,aAAa,GAAG,UAAG,EAAE,iBAAc,CAAC;IAE1C,IAAM,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,C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CAAC,CAAC,SAAS,EACvF,YAAY,EAAE,SAAS,IACvB;gBACF,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,GAAI,CACtD;YACP,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;gBACrF,KAAK,IAAI,CACR,8BAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,YAAI,GAAC,MAAM,CAAC,gBAAgB,CAAC,IAAG,QAAQ,MAAG,IACvF,KAAK,CACD,CACR;gBACA,WAAW,IAAI,CACd,8BACE,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW;wBAChC,GAAC,MAAM,CAAC,sBAAsB,CAAC,IAAG,QAAQ;wBAC1C,GAAC,MAAM,CAAC,4BAA4B,CAAC,IAAG,wBAAwB;4BAChE,IAED,WAAW,CACP,CACR,CACI,CACQ,CACb,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';\nimport styles from './styles.css.js';\nimport useFocusVisible from '../../hooks/focus-visible';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component/index.js';\n\nexport interface AbstractSwitchProps extends React.HTMLAttributes<HTMLElement>, InternalBaseComponentProps {\n controlId?: string;\n controlClassName: string;\n outlineClassName: string;\n disabled?: boolean;\n nativeControl: (props: React.InputHTMLAttributes<HTMLInputElement>) => React.ReactElement;\n styledControl: React.ReactElement;\n label?: React.ReactNode;\n description?: React.ReactNode;\n descriptionBottomPadding?: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n withoutLabel?: boolean;\n}\n\nfunction joinString(values: (string | undefined)[]) {\n return values.filter((value): value is string => !!value).join(' ');\n}\n\nexport default function AbstractSwitch({\n controlId,\n controlClassName,\n outlineClassName,\n disabled,\n nativeControl,\n styledControl,\n label,\n description,\n descriptionBottomPadding,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n withoutLabel,\n __internalRootRef,\n ...rest\n}: AbstractSwitchProps) {\n const uniqueId = useUniqueId();\n const id = controlId || uniqueId;\n\n const focusVisible = useFocusVisible();\n const wrapperId = `${id}-wrapper`;\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n\n const WrapperElement = withoutLabel ? 'div' : 'label';\n const wrapperAttributes: Record<string, string | undefined> = {};\n if (!withoutLabel) {\n wrapperAttributes.id = wrapperId;\n wrapperAttributes.htmlFor = id;\n }\n\n const ariaLabelledByIds = [];\n if (label) {\n ariaLabelledByIds.push(labelId);\n }\n if (ariaLabelledby) {\n ariaLabelledByIds.push(ariaLabelledby);\n }\n\n const ariaDescriptons = [];\n if (ariaDescribedby) {\n ariaDescriptons.push(ariaDescribedby);\n }\n if (description) {\n ariaDescriptons.push(descriptionId);\n }\n\n return (\n <div {...rest} className={clsx(styles.wrapper, rest.className)} ref={__internalRootRef}>\n <WrapperElement\n {...wrapperAttributes}\n className={styles['label-wrapper']}\n aria-disabled={disabled ? 'true' : undefined}\n >\n <span className={clsx(styles.control, controlClassName)}>\n {styledControl}\n {nativeControl({\n ...focusVisible,\n id,\n disabled,\n className: styles['native-input'],\n 'aria-describedby': ariaDescriptons.length ? joinString(ariaDescriptons) : undefined,\n 'aria-labelledby': ariaLabelledByIds.length ? joinString(ariaLabelledByIds) : undefined,\n 'aria-label': ariaLabel,\n })}\n <span className={clsx(styles.outline, outlineClassName)} />\n </span>\n <span className={clsx(styles.content, !label && !description && styles['empty-content'])}>\n {label && (\n <span id={labelId} className={clsx(styles.label, { [styles['label-disabled']]: disabled })}>\n {label}\n </span>\n )}\n {description && (\n <span\n id={descriptionId}\n className={clsx(styles.description, {\n [styles['description-disabled']]: disabled,\n [styles['description-bottom-padding']]: descriptionBottomPadding,\n })}\n >\n {description}\n </span>\n )}\n </span>\n </WrapperElement>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/abstract-switch/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAmBxD,SAAS,UAAU,CAAC,MAA8B;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,UAAC,KAAK,IAAsB,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAgBjB;;IAfpB,IAAA,SAAS,eAAA,EACT,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,QAAQ,cAAA,EACR,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,wBAAwB,8BAAA,EACxB,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,OAAO,aAAA,EACP,iBAAiB,uBAAA,EACd,IAAI,cAf8B,yOAgBtC,CADQ;IAEP,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,IAAM,EAAE,GAAG,SAAS,IAAI,QAAQ,CAAC;IAEjC,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAM,OAAO,GAAG,UAAG,EAAE,WAAQ,CAAC;IAC9B,IAAM,aAAa,GAAG,UAAG,EAAE,iBAAc,CAAC;IAE1C,IAAM,iBA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EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;gBACrF,KAAK,IAAI,CACR,8BAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,YAAI,GAAC,MAAM,CAAC,gBAAgB,CAAC,IAAG,QAAQ,MAAG,IACvF,KAAK,CACD,CACR;gBACA,WAAW,IAAI,CACd,8BACE,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW;wBAChC,GAAC,MAAM,CAAC,sBAAsB,CAAC,IAAG,QAAQ;wBAC1C,GAAC,MAAM,CAAC,4BAA4B,CAAC,IAAG,wBAAwB;4BAChE,IAED,WAAW,CACP,CACR,CACI,CACH,CACF,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';\nimport styles from './styles.css.js';\nimport useFocusVisible from '../../hooks/focus-visible';\nimport { useUniqueId } from '../../hooks/use-unique-id';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component/index.js';\n\nexport interface AbstractSwitchProps extends React.HTMLAttributes<HTMLElement>, InternalBaseComponentProps {\n controlId?: string;\n controlClassName: string;\n outlineClassName: string;\n disabled?: boolean;\n nativeControl: (props: React.InputHTMLAttributes<HTMLInputElement>) => React.ReactElement;\n styledControl: React.ReactElement;\n label?: React.ReactNode;\n description?: React.ReactNode;\n descriptionBottomPadding?: boolean;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n onClick: () => void;\n}\n\nfunction joinString(values: (string | undefined)[]) {\n return values.filter((value): value is string => !!value).join(' ');\n}\n\nexport default function AbstractSwitch({\n controlId,\n controlClassName,\n outlineClassName,\n disabled,\n nativeControl,\n styledControl,\n label,\n description,\n descriptionBottomPadding,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n onClick,\n __internalRootRef,\n ...rest\n}: AbstractSwitchProps) {\n const uniqueId = useUniqueId();\n const id = controlId || uniqueId;\n\n const focusVisible = useFocusVisible();\n const labelId = `${id}-label`;\n const descriptionId = `${id}-description`;\n\n const ariaLabelledByIds = [];\n if (label) {\n ariaLabelledByIds.push(labelId);\n }\n if (ariaLabelledby) {\n ariaLabelledByIds.push(ariaLabelledby);\n }\n\n const ariaDescriptons = [];\n if (ariaDescribedby) {\n ariaDescriptons.push(ariaDescribedby);\n }\n if (description) {\n ariaDescriptons.push(descriptionId);\n }\n\n return (\n <div {...rest} className={clsx(styles.wrapper, rest.className)} ref={__internalRootRef}>\n <div\n className={styles['label-wrapper']}\n aria-disabled={disabled ? 'true' : undefined}\n onClick={disabled ? undefined : onClick}\n >\n <span className={clsx(styles.control, controlClassName)}>\n {styledControl}\n {nativeControl({\n ...focusVisible,\n id,\n disabled,\n className: styles['native-input'],\n 'aria-describedby': ariaDescriptons.length ? joinString(ariaDescriptons) : undefined,\n 'aria-labelledby': ariaLabelledByIds.length ? joinString(ariaLabelledByIds) : undefined,\n 'aria-label': ariaLabel,\n })}\n <span className={clsx(styles.outline, outlineClassName)} />\n </span>\n <span className={clsx(styles.content, !label && !description && styles['empty-content'])}>\n {label && (\n <span id={labelId} className={clsx(styles.label, { [styles['label-disabled']]: disabled })}>\n {label}\n </span>\n )}\n {description && (\n <span\n id={descriptionId}\n className={clsx(styles.description, {\n [styles['description-disabled']]: disabled,\n [styles['description-bottom-padding']]: descriptionBottomPadding,\n })}\n >\n {description}\n </span>\n )}\n </span>\n </div>\n </div>\n );\n}\n"]}
@@ -1,17 +1,17 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "content": "awsui_content_1wepg_15e8a_93",
5
- "description": "awsui_description_1wepg_15e8a_94",
6
- "label": "awsui_label_1wepg_15e8a_95",
7
- "outline": "awsui_outline_1wepg_15e8a_99",
8
- "native-input": "awsui_native-input_1wepg_15e8a_103",
9
- "wrapper": "awsui_wrapper_1wepg_15e8a_110",
10
- "label-wrapper": "awsui_label-wrapper_1wepg_15e8a_117",
11
- "empty-content": "awsui_empty-content_1wepg_15e8a_128",
12
- "description-bottom-padding": "awsui_description-bottom-padding_1wepg_15e8a_138",
13
- "label-disabled": "awsui_label-disabled_1wepg_15e8a_146",
14
- "description-disabled": "awsui_description-disabled_1wepg_15e8a_147",
15
- "control": "awsui_control_1wepg_15e8a_152"
4
+ "content": "awsui_content_1wepg_1angf_93",
5
+ "description": "awsui_description_1wepg_1angf_94",
6
+ "label": "awsui_label_1wepg_1angf_95",
7
+ "outline": "awsui_outline_1wepg_1angf_99",
8
+ "native-input": "awsui_native-input_1wepg_1angf_103",
9
+ "wrapper": "awsui_wrapper_1wepg_1angf_110",
10
+ "label-wrapper": "awsui_label-wrapper_1wepg_1angf_117",
11
+ "empty-content": "awsui_empty-content_1wepg_1angf_129",
12
+ "description-bottom-padding": "awsui_description-bottom-padding_1wepg_1angf_139",
13
+ "label-disabled": "awsui_label-disabled_1wepg_1angf_147",
14
+ "description-disabled": "awsui_description-disabled_1wepg_1angf_148",
15
+ "control": "awsui_control_1wepg_1angf_153"
16
16
  };
17
17
 
@@ -90,76 +90,77 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_content_1wepg_15e8a_93:not(#\9),
94
- .awsui_description_1wepg_15e8a_94:not(#\9),
95
- .awsui_label_1wepg_15e8a_95:not(#\9) {
93
+ .awsui_content_1wepg_1angf_93:not(#\9),
94
+ .awsui_description_1wepg_1angf_94:not(#\9),
95
+ .awsui_label_1wepg_1angf_95:not(#\9) {
96
96
  display: block;
97
97
  }
98
98
 
99
- .awsui_outline_1wepg_15e8a_99:not(#\9) {
99
+ .awsui_outline_1wepg_1angf_99:not(#\9) {
100
100
  display: none;
101
101
  }
102
102
 
103
- .awsui_native-input_1wepg_15e8a_103[data-awsui-focus-visible=true]:not(#\9):focus {
103
+ .awsui_native-input_1wepg_1angf_103[data-awsui-focus-visible=true]:not(#\9):focus {
104
104
  /* stylelint-disable-next-line selector-max-type, @cloudscape-design/no-implicit-descendant */
105
105
  }
106
- .awsui_native-input_1wepg_15e8a_103[data-awsui-focus-visible=true]:not(#\9):focus + .awsui_outline_1wepg_15e8a_99 {
106
+ .awsui_native-input_1wepg_1angf_103[data-awsui-focus-visible=true]:not(#\9):focus + .awsui_outline_1wepg_1angf_99 {
107
107
  display: block;
108
108
  }
109
109
 
110
- .awsui_wrapper_1wepg_15e8a_110:not(#\9) {
110
+ .awsui_wrapper_1wepg_1angf_110:not(#\9) {
111
111
  min-width: 0;
112
112
  -ms-word-break: break-all;
113
113
  word-break: break-word;
114
114
  display: flex;
115
115
  }
116
116
 
117
- .awsui_label-wrapper_1wepg_15e8a_117:not(#\9) {
117
+ .awsui_label-wrapper_1wepg_1angf_117:not(#\9) {
118
118
  position: relative;
119
119
  display: flex;
120
+ cursor: default;
120
121
  }
121
122
 
122
- .awsui_content_1wepg_15e8a_93:not(#\9) {
123
+ .awsui_content_1wepg_1angf_93:not(#\9) {
123
124
  min-width: 0;
124
125
  -ms-word-break: break-all;
125
126
  word-break: break-word;
126
127
  }
127
128
 
128
- .awsui_empty-content_1wepg_15e8a_128:not(#\9) {
129
+ .awsui_empty-content_1wepg_1angf_129:not(#\9) {
129
130
  width: 0px;
130
131
  }
131
132
 
132
- .awsui_description_1wepg_15e8a_94:not(#\9) {
133
+ .awsui_description_1wepg_1angf_94:not(#\9) {
133
134
  color: var(--color-text-form-secondary-1c3szk, #687078);
134
135
  font-size: var(--font-body-s-size-ukw2p9, 12px);
135
136
  line-height: var(--font-body-s-line-height-kdsbrl, 16px);
136
137
  letter-spacing: var(--font-body-s-letter-spacing-p88gax, normal);
137
138
  }
138
- .awsui_description-bottom-padding_1wepg_15e8a_138:not(#\9) {
139
+ .awsui_description-bottom-padding_1wepg_1angf_139:not(#\9) {
139
140
  padding-bottom: var(--space-scaled-xxs-95dhkm, 4px);
140
141
  }
141
142
 
142
- .awsui_label_1wepg_15e8a_95:not(#\9),
143
- .awsui_description_1wepg_15e8a_94:not(#\9) {
143
+ .awsui_label_1wepg_1angf_95:not(#\9),
144
+ .awsui_description_1wepg_1angf_94:not(#\9) {
144
145
  padding-left: var(--space-xs-rsr2qu, 8px);
145
146
  }
146
- .awsui_label-disabled_1wepg_15e8a_146:not(#\9),
147
- .awsui_description-disabled_1wepg_15e8a_147:not(#\9) {
147
+ .awsui_label-disabled_1wepg_1angf_147:not(#\9),
148
+ .awsui_description-disabled_1wepg_1angf_148:not(#\9) {
148
149
  color: var(--color-text-control-disabled-l34dfo, #aab7b8);
149
150
  }
150
151
 
151
152
  /* stylelint-disable selector-max-type */
152
- .awsui_control_1wepg_15e8a_152:not(#\9) {
153
+ .awsui_control_1wepg_1angf_153:not(#\9) {
153
154
  position: relative;
154
155
  }
155
- .awsui_control_1wepg_15e8a_152 > input:not(#\9), .awsui_control_1wepg_15e8a_152 > svg:not(#\9), .awsui_control_1wepg_15e8a_152 > .awsui_outline_1wepg_15e8a_99:not(#\9) {
156
+ .awsui_control_1wepg_1angf_153 > input:not(#\9), .awsui_control_1wepg_1angf_153 > svg:not(#\9), .awsui_control_1wepg_1angf_153 > .awsui_outline_1wepg_1angf_99:not(#\9) {
156
157
  position: absolute;
157
158
  width: 100%;
158
159
  height: 100%;
159
160
  top: 0;
160
161
  left: 0;
161
162
  }
162
- .awsui_control_1wepg_15e8a_152 > input:not(#\9) {
163
+ .awsui_control_1wepg_1angf_153 > input:not(#\9) {
163
164
  opacity: 0;
164
165
  z-index: 1;
165
166
  -webkit-user-select: none;
@@ -2,17 +2,17 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "content": "awsui_content_1wepg_15e8a_93",
6
- "description": "awsui_description_1wepg_15e8a_94",
7
- "label": "awsui_label_1wepg_15e8a_95",
8
- "outline": "awsui_outline_1wepg_15e8a_99",
9
- "native-input": "awsui_native-input_1wepg_15e8a_103",
10
- "wrapper": "awsui_wrapper_1wepg_15e8a_110",
11
- "label-wrapper": "awsui_label-wrapper_1wepg_15e8a_117",
12
- "empty-content": "awsui_empty-content_1wepg_15e8a_128",
13
- "description-bottom-padding": "awsui_description-bottom-padding_1wepg_15e8a_138",
14
- "label-disabled": "awsui_label-disabled_1wepg_15e8a_146",
15
- "description-disabled": "awsui_description-disabled_1wepg_15e8a_147",
16
- "control": "awsui_control_1wepg_15e8a_152"
5
+ "content": "awsui_content_1wepg_1angf_93",
6
+ "description": "awsui_description_1wepg_1angf_94",
7
+ "label": "awsui_label_1wepg_1angf_95",
8
+ "outline": "awsui_outline_1wepg_1angf_99",
9
+ "native-input": "awsui_native-input_1wepg_1angf_103",
10
+ "wrapper": "awsui_wrapper_1wepg_1angf_110",
11
+ "label-wrapper": "awsui_label-wrapper_1wepg_1angf_117",
12
+ "empty-content": "awsui_empty-content_1wepg_1angf_129",
13
+ "description-bottom-padding": "awsui_description-bottom-padding_1wepg_1angf_139",
14
+ "label-disabled": "awsui_label-disabled_1wepg_1angf_147",
15
+ "description-disabled": "awsui_description-disabled_1wepg_1angf_148",
16
+ "control": "awsui_control_1wepg_1angf_153"
17
17
  };
18
18
 
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  export interface FocusLockProps {
3
+ className?: string;
3
4
  disabled?: boolean;
4
5
  autoFocus?: boolean;
5
6
  children: React.ReactNode;
6
7
  }
7
- export default function FocusLock({ disabled, autoFocus, children }: FocusLockProps): JSX.Element;
8
+ export default function FocusLock({ className, disabled, autoFocus, children }: FocusLockProps): JSX.Element;
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,cAAc,eA4BlF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,cAAc,eA8B7F"}
@@ -4,7 +4,7 @@ import React, { useEffect, useRef } from 'react';
4
4
  import TabTrap from '../tab-trap/index';
5
5
  import { getFirstFocusable, getLastFocusable } from './utils';
6
6
  export default function FocusLock(_a) {
7
- var disabled = _a.disabled, autoFocus = _a.autoFocus, children = _a.children;
7
+ var className = _a.className, disabled = _a.disabled, autoFocus = _a.autoFocus, children = _a.children;
8
8
  var containerRef = useRef(null);
9
9
  var focusFirst = function () {
10
10
  var _a;
@@ -25,7 +25,7 @@ export default function FocusLock(_a) {
25
25
  }, [autoFocus]);
26
26
  return (React.createElement(React.Fragment, null,
27
27
  React.createElement(TabTrap, { disabled: disabled, focusNextCallback: focusLast }),
28
- React.createElement("div", { ref: containerRef }, children),
28
+ React.createElement("div", { className: className, ref: containerRef }, children),
29
29
  React.createElement(TabTrap, { disabled: disabled, focusNextCallback: focusFirst })));
30
30
  }
31
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQ9D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAiD;QAA/C,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,QAAQ,cAAA;IAC/D,IAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,IAAM,UAAU,GAAG;;QACjB,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,MAAA,iBAAiB,CAAC,YAAY,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAC;SAClD;IACH,CAAC,CAAC;IAEF,IAAM,SAAS,GAAG;;QAChB,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,MAAA,gBAAgB,CAAC,YAAY,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAC;SACjD;IACH,CAAC,CAAC;IAEF,SAAS,CAAC;QACR,IAAI,SAAS,EAAE;YACb,UAAU,EAAE,CAAC;SACd;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACL;QACE,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,GAAI;QAC7D,6BAAK,GAAG,EAAE,YAAY,IAAG,QAAQ,CAAO;QACxC,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,GAAI,CAC7D,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport TabTrap from '../tab-trap/index';\nimport { getFirstFocusable, getLastFocusable } from './utils';\n\nexport interface FocusLockProps {\n disabled?: boolean;\n autoFocus?: boolean;\n children: React.ReactNode;\n}\n\nexport default function FocusLock({ disabled, autoFocus, children }: FocusLockProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const focusFirst = () => {\n if (containerRef.current) {\n getFirstFocusable(containerRef.current)?.focus();\n }\n };\n\n const focusLast = () => {\n if (containerRef.current) {\n getLastFocusable(containerRef.current)?.focus();\n }\n };\n\n useEffect(() => {\n if (autoFocus) {\n focusFirst();\n }\n }, [autoFocus]);\n\n return (\n <>\n <TabTrap disabled={disabled} focusNextCallback={focusLast} />\n <div ref={containerRef}>{children}</div>\n <TabTrap disabled={disabled} focusNextCallback={focusFirst} />\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAS9D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAA4D;QAA1D,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,QAAQ,cAAA;IAC1E,IAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,IAAM,UAAU,GAAG;;QACjB,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,MAAA,iBAAiB,CAAC,YAAY,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAC;SAClD;IACH,CAAC,CAAC;IAEF,IAAM,SAAS,GAAG;;QAChB,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,MAAA,gBAAgB,CAAC,YAAY,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAC;SACjD;IACH,CAAC,CAAC;IAEF,SAAS,CAAC;QACR,IAAI,SAAS,EAAE;YACb,UAAU,EAAE,CAAC;SACd;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACL;QACE,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,SAAS,GAAI;QAC7D,6BAAK,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,IACzC,QAAQ,CACL;QACN,oBAAC,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,GAAI,CAC7D,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport TabTrap from '../tab-trap/index';\nimport { getFirstFocusable, getLastFocusable } from './utils';\n\nexport interface FocusLockProps {\n className?: string;\n disabled?: boolean;\n autoFocus?: boolean;\n children: React.ReactNode;\n}\n\nexport default function FocusLock({ className, disabled, autoFocus, children }: FocusLockProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const focusFirst = () => {\n if (containerRef.current) {\n getFirstFocusable(containerRef.current)?.focus();\n }\n };\n\n const focusLast = () => {\n if (containerRef.current) {\n getLastFocusable(containerRef.current)?.focus();\n }\n };\n\n useEffect(() => {\n if (autoFocus) {\n focusFirst();\n }\n }, [autoFocus]);\n\n return (\n <>\n <TabTrap disabled={disabled} focusNextCallback={focusLast} />\n <div className={className} ref={containerRef}>\n {children}\n </div>\n <TabTrap disabled={disabled} focusNextCallback={focusFirst} />\n </>\n );\n}\n"]}
@@ -19,6 +19,6 @@ import styles from './styles.css.js';
19
19
  * ```
20
20
  */
21
21
  export default function ScreenreaderOnly(props) {
22
- return React.createElement("div", __assign({}, props, { className: clsx(styles.root, props.className) }));
22
+ return React.createElement("span", __assign({}, props, { className: clsx(styles.root, props.className) }));
23
23
  }
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/screenreader-only/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAA4B;IACnE,OAAO,wCAAS,KAAK,IAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC3E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport clsx from 'clsx';\nimport React from 'react';\nimport styles from './styles.css.js';\n\nexport interface ScreenreaderOnlyProps {\n id?: string;\n className?: string;\n children: React.ReactNode;\n}\n\n/**\n * Makes content now shown on a screen but still announced by screen-reader users.\n * The component is suitable when the aria-label cannot be used, e.g. to avoid elemnts being announced as \"blank\".\n *\n * To exclude screenreader-only content use `:not(.${screenreaderOnlyStyles.root})` selector, for example:\n *\n * ```\n * import screenreaderOnlyStyles from '~internal/components/screenreader-only/styles.css.js'\n *\n * let visibleContent = wrapper.find(`${styles.label}`).find(`:not(.${screenreaderOnlyStyles.root})`).getElement().textContent\n *\n * let screenreaderContent = wrapper.find(`${styles.label}`).find(`.${screenreaderOnlyStyles.root}`).getElement().textContent\n * ```\n */\nexport default function ScreenreaderOnly(props: ScreenreaderOnlyProps) {\n return <div {...props} className={clsx(styles.root, props.className)} />;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/screenreader-only/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAA4B;IACnE,OAAO,yCAAU,KAAK,IAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC5E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport clsx from 'clsx';\nimport React from 'react';\nimport styles from './styles.css.js';\n\nexport interface ScreenreaderOnlyProps {\n id?: string;\n className?: string;\n children: React.ReactNode;\n}\n\n/**\n * Makes content now shown on a screen but still announced by screen-reader users.\n * The component is suitable when the aria-label cannot be used, e.g. to avoid elemnts being announced as \"blank\".\n *\n * To exclude screenreader-only content use `:not(.${screenreaderOnlyStyles.root})` selector, for example:\n *\n * ```\n * import screenreaderOnlyStyles from '~internal/components/screenreader-only/styles.css.js'\n *\n * let visibleContent = wrapper.find(`${styles.label}`).find(`:not(.${screenreaderOnlyStyles.root})`).getElement().textContent\n *\n * let screenreaderContent = wrapper.find(`${styles.label}`).find(`.${screenreaderOnlyStyles.root}`).getElement().textContent\n * ```\n */\nexport default function ScreenreaderOnly(props: ScreenreaderOnlyProps) {\n return <span {...props} className={clsx(styles.root, props.className)} />;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
 
2
- export var PACKAGE_VERSION = '3.0.0 (d6e884f)';
2
+ export var PACKAGE_VERSION = '3.0.0 (ee61cc1)';
3
3
  export var THEME = 'open-source-visual-refresh';
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
5
5
 
@@ -1,6 +1,5 @@
1
1
  import { ComparisonOperator, FilteringOption, FilteringProperty, GroupText, I18nStrings, JoinOperation, ParsedText, Query, Token } from './interfaces';
2
2
  import { NonCancelableEventHandler } from '../internal/events';
3
- import { AutosuggestProps } from '../autosuggest/interfaces';
4
3
  import { AutosuggestInputRef } from '../internal/components/autosuggest-input';
5
4
  export declare const getQueryActions: (query: Query, onChange: NonCancelableEventHandler<Query>, inputRef: React.RefObject<AutosuggestInputRef>) => {
6
5
  setToken: (index: number, newToken: Token) => void;
@@ -16,10 +15,7 @@ interface OptionGroup<T> {
16
15
  label: string;
17
16
  options: T[];
18
17
  }
19
- interface ExtendedAutosuggestOption extends AutosuggestProps.Option {
20
- tokenValue: string;
21
- }
22
- export declare const getAllValueSuggestions: (filteringOptions: readonly FilteringOption[], filteringProperties: readonly FilteringProperty[], operator: ComparisonOperator | undefined, i18nStrings: I18nStrings, customGroupsText: readonly GroupText[]) => OptionGroup<ExtendedAutosuggestOption>[];
18
+ export declare const getAllValueSuggestions: (filteringOptions: readonly FilteringOption[], filteringProperties: readonly FilteringProperty[], operator: ComparisonOperator | undefined, i18nStrings: I18nStrings, customGroupsText: readonly GroupText[]) => OptionGroup<import("../internal/components/option/interfaces").OptionDefinition>[];
23
19
  export declare const getPropertyByKey: (filteringProperties: readonly FilteringProperty[], key: string) => import("./interfaces").PropertyFilterProps.FilteringProperty | undefined;
24
20
  export declare function getExtendedOperator(filteringProperties: readonly FilteringProperty[], property: string, operator: ComparisonOperator): import("@cloudscape-design/collection-hooks").PropertyFilterOperatorExtended<any> | null;
25
21
  export declare function createPropertiesCompatibilityMap(filteringProperties: readonly FilteringProperty[]): (propertyA: string, propertyB: string) => boolean;
@@ -28,7 +24,7 @@ export declare const getAutosuggestOptions: (parsedText: ParsedText, filteringOp
28
24
  filterText: string;
29
25
  options: {
30
26
  options: {
31
- tokenValue: string;
27
+ value: string;
32
28
  label: string;
33
29
  __labelPrefix: string;
34
30
  }[];
@@ -36,8 +32,9 @@ export declare const getAutosuggestOptions: (parsedText: ParsedText, filteringOp
36
32
  }[];
37
33
  } | {
38
34
  filterText: string;
39
- options: (OptionGroup<ExtendedAutosuggestOption> | OptionGroup<{
35
+ options: (OptionGroup<import("../internal/components/option/interfaces").OptionDefinition> | OptionGroup<{
40
36
  value: string;
37
+ label: string;
41
38
  keepOpenOnSelect: boolean;
42
39
  }>)[];
43
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/property-filter/controller.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAElB,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,aAAa,EACb,UAAU,EACV,KAAK,EACL,KAAK,EACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAA0B,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,eAAO,MAAM,eAAe,UACnB,KAAK,YACF,0BAA0B,KAAK,CAAC,YAChC,MAAM,SAAS,CAAC,mBAAmB,CAAC;sBAKrB,MAAM,YAAY,KAAK;yBAOpB,MAAM;;yBASN,KAAK;iCAKG,aAAa;CAUlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAc,iBAAiB,KAAG,kBAAkB,EAQnF,CAAC;AAQF,eAAO,MAAM,SAAS,kBACL,MAAM,sIAEK,OAAO,KAChC,UA6CF,CAAC;AAEF,eAAO,MAAM,kBAAkB,sBACV,iBAAiB,oBAClB,SAAS,eAAe,EAAE,yEAG7C,CAAC;AAEF,UAAU,WAAW,CAAC,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,UAAU,yBAA0B,SAAQ,gBAAgB,CAAC,MAAM;IACjE,UAAU,EAAE,MAAM,CAAC;CACpB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C,oBA0BvE;AAED,eAAO,MAAM,qBAAqB,eACpB,UAAU,oBACJ,SAAS,eAAe,EAAE,uBACvB,SAAS,iBAAiB,EAAE,oBAC/B,SAAS,SAAS,EAAE,eACzB,WAAW;;;;;;;;;;;;;;;;;CAqEzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,kBAAkB,eAAe,WAAW,WAY3F,CAAC"}
@@ -128,7 +128,7 @@ export var getAllValueSuggestions = function (filteringOptions, filteringPropert
128
128
  }
129
129
  var propertyGroup = property.group ? customGroups[property.group] : defaultGroup;
130
130
  propertyGroup.options.push({
131
- tokenValue: property.propertyLabel + (operator || '=') + filteringOption.value,
131
+ value: property.propertyLabel + ' ' + (operator || '=') + ' ' + filteringOption.value,
132
132
  label: filteringOption.value,
133
133
  __labelPrefix: property.propertyLabel + ' ' + (operator || '=')
134
134
  });
@@ -181,6 +181,7 @@ export function createPropertiesCompatibilityMap(filteringProperties) {
181
181
  }
182
182
  var filteringPropertyToAutosuggestOption = function (filteringProperty) { return ({
183
183
  value: filteringProperty.propertyLabel,
184
+ label: filteringProperty.propertyLabel,
184
185
  keepOpenOnSelect: true
185
186
  }); };
186
187
  export function getPropertySuggestions(filteringProperties, customGroupsText, i18nStrings, filteringPropertyToOption) {
@@ -217,7 +218,7 @@ export var getAutosuggestOptions = function (parsedText, filteringOptions, filte
217
218
  options: options.map(function (_a) {
218
219
  var value = _a.value;
219
220
  return ({
220
- tokenValue: propertyLabel_1 + parsedText.operator + value,
221
+ value: propertyLabel_1 + ' ' + parsedText.operator + ' ' + value,
221
222
  label: value,
222
223
  __labelPrefix: propertyLabel_1 + ' ' + parsedText.operator
223
224
  });