@hitachivantara/uikit-react-core 5.18.1 → 5.18.3

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 (159) hide show
  1. package/dist/cjs/components/AppSwitcher/Action/Action.cjs.map +1 -1
  2. package/dist/cjs/components/AppSwitcher/TitleWithTooltip.cjs +5 -5
  3. package/dist/cjs/components/AppSwitcher/TitleWithTooltip.cjs.map +1 -1
  4. package/dist/cjs/components/Banner/Banner.cjs.map +1 -1
  5. package/dist/cjs/components/BaseDropdown/BaseDropdown.cjs.map +1 -1
  6. package/dist/cjs/components/BaseInput/validations.cjs.map +1 -1
  7. package/dist/cjs/components/Box/Box.cjs.map +1 -1
  8. package/dist/cjs/components/BreadCrumb/BreadCrumb.cjs.map +1 -1
  9. package/dist/cjs/components/BreadCrumb/utils.cjs.map +1 -1
  10. package/dist/cjs/components/BulkActions/BulkActions.cjs +1 -5
  11. package/dist/cjs/components/BulkActions/BulkActions.cjs.map +1 -1
  12. package/dist/cjs/components/Button/Button.cjs +1 -1
  13. package/dist/cjs/components/Button/Button.cjs.map +1 -1
  14. package/dist/cjs/components/Button/Button.styles.cjs +6 -5
  15. package/dist/cjs/components/Button/Button.styles.cjs.map +1 -1
  16. package/dist/cjs/components/CheckBox/CheckBox.cjs +4 -4
  17. package/dist/cjs/components/CheckBox/CheckBox.cjs.map +1 -1
  18. package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.cjs.map +1 -1
  19. package/dist/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
  20. package/dist/cjs/components/Controls/Controls.cjs.map +1 -1
  21. package/dist/cjs/components/Controls/LeftControl/LeftControl.cjs +1 -1
  22. package/dist/cjs/components/Controls/LeftControl/LeftControl.cjs.map +1 -1
  23. package/dist/cjs/components/Controls/RightControl/RightControl.cjs.map +1 -1
  24. package/dist/cjs/components/DatePicker/DatePicker.cjs +1 -1
  25. package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -1
  26. package/dist/cjs/components/DatePicker/utils.cjs.map +1 -1
  27. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
  28. package/dist/cjs/components/DotPagination/DotPagination.cjs +19 -13
  29. package/dist/cjs/components/DotPagination/DotPagination.cjs.map +1 -1
  30. package/dist/cjs/components/DotPagination/DotPagination.styles.cjs +20 -67
  31. package/dist/cjs/components/DotPagination/DotPagination.styles.cjs.map +1 -1
  32. package/dist/cjs/components/DropDownMenu/DropDownMenu.cjs.map +1 -1
  33. package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs +1 -0
  34. package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs.map +1 -1
  35. package/dist/cjs/components/Dropdown/Dropdown.cjs +3 -3
  36. package/dist/cjs/components/Dropdown/Dropdown.cjs.map +1 -1
  37. package/dist/cjs/components/Dropdown/List/List.cjs.map +1 -1
  38. package/dist/cjs/components/Dropdown/utils.cjs +2 -2
  39. package/dist/cjs/components/Dropdown/utils.cjs.map +1 -1
  40. package/dist/cjs/components/FilterGroup/RightPanel/RightPanel.cjs.map +1 -1
  41. package/dist/cjs/components/Forms/Adornment/Adornment.cjs +1 -2
  42. package/dist/cjs/components/Forms/Adornment/Adornment.cjs.map +1 -1
  43. package/dist/cjs/components/Forms/FormElement/validationStates.cjs.map +1 -1
  44. package/dist/cjs/components/Header/Navigation/MenuBar/MenuBar.cjs.map +1 -1
  45. package/dist/cjs/components/Header/Navigation/MenuItem/MenuItem.cjs.map +1 -1
  46. package/dist/cjs/components/Header/Navigation/Navigation.cjs.map +1 -1
  47. package/dist/cjs/components/InlineEditor/InlineEditor.cjs.map +1 -1
  48. package/dist/cjs/components/List/useSelectableList.cjs +1 -4
  49. package/dist/cjs/components/List/useSelectableList.cjs.map +1 -1
  50. package/dist/cjs/components/Loading/Loading.cjs.map +1 -1
  51. package/dist/cjs/components/OverflowTooltip/OverflowTooltip.cjs +1 -1
  52. package/dist/cjs/components/OverflowTooltip/OverflowTooltip.cjs.map +1 -1
  53. package/dist/cjs/components/Pagination/ButtonIconTooltip.cjs.map +1 -1
  54. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  55. package/dist/cjs/components/Pagination/Select.cjs +2 -4
  56. package/dist/cjs/components/Pagination/Select.cjs.map +1 -1
  57. package/dist/cjs/components/Pagination/utils.cjs.map +1 -1
  58. package/dist/cjs/components/SelectionList/SelectionList.cjs.map +1 -1
  59. package/dist/cjs/components/SimpleGrid/SimpleGrid.styles.cjs +1 -1
  60. package/dist/cjs/components/SimpleGrid/SimpleGrid.styles.cjs.map +1 -1
  61. package/dist/cjs/components/TimeAgo/TimeAgo.cjs +14 -7
  62. package/dist/cjs/components/TimeAgo/TimeAgo.cjs.map +1 -1
  63. package/dist/cjs/components/TimeAgo/TimeAgo.styles.cjs +12 -0
  64. package/dist/cjs/components/TimeAgo/TimeAgo.styles.cjs.map +1 -0
  65. package/dist/cjs/components/Typography/Typography.cjs +20 -133
  66. package/dist/cjs/components/Typography/Typography.cjs.map +1 -1
  67. package/dist/cjs/components/Typography/Typography.styles.cjs +107 -0
  68. package/dist/cjs/components/Typography/Typography.styles.cjs.map +1 -0
  69. package/dist/cjs/components/Typography/utils.cjs.map +1 -1
  70. package/dist/cjs/hooks/useWidth.cjs +1 -1
  71. package/dist/cjs/hooks/useWidth.cjs.map +1 -1
  72. package/dist/cjs/index.cjs +7 -6
  73. package/dist/cjs/index.cjs.map +1 -1
  74. package/dist/esm/components/AppSwitcher/Action/Action.js.map +1 -1
  75. package/dist/esm/components/AppSwitcher/TitleWithTooltip.js +6 -6
  76. package/dist/esm/components/AppSwitcher/TitleWithTooltip.js.map +1 -1
  77. package/dist/esm/components/Banner/Banner.js.map +1 -1
  78. package/dist/esm/components/BaseDropdown/BaseDropdown.js.map +1 -1
  79. package/dist/esm/components/BaseInput/validations.js.map +1 -1
  80. package/dist/esm/components/Box/Box.js.map +1 -1
  81. package/dist/esm/components/BreadCrumb/BreadCrumb.js.map +1 -1
  82. package/dist/esm/components/BreadCrumb/utils.js.map +1 -1
  83. package/dist/esm/components/BulkActions/BulkActions.js +1 -5
  84. package/dist/esm/components/BulkActions/BulkActions.js.map +1 -1
  85. package/dist/esm/components/Button/Button.js +1 -1
  86. package/dist/esm/components/Button/Button.js.map +1 -1
  87. package/dist/esm/components/Button/Button.styles.js +6 -5
  88. package/dist/esm/components/Button/Button.styles.js.map +1 -1
  89. package/dist/esm/components/CheckBox/CheckBox.js +4 -4
  90. package/dist/esm/components/CheckBox/CheckBox.js.map +1 -1
  91. package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
  92. package/dist/esm/components/ColorPicker/ColorPicker.js.map +1 -1
  93. package/dist/esm/components/Controls/Controls.js.map +1 -1
  94. package/dist/esm/components/Controls/LeftControl/LeftControl.js +1 -1
  95. package/dist/esm/components/Controls/LeftControl/LeftControl.js.map +1 -1
  96. package/dist/esm/components/Controls/RightControl/RightControl.js.map +1 -1
  97. package/dist/esm/components/DatePicker/DatePicker.js +1 -1
  98. package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
  99. package/dist/esm/components/DatePicker/utils.js.map +1 -1
  100. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  101. package/dist/esm/components/DotPagination/DotPagination.js +22 -15
  102. package/dist/esm/components/DotPagination/DotPagination.js.map +1 -1
  103. package/dist/esm/components/DotPagination/DotPagination.styles.js +20 -65
  104. package/dist/esm/components/DotPagination/DotPagination.styles.js.map +1 -1
  105. package/dist/esm/components/DropDownMenu/DropDownMenu.js.map +1 -1
  106. package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js +1 -0
  107. package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js.map +1 -1
  108. package/dist/esm/components/Dropdown/Dropdown.js +3 -3
  109. package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
  110. package/dist/esm/components/Dropdown/List/List.js.map +1 -1
  111. package/dist/esm/components/Dropdown/utils.js +2 -2
  112. package/dist/esm/components/Dropdown/utils.js.map +1 -1
  113. package/dist/esm/components/FilterGroup/RightPanel/RightPanel.js.map +1 -1
  114. package/dist/esm/components/Forms/Adornment/Adornment.js +1 -2
  115. package/dist/esm/components/Forms/Adornment/Adornment.js.map +1 -1
  116. package/dist/esm/components/Forms/FormElement/validationStates.js.map +1 -1
  117. package/dist/esm/components/Header/Navigation/MenuBar/MenuBar.js.map +1 -1
  118. package/dist/esm/components/Header/Navigation/MenuItem/MenuItem.js.map +1 -1
  119. package/dist/esm/components/Header/Navigation/Navigation.js.map +1 -1
  120. package/dist/esm/components/InlineEditor/InlineEditor.js.map +1 -1
  121. package/dist/esm/components/List/useSelectableList.js +2 -5
  122. package/dist/esm/components/List/useSelectableList.js.map +1 -1
  123. package/dist/esm/components/Loading/Loading.js.map +1 -1
  124. package/dist/esm/components/OverflowTooltip/OverflowTooltip.js +1 -1
  125. package/dist/esm/components/OverflowTooltip/OverflowTooltip.js.map +1 -1
  126. package/dist/esm/components/Pagination/ButtonIconTooltip.js.map +1 -1
  127. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  128. package/dist/esm/components/Pagination/Select.js +2 -4
  129. package/dist/esm/components/Pagination/Select.js.map +1 -1
  130. package/dist/esm/components/Pagination/utils.js.map +1 -1
  131. package/dist/esm/components/SelectionList/SelectionList.js.map +1 -1
  132. package/dist/esm/components/SimpleGrid/SimpleGrid.styles.js +1 -1
  133. package/dist/esm/components/SimpleGrid/SimpleGrid.styles.js.map +1 -1
  134. package/dist/esm/components/TimeAgo/TimeAgo.js +16 -8
  135. package/dist/esm/components/TimeAgo/TimeAgo.js.map +1 -1
  136. package/dist/esm/components/TimeAgo/TimeAgo.styles.js +12 -0
  137. package/dist/esm/components/TimeAgo/TimeAgo.styles.js.map +1 -0
  138. package/dist/esm/components/Typography/Typography.js +23 -133
  139. package/dist/esm/components/Typography/Typography.js.map +1 -1
  140. package/dist/esm/components/Typography/Typography.styles.js +107 -0
  141. package/dist/esm/components/Typography/Typography.styles.js.map +1 -0
  142. package/dist/esm/components/Typography/utils.js.map +1 -1
  143. package/dist/esm/hooks/useWidth.js +1 -1
  144. package/dist/esm/hooks/useWidth.js.map +1 -1
  145. package/dist/esm/index.js +266 -265
  146. package/dist/types/index.d.ts +221 -177
  147. package/package.json +2 -2
  148. package/dist/cjs/components/DotPagination/dotPaginationClasses.cjs +0 -8
  149. package/dist/cjs/components/DotPagination/dotPaginationClasses.cjs.map +0 -1
  150. package/dist/cjs/components/TimeAgo/timeAgoClasses.cjs +0 -8
  151. package/dist/cjs/components/TimeAgo/timeAgoClasses.cjs.map +0 -1
  152. package/dist/cjs/components/Typography/typographyClasses.cjs +0 -8
  153. package/dist/cjs/components/Typography/typographyClasses.cjs.map +0 -1
  154. package/dist/esm/components/DotPagination/dotPaginationClasses.js +0 -8
  155. package/dist/esm/components/DotPagination/dotPaginationClasses.js.map +0 -1
  156. package/dist/esm/components/TimeAgo/timeAgoClasses.js +0 -8
  157. package/dist/esm/components/TimeAgo/timeAgoClasses.js.map +0 -1
  158. package/dist/esm/components/Typography/typographyClasses.js +0 -8
  159. package/dist/esm/components/Typography/typographyClasses.js.map +0 -1
