@hitachivantara/uikit-react-core 5.68.1 → 5.69.0

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 (59) hide show
  1. package/dist/cjs/Button/Button.cjs +1 -1
  2. package/dist/cjs/Calendar/CalendarHeader/CalendarHeader.styles.cjs +1 -1
  3. package/dist/cjs/Calendar/CalendarNavigation/ComposedNavigation/ComposedNavigation.styles.cjs +1 -1
  4. package/dist/cjs/Calendar/SingleCalendar/SingleCalendar.cjs +4 -3
  5. package/dist/cjs/Calendar/SingleCalendar/SingleCalendar.styles.cjs +4 -12
  6. package/dist/cjs/Calendar/utils.cjs +5 -5
  7. package/dist/cjs/Carousel/Carousel.cjs +2 -3
  8. package/dist/cjs/Pagination/Pagination.cjs +1 -2
  9. package/dist/cjs/ProgressBar/ProgressBar.cjs +1 -2
  10. package/dist/cjs/Table/TableBody/TableBody.cjs +1 -1
  11. package/dist/cjs/Table/TableCell/TableCell.cjs +1 -1
  12. package/dist/cjs/Table/TableHead/TableHead.cjs +1 -1
  13. package/dist/cjs/Table/TableHeader/TableHeader.cjs +1 -1
  14. package/dist/cjs/Table/TableRow/TableRow.cjs +1 -1
  15. package/dist/cjs/Table/TableSectionContext.cjs +2 -2
  16. package/dist/cjs/Typography/Typography.cjs +1 -1
  17. package/dist/cjs/providers/ThemeProvider.cjs +31 -4
  18. package/dist/cjs/utils/helpers.cjs +0 -4
  19. package/dist/esm/BaseSwitch/BaseSwitch.js.map +1 -1
  20. package/dist/esm/Button/Button.js +1 -1
  21. package/dist/esm/Button/Button.js.map +1 -1
  22. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js +1 -1
  23. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  24. package/dist/esm/Calendar/CalendarNavigation/ComposedNavigation/ComposedNavigation.styles.js +1 -1
  25. package/dist/esm/Calendar/CalendarNavigation/ComposedNavigation/ComposedNavigation.styles.js.map +1 -1
  26. package/dist/esm/Calendar/SingleCalendar/SingleCalendar.js +5 -4
  27. package/dist/esm/Calendar/SingleCalendar/SingleCalendar.js.map +1 -1
  28. package/dist/esm/Calendar/SingleCalendar/SingleCalendar.styles.js +4 -12
  29. package/dist/esm/Calendar/SingleCalendar/SingleCalendar.styles.js.map +1 -1
  30. package/dist/esm/Calendar/utils.js +5 -5
  31. package/dist/esm/Calendar/utils.js.map +1 -1
  32. package/dist/esm/Carousel/Carousel.js +2 -3
  33. package/dist/esm/Carousel/Carousel.js.map +1 -1
  34. package/dist/esm/Pagination/Pagination.js +1 -2
  35. package/dist/esm/Pagination/Pagination.js.map +1 -1
  36. package/dist/esm/ProgressBar/ProgressBar.js +1 -2
  37. package/dist/esm/ProgressBar/ProgressBar.js.map +1 -1
  38. package/dist/esm/Switch/Switch.js.map +1 -1
  39. package/dist/esm/Table/TableBody/TableBody.js +1 -1
  40. package/dist/esm/Table/TableBody/TableBody.js.map +1 -1
  41. package/dist/esm/Table/TableCell/TableCell.js +1 -1
  42. package/dist/esm/Table/TableCell/TableCell.js.map +1 -1
  43. package/dist/esm/Table/TableHead/TableHead.js +1 -1
  44. package/dist/esm/Table/TableHead/TableHead.js.map +1 -1
  45. package/dist/esm/Table/TableHeader/TableHeader.js +1 -1
  46. package/dist/esm/Table/TableHeader/TableHeader.js.map +1 -1
  47. package/dist/esm/Table/TableRow/TableRow.js +1 -1
  48. package/dist/esm/Table/TableRow/TableRow.js.map +1 -1
  49. package/dist/esm/Table/TableSectionContext.js +1 -1
  50. package/dist/esm/Table/TableSectionContext.js.map +1 -1
  51. package/dist/esm/Typography/Typography.js +1 -1
  52. package/dist/esm/Typography/Typography.js.map +1 -1
  53. package/dist/esm/Typography/utils.js.map +1 -1
  54. package/dist/esm/providers/ThemeProvider.js +31 -4
  55. package/dist/esm/providers/ThemeProvider.js.map +1 -1
  56. package/dist/esm/utils/helpers.js +0 -4
  57. package/dist/esm/utils/helpers.js.map +1 -1
  58. package/dist/types/index.d.ts +25 -25
  59. package/package.json +7 -6
