@cloudscape-design/components 3.0.953 → 3.0.955

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,iBAAiB,CAAC;AAIzB,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CAIb;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,sBAQrD;AAED,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,EAC5B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,QAU5C;AAED,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,8BAA8B,EAChF,KAAK,CAAC,EAAE,CAAC,GACR,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAEhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,iBAAiB,CAAC;AAIzB,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CAIb;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,sBAQrD;AAED,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,EAC5B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,QAa5C;AAED,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,8BAA8B,EAChF,KAAK,CAAC,EAAE,CAAC,GACR,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAEhE"}
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { initAwsUiVersions } from '@cloudscape-design/component-toolkit/internal';
4
4
  import { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../environment';
5
+ import { isDevelopment } from '../is-development';
5
6
  // these styles needed to be imported for every public component
6
7
  import './styles.css.js';
7
8
  initAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);
@@ -15,11 +16,14 @@ export function getBaseProps(props) {
15
16
  return baseProps;
16
17
  }
17
18
  export function validateProps(componentName, props, excludedProps, allowedEnums) {
19
+ if (!isDevelopment) {
20
+ return;
21
+ }
18
22
  for (const [prop, value] of Object.entries(props)) {
19
23
  if (excludedProps.includes(prop)) {
20
24
  throw new Error(`${componentName} does not support "${prop}" property when used in ${THEME} theme`);
21
25
  }
22
- if (allowedEnums[prop] && !allowedEnums[prop].includes(value)) {
26
+ if (value && allowedEnums[prop] && !allowedEnums[prop].includes(value)) {
23
27
  throw new Error(`${componentName} does not support "${prop}" with value "${value}" when used in ${THEME} theme`);
24
28
  }
25
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAExE,gEAAgE;AAChE,OAAO,iBAAiB,CAAC;AAEzB,iBAAiB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAoBnD,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAChC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACjE,SAAS,CAAC,IAAI,CAAC,GAAI,KAA6B,CAAC,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;IACH,OAAO,SAA+B,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,aAAqB,EACrB,KAA0B,EAC1B,aAA4B,EAC5B,YAA2C;IAE3C,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACjD,IAAI,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,GAAG,aAAa,sBAAsB,IAAI,2BAA2B,KAAK,QAAQ,CAAC,CAAC;SACrG;QACD,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC7D,MAAM,IAAI,KAAK,CAAC,GAAG,aAAa,sBAAsB,IAAI,iBAAiB,KAAK,kBAAkB,KAAK,QAAQ,CAAC,CAAC;SAClH;KACF;AACH,CAAC;AAOD;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAS;IAET,uCAAY,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,GAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,mBAAmB,EAAG;AACxE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initAwsUiVersions } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AnalyticsMetadata } from '../analytics/interfaces';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../environment';\n\n// these styles needed to be imported for every public component\nimport './styles.css.js';\n\ninitAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);\n\nexport interface BaseComponentProps {\n /**\n * Adds the specified classes to the root element of the component.\n * @deprecated Custom CSS is not supported. For testing and other use cases, use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes).\n */\n className?: string;\n /**\n * Adds the specified ID to the root element of the component.\n * @deprecated The usage of the `id` attribute is reserved for internal use cases. For testing and other use cases,\n * use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes). If you must\n * use the `id` attribute, consider setting it on a parent element instead.\n */\n id?: string;\n // we also support data-* attributes, but they are always implicitly allowed by typescript\n // http://www.typescriptlang.org/docs/handbook/jsx.html#attribute-type-checking\n // \"Note: If an attribute name is not a valid JS identifier (like a data-* attribute), it is not considered to be an error\"\n}\n\nexport function getBaseProps(props: BaseComponentProps) {\n const baseProps: Record<string, any> = {};\n Object.keys(props).forEach(prop => {\n if (prop === 'id' || prop === 'className' || prop.match(/^data-/)) {\n baseProps[prop] = (props as Record<string, any>)[prop];\n }\n });\n return baseProps as BaseComponentProps;\n}\n\nexport function validateProps(\n componentName: string,\n props: Record<string, any>,\n excludedProps: Array<string>,\n allowedEnums: Record<string, Array<string>>\n) {\n for (const [prop, value] of Object.entries(props)) {\n if (excludedProps.includes(prop)) {\n throw new Error(`${componentName} does not support \"${prop}\" property when used in ${THEME} theme`);\n }\n if (allowedEnums[prop] && !allowedEnums[prop].includes(value)) {\n throw new Error(`${componentName} does not support \"${prop}\" with value \"${value}\" when used in ${THEME} theme`);\n }\n }\n}\n\nexport interface BasePropsWithAnalyticsMetadata {\n analyticsMetadata?: AnalyticsMetadata;\n __analyticsMetadata?: AnalyticsMetadata;\n}\n\n/**\n * Helper function to merge beta analytics metadata with the public analytics metadata api.\n * Beta analytics metadata will override the public values to allow for safe migration.\n */\nexport function getAnalyticsMetadataProps<T extends BasePropsWithAnalyticsMetadata>(\n props?: T\n): NonNullable<T['analyticsMetadata'] & T['__analyticsMetadata']> {\n return { ...props?.analyticsMetadata, ...props?.__analyticsMetadata };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,gEAAgE;AAChE,OAAO,iBAAiB,CAAC;AAEzB,iBAAiB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAoBnD,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAChC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACjE,SAAS,CAAC,IAAI,CAAC,GAAI,KAA6B,CAAC,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;IACH,OAAO,SAA+B,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,aAAqB,EACrB,KAA0B,EAC1B,aAA4B,EAC5B,YAA2C;IAE3C,IAAI,CAAC,aAAa,EAAE;QAClB,OAAO;KACR;IACD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACjD,IAAI,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,GAAG,aAAa,sBAAsB,IAAI,2BAA2B,KAAK,QAAQ,CAAC,CAAC;SACrG;QACD,IAAI,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACtE,MAAM,IAAI,KAAK,CAAC,GAAG,aAAa,sBAAsB,IAAI,iBAAiB,KAAK,kBAAkB,KAAK,QAAQ,CAAC,CAAC;SAClH;KACF;AACH,CAAC;AAOD;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAS;IAET,uCAAY,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,GAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,mBAAmB,EAAG;AACxE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initAwsUiVersions } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AnalyticsMetadata } from '../analytics/interfaces';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from '../environment';\nimport { isDevelopment } from '../is-development';\n\n// these styles needed to be imported for every public component\nimport './styles.css.js';\n\ninitAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);\n\nexport interface BaseComponentProps {\n /**\n * Adds the specified classes to the root element of the component.\n * @deprecated Custom CSS is not supported. For testing and other use cases, use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes).\n */\n className?: string;\n /**\n * Adds the specified ID to the root element of the component.\n * @deprecated The usage of the `id` attribute is reserved for internal use cases. For testing and other use cases,\n * use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes). If you must\n * use the `id` attribute, consider setting it on a parent element instead.\n */\n id?: string;\n // we also support data-* attributes, but they are always implicitly allowed by typescript\n // http://www.typescriptlang.org/docs/handbook/jsx.html#attribute-type-checking\n // \"Note: If an attribute name is not a valid JS identifier (like a data-* attribute), it is not considered to be an error\"\n}\n\nexport function getBaseProps(props: BaseComponentProps) {\n const baseProps: Record<string, any> = {};\n Object.keys(props).forEach(prop => {\n if (prop === 'id' || prop === 'className' || prop.match(/^data-/)) {\n baseProps[prop] = (props as Record<string, any>)[prop];\n }\n });\n return baseProps as BaseComponentProps;\n}\n\nexport function validateProps(\n componentName: string,\n props: Record<string, any>,\n excludedProps: Array<string>,\n allowedEnums: Record<string, Array<string>>\n) {\n if (!isDevelopment) {\n return;\n }\n for (const [prop, value] of Object.entries(props)) {\n if (excludedProps.includes(prop)) {\n throw new Error(`${componentName} does not support \"${prop}\" property when used in ${THEME} theme`);\n }\n if (value && allowedEnums[prop] && !allowedEnums[prop].includes(value)) {\n throw new Error(`${componentName} does not support \"${prop}\" with value \"${value}\" when used in ${THEME} theme`);\n }\n }\n}\n\nexport interface BasePropsWithAnalyticsMetadata {\n analyticsMetadata?: AnalyticsMetadata;\n __analyticsMetadata?: AnalyticsMetadata;\n}\n\n/**\n * Helper function to merge beta analytics metadata with the public analytics metadata api.\n * Beta analytics metadata will override the public values to allow for safe migration.\n */\nexport function getAnalyticsMetadataProps<T extends BasePropsWithAnalyticsMetadata>(\n props?: T\n): NonNullable<T['analyticsMetadata'] & T['__analyticsMetadata']> {\n return { ...props?.analyticsMetadata, ...props?.__analyticsMetadata };\n}\n"]}
@@ -143,8 +143,7 @@
143
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
144
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
145
  .awsui_handle_sdha6_17tt1_145:not(#\9) {
146
- -webkit-appearance: none;
147
- appearance: none;
146
+ appearance: none;
148
147
  color: var(--color-text-interactive-default-1o1pl2, #424650);
149
148
  background: transparent;
150
149
  inline-size: -moz-fit-content;
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (a4dbd834)";
2
+ export var PACKAGE_VERSION = "3.0.0 (3df31e2a)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (a4dbd834)",
3
+ "PACKAGE_VERSION": "3.0.0 (3df31e2a)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "a4dbd83490c788c4adf77fa95f36d69cc0f13ff7"
2
+ "commit": "3df31e2a5118858903afa5bfc458b18ef8f7fe16"
3
3
  }
package/package.json CHANGED
@@ -140,7 +140,7 @@
140
140
  "./internal/base-component/index.js",
141
141
  "./internal/base-component/styles.css.js"
142
142
  ],
143
- "version": "3.0.953",
143
+ "version": "3.0.955",
144
144
  "repository": {
145
145
  "type": "git",
146
146
  "url": "https://github.com/cloudscape-design/components.git"
@@ -203,13 +203,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
203
203
  gap: var(--space-xxs-hwfkai, 4px);
204
204
  inline-size: 100%;
205
205
  overflow-x: hidden;
206
- -webkit-mask-image: linear-gradient(270deg, transparent, white 20px, white);
207
- mask-image: linear-gradient(270deg, transparent, white 20px, white);
206
+ mask-image: linear-gradient(270deg, transparent, white 20px, white);
208
207
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
209
208
  }
210
209
  .awsui_inline-token-list_dwuol_1ank7_199:not(#\9):dir(rtl) {
211
- -webkit-mask-image: linear-gradient(-270deg, transparent, white 20px, white);
212
- mask-image: linear-gradient(-270deg, transparent, white 20px, white);
210
+ mask-image: linear-gradient(-270deg, transparent, white 20px, white);
213
211
  }
214
212
  .awsui_inline-token-list_dwuol_1ank7_199 > .awsui_inline-token_dwuol_1ank7_192:not(#\9) {
215
213
  display: flex;
@@ -358,8 +358,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
358
358
 
359
359
  .awsui_thumb_pcgz5_rb7fb_358:not(#\9) {
360
360
  background: transparent;
361
- -webkit-appearance: none;
362
- appearance: none;
361
+ appearance: none;
363
362
  position: absolute;
364
363
  block-size: 0;
365
364
  inline-size: calc(100% + var(--space-m-dsumyt, 16px));
@@ -400,8 +399,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
400
399
  margin-inline-start: calc(1px + var(--space-m-dsumyt, 16px) / -2);
401
400
  }
402
401
  .awsui_thumb_pcgz5_rb7fb_358:not(#\9)::-webkit-slider-thumb {
403
- -webkit-appearance: none;
404
- appearance: none;
402
+ appearance: none;
405
403
  appearance: none;
406
404
  background: var(--color-background-slider-handle-default-8d9sfs, #006ce0);
407
405
  border-color: var(--color-background-slider-handle-default-8d9sfs, #006ce0);