@@ -1,11 +1,12 @@
1
- import { clsx } from "clsx";
2
1
  import isEmpty from "lodash/isEmpty";
3
- import timeAgoClasses from "./timeAgoClasses.js";
2
+ import { useClasses } from "./TimeAgo.styles.js";
3
+ import { staticClasses } from "./TimeAgo.styles.js";
4
4
  import useTimeAgo from "./useTimeAgo.js";
5
5
  import { jsx, Fragment } from "@emotion/react/jsx-runtime";
6
6
  import { HvTypography } from "../Typography/Typography.js";
7
7
  const HvTimeAgo = ({
8
- classes,
8
+ classes: classesProp,
9
+ className,
9
10
  timestamp,
10
11
  locale: localeProp = "en",
11
12
  component: Component = HvTypography,
@@ -15,21 +16,28 @@ const HvTimeAgo = ({
15
16
  justText = false,
16
17
  ...others
17
18
  }) => {
19
+ const {
20
+ classes,
21
+ cx
22
+ } = useClasses(classesProp);
18
23
  const locale = isEmpty(localeProp) ? "en" : localeProp;
19
24
  const timeAgo = useTimeAgo(timestamp, {
20
25
  locale,
21
26
  disableRefresh,
22
27
  showSeconds
23
28
  });
24
- return justText && timestamp ? /* @__PURE__ */ jsx(Fragment, {
25
- children: "timeAgo"
26
- }) : /* @__PURE__ */ jsx(Component, {
27
- className: clsx(classes == null ? void 0 : classes.root, timeAgoClasses.root),
29
+ if (justText && timestamp)
30
+ return /* @__PURE__ */ jsx(Fragment, {
31
+ children: timeAgo
32
+ });
33
+ return /* @__PURE__ */ jsx(Component, {
34
+ className: cx(classes.root, className),
28
35
  ...others,
29
36
  children: !timestamp ? emptyElement : timeAgo
30
37
  });
31
38
  };
32
39
  export {
33
- HvTimeAgo
40
+ HvTimeAgo,
41
+ staticClasses as timeAgoClasses
34
42
  };
35
43
  //# sourceMappingURL=TimeAgo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TimeAgo.js","sources":["../../../../src/components/TimeAgo/TimeAgo.tsx"],"sourcesContent":["import { HvTypography } from \"@core/components\";\nimport { HvBaseProps } from \"@core/types\";\nimport { clsx } from \"clsx\";\nimport isEmpty from \"lodash/isEmpty\";\nimport timeAgoClasses, { HvTimeAgoClasses } from \"./timeAgoClasses\";\nimport useTimeAgo from \"./useTimeAgo\";\n\nexport interface HvTimeAgoProps extends HvBaseProps<HTMLElement, \"children\"> {\n /**\n * The timestamp to format, in seconds or milliseconds.\n * Defaults to `emptyElement` if value is null or 0\n */\n timestamp?: number;\n /**\n * The locale to be used. Should be on of the dayjs supported locales and explicitly imported\n * @see https://day.js.org/docs/en/i18n/i18n\n */\n locale?: string;\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `HvTypography`.\n */\n component?: React.ElementType<React.HTMLAttributes<HTMLElement>>;\n /**\n * The element to render when the timestamp is null or 0\n * Defaults to `—` (Em Dash)\n */\n emptyElement?: React.ReactNode;\n /**\n * Disables periodic date refreshes\n */\n disableRefresh?: boolean;\n /**\n * Whether to show seconds in the rendered time\n */\n showSeconds?: boolean;\n /**\n * Whether the component should render just the string\n * Consider using `useTimeAgo` instead\n */\n justText?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTimeAgoClasses;\n}\n\n/**\n * The HvTimeAgo component implements the Design System relative time format guidelines.\n */\nexport const HvTimeAgo = ({\n classes,\n timestamp,\n locale: localeProp = \"en\",\n component: Component = HvTypography,\n emptyElement = \"—\",\n disableRefresh = false,\n showSeconds = false,\n justText = false,\n ...others\n}: HvTimeAgoProps) => {\n const locale = isEmpty(localeProp) ? \"en\" : localeProp;\n const timeAgo = useTimeAgo(timestamp, {\n locale,\n disableRefresh,\n showSeconds,\n });\n\n return justText && timestamp ? (\n <>timeAgo</>\n ) : (\n <Component className={clsx(classes?.root, timeAgoClasses.root)} {...others}>\n {!timestamp ? emptyElement : timeAgo}\n </Component>\n );\n};\n"],"names":["HvTimeAgo","classes","timestamp","locale","localeProp","component","Component","HvTypography","emptyElement","disableRefresh","showSeconds","justText","others","isEmpty","timeAgo","useTimeAgo","_jsx","_Fragment","children","className","clsx","root","timeAgoClasses"],"mappings":";;;;;;AAgDO,MAAMA,YAAYA,CAAC;AAAA,EACxBC;AAAAA,EACAC;AAAAA,EACAC,QAAQC,aAAa;AAAA,EACrBC,WAAWC,YAAYC;AAAAA,EACvBC,eAAe;AAAA,EACfC,iBAAiB;AAAA,EACjBC,cAAc;AAAA,EACdC,WAAW;AAAA,EACX,GAAGC;AACW,MAAM;AACpB,QAAMT,SAASU,QAAQT,UAAU,IAAI,OAAOA;AACtCU,QAAAA,UAAUC,WAAWb,WAAW;AAAA,IACpCC;AAAAA,IACAM;AAAAA,IACAC;AAAAA,EAAAA,CACD;AAEMC,SAAAA,YAAYT,YACjBc,oBAAAC,UAAA;AAAA,IAAAC,UAAE;AAAA,EAAA,CAAS,IAEXF,oBAACV,WAAS;AAAA,IAACa,WAAWC,KAAKnB,mCAASoB,MAAMC,eAAeD,IAAI;AAAA,IAAE,GAAKT;AAAAA,IAAMM,UACvE,CAAChB,YAAYM,eAAeM;AAAAA,EAAAA,CACpB;AAEf;"}
1
+ {"version":3,"file":"TimeAgo.js","sources":["../../../../src/components/TimeAgo/TimeAgo.tsx"],"sourcesContent":["import { HvTypography } from \"@core/components\";\nimport { HvBaseProps } from \"@core/types\";\nimport isEmpty from \"lodash/isEmpty\";\nimport { ExtractNames } from \"@core/utils\";\nimport { staticClasses, useClasses } from \"./TimeAgo.styles\";\nimport useTimeAgo from \"./useTimeAgo\";\n\nexport { staticClasses as timeAgoClasses };\n\nexport type HvTimeAgoClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTimeAgoProps extends HvBaseProps<HTMLElement, \"children\"> {\n /**\n * The timestamp to format, in seconds or milliseconds.\n * Defaults to `emptyElement` if value is null or 0\n */\n timestamp?: number;\n /**\n * The locale to be used. Should be on of the dayjs supported locales and explicitly imported\n * @see https://day.js.org/docs/en/i18n/i18n\n */\n locale?: string;\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `HvTypography`.\n */\n component?: React.ElementType<React.HTMLAttributes<HTMLElement>>;\n /**\n * The element to render when the timestamp is null or 0\n * Defaults to `—` (Em Dash)\n */\n emptyElement?: React.ReactNode;\n /**\n * Disables periodic date refreshes\n */\n disableRefresh?: boolean;\n /**\n * Whether to show seconds in the rendered time\n */\n showSeconds?: boolean;\n /**\n * Whether the component should render just the string\n * Consider using `useTimeAgo` instead\n */\n justText?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTimeAgoClasses;\n}\n\n/**\n * The HvTimeAgo component implements the Design System relative time format guidelines.\n */\nexport const HvTimeAgo = ({\n classes: classesProp,\n className,\n timestamp,\n locale: localeProp = \"en\",\n component: Component = HvTypography,\n emptyElement = \"—\",\n disableRefresh = false,\n showSeconds = false,\n justText = false,\n ...others\n}: HvTimeAgoProps) => {\n const { classes, cx } = useClasses(classesProp);\n const locale = isEmpty(localeProp) ? \"en\" : localeProp;\n const timeAgo = useTimeAgo(timestamp, {\n locale,\n disableRefresh,\n showSeconds,\n });\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n if (justText && timestamp) return <>{timeAgo}</>;\n\n return (\n <Component className={cx(classes.root, className)} {...others}>\n {!timestamp ? emptyElement : timeAgo}\n </Component>\n );\n};\n"],"names":["HvTimeAgo","classes","classesProp","className","timestamp","locale","localeProp","component","Component","HvTypography","emptyElement","disableRefresh","showSeconds","justText","others","cx","useClasses","isEmpty","timeAgo","useTimeAgo","_Fragment","children","root"],"mappings":";;;;;;AAoDO,MAAMA,YAAYA,CAAC;AAAA,EACxBC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,QAAQC,aAAa;AAAA,EACrBC,WAAWC,YAAYC;AAAAA,EACvBC,eAAe;AAAA,EACfC,iBAAiB;AAAA,EACjBC,cAAc;AAAA,EACdC,WAAW;AAAA,EACX,GAAGC;AACW,MAAM;AACd,QAAA;AAAA,IAAEb;AAAAA,IAASc;AAAAA,EAAAA,IAAOC,WAAWd,WAAW;AAC9C,QAAMG,SAASY,QAAQX,UAAU,IAAI,OAAOA;AACtCY,QAAAA,UAAUC,WAAWf,WAAW;AAAA,IACpCC;AAAAA,IACAM;AAAAA,IACAC;AAAAA,EAAAA,CACD;AAGD,MAAIC,YAAYT;AAAW,+BAAOgB,UAAA;AAAA,MAAAC,UAAGH;AAAAA,IAAAA,CAAU;AAE/C,6BACGV,WAAS;AAAA,IAACL,WAAWY,GAAGd,QAAQqB,MAAMnB,SAAS;AAAA,IAAE,GAAKW;AAAAA,IAAMO,UAC1D,CAACjB,YAAYM,eAAeQ;AAAAA,EAAAA,CACpB;AAEf;"}
@@ -0,0 +1,12 @@
1
+ import { createClasses } from "../../utils/classes.js";
2
+ const {
3
+ staticClasses,
4
+ useClasses
5
+ } = createClasses("HvTimeAgo", {
6
+ root: {}
7
+ });
8
+ export {
9
+ staticClasses,
10
+ useClasses
11
+ };
12
+ //# sourceMappingURL=TimeAgo.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeAgo.styles.js","sources":["../../../../src/components/TimeAgo/TimeAgo.styles.ts"],"sourcesContent":["import { createClasses } from \"@core/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTimeAgo\", {\n root: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","root"],"mappings":";AAEa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,aAAa;AAAA,EACtEC,MAAM,CAAC;AACT,CAAC;"}
@@ -1,26 +1,10 @@
1
- import _styled from "@emotion/styled/base";
2
- import { forwardRef, useMemo } from "react";
3
- import { transientOptions } from "../../utils/transientOptions.js";
4
- import { theme } from "@hitachivantara/uikit-styles";
5
- import { clsx } from "clsx";
1
+ import { forwardRef } from "react";
6
2
  import { mapVariant } from "./utils.js";
7
- import typographyClasses from "./typographyClasses.js";
3
+ import { useClasses } from "./Typography.styles.js";
4
+ import { staticClasses } from "./Typography.styles.js";
8
5
  import { jsx } from "@emotion/react/jsx-runtime";
9
6
  import { useTheme } from "../../hooks/useTheme.js";
10
- function _extends() {
11
- _extends = Object.assign ? Object.assign.bind() : function(target) {
12
- for (var i = 1; i < arguments.length; i++) {
13
- var source = arguments[i];
14
- for (var key in source) {
15
- if (Object.prototype.hasOwnProperty.call(source, key)) {
16
- target[key] = source[key];
17
- }
18
- }
19
- }
20
- return target;
21
- };
22
- return _extends.apply(this, arguments);
23
- }
7
+ const typographyVariants = ["display", "title1", "title2", "title3", "title4", "body", "label", "caption1", "caption2"];
24
8
  const HvTypographyMap = {
25
9
  display: "h1",
26
10
  title1: "h1",
@@ -46,134 +30,40 @@ const HvTypographyMap = {
46
30
  vizTextDisabled: "p",
47
31
  xsInlineLink: "p"
48
32
  };
49
- const getStyledComponent = (c) => /* @__PURE__ */ _styled(c, process.env.NODE_ENV === "production" ? _extends({}, {
50
- target: "e1tnpalo0"
51
- }, transientOptions) : _extends({}, {
52
- target: "e1tnpalo0",
53
- label: "getStyledComponent"
54
- }, transientOptions))(({
55
- $variant,
56
- $link = false,
57
- $disabled = false,
58
- $noWrap = false
59
- }) => ({
60
- ...$variant === "display" && {
61
- ...theme.typography.display
62
- },
63
- ...$variant === "title1" && {
64
- ...theme.typography.title1
65
- },
66
- ...$variant === "title2" && {
67
- ...theme.typography.title2
68
- },
69
- ...$variant === "title3" && {
70
- ...theme.typography.title3
71
- },
72
- ...$variant === "title4" && {
73
- ...theme.typography.title4
74
- },
75
- ...$variant === "body" && {
76
- ...theme.typography.body
77
- },
78
- ...$variant === "label" && {
79
- ...theme.typography.label
80
- },
81
- ...$variant === "caption1" && {
82
- ...theme.typography.caption1
83
- },
84
- ...$variant === "caption2" && {
85
- ...theme.typography.caption2
86
- },
87
- // LEGACY
88
- ...$variant === "5xlTitle" && {
89
- ...theme.typography["5xlTitle"]
90
- },
91
- ...$variant === "4xlTitle" && {
92
- ...theme.typography["4xlTitle"]
93
- },
94
- ...$variant === "xxlTitle" && {
95
- ...theme.typography.xxlTitle
96
- },
97
- ...$variant === "lTitle" && {
98
- ...theme.typography.lTitle
99
- },
100
- ...$variant === "sTitle" && {
101
- ...theme.typography.sTitle
102
- },
103
- ...$variant === "xxsTitle" && {
104
- ...theme.typography.xxsTitle
105
- },
106
- ...$variant === "sectionTitle" && {
107
- ...theme.typography.sectionTitle,
108
- textTransform: "uppercase"
109
- },
110
- ...$variant === "placeholderText" && {
111
- ...theme.typography.placeholderText
112
- },
113
- ...$variant === "link" && {
114
- ...theme.typography.link,
115
- textDecoration: "underline",
116
- cursor: "pointer"
117
- },
118
- ...$variant === "disabledText" && {
119
- ...theme.typography.disabledText
120
- },
121
- ...$variant === "selectedNavText" && {
122
- ...theme.typography.selectedNavText
123
- },
124
- ...$variant === "vizTextDisabled" && {
125
- ...theme.typography.vizTextDisabled
126
- },
127
- ...$variant === "xsInlineLink" && {
128
- ...theme.typography.xsInlineLink
129
- },
130
- fontFamily: theme.fontFamily.body,
131
- // ADDED PROPS
132
- ...$link && {
133
- color: theme.colors.primary,
134
- textDecoration: "underline",
135
- cursor: "pointer"
136
- },
137
- ...$disabled && {
138
- color: theme.colors.secondary_60
139
- },
140
- ...$noWrap && {
141
- overflow: "hidden",
142
- textOverflow: "ellipsis",
143
- whiteSpace: "nowrap"
144
- }
145
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVHlwb2dyYXBoeS9UeXBvZ3JhcGh5LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2RUUiLCJmaWxlIjoiL2hvbWUvcnVubmVyL3dvcmsvaHYtdWlraXQtcmVhY3QvaHYtdWlraXQtcmVhY3QvcGFja2FnZXMvY29yZS9zcmMvY29tcG9uZW50cy9UeXBvZ3JhcGh5L1R5cG9ncmFwaHkudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgZm9yd2FyZFJlZixcbiAgdXNlTWVtbyxcbiAgQ1NTUHJvcGVydGllcyxcbiAgQWxsSFRNTEF0dHJpYnV0ZXMsXG4gIFJlZixcbn0gZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgeyBIdkJhc2VQcm9wcyB9IGZyb20gXCJAY29yZS90eXBlc1wiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyB0cmFuc2llbnRPcHRpb25zIH0gZnJvbSBcIkBjb3JlL3V0aWxzL3RyYW5zaWVudE9wdGlvbnNcIjtcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS91aWtpdC1zdHlsZXNcIjtcbmltcG9ydCB7IGNsc3ggfSBmcm9tIFwiY2xzeFwiO1xuaW1wb3J0IHsgdXNlVGhlbW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OYW1lPXtjbHN4KFxuICAgICAgICAgIGNsYXNzTmFtZSxcbiAgICAgICAgICBjbGFzc2VzPy5yb290LFxuICAgICAgICAgIHR5cG9ncmFwaHlDbGFzc2VzLnJvb3QsXG4gICAgICAgICAgY2xhc3Nlcz8uW3ZhcmlhbnRdLFxuICAgICAgICAgIHR5cG9ncmFwaHlDbGFzc2VzW3ZhcmlhbnRdLFxuICAgICAgICAgIG5vV3JhcCAmJiBjbHN4KHR5cG9ncmFwaHlDbGFzc2VzLm5vV3JhcCwgY2xhc3Nlcz8ubm9XcmFwKVxuICAgICAgICApfVxuICAgICAgICAkdmFyaWFudD17XG4gICAgICAgICAgbWFwcGVkVmFyaWFudCBhcyBIdlR5cG9ncmFwaHlWYXJpYW50cyB8IEh2VHlwb2dyYXBoeUxlZ2FjeVZhcmlhbnRzXG4gICAgICAgIH1cbiAgICAgICAgJGxpbms9e2xpbmt9XG4gICAgICAgICRkaXNhYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgICRub1dyYXA9e25vV3JhcH1cbiAgICAgICAgey4uLm90aGVyc31cbiAgICAgID5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9TdHlsZWRDb21wb25lbnQ+XG4gICAgKTtcbiAgfVxuKTtcbiJdfQ== */");
146
33
  const HvTypography = forwardRef((props, ref) => {
147
34
  const {
148
- children,
149
35
  className,
150
- component,
151
- classes,
152
- variant = "body",
36
+ component: ComponentProp,
37
+ classes: classesProp,
38
+ variant: variantProp = "body",
153
39
  link = false,
154
40
  disabled = false,
155
41
  noWrap = false,
156
42
  paragraph = false,
157
43
  ...others
158
44
  } = props;
45
+ const {
46
+ classes,
47
+ cx
48
+ } = useClasses(classesProp);
159
49
  const {
160
50
  activeTheme
161
51
  } = useTheme();
162
- const mappedVariant = mapVariant(variant, activeTheme == null ? void 0 : activeTheme.name);
163
- const comp = component || (paragraph ? "p" : HvTypographyMap[mappedVariant] || "span");
164
- const StyledComponent = useMemo(() => getStyledComponent(comp || "p"), [comp]);
165
- return /* @__PURE__ */ jsx(StyledComponent, {
52
+ const variant = mapVariant(variantProp, activeTheme == null ? void 0 : activeTheme.name);
53
+ const Component = ComponentProp || paragraph && "p" || HvTypographyMap[variant] || "span";
54
+ return /* @__PURE__ */ jsx(Component, {
166
55
  ref,
167
- className: clsx(className, classes == null ? void 0 : classes.root, typographyClasses.root, classes == null ? void 0 : classes[variant], typographyClasses[variant], noWrap && clsx(typographyClasses.noWrap, classes == null ? void 0 : classes.noWrap)),
168
- $variant: mappedVariant,
169
- $link: link,
170
- $disabled: disabled,
171
- $noWrap: noWrap,
172
- ...others,
173
- children
56
+ className: cx(classes.root, classes[variant], className, {
57
+ [classes.isLink]: link,
58
+ [classes.noWrap]: noWrap,
59
+ [classes.disabled]: disabled
60
+ }),
61
+ ...others
174
62
  });
175
63
  });
176
64
  export {
177
- HvTypography
65
+ HvTypography,
66
+ staticClasses as typographyClasses,
67
+ typographyVariants
178
68
  };
179
69
  //# sourceMappingURL=Typography.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Typography.js","sources":["../../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import {\n forwardRef,\n useMemo,\n CSSProperties,\n AllHTMLAttributes,\n Ref,\n} from \"react\";\nimport { HvBaseProps } from \"@core/types\";\nimport styled from \"@emotion/styled\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { clsx } from \"clsx\";\nimport { useTheme } from \"@core/hooks\";\nimport { mapVariant } from \"./utils\";\nimport typographyClasses, { HvTypographyClasses } from \"./typographyClasses\";\n\nexport type HvTypographyVariants =\n | \"display\"\n | \"title1\"\n | \"title2\"\n | \"title3\"\n | \"title4\"\n | \"body\"\n | \"label\"\n | \"caption1\"\n | \"caption2\";\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\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"label\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n lTitle: \"h2\",\n sTitle: \"h4\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} as const;\n\nconst getStyledComponent = <T extends keyof JSX.IntrinsicElements>(c: T) =>\n styled(\n c,\n transientOptions\n )(\n ({\n $variant,\n $link = false,\n $disabled = false,\n $noWrap = false,\n }: {\n $variant: HvTypographyVariants | HvTypographyLegacyVariants;\n $link?: boolean;\n $disabled?: boolean;\n $noWrap?: boolean;\n }) => ({\n ...($variant === \"display\" && {\n ...(theme.typography.display as CSSProperties),\n }),\n ...($variant === \"title1\" && {\n ...(theme.typography.title1 as CSSProperties),\n }),\n ...($variant === \"title2\" && {\n ...(theme.typography.title2 as CSSProperties),\n }),\n ...($variant === \"title3\" && {\n ...(theme.typography.title3 as CSSProperties),\n }),\n ...($variant === \"title4\" && {\n ...(theme.typography.title4 as CSSProperties),\n }),\n ...($variant === \"body\" && {\n ...(theme.typography.body as CSSProperties),\n }),\n ...($variant === \"label\" && {\n ...(theme.typography.label as CSSProperties),\n }),\n ...($variant === \"caption1\" && {\n ...(theme.typography.caption1 as CSSProperties),\n }),\n ...($variant === \"caption2\" && {\n ...(theme.typography.caption2 as CSSProperties),\n }),\n // LEGACY\n ...($variant === \"5xlTitle\" && {\n ...(theme.typography[\"5xlTitle\"] as CSSProperties),\n }),\n ...($variant === \"4xlTitle\" && {\n ...(theme.typography[\"4xlTitle\"] as CSSProperties),\n }),\n ...($variant === \"xxlTitle\" && {\n ...(theme.typography.xxlTitle as CSSProperties),\n }),\n ...($variant === \"lTitle\" && {\n ...(theme.typography.lTitle as CSSProperties),\n }),\n ...($variant === \"sTitle\" && {\n ...(theme.typography.sTitle as CSSProperties),\n }),\n ...($variant === \"xxsTitle\" && {\n ...(theme.typography.xxsTitle as CSSProperties),\n }),\n ...($variant === \"sectionTitle\" && {\n ...(theme.typography.sectionTitle as CSSProperties),\n textTransform: \"uppercase\",\n }),\n ...($variant === \"placeholderText\" && {\n ...(theme.typography.placeholderText as CSSProperties),\n }),\n ...($variant === \"link\" && {\n ...(theme.typography.link as CSSProperties),\n textDecoration: \"underline\",\n cursor: \"pointer\",\n }),\n ...($variant === \"disabledText\" && {\n ...(theme.typography.disabledText as CSSProperties),\n }),\n ...($variant === \"selectedNavText\" && {\n ...(theme.typography.selectedNavText as CSSProperties),\n }),\n ...($variant === \"vizTextDisabled\" && {\n ...(theme.typography.vizTextDisabled as CSSProperties),\n }),\n ...($variant === \"xsInlineLink\" && {\n ...(theme.typography.xsInlineLink as CSSProperties),\n }),\n fontFamily: theme.fontFamily.body,\n // ADDED PROPS\n ...($link && {\n color: theme.colors.primary,\n textDecoration: \"underline\",\n cursor: \"pointer\",\n }),\n ...($disabled && {\n color: theme.colors.secondary_60,\n }),\n ...($noWrap && {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }),\n })\n );\n\nexport interface HvTypographyProps\n extends Omit<AllHTMLAttributes<HTMLElement>, \"disabled\">,\n HvBaseProps<HTMLElement> {\n component?: React.ReactNode | React.ElementType;\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 /** If `true`, the text will have a bottom margin. */\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 * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography = forwardRef(\n (props: HvTypographyProps, ref: Ref<HTMLElement>) => {\n const {\n children,\n className,\n component,\n classes,\n variant = \"body\",\n link = false,\n disabled = false,\n noWrap = false,\n paragraph = false,\n ...others\n } = props;\n const { activeTheme } = useTheme();\n\n const mappedVariant = mapVariant(variant, activeTheme?.name);\n\n const comp =\n component || (paragraph ? \"p\" : HvTypographyMap[mappedVariant] || \"span\");\n\n const StyledComponent = useMemo(\n () => getStyledComponent(comp || \"p\"),\n [comp]\n );\n\n return (\n <StyledComponent\n ref={ref}\n className={clsx(\n className,\n classes?.root,\n typographyClasses.root,\n classes?.[variant],\n typographyClasses[variant],\n noWrap && clsx(typographyClasses.noWrap, classes?.noWrap)\n )}\n $variant={\n mappedVariant as HvTypographyVariants | HvTypographyLegacyVariants\n }\n $link={link}\n $disabled={disabled}\n $noWrap={noWrap}\n {...others}\n >\n {children}\n </StyledComponent>\n );\n }\n);\n"],"names":["HvTypographyMap","display","title1","title2","title3","title4","body","label","caption1","caption2","xxlTitle","lTitle","sTitle","xxsTitle","sectionTitle","placeholderText","link","disabledText","selectedNavText","vizTextDisabled","xsInlineLink","getStyledComponent","c","process","env","NODE_ENV","_extends","target","transientOptions","$variant","$link","$disabled","$noWrap","theme","typography","textTransform","textDecoration","cursor","fontFamily","color","colors","primary","secondary_60","overflow","textOverflow","whiteSpace","HvTypography","forwardRef","props","ref","children","className","component","classes","variant","disabled","noWrap","paragraph","others","activeTheme","useTheme","mappedVariant","mapVariant","name","comp","StyledCompon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AAAAA,IAEF/B,OAAOd;AAAAA,IACPe,WAAWwB;AAAAA,IACXvB,SAASwB;AAAAA,IAAO,GACZE;AAAAA,IAAMR;AAAAA,EAAAA,CAGK;AAErB,CACF;"}
1
+ {"version":3,"file":"Typography.js","sources":["../../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import { forwardRef, AllHTMLAttributes, Ref } from \"react\";\nimport { HvBaseProps } from \"@core/types\";\nimport { ExtractNames } from \"@core/utils\";\nimport { useTheme } from \"@core/hooks\";\nimport { mapVariant } from \"./utils\";\nimport { staticClasses, useClasses } from \"./Typography.styles\";\n\nexport { staticClasses as typographyClasses };\n\nexport type HvTypographyClasses = ExtractNames<typeof useClasses>;\n\nexport const typographyVariants = [\n \"display\",\n \"title1\",\n \"title2\",\n \"title3\",\n \"title4\",\n \"body\",\n \"label\",\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\nconst HvTypographyMap = {\n display: \"h1\",\n title1: \"h1\",\n title2: \"h2\",\n title3: \"h3\",\n title4: \"h4\",\n body: \"p\",\n label: \"label\",\n caption1: \"p\",\n caption2: \"p\",\n // LEGACY\n \"5xlTitle\": \"h1\",\n \"4xlTitle\": \"h1\",\n xxlTitle: \"h1\",\n lTitle: \"h2\",\n sTitle: \"h4\",\n xxsTitle: \"h6\",\n sectionTitle: \"p\",\n placeholderText: \"p\",\n link: \"p\",\n disabledText: \"p\",\n selectedNavText: \"p\",\n vizTextDisabled: \"p\",\n xsInlineLink: \"p\",\n} as const;\n\nexport interface HvTypographyProps\n extends Omit<AllHTMLAttributes<HTMLElement>, \"disabled\">,\n HvBaseProps<HTMLElement> {\n component?: React.ElementType;\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 /** If `true`, the text will have a bottom margin. */\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 * Typography component is used to render text and paragraphs within an interface.\n */\nexport const HvTypography = forwardRef(\n (props: HvTypographyProps, ref: Ref<HTMLElement>) => {\n const {\n className,\n component: ComponentProp,\n classes: classesProp,\n variant: variantProp = \"body\",\n link = false,\n disabled = false,\n noWrap = false,\n paragraph = false,\n ...others\n } = 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(classes.root, classes[variant], className, {\n [classes.isLink]: link,\n [classes.noWrap]: noWrap,\n [classes.disabled]: disabled,\n })}\n {...others}\n />\n );\n }\n);\n"],"names":["typographyVariants","HvTypographyMap","display","title1","title2","title3","title4","body","label","caption1","caption2","xxlTitle","lTitle","sTitle","xxsTitle","sectionTitle","placeholderText","link","disabledText","selectedNavText","vizTextDisabled","xsInlineLink","HvTypography","forwardRef","props","ref","className","component","ComponentProp","classes","classesProp","variant","variantProp","disabled","noWrap","paragraph","others","cx","useClasses","activeTheme","useTheme","mapVariant","name","Component","root","isLink"],"mappings":";;;;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AQ,GAAGA;AAAAA,IAAAA,CACrB;AAAA,IAAE,GACCG;AAAAA,EAAAA,CACL;AAEL,CACF;"}
@@ -0,0 +1,107 @@
1
+ import { theme } from "@hitachivantara/uikit-styles";
2
+ import { createClasses } from "../../utils/classes.js";
3
+ const {
4
+ useClasses,
5
+ staticClasses
6
+ } = createClasses("HvTypography", {
7
+ root: {
8
+ fontFamily: theme.fontFamily.body
9
+ },
10
+ disabled: {
11
+ color: theme.colors.secondary_60
12
+ },
13
+ isLink: {
14
+ color: theme.colors.primary,
15
+ textDecoration: "underline"
16
+ },
17
+ noWrap: {
18
+ overflow: "hidden",
19
+ textOverflow: "ellipsis",
20
+ whiteSpace: "nowrap"
21
+ },
22
+ // variants
23
+ display: {
24
+ ...theme.typography.display
25
+ },
26
+ title1: {
27
+ ...theme.typography.title1
28
+ },
29
+ title2: {
30
+ ...theme.typography.title2
31
+ },
32
+ title3: {
33
+ ...theme.typography.title3
34
+ },
35
+ title4: {
36
+ ...theme.typography.title4
37
+ },
38
+ body: {
39
+ ...theme.typography.body
40
+ },
41
+ label: {
42
+ ...theme.typography.label
43
+ },
44
+ caption1: {
45
+ ...theme.typography.caption1
46
+ },
47
+ caption2: {
48
+ ...theme.typography.caption2
49
+ },
50
+ // legacy variants
51
+ "5xlTitle": {
52
+ ...theme.typography["5xlTitle"]
53
+ },
54
+ "4xlTitle": {
55
+ ...theme.typography["4xlTitle"]
56
+ },
57
+ "3xlTitle": {
58
+ ...theme.typography["3xlTitle"]
59
+ },
60
+ xxlTitle: {
61
+ ...theme.typography.xxlTitle
62
+ },
63
+ xlTitle: {},
64
+ lTitle: {
65
+ ...theme.typography.lTitle
66
+ },
67
+ mTitle: {},
68
+ sTitle: {
69
+ ...theme.typography.sTitle
70
+ },
71
+ xsTitle: {},
72
+ xxsTitle: {
73
+ ...theme.typography.xxsTitle
74
+ },
75
+ sectionTitle: {
76
+ ...theme.typography.sectionTitle,
77
+ textTransform: "uppercase"
78
+ },
79
+ highlightText: {},
80
+ normalText: {},
81
+ placeholderText: {
82
+ ...theme.typography.placeholderText
83
+ },
84
+ link: {
85
+ ...theme.typography.link,
86
+ cursor: "pointer",
87
+ textDecoration: "underline"
88
+ },
89
+ disabledText: {
90
+ ...theme.typography.disabledText
91
+ },
92
+ selectedNavText: {
93
+ ...theme.typography.selectedNavText
94
+ },
95
+ vizText: {},
96
+ vizTextDisabled: {
97
+ ...theme.typography.vizTextDisabled
98
+ },
99
+ xsInlineLink: {
100
+ ...theme.typography.xsInlineLink
101
+ }
102
+ });
103
+ export {
104
+ staticClasses,
105
+ useClasses
106
+ };
107
+ //# sourceMappingURL=Typography.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Typography.styles.js","sources":["../../../../src/components/Typography/Typography.styles.ts"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\nimport { createClasses } from \"../../utils\";\n\nexport const { useClasses, staticClasses } = createClasses(\"HvTypography\", {\n root: {\n fontFamily: theme.fontFamily.body,\n },\n disabled: {\n color: theme.colors.secondary_60,\n },\n isLink: {\n color: theme.colors.primary,\n textDecoration: \"underline\",\n },\n noWrap: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n },\n // variants\n display: { ...theme.typography.display },\n title1: { ...theme.typography.title1 },\n title2: { ...theme.typography.title2 },\n title3: { ...theme.typography.title3 },\n title4: { ...theme.typography.title4 },\n body: { ...theme.typography.body },\n label: { ...theme.typography.label },\n caption1: { ...theme.typography.caption1 },\n caption2: { ...theme.typography.caption2 },\n // legacy variants\n \"5xlTitle\": { ...theme.typography[\"5xlTitle\"] },\n \"4xlTitle\": { ...theme.typography[\"4xlTitle\"] },\n \"3xlTitle\": { ...theme.typography[\"3xlTitle\"] },\n xxlTitle: { ...theme.typography.xxlTitle },\n xlTitle: {},\n lTitle: { ...theme.typography.lTitle },\n mTitle: {},\n sTitle: { ...theme.typography.sTitle },\n xsTitle: {},\n xxsTitle: { ...theme.typography.xxsTitle },\n sectionTitle: {\n ...theme.typography.sectionTitle,\n textTransform: \"uppercase\",\n },\n highlightText: {},\n normalText: {},\n placeholderText: { ...theme.typography.placeholderText },\n link: {\n ...theme.typography.link,\n cursor: \"pointer\",\n textDecoration: \"underline\",\n },\n disabledText: { ...theme.typography.disabledText },\n selectedNavText: { ...theme.typography.selectedNavText },\n vizText: {},\n vizTextDisabled: { ...theme.typography.vizTextDisabled },\n xsInlineLink: { ...theme.typography.xsInlineLink },\n});\n"],"names":["useClasses","staticClasses","createClasses","root","fontFamily","theme","body","disabled","color","colors","secondary_60","isLink","primary","textDecoration","noWrap","overflow","textOverflow","whiteSpace","display","typography","title1","title2","title3","title4","label","caption1","caption2","xxlTitle","xlTitle","lTitle","mTitle","sTitle","xsTitle","xxsTitle","sectionTitle","textTransform","highlightText","normalText","placeholderText","link","cursor","disabledText","selectedNavText","vizText","vizTextDisabled","xsInlineLink"],"mappings":";;AAGa,MAAA;AAAA,EAAEA;AAAAA,EAAYC;AAAc,IAAIC,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IACJC,YAAYC,MAAMD,WAAWE;AAAAA,EAC/B;AAAA,EACAC,UAAU;AAAA,IACRC,OAAOH,MAAMI,OAAOC;AAAAA,EACtB;AAAA,EACAC,QAAQ;AAAA,IACNH,OAAOH,MAAMI,OAAOG;AAAAA,IACpBC,gBAAgB;AAAA,EAClB;AAAA,EACAC,QAAQ;AAAA,IACNC,UAAU;AAAA,IACVC,cAAc;AAAA,IACdC,YAAY;AAAA,EACd;AAAA;AAAA,EAEAC,SAAS;AAAA,IAAE,GAAGb,MAAMc,WAAWD;AAAAA,EAAQ;AAAA,EACvCE,QAAQ;AAAA,IAAE,GAAGf,MAAMc,WAAWC;AAAAA,EAAO;AAAA,EACrCC,QAAQ;AAAA,IAAE,GAAGhB,MAAMc,WAAWE;AAAAA,EAAO;AAAA,EACrCC,QAAQ;AAAA,IAAE,GAAGjB,MAAMc,WAAWG;AAAAA,EAAO;AAAA,EACrC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AAA,IAAE,GAAGpC,MAAMc,WAAWsB;AAAAA,EAAa;AAAA,EACjDC,iBAAiB;AAAA,IAAE,GAAGrC,MAAMc,WAAWuB;AAAAA,EAAgB;AAAA,EACvDC,SAAS,CAAC;AAAA,EACVC,iBAAiB;AAAA,IAAE,GAAGvC,MAAMc,WAAWyB;AAAAA,EAAgB;AAAA,EACvDC,cAAc;AAAA,IAAE,GAAGxC,MAAMc,WAAW0B;AAAAA,EAAa;AACnD,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../src/components/Typography/utils.ts"],"sourcesContent":["const mappableVariants = new Map([\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: string, theme?: string) => {\n const mappedVariant = mappableVariants.get(variant);\n\n if (theme !== \"ds3\") {\n if (mappedVariant) {\n // eslint-disable-next-line no-console\n console.warn(\n `The typography variant ${variant} is deprecated. You should use ${mappedVariant} instead.`\n );\n return mappedVariant;\n }\n if (isLegacyVariant(variant)) {\n // eslint-disable-next-line no-console\n console.warn(`The typography variant ${variant} is deprecated.`);\n }\n }\n\n return variant;\n};\n"],"names":["mappableVariants","Map","isLegacyVariant","variant","includes","mapVariant","theme","mappedVariant","get","warn"],"mappings":"AAAA,MAAMA,mBAAmB,oBAAIC,IAAI,CAC/B,CAAC,YAAY,SAAS,GACtB,CAAC,WAAW,QAAQ,GACpB,CAAC,UAAU,QAAQ,GACnB,CAAC,WAAW,QAAQ,GACpB,CAAC,iBAAiB,OAAO,GACzB,CAAC,cAAc,MAAM,GACrB,CAAC,WAAW,UAAU,CAAC,CACxB;AAED,MAAMC,kBAAkBA,CAACC,YAAoB;AACpC,SAAA,CACL,YACA,YACA,YACA,YACA,WACA,UACA,UACA,UACA,WACA,YACA,gBACA,iBACA,cACA,mBACA,QACA,gBACA,mBACA,WACA,mBACA,cAAc,EACdC,SAASD,OAAO;AACpB;AAEaE,MAAAA,aAAaA,CAACF,SAAiBG,UAAmB;AACvDC,QAAAA,gBAAgBP,iBAAiBQ,IAAIL,OAAO;AAElD,MAAIG,UAAU,OAAO;AACnB,QAAIC,eAAe;AAETE,cAAAA,KACL,0BAAyBN,yCAAyCI,wBACrE;AACOA,aAAAA;AAAAA,IACT;AACIL,QAAAA,gBAAgBC,OAAO,GAAG;AAEpBM,cAAAA,KAAM,0BAAyBN,wBAAwB;AAAA,IACjE;AAAA,EACF;AAEOA,SAAAA;AACT;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../src/components/Typography/utils.ts"],"sourcesContent":["import { HvTypographyLegacyVariants, HvTypographyVariants } from \".\";\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 const mappedVariant = mappableVariants.get(variant);\n\n if (theme !== \"ds3\") {\n if (mappedVariant) {\n // eslint-disable-next-line no-console\n console.warn(\n `The typography variant ${variant} is deprecated. You should use ${mappedVariant} instead.`\n );\n return mappedVariant;\n }\n if (isLegacyVariant(variant)) {\n // eslint-disable-next-line no-console\n console.warn(`The typography variant ${variant} is deprecated.`);\n }\n }\n\n return variant;\n};\n"],"names":["mappableVariants","Map","isLegacyVariant","variant","includes","mapVariant","theme","mappedVariant","get","warn"],"mappings":"AAIA,MAAMA,mBAAmB,oBAAIC,IAAmC,CAC9D,CAAC,YAAY,SAAS,GACtB,CAAC,WAAW,QAAQ,GACpB,CAAC,UAAU,QAAQ,GACnB,CAAC,WAAW,QAAQ,GACpB,CAAC,iBAAiB,OAAO,GACzB,CAAC,cAAc,MAAM,GACrB,CAAC,WAAW,UAAU,CAAC,CACxB;AAED,MAAMC,kBAAkBA,CAACC,YAAoB;AACpC,SAAA,CACL,YACA,YACA,YACA,YACA,WACA,UACA,UACA,UACA,WACA,YACA,gBACA,iBACA,cACA,mBACA,QACA,gBACA,mBACA,WACA,mBACA,cAAc,EACdC,SAASD,OAAO;AACpB;AAEaE,MAAAA,aAAaA,CAACF,SAAkBG,UAAmB;AACxDC,QAAAA,gBAAgBP,iBAAiBQ,IAAIL,OAAO;AAElD,MAAIG,UAAU,OAAO;AACnB,QAAIC,eAAe;AAETE,cAAAA,KACL,0BAAyBN,yCAAyCI,wBACrE;AACOA,aAAAA;AAAAA,IACT;AACIL,QAAAA,gBAAgBC,OAAO,GAAG;AAEpBM,cAAAA,KAAM,0BAAyBN,wBAAwB;AAAA,IACjE;AAAA,EACF;AAEOA,SAAAA;AACT;"}
@@ -6,7 +6,7 @@ const useWidth = () => {
6
6
  return keys.reduce((output, key) => {
7
7
  const matches = useMediaQuery(muiTheme.breakpoints.up(key));
8
8
  return !output && matches ? key : output;
9
- }, "") || "xs";
9
+ }, null) || "xs";
10
10
  };
11
11
  export {
12
12
  useWidth
@@ -1 +1 @@
1
- {"version":3,"file":"useWidth.js","sources":["../../../src/hooks/useWidth.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { Breakpoint, useMediaQuery, useTheme } from \"@mui/material\";\n\nexport const useWidth = () => {\n const muiTheme = useTheme();\n const keys = Object.keys(theme.breakpoints.values).reverse();\n return (\n keys.reduce((output, key) => {\n const matches = useMediaQuery(muiTheme.breakpoints.up(key as Breakpoint));\n\n return !output && matches ? key : output;\n }, \"\") || \"xs\"\n );\n};\n"],"names":["useWidth","muiTheme","useTheme","keys","Object","theme","breakpoints","values","reverse","reduce","output","key","matches","useMediaQuery","up"],"mappings":";;AAIO,MAAMA,WAAWA,MAAM;AAC5B,QAAMC,WAAWC;AACjB,QAAMC,OAAOC,OAAOD,KAAKE,MAAMC,YAAYC,MAAM,EAAEC;AACnD,SACEL,KAAKM,OAAO,CAACC,QAAQC,QAAQ;AAC3B,UAAMC,UAAUC,cAAcZ,SAASK,YAAYQ,GAAGH,IAAkB;AAEjE,WAAA,CAACD,UAAUE,UAAUD,MAAMD;AAAAA,EAAAA,GACjC,EAAE,KAAK;AAEd;"}
1
+ {"version":3,"file":"useWidth.js","sources":["../../../src/hooks/useWidth.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { Breakpoint, useMediaQuery, useTheme } from \"@mui/material\";\n\nexport const useWidth = () => {\n const muiTheme = useTheme();\n const keys = Object.keys(theme.breakpoints.values).reverse() as Breakpoint[];\n\n return (\n keys.reduce<Breakpoint | null>((output, key) => {\n const matches = useMediaQuery(muiTheme.breakpoints.up(key));\n\n return !output && matches ? key : output;\n }, null) || \"xs\"\n );\n};\n"],"names":["useWidth","muiTheme","useTheme","keys","Object","theme","breakpoints","values","reverse","reduce","output","key","matches","useMediaQuery","up"],"mappings":";;AAIO,MAAMA,WAAWA,MAAM;AAC5B,QAAMC,WAAWC;AACjB,QAAMC,OAAOC,OAAOD,KAAKE,MAAMC,YAAYC,MAAM,EAAEC;AAEnD,SACEL,KAAKM,OAA0B,CAACC,QAAQC,QAAQ;AAC9C,UAAMC,UAAUC,cAAcZ,SAASK,YAAYQ,GAAGH,GAAG,CAAC;AAEnD,WAAA,CAACD,UAAUE,UAAUD,MAAMD;AAAAA,EAAAA,GACjC,IAAI,KAAK;AAEhB;"}