@@ -1 +1 @@
1
- {"version":3,"file":"TableSectionContext.js","sources":["../../../src/Table/TableSectionContext.ts"],"sourcesContent":["import { createContext } from \"react\";\n\nexport type TableSectionContextProps = {\n type?: string;\n filterClassName?: string;\n};\n\nconst TableSectionContext = createContext<TableSectionContextProps>({});\n\nexport default TableSectionContext;\n"],"names":[],"mappings":";AAOM,MAAA,sBAAsB,cAAwC,CAAE,CAAA;"}
1
+ {"version":3,"file":"TableSectionContext.js","sources":["../../../src/Table/TableSectionContext.ts"],"sourcesContent":["import { createContext } from \"react\";\n\nimport type { HvTableCellType } from \"./Table\";\n\nexport type TableSectionContextValue = {\n type?: HvTableCellType;\n filterClassName?: string;\n};\n\nexport const TableSectionContext = createContext<TableSectionContextValue>({});\n"],"names":[],"mappings":";AASa,MAAA,sBAAsB,cAAwC,CAAE,CAAA;"}
@@ -51,7 +51,7 @@ const HvTypography = fixedForwardRef(function HvTypography2(props, ref) {
51
51
  } = useDefaultProps("HvTypography", props);
52
52
  const { classes, cx } = useClasses(classesProp);
53
53
  const { activeTheme } = useTheme();
54
- const variant = mapVariant(variantProp, activeTheme?.name);
54
+ const variant = mapVariant(variantProp, activeTheme?.base);
55
55
  const Component = ComponentProp || paragraph && "p" || HvTypographyMap[variant] || "span";
56
56
  return /* @__PURE__ */ jsx(
57
57
  Component,
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","sources":["../../../src/Typography/Typography.tsx"],"sourcesContent":["import {\n useDefaultProps,\n useTheme,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n fixedForwardRef,\n PolymorphicComponentRef,\n PolymorphicRef,\n} from \"../types/generic\";\nimport { staticClasses, useClasses } from \"./Typography.styles\";\nimport {\n HvTypographyLegacyVariants,\n HvTypographyVariants,\n mapVariant,\n} from \"./utils\";\n\nexport { staticClasses as typographyClasses };\n\nexport type HvTypographyClasses = ExtractNames<typeof useClasses>;\n\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"span\",\n captionLabel: \"p\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n \"3xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n xlTitle: \"h1\",\n lTitle: \"h2\",\n mTitle: \"h3\",\n sTitle: \"h4\",\n xsTitle: \"h5\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n highlightText: \"p\",\n normalText: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} satisfies Record<\n HvTypographyVariants | HvTypographyLegacyVariants,\n React.ElementType\n>;\n\nexport type HvTypographyProps<C extends React.ElementType = \"p\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Typography. */\n variant?: HvTypographyVariants | HvTypographyLegacyVariants;\n /** If `true` the typography will display the look of a link. */\n link?: boolean;\n /** If `true` the typography will display the look of a disabled state. */\n disabled?: boolean;\n /**\n * If `true`, the typography will render a \"p\" element\n * @deprecated use `component=\"p\"` instead\n * */\n paragraph?: boolean;\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTypographyClasses;\n }\n >;\n\n/**\n * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography = fixedForwardRef(function HvTypography<\n C extends React.ElementType = \"p\",\n>(props: HvTypographyProps<C>, ref: PolymorphicRef<C>) {\n const {\n className,\n component: ComponentProp,\n classes: classesProp,\n variant: variantProp = \"body\",\n link = false,\n noWrap = false,\n paragraph = false,\n disabled = false,\n ...others\n } = useDefaultProps(\"HvTypography\", props);\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const variant = mapVariant(variantProp, activeTheme?.name);\n\n const Component =\n ComponentProp || (paragraph && \"p\") || HvTypographyMap[variant] || \"span\";\n\n return (\n <Component\n ref={ref}\n className={cx(\n classes.root,\n classes[variant],\n {\n [classes.isLink]: link,\n [classes.noWrap]: noWrap,\n [classes.disabled]: disabled,\n },\n className,\n )}\n disabled={disabled}\n {...others}\n />\n );\n});\n"],"names":["HvTypography"],"mappings":";;;;;;AAsBA,MAAM,kBAAkB;AAAA,EACtB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA;AAAA,EAEV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,cAAc;AAChB;AAmCO,MAAM,eAAe,gBAAgB,SAASA,cAEnD,OAA6B,KAAwB;AAC/C,QAAA;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS,cAAc;AAAA,IACvB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,GAAG;AAAA,EAAA,IACD,gBAAgB,gBAAgB,KAAK;AACzC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AACxC,QAAA,EAAE,gBAAgB;AAExB,QAAM,UAAU,WAAW,aAAa,aAAa,IAAI;AAEzD,QAAM,YACJ,iBAAkB,aAAa,OAAQ,gBAAgB,OAAO,KAAK;AAGnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,QAAQ;AAAA,QACR,QAAQ,OAAO;AAAA,QACf;AAAA,UACE,CAAC,QAAQ,MAAM,GAAG;AAAA,UAClB,CAAC,QAAQ,MAAM,GAAG;AAAA,UAClB,CAAC,QAAQ,QAAQ,GAAG;AAAA,QACtB;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
1
+ {"version":3,"file":"Typography.js","sources":["../../../src/Typography/Typography.tsx"],"sourcesContent":["import {\n useDefaultProps,\n useTheme,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n fixedForwardRef,\n PolymorphicComponentRef,\n PolymorphicRef,\n} from \"../types/generic\";\nimport { staticClasses, useClasses } from \"./Typography.styles\";\nimport {\n HvTypographyLegacyVariants,\n HvTypographyVariants,\n mapVariant,\n} from \"./utils\";\n\nexport { staticClasses as typographyClasses };\n\nexport type HvTypographyClasses = ExtractNames<typeof useClasses>;\n\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"span\",\n captionLabel: \"p\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n \"3xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n xlTitle: \"h1\",\n lTitle: \"h2\",\n mTitle: \"h3\",\n sTitle: \"h4\",\n xsTitle: \"h5\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n highlightText: \"p\",\n normalText: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} satisfies Record<\n HvTypographyVariants | HvTypographyLegacyVariants,\n React.ElementType\n>;\n\nexport type HvTypographyProps<C extends React.ElementType = \"p\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Typography. */\n variant?: HvTypographyVariants | HvTypographyLegacyVariants;\n /** If `true` the typography will display the look of a link. */\n link?: boolean;\n /** If `true` the typography will display the look of a disabled state. */\n disabled?: boolean;\n /**\n * If `true`, the typography will render a \"p\" element\n * @deprecated use `component=\"p\"` instead\n * */\n paragraph?: boolean;\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTypographyClasses;\n }\n >;\n\n/**\n * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography = fixedForwardRef(function HvTypography<\n C extends React.ElementType = \"p\",\n>(props: HvTypographyProps<C>, ref: PolymorphicRef<C>) {\n const {\n className,\n component: ComponentProp,\n classes: classesProp,\n variant: variantProp = \"body\",\n link = false,\n noWrap = false,\n paragraph = false,\n disabled = false,\n ...others\n } = useDefaultProps(\"HvTypography\", props);\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const variant = mapVariant(variantProp, activeTheme?.base);\n\n const Component =\n ComponentProp || (paragraph && \"p\") || HvTypographyMap[variant] || \"span\";\n\n return (\n <Component\n ref={ref}\n className={cx(\n classes.root,\n classes[variant],\n {\n [classes.isLink]: link,\n [classes.noWrap]: noWrap,\n [classes.disabled]: disabled,\n },\n className,\n )}\n disabled={disabled}\n {...others}\n />\n );\n});\n"],"names":["HvTypography"],"mappings":";;;;;;AAsBA,MAAM,kBAAkB;AAAA,EACtB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA;AAAA,EAEV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,cAAc;AAChB;AAmCO,MAAM,eAAe,gBAAgB,SAASA,cAEnD,OAA6B,KAAwB;AAC/C,QAAA;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,SAAS,cAAc;AAAA,IACvB,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,GAAG;AAAA,EAAA,IACD,gBAAgB,gBAAgB,KAAK;AACzC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AACxC,QAAA,EAAE,gBAAgB;AAExB,QAAM,UAAU,WAAW,aAAa,aAAa,IAAI;AAEzD,QAAM,YACJ,iBAAkB,aAAa,OAAQ,gBAAgB,OAAO,KAAK;AAGnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,QAAQ;AAAA,QACR,QAAQ,OAAO;AAAA,QACf;AAAA,UACE,CAAC,QAAQ,MAAM,GAAG;AAAA,UAClB,CAAC,QAAQ,MAAM,GAAG;AAAA,UAClB,CAAC,QAAQ,QAAQ,GAAG;AAAA,QACtB;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/Typography/utils.ts"],"sourcesContent":["export const typographyVariants = [\n \"display\",\n \"title1\",\n \"title2\",\n \"title3\",\n \"title4\",\n \"body\",\n \"label\",\n \"captionLabel\",\n \"caption1\",\n \"caption2\",\n] as const;\n\nexport type HvTypographyVariants = (typeof typographyVariants)[number];\n\n/** @deprecated */\nexport type HvTypographyLegacyVariants =\n | \"5xlTitle\"\n | \"4xlTitle\"\n | \"3xlTitle\"\n | \"xxlTitle\"\n | \"xlTitle\"\n | \"lTitle\"\n | \"mTitle\"\n | \"sTitle\"\n | \"xsTitle\"\n | \"xxsTitle\"\n | \"sectionTitle\"\n | \"highlightText\"\n | \"normalText\"\n | \"placeholderText\"\n | \"link\"\n | \"disabledText\"\n | \"selectedNavText\"\n | \"vizText\"\n | \"vizTextDisabled\"\n | \"xsInlineLink\";\n\ntype Variant = HvTypographyVariants | HvTypographyLegacyVariants;\n\nconst mappableVariants = new Map<Variant, HvTypographyVariants>([\n [\"3xlTitle\", \"display\"],\n [\"xlTitle\", \"title1\"],\n [\"mTitle\", \"title2\"],\n [\"xsTitle\", \"title3\"],\n [\"highlightText\", \"label\"],\n [\"normalText\", \"body\"],\n [\"vizText\", \"caption1\"],\n]);\n\nconst isLegacyVariant = (variant: string) => {\n return [\n \"5xlTitle\",\n \"4xlTitle\",\n \"3xlTitle\",\n \"xxlTitle\",\n \"xlTitle\",\n \"lTitle\",\n \"mTitle\",\n \"sTitle\",\n \"xsTitle\",\n \"xxsTitle\",\n \"sectionTitle\",\n \"highlightText\",\n \"normalText\",\n \"placeholderText\",\n \"link\",\n \"disabledText\",\n \"selectedNavText\",\n \"vizText\",\n \"vizTextDisabled\",\n \"xsInlineLink\",\n ].includes(variant);\n};\n\nexport const mapVariant = (variant: Variant, theme?: string) => {\n if (theme === \"ds3\") return variant;\n const mappedVariant = mappableVariants.get(variant);\n\n if (import.meta.env.DEV) {\n /* eslint-disable no-console */\n const msg = `The typography variant ${variant} is deprecated.`;\n if (mappedVariant) {\n console.warn(`${msg} Use ${mappedVariant} instead.`);\n }\n if (isLegacyVariant(variant)) {\n console.warn(msg);\n }\n }\n\n return mappedVariant || variant;\n};\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA6BA,MAAM,uCAAuB,IAAmC;AAAA,EAC9D,CAAC,YAAY,SAAS;AAAA,EACtB,CAAC,WAAW,QAAQ;AAAA,EACpB,CAAC,UAAU,QAAQ;AAAA,EACnB,CAAC,WAAW,QAAQ;AAAA,EACpB,CAAC,iBAAiB,OAAO;AAAA,EACzB,CAAC,cAAc,MAAM;AAAA,EACrB,CAAC,WAAW,UAAU;AACxB,CAAC;AA2BY,MAAA,aAAa,CAAC,SAAkB,UAAmB;AAC1D,MAAA,UAAU,MAAc,QAAA;AACtB,QAAA,gBAAgB,iBAAiB,IAAI,OAAO;AAalD,SAAO,iBAAiB;AAC1B;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/Typography/utils.ts"],"sourcesContent":["import { HvBaseTheme } from \"@hitachivantara/uikit-styles\";\n\nexport const typographyVariants = [\n \"display\",\n \"title1\",\n \"title2\",\n \"title3\",\n \"title4\",\n \"body\",\n \"label\",\n \"captionLabel\",\n \"caption1\",\n \"caption2\",\n] as const;\n\nexport type HvTypographyVariants = (typeof typographyVariants)[number];\n\n/** @deprecated */\nexport type HvTypographyLegacyVariants =\n | \"5xlTitle\"\n | \"4xlTitle\"\n | \"3xlTitle\"\n | \"xxlTitle\"\n | \"xlTitle\"\n | \"lTitle\"\n | \"mTitle\"\n | \"sTitle\"\n | \"xsTitle\"\n | \"xxsTitle\"\n | \"sectionTitle\"\n | \"highlightText\"\n | \"normalText\"\n | \"placeholderText\"\n | \"link\"\n | \"disabledText\"\n | \"selectedNavText\"\n | \"vizText\"\n | \"vizTextDisabled\"\n | \"xsInlineLink\";\n\ntype Variant = HvTypographyVariants | HvTypographyLegacyVariants;\n\nconst mappableVariants = new Map<Variant, HvTypographyVariants>([\n [\"3xlTitle\", \"display\"],\n [\"xlTitle\", \"title1\"],\n [\"mTitle\", \"title2\"],\n [\"xsTitle\", \"title3\"],\n [\"highlightText\", \"label\"],\n [\"normalText\", \"body\"],\n [\"vizText\", \"caption1\"],\n]);\n\nconst isLegacyVariant = (variant: string) => {\n return [\n \"5xlTitle\",\n \"4xlTitle\",\n \"3xlTitle\",\n \"xxlTitle\",\n \"xlTitle\",\n \"lTitle\",\n \"mTitle\",\n \"sTitle\",\n \"xsTitle\",\n \"xxsTitle\",\n \"sectionTitle\",\n \"highlightText\",\n \"normalText\",\n \"placeholderText\",\n \"link\",\n \"disabledText\",\n \"selectedNavText\",\n \"vizText\",\n \"vizTextDisabled\",\n \"xsInlineLink\",\n ].includes(variant);\n};\n\nexport const mapVariant = (variant: Variant, theme?: HvBaseTheme) => {\n if (theme === \"ds3\") return variant;\n const mappedVariant = mappableVariants.get(variant);\n\n if (import.meta.env.DEV) {\n /* eslint-disable no-console */\n const msg = `The typography variant ${variant} is deprecated.`;\n if (mappedVariant) {\n console.warn(`${msg} Use ${mappedVariant} instead.`);\n }\n if (isLegacyVariant(variant)) {\n console.warn(msg);\n }\n }\n\n return mappedVariant || variant;\n};\n"],"names":[],"mappings":"AAEO,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA6BA,MAAM,uCAAuB,IAAmC;AAAA,EAC9D,CAAC,YAAY,SAAS;AAAA,EACtB,CAAC,WAAW,QAAQ;AAAA,EACpB,CAAC,UAAU,QAAQ;AAAA,EACnB,CAAC,WAAW,QAAQ;AAAA,EACpB,CAAC,iBAAiB,OAAO;AAAA,EACzB,CAAC,cAAc,MAAM;AAAA,EACrB,CAAC,WAAW,UAAU;AACxB,CAAC;AA2BY,MAAA,aAAa,CAAC,SAAkB,UAAwB;AAC/D,MAAA,UAAU,MAAc,QAAA;AACtB,QAAA,gBAAgB,iBAAiB,IAAI,OAAO;AAalD,SAAO,iBAAiB;AAC1B;"}
@@ -58,7 +58,36 @@ const HvThemeProvider = ({
58
58
  ]
59
59
  );
