@hitachivantara/uikit-react-core 5.42.1 → 5.43.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.
- package/dist/cjs/Accordion/Accordion.cjs +3 -1
- package/dist/cjs/Accordion/Accordion.cjs.map +1 -1
- package/dist/cjs/AppSwitcher/AppSwitcher.cjs +3 -3
- package/dist/cjs/AppSwitcher/AppSwitcher.cjs.map +1 -1
- package/dist/cjs/BaseDropdown/BaseDropdown.cjs +1 -0
- package/dist/cjs/BaseDropdown/BaseDropdown.cjs.map +1 -1
- package/dist/cjs/Button/Button.styles.cjs +1 -0
- package/dist/cjs/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/Calendar/SingleCalendar/CalendarCell.cjs.map +1 -1
- package/dist/cjs/Calendar/SingleCalendar/SingleCalendar.cjs.map +1 -1
- package/dist/cjs/Calendar/model.cjs.map +1 -1
- package/dist/cjs/Calendar/utils.cjs.map +1 -1
- package/dist/cjs/Card/Card.cjs +1 -1
- package/dist/cjs/Card/Card.cjs.map +1 -1
- package/dist/cjs/ColorPicker/Fields/Fields.cjs.map +1 -1
- package/dist/cjs/DatePicker/useVisibleDate.cjs.map +1 -1
- package/dist/cjs/Dialog/Content/Content.cjs +3 -1
- package/dist/cjs/Dialog/Content/Content.cjs.map +1 -1
- package/dist/cjs/Drawer/Drawer.cjs +2 -4
- package/dist/cjs/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/FileUploader/DropZone/DropZone.cjs +3 -4
- package/dist/cjs/FileUploader/DropZone/DropZone.cjs.map +1 -1
- package/dist/cjs/Focus/utils.cjs.map +1 -1
- package/dist/cjs/Forms/FormElement/utils/FormUtils.cjs.map +1 -1
- package/dist/cjs/Header/Navigation/utils/FocusContext.cjs +1 -2
- package/dist/cjs/Header/Navigation/utils/FocusContext.cjs.map +1 -1
- package/dist/cjs/Link/Link.cjs +6 -5
- package/dist/cjs/Link/Link.cjs.map +1 -1
- package/dist/cjs/List/utils.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.cjs.map +1 -1
- package/dist/cjs/ScrollTo/useScrollTo.cjs.map +1 -1
- package/dist/cjs/Slider/Slider.cjs +1 -1
- package/dist/cjs/Slider/Slider.cjs.map +1 -1
- package/dist/cjs/Snackbar/Snackbar.cjs +8 -8
- package/dist/cjs/Snackbar/Snackbar.cjs.map +1 -1
- package/dist/cjs/Stack/Stack.cjs.map +1 -1
- package/dist/cjs/Switch/Switch.cjs.map +1 -1
- package/dist/cjs/Table/Table.cjs.map +1 -1
- package/dist/cjs/Table/TableCell/TableCell.styles.cjs +2 -5
- package/dist/cjs/Table/TableCell/TableCell.styles.cjs.map +1 -1
- package/dist/cjs/Table/TableHeader/utils.cjs +1 -3
- package/dist/cjs/Table/TableHeader/utils.cjs.map +1 -1
- package/dist/cjs/Table/hooks/useTable.cjs +0 -4
- package/dist/cjs/Table/hooks/useTable.cjs.map +1 -1
- package/dist/cjs/Tag/Tag.cjs +7 -8
- package/dist/cjs/Tag/Tag.cjs.map +1 -1
- package/dist/cjs/TextArea/TextArea.cjs +2 -2
- package/dist/cjs/TextArea/TextArea.cjs.map +1 -1
- package/dist/cjs/TimeAgo/formatUtils.cjs.map +1 -1
- package/dist/cjs/TimeAgo/useTimeAgo.cjs +1 -1
- package/dist/cjs/TimeAgo/useTimeAgo.cjs.map +1 -1
- package/dist/cjs/TimeAgo/useTimeout.cjs.map +1 -1
- package/dist/cjs/TimePicker/Placeholder.cjs.map +1 -1
- package/dist/cjs/Typography/Typography.styles.cjs +1 -0
- package/dist/cjs/Typography/Typography.styles.cjs.map +1 -1
- package/dist/cjs/hooks/useUniqueId.cjs +29 -4
- package/dist/cjs/hooks/useUniqueId.cjs.map +1 -1
- package/dist/cjs/index.cjs +0 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/utils/ConditionalWrapper.cjs +5 -1
- package/dist/cjs/utils/ConditionalWrapper.cjs.map +1 -1
- package/dist/cjs/utils/browser.cjs.map +1 -1
- package/dist/cjs/utils/focusableElementFinder.cjs.map +1 -1
- package/dist/cjs/utils/getComponentName.cjs.map +1 -1
- package/dist/cjs/utils/hexToRgbA.cjs.map +1 -1
- package/dist/cjs/utils/multiSelectionEventHandler.cjs.map +1 -1
- package/dist/cjs/utils/setId.cjs.map +1 -1
- package/dist/cjs/utils/theme.cjs.map +1 -1
- package/dist/cjs/utils/wrapperTooltip.cjs.map +1 -1
- package/dist/esm/Accordion/Accordion.mjs +3 -1
- package/dist/esm/Accordion/Accordion.mjs.map +1 -1
- package/dist/esm/AppSwitcher/AppSwitcher.mjs +3 -3
- package/dist/esm/AppSwitcher/AppSwitcher.mjs.map +1 -1
- package/dist/esm/BaseDropdown/BaseDropdown.mjs +1 -0
- package/dist/esm/BaseDropdown/BaseDropdown.mjs.map +1 -1
- package/dist/esm/Button/Button.styles.mjs +1 -0
- package/dist/esm/Button/Button.styles.mjs.map +1 -1
- package/dist/esm/Calendar/SingleCalendar/CalendarCell.mjs.map +1 -1
- package/dist/esm/Calendar/SingleCalendar/SingleCalendar.mjs.map +1 -1
- package/dist/esm/Calendar/model.mjs.map +1 -1
- package/dist/esm/Calendar/utils.mjs.map +1 -1
- package/dist/esm/Card/Card.mjs +2 -2
- package/dist/esm/Card/Card.mjs.map +1 -1
- package/dist/esm/ColorPicker/Fields/Fields.mjs.map +1 -1
- package/dist/esm/DatePicker/useVisibleDate.mjs.map +1 -1
- package/dist/esm/Dialog/Content/Content.mjs +3 -1
- package/dist/esm/Dialog/Content/Content.mjs.map +1 -1
- package/dist/esm/Drawer/Drawer.mjs +2 -4
- package/dist/esm/Drawer/Drawer.mjs.map +1 -1
- package/dist/esm/FileUploader/DropZone/DropZone.mjs +3 -4
- package/dist/esm/FileUploader/DropZone/DropZone.mjs.map +1 -1
- package/dist/esm/Focus/utils.mjs.map +1 -1
- package/dist/esm/Forms/FormElement/utils/FormUtils.mjs.map +1 -1
- package/dist/esm/Header/Navigation/utils/FocusContext.mjs +1 -2
- package/dist/esm/Header/Navigation/utils/FocusContext.mjs.map +1 -1
- package/dist/esm/Link/Link.mjs +6 -5
- package/dist/esm/Link/Link.mjs.map +1 -1
- package/dist/esm/List/utils.mjs.map +1 -1
- package/dist/esm/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.mjs.map +1 -1
- package/dist/esm/ScrollTo/useScrollTo.mjs.map +1 -1
- package/dist/esm/Slider/Slider.mjs +1 -1
- package/dist/esm/Slider/Slider.mjs.map +1 -1
- package/dist/esm/Snackbar/Snackbar.mjs +8 -8
- package/dist/esm/Snackbar/Snackbar.mjs.map +1 -1
- package/dist/esm/Stack/Stack.mjs.map +1 -1
- package/dist/esm/Switch/Switch.mjs.map +1 -1
- package/dist/esm/Table/Table.mjs.map +1 -1
- package/dist/esm/Table/TableCell/TableCell.styles.mjs +2 -5
- package/dist/esm/Table/TableCell/TableCell.styles.mjs.map +1 -1
- package/dist/esm/Table/TableHeader/utils.mjs +1 -3
- package/dist/esm/Table/TableHeader/utils.mjs.map +1 -1
- package/dist/esm/Table/hooks/useTable.mjs +0 -2
- package/dist/esm/Table/hooks/useTable.mjs.map +1 -1
- package/dist/esm/Tag/Tag.mjs +7 -8
- package/dist/esm/Tag/Tag.mjs.map +1 -1
- package/dist/esm/TextArea/TextArea.mjs +2 -2
- package/dist/esm/TextArea/TextArea.mjs.map +1 -1
- package/dist/esm/TimeAgo/formatUtils.mjs.map +1 -1
- package/dist/esm/TimeAgo/useTimeAgo.mjs +1 -1
- package/dist/esm/TimeAgo/useTimeAgo.mjs.map +1 -1
- package/dist/esm/TimeAgo/useTimeout.mjs.map +1 -1
- package/dist/esm/TimePicker/Placeholder.mjs.map +1 -1
- package/dist/esm/Typography/Typography.styles.mjs +1 -0
- package/dist/esm/Typography/Typography.styles.mjs.map +1 -1
- package/dist/esm/hooks/useUniqueId.mjs +11 -3
- package/dist/esm/hooks/useUniqueId.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/utils/ConditionalWrapper.mjs +5 -1
- package/dist/esm/utils/ConditionalWrapper.mjs.map +1 -1
- package/dist/esm/utils/browser.mjs.map +1 -1
- package/dist/esm/utils/focusableElementFinder.mjs.map +1 -1
- package/dist/esm/utils/getComponentName.mjs.map +1 -1
- package/dist/esm/utils/hexToRgbA.mjs.map +1 -1
- package/dist/esm/utils/multiSelectionEventHandler.mjs.map +1 -1
- package/dist/esm/utils/setId.mjs.map +1 -1
- package/dist/esm/utils/theme.mjs.map +1 -1
- package/dist/esm/utils/wrapperTooltip.mjs.map +1 -1
- package/dist/types/index.d.ts +19 -37
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimeAgo.mjs","sources":["../../../src/TimeAgo/useTimeAgo.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport { useTimeout } from \"./useTimeout\";\nimport { formatTimeAgo } from \"./formatUtils\";\n\n/**\n * Calls `formatTimeAgo` with timestamp conversion\n */\nconst fmt = (timestamp, locale, showSeconds) => {\n const timestampMs =\n String(timestamp).length > 11 ? timestamp : timestamp * 1000;\n return formatTimeAgo(new Date(timestampMs), locale, showSeconds);\n};\n\nexport default function useTimeAgo(timestamp,
|
|
1
|
+
{"version":3,"file":"useTimeAgo.mjs","sources":["../../../src/TimeAgo/useTimeAgo.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport type { HvTimeAgoProps } from \"./TimeAgo\";\nimport { useTimeout } from \"./useTimeout\";\nimport { formatTimeAgo } from \"./formatUtils\";\n\n/**\n * Calls `formatTimeAgo` with timestamp conversion\n */\nconst fmt = (timestamp: any, locale: any, showSeconds?: boolean) => {\n const timestampMs =\n String(timestamp).length > 11 ? timestamp : timestamp * 1000;\n return formatTimeAgo(new Date(timestampMs), locale, showSeconds);\n};\n\nexport default function useTimeAgo(\n timestamp: number | undefined,\n options?: Pick<HvTimeAgoProps, \"locale\" | \"disableRefresh\" | \"showSeconds\">\n) {\n const { locale, disableRefresh = false, showSeconds = false } = options || {};\n const [timeAgo, setTimeAgo] = useState(fmt(timestamp, locale, showSeconds));\n const refreshTime = disableRefresh ? 0 : timeAgo.delay * 1000;\n\n useEffect(() => {\n const newTimeAgo = fmt(timestamp, locale, showSeconds);\n setTimeAgo(newTimeAgo);\n }, [timestamp, locale, showSeconds]);\n\n useTimeout(() => {\n const newTimeAgo = fmt(timestamp, locale, showSeconds);\n setTimeAgo(newTimeAgo);\n }, refreshTime);\n\n return timeAgo.timeAgo;\n}\n"],"names":[],"mappings":";;;AASA,MAAM,MAAM,CAAC,WAAgB,QAAa,gBAA0B;AAClE,QAAM,cACJ,OAAO,SAAS,EAAE,SAAS,KAAK,YAAY,YAAY;AAC1D,SAAO,cAAc,IAAI,KAAK,WAAW,GAAG,QAAQ,WAAW;AACjE;AAEwB,SAAA,WACtB,WACA,SACA;AACM,QAAA,EAAE,QAAQ,iBAAiB,OAAO,cAAc,MAAM,IAAI,WAAW;AACrE,QAAA,CAAC,SAAS,UAAU,IAAI,SAAS,IAAI,WAAW,QAAQ,WAAW,CAAC;AAC1E,QAAM,cAAc,iBAAiB,IAAI,QAAQ,QAAQ;AAEzD,YAAU,MAAM;AACd,UAAM,aAAa,IAAI,WAAW,QAAQ,WAAW;AACrD,eAAW,UAAU;AAAA,EACpB,GAAA,CAAC,WAAW,QAAQ,WAAW,CAAC;AAEnC,aAAW,MAAM;AACf,UAAM,aAAa,IAAI,WAAW,QAAQ,WAAW;AACrD,eAAW,UAAU;AAAA,KACpB,WAAW;AAEd,SAAO,QAAQ;AACjB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimeout.mjs","sources":["../../../src/TimeAgo/useTimeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nexport const useTimeout = (callback, delay) => {\n const savedCallback = useRef(callback);\n\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n useEffect(() => {\n if (!delay) return undefined;\n\n const id = setTimeout(() => savedCallback.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n};\n"],"names":[],"mappings":";AAEa,MAAA,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"useTimeout.mjs","sources":["../../../src/TimeAgo/useTimeout.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nexport const useTimeout = (callback: () => any, delay: number) => {\n const savedCallback = useRef(callback);\n\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n useEffect(() => {\n if (!delay) return undefined;\n\n const id = setTimeout(() => savedCallback.current(), delay);\n return () => clearTimeout(id);\n }, [delay]);\n};\n"],"names":[],"mappings":";AAEa,MAAA,aAAa,CAAC,UAAqB,UAAkB;AAC1D,QAAA,gBAAgB,OAAO,QAAQ;AAErC,YAAU,MAAM;AACd,kBAAc,UAAU;AAAA,EAAA,GACvB,CAAC,QAAQ,CAAC;AAEb,YAAU,MAAM;AACd,QAAI,CAAC;AAAc,aAAA;AAEnB,UAAM,KAAK,WAAW,MAAM,cAAc,QAAA,GAAW,KAAK;AACnD,WAAA,MAAM,aAAa,EAAE;AAAA,EAAA,GAC3B,CAAC,KAAK,CAAC;AACZ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.mjs","sources":["../../../src/TimePicker/Placeholder.tsx"],"sourcesContent":["import { forwardRef, useRef } from \"react\";\n\nimport { DateFieldState, DateSegment } from \"@react-stately/datepicker\";\nimport { useDateSegment } from \"@react-aria/datepicker\";\n\nimport { HvBaseProps } from \"../types/generic\";\n\n/** Convert `Date` into `hh:mm:ss` format */\nconst getDateValue = (date) => {\n if (!date) return \"\";\n const { hour, minute, second } = date;\n\n return [hour, minute, second]\n .map((el) => String(el).padStart(2, \"0\"))\n .join(\":\");\n};\n\nconst PlaceholderSegment = ({\n segment,\n state,\n placeholder,\n}: {\n segment: DateSegment;\n state: DateFieldState;\n placeholder: string;\n}) => {\n const ref = useRef(null);\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n return (\n <div ref={ref} {...segmentProps}>\n {(() => {\n if (segment.type === \"literal\") return segment.text;\n if (segment.isPlaceholder) return placeholder ?? segment.text;\n return segment.text.padStart(2, \"0\");\n })()}\n </div>\n );\n};\n\ninterface PlaceholderProps extends HvBaseProps<HTMLDivElement> {\n name?: string;\n state: DateFieldState;\n placeholders: { hour?: string; minute?: string; second?: string };\n}\n\nexport const Placeholder = forwardRef<HTMLDivElement, PlaceholderProps>(\n (props, ref) => {\n const { name, state, placeholders, onKeyDown, ...others } = props;\n const { value, segments } = state;\n\n return (\n <>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={ref}\n onKeyDown={(event) => {\n // stop ArrowDown from opening dropdown\n event.stopPropagation();\n onKeyDown?.(event);\n }}\n {...others}\n >\n {name && (\n <input type=\"hidden\" name={name} value={getDateValue(value)} />\n )}\n {segments.map((segment, i) => (\n <PlaceholderSegment\n key={i}\n segment={segment}\n state={state}\n placeholder={placeholders[segment.type]}\n />\n ))}\n </div>\n </>\n );\n }\n);\n"],"names":[],"mappings":";;;AAQA,MAAM,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"Placeholder.mjs","sources":["../../../src/TimePicker/Placeholder.tsx"],"sourcesContent":["import { forwardRef, useRef } from \"react\";\n\nimport { DateFieldState, DateSegment } from \"@react-stately/datepicker\";\nimport { useDateSegment } from \"@react-aria/datepicker\";\n\nimport { HvBaseProps } from \"../types/generic\";\n\n/** Convert `Date` into `hh:mm:ss` format */\nconst getDateValue = (date: any) => {\n if (!date) return \"\";\n const { hour, minute, second } = date;\n\n return [hour, minute, second]\n .map((el) => String(el).padStart(2, \"0\"))\n .join(\":\");\n};\n\nconst PlaceholderSegment = ({\n segment,\n state,\n placeholder,\n}: {\n segment: DateSegment;\n state: DateFieldState;\n placeholder: string;\n}) => {\n const ref = useRef(null);\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n return (\n <div ref={ref} {...segmentProps}>\n {(() => {\n if (segment.type === \"literal\") return segment.text;\n if (segment.isPlaceholder) return placeholder ?? segment.text;\n return segment.text.padStart(2, \"0\");\n })()}\n </div>\n );\n};\n\ninterface PlaceholderProps extends HvBaseProps<HTMLDivElement> {\n name?: string;\n state: DateFieldState;\n placeholders: { hour?: string; minute?: string; second?: string };\n}\n\nexport const Placeholder = forwardRef<HTMLDivElement, PlaceholderProps>(\n (props, ref) => {\n const { name, state, placeholders, onKeyDown, ...others } = props;\n const { value, segments } = state;\n\n return (\n <>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={ref}\n onKeyDown={(event) => {\n // stop ArrowDown from opening dropdown\n event.stopPropagation();\n onKeyDown?.(event);\n }}\n {...others}\n >\n {name && (\n <input type=\"hidden\" name={name} value={getDateValue(value)} />\n )}\n {segments.map((segment, i) => (\n <PlaceholderSegment\n key={i}\n segment={segment}\n state={state}\n placeholder={placeholders[segment.type]}\n />\n ))}\n </div>\n </>\n );\n }\n);\n"],"names":[],"mappings":";;;AAQA,MAAM,eAAe,CAAC,SAAc;AAClC,MAAI,CAAC;AAAa,WAAA;AAClB,QAAM,EAAE,MAAM,QAAQ,OAAA,IAAW;AAEjC,SAAO,CAAC,MAAM,QAAQ,MAAM,EACzB,IAAI,CAAC,OAAO,OAAO,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EACvC,KAAK,GAAG;AACb;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACE,QAAA,MAAM,OAAO,IAAI;AACvB,QAAM,EAAE,aAAa,IAAI,eAAe,SAAS,OAAO,GAAG;AAE3D,SACG,oBAAA,OAAA,EAAI,KAAW,GAAG,cACf,WAAM,MAAA;AACN,QAAI,QAAQ,SAAS;AAAW,aAAO,QAAQ;AAC/C,QAAI,QAAQ;AAAe,aAAO,eAAe,QAAQ;AACzD,WAAO,QAAQ,KAAK,SAAS,GAAG,GAAG;AAAA,OAEvC,CAAA;AAEJ;AAQO,MAAM,cAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,EAAE,MAAM,OAAO,cAAc,WAAW,GAAG,OAAW,IAAA;AACtD,UAAA,EAAE,OAAO,SAAa,IAAA;AAE5B,WAGI,oBAAA,UAAA,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW,CAAC,UAAU;AAEpB,gBAAM,gBAAgB;AACtB,sBAAY,KAAK;AAAA,QACnB;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UACC,QAAA,oBAAC,WAAM,MAAK,UAAS,MAAY,OAAO,aAAa,KAAK,GAAG;AAAA,UAE9D,SAAS,IAAI,CAAC,SAAS,MACtB;AAAA,YAAC;AAAA,YAAA;AAAA,cAEC;AAAA,cACA;AAAA,cACA,aAAa,aAAa,QAAQ,IAAI;AAAA,YAAA;AAAA,YAHjC;AAAA,UAAA,CAKR;AAAA,QAAA;AAAA,MAAA;AAAA,IAEL,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -29,6 +29,7 @@ const { useClasses, staticClasses } = createClasses("HvTypography", {
|
|
|
29
29
|
// legacy variants
|
|
30
30
|
"5xlTitle": { ...theme.typography["5xlTitle"] },
|
|
31
31
|
"4xlTitle": { ...theme.typography["4xlTitle"] },
|
|
32
|
+
// @ts-ignore non-existent variant
|
|
32
33
|
"3xlTitle": { ...theme.typography["3xlTitle"] },
|
|
33
34
|
xxlTitle: { ...theme.typography.xxlTitle },
|
|
34
35
|
xlTitle: {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.styles.mjs","sources":["../../../src/Typography/Typography.styles.ts"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"../utils/classes\";\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":[],"mappings":";;AAIO,MAAM,EAAE,YAAY,kBAAkB,cAAc,gBAAgB;AAAA,EACzE,MAAM;AAAA,IACJ,YAAY,MAAM,WAAW;AAAA,EAC/B;AAAA,EACA,UAAU;AAAA,IACR,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,IACN,OAAO,MAAM,OAAO;AAAA,IACpB,gBAAgB;AAAA,EAClB;AAAA,EACA,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,cAAc;AAAA,IACd,YAAY;AAAA,EACd;AAAA;AAAA,EAEA,SAAS,EAAE,GAAG,MAAM,WAAW,QAAQ;AAAA,EACvC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,MAAM,EAAE,GAAG,MAAM,WAAW,KAAK;AAAA,EACjC,OAAO,EAAE,GAAG,MAAM,WAAW,MAAM;AAAA,EACnC,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA,EACzC,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA;AAAA,EAEzC,YAAY,EAAE,GAAG,MAAM,WAAW,UAAU,EAAE;AAAA,EAC9C,YAAY,EAAE,GAAG,MAAM,WAAW,UAAU,EAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"Typography.styles.mjs","sources":["../../../src/Typography/Typography.styles.ts"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"../utils/classes\";\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 // @ts-ignore non-existent variant\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":[],"mappings":";;AAIO,MAAM,EAAE,YAAY,kBAAkB,cAAc,gBAAgB;AAAA,EACzE,MAAM;AAAA,IACJ,YAAY,MAAM,WAAW;AAAA,EAC/B;AAAA,EACA,UAAU;AAAA,IACR,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,IACN,OAAO,MAAM,OAAO;AAAA,IACpB,gBAAgB;AAAA,EAClB;AAAA,EACA,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,cAAc;AAAA,IACd,YAAY;AAAA,EACd;AAAA;AAAA,EAEA,SAAS,EAAE,GAAG,MAAM,WAAW,QAAQ;AAAA,EACvC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,MAAM,EAAE,GAAG,MAAM,WAAW,KAAK;AAAA,EACjC,OAAO,EAAE,GAAG,MAAM,WAAW,MAAM;AAAA,EACnC,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA,EACzC,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA;AAAA,EAEzC,YAAY,EAAE,GAAG,MAAM,WAAW,UAAU,EAAE;AAAA,EAC9C,YAAY,EAAE,GAAG,MAAM,WAAW,UAAU,EAAE;AAAA;AAAA,EAE9C,YAAY,EAAE,GAAG,MAAM,WAAW,UAAU,EAAE;AAAA,EAC9C,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA,EACzC,SAAS,CAAC;AAAA,EACV,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,QAAQ,CAAC;AAAA,EACT,QAAQ,EAAE,GAAG,MAAM,WAAW,OAAO;AAAA,EACrC,SAAS,CAAC;AAAA,EACV,UAAU,EAAE,GAAG,MAAM,WAAW,SAAS;AAAA,EACzC,cAAc;AAAA,IACZ,GAAG,MAAM,WAAW;AAAA,IACpB,eAAe;AAAA,EACjB;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,YAAY,CAAC;AAAA,EACb,iBAAiB,EAAE,GAAG,MAAM,WAAW,gBAAgB;AAAA,EACvD,MAAM;AAAA,IACJ,GAAG,MAAM,WAAW;AAAA,IACpB,QAAQ;AAAA,IACR,gBAAgB;AAAA,EAClB;AAAA,EACA,cAAc,EAAE,GAAG,MAAM,WAAW,aAAa;AAAA,EACjD,iBAAiB,EAAE,GAAG,MAAM,WAAW,gBAAgB;AAAA,EACvD,SAAS,CAAC;AAAA,EACV,iBAAiB,EAAE,GAAG,MAAM,WAAW,gBAAgB;AAAA,EACvD,cAAc,EAAE,GAAG,MAAM,WAAW,aAAa;AACnD,CAAC;"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const useReactId = React["useId".toString()] || (() => void 0);
|
|
3
|
+
let count = 0;
|
|
4
|
+
const useUniqueId = (deterministicId, idPrefix) => {
|
|
5
|
+
const [id, setId] = React.useState(useReactId());
|
|
6
|
+
React.useLayoutEffect(() => {
|
|
7
|
+
if (!deterministicId)
|
|
8
|
+
setId((reactId) => reactId ?? String(count++));
|
|
9
|
+
}, [deterministicId, idPrefix]);
|
|
10
|
+
return deterministicId || (idPrefix ? idPrefix + id : id ?? "");
|
|
11
|
+
};
|
|
4
12
|
export {
|
|
5
13
|
useUniqueId
|
|
6
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniqueId.mjs","sources":["../../../src/hooks/useUniqueId.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"useUniqueId.mjs","sources":["../../../src/hooks/useUniqueId.ts"],"sourcesContent":["import * as React from \"react\"; // this can be optimized when react 17 support is dropped\n\n/** Credit: https://github.com/radix-ui/primitives/blob/main/packages/react/id/src/id.tsx\n * Modified slightly to suit our purposes.\n */\n// We `toString()` to prevent bundlers from trying to `import { useId } from 'react';`\nconst useReactId = (React as any)[\"useId\".toString()] || (() => undefined);\nlet count = 0;\n\nexport const useUniqueId = (\n deterministicId?: string,\n idPrefix?: string\n): string => {\n const [id, setId] = React.useState<string | undefined>(useReactId());\n\n React.useLayoutEffect(() => {\n // eslint-disable-next-line no-plusplus\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId, idPrefix]);\n\n return deterministicId || (idPrefix ? idPrefix + id : id ?? \"\");\n};\n"],"names":[],"mappings":";AAMA,MAAM,aAAc,MAAc,QAAQ,SAAU,CAAA,MAAM,MAAM;AAChE,IAAI,QAAQ;AAEC,MAAA,cAAc,CACzB,iBACA,aACW;AACX,QAAM,CAAC,IAAI,KAAK,IAAI,MAAM,SAA6B,YAAY;AAEnE,QAAM,gBAAgB,MAAM;AAE1B,QAAI,CAAC;AAAiB,YAAM,CAAC,YAAY,WAAW,OAAO,OAAO,CAAC;AAAA,EAAA,GAClE,CAAC,iBAAiB,QAAQ,CAAC;AAE9B,SAAO,oBAAoB,WAAW,WAAW,KAAK,MAAM;AAC9D;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -256,7 +256,7 @@ import { defaultgetHvBulkActionsProps, default as default9 } from "./Table/hooks
|
|
|
256
256
|
import { CellWithExpandButton, default as default10 } from "./Table/hooks/useRowExpand.mjs";
|
|
257
257
|
import { default as default11 } from "./Table/hooks/useHeaderGroups.mjs";
|
|
258
258
|
import { default as default12 } from "./Table/hooks/useResizeColumns.mjs";
|
|
259
|
-
import {
|
|
259
|
+
import { useFilters, useGlobalFilter } from "react-table";
|
|
260
260
|
import { hvDateColumn, hvDropdownColumn, hvExpandColumn, hvNumberColumn, hvProgressColumn, hvSwitchColumn, hvTagColumn, hvTextColumn } from "./Table/renderers/renderers.mjs";
|
|
261
261
|
import { HvDateColumnCell } from "./Table/renderers/DateColumnCell/DateColumnCell.mjs";
|
|
262
262
|
import { HvDropdownColumnCell } from "./Table/renderers/DropdownColumnCell/DropdownColumnCell.mjs";
|
|
@@ -421,7 +421,6 @@ export {
|
|
|
421
421
|
HvTableContainer,
|
|
422
422
|
HvTableHead,
|
|
423
423
|
HvTableHeader,
|
|
424
|
-
PluginHook as HvTablePluginHook,
|
|
425
424
|
HvTableRow,
|
|
426
425
|
HvTabs,
|
|
427
426
|
HvTag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrapper.mjs","sources":["../../../src/utils/ConditionalWrapper.tsx"],"sourcesContent":["export const ConditionalWrapper = ({ condition
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.mjs","sources":["../../../src/utils/ConditionalWrapper.tsx"],"sourcesContent":["export const ConditionalWrapper = ({\n condition,\n wrapper,\n children,\n}: {\n condition?: boolean;\n wrapper: any;\n children: React.ReactNode;\n}) => (condition ? wrapper(children) : children);\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,MAIO,YAAY,QAAQ,QAAQ,IAAI;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.mjs","sources":["../../../src/utils/browser.ts"],"sourcesContent":["import { detect } from \"detect-browser\";\n\nexport const isBrowser = (browsers) => {\n const browser = detect();\n return (\n browser &&\n (Array.isArray(browsers)\n ? browsers.indexOf(browser.name) > 0\n : browsers === browser.name)\n );\n};\n"],"names":[],"mappings":";AAEa,MAAA,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"browser.mjs","sources":["../../../src/utils/browser.ts"],"sourcesContent":["import { detect } from \"detect-browser\";\n\nexport const isBrowser = (browsers: string | string[]) => {\n const browser = detect();\n return (\n browser &&\n (Array.isArray(browsers)\n ? browsers.indexOf(browser.name) > 0\n : browsers === browser.name)\n );\n};\n"],"names":[],"mappings":";AAEa,MAAA,YAAY,CAAC,aAAgC;AACxD,QAAM,UAAU;AAChB,SACE,YACC,MAAM,QAAQ,QAAQ,IACnB,SAAS,QAAQ,QAAQ,IAAI,IAAI,IACjC,aAAa,QAAQ;AAE7B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusableElementFinder.mjs","sources":["../../../src/utils/focusableElementFinder.ts"],"sourcesContent":["const SELECTORS =\n 'input, button, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])';\n\n
|
|
1
|
+
{"version":3,"file":"focusableElementFinder.mjs","sources":["../../../src/utils/focusableElementFinder.ts"],"sourcesContent":["const SELECTORS =\n 'input, button, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])';\n\n/** Gets the list of focusable elements. */\nexport const getFocusableList = (node: any) =>\n (node && node.querySelectorAll(SELECTORS)) || [];\n\n/** Auxiliary function to find adjacent nodes to focus. */\nexport const getPrevNextFocus = (nodeId?: string) => {\n const nodes = getFocusableList(document);\n\n const nbNodes = nodes.length;\n let index = 0;\n for (; index < nbNodes; index += 1) {\n if (nodes[index].id === nodeId) {\n break;\n }\n }\n return {\n nextFocus: nodes[index + 1 > nbNodes - 1 ? 0 : index + 1],\n prevFocus: nodes[index - 1 < 0 ? nbNodes - 1 : index - 1],\n };\n};\n\n/** Get the first and last focusable element from a node. */\nexport const getFirstAndLastFocus = (node: any) => {\n const focusableList = getFocusableList(node);\n\n return {\n first: focusableList[0] || null,\n last: focusableList[focusableList.length - 1] || null,\n };\n};\n\nexport default getPrevNextFocus;\n"],"names":[],"mappings":"AAAA,MAAM,YACJ;AAGW,MAAA,mBAAmB,CAAC,SAC9B,QAAQ,KAAK,iBAAiB,SAAS,KAAM,CAAC;AAGpC,MAAA,mBAAmB,CAAC,WAAoB;AAC7C,QAAA,QAAQ,iBAAiB,QAAQ;AAEvC,QAAM,UAAU,MAAM;AACtB,MAAI,QAAQ;AACL,SAAA,QAAQ,SAAS,SAAS,GAAG;AAClC,QAAI,MAAM,KAAK,EAAE,OAAO,QAAQ;AAC9B;AAAA,IACF;AAAA,EACF;AACO,SAAA;AAAA,IACL,WAAW,MAAM,QAAQ,IAAI,UAAU,IAAI,IAAI,QAAQ,CAAC;AAAA,IACxD,WAAW,MAAM,QAAQ,IAAI,IAAI,UAAU,IAAI,QAAQ,CAAC;AAAA,EAAA;AAE5D;AAGa,MAAA,uBAAuB,CAAC,SAAc;AAC3C,QAAA,gBAAgB,iBAAiB,IAAI;AAEpC,SAAA;AAAA,IACL,OAAO,cAAc,CAAC,KAAK;AAAA,IAC3B,MAAM,cAAc,cAAc,SAAS,CAAC,KAAK;AAAA,EAAA;AAErD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentName.mjs","sources":["../../../src/utils/getComponentName.ts"],"sourcesContent":["export const getComponentName = (Component) =>\n Component.displayName || Component.name || \"\";\n"],"names":[],"mappings":"AAAO,MAAM,mBAAmB,CAAC,cAC/B,UAAU,eAAe,UAAU,QAAQ;"}
|
|
1
|
+
{"version":3,"file":"getComponentName.mjs","sources":["../../../src/utils/getComponentName.ts"],"sourcesContent":["export const getComponentName = (Component: React.FC) =>\n Component.displayName || Component.name || \"\";\n"],"names":[],"mappings":"AAAO,MAAM,mBAAmB,CAAC,cAC/B,UAAU,eAAe,UAAU,QAAQ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hexToRgbA.mjs","sources":["../../../src/utils/hexToRgbA.ts"],"sourcesContent":["import { hexToRgb, alpha } from \"@mui/material/styles\";\n\n// TODO - remove in v6 in favor of theme.alpha()\nexport const hexToRgbA = (hex, factor = 0.8)
|
|
1
|
+
{"version":3,"file":"hexToRgbA.mjs","sources":["../../../src/utils/hexToRgbA.ts"],"sourcesContent":["import { hexToRgb, alpha } from \"@mui/material/styles\";\n\n// TODO - remove in v6 in favor of theme.alpha()\nexport const hexToRgbA = (hex: string, factor = 0.8) =>\n alpha(hexToRgb(hex), factor);\n"],"names":[],"mappings":";AAGa,MAAA,YAAY,CAAC,KAAa,SAAS,QAC9C,MAAM,SAAS,GAAG,GAAG,MAAM;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiSelectionEventHandler.mjs","sources":["../../../src/utils/multiSelectionEventHandler.ts"],"sourcesContent":["const cycleThroughSelection = (\n selectedState,\n index,\n allValues,\n selectionCheck\n) => {\n const newValue: any[] = [];\n selectedState.forEach((isSelected, i) => {\n if (i === index) {\n if (selectionCheck || !isSelected) {\n newValue.push(allValues[i]);\n }\n } else if (isSelected) {\n newValue.push(allValues[i]);\n }\n });\n\n return newValue;\n};\n\nexport const multiSelectionEventHandler = (\n evt,\n index,\n selectionAnchor,\n allValues,\n selectedState,\n selectionCheck\n) => {\n let newValue: any[] = [];\n\n if (evt.nativeEvent.shiftKey) {\n if (selectionAnchor.current === undefined) {\n selectionAnchor.current = index;\n newValue.push(allValues[index]);\n } else {\n let selectionStart;\n let selectionEnd;\n if (selectionAnchor.current > index) {\n selectionStart = index;\n selectionEnd = selectionAnchor.current + 1;\n } else {\n selectionStart = selectionAnchor.current;\n selectionEnd = index + 1;\n }\n\n const selectedValues = allValues.slice(selectionStart, selectionEnd);\n\n newValue.push(...selectedValues);\n }\n } else if (evt.nativeEvent.metaKey) {\n selectionAnchor.current = index;\n\n newValue = cycleThroughSelection(\n selectedState,\n index,\n allValues,\n selectionCheck\n );\n } else {\n selectionAnchor.current = index;\n\n newValue = cycleThroughSelection(\n selectedState,\n index,\n allValues,\n selectionCheck\n );\n }\n\n return newValue;\n};\n"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,CAC5B,eACA,OACA,WACA,mBACG;AACH,QAAM,WAAkB,CAAA;AACV,gBAAA,QAAQ,CAAC,YAAY,MAAM;AACvC,QAAI,MAAM,OAAO;AACX,UAAA,kBAAkB,CAAC,YAAY;AACxB,iBAAA,KAAK,UAAU,CAAC,CAAC;AAAA,MAC5B;AAAA,eACS,YAAY;AACZ,eAAA,KAAK,UAAU,CAAC,CAAC;AAAA,IAC5B;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AAEO,MAAM,6BAA6B,CACxC,KACA,OACA,iBACA,WACA,eACA,mBACG;AACH,MAAI,WAAkB,CAAA;AAElB,MAAA,IAAI,YAAY,UAAU;AACxB,QAAA,gBAAgB,YAAY,QAAW;AACzC,sBAAgB,UAAU;AACjB,eAAA,KAAK,UAAU,KAAK,CAAC;AAAA,IAAA,OACzB;AACD,UAAA;AACA,UAAA;AACA,UAAA,gBAAgB,UAAU,OAAO;AAClB,yBAAA;AACjB,uBAAe,gBAAgB,UAAU;AAAA,MAAA,OACpC;AACL,yBAAiB,gBAAgB;AACjC,uBAAe,QAAQ;AAAA,MACzB;AAEA,YAAM,iBAAiB,UAAU,MAAM,gBAAgB,YAAY;AAE1D,eAAA,KAAK,GAAG,cAAc;AAAA,IACjC;AAAA,EAAA,WACS,IAAI,YAAY,SAAS;AAClC,oBAAgB,UAAU;AAEf,eAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,OACK;AACL,oBAAgB,UAAU;AAEf,eAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;"}
|
|
1
|
+
{"version":3,"file":"multiSelectionEventHandler.mjs","sources":["../../../src/utils/multiSelectionEventHandler.ts"],"sourcesContent":["const cycleThroughSelection = (\n selectedState: boolean[],\n index: number,\n allValues: any[],\n selectionCheck: any\n) => {\n const newValue: any[] = [];\n selectedState.forEach((isSelected, i) => {\n if (i === index) {\n if (selectionCheck || !isSelected) {\n newValue.push(allValues[i]);\n }\n } else if (isSelected) {\n newValue.push(allValues[i]);\n }\n });\n\n return newValue;\n};\n\nexport const multiSelectionEventHandler = (\n evt: any,\n index: number,\n selectionAnchor: any,\n allValues: any[],\n selectedState: boolean[],\n selectionCheck: any\n) => {\n let newValue: any[] = [];\n\n if (evt.nativeEvent.shiftKey) {\n if (selectionAnchor.current === undefined) {\n selectionAnchor.current = index;\n newValue.push(allValues[index]);\n } else {\n let selectionStart;\n let selectionEnd;\n if (selectionAnchor.current > index) {\n selectionStart = index;\n selectionEnd = selectionAnchor.current + 1;\n } else {\n selectionStart = selectionAnchor.current;\n selectionEnd = index + 1;\n }\n\n const selectedValues = allValues.slice(selectionStart, selectionEnd);\n\n newValue.push(...selectedValues);\n }\n } else if (evt.nativeEvent.metaKey) {\n selectionAnchor.current = index;\n\n newValue = cycleThroughSelection(\n selectedState,\n index,\n allValues,\n selectionCheck\n );\n } else {\n selectionAnchor.current = index;\n\n newValue = cycleThroughSelection(\n selectedState,\n index,\n allValues,\n selectionCheck\n );\n }\n\n return newValue;\n};\n"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,CAC5B,eACA,OACA,WACA,mBACG;AACH,QAAM,WAAkB,CAAA;AACV,gBAAA,QAAQ,CAAC,YAAY,MAAM;AACvC,QAAI,MAAM,OAAO;AACX,UAAA,kBAAkB,CAAC,YAAY;AACxB,iBAAA,KAAK,UAAU,CAAC,CAAC;AAAA,MAC5B;AAAA,eACS,YAAY;AACZ,eAAA,KAAK,UAAU,CAAC,CAAC;AAAA,IAC5B;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AAEO,MAAM,6BAA6B,CACxC,KACA,OACA,iBACA,WACA,eACA,mBACG;AACH,MAAI,WAAkB,CAAA;AAElB,MAAA,IAAI,YAAY,UAAU;AACxB,QAAA,gBAAgB,YAAY,QAAW;AACzC,sBAAgB,UAAU;AACjB,eAAA,KAAK,UAAU,KAAK,CAAC;AAAA,IAAA,OACzB;AACD,UAAA;AACA,UAAA;AACA,UAAA,gBAAgB,UAAU,OAAO;AAClB,yBAAA;AACjB,uBAAe,gBAAgB,UAAU;AAAA,MAAA,OACpC;AACL,yBAAiB,gBAAgB;AACjC,uBAAe,QAAQ;AAAA,MACzB;AAEA,YAAM,iBAAiB,UAAU,MAAM,gBAAgB,YAAY;AAE1D,eAAA,KAAK,GAAG,cAAc;AAAA,IACjC;AAAA,EAAA,WACS,IAAI,YAAY,SAAS;AAClC,oBAAgB,UAAU;AAEf,eAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,OACK;AACL,oBAAgB,UAAU;AAEf,eAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setId.mjs","sources":["../../../src/utils/setId.ts"],"sourcesContent":["import uniqueId from \"lodash/uniqueId\";\n\nexport const setId = (...args) =>\n args.some((arg) => arg == null) ? undefined : args.join(\"-\");\n\nexport const setUid = (id, suffix) => {\n const uid = setId(id, suffix);\n return uid ? uniqueId(uid) : undefined;\n};\n"],"names":[],"mappings":";AAEO,MAAM,QAAQ,IAAI,SACvB,KAAK,KAAK,CAAC,QAAQ,OAAO,IAAI,IAAI,SAAY,KAAK,KAAK,GAAG;AAEhD,MAAA,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"setId.mjs","sources":["../../../src/utils/setId.ts"],"sourcesContent":["import uniqueId from \"lodash/uniqueId\";\n\nexport const setId = (...args: any[]) =>\n args.some((arg) => arg == null) ? undefined : args.join(\"-\");\n\nexport const setUid = (id: string, suffix: string) => {\n const uid = setId(id, suffix);\n return uid ? uniqueId(uid) : undefined;\n};\n"],"names":[],"mappings":";AAEO,MAAM,QAAQ,IAAI,SACvB,KAAK,KAAK,CAAC,QAAQ,OAAO,IAAI,IAAI,SAAY,KAAK,KAAK,GAAG;AAEhD,MAAA,SAAS,CAAC,IAAY,WAAmB;AAC9C,QAAA,MAAM,MAAM,IAAI,MAAM;AACrB,SAAA,MAAM,SAAS,GAAG,IAAI;AAC/B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.mjs","sources":["../../../src/utils/theme.ts"],"sourcesContent":["import { CSSProperties } from \"react\";\n\nimport {\n themes,\n HvThemeColorModeStructure,\n HvThemeStructure,\n theme,\n} from \"@hitachivantara/uikit-styles\";\n\nimport { HvTheme, HvCreateThemeProps } from \"../types/theme\";\n\nimport { getElementById } from \"./document\";\n\n/**\n * Sets the element style properties.\n */\nconst setElementStyle = (element: HTMLElement, style: CSSProperties) => {\n Object.entries(style).forEach(([property, value]) => {\n element.style[property] = value;\n });\n};\n\n/**\n * Sets the element attributes and style for a theme and color mode.\n */\nexport const setElementAttrs = (\n themeName: string,\n modeName: string,\n colorScheme: string,\n themeRootId?: string\n) => {\n const element = themeRootId\n ? document.getElementById(themeRootId)\n : document.body;\n\n if (element) {\n element.setAttribute(`data-theme`, themeName);\n element.setAttribute(`data-color-mode`, modeName);\n\n // Set default properties for all components to inherit\n setElementStyle(element, {\n colorScheme,\n backgroundColor: theme.colors.backgroundColor,\n accentColor: theme.colors.secondary,\n color: theme.colors.secondary,\n fontSize: theme.typography.body.fontSize,\n fontWeight: theme.typography.body.fontWeight,\n lineHeight: theme.typography.body.lineHeight,\n letterSpacing: theme.typography.body.letterSpacing,\n fontFamily: theme.fontFamily.body,\n });\n }\n};\n\n/**\n * Applies customizations to a theme.\n */\nconst applyThemeCustomizations = (obj:
|
|
1
|
+
{"version":3,"file":"theme.mjs","sources":["../../../src/utils/theme.ts"],"sourcesContent":["import { CSSProperties } from \"react\";\n\nimport {\n themes,\n HvThemeColorModeStructure,\n HvThemeStructure,\n theme,\n} from \"@hitachivantara/uikit-styles\";\n\nimport { HvTheme, HvCreateThemeProps } from \"../types/theme\";\n\nimport { getElementById } from \"./document\";\n\n/**\n * Sets the element style properties.\n */\nconst setElementStyle = (element: HTMLElement, style: CSSProperties) => {\n Object.entries(style).forEach(([property, value]) => {\n element.style[property] = value;\n });\n};\n\n/**\n * Sets the element attributes and style for a theme and color mode.\n */\nexport const setElementAttrs = (\n themeName: string,\n modeName: string,\n colorScheme: string,\n themeRootId?: string\n) => {\n const element = themeRootId\n ? document.getElementById(themeRootId)\n : document.body;\n\n if (element) {\n element.setAttribute(`data-theme`, themeName);\n element.setAttribute(`data-color-mode`, modeName);\n\n // Set default properties for all components to inherit\n setElementStyle(element, {\n colorScheme,\n backgroundColor: theme.colors.backgroundColor,\n accentColor: theme.colors.secondary,\n color: theme.colors.secondary,\n fontSize: theme.typography.body.fontSize,\n fontWeight: theme.typography.body.fontWeight,\n lineHeight: theme.typography.body.lineHeight,\n letterSpacing: theme.typography.body.letterSpacing,\n fontFamily: theme.fontFamily.body,\n });\n }\n};\n\n/**\n * Applies customizations to a theme.\n */\nconst applyThemeCustomizations = (obj: any, customizations: any) => {\n const isObject = (val: any) =>\n val && typeof val === \"object\" && !Array.isArray(val);\n\n // Customized theme\n const customizedTheme = { ...obj };\n\n // Add new values to the theme or replace values\n Object.keys(customizations).forEach((key) => {\n if (customizedTheme[key]) {\n if (isObject(customizedTheme[key]) && isObject(customizations[key])) {\n customizedTheme[key] = applyThemeCustomizations(\n customizedTheme[key],\n customizations[key]\n );\n } else if (typeof customizedTheme[key] === typeof customizations[key]) {\n customizedTheme[key] = customizations[key];\n }\n } else {\n customizedTheme[key] = customizations[key];\n }\n });\n\n return customizedTheme;\n};\n\n/**\n * Creates a customized theme based on the base theme and customizations given.\n * For the color modes, the colors that are not defined will be replaced by the values from the dawn mode of the base theme.\n */\nexport const createTheme = (\n props: HvCreateThemeProps\n): HvTheme | HvThemeStructure => {\n const {\n name,\n base = \"ds5\",\n inheritColorModes = true,\n ...customizations\n } = props;\n\n // Apply customizations to the base theme\n const customizedTheme: HvTheme | HvThemeStructure = customizations\n ? (applyThemeCustomizations(themes[base], customizations) as HvTheme)\n : { ...themes[base] };\n\n // Set theme name\n customizedTheme.name = name.trim();\n // Set theme base\n customizedTheme.base = base;\n\n // Fill new color modes with missing colors\n if (customizations) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!themes[base].colors.modes[mode]) {\n customizedTheme.colors.modes[mode] = {\n ...themes[base].colors.modes.dawn,\n ...(customizedTheme.colors.modes[mode] as Partial<\n HvThemeColorModeStructure & { [key: string]: string }\n >),\n };\n }\n });\n }\n\n // If the flag `inheritColorModes` is false and customizations were given for the color modes,\n // we're removing any color modes that might have been inherited\n if (!inheritColorModes && customizations.colors?.modes) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!Object.keys(customizations.colors?.modes || {}).includes(mode)) {\n delete customizedTheme.colors.modes[mode];\n }\n });\n }\n\n // Created theme\n return customizedTheme;\n};\n\n/**\n * Process the themes provided to the HvProvider:\n * - Cleans themes with the same name\n * - Returns the default if the list is empty (ds5)\n */\nexport const processThemes = (\n themesList?: (HvTheme | HvThemeStructure)[]\n): (HvTheme | HvThemeStructure)[] => {\n if (themesList && Array.isArray(themesList) && themesList.length > 0) {\n const list: (HvTheme | HvThemeStructure)[] = [];\n\n themesList.forEach((thm) => {\n const i: number = list.findIndex(\n (t) => t.name.trim() === thm.name.trim()\n );\n\n if (i !== -1) {\n list.splice(i, 1);\n list.push(thm);\n } else {\n list.push(thm);\n }\n });\n\n // Cleaned themes\n return list;\n }\n // DS5\n return [themes.ds5];\n};\n\nexport const getVarValue = (cssVar: string, rootElementId?: string) => {\n const root = getElementById(rootElementId || \"hv-root\");\n if (!root) return undefined;\n\n return getComputedStyle(root)\n .getPropertyValue(cssVar.replace(\"var(\", \"\").replace(\")\", \"\"))\n .trim();\n};\n"],"names":[],"mappings":";;AAgBA,MAAM,kBAAkB,CAAC,SAAsB,UAAyB;AAC/D,SAAA,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,UAAU,KAAK,MAAM;AAC3C,YAAA,MAAM,QAAQ,IAAI;AAAA,EAAA,CAC3B;AACH;AAKO,MAAM,kBAAkB,CAC7B,WACA,UACA,aACA,gBACG;AACH,QAAM,UAAU,cACZ,SAAS,eAAe,WAAW,IACnC,SAAS;AAEb,MAAI,SAAS;AACH,YAAA,aAAa,cAAc,SAAS;AACpC,YAAA,aAAa,mBAAmB,QAAQ;AAGhD,oBAAgB,SAAS;AAAA,MACvB;AAAA,MACA,iBAAiB,MAAM,OAAO;AAAA,MAC9B,aAAa,MAAM,OAAO;AAAA,MAC1B,OAAO,MAAM,OAAO;AAAA,MACpB,UAAU,MAAM,WAAW,KAAK;AAAA,MAChC,YAAY,MAAM,WAAW,KAAK;AAAA,MAClC,YAAY,MAAM,WAAW,KAAK;AAAA,MAClC,eAAe,MAAM,WAAW,KAAK;AAAA,MACrC,YAAY,MAAM,WAAW;AAAA,IAAA,CAC9B;AAAA,EACH;AACF;AAKA,MAAM,2BAA2B,CAAC,KAAU,mBAAwB;AAC5D,QAAA,WAAW,CAAC,QAChB,OAAO,OAAO,QAAQ,YAAY,CAAC,MAAM,QAAQ,GAAG;AAGhD,QAAA,kBAAkB,EAAE,GAAG;AAG7B,SAAO,KAAK,cAAc,EAAE,QAAQ,CAAC,QAAQ;AACvC,QAAA,gBAAgB,GAAG,GAAG;AACpB,UAAA,SAAS,gBAAgB,GAAG,CAAC,KAAK,SAAS,eAAe,GAAG,CAAC,GAAG;AACnE,wBAAgB,GAAG,IAAI;AAAA,UACrB,gBAAgB,GAAG;AAAA,UACnB,eAAe,GAAG;AAAA,QAAA;AAAA,MACpB,WACS,OAAO,gBAAgB,GAAG,MAAM,OAAO,eAAe,GAAG,GAAG;AACrD,wBAAA,GAAG,IAAI,eAAe,GAAG;AAAA,MAC3C;AAAA,IAAA,OACK;AACW,sBAAA,GAAG,IAAI,eAAe,GAAG;AAAA,IAC3C;AAAA,EAAA,CACD;AAEM,SAAA;AACT;AAMa,MAAA,cAAc,CACzB,UAC+B;AACzB,QAAA;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,IACP,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACD,IAAA;AAGJ,QAAM,kBAA8C,iBAC/C,yBAAyB,OAAO,IAAI,GAAG,cAAc,IACtD,EAAE,GAAG,OAAO,IAAI,EAAE;AAGN,kBAAA,OAAO,KAAK;AAE5B,kBAAgB,OAAO;AAGvB,MAAI,gBAAgB;AAClB,WAAO,KAAK,gBAAgB,OAAO,KAAK,EAAE,QAAQ,CAAC,SAAS;AAC1D,UAAI,CAAC,OAAO,IAAI,EAAE,OAAO,MAAM,IAAI,GAAG;AACpB,wBAAA,OAAO,MAAM,IAAI,IAAI;AAAA,UACnC,GAAG,OAAO,IAAI,EAAE,OAAO,MAAM;AAAA,UAC7B,GAAI,gBAAgB,OAAO,MAAM,IAAI;AAAA,QAAA;AAAA,MAIzC;AAAA,IAAA,CACD;AAAA,EACH;AAIA,MAAI,CAAC,qBAAqB,eAAe,QAAQ,OAAO;AACtD,WAAO,KAAK,gBAAgB,OAAO,KAAK,EAAE,QAAQ,CAAC,SAAS;AACtD,UAAA,CAAC,OAAO,KAAK,eAAe,QAAQ,SAAS,EAAE,EAAE,SAAS,IAAI,GAAG;AAC5D,eAAA,gBAAgB,OAAO,MAAM,IAAI;AAAA,MAC1C;AAAA,IAAA,CACD;AAAA,EACH;AAGO,SAAA;AACT;AAOa,MAAA,gBAAgB,CAC3B,eACmC;AACnC,MAAI,cAAc,MAAM,QAAQ,UAAU,KAAK,WAAW,SAAS,GAAG;AACpE,UAAM,OAAuC,CAAA;AAElC,eAAA,QAAQ,CAAC,QAAQ;AAC1B,YAAM,IAAY,KAAK;AAAA,QACrB,CAAC,MAAM,EAAE,KAAK,WAAW,IAAI,KAAK,KAAK;AAAA,MAAA;AAGzC,UAAI,MAAM,IAAI;AACP,aAAA,OAAO,GAAG,CAAC;AAChB,aAAK,KAAK,GAAG;AAAA,MAAA,OACR;AACL,aAAK,KAAK,GAAG;AAAA,MACf;AAAA,IAAA,CACD;AAGM,WAAA;AAAA,EACT;AAEO,SAAA,CAAC,OAAO,GAAG;AACpB;AAEa,MAAA,cAAc,CAAC,QAAgB,kBAA2B;AAC/D,QAAA,OAAO,eAAe,iBAAiB,SAAS;AACtD,MAAI,CAAC;AAAa,WAAA;AAElB,SAAO,iBAAiB,IAAI,EACzB,iBAAiB,OAAO,QAAQ,QAAQ,EAAE,EAAE,QAAQ,KAAK,EAAE,CAAC,EAC5D,KAAK;AACV;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapperTooltip.mjs","sources":["../../../src/utils/wrapperTooltip.tsx"],"sourcesContent":["import { withTooltip } from \"../hocs/withTooltip\";\n\nconst hideTooltip = (evt) => {\n const isOverFlow =\n evt.target.children.length > 1\n ? Array.of(...evt.target.children).some(\n (child) => child.scrollWidth > child.clientWidth\n )\n : evt.target.scrollWidth > evt.target.clientWidth;\n\n return !isOverFlow;\n};\n\nexport const wrapperTooltip = (hasTooltips
|
|
1
|
+
{"version":3,"file":"wrapperTooltip.mjs","sources":["../../../src/utils/wrapperTooltip.tsx"],"sourcesContent":["import { withTooltip } from \"../hocs/withTooltip\";\n\nconst hideTooltip = (evt: any) => {\n const isOverFlow =\n evt.target.children.length > 1\n ? Array.of(...evt.target.children).some(\n (child) => child.scrollWidth > child.clientWidth\n )\n : evt.target.scrollWidth > evt.target.clientWidth;\n\n return !isOverFlow;\n};\n\nexport const wrapperTooltip = (\n hasTooltips: boolean,\n Component: any,\n label: any\n) => {\n const ComponentFunction = () => Component;\n return hasTooltips\n ? withTooltip(ComponentFunction, label, \"top\", hideTooltip)\n : ComponentFunction;\n};\n"],"names":[],"mappings":";AAEA,MAAM,cAAc,CAAC,QAAa;AAChC,QAAM,aACJ,IAAI,OAAO,SAAS,SAAS,IACzB,MAAM,GAAG,GAAG,IAAI,OAAO,QAAQ,EAAE;AAAA,IAC/B,CAAC,UAAU,MAAM,cAAc,MAAM;AAAA,EAAA,IAEvC,IAAI,OAAO,cAAc,IAAI,OAAO;AAE1C,SAAO,CAAC;AACV;AAEO,MAAM,iBAAiB,CAC5B,aACA,WACA,UACG;AACH,QAAM,oBAAoB,MAAM;AAChC,SAAO,cACH,YAAY,mBAAmB,OAAO,OAAO,WAAW,IACxD;AACN;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -398,11 +398,7 @@ export declare interface Breakpoint {
|
|
|
398
398
|
spacing?: Spacing;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
export declare const buildAriaPropsFromContext: (props: any, context: any, isInvalid: any, inputId: any) =>
|
|
402
|
-
"aria-labelledby": any;
|
|
403
|
-
"aria-describedby": any;
|
|
404
|
-
"aria-controls": any;
|
|
405
|
-
};
|
|
401
|
+
export declare const buildAriaPropsFromContext: (props: any, context: any, isInvalid: any, inputId: any) => React_2.AriaAttributes;
|
|
406
402
|
|
|
407
403
|
export declare const buildFormElementPropsFromContext: (name: any, disabled: any, readOnly: any, required: any, context: any) => {
|
|
408
404
|
name: any;
|
|
@@ -885,24 +881,15 @@ export declare const getBorderStyles: (color: string, rowBorderRadius: string) =
|
|
|
885
881
|
|
|
886
882
|
export declare const getClasses: <T extends string, N extends string>(keys: T[], name: N) => { [P in T]: `${N}-${P}`; };
|
|
887
883
|
|
|
888
|
-
export declare const getComponentName: (Component:
|
|
884
|
+
export declare const getComponentName: (Component: React.FC) => string;
|
|
889
885
|
|
|
890
|
-
/**
|
|
891
|
-
* Get the first and last focusable element from a node.
|
|
892
|
-
*
|
|
893
|
-
* @param nodeId
|
|
894
|
-
* @returns {{last: *, first: *}}
|
|
895
|
-
*/
|
|
886
|
+
/** Get the first and last focusable element from a node. */
|
|
896
887
|
export declare const getFirstAndLastFocus: (node: any) => {
|
|
897
888
|
first: any;
|
|
898
889
|
last: any;
|
|
899
890
|
};
|
|
900
891
|
|
|
901
|
-
/**
|
|
902
|
-
* Gets the list of focusable elements.
|
|
903
|
-
* @param node
|
|
904
|
-
* @returns {*|NodeListOf<HTMLElementTagNameMap[string]>|NodeListOf<*>|NodeListOf<SVGElementTagNameMap[string]>|*[]}
|
|
905
|
-
*/
|
|
892
|
+
/** Gets the list of focusable elements. */
|
|
906
893
|
export declare const getFocusableList: (node: any) => any;
|
|
907
894
|
|
|
908
895
|
export declare const getHeaderFooterPropsHook: (props: any, { column }: {
|
|
@@ -917,13 +904,8 @@ export declare const getIdReferenceFor: (formElementType: any, descriptors: any,
|
|
|
917
904
|
|
|
918
905
|
export declare const getIdReferenceListFor: (formElementType: any, descriptors: any, filterFor?: null) => any;
|
|
919
906
|
|
|
920
|
-
/**
|
|
921
|
-
|
|
922
|
-
*
|
|
923
|
-
* @param nodeId
|
|
924
|
-
* @returns {{prevFocus: *, nextFocus: *}}
|
|
925
|
-
*/
|
|
926
|
-
export declare const getPrevNextFocus: (nodeId: any) => {
|
|
907
|
+
/** Auxiliary function to find adjacent nodes to focus. */
|
|
908
|
+
export declare const getPrevNextFocus: (nodeId?: string) => {
|
|
927
909
|
nextFocus: any;
|
|
928
910
|
prevFocus: any;
|
|
929
911
|
};
|
|
@@ -1012,7 +994,7 @@ export declare const headerNavigationClasses: {
|
|
|
1012
994
|
root: "HvHeader-Navigation-root";
|
|
1013
995
|
};
|
|
1014
996
|
|
|
1015
|
-
export declare const hexToRgbA: (hex:
|
|
997
|
+
export declare const hexToRgbA: (hex: string, factor?: number) => string;
|
|
1016
998
|
|
|
1017
999
|
export declare const horizontalScrollListItemClasses: {
|
|
1018
1000
|
root: "HvHorizontalScrollListItem-root";
|
|
@@ -4340,7 +4322,7 @@ export declare const HvLink: (props: HvLinkProps) => JSX_2.Element;
|
|
|
4340
4322
|
export declare type HvLinkClasses = ExtractNames<typeof useClasses_80>;
|
|
4341
4323
|
|
|
4342
4324
|
export declare interface HvLinkProps extends HvBaseProps<HTMLAnchorElement, "onClick"> {
|
|
4343
|
-
onClick?: (event:
|
|
4325
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>, data: any) => void | undefined;
|
|
4344
4326
|
route?: string;
|
|
4345
4327
|
data?: any;
|
|
4346
4328
|
children: any;
|
|
@@ -7504,7 +7486,7 @@ export declare const inputClasses: {
|
|
|
7504
7486
|
|
|
7505
7487
|
declare type InputElement = HTMLInputElement | HTMLTextAreaElement;
|
|
7506
7488
|
|
|
7507
|
-
export declare const isBrowser: (browsers:
|
|
7489
|
+
export declare const isBrowser: (browsers: string | string[]) => boolean | null;
|
|
7508
7490
|
|
|
7509
7491
|
export declare const isInvalid: (compareState: HvFormStatus) => boolean;
|
|
7510
7492
|
|
|
@@ -7622,7 +7604,7 @@ export declare const multiButtonClasses: {
|
|
|
7622
7604
|
button: "HvMultiButton-button";
|
|
7623
7605
|
};
|
|
7624
7606
|
|
|
7625
|
-
export declare const multiSelectionEventHandler: (evt: any, index:
|
|
7607
|
+
export declare const multiSelectionEventHandler: (evt: any, index: number, selectionAnchor: any, allValues: any[], selectedState: boolean[], selectionCheck: any) => any[];
|
|
7626
7608
|
|
|
7627
7609
|
export declare type NavigationData<T extends React.ElementType = "a"> = ComponentProps<T> & Record<string, any> & {
|
|
7628
7610
|
/** The id to be applied to the root element. */
|
|
@@ -7839,7 +7821,7 @@ export declare const setElementAttrs: (themeName: string, modeName: string, colo
|
|
|
7839
7821
|
|
|
7840
7822
|
export declare const setId: (...args: any[]) => string | undefined;
|
|
7841
7823
|
|
|
7842
|
-
export declare const setUid: (id:
|
|
7824
|
+
export declare const setUid: (id: string, suffix: string) => string | undefined;
|
|
7843
7825
|
|
|
7844
7826
|
export declare const simpleGridClasses: {
|
|
7845
7827
|
root: "HvSimpleGrid-root";
|
|
@@ -7941,7 +7923,6 @@ export declare const tableCellClasses: {
|
|
|
7941
7923
|
head: "HvTableCell-head";
|
|
7942
7924
|
variantListactions: "HvTableCell-variantListactions";
|
|
7943
7925
|
variantListcheckbox: "HvTableCell-variantListcheckbox";
|
|
7944
|
-
stickyColumn: "HvTableCell-stickyColumn";
|
|
7945
7926
|
variantList: "HvTableCell-variantList";
|
|
7946
7927
|
footer: "HvTableCell-footer";
|
|
7947
7928
|
resizable: "HvTableCell-resizable";
|
|
@@ -7955,6 +7936,7 @@ export declare const tableCellClasses: {
|
|
|
7955
7936
|
variantCheckbox: "HvTableCell-variantCheckbox";
|
|
7956
7937
|
variantActions: "HvTableCell-variantActions";
|
|
7957
7938
|
variantExpand: "HvTableCell-variantExpand";
|
|
7939
|
+
stickyColumn: "HvTableCell-stickyColumn";
|
|
7958
7940
|
stickyColumnMostLeft: "HvTableCell-stickyColumnMostLeft";
|
|
7959
7941
|
stickyColumnLeastRight: "HvTableCell-stickyColumnLeastRight";
|
|
7960
7942
|
groupColumnMostLeft: "HvTableCell-groupColumnMostLeft";
|
|
@@ -7982,7 +7964,6 @@ export declare const tableHeaderClasses: {
|
|
|
7982
7964
|
body: "HvTableHeader-body";
|
|
7983
7965
|
root: "HvTableHeader-root";
|
|
7984
7966
|
head: "HvTableHeader-head";
|
|
7985
|
-
stickyColumn: "HvTableHeader-stickyColumn";
|
|
7986
7967
|
sortButton: "HvTableHeader-sortButton";
|
|
7987
7968
|
variantList: "HvTableHeader-variantList";
|
|
7988
7969
|
resizer: "HvTableHeader-resizer";
|
|
@@ -7997,6 +7978,7 @@ export declare const tableHeaderClasses: {
|
|
|
7997
7978
|
variantCheckbox: "HvTableHeader-variantCheckbox";
|
|
7998
7979
|
variantActions: "HvTableHeader-variantActions";
|
|
7999
7980
|
variantExpand: "HvTableHeader-variantExpand";
|
|
7981
|
+
stickyColumn: "HvTableHeader-stickyColumn";
|
|
8000
7982
|
stickyColumnMostLeft: "HvTableHeader-stickyColumnMostLeft";
|
|
8001
7983
|
stickyColumnLeastRight: "HvTableHeader-stickyColumnLeastRight";
|
|
8002
7984
|
groupColumnMostLeft: "HvTableHeader-groupColumnMostLeft";
|
|
@@ -9411,14 +9393,13 @@ declare const useClasses_47: (classesProp?: Partial<Record<"root" | "section" |
|
|
|
9411
9393
|
cx: (...args: any) => string;
|
|
9412
9394
|
};
|
|
9413
9395
|
|
|
9414
|
-
declare const useClasses_48: (classesProp?: Partial<Record<"body" | "root" | "head" | "variantListactions" | "variantListcheckbox" | "
|
|
9396
|
+
declare const useClasses_48: (classesProp?: Partial<Record<"body" | "root" | "head" | "variantListactions" | "variantListcheckbox" | "variantList" | "footer" | "resizable" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "variantListHead" | "sorted" | "variantNone" | "variantCheckbox" | "variantActions" | "variantExpand" | "stickyColumn" | "stickyColumnMostLeft" | "stickyColumnLeastRight" | "groupColumnMostLeft" | "groupColumnMostRight" | "resizing", string>>, addStatic?: boolean) => {
|
|
9415
9397
|
classes: {
|
|
9416
9398
|
body: string;
|
|
9417
9399
|
root: string;
|
|
9418
9400
|
head: string;
|
|
9419
9401
|
variantListactions: string;
|
|
9420
9402
|
variantListcheckbox: string;
|
|
9421
|
-
stickyColumn: string;
|
|
9422
9403
|
variantList: string;
|
|
9423
9404
|
footer: string;
|
|
9424
9405
|
resizable: string;
|
|
@@ -9432,6 +9413,7 @@ declare const useClasses_48: (classesProp?: Partial<Record<"body" | "root" | "he
|
|
|
9432
9413
|
variantCheckbox: string;
|
|
9433
9414
|
variantActions: string;
|
|
9434
9415
|
variantExpand: string;
|
|
9416
|
+
stickyColumn: string;
|
|
9435
9417
|
stickyColumnMostLeft: string;
|
|
9436
9418
|
stickyColumnLeastRight: string;
|
|
9437
9419
|
groupColumnMostLeft: string;
|
|
@@ -9479,12 +9461,11 @@ declare const useClasses_5: (classesProp?: Partial<Record<"root" | "counterDisab
|
|
|
9479
9461
|
cx: (...args: any) => string;
|
|
9480
9462
|
};
|
|
9481
9463
|
|
|
9482
|
-
declare const useClasses_50: (classesProp?: Partial<Record<"body" | "root" | "head" | "
|
|
9464
|
+
declare const useClasses_50: (classesProp?: Partial<Record<"body" | "root" | "head" | "sortButton" | "variantList" | "resizer" | "footer" | "resizable" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "sorted" | "variantNone" | "variantCheckbox" | "variantActions" | "variantExpand" | "stickyColumn" | "stickyColumnMostLeft" | "stickyColumnLeastRight" | "groupColumnMostLeft" | "groupColumnMostRight" | "resizing" | "headerContent" | "headerText" | "headerParagraph" | "sortableHeaderText" | "sortable" | "sortIcon" | "alignFlexLeft" | "alignFlexRight" | "alignFlexCenter" | "alignFlexJustify", string>>, addStatic?: boolean) => {
|
|
9483
9465
|
classes: {
|
|
9484
9466
|
body: string;
|
|
9485
9467
|
root: string;
|
|
9486
9468
|
head: string;
|
|
9487
|
-
stickyColumn: string;
|
|
9488
9469
|
sortButton: string;
|
|
9489
9470
|
variantList: string;
|
|
9490
9471
|
resizer: string;
|
|
@@ -9499,6 +9480,7 @@ declare const useClasses_50: (classesProp?: Partial<Record<"body" | "root" | "he
|
|
|
9499
9480
|
variantCheckbox: string;
|
|
9500
9481
|
variantActions: string;
|
|
9501
9482
|
variantExpand: string;
|
|
9483
|
+
stickyColumn: string;
|
|
9502
9484
|
stickyColumnMostLeft: string;
|
|
9503
9485
|
stickyColumnLeastRight: string;
|
|
9504
9486
|
groupColumnMostLeft: string;
|
|
@@ -10876,7 +10858,7 @@ declare interface UseTreeViewSelectionParameters<Multiple extends boolean | unde
|
|
|
10876
10858
|
onNodeSelect?: (event: React_3.SyntheticEvent, nodeIds: Exclude<TreeViewSelectionValue<Multiple>, null>) => void;
|
|
10877
10859
|
}
|
|
10878
10860
|
|
|
10879
|
-
export declare const useUniqueId: (
|
|
10861
|
+
export declare const useUniqueId: (deterministicId?: string, idPrefix?: string) => string;
|
|
10880
10862
|
|
|
10881
10863
|
export declare const useWidth: () => Breakpoint_2;
|
|
10882
10864
|
|
|
@@ -10953,6 +10935,6 @@ export declare const warningTextClasses: {
|
|
|
10953
10935
|
|
|
10954
10936
|
export declare const withTooltip: (Component: React.FunctionComponent, label: string | undefined, placement: HvTooltipPlacementType, hideTooltip?: ((event: React.MouseEvent<HTMLDivElement>) => boolean) | undefined, tooltipProps?: Partial<HvTooltipProps>, tooltipContainerProps?: HvBaseProps) => (props: any) => JSX_2.Element;
|
|
10955
10937
|
|
|
10956
|
-
export declare const wrapperTooltip: (hasTooltips:
|
|
10938
|
+
export declare const wrapperTooltip: (hasTooltips: boolean, Component: any, label: any) => ((props: any) => JSX_2.Element) | (() => any);
|
|
10957
10939
|
|
|
10958
10940
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.43.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@emotion/css": "^11.11.2",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
35
|
"@emotion/utils": "^1.2.1",
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.7.
|
|
37
|
-
"@hitachivantara/uikit-react-shared": "^5.1.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.17.
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.7.13",
|
|
37
|
+
"@hitachivantara/uikit-react-shared": "^5.1.25",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.17.2",
|
|
39
39
|
"@internationalized/date": "^3.2.0",
|
|
40
40
|
"@mui/base": "^5.0.0-beta.4",
|
|
41
41
|
"@popperjs/core": "^2.11.8",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"access": "public",
|
|
65
65
|
"directory": "package"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "e231cebc72c6af32bb9a90256d19ab156d223fc8",
|
|
68
68
|
"main": "dist/cjs/index.cjs",
|
|
69
69
|
"exports": {
|
|
70
70
|
".": {
|