@cloudscape-design/components-themeable 3.0.1090 → 3.0.1092

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 (57) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/internal/components/option/styles.scss +0 -4
  3. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  4. package/lib/internal/template/badge/index.d.ts.map +1 -1
  5. package/lib/internal/template/badge/index.js +1 -1
  6. package/lib/internal/template/badge/index.js.map +1 -1
  7. package/lib/internal/template/box/interfaces.d.ts +15 -0
  8. package/lib/internal/template/box/interfaces.d.ts.map +1 -1
  9. package/lib/internal/template/box/interfaces.js.map +1 -1
  10. package/lib/internal/template/box/internal.d.ts +1 -1
  11. package/lib/internal/template/box/internal.d.ts.map +1 -1
  12. package/lib/internal/template/box/internal.js +3 -5
  13. package/lib/internal/template/box/internal.js.map +1 -1
  14. package/lib/internal/template/button/internal.d.ts.map +1 -1
  15. package/lib/internal/template/button/internal.js +3 -3
  16. package/lib/internal/template/button/internal.js.map +1 -1
  17. package/lib/internal/template/button-dropdown/utils/create-items-tree.d.ts +1 -1
  18. package/lib/internal/template/button-dropdown/utils/create-items-tree.d.ts.map +1 -1
  19. package/lib/internal/template/button-dropdown/utils/create-items-tree.js +11 -2
  20. package/lib/internal/template/button-dropdown/utils/create-items-tree.js.map +1 -1
  21. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  22. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js +14 -7
  23. package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  24. package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.d.ts +1 -1
  25. package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
  26. package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.js +2 -2
  27. package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
  28. package/lib/internal/template/checkbox/internal.d.ts.map +1 -1
  29. package/lib/internal/template/checkbox/internal.js +1 -1
  30. package/lib/internal/template/checkbox/internal.js.map +1 -1
  31. package/lib/internal/template/icon/internal.d.ts.map +1 -1
  32. package/lib/internal/template/icon/internal.js +3 -3
  33. package/lib/internal/template/icon/internal.js.map +1 -1
  34. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -3
  35. package/lib/internal/template/internal/components/option/index.js +1 -1
  36. package/lib/internal/template/internal/components/option/index.js.map +1 -1
  37. package/lib/internal/template/internal/components/option/option-parts.js +1 -1
  38. package/lib/internal/template/internal/components/option/option-parts.js.map +1 -1
  39. package/lib/internal/template/internal/components/option/styles.css.js +16 -17
  40. package/lib/internal/template/internal/components/option/styles.scoped.css +28 -32
  41. package/lib/internal/template/internal/components/option/styles.selectors.js +16 -17
  42. package/lib/internal/template/internal/environment.js +2 -2
  43. package/lib/internal/template/internal/environment.json +2 -2
  44. package/lib/internal/template/internal/utils/with-native-attributes.d.ts +1 -0
  45. package/lib/internal/template/internal/utils/with-native-attributes.d.ts.map +1 -1
  46. package/lib/internal/template/internal/utils/with-native-attributes.js +2 -2
  47. package/lib/internal/template/internal/utils/with-native-attributes.js.map +1 -1
  48. package/lib/internal/template/space-between/interfaces.d.ts +15 -0
  49. package/lib/internal/template/space-between/interfaces.d.ts.map +1 -1
  50. package/lib/internal/template/space-between/interfaces.js.map +1 -1
  51. package/lib/internal/template/space-between/internal.d.ts.map +1 -1
  52. package/lib/internal/template/space-between/internal.js +3 -2
  53. package/lib/internal/template/space-between/internal.js.map +1 -1
  54. package/lib/internal/template/spinner/internal.d.ts.map +1 -1
  55. package/lib/internal/template/spinner/internal.js +1 -1
  56. package/lib/internal/template/spinner/internal.js.map +1 -1
  57. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"with-native-attributes.js","sourceRoot":"","sources":["../../../../src/internal/utils/with-native-attributes.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC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QAAQ,EAAE,gCAAgC,GAAG,yCAAyC,CAAC,CAAC;aAClG;YACD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAClB;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAS,CAAC,CAAC;IAEd,OAAO,CACL,oBAAC,GAAG,oBAAK,IAAI,EAAM,mBAAmB,IAAE,GAAG,EAAE,GAAG,KAC7C,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport type NativeAttributes<T extends React.HTMLAttributes<HTMLElement>> =\n | (Omit<T, 'children'> & Record<`data-${string}`, string>)\n | undefined;\n\ntype NativeAttributesProps<AT extends React.HTMLAttributes<HTMLElement>> = {\n tag: string;\n children?: ReactNode;\n skipWarnings?: boolean;\n nativeAttributes: NativeAttributes<AT>;\n} & NativeAttributes<AT>;\ninterface ForwardRefType {\n <ET extends HTMLElement, AT extends React.HTMLAttributes<ET>>(\n props: NativeAttributesProps<AT> & { ref?: React.Ref<ET> }\n ): JSX.Element;\n}\n\nexport default React.forwardRef(\n <ET extends HTMLElement, AT extends React.HTMLAttributes<ET>>(\n { tag, nativeAttributes, children, skipWarnings, ...rest }: NativeAttributesProps<AT>,\n ref: React.Ref<ET>\n ) => {\n const Tag = tag;\n\n const processedAttributes = Object.entries(nativeAttributes || {}).reduce((acc, [key, value]) => {\n // concatenate className\n if (key === 'className') {\n acc[key] = clsx(rest.className, value);\n\n // merge style\n } else if (key === 'style') {\n acc[key] = { ...rest.style, ...value };\n\n // chain event handlers\n } else if (key.match(/^on[A-Z]/) && typeof value === 'function' && key in rest) {\n acc[key] = (event: Event) => {\n value(event);\n if (!event.defaultPrevented) {\n (rest as any)[key](event);\n }\n };\n\n // override other attributes, warning if it already exists\n } else {\n if (key in rest && !skipWarnings) {\n warnOnce('Button', `Overriding native attribute [${key}] which has a Cloudscape-provided value`);\n }\n acc[key] = value;\n }\n return acc;\n }, {} as any);\n\n return (\n <Tag {...rest} {...processedAttributes} ref={ref}>\n {children}\n </Tag>\n );\n }\n) as ForwardRefType;\n"]}
