@cloudscape-design/components 3.0.313 → 3.0.315

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 (74) hide show
  1. package/app-layout/index.js +1 -1
  2. package/app-layout/index.js.map +1 -1
  3. package/app-layout/visual-refresh/context.js +1 -1
  4. package/app-layout/visual-refresh/context.js.map +1 -1
  5. package/area-chart/internal.js +1 -1
  6. package/area-chart/internal.js.map +1 -1
  7. package/autosuggest/internal.js +1 -1
  8. package/autosuggest/internal.js.map +1 -1
  9. package/collection-preferences/index.js +1 -1
  10. package/collection-preferences/index.js.map +1 -1
  11. package/date-range-picker/index.js +1 -1
  12. package/date-range-picker/index.js.map +1 -1
  13. package/date-range-picker/time-offset.js +1 -1
  14. package/date-range-picker/time-offset.js.map +1 -1
  15. package/expandable-section/expandable-section-header.js +1 -1
  16. package/expandable-section/expandable-section-header.js.map +1 -1
  17. package/file-upload/internal.js +1 -1
  18. package/file-upload/internal.js.map +1 -1
  19. package/flashbar/common.js +1 -1
  20. package/flashbar/common.js.map +1 -1
  21. package/flashbar/flash.js +1 -1
  22. package/flashbar/flash.js.map +1 -1
  23. package/grid/internal.js +2 -2
  24. package/grid/internal.js.map +1 -1
  25. package/i18n/provider.js +1 -1
  26. package/i18n/provider.js.map +1 -1
  27. package/icon/internal.js +1 -1
  28. package/icon/internal.js.map +1 -1
  29. package/internal/base-component/styles.scoped.css +6 -0
  30. package/internal/components/masked-input/use-mask.js +2 -2
  31. package/internal/components/masked-input/use-mask.js.map +1 -1
  32. package/internal/components/option/index.js +1 -1
  33. package/internal/components/option/index.js.map +1 -1
  34. package/internal/environment.js +1 -1
  35. package/internal/generated/theming/index.cjs +54 -0
  36. package/internal/generated/theming/index.js +54 -0
  37. package/internal/hooks/check-controlled/index.js +1 -1
  38. package/internal/hooks/check-controlled/index.js.map +1 -1
  39. package/internal/hooks/use-controllable/index.js +1 -1
  40. package/internal/hooks/use-controllable/index.js.map +1 -1
  41. package/internal/hooks/use-visual-mode/index.js +1 -1
  42. package/internal/hooks/use-visual-mode/index.js.map +1 -1
  43. package/internal/manifest.json +1 -1
  44. package/internal/utils/check-safe-url.js +1 -1
  45. package/internal/utils/check-safe-url.js.map +1 -1
  46. package/internal/utils/locale/normalize-locale.js +1 -1
  47. package/internal/utils/locale/normalize-locale.js.map +1 -1
  48. package/mixed-line-bar-chart/internal.js +1 -1
  49. package/mixed-line-bar-chart/internal.js.map +1 -1
  50. package/package.json +1 -1
  51. package/pie-chart/styles.css.js +27 -27
  52. package/pie-chart/styles.scoped.css +44 -44
  53. package/pie-chart/styles.selectors.js +27 -27
  54. package/popover/index.js +1 -1
  55. package/popover/index.js.map +1 -1
  56. package/progress-bar/index.js +1 -1
  57. package/progress-bar/index.js.map +1 -1
  58. package/select/utils/check-option-value-field.js +1 -1
  59. package/select/utils/check-option-value-field.js.map +1 -1
  60. package/side-navigation/util.js +1 -1
  61. package/side-navigation/util.js.map +1 -1
  62. package/table/body-cell/styles.css.js +28 -28
  63. package/table/body-cell/styles.scoped.css +70 -70
  64. package/table/body-cell/styles.selectors.js +28 -28
  65. package/table/use-column-widths.js +1 -1
  66. package/table/use-column-widths.js.map +1 -1
  67. package/table/utils.js +1 -1
  68. package/table/utils.js.map +1 -1
  69. package/wizard/internal.js +1 -1
  70. package/wizard/internal.js.map +1 -1
  71. package/internal/logging.d.ts +0 -2
  72. package/internal/logging.d.ts.map +0 -1
  73. package/internal/logging.js +0 -14
  74. package/internal/logging.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["grid/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAoB,MAAM,MAAM,CAAC;AACxC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAA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OAAO,IAAI,CAAC;KACb;IACD,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,eAAe,YAAY,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, { ClassValue } from 'clsx';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport { getBaseProps } from '../internal/base-component';\nimport { Breakpoint, matchBreakpointMapping } from '../internal/breakpoints';\nimport { isDevelopment } from '../internal/is-development';\nimport * as logging from '../internal/logging';\nimport styles from './styles.css.js';\nimport { GridProps } from './interfaces';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport interface InternalGridProps extends GridProps, InternalBaseComponentProps {\n __breakpoint?: Breakpoint | null;\n\n /**\n * The handler that fires when the grid breakpoint changes.\n */\n __responsiveClassName?: (breakpoint: Breakpoint | null) => ClassValue;\n}\n\nconst InternalGrid = React.forwardRef(\n (\n {\n __breakpoint,\n gridDefinition = [],\n disableGutters = false,\n children,\n __responsiveClassName,\n __internalRootRef = null,\n ...restProps\n }: InternalGridProps,\n ref: React.Ref<any>\n ) => {\n let [defaultBreakpoint, defaultRef]: [Breakpoint | null, React.Ref<any>] = useContainerBreakpoints(undefined);\n if (__breakpoint !== undefined) {\n defaultBreakpoint = __breakpoint;\n defaultRef = ref;\n }\n\n const baseProps = getBaseProps(restProps);\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children);\n\n if (isDevelopment) {\n const columnCount = gridDefinition.length;\n const childCount = flattenedChildren.length;\n if (columnCount !== childCount) {\n logging.warnOnce(\n 'Grid',\n `The number of children (${childCount}) does not match the number of columns defined (${columnCount}).`\n );\n }\n }\n\n const mergedRef = useMergeRefs(defaultRef, __internalRootRef);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.grid,\n baseProps.className,\n { [styles['no-gutters']]: disableGutters },\n __responsiveClassName ? __responsiveClassName(defaultBreakpoint) : null\n )}\n ref={mergedRef}\n >\n {flattenedChildren.map((child, i) => {\n // If this react child is a primitive value, the key will be undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const key = (child as any).key;\n\n return (\n <div\n key={key}\n className={clsx(\n styles['grid-column'],\n getColumnClassNames('colspan', gridDefinition[i]?.colspan, defaultBreakpoint),\n getColumnClassNames('offset', gridDefinition[i]?.offset, defaultBreakpoint),\n getColumnClassNames('pull', gridDefinition[i]?.pull, defaultBreakpoint),\n getColumnClassNames('push', gridDefinition[i]?.push, defaultBreakpoint)\n )}\n >\n <div className={styles['restore-pointer-events']}>{child}</div>\n </div>\n );\n })}\n </div>\n );\n }\n);\n\nfunction getColumnClassNames(\n prop: string,\n mapping: undefined | number | GridProps.BreakpointMapping,\n breakpoint: Breakpoint | null\n): string | null {\n if (typeof mapping === 'number') {\n return styles[`${prop}-${mapping}`];\n }\n if (breakpoint === null || mapping === undefined) {\n return null;\n }\n return styles[`${prop}-${matchBreakpointMapping(mapping, breakpoint)}`];\n}\n\nexport default InternalGrid;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["grid/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAoB,MAAM,MAAM,CAAC;AACxC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAc,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAA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AAY,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, { ClassValue } from 'clsx';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport { getBaseProps } from '../internal/base-component';\nimport { Breakpoint, matchBreakpointMapping } from '../internal/breakpoints';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport styles from './styles.css.js';\nimport { GridProps } from './interfaces';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\n\nexport interface InternalGridProps extends GridProps, InternalBaseComponentProps {\n __breakpoint?: Breakpoint | null;\n\n /**\n * The handler that fires when the grid breakpoint changes.\n */\n __responsiveClassName?: (breakpoint: Breakpoint | null) => ClassValue;\n}\n\nconst InternalGrid = React.forwardRef(\n (\n {\n __breakpoint,\n gridDefinition = [],\n disableGutters = false,\n children,\n __responsiveClassName,\n __internalRootRef = null,\n ...restProps\n }: InternalGridProps,\n ref: React.Ref<any>\n ) => {\n let [defaultBreakpoint, defaultRef]: [Breakpoint | null, React.Ref<any>] = useContainerBreakpoints(undefined);\n if (__breakpoint !== undefined) {\n defaultBreakpoint = __breakpoint;\n defaultRef = ref;\n }\n\n const baseProps = getBaseProps(restProps);\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children);\n\n if (isDevelopment) {\n const columnCount = gridDefinition.length;\n const childCount = flattenedChildren.length;\n if (columnCount !== childCount) {\n warnOnce(\n 'Grid',\n `The number of children (${childCount}) does not match the number of columns defined (${columnCount}).`\n );\n }\n }\n\n const mergedRef = useMergeRefs(defaultRef, __internalRootRef);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n styles.grid,\n baseProps.className,\n { [styles['no-gutters']]: disableGutters },\n __responsiveClassName ? __responsiveClassName(defaultBreakpoint) : null\n )}\n ref={mergedRef}\n >\n {flattenedChildren.map((child, i) => {\n // If this react child is a primitive value, the key will be undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const key = (child as any).key;\n\n return (\n <div\n key={key}\n className={clsx(\n styles['grid-column'],\n getColumnClassNames('colspan', gridDefinition[i]?.colspan, defaultBreakpoint),\n getColumnClassNames('offset', gridDefinition[i]?.offset, defaultBreakpoint),\n getColumnClassNames('pull', gridDefinition[i]?.pull, defaultBreakpoint),\n getColumnClassNames('push', gridDefinition[i]?.push, defaultBreakpoint)\n )}\n >\n <div className={styles['restore-pointer-events']}>{child}</div>\n </div>\n );\n })}\n </div>\n );\n }\n);\n\nfunction getColumnClassNames(\n prop: string,\n mapping: undefined | number | GridProps.BreakpointMapping,\n breakpoint: Breakpoint | null\n): string | null {\n if (typeof mapping === 'number') {\n return styles[`${prop}-${mapping}`];\n }\n if (breakpoint === null || mapping === undefined) {\n return null;\n }\n return styles[`${prop}-${matchBreakpointMapping(mapping, breakpoint)}`];\n}\n\nexport default InternalGrid;\n"]}
package/i18n/provider.js CHANGED
@@ -4,7 +4,7 @@ import React, { useContext } from 'react';
4
4
  import IntlMessageFormat from 'intl-messageformat';
5
5
  import { InternalI18nContext } from './context';
6
6
  import { useTelemetry } from '../internal/hooks/use-telemetry';
7
- import { warnOnce } from '../internal/logging';
7
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
8
8
  /**
9
9
  * Context to send parent messages down to child I18nProviders. This isn't
10
10
  * included in the InternalI18nContext to avoid components from depending on
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"lib/default/","sources":["i18n/provider.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAiC,MAAM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AAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;KACjD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useContext } from 'react';\nimport IntlMessageFormat from 'intl-messageformat';\nimport { MessageFormatElement } from '@formatjs/icu-messageformat-parser';\n\nimport { InternalI18nContext, FormatFunction, CustomHandler } from './context';\nimport { useTelemetry } from '../internal/hooks/use-telemetry';\nimport { warnOnce } from '../internal/logging';\n\nexport interface I18nProviderProps {\n messages: ReadonlyArray<I18nProviderProps.Messages>;\n locale?: string;\n children: React.ReactNode;\n}\n\nexport namespace I18nProviderProps {\n export interface Messages {\n [namespace: string]: {\n [locale: string]: {\n [component: string]: {\n [key: string]: string | MessageFormatElement[];\n };\n };\n };\n }\n}\n\n/**\n * Context to send parent messages down to child I18nProviders. This isn't\n * included in the InternalI18nContext to avoid components from depending on\n * MessageFormatElement types.\n */\nconst I18nMessagesContext = React.createContext<I18nProviderProps.Messages>({});\n\nexport function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps) {\n useTelemetry('I18nProvider');\n\n if (typeof document === 'undefined' && !providedLocale) {\n warnOnce(\n 'I18nProvider',\n 'An explicit locale was not provided during server rendering. This can lead to a hydration mismatch on the client.'\n );\n }\n\n // The provider accepts an array of configs. We merge parent messages and\n // flatten the tree early on so that accesses by key are simpler and faster.\n const parentMessages = useContext(I18nMessagesContext);\n const messages = mergeMessages([parentMessages, ...messagesArray]);\n\n let locale: string;\n if (providedLocale) {\n // If a locale is explicitly provided, use the string directly.\n // Locales have a recommended case, but are matched case-insensitively,\n // so we lowercase it internally.\n locale = providedLocale.toLowerCase();\n } else if (typeof document !== 'undefined' && document.documentElement.lang) {\n // Otherwise, use the value provided in the HTML tag.\n locale = document.documentElement.lang.toLowerCase();\n } else {\n // Lastly, fall back to English.\n locale = 'en';\n }\n\n const format: FormatFunction = <ReturnValue, FormatFnArgs extends Record<string, string | number>>(\n namespace: string,\n component: string,\n key: string,\n provided: ReturnValue,\n customHandler?: CustomHandler<ReturnValue, FormatFnArgs>\n ): ReturnValue => {\n // A general rule in the library is that undefined is basically\n // treated as \"not provided\". So even if a user explicitly provides an\n // undefined value, it will default to i18n values.\n if (provided !== undefined) {\n return provided;\n }\n\n // Widen the locale string (e.g. en-GB -> en) until we find a locale\n // that contains the message we need.\n let message: string | MessageFormatElement[] | undefined;\n const matchableLocales = getMatchableLocales(locale);\n for (const matchableLocale of matchableLocales) {\n const localeMessage = messages?.[namespace]?.[matchableLocale]?.[component]?.[key];\n if (localeMessage !== undefined) {\n message = localeMessage;\n break;\n }\n }\n\n // If a message wasn't found, exit early.\n if (message === undefined) {\n return provided;\n }\n\n const intlMessageFormat = new IntlMessageFormat(message, locale);\n if (customHandler) {\n return customHandler(args => intlMessageFormat.format(args) as string);\n }\n // Assuming `T extends string` since a customHandler wasn't provided.\n return intlMessageFormat.format() as ReturnValue;\n };\n\n return (\n <InternalI18nContext.Provider value={{ locale, format }}>\n <I18nMessagesContext.Provider value={messages}>{children}</I18nMessagesContext.Provider>\n </InternalI18nContext.Provider>\n );\n}\n\nfunction mergeMessages(sources: ReadonlyArray<I18nProviderProps.Messages>): I18nProviderProps.Messages {\n const result: I18nProviderProps.Messages = {};\n for (const messages of sources) {\n for (const namespace in messages) {\n if (!(namespace in result)) {\n result[namespace] = {};\n }\n for (const casedLocale in messages[namespace]) {\n const locale = casedLocale.toLowerCase();\n if (!(locale in result[namespace])) {\n result[namespace][locale] = {};\n }\n for (const component in messages[namespace][casedLocale]) {\n if (!(component in result[namespace][locale])) {\n result[namespace][locale][component] = {};\n }\n for (const key in messages[namespace][casedLocale][component]) {\n result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction getMatchableLocales(ietfLanguageTag: string): string[] {\n const parts = ietfLanguageTag.split('-');\n if (parts.length === 1) {\n return [ietfLanguageTag];\n }\n\n const localeStrings: string[] = [];\n for (let i = parts.length; i > 0; i--) {\n localeStrings.push(parts.slice(0, i).join('-'));\n }\n return localeStrings;\n}\n"]}
1
+ {"version":3,"file":"provider.js","sourceRoot":"lib/default/","sources":["i18n/provider.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAiC,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAoBzE;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAA6B,EAAE,CAAC,CAAC;AAEhF,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAqB;IAC3G,YAAY,CAAC,cAAc,CAAC,CAAC;IAE7B,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,CAAC,cAAc,EAAE;QACtD,QAAQ,CACN,cAAc,EACd,mHAAmH,CACpH,CAAC;KACH;IAED,yEAAyE;IACzE,4EAA4E;IAC5E,MAAM,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,cAAc,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC;IAEnE,IAAI,MAAc,CAAC;IACnB,IAAI,cAAc,EAAE;QAClB,+DAA+D;QAC/D,uEAAuE;QACvE,iCAAiC;QACjC,MAAM,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;KACvC;SAAM,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,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SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,mBAAmB,CAAC,eAAuB;IAClD,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,eAAe,CAAC,CAAC;KAC1B;IAED,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACrC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;KACjD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useContext } from 'react';\nimport IntlMessageFormat from 'intl-messageformat';\nimport { MessageFormatElement } from '@formatjs/icu-messageformat-parser';\n\nimport { InternalI18nContext, FormatFunction, CustomHandler } from './context';\nimport { useTelemetry } from '../internal/hooks/use-telemetry';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport interface I18nProviderProps {\n messages: ReadonlyArray<I18nProviderProps.Messages>;\n locale?: string;\n children: React.ReactNode;\n}\n\nexport namespace I18nProviderProps {\n export interface Messages {\n [namespace: string]: {\n [locale: string]: {\n [component: string]: {\n [key: string]: string | MessageFormatElement[];\n };\n };\n };\n }\n}\n\n/**\n * Context to send parent messages down to child I18nProviders. This isn't\n * included in the InternalI18nContext to avoid components from depending on\n * MessageFormatElement types.\n */\nconst I18nMessagesContext = React.createContext<I18nProviderProps.Messages>({});\n\nexport function I18nProvider({ messages: messagesArray, locale: providedLocale, children }: I18nProviderProps) {\n useTelemetry('I18nProvider');\n\n if (typeof document === 'undefined' && !providedLocale) {\n warnOnce(\n 'I18nProvider',\n 'An explicit locale was not provided during server rendering. This can lead to a hydration mismatch on the client.'\n );\n }\n\n // The provider accepts an array of configs. We merge parent messages and\n // flatten the tree early on so that accesses by key are simpler and faster.\n const parentMessages = useContext(I18nMessagesContext);\n const messages = mergeMessages([parentMessages, ...messagesArray]);\n\n let locale: string;\n if (providedLocale) {\n // If a locale is explicitly provided, use the string directly.\n // Locales have a recommended case, but are matched case-insensitively,\n // so we lowercase it internally.\n locale = providedLocale.toLowerCase();\n } else if (typeof document !== 'undefined' && document.documentElement.lang) {\n // Otherwise, use the value provided in the HTML tag.\n locale = document.documentElement.lang.toLowerCase();\n } else {\n // Lastly, fall back to English.\n locale = 'en';\n }\n\n const format: FormatFunction = <ReturnValue, FormatFnArgs extends Record<string, string | number>>(\n namespace: string,\n component: string,\n key: string,\n provided: ReturnValue,\n customHandler?: CustomHandler<ReturnValue, FormatFnArgs>\n ): ReturnValue => {\n // A general rule in the library is that undefined is basically\n // treated as \"not provided\". So even if a user explicitly provides an\n // undefined value, it will default to i18n values.\n if (provided !== undefined) {\n return provided;\n }\n\n // Widen the locale string (e.g. en-GB -> en) until we find a locale\n // that contains the message we need.\n let message: string | MessageFormatElement[] | undefined;\n const matchableLocales = getMatchableLocales(locale);\n for (const matchableLocale of matchableLocales) {\n const localeMessage = messages?.[namespace]?.[matchableLocale]?.[component]?.[key];\n if (localeMessage !== undefined) {\n message = localeMessage;\n break;\n }\n }\n\n // If a message wasn't found, exit early.\n if (message === undefined) {\n return provided;\n }\n\n const intlMessageFormat = new IntlMessageFormat(message, locale);\n if (customHandler) {\n return customHandler(args => intlMessageFormat.format(args) as string);\n }\n // Assuming `T extends string` since a customHandler wasn't provided.\n return intlMessageFormat.format() as ReturnValue;\n };\n\n return (\n <InternalI18nContext.Provider value={{ locale, format }}>\n <I18nMessagesContext.Provider value={messages}>{children}</I18nMessagesContext.Provider>\n </InternalI18nContext.Provider>\n );\n}\n\nfunction mergeMessages(sources: ReadonlyArray<I18nProviderProps.Messages>): I18nProviderProps.Messages {\n const result: I18nProviderProps.Messages = {};\n for (const messages of sources) {\n for (const namespace in messages) {\n if (!(namespace in result)) {\n result[namespace] = {};\n }\n for (const casedLocale in messages[namespace]) {\n const locale = casedLocale.toLowerCase();\n if (!(locale in result[namespace])) {\n result[namespace][locale] = {};\n }\n for (const component in messages[namespace][casedLocale]) {\n if (!(component in result[namespace][locale])) {\n result[namespace][locale][component] = {};\n }\n for (const key in messages[namespace][casedLocale][component]) {\n result[namespace][locale][component][key] = messages[namespace][casedLocale][component][key];\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction getMatchableLocales(ietfLanguageTag: string): string[] {\n const parts = ietfLanguageTag.split('-');\n if (parts.length === 1) {\n return [ietfLanguageTag];\n }\n\n const localeStrings: string[] = [];\n for (let i = parts.length; i > 0; i--) {\n localeStrings.push(parts.slice(0, i).join('-'));\n }\n return localeStrings;\n}\n"]}
package/icon/internal.js CHANGED
@@ -4,7 +4,7 @@ import { __rest } from "tslib";
4
4
  import clsx from 'clsx';
5
5
  import React, { useLayoutEffect, useRef, useState } from 'react';
6
6
  import { getBaseProps } from '../internal/base-component';
7
- import { warnOnce } from '../internal/logging';
7
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
8
8
  import styles from './styles.css.js';
9
9
  import icons from './icons';
10
10
  import { useMergeRefs } from '../internal/hooks/use-merge-refs';
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["icon/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,MAAM,MAAM,iBAAi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AAI,CACtB,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,OAAO,CACL,8CACM,SAAS;QACb,sFAAsF;QACtF,2CAA2C;QAC3C,uBAAuB,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACxE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,YAAY,IACnB,CACH,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { warnOnce } from '../internal/logging';\nimport styles from './styles.css.js';\nimport icons from './icons';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { IconProps } from './interfaces';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n };\n\nfunction iconSizeMap(height: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24) {\n return 'medium';\n } else if (height <= 16) {\n return 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n svg,\n badge,\n __internalRootRef = null,\n ...props\n}: InternalIconProps) => {\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const { lineHeight } = getComputedStyle(iconRef.current);\n const newParentHeight = parseInt(lineHeight, 10);\n setParentHeight(newParentHeight);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <span {...baseProps} ref={mergedRef} aria-hidden=\"true\" style={inlineStyles}>\n {svg}\n </span>\n );\n }\n\n if (url) {\n return (\n <span {...baseProps} ref={mergedRef} style={inlineStyles}>\n <img src={url} alt={alt} />\n </span>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n return (\n <span\n {...baseProps}\n // dangerouslySetInnerHTML is safe here, as we control the content coming from `icons`\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={validIcon ? { __html: icons[name] } : undefined}\n ref={mergedRef}\n style={inlineStyles}\n />\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["icon/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO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,EAAE;QACP,OAAO,CACL,8CAAU,SAAS,IAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY;YACtD,6BAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAI,CACtB,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE5E,OAAO,CACL,8CACM,SAAS;QACb,sFAAsF;QACtF,2CAA2C;QAC3C,uBAAuB,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACxE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,YAAY,IACnB,CACH,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport styles from './styles.css.js';\nimport icons from './icons';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { IconProps } from './interfaces';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\ntype InternalIconProps = IconProps &\n InternalBaseComponentProps & {\n badge?: boolean;\n };\n\nfunction iconSizeMap(height: number | null) {\n if (height === null) {\n // This is the best guess for the contextual height while server rendering.\n return 'normal';\n }\n\n if (height >= 50) {\n return 'large';\n } else if (height >= 36) {\n return 'big';\n } else if (height >= 24) {\n return 'medium';\n } else if (height <= 16) {\n return 'small';\n } else {\n return 'normal';\n }\n}\n\nconst InternalIcon = ({\n name,\n size = 'normal',\n variant = 'normal',\n url,\n alt,\n svg,\n badge,\n __internalRootRef = null,\n ...props\n}: InternalIconProps) => {\n const iconRef = useRef<HTMLElement>(null);\n // To ensure a re-render is triggered on visual mode changes\n useVisualRefresh();\n const [parentHeight, setParentHeight] = useState<number | null>(null);\n const contextualSize = size === 'inherit';\n const iconSize = contextualSize ? iconSizeMap(parentHeight) : size;\n const inlineStyles = contextualSize && parentHeight !== null ? { height: `${parentHeight}px` } : {};\n const baseProps = getBaseProps(props);\n\n baseProps.className = clsx(\n baseProps.className,\n styles.icon,\n contextualSize && styles['icon-flex-height'],\n badge && styles.badge,\n !contextualSize && styles[`size-${iconSize}-mapped-height`],\n styles[`size-${iconSize}`],\n styles[`variant-${variant}`]\n );\n\n // Possible infinite loop is not a concern here because line\n // height should not change without an external state update.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n if (!contextualSize || !iconRef.current) {\n return;\n }\n const { lineHeight } = getComputedStyle(iconRef.current);\n const newParentHeight = parseInt(lineHeight, 10);\n setParentHeight(newParentHeight);\n });\n\n const mergedRef = useMergeRefs(iconRef, __internalRootRef);\n\n if (svg) {\n if (url) {\n warnOnce(\n 'Icon',\n 'You have specified both `url` and `svg`. `svg` will take precedence and `url` will be ignored.'\n );\n }\n return (\n <span {...baseProps} ref={mergedRef} aria-hidden=\"true\" style={inlineStyles}>\n {svg}\n </span>\n );\n }\n\n if (url) {\n return (\n <span {...baseProps} ref={mergedRef} style={inlineStyles}>\n <img src={url} alt={alt} />\n </span>\n );\n }\n\n const validIcon = name && Object.prototype.hasOwnProperty.call(icons, name);\n\n return (\n <span\n {...baseProps}\n // dangerouslySetInnerHTML is safe here, as we control the content coming from `icons`\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={validIcon ? { __html: icons[name] } : undefined}\n ref={mergedRef}\n style={inlineStyles}\n />\n );\n};\n\nexport { InternalIconProps };\nexport default InternalIcon;\n"]}
@@ -247,6 +247,7 @@
247
247
  --color-border-dropdown-item-hover-me98vk:#7d8998;
248
248
  --color-border-dropdown-item-dimmed-hover-3tdni4:#7d8998;
249
249
  --color-border-dropdown-item-top-x77i10:transparent;
250
+ --color-border-editable-cell-hover-zeuchn:#7d8998;
250
251
  --color-border-input-default-zb6g42:#7d8998;
251
252
  --color-border-input-disabled-06dcc0:#e9ebed;
252
253
  --color-border-item-focused-4t19h5:#0972d3;
@@ -273,6 +274,7 @@
273
274
  --color-foreground-control-disabled-f2499o:#ffffff;
274
275
  --color-shadow-default-ukle9p:rgba(0, 7, 22, 0.12);
275
276
  --color-shadow-layout-toggle-u6bbly:#d1d5db;
277
+ --color-stroke-chart-line-7sdstd:#7d8998;
276
278
  --color-text-accent-qh8xwn:#0972d3;
277
279
  --color-text-body-default-mmvcvg:#000716;
278
280
  --color-text-body-secondary-he5d85:#414d5c;
@@ -824,6 +826,7 @@
824
826
  --color-border-dropdown-group-qb493x:#414d5c;
825
827
  --color-border-dropdown-item-default-83pxjk:#414d5c;
826
828
  --color-border-dropdown-item-hover-me98vk:#5f6b7a;
829
+ --color-border-editable-cell-hover-zeuchn:#5f6b7a;
827
830
  --color-border-input-default-zb6g42:#5f6b7a;
828
831
  --color-border-input-disabled-06dcc0:#192534;
829
832
  --color-border-item-focused-4t19h5:#539fe5;
@@ -1094,6 +1097,7 @@
1094
1097
  --color-border-dropdown-group-qb493x:#414d5c;
1095
1098
  --color-border-dropdown-item-default-83pxjk:#414d5c;
1096
1099
  --color-border-dropdown-item-hover-me98vk:#5f6b7a;
1100
+ --color-border-editable-cell-hover-zeuchn:#5f6b7a;
1097
1101
  --color-border-input-default-zb6g42:#5f6b7a;
1098
1102
  --color-border-input-disabled-06dcc0:#192534;
1099
1103
  --color-border-item-focused-4t19h5:#539fe5;
@@ -1277,6 +1281,7 @@
1277
1281
  --color-border-dropdown-group-qb493x:#414d5c;
1278
1282
  --color-border-dropdown-item-default-83pxjk:#414d5c;
1279
1283
  --color-border-dropdown-item-hover-me98vk:#5f6b7a;
1284
+ --color-border-editable-cell-hover-zeuchn:#5f6b7a;
1280
1285
  --color-border-input-default-zb6g42:#5f6b7a;
1281
1286
  --color-border-input-disabled-06dcc0:#192534;
1282
1287
  --color-border-item-focused-4t19h5:#539fe5;
@@ -1510,6 +1515,7 @@
1510
1515
  --color-border-dropdown-group-qb493x:#414d5c;
1511
1516
  --color-border-dropdown-item-default-83pxjk:#414d5c;
1512
1517
  --color-border-dropdown-item-hover-me98vk:#5f6b7a;
1518
+ --color-border-editable-cell-hover-zeuchn:#5f6b7a;
1513
1519
  --color-border-input-default-zb6g42:#5f6b7a;
1514
1520
  --color-border-input-disabled-06dcc0:#192534;
1515
1521
  --color-border-item-focused-4t19h5:#fbfbfb;
@@ -1,5 +1,5 @@
1
1
  import { KeyCode } from '../../keycode';
2
- import * as logger from '../../logging';
2
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
3
3
  import { isCommand, isDigit } from './utils/keys';
4
4
  import { backspaceHandler, keyHandler, enterHandler } from './keyboard-handler';
5
5
  const onAutoComplete = (value, onChange, maskFormat) => {
@@ -15,7 +15,7 @@ const onAutoComplete = (value, onChange, maskFormat) => {
15
15
  const preventDefault = (event, result) => result && event.preventDefault();
16
16
  const useMask = ({ value = '', onBlur, onChange, onKeyDown, format, inputRef, autofix = false, disableAutocompleteOnBlur = false, setPosition, }) => {
17
17
  if (!format.isValid(value)) {
18
- logger.warnOnce('useMask', `Invalid string "${value}" provided`);
18
+ warnOnce('useMask', `Invalid string "${value}" provided`);
19
19
  }
20
20
  const onMaskChange = (updatedValue) => {
21
21
  const autofixedUpdatedValue = autofix ? format.correctMinMaxValues(updatedValue) : updatedValue;
@@ -1 +1 @@
1
- {"version":3,"file":"use-mask.js","sourceRoot":"lib/default/","sources":["internal/components/masked-input/use-mask.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,c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EAAE,GAAG,MAAM,CAAC;gBAEnC,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,WAAW,CAAC,QAAQ,CAAC,CAAC;aACvB;YAED,uBAAuB;YACvB,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACpD,MAAM,EAAE,GAAG,EAAE;YACX,IAAI,CAAC,yBAAyB,EAAE;gBAC9B,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;aAC/C;YAED,MAAM,IAAI,MAAM,EAAE,CAAC;QACrB,CAAC;QACD,OAAO,EAAE,CAAC,KAAqB,EAAE,EAAE;;YACjC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,aAAa,IAAK,MAAc,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAEpF,MAAM,cAAc,GAAG,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,cAAc,KAAI,CAAC,CAAC;YAC7D,MAAM,YAAY,GAAG,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,YAAY,KAAI,CAAC,CAAC;YAEzD,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;YAC/F,YAAY,CAAC,aAAa,CAAC,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject } from 'react';\nimport { InputProps } from '../../../input/interfaces';\nimport { NonCancelableEventHandler, CancelableEventHandler } from '../../events';\nimport { KeyCode } from '../../keycode';\n\nimport * as logger from '../../logging';\nimport { isCommand, isDigit } from './utils/keys';\n\nimport MaskFormat from './utils/mask-format';\nimport { backspaceHandler, HandlerResult, keyHandler, enterHandler } from './keyboard-handler';\n\ninterface UseMaskHook {\n value: string;\n onChange: NonCancelableEventHandler<InputProps.ChangeDetail>;\n onKeyDown: CancelableEventHandler<InputProps.KeyDetail>;\n onBlur: NonCancelableEventHandler<null>;\n onPaste: (event: ClipboardEvent) => void;\n}\n\ninterface UseMaskProps {\n value: string;\n onChange: (value: string) => void;\n onKeyDown?: (event: CustomEvent) => void;\n onBlur?: () => void;\n format: MaskFormat;\n autofix?: boolean;\n inputRef: RefObject<HTMLInputElement>;\n disableAutocompleteOnBlur?: boolean;\n setPosition: (position: number | null) => void;\n}\n\nconst onAutoComplete = (value: string, onChange: UseMaskProps['onChange'], maskFormat: MaskFormat) => {\n // Do not autocomplete if input is empty\n if (!value) {\n return;\n }\n\n const autoCompletedValue = maskFormat.autoComplete(value);\n if (autoCompletedValue !== value) {\n onChange(autoCompletedValue);\n }\n};\n\nconst preventDefault = (event: CustomEvent, result?: HandlerResult | null) => result && event.preventDefault();\n\nconst useMask = ({\n value = '',\n onBlur,\n onChange,\n onKeyDown,\n format,\n inputRef,\n autofix = false,\n disableAutocompleteOnBlur = false,\n setPosition,\n}: UseMaskProps): UseMaskHook => {\n if (!format.isValid(value)) {\n logger.warnOnce('useMask', `Invalid string \"${value}\" provided`);\n }\n\n const onMaskChange = (updatedValue: string) => {\n const autofixedUpdatedValue = autofix ? format.correctMinMaxValues(updatedValue) : updatedValue;\n if (autofixedUpdatedValue === value || !format.isValid(autofixedUpdatedValue)) {\n return;\n }\n\n onChange(autofixedUpdatedValue);\n };\n\n const initialValue = autofix ? format.correctMinMaxValues(value) : value;\n const maskedValue = format.getValidValue(initialValue);\n\n return {\n value: maskedValue,\n onKeyDown: (event: CustomEvent) => {\n const selectionStart = inputRef.current?.selectionStart || 0;\n const selectionEnd = inputRef.current?.selectionEnd || 0;\n\n let result: HandlerResult | undefined;\n const { keyCode, key, ctrlKey, metaKey } = event.detail;\n if (isDigit(key) || format.isSeparator(key)) {\n result = keyHandler(maskedValue, key, format, selectionStart, selectionEnd);\n preventDefault(event, result);\n } else if (keyCode === KeyCode.backspace) {\n result = backspaceHandler(maskedValue, format, selectionStart, selectionEnd);\n preventDefault(event, result);\n } else if (keyCode === KeyCode.enter) {\n result = enterHandler(maskedValue, format);\n } else if (!isCommand(keyCode, ctrlKey, metaKey)) {\n event.preventDefault();\n }\n\n if (result) {\n const { value, position } = result;\n\n onMaskChange(value);\n setPosition(position);\n }\n\n // Proxy original event\n onKeyDown && onKeyDown(event);\n },\n onChange: ({ detail }) => onMaskChange(detail.value),\n onBlur: () => {\n if (!disableAutocompleteOnBlur) {\n onAutoComplete(maskedValue, onChange, format);\n }\n\n onBlur && onBlur();\n },\n onPaste: (event: ClipboardEvent) => {\n const text = (event.clipboardData || (window as any).clipboardData).getData('text');\n\n const selectionStart = inputRef.current?.selectionStart || 0;\n const selectionEnd = inputRef.current?.selectionEnd || 0;\n\n const formattedText = format.formatPastedText(text, maskedValue, selectionStart, selectionEnd);\n onMaskChange(formattedText);\n },\n };\n};\n\nexport default useMask;\n"]}
1
+ {"version":3,"file":"use-mask.js","sourceRoot":"lib/default/","sources":["internal/components/masked-input/use-mask.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAE,gBAAgB,EAAiB,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAsB/F,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,QAAkC,EAAE,UAAsB,EAAE,EAAE;IACnG,wCAAwC;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO;KACR;IAED,MAAM,kBAAkB,GAAG,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC1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,IAAI,CAAC,yBAAyB,EAAE;gBAC9B,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;aAC/C;YAED,MAAM,IAAI,MAAM,EAAE,CAAC;QACrB,CAAC;QACD,OAAO,EAAE,CAAC,KAAqB,EAAE,EAAE;;YACjC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,aAAa,IAAK,MAAc,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAEpF,MAAM,cAAc,GAAG,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,cAAc,KAAI,CAAC,CAAC;YAC7D,MAAM,YAAY,GAAG,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,YAAY,KAAI,CAAC,CAAC;YAEzD,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;YAC/F,YAAY,CAAC,aAAa,CAAC,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject } from 'react';\nimport { InputProps } from '../../../input/interfaces';\nimport { NonCancelableEventHandler, CancelableEventHandler } from '../../events';\nimport { KeyCode } from '../../keycode';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { isCommand, isDigit } from './utils/keys';\n\nimport MaskFormat from './utils/mask-format';\nimport { backspaceHandler, HandlerResult, keyHandler, enterHandler } from './keyboard-handler';\n\ninterface UseMaskHook {\n value: string;\n onChange: NonCancelableEventHandler<InputProps.ChangeDetail>;\n onKeyDown: CancelableEventHandler<InputProps.KeyDetail>;\n onBlur: NonCancelableEventHandler<null>;\n onPaste: (event: ClipboardEvent) => void;\n}\n\ninterface UseMaskProps {\n value: string;\n onChange: (value: string) => void;\n onKeyDown?: (event: CustomEvent) => void;\n onBlur?: () => void;\n format: MaskFormat;\n autofix?: boolean;\n inputRef: RefObject<HTMLInputElement>;\n disableAutocompleteOnBlur?: boolean;\n setPosition: (position: number | null) => void;\n}\n\nconst onAutoComplete = (value: string, onChange: UseMaskProps['onChange'], maskFormat: MaskFormat) => {\n // Do not autocomplete if input is empty\n if (!value) {\n return;\n }\n\n const autoCompletedValue = maskFormat.autoComplete(value);\n if (autoCompletedValue !== value) {\n onChange(autoCompletedValue);\n }\n};\n\nconst preventDefault = (event: CustomEvent, result?: HandlerResult | null) => result && event.preventDefault();\n\nconst useMask = ({\n value = '',\n onBlur,\n onChange,\n onKeyDown,\n format,\n inputRef,\n autofix = false,\n disableAutocompleteOnBlur = false,\n setPosition,\n}: UseMaskProps): UseMaskHook => {\n if (!format.isValid(value)) {\n warnOnce('useMask', `Invalid string \"${value}\" provided`);\n }\n\n const onMaskChange = (updatedValue: string) => {\n const autofixedUpdatedValue = autofix ? format.correctMinMaxValues(updatedValue) : updatedValue;\n if (autofixedUpdatedValue === value || !format.isValid(autofixedUpdatedValue)) {\n return;\n }\n\n onChange(autofixedUpdatedValue);\n };\n\n const initialValue = autofix ? format.correctMinMaxValues(value) : value;\n const maskedValue = format.getValidValue(initialValue);\n\n return {\n value: maskedValue,\n onKeyDown: (event: CustomEvent) => {\n const selectionStart = inputRef.current?.selectionStart || 0;\n const selectionEnd = inputRef.current?.selectionEnd || 0;\n\n let result: HandlerResult | undefined;\n const { keyCode, key, ctrlKey, metaKey } = event.detail;\n if (isDigit(key) || format.isSeparator(key)) {\n result = keyHandler(maskedValue, key, format, selectionStart, selectionEnd);\n preventDefault(event, result);\n } else if (keyCode === KeyCode.backspace) {\n result = backspaceHandler(maskedValue, format, selectionStart, selectionEnd);\n preventDefault(event, result);\n } else if (keyCode === KeyCode.enter) {\n result = enterHandler(maskedValue, format);\n } else if (!isCommand(keyCode, ctrlKey, metaKey)) {\n event.preventDefault();\n }\n\n if (result) {\n const { value, position } = result;\n\n onMaskChange(value);\n setPosition(position);\n }\n\n // Proxy original event\n onKeyDown && onKeyDown(event);\n },\n onChange: ({ detail }) => onMaskChange(detail.value),\n onBlur: () => {\n if (!disableAutocompleteOnBlur) {\n onAutoComplete(maskedValue, onChange, format);\n }\n\n onBlur && onBlur();\n },\n onPaste: (event: ClipboardEvent) => {\n const text = (event.clipboardData || (window as any).clipboardData).getData('text');\n\n const selectionStart = inputRef.current?.selectionStart || 0;\n const selectionEnd = inputRef.current?.selectionEnd || 0;\n\n const formattedText = format.formatPastedText(text, maskedValue, selectionStart, selectionEnd);\n onMaskChange(formattedText);\n },\n };\n};\n\nexport default useMask;\n"]}
@@ -6,7 +6,7 @@ import clsx from 'clsx';
6
6
  import styles from './styles.css.js';
7
7
  import { Label, LabelTag, Description, Tags, FilteringTags, OptionIcon } from './option-parts';
8
8
  import { getBaseProps } from '../../base-component';
9
- import { warnOnce } from '../../logging';
9
+ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
10
10
  import { isDevelopment } from '../../is-development';
11
11
  function validateStringValue(value, propertyName) {
12
12
  if (typeof value !== 'undefined' && typeof value !== 'string') {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/option/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,SAAS,mBAAmB,CAAC,KAAyB,EAAE,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BAAC,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';\nimport styles from './styles.css.js';\nimport { OptionProps } from './interfaces';\nimport { Label, LabelTag, Description, Tags, FilteringTags, OptionIcon } from './option-parts';\nimport { getBaseProps } from '../../base-component';\nimport { warnOnce } from '../../logging';\nimport { isDevelopment } from '../../is-development';\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 size={option.description || option.tags ? 'big' : '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={clsx(styles.content)}>\n <span className={clsx(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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/option/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE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ACL,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACnC,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;gBAC5C,oBAAC,KAAK,IACJ,KAAK,EAAE,MAAA,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';\nimport styles from './styles.css.js';\nimport { OptionProps } from './interfaces';\nimport { Label, LabelTag, Description, Tags, FilteringTags, OptionIcon } from './option-parts';\nimport { getBaseProps } from '../../base-component';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { isDevelopment } from '../../is-development';\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 size={option.description || option.tags ? 'big' : '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={clsx(styles.content)}>\n <span className={clsx(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"]}
@@ -1,6 +1,6 @@
1
1
 
2
2
  export var PACKAGE_SOURCE = 'components';
3
- export var PACKAGE_VERSION = '3.0.0 (6c67b6e)';
3
+ export var PACKAGE_VERSION = '3.0.0 (3635d7a)';
4
4
  export var THEME = 'open-source-visual-refresh';
5
5
  export var ALWAYS_VISUAL_REFRESH = true;
6
6
 
@@ -1112,6 +1112,10 @@ module.exports.preset = {
1112
1112
  "light": "transparent",
1113
1113
  "dark": "transparent"
1114
1114
  },
1115
+ "colorBorderEditableCellHover": {
1116
+ "light": "{colorBorderDropdownItemHover}",
1117
+ "dark": "{colorBorderDropdownItemHover}"
1118
+ },
1115
1119
  "colorBorderInputDefault": {
1116
1120
  "light": "{colorGrey500}",
1117
1121
  "dark": "{colorGrey550}"
@@ -1224,6 +1228,10 @@ module.exports.preset = {
1224
1228
  "light": "{colorGreyTransparentLight}",
1225
1229
  "dark": "{colorGreyTransparentLight}"
1226
1230
  },
1231
+ "colorStrokeChartLine": {
1232
+ "light": "{colorGrey500}",
1233
+ "dark": "{colorGrey500}"
1234
+ },
1227
1235
  "colorStrokeCodeEditorResizeHandler": {
1228
1236
  "light": "{colorGrey600}",
1229
1237
  "dark": "{colorGrey300}"
@@ -3081,6 +3089,10 @@ module.exports.preset = {
3081
3089
  "light": "transparent",
3082
3090
  "dark": "transparent"
3083
3091
  },
3092
+ "colorBorderEditableCellHover": {
3093
+ "light": "{colorBorderDropdownItemHover}",
3094
+ "dark": "{colorBorderDropdownItemHover}"
3095
+ },
3084
3096
  "colorBorderInputDefault": {
3085
3097
  "light": "{colorGrey550}",
3086
3098
  "dark": "{colorGrey550}"
@@ -3193,6 +3205,10 @@ module.exports.preset = {
3193
3205
  "light": "{colorGreyTransparentLight}",
3194
3206
  "dark": "{colorGreyTransparentLight}"
3195
3207
  },
3208
+ "colorStrokeChartLine": {
3209
+ "light": "{colorGrey500}",
3210
+ "dark": "{colorGrey500}"
3211
+ },
3196
3212
  "colorStrokeCodeEditorResizeHandler": {
3197
3213
  "light": "{colorGrey300}",
3198
3214
  "dark": "{colorGrey300}"
@@ -4075,6 +4091,10 @@ module.exports.preset = {
4075
4091
  "light": "transparent",
4076
4092
  "dark": "transparent"
4077
4093
  },
4094
+ "colorBorderEditableCellHover": {
4095
+ "light": "{colorBorderDropdownItemHover}",
4096
+ "dark": "{colorBorderDropdownItemHover}"
4097
+ },
4078
4098
  "colorBorderInputDefault": {
4079
4099
  "light": "{colorGrey550}",
4080
4100
  "dark": "{colorGrey550}"
@@ -4187,6 +4207,10 @@ module.exports.preset = {
4187
4207
  "light": "{colorGreyTransparentLight}",
4188
4208
  "dark": "{colorGreyTransparentLight}"
4189
4209
  },
4210
+ "colorStrokeChartLine": {
4211
+ "light": "{colorGrey500}",
4212
+ "dark": "{colorGrey500}"
4213
+ },
4190
4214
  "colorStrokeCodeEditorResizeHandler": {
4191
4215
  "light": "{colorGrey300}",
4192
4216
  "dark": "{colorGrey300}"
@@ -5001,6 +5025,10 @@ module.exports.preset = {
5001
5025
  "light": "transparent",
5002
5026
  "dark": "transparent"
5003
5027
  },
5028
+ "colorBorderEditableCellHover": {
5029
+ "light": "{colorBorderDropdownItemHover}",
5030
+ "dark": "{colorBorderDropdownItemHover}"
5031
+ },
5004
5032
  "colorBorderInputDefault": {
5005
5033
  "light": "{colorGrey500}",
5006
5034
  "dark": "{colorGrey550}"
@@ -5113,6 +5141,10 @@ module.exports.preset = {
5113
5141
  "light": "{colorGreyTransparentLight}",
5114
5142
  "dark": "{colorGreyTransparentLight}"
5115
5143
  },
5144
+ "colorStrokeChartLine": {
5145
+ "light": "{colorGrey500}",
5146
+ "dark": "{colorGrey500}"
5147
+ },
5116
5148
  "colorStrokeCodeEditorResizeHandler": {
5117
5149
  "light": "{colorGrey600}",
5118
5150
  "dark": "{colorGrey300}"
@@ -5927,6 +5959,10 @@ module.exports.preset = {
5927
5959
  "light": "transparent",
5928
5960
  "dark": "transparent"
5929
5961
  },
5962
+ "colorBorderEditableCellHover": {
5963
+ "light": "{colorBorderDropdownItemHover}",
5964
+ "dark": "{colorBorderDropdownItemHover}"
5965
+ },
5930
5966
  "colorBorderInputDefault": {
5931
5967
  "light": "{colorGrey500}",
5932
5968
  "dark": "{colorGrey550}"
@@ -6039,6 +6075,10 @@ module.exports.preset = {
6039
6075
  "light": "{colorGreyTransparentLight}",
6040
6076
  "dark": "{colorGreyTransparentLight}"
6041
6077
  },
6078
+ "colorStrokeChartLine": {
6079
+ "light": "{colorGrey500}",
6080
+ "dark": "{colorGrey500}"
6081
+ },
6042
6082
  "colorStrokeCodeEditorResizeHandler": {
6043
6083
  "light": "{colorGrey600}",
6044
6084
  "dark": "{colorGrey300}"
@@ -6853,6 +6893,10 @@ module.exports.preset = {
6853
6893
  "light": "transparent",
6854
6894
  "dark": "transparent"
6855
6895
  },
6896
+ "colorBorderEditableCellHover": {
6897
+ "light": "{colorBorderDropdownItemHover}",
6898
+ "dark": "{colorBorderDropdownItemHover}"
6899
+ },
6856
6900
  "colorBorderInputDefault": {
6857
6901
  "light": "{colorGrey550}",
6858
6902
  "dark": "{colorGrey550}"
@@ -6965,6 +7009,10 @@ module.exports.preset = {
6965
7009
  "light": "{colorGreyTransparentLight}",
6966
7010
  "dark": "{colorGreyTransparentLight}"
6967
7011
  },
7012
+ "colorStrokeChartLine": {
7013
+ "light": "{colorGrey500}",
7014
+ "dark": "{colorGrey500}"
7015
+ },
6968
7016
  "colorStrokeCodeEditorResizeHandler": {
6969
7017
  "light": "{colorGrey300}",
6970
7018
  "dark": "{colorGrey300}"
@@ -7622,6 +7670,7 @@ module.exports.preset = {
7622
7670
  "colorBorderDropdownItemDimmedHover": "color",
7623
7671
  "colorBorderDropdownItemSelected": "color",
7624
7672
  "colorBorderDropdownItemTop": "color",
7673
+ "colorBorderEditableCellHover": "color",
7625
7674
  "colorBorderInputDefault": "color",
7626
7675
  "colorBorderInputDisabled": "color",
7627
7676
  "colorBorderItemFocused": "color",
@@ -7650,6 +7699,7 @@ module.exports.preset = {
7650
7699
  "colorShadowLayoutToggle": "color",
7651
7700
  "colorShadowMedium": "color",
7652
7701
  "colorShadowSide": "color",
7702
+ "colorStrokeChartLine": "color",
7653
7703
  "colorStrokeCodeEditorResizeHandler": "color",
7654
7704
  "colorStrokeCodeEditorGutterActiveLineDefault": "color",
7655
7705
  "colorStrokeCodeEditorGutterActiveLineHover": "color",
@@ -8690,6 +8740,7 @@ module.exports.preset = {
8690
8740
  "colorBorderDropdownItemDimmedHover": "color-border-dropdown-item-dimmed-hover",
8691
8741
  "colorBorderDropdownItemSelected": "color-border-dropdown-item-selected",
8692
8742
  "colorBorderDropdownItemTop": "color-border-dropdown-item-top",
8743
+ "colorBorderEditableCellHover": "color-border-editable-cell-hover",
8693
8744
  "colorBorderInputDefault": "color-border-input-default",
8694
8745
  "colorBorderInputDisabled": "color-border-input-disabled",
8695
8746
  "colorBorderItemFocused": "color-border-item-focused",
@@ -8718,6 +8769,7 @@ module.exports.preset = {
8718
8769
  "colorShadowLayoutToggle": "color-shadow-layout-toggle",
8719
8770
  "colorShadowMedium": "color-shadow-medium",
8720
8771
  "colorShadowSide": "color-shadow-side",
8772
+ "colorStrokeChartLine": "color-stroke-chart-line",
8721
8773
  "colorStrokeCodeEditorResizeHandler": "color-stroke-code-editor-resize-handler",
8722
8774
  "colorStrokeCodeEditorGutterActiveLineDefault": "color-stroke-code-editor-gutter-active-line-default",
8723
8775
  "colorStrokeCodeEditorGutterActiveLineHover": "color-stroke-code-editor-gutter-active-line-hover",
@@ -9360,6 +9412,7 @@ module.exports.preset = {
9360
9412
  "colorBorderDropdownItemDimmedHover": "--color-border-dropdown-item-dimmed-hover-3tdni4",
9361
9413
  "colorBorderDropdownItemSelected": "--color-border-dropdown-item-selected-3zay2y",
9362
9414
  "colorBorderDropdownItemTop": "--color-border-dropdown-item-top-x77i10",
9415
+ "colorBorderEditableCellHover": "--color-border-editable-cell-hover-zeuchn",
9363
9416
  "colorBorderInputDefault": "--color-border-input-default-zb6g42",
9364
9417
  "colorBorderInputDisabled": "--color-border-input-disabled-06dcc0",
9365
9418
  "colorBorderItemFocused": "--color-border-item-focused-4t19h5",
@@ -9388,6 +9441,7 @@ module.exports.preset = {
9388
9441
  "colorShadowLayoutToggle": "--color-shadow-layout-toggle-u6bbly",
9389
9442
  "colorShadowMedium": "--color-shadow-medium-ncb0av",
9390
9443
  "colorShadowSide": "--color-shadow-side-priy5p",
9444
+ "colorStrokeChartLine": "--color-stroke-chart-line-7sdstd",
9391
9445
  "colorStrokeCodeEditorResizeHandler": "--color-stroke-code-editor-resize-handler-upcfz7",
9392
9446
  "colorStrokeCodeEditorGutterActiveLineDefault": "--color-stroke-code-editor-gutter-active-line-default-kc336v",
9393
9447
  "colorStrokeCodeEditorGutterActiveLineHover": "--color-stroke-code-editor-gutter-active-line-hover-czlv75",