@cloudscape-design/components 3.0.1082 → 3.0.1083
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/index.d.ts.map +1 -1
- package/badge/internal-do-not-use-core.js +1 -1
- package/badge/internal-do-not-use-core.js.map +1 -1
- package/box/index.js +13 -20
- package/box/interfaces.d.ts +14 -0
- package/box/interfaces.d.ts.map +1 -1
- package/box/interfaces.js.map +1 -1
- package/box/internal-do-not-use-core.js +25 -0
- package/box/internal.d.ts +1 -0
- package/box/internal.d.ts.map +1 -1
- package/box/internal.js +3 -5
- package/box/internal.js.map +1 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +3 -3
- package/button/internal.js.map +1 -1
- package/checkbox/internal.d.ts.map +1 -1
- package/checkbox/internal.js +1 -1
- package/checkbox/internal.js.map +1 -1
- package/icon/internal.d.ts.map +1 -1
- package/icon/internal.js +3 -3
- package/icon/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -2
- package/internal/components/option/index.js +1 -1
- package/internal/components/option/index.js.map +1 -1
- package/internal/components/option/option-parts.js +1 -1
- package/internal/components/option/option-parts.js.map +1 -1
- package/internal/components/option/styles.css.js +16 -17
- package/internal/components/option/styles.scoped.css +28 -32
- package/internal/components/option/styles.selectors.js +16 -17
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/internal/utils/with-native-attributes.d.ts +1 -0
- package/internal/utils/with-native-attributes.d.ts.map +1 -1
- package/internal/utils/with-native-attributes.js +2 -2
- package/internal/utils/with-native-attributes.js.map +1 -1
- package/package.json +1 -1
- package/space-between/index.js +13 -12
- package/space-between/interfaces.d.ts +14 -0
- package/space-between/interfaces.d.ts.map +1 -1
- package/space-between/interfaces.js.map +1 -1
- package/space-between/internal-do-not-use-core.js +17 -0
- package/space-between/internal.d.ts.map +1 -1
- package/space-between/internal.js +3 -2
- package/space-between/internal.js.map +1 -1
- package/spinner/internal.d.ts.map +1 -1
- package/spinner/internal.js +1 -1
- package/spinner/internal.js.map +1 -1
- /package/box/{index.js.map → internal-do-not-use-core.js.map} +0 -0
- /package/space-between/{index.js.map → internal-do-not-use-core.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE/F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,SAAS,mBAAmB,CAAC,KAAyB,EAAE,YAAoB;IAC1E,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7D,QAAQ,CACN,gBAAgB,EAChB,2DAA2D,YAAY,SAAS,OAAO,KAAK,4CAA4C,CACzI,CAAC;KACH;AACH,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,EASF,EAAE,EAAE;;QATF,EACd,MAAM,EACN,aAAa,EACb,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,KAAK,EACrB,cAAc,GAAG,IAAI,EACrB,iBAAiB,GAAG,KAAK,EACzB,cAAc,GAAG,KAAK,OAEV,EADT,SAAS,cARE,uHASf,CADa;IAEZ,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IACD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC5B,MAAM,SAAS,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MAAM,CAAC,KAAK,mCAAI,MAAM,CAAC,KAAK,EACnC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B;gBACF,oBAAC,QAAQ,IAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,GAAI,CAChG;YACP,oBAAC,WAAW,IACV,WAAW,EAAE,MAAM,CAAC,WAAW,EAC/B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B;YACF,oBAAC,IAAI,IACH,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B;YACF,oBAAC,aAAa,IACZ,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,GAC9B,CACG,CACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,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 { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../../base-component';\nimport { isDevelopment } from '../../is-development';\nimport { OptionProps } from './interfaces';\nimport { Description, FilteringTags, Label, LabelTag, OptionIcon, Tags } from './option-parts';\n\nimport styles from './styles.css.js';\n\nexport { OptionProps };\n\nfunction validateStringValue(value: string | undefined, propertyName: string) {\n if (typeof value !== 'undefined' && typeof value !== 'string') {\n warnOnce(\n 'DropdownOption',\n `This component only supports string values, but \"option.${propertyName}\" has ${typeof value} type. The component may work incorrectly.`\n );\n }\n}\n\nconst Option = ({\n option,\n highlightText,\n triggerVariant = false,\n isGroupOption = false,\n isGenericGroup = true,\n highlightedOption = false,\n selectedOption = false,\n ...restProps\n}: OptionProps) => {\n if (!option) {\n return null;\n }\n const { disabled } = option;\n const baseProps = getBaseProps(restProps);\n\n if (isDevelopment) {\n validateStringValue(option.label, 'label');\n validateStringValue(option.description, 'description');\n validateStringValue(option.labelTag, 'labelTag');\n option.tags?.forEach((tag, index) => {\n validateStringValue(tag, `tags[${index}]`);\n });\n option.filteringTags?.forEach((tag, index) => {\n validateStringValue(tag, `filteringTags[${index}]`);\n });\n }\n\n const className = clsx(\n styles.option,\n disabled && styles.disabled,\n isGroupOption && styles.parent,\n highlightedOption && styles.highlighted\n );\n\n const icon = option.__customIcon || (\n <OptionIcon\n name={option.iconName}\n url={option.iconUrl}\n svg={option.iconSvg}\n alt={option.iconAlt}\n ariaLabel={option.iconAriaLabel}\n size=\"normal\"\n />\n );\n\n // The option is conditionally assigned 'title' and 'aria-disabled' attributes to ensure it is viewed as a (generic) group by assistive technology only when necessary.\n // Omitting the props might be necessary if they are provided on the parent element to avoid nested groups.\n // See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/generic_role\n const genericGroupProps = isGenericGroup\n ? {\n title: option.label ?? option.value,\n 'aria-disabled': disabled,\n }\n : undefined;\n\n return (\n <span data-value={option.value} className={className} lang={option.lang} {...genericGroupProps} {...baseProps}>\n {icon}\n <span className={styles.content}>\n <span className={styles['label-content']}>\n <Label\n label={option.label ?? option.value}\n prefix={option.__labelPrefix}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n <LabelTag labelTag={option.labelTag} highlightText={highlightText} triggerVariant={triggerVariant} />\n </span>\n <Description\n description={option.description}\n highlightedOption={highlightedOption}\n selectedOption={selectedOption}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n <Tags\n tags={option.tags}\n highlightedOption={highlightedOption}\n selectedOption={selectedOption}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n <FilteringTags\n filteringTags={option.filteringTags}\n highlightedOption={highlightedOption}\n selectedOption={selectedOption}\n highlightText={highlightText}\n triggerVariant={triggerVariant}\n />\n </span>\n </span>\n );\n};\n\nexport default Option;\n"]}
|
|
@@ -45,7 +45,7 @@ export const OptionIcon = (props) => {
|
|
|
45
45
|
if (!props.name && !props.url && !props.svg) {
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
|
-
return (React.createElement("span", { className:
|
|
48
|
+
return (React.createElement("span", { className: styles.icon },
|
|
49
49
|
React.createElement(InternalIcon, Object.assign({}, props))));
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=option-parts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-parts.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/option-parts.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAc,EAAE,EAAE,CAAC,CACrF,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvG,MAAM,IAAI,CACT,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAAG,MAAM;YAAS,C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CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAgB,EAAE,EAAE;IAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,8BAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"option-parts.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/option-parts.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAQrC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAc,EAAE,EAAE,CAAC,CACrF,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvG,MAAM,IAAI,CACT,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,cAAc,IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAAG,MAAM;YAAS,CAC7G;IACD,oBAAC,cAAc,IAAC,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,CACvD,CACR,CAAC;AAOF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,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,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,IAAI;QAC1B,oBAAC,YAAY,oBAAK,KAAK,EAAI,CACtB,CACR,CAAC;AACJ,CAAC,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 { IconProps } from '../../../icon/interfaces';\nimport InternalIcon from '../../../icon/internal';\nimport HighlightMatch from './highlight-match';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\ninterface LabelProps {\n label?: string;\n prefix?: string;\n highlightText?: string;\n triggerVariant: boolean;\n}\nexport const Label = ({ label, prefix, highlightText, triggerVariant }: LabelProps) => (\n <span className={clsx(styles.label, analyticsSelectors.label, triggerVariant && styles['trigger-variant'])}>\n {prefix && (\n <span className={clsx(styles['label-prefix'], triggerVariant && styles['trigger-variant'])}>{prefix} </span>\n )}\n <HighlightMatch str={label} highlightText={highlightText} />\n </span>\n);\n\ninterface LabelTagProps {\n labelTag?: string;\n highlightText?: string;\n triggerVariant: boolean;\n}\nexport const LabelTag = ({ labelTag, highlightText, triggerVariant }: LabelTagProps) =>\n labelTag ? (\n <span className={clsx(styles['label-tag'], triggerVariant && styles['trigger-variant'])}>\n <HighlightMatch str={labelTag} highlightText={highlightText} />\n </span>\n ) : null;\n\ninterface DescriptionProps {\n description?: string;\n highlightedOption: boolean;\n highlightText?: string;\n selectedOption: boolean;\n triggerVariant: boolean;\n}\nexport const Description = ({\n description,\n highlightedOption,\n highlightText,\n selectedOption,\n triggerVariant,\n}: DescriptionProps) =>\n description ? (\n <span\n className={clsx(styles.description, {\n [styles['trigger-variant']]: triggerVariant,\n [styles.highlighted]: highlightedOption,\n [styles.selected]: selectedOption,\n })}\n >\n <HighlightMatch str={description} highlightText={highlightText} />\n </span>\n ) : null;\n\ninterface TagsProps {\n tags?: ReadonlyArray<string>;\n highlightedOption: boolean;\n highlightText?: string;\n selectedOption: boolean;\n triggerVariant: boolean;\n}\nexport const Tags = ({ tags, highlightedOption, highlightText, selectedOption, triggerVariant }: TagsProps) =>\n tags ? (\n <span\n className={clsx(styles.tags, {\n [styles.highlighted]: highlightedOption,\n [styles.selected]: selectedOption,\n })}\n >\n {tags.map((tag, idx) => (\n <span key={idx} className={clsx(styles.tag, triggerVariant && styles['trigger-variant'])}>\n <HighlightMatch str={tag} highlightText={highlightText} />\n </span>\n ))}\n </span>\n ) : null;\n\ninterface FilteringTagProps {\n filteringTags?: ReadonlyArray<string>;\n highlightedOption: boolean;\n highlightText?: string;\n selectedOption: boolean;\n triggerVariant: boolean;\n}\nexport const FilteringTags = ({\n filteringTags,\n highlightedOption,\n highlightText,\n selectedOption,\n triggerVariant,\n}: FilteringTagProps) => {\n if (!highlightText || !filteringTags) {\n return null;\n }\n\n const searchElement = highlightText.toLowerCase();\n\n return (\n <span\n className={clsx(styles.tags, {\n [styles.highlighted]: highlightedOption,\n [styles.selected]: selectedOption,\n })}\n >\n {filteringTags.map((filteringTag, key) => {\n const match = filteringTag.toLowerCase().indexOf(searchElement) !== -1;\n if (match) {\n return (\n <span\n className={clsx(styles.tag, triggerVariant && styles['trigger-variant'])}\n key={key}\n aria-disabled={true}\n >\n <HighlightMatch str={filteringTag} highlightText={highlightText} />\n </span>\n );\n }\n return null;\n })}\n </span>\n );\n};\n\nexport const OptionIcon = (props: IconProps) => {\n if (!props.name && !props.url && !props.svg) {\n return null;\n }\n\n return (\n <span className={styles.icon}>\n <InternalIcon {...props} />\n </span>\n );\n};\n"]}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"option": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"parent": "
|
|
7
|
-
"highlighted": "
|
|
8
|
-
"content": "
|
|
9
|
-
"label-content": "awsui_label-
|
|
10
|
-
"label": "
|
|
11
|
-
"tag": "
|
|
12
|
-
"label-tag": "awsui_label-
|
|
13
|
-
"label-prefix": "awsui_label-
|
|
14
|
-
"tags": "
|
|
15
|
-
"description": "
|
|
16
|
-
"selected": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"trigger-variant": "awsui_trigger-variant_1p2cx_1w5f5_290"
|
|
4
|
+
"option": "awsui_option_1p2cx_ph5rs_153",
|
|
5
|
+
"disabled": "awsui_disabled_1p2cx_ph5rs_190",
|
|
6
|
+
"parent": "awsui_parent_1p2cx_ph5rs_193",
|
|
7
|
+
"highlighted": "awsui_highlighted_1p2cx_ph5rs_196",
|
|
8
|
+
"content": "awsui_content_1p2cx_ph5rs_200",
|
|
9
|
+
"label-content": "awsui_label-content_1p2cx_ph5rs_207",
|
|
10
|
+
"label": "awsui_label_1p2cx_ph5rs_207",
|
|
11
|
+
"tag": "awsui_tag_1p2cx_ph5rs_214",
|
|
12
|
+
"label-tag": "awsui_label-tag_1p2cx_ph5rs_215",
|
|
13
|
+
"label-prefix": "awsui_label-prefix_1p2cx_ph5rs_225",
|
|
14
|
+
"tags": "awsui_tags_1p2cx_ph5rs_238",
|
|
15
|
+
"description": "awsui_description_1p2cx_ph5rs_239",
|
|
16
|
+
"selected": "awsui_selected_1p2cx_ph5rs_250",
|
|
17
|
+
"icon": "awsui_icon_1p2cx_ph5rs_264",
|
|
18
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_ph5rs_271",
|
|
19
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_ph5rs_286"
|
|
21
20
|
};
|
|
22
21
|
|
|
@@ -150,7 +150,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
150
150
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
151
151
|
SPDX-License-Identifier: Apache-2.0
|
|
152
152
|
*/
|
|
153
|
-
.
|
|
153
|
+
.awsui_option_1p2cx_ph5rs_153:not(#\9) {
|
|
154
154
|
border-collapse: separate;
|
|
155
155
|
border-spacing: 0;
|
|
156
156
|
box-sizing: border-box;
|
|
@@ -187,107 +187,103 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
187
187
|
box-sizing: border-box;
|
|
188
188
|
color: inherit;
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_option_1p2cx_ph5rs_153:not(#\9):not(.awsui_disabled_1p2cx_ph5rs_190) {
|
|
191
191
|
cursor: inherit;
|
|
192
192
|
}
|
|
193
|
-
.
|
|
193
|
+
.awsui_option_1p2cx_ph5rs_153.awsui_parent_1p2cx_ph5rs_193:not(#\9) {
|
|
194
194
|
font-weight: bold;
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
.awsui_option_1p2cx_ph5rs_153.awsui_parent_1p2cx_ph5rs_193:not(#\9):not(.awsui_disabled_1p2cx_ph5rs_190):not(.awsui_highlighted_1p2cx_ph5rs_196) {
|
|
197
197
|
color: var(--color-text-dropdown-group-label-2tmyik, #424650);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
.
|
|
200
|
+
.awsui_content_1p2cx_ph5rs_200:not(#\9) {
|
|
201
201
|
inline-size: 100%;
|
|
202
202
|
display: flex;
|
|
203
203
|
flex-direction: column;
|
|
204
204
|
min-inline-size: 0;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.awsui_label-
|
|
207
|
+
.awsui_label-content_1p2cx_ph5rs_207:not(#\9) {
|
|
208
208
|
display: flex;
|
|
209
209
|
justify-content: space-between;
|
|
210
210
|
flex-wrap: wrap;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.
|
|
214
|
-
.
|
|
215
|
-
.awsui_label-
|
|
213
|
+
.awsui_label_1p2cx_ph5rs_207:not(#\9),
|
|
214
|
+
.awsui_tag_1p2cx_ph5rs_214:not(#\9),
|
|
215
|
+
.awsui_label-tag_1p2cx_ph5rs_215:not(#\9) {
|
|
216
216
|
min-inline-size: 0;
|
|
217
217
|
word-break: break-word;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.
|
|
221
|
-
.
|
|
220
|
+
.awsui_label_1p2cx_ph5rs_207:not(#\9),
|
|
221
|
+
.awsui_tag_1p2cx_ph5rs_214:not(#\9) {
|
|
222
222
|
flex-wrap: wrap;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
.awsui_label-
|
|
225
|
+
.awsui_label-prefix_1p2cx_ph5rs_225:not(#\9) {
|
|
226
226
|
font-weight: 700;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
.awsui_label-
|
|
229
|
+
.awsui_label-tag_1p2cx_ph5rs_215:not(#\9) {
|
|
230
230
|
padding-inline-start: var(--space-s-tvghoh, 12px);
|
|
231
231
|
flex: auto;
|
|
232
232
|
text-align: end;
|
|
233
233
|
}
|
|
234
|
-
.awsui_label-
|
|
234
|
+
.awsui_label-tag_1p2cx_ph5rs_215:not(#\9):empty {
|
|
235
235
|
display: none;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.
|
|
239
|
-
.
|
|
238
|
+
.awsui_tags_1p2cx_ph5rs_238:not(#\9),
|
|
239
|
+
.awsui_description_1p2cx_ph5rs_239:not(#\9) {
|
|
240
240
|
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
241
241
|
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
242
242
|
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
243
243
|
color: var(--color-text-dropdown-item-secondary-v12lfh, #656871);
|
|
244
244
|
flex-wrap: wrap;
|
|
245
245
|
}
|
|
246
|
-
.
|
|
247
|
-
.
|
|
246
|
+
.awsui_tags_1p2cx_ph5rs_238.awsui_highlighted_1p2cx_ph5rs_196:not(#\9),
|
|
247
|
+
.awsui_description_1p2cx_ph5rs_239.awsui_highlighted_1p2cx_ph5rs_196:not(#\9) {
|
|
248
248
|
color: var(--color-text-dropdown-item-secondary-hover-de15wb, #656871);
|
|
249
249
|
}
|
|
250
|
-
.
|
|
251
|
-
.
|
|
250
|
+
.awsui_tags_1p2cx_ph5rs_238.awsui_selected_1p2cx_ph5rs_250:not(#\9),
|
|
251
|
+
.awsui_description_1p2cx_ph5rs_239.awsui_selected_1p2cx_ph5rs_250:not(#\9) {
|
|
252
252
|
color: var(--color-text-dropdown-item-secondary-v12lfh, #656871);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
.
|
|
255
|
+
.awsui_tags_1p2cx_ph5rs_238:not(#\9) {
|
|
256
256
|
display: flex;
|
|
257
257
|
align-items: stretch;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
.
|
|
260
|
+
.awsui_tag_1p2cx_ph5rs_214:not(#\9):not(:last-child) {
|
|
261
261
|
padding-inline-end: var(--space-m-dsumyt, 16px);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.
|
|
264
|
+
.awsui_icon_1p2cx_ph5rs_264:not(#\9) {
|
|
265
265
|
padding-inline-end: var(--space-xs-ymlm0b, 8px);
|
|
266
266
|
align-content: center;
|
|
267
267
|
display: flex;
|
|
268
268
|
flex-shrink: 0;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.
|
|
272
|
-
padding-block-start: var(--space-option-icon-big-top-rs5wgf, 0px);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.awsui_filtering-match-highlight_1p2cx_1w5f5_275:not(#\9) {
|
|
271
|
+
.awsui_filtering-match-highlight_1p2cx_ph5rs_271:not(#\9) {
|
|
276
272
|
background-color: var(--color-background-dropdown-item-filter-match-49b5vt, #f0fbff);
|
|
277
273
|
color: var(--color-text-dropdown-item-filter-match-ebhvct, #006ce0);
|
|
278
274
|
font-weight: bold;
|
|
279
275
|
}
|
|
280
276
|
|
|
281
|
-
.
|
|
277
|
+
.awsui_disabled_1p2cx_ph5rs_190:not(#\9) {
|
|
282
278
|
color: var(--color-text-dropdown-item-disabled-8m65hf, #b4b4bb);
|
|
283
279
|
pointer-events: none;
|
|
284
280
|
}
|
|
285
|
-
.
|
|
286
|
-
.
|
|
281
|
+
.awsui_disabled_1p2cx_ph5rs_190 > .awsui_content_1p2cx_ph5rs_200 > .awsui_tags_1p2cx_ph5rs_238:not(#\9),
|
|
282
|
+
.awsui_disabled_1p2cx_ph5rs_190 > .awsui_content_1p2cx_ph5rs_200 > .awsui_description_1p2cx_ph5rs_239:not(#\9) {
|
|
287
283
|
color: currentColor;
|
|
288
284
|
}
|
|
289
285
|
|
|
290
|
-
.awsui_trigger-
|
|
286
|
+
.awsui_trigger-variant_1p2cx_ph5rs_286:not(#\9) {
|
|
291
287
|
white-space: nowrap;
|
|
292
288
|
overflow: hidden;
|
|
293
289
|
text-overflow: ellipsis;
|
|
@@ -2,22 +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
|
-
"option": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"parent": "
|
|
8
|
-
"highlighted": "
|
|
9
|
-
"content": "
|
|
10
|
-
"label-content": "awsui_label-
|
|
11
|
-
"label": "
|
|
12
|
-
"tag": "
|
|
13
|
-
"label-tag": "awsui_label-
|
|
14
|
-
"label-prefix": "awsui_label-
|
|
15
|
-
"tags": "
|
|
16
|
-
"description": "
|
|
17
|
-
"selected": "
|
|
18
|
-
"icon": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"trigger-variant": "awsui_trigger-variant_1p2cx_1w5f5_290"
|
|
5
|
+
"option": "awsui_option_1p2cx_ph5rs_153",
|
|
6
|
+
"disabled": "awsui_disabled_1p2cx_ph5rs_190",
|
|
7
|
+
"parent": "awsui_parent_1p2cx_ph5rs_193",
|
|
8
|
+
"highlighted": "awsui_highlighted_1p2cx_ph5rs_196",
|
|
9
|
+
"content": "awsui_content_1p2cx_ph5rs_200",
|
|
10
|
+
"label-content": "awsui_label-content_1p2cx_ph5rs_207",
|
|
11
|
+
"label": "awsui_label_1p2cx_ph5rs_207",
|
|
12
|
+
"tag": "awsui_tag_1p2cx_ph5rs_214",
|
|
13
|
+
"label-tag": "awsui_label-tag_1p2cx_ph5rs_215",
|
|
14
|
+
"label-prefix": "awsui_label-prefix_1p2cx_ph5rs_225",
|
|
15
|
+
"tags": "awsui_tags_1p2cx_ph5rs_238",
|
|
16
|
+
"description": "awsui_description_1p2cx_ph5rs_239",
|
|
17
|
+
"selected": "awsui_selected_1p2cx_ph5rs_250",
|
|
18
|
+
"icon": "awsui_icon_1p2cx_ph5rs_264",
|
|
19
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_ph5rs_271",
|
|
20
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_ph5rs_286"
|
|
22
21
|
};
|
|
23
22
|
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (52c36f0c)";
|
|
3
|
+
export var GIT_SHA = "52c36f0c";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED
|
@@ -5,6 +5,7 @@ type NativeAttributesProps<AT extends React.HTMLAttributes<HTMLElement>> = {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
skipWarnings?: boolean;
|
|
7
7
|
nativeAttributes: NativeAttributes<AT>;
|
|
8
|
+
componentName: string;
|
|
8
9
|
} & NativeAttributes<AT>;
|
|
9
10
|
interface ForwardRefType {
|
|
10
11
|
<ET extends HTMLElement, AT extends React.HTMLAttributes<ET>>(props: NativeAttributesProps<AT> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-native-attributes.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/with-native-attributes.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,IACpE,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GACxD,SAAS,CAAC;AAEd,KAAK,qBAAqB,CAAC,EAAE,SAAS,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"with-native-attributes.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/with-native-attributes.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,IACpE,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GACxD,SAAS,CAAC;AAEd,KAAK,qBAAqB,CAAC,EAAE,SAAS,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACvC,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACzB,UAAU,cAAc;IACtB,CAAC,EAAE,SAAS,WAAW,EAAE,EAAE,SAAS,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC,EAC1D,KAAK,EAAE,qBAAqB,CAAC,EAAE,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;KAAE,GACzD,GAAG,CAAC,OAAO,CAAC;CAChB;;AAED,wBAyCoB"}
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
7
7
|
export default React.forwardRef((_a, ref) => {
|
|
8
|
-
var { tag, nativeAttributes, children, skipWarnings } = _a, rest = __rest(_a, ["tag", "nativeAttributes", "children", "skipWarnings"]);
|
|
8
|
+
var { tag, nativeAttributes, children, skipWarnings, componentName } = _a, rest = __rest(_a, ["tag", "nativeAttributes", "children", "skipWarnings", "componentName"]);
|
|
9
9
|
const Tag = tag;
|
|
10
10
|
const processedAttributes = Object.entries(nativeAttributes || {}).reduce((acc, [key, value]) => {
|
|
11
11
|
// concatenate className
|
|
@@ -28,7 +28,7 @@ export default React.forwardRef((_a, ref) => {
|
|
|
28
28
|
}
|
|
29
29
|
else {
|
|
30
30
|
if (key in rest && !skipWarnings) {
|
|
31
|
-
warnOnce(
|
|
31
|
+
warnOnce(componentName, `Overriding native attribute [${key}] which has a Cloudscape-provided value`);
|
|
32
32
|
}
|
|
33
33
|
acc[key] = value;
|
|
34
34
|
}
|
|
@@ -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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1B,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"]}
|
package/package.json
CHANGED
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"./internal/base-component/index.js",
|
|
151
151
|
"./internal/base-component/styles.css.js"
|
|
152
152
|
],
|
|
153
|
-
"version": "3.0.
|
|
153
|
+
"version": "3.0.1083",
|
|
154
154
|
"repository": {
|
|
155
155
|
"type": "git",
|
|
156
156
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/space-between/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import { __rest } from "tslib";
|
|
5
3
|
import React from 'react';
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
import CoreComponent from './internal-do-not-use-core';
|
|
7
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
return React.createElement(
|
|
15
|
-
}
|
|
7
|
+
import { validateProps } from '@cloudscape-design/component-toolkit/internal';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const SpaceBetween = (props) => {
|
|
12
|
+
validateProps('SpaceBetween', props, ["nativeAttributes"], {}, 'console');
|
|
13
|
+
return React.createElement(CoreComponent, props);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
|
|
16
17
|
applyDisplayName(SpaceBetween, 'SpaceBetween');
|
|
17
|
-
|
|
18
|
+
export default SpaceBetween;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseComponentProps } from '../internal/base-component';
|
|
3
|
+
/**
|
|
4
|
+
* @awsuiSystem core
|
|
5
|
+
*/
|
|
6
|
+
|
|
3
7
|
export interface SpaceBetweenProps extends BaseComponentProps {
|
|
4
8
|
/**
|
|
5
9
|
* Defines the direction in which the content is laid out.
|
|
@@ -17,6 +21,16 @@ 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
|
+
*/
|
|
20
34
|
}
|
|
21
35
|
export declare namespace SpaceBetweenProps {
|
|
22
36
|
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;
|
|
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"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
4
|
+
import { __rest } from "tslib";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
+
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
+
import InternalSpaceBetween from './internal';
|
|
9
|
+
export default function SpaceBetween(_a) {
|
|
10
|
+
var { direction = 'vertical' } = _a, props = __rest(_a, ["direction"]);
|
|
11
|
+
const baseComponentProps = useBaseComponent('SpaceBetween', {
|
|
12
|
+
props: { alignItems: props.alignItems, direction, size: props.size },
|
|
13
|
+
});
|
|
14
|
+
return React.createElement(InternalSpaceBetween, Object.assign({ direction: direction }, props, baseComponentProps));
|
|
15
|
+
}
|
|
16
|
+
applyDisplayName(SpaceBetween, 'SpaceBetween');
|
|
17
|
+
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -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;
|
|
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(
|
|
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;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
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AE;QAC7B,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9D,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IACnC,KAAK,CACF,CACP,CAAC;IACJ,CAAC,CAAC,CACmB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. 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 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,
|
|
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"}
|
package/spinner/internal.js
CHANGED
|
@@ -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
|
}
|
package/spinner/internal.js.map
CHANGED
|
@@ -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"]}
|
|
File without changes
|
|
File without changes
|