1
+ {"version":3,"file":"with-native-attributes.js","sourceRoot":"","sources":["../../../../src/internal/utils/with-native-attributes.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAmBzE,eAAe,KAAK,CAAC,UAAU,CAC7B,CACE,EAAoG,EACpG,GAAkB,EAClB,EAAE;QAFF,EAAE,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,OAAsC,EAAjC,IAAI,cAAvE,wEAAyE,CAAF;IAGvE,MAAM,GAAG,GAAG,GAAG,CAAC;IAEhB,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9F,wBAAwB;QACxB,IAAI,GAAG,KAAK,WAAW,EAAE;YACvB,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAEvC,cAAc;SACf;aAAM,IAAI,GAAG,KAAK,OAAO,EAAE;YAC1B,GAAG,CAAC,GAAG,CAAC,mCAAQ,IAAI,CAAC,KAAK,GAAK,KAAK,CAAE,CAAC;YAEvC,uBAAuB;SACxB;aAAM,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,GAAG,IAAI,IAAI,EAAE;YAC9E,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAY,EAAE,EAAE;gBAC1B,KAAK,CAAC,KAAK,CAAC,CAAC;gBACb,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;oBAC1B,IAAY,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC;YAEF,0DAA0D;SAC3D;aAAM;YACL,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE;gBAChC,QAAQ,CAAC,aAAa,EAAE,gCAAgC,GAAG,yCAAyC,CAAC,CAAC;aACvG;YACD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAClB;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAS,CAAC,CAAC;IAEd,OAAO,CACL,oBAAC,GAAG,oBAAK,IAAI,EAAM,mBAAmB,IAAE,GAAG,EAAE,GAAG,KAC7C,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport type NativeAttributes<T extends React.HTMLAttributes<HTMLElement>> =\n | (Omit<T, 'children'> & Record<`data-${string}`, string>)\n | undefined;\n\ntype NativeAttributesProps<AT extends React.HTMLAttributes<HTMLElement>> = {\n tag: string;\n children?: ReactNode;\n skipWarnings?: boolean;\n nativeAttributes: NativeAttributes<AT>;\n componentName: string;\n} & NativeAttributes<AT>;\ninterface ForwardRefType {\n <ET extends HTMLElement, AT extends React.HTMLAttributes<ET>>(\n props: NativeAttributesProps<AT> & { ref?: React.Ref<ET> }\n ): JSX.Element;\n}\n\nexport default React.forwardRef(\n <ET extends HTMLElement, AT extends React.HTMLAttributes<ET>>(\n { tag, nativeAttributes, children, skipWarnings, componentName, ...rest }: NativeAttributesProps<AT>,\n ref: React.Ref<ET>\n ) => {\n const Tag = tag;\n\n const processedAttributes = Object.entries(nativeAttributes || {}).reduce((acc, [key, value]) => {\n // concatenate className\n if (key === 'className') {\n acc[key] = clsx(rest.className, value);\n\n // merge style\n } else if (key === 'style') {\n acc[key] = { ...rest.style, ...value };\n\n // chain event handlers\n } else if (key.match(/^on[A-Z]/) && typeof value === 'function' && key in rest) {\n acc[key] = (event: Event) => {\n value(event);\n if (!event.defaultPrevented) {\n (rest as any)[key](event);\n }\n };\n\n // override other attributes, warning if it already exists\n } else {\n if (key in rest && !skipWarnings) {\n warnOnce(componentName, `Overriding native attribute [${key}] which has a Cloudscape-provided value`);\n }\n acc[key] = value;\n }\n return acc;\n }, {} as any);\n\n return (\n <Tag {...rest} {...processedAttributes} ref={ref}>\n {children}\n </Tag>\n );\n }\n) as ForwardRefType;\n"]}
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseComponentProps } from '../internal/base-component';
3
+ /**
4
+ * @awsuiSystem core
5
+ */
6
+ import { NativeAttributes } from '../internal/utils/with-native-attributes';
3
7
  export interface SpaceBetweenProps extends BaseComponentProps {
4
8
  /**
5
9
  * Defines the direction in which the content is laid out.
@@ -17,6 +21,17 @@ export interface SpaceBetweenProps extends BaseComponentProps {
17
21
  * Determines how the child elements will be aligned based on the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property of the CSS Flexbox.
18
22
  */
19
23
  alignItems?: SpaceBetweenProps.AlignItems;
24
+ /**
25
+ * Attributes to add to the native element.
26
+ * Some attributes will be automatically combined with internal attribute values:
27
+ * - `className` will be appended.
28
+ * - Event handlers will be chained, unless the default is prevented.
29
+ *
30
+ * We do not support using this attribute to apply custom styling.
31
+ *
32
+ * @awsuiSystem core
33
+ */
34
+ nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLDivElement>>;
20
35
  }