60
60
  const muiTheme = useMemo(() => {
61
+ const colors = activeTheme.colors.modes[colorMode];
61
62
  return createTheme({
63
+ spacing: activeTheme.space.base,
64
+ typography: {
65
+ fontFamily: activeTheme.fontFamily.body
66
+ },
67
+ palette: {
68
+ primary: { main: colors.primary },
69
+ success: { main: colors.positive },
70
+ warning: { main: colors.warning },
71
+ error: { main: colors.negative },
72
+ info: { main: colors.primary },
73
+ text: {
74
+ primary: colors.secondary,
75
+ secondary: colors.secondary_80,
76
+ disabled: colors.secondary_60
77
+ },
78
+ background: {
79
+ default: colors.atmo2,
80
+ paper: colors.atmo1
81
+ },
82
+ divider: colors.atmo4,
83
+ action: {
84
+ active: colors.primary,
85
+ hover: colors.primary_80,
86
+ selected: colors.primary_80,
87
+ disabled: colors.secondary_60,
88
+ disabledBackground: colors.atmo3
89
+ }
90
+ },
62
91
  components: {
63
92
  MuiButtonBase: {
64
93
  defaultProps: {
@@ -66,11 +95,9 @@ const HvThemeProvider = ({
66
95
  }
67
96
  }
68
97
  },
69
- breakpoints: {
70
- ...activeTheme.breakpoints
71
- }
98
+ breakpoints: activeTheme.breakpoints
72
99
  });
73
- }, [activeTheme.breakpoints]);
100
+ }, [activeTheme, colorMode]);
74
101
  const emotionCacheValue = useMemo(
75
102
  () => ({ cache: emotionCache }),
76
103
  [emotionCache]
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sources":["../../../src/providers/ThemeProvider.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { EmotionCache } from \"@emotion/cache\";\nimport {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport {\n defaultCacheKey,\n defaultEmotionCache,\n EmotionContext,\n HvThemeContext,\n type HvThemeContextValue,\n} from \"@hitachivantara/uikit-react-shared\";\nimport { HvThemeStructure, parseTheme } from \"@hitachivantara/uikit-styles\";\n\nimport { HvTheme } from \"../types/theme\";\nimport { setElementAttrs } from \"../utils/theme\";\n\nexport { HvThemeContext };\nexport type { HvThemeContextValue };\n\nexport { defaultCacheKey, defaultEmotionCache, EmotionContext };\n\ninterface HvThemeProviderProps {\n children: React.ReactNode;\n themes: (HvTheme | HvThemeStructure)[];\n theme: string;\n emotionCache: EmotionCache;\n colorMode: string;\n themeRootId?: string;\n}\n\nexport const HvThemeProvider = ({\n children,\n themes: themesList,\n theme: themeProp,\n emotionCache,\n colorMode: colorModeProp,\n themeRootId: rootId,\n}: HvThemeProviderProps) => {\n const [theme, setTheme] = useState(themeProp);\n const [colorMode, setColorMode] = useState(colorModeProp);\n\n const {\n theme: activeTheme,\n selectedTheme,\n selectedMode,\n colorModes,\n colorScheme,\n } = parseTheme(themesList, theme, colorMode);\n\n const themes = themesList.map((t) => t.name);\n\n // review in v6 so that theme/colorMode isn't both controlled & uncontrolled\n useEffect(() => {\n setTheme(themeProp);\n setColorMode(colorModeProp);\n }, [colorModeProp, themeProp]);\n\n useEffect(() => {\n setElementAttrs(selectedTheme, selectedMode, colorScheme, rootId);\n }, [colorScheme, rootId, selectedMode, selectedTheme]);\n\n const changeTheme = useCallback(\n (newTheme = selectedTheme, newMode = selectedMode) => {\n setTheme(newTheme);\n setColorMode(newMode);\n },\n [selectedMode, selectedTheme],\n );\n\n const value = useMemo<HvThemeContextValue>(\n () => ({\n themes,\n colorModes,\n activeTheme: activeTheme as HvTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n }),\n [\n themes,\n colorModes,\n activeTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n ],\n );\n\n const muiTheme = useMemo(() => {\n return createTheme({\n components: {\n MuiButtonBase: {\n defaultProps: {\n disableRipple: true,\n },\n },\n },\n breakpoints: {\n ...activeTheme.breakpoints,\n },\n });\n }, [activeTheme.breakpoints]);\n\n const emotionCacheValue = useMemo(\n () => ({ cache: emotionCache }),\n [emotionCache],\n );\n\n return (\n <MuiThemeProvider theme={muiTheme}>\n <HvThemeContext.Provider value={value}>\n <EmotionContext.Provider value={emotionCacheValue}>\n {children}\n </EmotionContext.Provider>\n </HvThemeContext.Provider>\n </MuiThemeProvider>\n );\n};\n"],"names":["MuiThemeProvider"],"mappings":";;;;;;;AAgCO,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AACf,MAA4B;AAC1B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,SAAS;AAC5C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,aAAa;AAElD,QAAA;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACE,IAAA,WAAW,YAAY,OAAO,SAAS;AAE3C,QAAM,SAAS,WAAW,IAAI,CAAC,MAAM,EAAE,IAAI;AAG3C,YAAU,MAAM;AACd,aAAS,SAAS;AAClB,iBAAa,aAAa;AAAA,EAAA,GACzB,CAAC,eAAe,SAAS,CAAC;AAE7B,YAAU,MAAM;AACE,oBAAA,eAAe,cAAc,aAAa,MAAM;AAAA,KAC/D,CAAC,aAAa,QAAQ,cAAc,aAAa,CAAC;AAErD,QAAM,cAAc;AAAA,IAClB,CAAC,WAAW,eAAe,UAAU,iBAAiB;AACpD,eAAS,QAAQ;AACjB,mBAAa,OAAO;AAAA,IACtB;AAAA,IACA,CAAC,cAAc,aAAa;AAAA,EAAA;AAG9B,QAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGI,QAAA,WAAW,QAAQ,MAAM;AAC7B,WAAO,YAAY;AAAA,MACjB,YAAY;AAAA,QACV,eAAe;AAAA,UACb,cAAc;AAAA,YACZ,eAAe;AAAA,UACjB;AAAA,QACF;AAAA,MACF;AAAA,MACA,aAAa;AAAA,QACX,GAAG,YAAY;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,EAAA,GACA,CAAC,YAAY,WAAW,CAAC;AAE5B,QAAM,oBAAoB;AAAA,IACxB,OAAO,EAAE,OAAO;IAChB,CAAC,YAAY;AAAA,EAAA;AAGf,6BACGA,eAAiB,EAAA,OAAO,UACvB,UAAA,oBAAC,eAAe,UAAf,EAAwB,OACvB,UAAA,oBAAC,eAAe,UAAf,EAAwB,OAAO,mBAC7B,SACH,CAAA,GACF,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"ThemeProvider.js","sources":["../../../src/providers/ThemeProvider.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { EmotionCache } from \"@emotion/cache\";\nimport {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport {\n defaultCacheKey,\n defaultEmotionCache,\n EmotionContext,\n HvThemeContext,\n type HvThemeContextValue,\n} from \"@hitachivantara/uikit-react-shared\";\nimport { HvThemeStructure, parseTheme } from \"@hitachivantara/uikit-styles\";\n\nimport { HvTheme } from \"../types/theme\";\nimport { setElementAttrs } from \"../utils/theme\";\n\nexport { HvThemeContext };\nexport type { HvThemeContextValue };\n\nexport { defaultCacheKey, defaultEmotionCache, EmotionContext };\n\ninterface HvThemeProviderProps {\n children: React.ReactNode;\n themes: (HvTheme | HvThemeStructure)[];\n theme: string;\n emotionCache: EmotionCache;\n colorMode: string;\n themeRootId?: string;\n}\n\nexport const HvThemeProvider = ({\n children,\n themes: themesList,\n theme: themeProp,\n emotionCache,\n colorMode: colorModeProp,\n themeRootId: rootId,\n}: HvThemeProviderProps) => {\n const [theme, setTheme] = useState(themeProp);\n const [colorMode, setColorMode] = useState(colorModeProp);\n\n const {\n theme: activeTheme,\n selectedTheme,\n selectedMode,\n colorModes,\n colorScheme,\n } = parseTheme(themesList, theme, colorMode);\n\n const themes = themesList.map((t) => t.name);\n\n // review in v6 so that theme/colorMode isn't both controlled & uncontrolled\n useEffect(() => {\n setTheme(themeProp);\n setColorMode(colorModeProp);\n }, [colorModeProp, themeProp]);\n\n useEffect(() => {\n setElementAttrs(selectedTheme, selectedMode, colorScheme, rootId);\n }, [colorScheme, rootId, selectedMode, selectedTheme]);\n\n const changeTheme = useCallback(\n (newTheme = selectedTheme, newMode = selectedMode) => {\n setTheme(newTheme);\n setColorMode(newMode);\n },\n [selectedMode, selectedTheme],\n );\n\n const value = useMemo<HvThemeContextValue>(\n () => ({\n themes,\n colorModes,\n activeTheme: activeTheme as HvTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n }),\n [\n themes,\n colorModes,\n activeTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n ],\n );\n\n const muiTheme = useMemo(() => {\n const colors = activeTheme.colors.modes[colorMode];\n return createTheme({\n spacing: activeTheme.space.base,\n typography: {\n fontFamily: activeTheme.fontFamily.body,\n },\n palette: {\n primary: { main: colors.primary },\n success: { main: colors.positive },\n warning: { main: colors.warning },\n error: { main: colors.negative },\n info: { main: colors.primary },\n text: {\n primary: colors.secondary,\n secondary: colors.secondary_80,\n disabled: colors.secondary_60,\n },\n background: {\n default: colors.atmo2,\n paper: colors.atmo1,\n },\n divider: colors.atmo4,\n action: {\n active: colors.primary,\n hover: colors.primary_80,\n selected: colors.primary_80,\n disabled: colors.secondary_60,\n disabledBackground: colors.atmo3,\n },\n },\n components: {\n MuiButtonBase: {\n defaultProps: {\n disableRipple: true,\n },\n },\n },\n breakpoints: activeTheme.breakpoints,\n });\n }, [activeTheme, colorMode]);\n\n const emotionCacheValue = useMemo(\n () => ({ cache: emotionCache }),\n [emotionCache],\n );\n\n return (\n <MuiThemeProvider theme={muiTheme}>\n <HvThemeContext.Provider value={value}>\n <EmotionContext.Provider value={emotionCacheValue}>\n {children}\n </EmotionContext.Provider>\n </HvThemeContext.Provider>\n </MuiThemeProvider>\n );\n};\n"],"names":["MuiThemeProvider"],"mappings":";;;;;;;AAgCO,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AACf,MAA4B;AAC1B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,SAAS;AAC5C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,aAAa;AAElD,QAAA;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACE,IAAA,WAAW,YAAY,OAAO,SAAS;AAE3C,QAAM,SAAS,WAAW,IAAI,CAAC,MAAM,EAAE,IAAI;AAG3C,YAAU,MAAM;AACd,aAAS,SAAS;AAClB,iBAAa,aAAa;AAAA,EAAA,GACzB,CAAC,eAAe,SAAS,CAAC;AAE7B,YAAU,MAAM;AACE,oBAAA,eAAe,cAAc,aAAa,MAAM;AAAA,KAC/D,CAAC,aAAa,QAAQ,cAAc,aAAa,CAAC;AAErD,QAAM,cAAc;AAAA,IAClB,CAAC,WAAW,eAAe,UAAU,iBAAiB;AACpD,eAAS,QAAQ;AACjB,mBAAa,OAAO;AAAA,IACtB;AAAA,IACA,CAAC,cAAc,aAAa;AAAA,EAAA;AAG9B,QAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGI,QAAA,WAAW,QAAQ,MAAM;AAC7B,UAAM,SAAS,YAAY,OAAO,MAAM,SAAS;AACjD,WAAO,YAAY;AAAA,MACjB,SAAS,YAAY,MAAM;AAAA,MAC3B,YAAY;AAAA,QACV,YAAY,YAAY,WAAW;AAAA,MACrC;AAAA,MACA,SAAS;AAAA,QACP,SAAS,EAAE,MAAM,OAAO,QAAQ;AAAA,QAChC,SAAS,EAAE,MAAM,OAAO,SAAS;AAAA,QACjC,SAAS,EAAE,MAAM,OAAO,QAAQ;AAAA,QAChC,OAAO,EAAE,MAAM,OAAO,SAAS;AAAA,QAC/B,MAAM,EAAE,MAAM,OAAO,QAAQ;AAAA,QAC7B,MAAM;AAAA,UACJ,SAAS,OAAO;AAAA,UAChB,WAAW,OAAO;AAAA,UAClB,UAAU,OAAO;AAAA,QACnB;AAAA,QACA,YAAY;AAAA,UACV,SAAS,OAAO;AAAA,UAChB,OAAO,OAAO;AAAA,QAChB;AAAA,QACA,SAAS,OAAO;AAAA,QAChB,QAAQ;AAAA,UACN,QAAQ,OAAO;AAAA,UACf,OAAO,OAAO;AAAA,UACd,UAAU,OAAO;AAAA,UACjB,UAAU,OAAO;AAAA,UACjB,oBAAoB,OAAO;AAAA,QAC7B;AAAA,MACF;AAAA,MACA,YAAY;AAAA,QACV,eAAe;AAAA,UACb,cAAc;AAAA,YACZ,eAAe;AAAA,UACjB;AAAA,QACF;AAAA,MACF;AAAA,MACA,aAAa,YAAY;AAAA,IAAA,CAC1B;AAAA,EAAA,GACA,CAAC,aAAa,SAAS,CAAC;AAE3B,QAAM,oBAAoB;AAAA,IACxB,OAAO,EAAE,OAAO;IAChB,CAAC,YAAY;AAAA,EAAA;AAGf,6BACGA,eAAiB,EAAA,OAAO,UACvB,UAAA,oBAAC,eAAe,UAAf,EAAwB,OACvB,UAAA,oBAAC,eAAe,UAAf,EAAwB,OAAO,mBAC7B,SACH,CAAA,GACF,EACF,CAAA;AAEJ;"}
@@ -7,9 +7,6 @@ const range = (length, start = 0) => {
7
7
  const capitalize = (string = "") => {
8
8
  return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
9
9
  };
10
- const clamp = (value, max = 100, min = 0) => {
11
- return Math.min(Math.max(value, min), max);
12
- };
13
10
  function isEqual(obj1, obj2) {
14
11
  if (!obj1 || !obj2 || typeof obj1 !== "object" || typeof obj2 !== "object") {
15
12
  return obj1 === obj2;
@@ -25,7 +22,6 @@ function isEqual(obj1, obj2) {
25
22
  }
26
23
  export {
27
24
  capitalize,
28
- clamp,
29
25
  isEqual,
30
26
  range,
31
27
  uniqueId
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../src/utils/helpers.ts"],"sourcesContent":["export const uniqueId = (prefix = \"\") => {\n return `${prefix}${Math.random().toString(36).slice(2, 9)}`;\n};\n\nexport const range = (length: number, start = 0) => {\n return Array.from({ length: length - start }, (_, i) => i + start);\n};\n\nexport const capitalize = (string = \"\") => {\n return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n};\n\nexport const clamp = (value: number, max = 100, min = 0) => {\n return Math.min(Math.max(value, min), max);\n};\n\nexport function isEqual(obj1: unknown, obj2: unknown) {\n if (!obj1 || !obj2 || typeof obj1 !== \"object\" || typeof obj2 !== \"object\") {\n return obj1 === obj2;\n }\n\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (\n !isEqual(obj1[key as keyof typeof obj1], obj2[key as keyof typeof obj2])\n )\n return false;\n }\n\n return true;\n}\n"],"names":[],"mappings":"AAAa,MAAA,WAAW,CAAC,SAAS,OAAO;AACvC,SAAO,GAAG,MAAM,GAAG,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC3D;AAEO,MAAM,QAAQ,CAAC,QAAgB,QAAQ,MAAM;AAC3C,SAAA,MAAM,KAAK,EAAE,QAAQ,SAAS,SAAS,CAAC,GAAG,MAAM,IAAI,KAAK;AACnE;AAEa,MAAA,aAAa,CAAC,SAAS,OAAO;AAClC,SAAA,OAAO,OAAO,CAAC,EAAE,YAAA,IAAgB,OAAO,MAAM,CAAC,EAAE;AAC1D;AAEO,MAAM,QAAQ,CAAC,OAAe,MAAM,KAAK,MAAM,MAAM;AAC1D,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;AAEgB,SAAA,QAAQ,MAAe,MAAe;AAChD,MAAA,CAAC,QAAQ,CAAC,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AAC1E,WAAO,SAAS;AAAA,EAClB;AAEM,QAAA,QAAQ,OAAO,KAAK,IAAI;AACxB,QAAA,QAAQ,OAAO,KAAK,IAAI;AAE9B,MAAI,MAAM,WAAW,MAAM,OAAe,QAAA;AAE1C,aAAW,OAAO,OAAO;AACvB,QACE,CAAC,QAAQ,KAAK,GAAwB,GAAG,KAAK,GAAwB,CAAC;AAEhE,aAAA;AAAA,EACX;AAEO,SAAA;AACT;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/utils/helpers.ts"],"sourcesContent":["export const uniqueId = (prefix = \"\") => {\n return `${prefix}${Math.random().toString(36).slice(2, 9)}`;\n};\n\nexport const range = (length: number, start = 0) => {\n return Array.from({ length: length - start }, (_, i) => i + start);\n};\n\nexport const capitalize = (string = \"\") => {\n return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n};\n\nexport function isEqual(obj1: unknown, obj2: unknown) {\n if (!obj1 || !obj2 || typeof obj1 !== \"object\" || typeof obj2 !== \"object\") {\n return obj1 === obj2;\n }\n\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (\n !isEqual(obj1[key as keyof typeof obj1], obj2[key as keyof typeof obj2])\n )\n return false;\n }\n\n return true;\n}\n"],"names":[],"mappings":"AAAa,MAAA,WAAW,CAAC,SAAS,OAAO;AACvC,SAAO,GAAG,MAAM,GAAG,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC3D;AAEO,MAAM,QAAQ,CAAC,QAAgB,QAAQ,MAAM;AAC3C,SAAA,MAAM,KAAK,EAAE,QAAQ,SAAS,SAAS,CAAC,GAAG,MAAM,IAAI,KAAK;AACnE;AAEa,MAAA,aAAa,CAAC,SAAS,OAAO;AAClC,SAAA,OAAO,OAAO,CAAC,EAAE,YAAA,IAAgB,OAAO,MAAM,CAAC,EAAE;AAC1D;AAEgB,SAAA,QAAQ,MAAe,MAAe;AAChD,MAAA,CAAC,QAAQ,CAAC,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,UAAU;AAC1E,WAAO,SAAS;AAAA,EAClB;AAEM,QAAA,QAAQ,OAAO,KAAK,IAAI;AACxB,QAAA,QAAQ,OAAO,KAAK,IAAI;AAE9B,MAAI,MAAM,WAAW,MAAM,OAAe,QAAA;AAE1C,aAAW,OAAO,OAAO;AACvB,QACE,CAAC,QAAQ,KAAK,GAAwB,GAAG,KAAK,GAAwB,CAAC;AAEhE,aAAA;AAAA,EACX;AAEO,SAAA;AACT;"}
@@ -426,9 +426,9 @@ export declare const buttonClasses: {
426
426
  root: "HvButton-root";
427
427
  disabled: "HvButton-disabled";
428
428
  semantic: "HvButton-semantic";
429
+ icon: "HvButton-icon";
429
430
  secondarySubtle: "HvButton-secondarySubtle";
430
431
  ghost: "HvButton-ghost";
431
- icon: "HvButton-icon";
432
432
  secondaryGhost: "HvButton-secondaryGhost";
433
433
  primaryGhost: "HvButton-primaryGhost";
434
434
  subtle: "HvButton-subtle";
@@ -465,8 +465,8 @@ export declare const calendarHeaderClasses: {
465
465
 
466
466
  export declare const cardClasses: {
467
467
  root: "HvCard-root";
468
- selectable: "HvCard-selectable";
469
468
  icon: "HvCard-icon";
469
+ selectable: "HvCard-selectable";
470
470
  selected: "HvCard-selected";
471
471
  semanticContainer: "HvCard-semanticContainer";
472
472
  semanticBar: "HvCard-semanticBar";
@@ -558,8 +558,8 @@ export declare const checkBoxGroupClasses: {
558
558
  export declare const checkValidHexColorValue: (value?: string) => boolean;
559
559
 
560
560
  export declare const colorPickerClasses: {
561
- colorPicker: "HvColorPicker-colorPicker";
562
561
  label: "HvColorPicker-label";
562
+ colorPicker: "HvColorPicker-colorPicker";
563
563
  root: "HvColorPicker-root";
564
564
  panel: "HvColorPicker-panel";
565
565
  headerColorValue: "HvColorPicker-headerColorValue";
@@ -1871,7 +1871,7 @@ export declare interface HvBaseSwitchProps extends Omit<SwitchProps, "onChange"
1871
1871
  /**
1872
1872
  * The callback fired when the switch is pressed.
1873
1873
  */
1874
- onChange?: (event: React.ChangeEvent, checked: boolean, value: any) => void;
1874
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean, value: any) => void;
1875
1875
  /**
1876
1876
  * Properties passed on to the input element.
1877
1877
  */
@@ -6093,7 +6093,7 @@ export declare interface HvSwitchProps extends Omit<SwitchProps, "onChange" | "c
6093
6093
  /**
6094
6094
  * The callback fired when the switch is pressed.
6095
6095
  */
6096
- onChange?: (event: React.ChangeEvent, checked: boolean, value: any) => void;
6096
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean, value: any) => void;
6097
6097
  /**
6098
6098
  * Properties passed on to the input element.
6099
6099
  */
@@ -7541,8 +7541,8 @@ export declare const listItemClasses: {
7541
7541
 
7542
7542
  export declare const loadingClasses: {
7543
7543
  overlay: "HvLoading-overlay";
7544
- small: "HvLoading-small";
7545
7544
  label: "HvLoading-label";
7545
+ small: "HvLoading-small";
7546
7546
  root: "HvLoading-root";
7547
7547
  hidden: "HvLoading-hidden";
7548
7548
  blur: "HvLoading-blur";
@@ -8148,12 +8148,12 @@ export declare const timePickerClasses: {
8148
8148
 
8149
8149
  export declare const tooltipClasses: {
8150
8150
  color: "HvTooltip-color";
8151
- values: "HvTooltip-values";
8152
8151
  root: "HvTooltip-root";
8153
8152
  title: "HvTooltip-title";
8154
8153
  popper: "HvTooltip-popper";
8155
8154
  separator: "HvTooltip-separator";
8156
8155
  tooltip: "HvTooltip-tooltip";
8156
+ values: "HvTooltip-values";
8157
8157
  tooltipMulti: "HvTooltip-tooltipMulti";
8158
8158
  valuesContainer: "HvTooltip-valuesContainer";
8159
8159
  separatorColor: "HvTooltip-separatorColor";
@@ -8185,8 +8185,8 @@ export declare const treeViewItemClasses: {
8185
8185
  label: "HvVerticalNavigationTreeViewItem-label";
8186
8186
  link: "HvVerticalNavigationTreeViewItem-link";
8187
8187
  disabled: "HvVerticalNavigationTreeViewItem-disabled";
8188
- selectable: "HvVerticalNavigationTreeViewItem-selectable";
8189
8188
  icon: "HvVerticalNavigationTreeViewItem-icon";
8189
+ selectable: "HvVerticalNavigationTreeViewItem-selectable";
8190
8190
  selected: "HvVerticalNavigationTreeViewItem-selected";
8191
8191
  hide: "HvVerticalNavigationTreeViewItem-hide";
8192
8192
  expanded: "HvVerticalNavigationTreeViewItem-expanded";
@@ -8222,8 +8222,6 @@ declare type TreeViewSelectionValue<Multiple extends boolean | undefined> = Mult
8222
8222
 
8223
8223
  export declare const typographyClasses: {
8224
8224
  display: "HvTypography-display";
8225
- "5xlTitle": "HvTypography-5xlTitle";
8226
- "4xlTitle": "HvTypography-4xlTitle";
8227
8225
  title1: "HvTypography-title1";
8228
8226
  title2: "HvTypography-title2";
8229
8227
  title3: "HvTypography-title3";
@@ -8233,6 +8231,8 @@ export declare const typographyClasses: {
8233
8231
  captionLabel: "HvTypography-captionLabel";
8234
8232
  caption1: "HvTypography-caption1";
8235
8233
  caption2: "HvTypography-caption2";
8234
+ "5xlTitle": "HvTypography-5xlTitle";
8235
+ "4xlTitle": "HvTypography-4xlTitle";
8236
8236
  xxlTitle: "HvTypography-xxlTitle";
8237
8237
  lTitle: "HvTypography-lTitle";
8238
8238
  sTitle: "HvTypography-sTitle";
@@ -8265,11 +8265,9 @@ export declare type UseBulkActionsProps = (<D extends object = Record<string, un
8265
8265
  pluginName: string;
8266
8266
  };
8267
8267
 
8268
- declare const useClasses: (classesProp?: Partial<Record<"display" | "5xlTitle" | "4xlTitle" | "title1" | "title2" | "title3" | "title4" | "label" | "body" | "captionLabel" | "caption1" | "caption2" | "xxlTitle" | "lTitle" | "sTitle" | "xxsTitle" | "sectionTitle" | "placeholderText" | "link" | "disabledText" | "selectedNavText" | "vizTextDisabled" | "xsInlineLink" | "root" | "disabled" | "isLink" | "noWrap" | "3xlTitle" | "xlTitle" | "mTitle" | "xsTitle" | "highlightText" | "normalText" | "vizText", string>>, addStatic?: boolean) => {
8268
+ declare const useClasses: (classesProp?: Partial<Record<"display" | "title1" | "title2" | "title3" | "title4" | "label" | "body" | "captionLabel" | "caption1" | "caption2" | "5xlTitle" | "4xlTitle" | "xxlTitle" | "lTitle" | "sTitle" | "xxsTitle" | "sectionTitle" | "placeholderText" | "link" | "disabledText" | "selectedNavText" | "vizTextDisabled" | "xsInlineLink" | "root" | "disabled" | "isLink" | "noWrap" | "3xlTitle" | "xlTitle" | "mTitle" | "xsTitle" | "highlightText" | "normalText" | "vizText", string>>, addStatic?: boolean) => {
8269
8269
  classes: {
8270
8270
  display: string;
8271
- "5xlTitle": string;
8272
- "4xlTitle": string;
8273
8271
  title1: string;
8274
8272
  title2: string;
8275
8273
  title3: string;
@@ -8279,6 +8277,8 @@ declare const useClasses: (classesProp?: Partial<Record<"display" | "5xlTitle" |
8279
8277
  captionLabel: string;
8280
8278
  caption1: string;
8281
8279
  caption2: string;
8280
+ "5xlTitle": string;
8281
+ "4xlTitle": string;
8282
8282
  xxlTitle: string;
8283
8283
  lTitle: string;
8284
8284
  sTitle: string;
@@ -8624,16 +8624,16 @@ declare const useClasses_119: (classesProp?: Partial<Record<"label" | "root" | "
8624
8624
  cx: (...args: any) => string;
8625
8625
  };
8626
8626
 
8627
- declare const useClasses_12: (classesProp?: Partial<Record<"secondary" | "primary" | "root" | "disabled" | "semantic" | "secondarySubtle" | "ghost" | "icon" | "secondaryGhost" | "primaryGhost" | "subtle" | "primarySubtle" | "startIcon" | "endIcon" | "focusVisible", string>>, addStatic?: boolean) => {
8627
+ declare const useClasses_12: (classesProp?: Partial<Record<"secondary" | "primary" | "root" | "disabled" | "semantic" | "icon" | "secondarySubtle" | "ghost" | "secondaryGhost" | "primaryGhost" | "subtle" | "primarySubtle" | "startIcon" | "endIcon" | "focusVisible", string>>, addStatic?: boolean) => {
8628
8628
  classes: {
8629
8629
  secondary: string;
8630
8630
  primary: string;
8631
8631
  root: string;
8632
8632
  disabled: string;
8633
8633
  semantic: string;
8634
+ icon: string;
8634
8635
  secondarySubtle: string;
8635
8636
  ghost: string;
8636
- icon: string;
8637
8637
  secondaryGhost: string;
8638
8638
  primaryGhost: string;
8639
8639
  subtle: string;
@@ -8722,14 +8722,14 @@ declare const useClasses_126: (classesProp?: Partial<Record<"root", string>>, ad
8722
8722
  cx: (...args: any) => string;
8723
8723
  };
8724
8724
 
8725
- declare const useClasses_127: (classesProp?: Partial<Record<"content" | "label" | "link" | "disabled" | "selectable" | "icon" | "selected" | "hide" | "expanded" | "unselectable" | "group" | "node" | "focused" | "expandable" | "labelIcon" | "collapsed" | "minimized" | "unselected" | "labelExpandable", string>>, addStatic?: boolean) => {
8725
+ declare const useClasses_127: (classesProp?: Partial<Record<"content" | "label" | "link" | "disabled" | "icon" | "selectable" | "selected" | "hide" | "expanded" | "unselectable" | "group" | "node" | "focused" | "expandable" | "labelIcon" | "collapsed" | "minimized" | "unselected" | "labelExpandable", string>>, addStatic?: boolean) => {
8726
8726
  classes: {
8727
8727
  content: string;
8728
8728
  label: string;
8729
8729
  link: string;
8730
8730
  disabled: string;
8731
- selectable: string;
8732
8731
  icon: string;
8732
+ selectable: string;
8733
8733
  selected: string;
8734
8734
  hide: string;
8735
8735
  expanded: string;
@@ -9183,11 +9183,11 @@ declare const useClasses_38: (classesProp?: Partial<Record<"root" | "inputBorder
9183
9183
  cx: (...args: any) => string;
9184
9184
  };
9185
9185
 
9186
- declare const useClasses_39: (classesProp?: Partial<Record<"root" | "selectable" | "icon" | "selected" | "semanticContainer" | "semanticBar", string>>, addStatic?: boolean) => {
9186
+ declare const useClasses_39: (classesProp?: Partial<Record<"root" | "icon" | "selectable" | "selected" | "semanticContainer" | "semanticBar", string>>, addStatic?: boolean) => {
9187
9187
  classes: {
9188
9188
  root: string;
9189
- selectable: string;
9190
9189
  icon: string;
9190
+ selectable: string;
9191
9191
  selected: string;
9192
9192
  semanticContainer: string;
9193
9193
  semanticBar: string;
@@ -9347,10 +9347,10 @@ declare const useClasses_47: (classesProp?: Partial<Record<"vertical" | "horizon
9347
9347
  cx: (...args: any) => string;
9348
9348
  };
9349
9349
 
9350
- declare const useClasses_48: (classesProp?: Partial<Record<"colorPicker" | "label" | "root" | "panel" | "headerColorValue" | "recommendedColorsRoot" | "description" | "labelContainer" | "headerColorIcon" | "colorPickerIcon" | "dropdownRootIconOnly" | "headerColorIconOnly" | "pickerFields", string>>, addStatic?: boolean) => {
9350
+ declare const useClasses_48: (classesProp?: Partial<Record<"label" | "colorPicker" | "root" | "panel" | "headerColorValue" | "recommendedColorsRoot" | "description" | "labelContainer" | "headerColorIcon" | "colorPickerIcon" | "dropdownRootIconOnly" | "headerColorIconOnly" | "pickerFields", string>>, addStatic?: boolean) => {
9351
9351
  classes: {
9352
- colorPicker: string;
9353
9352
  label: string;
9353
+ colorPicker: string;
9354
9354
  root: string;
9355
9355
  panel: string;
9356
9356
  headerColorValue: string;
@@ -9961,11 +9961,11 @@ declare const useClasses_84: (classesProp?: Partial<Record<"link" | "root" | "it
9961
9961
  cx: (...args: any) => string;
9962
9962
  };
9963
9963
 
9964
- declare const useClasses_85: (classesProp?: Partial<Record<"overlay" | "small" | "label" | "root" | "hidden" | "blur" | "barContainer" | "loadingBar" | "regular" | "smallColor" | "regularColor", string>>, addStatic?: boolean) => {
9964
+ declare const useClasses_85: (classesProp?: Partial<Record<"overlay" | "label" | "small" | "root" | "hidden" | "blur" | "barContainer" | "loadingBar" | "regular" | "smallColor" | "regularColor", string>>, addStatic?: boolean) => {
9965
9965
  classes: {
9966
9966
  overlay: string;
9967
- small: string;
9968
9967
  label: string;
9968
+ small: string;
9969
9969
  root: string;
9970
9970
  hidden: string;
9971
9971
  blur: string;
@@ -10042,15 +10042,15 @@ declare const useClasses_9: (classesProp?: Partial<Record<"root" | "gutter" | "i
10042
10042
  cx: (...args: any) => string;
10043
10043
  };
10044
10044
 
10045
- declare const useClasses_90: (classesProp?: Partial<Record<"color" | "values" | "root" | "title" | "popper" | "separator" | "tooltip" | "tooltipMulti" | "valuesContainer" | "separatorColor" | "valueWrapper", string>>, addStatic?: boolean) => {
10045
+ declare const useClasses_90: (classesProp?: Partial<Record<"color" | "root" | "title" | "popper" | "separator" | "tooltip" | "values" | "tooltipMulti" | "valuesContainer" | "separatorColor" | "valueWrapper", string>>, addStatic?: boolean) => {
10046
10046
  classes: {
10047
10047
  color: string;
10048
- values: string;
10049
10048
  root: string;
10050
10049
  title: string;
10051
10050
  popper: string;
10052
10051
  separator: string;
10053
10052
  tooltip: string;
10053
+ values: string;
10054
10054
  tooltipMulti: string;
10055
10055
  valuesContainer: string;
10056
10056
  separatorColor: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.68.1",
3
+ "version": "5.69.0",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "Core React components for the NEXT Design System.",
@@ -32,10 +32,10 @@
32
32
  "dependencies": {
33
33
  "@emotion/cache": "^11.11.0",
34
34
  "@emotion/serialize": "^1.1.2",
35
- "@hitachivantara/uikit-react-icons": "^5.10.8",
36
- "@hitachivantara/uikit-react-shared": "^5.3.0",
37
- "@hitachivantara/uikit-react-utils": "^0.2.0",
38
- "@hitachivantara/uikit-styles": "^5.32.0",
35
+ "@hitachivantara/uikit-react-icons": "^5.10.9",
36
+ "@hitachivantara/uikit-react-shared": "^5.3.1",
37
+ "@hitachivantara/uikit-react-utils": "^0.2.1",
38
+ "@hitachivantara/uikit-styles": "^5.32.1",
39
39
  "@internationalized/date": "^3.2.0",
40
40
  "@mui/base": "^5.0.0-beta.40",
41
41
  "@popperjs/core": "^2.11.8",
@@ -62,9 +62,10 @@
62
62
  "access": "public",
63
63
  "directory": "package"
64
64
  },
65
- "gitHead": "e6a4e1b89e4fec6bcebf1a88fcaab0ba41c0bda7",
65
+ "gitHead": "12e14ff262d62992cf3b833a4dd4cdac07541d51",
66
66
  "exports": {
67
67
  ".": {
68
+ "types": "./dist/types/index.d.ts",
68
69
  "require": "./dist/cjs/index.cjs",
69
70
  "import": "./dist/esm/index.js"
70
71
  }