21
36
  export declare namespace SpaceBetweenProps {
22
37
  type Direction = 'vertical' | 'horizontal';
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/space-between/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;OAEG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC;CAC3C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;IAElD,KAAY,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAE1E,KAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;CACrD"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/space-between/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;OAEG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC;IAE1C;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;CAC3E;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;IAElD,KAAY,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAE1E,KAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;CACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/space-between/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SpaceBetweenProps extends BaseComponentProps {\n /**\n * Defines the direction in which the content is laid out.\n */\n direction?: SpaceBetweenProps.Direction;\n\n /**\n * Defines the spacing between the individual items of the content.\n */\n size: SpaceBetweenProps.Size;\n\n /**\n * Content of this component.\n */\n children?: React.ReactNode;\n\n /**\n * Determines how the child elements will be aligned based on the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property of the CSS Flexbox.\n */\n alignItems?: SpaceBetweenProps.AlignItems;\n}\n\nexport namespace SpaceBetweenProps {\n export type Direction = 'vertical' | 'horizontal';\n\n export type Size = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type AlignItems = 'center' | 'start' | 'end';\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/space-between/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../internal/utils/with-native-attributes';\n\nexport interface SpaceBetweenProps extends BaseComponentProps {\n /**\n * Defines the direction in which the content is laid out.\n */\n direction?: SpaceBetweenProps.Direction;\n\n /**\n * Defines the spacing between the individual items of the content.\n */\n size: SpaceBetweenProps.Size;\n\n /**\n * Content of this component.\n */\n children?: React.ReactNode;\n\n /**\n * Determines how the child elements will be aligned based on the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property of the CSS Flexbox.\n */\n alignItems?: SpaceBetweenProps.AlignItems;\n\n /**\n * Attributes to add to the native element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeAttributes?: NativeAttributes<React.HTMLAttributes<HTMLDivElement>>;\n}\n\nexport namespace SpaceBetweenProps {\n export type Direction = 'vertical' | 'horizontal';\n\n export type Size = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type AlignItems = 'center' | 'start' | 'end';\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/space-between/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjD,QAAA,MAAM,oBAAoB,uHAqCzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/space-between/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMjD,QAAA,MAAM,oBAAoB,uHAgDzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -6,16 +6,17 @@ import flattenChildren from 'react-keyed-flatten-children';
6
6
  import clsx from 'clsx';
7
7
  import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
8
8
  import { getBaseProps } from '../internal/base-component';
9
+ import WithNativeAttributes from '../internal/utils/with-native-attributes';
9
10
  import styles from './styles.css.js';
10
11
  const InternalSpaceBetween = forwardRef((_a, ref) => {
11
- var { direction = 'vertical', size, children, alignItems, __internalRootRef } = _a, props = __rest(_a, ["direction", "size", "children", "alignItems", "__internalRootRef"]);
12
+ var { direction = 'vertical', size, children, alignItems, nativeAttributes, __internalRootRef } = _a, props = __rest(_a, ["direction", "size", "children", "alignItems", "nativeAttributes", "__internalRootRef"]);
12
13
  const mergedRef = useMergeRefs(ref, __internalRootRef);
13
14
  const baseProps = getBaseProps(props);
14
15
  /*
15
16
  Flattening the children allows us to "see through" React Fragments and nested arrays.
16
17
  */
17
18
  const flattenedChildren = flattenChildren(children);
18
- return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles[direction], styles[`${direction}-${size}`], alignItems && styles[`align-${alignItems}`]), ref: mergedRef }), flattenedChildren.map(child => {
19
+ return (React.createElement(WithNativeAttributes, Object.assign({}, baseProps, { tag: "div", componentName: "SpaceBetween", nativeAttributes: nativeAttributes, className: clsx(baseProps.className, styles.root, styles[direction], styles[`${direction}-${size}`], alignItems && styles[`align-${alignItems}`]), ref: mergedRef }), flattenedChildren.map(child => {
19
20
  const key = typeof child === 'object' ? child.key : undefined;
20
21
  return (React.createElement("div", { key: key, className: styles.child }, child));
21
22
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/space-between/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,eAAe,MAAM,8BAA8B,CAAC;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or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SpaceBetweenProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalSpaceBetweenProps = SpaceBetweenProps & InternalBaseComponentProps;\n\nconst InternalSpaceBetween = forwardRef(\n (\n { direction = 'vertical', size, children, alignItems, __internalRootRef, ...props }: InternalSpaceBetweenProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n const mergedRef = useMergeRefs(ref, __internalRootRef);\n const baseProps = getBaseProps(props);\n\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[direction],\n styles[`${direction}-${size}`],\n alignItems && styles[`align-${alignItems}`]\n )}\n ref={mergedRef}\n >\n {flattenedChildren.map(child => {\n const key = typeof child === 'object' ? child.key : undefined;\n\n return (\n <div key={key} className={styles.child}>\n {child}\n </div>\n );\n })}\n </div>\n );\n }\n);\n\nexport default InternalSpaceBetween;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/space-between/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAG5E,OA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React, { forwardRef } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport { SpaceBetweenProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalSpaceBetweenProps = SpaceBetweenProps & InternalBaseComponentProps;\n\nconst InternalSpaceBetween = forwardRef(\n (\n {\n direction = 'vertical',\n size,\n children,\n alignItems,\n nativeAttributes,\n __internalRootRef,\n ...props\n }: InternalSpaceBetweenProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n const mergedRef = useMergeRefs(ref, __internalRootRef);\n const baseProps = getBaseProps(props);\n\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children);\n\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"div\"\n componentName=\"SpaceBetween\"\n nativeAttributes={nativeAttributes}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[direction],\n styles[`${direction}-${size}`],\n alignItems && styles[`align-${alignItems}`]\n )}\n ref={mergedRef}\n >\n {flattenedChildren.map(child => {\n const key = typeof child === 'object' ? child.key : undefined;\n\n return (\n <div key={key} className={styles.child}>\n {child}\n </div>\n );\n })}\n </WithNativeAttributes>\n );\n }\n);\n\nexport default InternalSpaceBetween;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/spinner/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,UAAU,oBAAqB,SAAQ,YAAY,EAAE,0BAA0B;CAAG;AAElF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,IAAe,EACf,OAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,oBAAoB,eAetB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/spinner/internal.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,UAAU,oBAAqB,SAAQ,YAAY,EAAE,0BAA0B;CAAG;AAElF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,IAAe,EACf,OAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,oBAAoB,eAgBtB"}
@@ -11,7 +11,7 @@ export default function InternalSpinner(_a) {
11
11
  var { size = 'normal', variant = 'normal', nativeAttributes, __internalRootRef } = _a, props = __rest(_a, ["size", "variant", "nativeAttributes", "__internalRootRef"]);
12
12
  const baseProps = getBaseProps(props);
13
13
  useModalContextLoadingComponent();
14
- return (React.createElement(WithNativeAttributes, Object.assign({}, baseProps, { tag: "span", nativeAttributes: nativeAttributes, className: clsx(baseProps.className, styles.root, styles[`size-${size}`], styles[`variant-${variant}`]), ref: __internalRootRef }),
14
+ return (React.createElement(WithNativeAttributes, Object.assign({}, baseProps, { tag: "span", componentName: "Spinner", nativeAttributes: nativeAttributes, className: clsx(baseProps.className, styles.root, styles[`size-${size}`], styles[`variant-${variant}`]), ref: __internalRootRef }),
15
15
  React.createElement("span", { className: clsx(styles.circle, styles['circle-left']) }),
16
16
  React.createElement("span", { className: clsx(styles.circle, styles['circle-right']) })));
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/spinner/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAMjB;QANiB,EACtC,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,QAAQ,EAClB,gBAAgB,EAChB,iBAAiB,OAEI,EADlB,KAAK,cAL8B,4DAMvC,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,+BAA+B,EAAE,CAAC;IAClC,OAAO,CACL,oBAAC,oBAAoB,oBACf,SAAS,IACb,GAAG,EAAC,MAAM,EACV,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,CAAC,EACvG,GAAG,EAAE,iBAAiB;QAEtB,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,GAAI;QAC/D,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,GAAI,CAC3C,CACxB,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 { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useModalContextLoadingComponent } from '../internal/hooks/use-modal-component-analytics';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport { SpinnerProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface InternalSpinnerProps extends SpinnerProps, InternalBaseComponentProps {}\n\nexport default function InternalSpinner({\n size = 'normal',\n variant = 'normal',\n nativeAttributes,\n __internalRootRef,\n ...props\n}: InternalSpinnerProps) {\n const baseProps = getBaseProps(props);\n useModalContextLoadingComponent();\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n nativeAttributes={nativeAttributes}\n className={clsx(baseProps.className, styles.root, styles[`size-${size}`], styles[`variant-${variant}`])}\n ref={__internalRootRef}\n >\n <span className={clsx(styles.circle, styles['circle-left'])} />\n <span className={clsx(styles.circle, styles['circle-right'])} />\n </WithNativeAttributes>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/spinner/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,oBAAoB,MAAM,0CAA0C,CAAC;AAG5E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAMjB;QANiB,EACtC,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,QAAQ,EAClB,gBAAgB,EAChB,iBAAiB,OAEI,EADlB,KAAK,cAL8B,4DAMvC,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,+BAA+B,EAAE,CAAC;IAClC,OAAO,CACL,oBAAC,oBAAoB,oBACf,SAAS,IACb,GAAG,EAAC,MAAM,EACV,aAAa,EAAC,SAAS,EACvB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,WAAW,OAAO,EAAE,CAAC,CAAC,EACvG,GAAG,EAAE,iBAAiB;QAEtB,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,GAAI;QAC/D,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,GAAI,CAC3C,CACxB,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 { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useModalContextLoadingComponent } from '../internal/hooks/use-modal-component-analytics';\nimport WithNativeAttributes from '../internal/utils/with-native-attributes';\nimport { SpinnerProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface InternalSpinnerProps extends SpinnerProps, InternalBaseComponentProps {}\n\nexport default function InternalSpinner({\n size = 'normal',\n variant = 'normal',\n nativeAttributes,\n __internalRootRef,\n ...props\n}: InternalSpinnerProps) {\n const baseProps = getBaseProps(props);\n useModalContextLoadingComponent();\n return (\n <WithNativeAttributes\n {...baseProps}\n tag=\"span\"\n componentName=\"Spinner\"\n nativeAttributes={nativeAttributes}\n className={clsx(baseProps.className, styles.root, styles[`size-${size}`], styles[`variant-${variant}`])}\n ref={__internalRootRef}\n >\n <span className={clsx(styles.circle, styles['circle-left'])} />\n <span className={clsx(styles.circle, styles['circle-right'])} />\n </WithNativeAttributes>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/components-themeable",
3
- "version": "3.0.1090",
3
+ "version": "3.0.1092",
4
4
  "files": [
5
5
  "lib"
6
6
  ],