@hitachivantara/uikit-react-core 5.26.5 → 5.27.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/components/ActionsGeneric/ActionsGeneric.cjs +2 -4
- package/dist/cjs/components/ActionsGeneric/ActionsGeneric.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.cjs +1 -2
- package/dist/cjs/components/AppSwitcher/Action/Action.cjs.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.cjs +4 -5
- package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/BulkActions/BulkActions.cjs +2 -3
- package/dist/cjs/components/BulkActions/BulkActions.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +2 -4
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +2 -1
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.cjs +1 -4
- package/dist/cjs/components/Loading/Loading.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs.map +1 -1
- package/dist/cjs/components/Stack/Stack.cjs.map +1 -1
- package/dist/cjs/components/Table/TableCell/TableCell.cjs +2 -2
- package/dist/cjs/components/Table/TableCell/TableCell.cjs.map +1 -1
- package/dist/cjs/components/Table/TableHeader/TableHeader.cjs +6 -4
- package/dist/cjs/components/Table/TableHeader/TableHeader.cjs.map +1 -1
- package/dist/cjs/components/Table/TableRow/TableRow.cjs +3 -4
- package/dist/cjs/components/Table/TableRow/TableRow.cjs.map +1 -1
- package/dist/cjs/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.cjs +4 -2
- package/dist/cjs/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.cjs.map +1 -1
- package/dist/cjs/components/Table/renderers/SwitchColumnCell/SwitchColumnCell.cjs +5 -2
- package/dist/cjs/components/Table/renderers/SwitchColumnCell/SwitchColumnCell.cjs.map +1 -1
- package/dist/cjs/components/Table/renderers/renderers.cjs +6 -3
- package/dist/cjs/components/Table/renderers/renderers.cjs.map +1 -1
- package/dist/cjs/components/Tag/Tag.cjs +2 -5
- package/dist/cjs/components/Tag/Tag.cjs.map +1 -1
- package/dist/cjs/hooks/useTheme.cjs +12 -1
- package/dist/cjs/hooks/useTheme.cjs.map +1 -1
- package/dist/esm/components/ActionsGeneric/ActionsGeneric.js +2 -4
- package/dist/esm/components/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.js +1 -2
- package/dist/esm/components/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.js +1 -2
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/BulkActions/BulkActions.js +2 -3
- package/dist/esm/components/BulkActions/BulkActions.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +2 -4
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +2 -1
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Loading/Loading.js +2 -5
- package/dist/esm/components/Loading/Loading.js.map +1 -1
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js +2 -2
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js +2 -2
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
- package/dist/esm/components/Stack/Stack.js.map +1 -1
- package/dist/esm/components/Table/TableCell/TableCell.js +2 -2
- package/dist/esm/components/Table/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/Table/TableHeader/TableHeader.js +6 -4
- package/dist/esm/components/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/esm/components/Table/TableRow/TableRow.js +3 -4
- package/dist/esm/components/Table/TableRow/TableRow.js.map +1 -1
- package/dist/esm/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.js +4 -2
- package/dist/esm/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.js.map +1 -1
- package/dist/esm/components/Table/renderers/SwitchColumnCell/SwitchColumnCell.js +5 -2
- package/dist/esm/components/Table/renderers/SwitchColumnCell/SwitchColumnCell.js.map +1 -1
- package/dist/esm/components/Table/renderers/renderers.js +6 -3
- package/dist/esm/components/Table/renderers/renderers.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js +2 -5
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/hooks/useTheme.js +13 -2
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/types/index.d.ts +51 -21
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { CSSProperties, useState } from \"react\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport Chip, { ChipProps as MuiChipProps } from \"@mui/material/Chip\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport {\n HvSemanticColorKeys,\n HvCategoricalColorKeys,\n} from \"@core/types/tokens\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvButton, HvButtonProps } from \"@core/components/Button\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { CloseXS } from \"@hitachivantara/uikit-react-icons\";\nimport { staticClasses, useClasses } from \"./Tag.styles\";\nimport { getOnDeleteCallback, hasDeleteAction, hasClickAction } from \"./utils\";\n\nexport { staticClasses as tagClasses };\n\nexport type HvTagClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTagProps\n extends Omit<MuiChipProps, \"color\" | \"classes\">,\n HvBaseProps<HTMLDivElement, \"children\"> {\n /** Inline styles to be applied to the root element. */\n style?: CSSProperties;\n /** The label of the tag element. */\n label?: React.ReactNode;\n /** Indicates that the form element is disabled. */\n disabled?: boolean;\n /** The type of the tag element. A tag can be of semantic or categoric type. */\n type?: \"semantic\" | \"categorical\";\n /** Background color to be applied to the tag */\n color?: HvSemanticColorKeys | HvCategoricalColorKeys | string;\n /** Icon used to customize the delete icon in the Chip element */\n deleteIcon?: React.ReactElement;\n /**\n * The callback fired when the delete icon is pressed.\n * This function has to be provided to the component, in order to render the delete icon\n * */\n onDelete?: (event: React.MouseEvent<HTMLElement>) => void;\n /** Callback triggered when any item is clicked. */\n onClick?: (event: React.MouseEvent<HTMLElement>) => void;\n /** The role of the element with an attributed event. */\n role?: string;\n /** Aria properties to apply to delete button in tag */\n deleteButtonArialLabel?: string; // TODO: fix typo \"ArialLabel\" in next version\n /** Props to apply to delete button */\n deleteButtonProps?: HvButtonProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTagClasses;\n}\n\nconst getColor = (customColor, type, colors) => {\n const defaultSemanticColor = theme.colors.neutral_20;\n const defaultCategoricalColor = colors.cat1;\n\n let backgroundColor;\n\n if (type === \"semantic\") {\n backgroundColor =\n theme.colors[customColor] || customColor || defaultSemanticColor;\n }\n if (type === \"categorical\") {\n backgroundColor =\n colors[customColor] || customColor || defaultCategoricalColor;\n }\n return backgroundColor;\n};\n\n/**\n * A Tag is one word that describes a specific aspect of an asset. A single asset can have\n * multiple tags.\n * Use tags to highlight an item's status for quick recognition and navigation\n * Use color to indicate meanings that users can learn and recognize across products\n *\n * It leverages the Chip component from Material UI\n */\nexport const HvTag = (props: HvTagProps) => {\n const {\n classes: classesProp,\n className,\n style,\n label,\n disabled,\n type = \"semantic\",\n color,\n deleteIcon,\n onDelete,\n onClick,\n role,\n deleteButtonArialLabel = \"Delete tag\",\n deleteButtonProps = {},\n ...others\n } = useDefaultProps(\"HvTag\", props);\n const { activeTheme, selectedMode } = useTheme();\n const { classes, cx, css } = useClasses(classesProp);\n\n const getDeleteIcon = () => {\n const disabledSemanticColor =\n type === \"semantic\" ? \"secondary_60\" : \"base_dark\";\n const { tabIndex = 0 } = deleteButtonProps;\n\n const closeIconStyles = css({\n ...(disabled ? { cursor: \"not-allowed\" } : undefined),\n height: 16,\n \"& svg .color0\": {\n fill: theme.colors[disabled ? disabledSemanticColor : \"base_dark\"],\n },\n });\n return (\n <HvButton\n classes={{\n startIcon: classes.tagButton,\n focusVisible: classes.focusVisible,\n root: classes.button,\n }}\n aria-label={deleteButtonArialLabel}\n tabIndex={tabIndex}\n variant=\"secondaryGhost\"\n {...deleteButtonProps}\n >\n <CloseXS\n iconSize=\"XS\"\n className={closeIconStyles}\n color={disabled ? disabledSemanticColor : \"base_dark\"}\n />\n </HvButton>\n );\n };\n\n const inlineStyle = {\n ...style,\n };\n\n let categoricalBackgroundColor;\n\n if (type === \"semantic\") {\n inlineStyle.backgroundColor = getColor(color, type, {});\n } else if (type === \"categorical\") {\n categoricalBackgroundColor = getColor(\n color,\n type,\n activeTheme?.colors?.modes[selectedMode]\n );\n\n inlineStyle.backgroundColor = `${categoricalBackgroundColor}30`;\n }\n\n const [hover, setHover] = useState(false);\n\n return (\n <Chip\n label={label}\n className={cx(classes.root, className)}\n onMouseEnter={() => {\n setHover(!!onClick);\n }}\n onMouseLeave={() => {\n setHover(false);\n }}\n style={{\n ...(disabled ? null : inlineStyle),\n ...(hover && !disabled\n ? { boxShadow: `0 0 0 1pt ${categoricalBackgroundColor}` }\n : null),\n }}\n classes={{\n root: cx(classes.chipRoot, {\n [classes.disabled]: disabled,\n [classes.clickable]: !!onClick,\n [classes.categorical]: type === \"categorical\",\n [classes.categoricalFocus]: type === \"categorical\" && !disabled,\n [classes.categoricalDisabled]: type === \"categorical\" && disabled,\n }),\n label: classes.label,\n deleteIcon: cx(classes.deleteIcon, {\n [classes.disabledDeleteIcon]: disabled,\n }),\n }}\n deleteIcon={(hasDeleteAction(onDelete) && deleteIcon) || getDeleteIcon()}\n onDelete={getOnDeleteCallback(disabled, onDelete)}\n onClick={disabled ? undefined : onClick}\n role={role || (hasClickAction(onClick) ? \"button\" : undefined)}\n tabIndex={hasDeleteAction(onDelete) ? undefined : 0}\n {...others}\n />\n );\n};\n"],"names":["getColor","customColor","type","colors","defaultSemanticColor","theme","neutral_20","defaultCategoricalColor","cat1","backgroundColor","HvTag","props","classes","classesProp","className","style","label","disabled","color","deleteIcon","onDelete","onClick","role","deleteButtonArialLabel","deleteButtonProps","others","useDefaultProps","activeTheme","selectedMode","useTheme","cx","css","useClasses","getDeleteIcon","disabledSemanticColor","tabIndex","closeIconStyles","cursor","undefined","height","fill","HvButton","startIcon","tagButton","focusVisible","root","button","variant","children","CloseXS","iconSize","inlineStyle","categoricalBackgroundColor","modes","hover","setHover","useState","Chip","onMouseEnter","onMouseLeave","boxShadow","chipRoot","clickable","categorical","categoricalFocus","categoricalDisabled","disabledDeleteIcon","hasDeleteAction","getOnDeleteCallback","hasClickAction"],"mappings":";;;;;;;;;;;AAqDA,MAAMA,WAAWA,CAACC,aAAaC,MAAMC,WAAW;AACxCC,QAAAA,uBAAuBC,MAAMF,OAAOG;AAC1C,QAAMC,0BAA0BJ,OAAOK;AAEnCC,MAAAA;AAEJ,MAAIP,SAAS,YAAY;AACvBO,sBACEJ,MAAMF,OAAOF,WAAW,KAAKA,eAAeG;AAAAA,EAChD;AACA,MAAIF,SAAS,eAAe;AAExBC,sBAAAA,OAAOF,WAAW,KAAKA,eAAeM;AAAAA,EAC1C;AACOE,SAAAA;AACT;AAUaC,MAAAA,QAAQA,CAACC,UAAsB;;AACpC,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAf,OAAO;AAAA,IACPgB;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,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gBAAgB/C,QAAQ,IAAIkB,SAAY;AAAA,IAAE,GAChDb;AAAAA,EAAAA,CACL;AAEL;"}
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { CSSProperties, useState } from \"react\";\nimport { HvColorAny, theme } from \"@hitachivantara/uikit-styles\";\nimport Chip, { ChipProps as MuiChipProps } from \"@mui/material/Chip\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvButton, HvButtonProps } from \"@core/components/Button\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { CloseXS } from \"@hitachivantara/uikit-react-icons\";\nimport { staticClasses, useClasses } from \"./Tag.styles\";\nimport { getOnDeleteCallback, hasDeleteAction, hasClickAction } from \"./utils\";\n\nexport { staticClasses as tagClasses };\n\nexport type HvTagClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTagProps\n extends Omit<MuiChipProps, \"color\" | \"classes\">,\n HvBaseProps<HTMLDivElement, \"children\"> {\n /** Inline styles to be applied to the root element. */\n style?: CSSProperties;\n /** The label of the tag element. */\n label?: React.ReactNode;\n /** Indicates that the form element is disabled. */\n disabled?: boolean;\n /** The type of the tag element. A tag can be of semantic or categoric type. */\n type?: \"semantic\" | \"categorical\";\n /** Background color to be applied to the tag */\n color?: HvColorAny;\n /** Icon used to customize the delete icon in the Chip element */\n deleteIcon?: React.ReactElement;\n /**\n * The callback fired when the delete icon is pressed.\n * This function has to be provided to the component, in order to render the delete icon\n * */\n onDelete?: (event: React.MouseEvent<HTMLElement>) => void;\n /** Callback triggered when any item is clicked. */\n onClick?: (event: React.MouseEvent<HTMLElement>) => void;\n /** The role of the element with an attributed event. */\n role?: string;\n /** Aria properties to apply to delete button in tag */\n deleteButtonArialLabel?: string; // TODO: fix typo \"ArialLabel\" in next version\n /** Props to apply to delete button */\n deleteButtonProps?: HvButtonProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTagClasses;\n}\n\nconst getColor = (customColor, type, colors) => {\n const defaultSemanticColor = theme.colors.neutral_20;\n const defaultCategoricalColor = colors.cat1;\n\n let backgroundColor;\n\n if (type === \"semantic\") {\n backgroundColor =\n theme.colors[customColor] || customColor || defaultSemanticColor;\n }\n if (type === \"categorical\") {\n backgroundColor =\n colors[customColor] || customColor || defaultCategoricalColor;\n }\n return backgroundColor;\n};\n\n/**\n * A Tag is one word that describes a specific aspect of an asset. A single asset can have\n * multiple tags.\n * Use tags to highlight an item's status for quick recognition and navigation\n * Use color to indicate meanings that users can learn and recognize across products\n *\n * It leverages the Chip component from Material UI\n */\nexport const HvTag = (props: HvTagProps) => {\n const {\n classes: classesProp,\n className,\n style,\n label,\n disabled,\n type = \"semantic\",\n color,\n deleteIcon,\n onDelete,\n onClick,\n role,\n deleteButtonArialLabel = \"Delete tag\",\n deleteButtonProps = {},\n ...others\n } = useDefaultProps(\"HvTag\", props);\n const { colors } = useTheme();\n const { classes, cx, css } = useClasses(classesProp);\n\n const getDeleteIcon = () => {\n const disabledSemanticColor =\n type === \"semantic\" ? \"secondary_60\" : \"base_dark\";\n const { tabIndex = 0 } = deleteButtonProps;\n\n const closeIconStyles = css({\n ...(disabled ? { cursor: \"not-allowed\" } : undefined),\n height: 16,\n \"& svg .color0\": {\n fill: theme.colors[disabled ? disabledSemanticColor : \"base_dark\"],\n },\n });\n return (\n <HvButton\n classes={{\n startIcon: classes.tagButton,\n focusVisible: classes.focusVisible,\n root: classes.button,\n }}\n aria-label={deleteButtonArialLabel}\n tabIndex={tabIndex}\n variant=\"secondaryGhost\"\n {...deleteButtonProps}\n >\n <CloseXS\n iconSize=\"XS\"\n className={closeIconStyles}\n color={disabled ? disabledSemanticColor : \"base_dark\"}\n />\n </HvButton>\n );\n };\n\n const inlineStyle = {\n ...style,\n };\n\n const categoricalBackgroundColor =\n type === \"categorical\" ? getColor(color, type, colors) : undefined;\n\n if (type === \"semantic\") {\n inlineStyle.backgroundColor = getColor(color, type, {});\n } else if (type === \"categorical\") {\n inlineStyle.backgroundColor = `${categoricalBackgroundColor}30`;\n }\n\n const [hover, setHover] = useState(false);\n\n return (\n <Chip\n label={label}\n className={cx(classes.root, className)}\n onMouseEnter={() => {\n setHover(!!onClick);\n }}\n onMouseLeave={() => {\n setHover(false);\n }}\n style={{\n ...(disabled ? null : inlineStyle),\n ...(hover && !disabled\n ? { boxShadow: `0 0 0 1pt ${categoricalBackgroundColor}` }\n : null),\n }}\n classes={{\n root: cx(classes.chipRoot, {\n [classes.disabled]: disabled,\n [classes.clickable]: !!onClick,\n [classes.categorical]: type === \"categorical\",\n [classes.categoricalFocus]: type === \"categorical\" && !disabled,\n [classes.categoricalDisabled]: type === \"categorical\" && disabled,\n }),\n label: classes.label,\n deleteIcon: cx(classes.deleteIcon, {\n [classes.disabledDeleteIcon]: disabled,\n }),\n }}\n deleteIcon={(hasDeleteAction(onDelete) && deleteIcon) || getDeleteIcon()}\n onDelete={getOnDeleteCallback(disabled, onDelete)}\n onClick={disabled ? undefined : onClick}\n role={role || (hasClickAction(onClick) ? \"button\" : undefined)}\n tabIndex={hasDeleteAction(onDelete) ? undefined : 0}\n {...others}\n />\n );\n};\n"],"names":["getColor","customColor","type","colors","defaultSemanticColor","theme","neutral_20","defaultCategoricalColor","cat1","backgroundColor","HvTag","props","classes","classesProp","className","style","label","disabled","color","deleteIcon","onDelete","onClick","role","deleteButtonArialLabel","deleteButtonProps","others","useDefaultProps","useTheme","cx","css","useClasses","getDeleteIcon","disabledSemanticColor","tabIndex","closeIconStyles","cursor","undefined","height","fill","HvButton","startIcon","tagButton","focusVisible","root","button","variant","children","CloseXS","iconSize","inlineStyle","categoricalBackgroundColor","hover","setHover","useState","Chip","onMouseEnter","onMouseLeave","boxShadow","chipRoot","clickable","categorical","categoricalFocus","categoricalDisabled","disabledDeleteIcon","hasDeleteAction","getOnDeleteCallback","hasClickAction"],"mappings":";;;;;;;;;;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AAgB,GAAG3D,SAAS,iBAAiB,CAACe;AAAAA,QACvD,CAACL,QAAQkD,mBAAmB,GAAG5D,SAAS,iBAAiBe;AAAAA,MAAAA,CAC1D;AAAA,MACDD,OAAOJ,QAAQI;AAAAA,MACfG,YAAYS,GAAGhB,QAAQO,YAAY;AAAA,QACjC,CAACP,QAAQmD,kBAAkB,GAAG9C;AAAAA,MAAAA,CAC/B;AAAA,IACH;AAAA,IACAE,YAAa6C,gBAAgB5C,QAAQ,KAAKD,cAAeY,cAAc;AAAA,IACvEX,UAAU6C,oBAAoBhD,UAAUG,QAAQ;AAAA,IAChDC,SAASJ,WAAWmB,SAAYf;AAAAA,IAChCC,MAAMA,SAAS4C,eAAe7C,OAAO,IAAI,WAAWe;AAAAA,IACpDH,UAAU+B,gBAAgB5C,QAAQ,IAAIgB,SAAY;AAAA,IAAE,GAChDX;AAAAA,EAAAA,CACL;AAEL;"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
1
|
+
import { useContext, useMemo } from "react";
|
|
2
2
|
import "@hitachivantara/uikit-styles";
|
|
3
3
|
import { HvThemeContext } from "@hitachivantara/uikit-react-shared";
|
|
4
4
|
import "@mui/material/styles";
|
|
5
5
|
import "@emotion/react/jsx-runtime";
|
|
6
6
|
const useTheme = () => {
|
|
7
|
-
|
|
7
|
+
const context = useContext(HvThemeContext);
|
|
8
|
+
return useMemo(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
const {
|
|
11
|
+
activeTheme,
|
|
12
|
+
selectedMode
|
|
13
|
+
} = context;
|
|
14
|
+
return {
|
|
15
|
+
...context,
|
|
16
|
+
colors: (_a = activeTheme == null ? void 0 : activeTheme.colors.modes) == null ? void 0 : _a[selectedMode]
|
|
17
|
+
};
|
|
18
|
+
}, [context]);
|
|
8
19
|
};
|
|
9
20
|
export {
|
|
10
21
|
useTheme
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","sources":["../../../src/hooks/useTheme.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport {\n HvThemeContext,\n HvThemeContextValue,\n} from \"@core/providers/ThemeProvider\";\n\nexport const useTheme = (): HvThemeContextValue => {\n
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../../../src/hooks/useTheme.ts"],"sourcesContent":["import { useContext, useMemo } from \"react\";\nimport { HvThemeColorModeStructure } from \"@hitachivantara/uikit-styles\";\nimport {\n HvThemeContext,\n HvThemeContextValue,\n} from \"@core/providers/ThemeProvider\";\n\nexport const useTheme = (): HvThemeContextValue & {\n /** Colors of the currently active theme and mode */\n colors?: HvThemeColorModeStructure;\n} => {\n const context = useContext(HvThemeContext);\n\n return useMemo(() => {\n const { activeTheme, selectedMode } = context;\n return { ...context, colors: activeTheme?.colors.modes?.[selectedMode] };\n }, [context]);\n};\n"],"names":["useTheme","context","useContext","HvThemeContext","useMemo","activeTheme","selectedMode","colors","modes"],"mappings":";;;;;AAOO,MAAMA,WAAWA,MAGnB;AACGC,QAAAA,UAAUC,WAAWC,cAAc;AAEzC,SAAOC,QAAQ,MAAM;;AACb,UAAA;AAAA,MAAEC;AAAAA,MAAaC;AAAAA,IAAiBL,IAAAA;AAC/B,WAAA;AAAA,MAAE,GAAGA;AAAAA,MAASM,SAAQF,gDAAaE,OAAOC,UAApBH,mBAA4BC;AAAAA,IAAY;AAAA,EAAE,GACtE,CAACL,OAAO,CAAC;AACd;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -38,9 +38,19 @@ import { GridProps } from '@mui/material';
|
|
|
38
38
|
import { Hooks } from 'react-table';
|
|
39
39
|
import { HTMLAttributes } from 'react';
|
|
40
40
|
import { HTMLInputTypeAttribute } from 'react';
|
|
41
|
+
import { HvAccentColor } from '@hitachivantara/uikit-styles';
|
|
42
|
+
import { HvAtmosphereColor } from '@hitachivantara/uikit-styles';
|
|
43
|
+
import { HvBaseColor } from '@hitachivantara/uikit-styles';
|
|
41
44
|
import { HvBaseTheme } from '@hitachivantara/uikit-styles';
|
|
45
|
+
import { HvBreakpoints } from '@hitachivantara/uikit-styles';
|
|
46
|
+
import { HvCategoricalColor } from '@hitachivantara/uikit-styles';
|
|
47
|
+
import { HvColor } from '@hitachivantara/uikit-styles';
|
|
48
|
+
import { HvColorAny } from '@hitachivantara/uikit-styles';
|
|
42
49
|
import type { HvExtraDeepProps } from '@hitachivantara/uikit-react-shared';
|
|
43
50
|
import type { HvExtraProps } from '@hitachivantara/uikit-react-shared';
|
|
51
|
+
import { HvSemanticColor } from '@hitachivantara/uikit-styles';
|
|
52
|
+
import { HvSize } from '@hitachivantara/uikit-styles';
|
|
53
|
+
import { HvSupportColor } from '@hitachivantara/uikit-styles';
|
|
44
54
|
import { PluginHook as HvTablePluginHook } from 'react-table';
|
|
45
55
|
import type { HvTheme } from '@hitachivantara/uikit-react-shared';
|
|
46
56
|
import { HvTheme as HvTheme_2 } from '@hitachivantara/uikit-styles';
|
|
@@ -976,7 +986,9 @@ export declare const horizontalScrollListItemClasses: {
|
|
|
976
986
|
selected: "HvHorizontalScrollListItem-selected";
|
|
977
987
|
};
|
|
978
988
|
|
|
979
|
-
export
|
|
989
|
+
export { HvAccentColor }
|
|
990
|
+
|
|
991
|
+
export declare type HvAccentColorKeys = HvAccentColor;
|
|
980
992
|
|
|
981
993
|
export declare type HvAccentColors = Record<HvAccentColorKeys, string>;
|
|
982
994
|
|
|
@@ -1140,7 +1152,7 @@ export declare interface HvAppSwitcherActionApplication {
|
|
|
1140
1152
|
/** True when the application is selected, false otherwise. */
|
|
1141
1153
|
isSelected?: boolean;
|
|
1142
1154
|
/** The color of the application. */
|
|
1143
|
-
color?:
|
|
1155
|
+
color?: HvColorAny;
|
|
1144
1156
|
}
|
|
1145
1157
|
|
|
1146
1158
|
export declare type HvAppSwitcherActionClasses = ExtractNames<typeof useClasses_54>;
|
|
@@ -1183,7 +1195,9 @@ export declare interface HvAppSwitcherProps extends HvBaseProps {
|
|
|
1183
1195
|
classes?: HvAppSwitcherClasses;
|
|
1184
1196
|
}
|
|
1185
1197
|
|
|
1186
|
-
export
|
|
1198
|
+
export { HvAtmosphereColor }
|
|
1199
|
+
|
|
1200
|
+
export declare type HvAtmosphereColorKeys = HvAtmosphereColor;
|
|
1187
1201
|
|
|
1188
1202
|
export declare type HvAtmosphereColors = Record<HvAtmosphereColorKeys, string>;
|
|
1189
1203
|
|
|
@@ -1202,14 +1216,10 @@ export declare interface HvAvatarProps extends HvBaseProps {
|
|
|
1202
1216
|
component?: React.ElementType;
|
|
1203
1217
|
/** Sets one of the standard sizes of the icons */
|
|
1204
1218
|
size?: HvAvatarSize;
|
|
1205
|
-
/**
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
*/
|
|
1210
|
-
color?: string;
|
|
1211
|
-
/** A String representing the background color of the avatar. You can use either an HEX or color name from the palette. */
|
|
1212
|
-
backgroundColor?: string;
|
|
1219
|
+
/** A color representing the foreground color of the avatar's letters or the generic User icon fallback. */
|
|
1220
|
+
color?: HvColorAny;
|
|
1221
|
+
/** A String representing the background color of the avatar. */
|
|
1222
|
+
backgroundColor?: HvColorAny;
|
|
1213
1223
|
/** The `src` attribute for the `img` element. */
|
|
1214
1224
|
src?: string;
|
|
1215
1225
|
/** The `srcSet` attribute for the `img` element. Use this attribute for responsive image display. */
|
|
@@ -1426,7 +1436,9 @@ export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChan
|
|
|
1426
1436
|
classes?: HvBaseCheckBoxClasses;
|
|
1427
1437
|
}
|
|
1428
1438
|
|
|
1429
|
-
export
|
|
1439
|
+
export { HvBaseColor }
|
|
1440
|
+
|
|
1441
|
+
export declare type HvBaseColorKeys = HvBaseColor;
|
|
1430
1442
|
|
|
1431
1443
|
export declare type HvBaseColors = Record<HvBaseColorKeys, string>;
|
|
1432
1444
|
|
|
@@ -1764,7 +1776,7 @@ export declare interface HvBreadCrumbProps extends HvBaseProps<HTMLDivElement, "
|
|
|
1764
1776
|
classes?: HvBreadCrumbClasses;
|
|
1765
1777
|
}
|
|
1766
1778
|
|
|
1767
|
-
export
|
|
1779
|
+
export { HvBreakpoints }
|
|
1768
1780
|
|
|
1769
1781
|
/**
|
|
1770
1782
|
* Bulk Actions allow users to perform an action on a single or multiple items.
|
|
@@ -2158,7 +2170,9 @@ declare interface HvCarouselThumbnailsProps extends HvBaseProps<HTMLDivElement,
|
|
|
2158
2170
|
renderThumbnail?: (index: number) => React.ReactNode;
|
|
2159
2171
|
}
|
|
2160
2172
|
|
|
2161
|
-
export
|
|
2173
|
+
export { HvCategoricalColor }
|
|
2174
|
+
|
|
2175
|
+
export declare type HvCategoricalColorKeys = HvCategoricalColor;
|
|
2162
2176
|
|
|
2163
2177
|
export declare interface HvCellInstance<D extends object = Record<string, unknown>, H extends HvTableHeaderRenderer | undefined = HvTableHeaderRenderer, V = any> extends Omit<Cell<D, V>, "column" | "row" | "getCellProps">, Partial<UseGroupByCellProps<D>> {
|
|
2164
2178
|
column: HvColumnInstance<D, H>;
|
|
@@ -2342,6 +2356,10 @@ export declare interface HvCheckBoxProps extends Omit<HvBaseCheckBoxProps, "clas
|
|
|
2342
2356
|
|
|
2343
2357
|
export declare type HvClickOutsideEvent = MouseEvent | KeyboardEvent | TouchEvent;
|
|
2344
2358
|
|
|
2359
|
+
export { HvColor }
|
|
2360
|
+
|
|
2361
|
+
export { HvColorAny }
|
|
2362
|
+
|
|
2345
2363
|
/**
|
|
2346
2364
|
* A color picker component which allows the user to select a color from a list of pre-defined colors or freely select one color via the Hue and Saturation.
|
|
2347
2365
|
* It receives a color string in HEX format and outputs an HEX formatted color.
|
|
@@ -2922,7 +2940,7 @@ export declare const HvDropdown: (props: HvDropdownProps) => JSX_2.Element;
|
|
|
2922
2940
|
|
|
2923
2941
|
export declare type HvDropdownClasses = ExtractNames<typeof useClasses_80>;
|
|
2924
2942
|
|
|
2925
|
-
export declare function hvDropdownColumn<D extends object = Record<string, unknown>, H extends HvTableHeaderRenderer | undefined = HvTableHeaderRenderer>(col: HvTableColumnConfig<D, H>, id: string, placeholder: string, disabledPlaceholder: string, onChange?: (identifier: string, value: HvListValue) => void): HvTableColumnConfig<D, H>;
|
|
2943
|
+
export declare function hvDropdownColumn<D extends object = Record<string, unknown>, H extends HvTableHeaderRenderer | undefined = HvTableHeaderRenderer>(col: HvTableColumnConfig<D, H>, id: string | undefined, placeholder: string, disabledPlaceholder: string, onChange?: (identifier: string, value: HvListValue) => void): HvTableColumnConfig<D, H>;
|
|
2926
2944
|
|
|
2927
2945
|
export declare const HvDropdownColumnCell: ({ values, disabled, onChange, placeholder, dropdownProps, }: HvDropdownColumnCellProp) => JSX.Element;
|
|
2928
2946
|
|
|
@@ -4503,7 +4521,7 @@ export declare interface HvLoadingProps extends HvBaseProps {
|
|
|
4503
4521
|
/** Whether the loading animation is hidden. */
|
|
4504
4522
|
hidden?: boolean;
|
|
4505
4523
|
/** Color applied to the bars. */
|
|
4506
|
-
color?:
|
|
4524
|
+
color?: HvColorAny;
|
|
4507
4525
|
classes?: HvLoadingClasses;
|
|
4508
4526
|
}
|
|
4509
4527
|
|
|
@@ -4709,7 +4727,7 @@ export declare type HvProgressBarStatus = "inProgress" | "completed" | "error";
|
|
|
4709
4727
|
|
|
4710
4728
|
export declare function hvProgressColumn<D extends object = Record<string, unknown>, H extends HvTableHeaderRenderer | undefined = HvTableHeaderRenderer>(col: HvTableColumnConfig<D, H>, getPartial?: (row: HvRowInstance<D, H>) => number, getTotal?: (row: HvRowInstance<D, H>) => number, color?: "primary" | "secondary"): HvTableColumnConfig<D, H>;
|
|
4711
4729
|
|
|
4712
|
-
export declare const HvProgressColumnCell: ({ partial, total, color, }: HvProgressColumnCellProp) => JSX.Element;
|
|
4730
|
+
export declare const HvProgressColumnCell: ({ partial, total, color, "aria-labelledby": ariaLabelledBy, }: HvProgressColumnCellProp) => JSX.Element;
|
|
4713
4731
|
|
|
4714
4732
|
export declare interface HvProgressColumnCellProp {
|
|
4715
4733
|
/** Current value of the bar. */
|
|
@@ -4718,6 +4736,7 @@ export declare interface HvProgressColumnCellProp {
|
|
|
4718
4736
|
total: number;
|
|
4719
4737
|
/** The color of the bar. */
|
|
4720
4738
|
color?: "primary" | "secondary";
|
|
4739
|
+
"aria-labelledby"?: string;
|
|
4721
4740
|
}
|
|
4722
4741
|
|
|
4723
4742
|
export declare type HvPropGetter<D extends object = Record<string, unknown>, H extends HvTableHeaderRenderer | undefined = HvTableHeaderRenderer, Props extends object = Record<string, unknown>, T extends object = never, P = Partial<Props>> = ((props: P, meta: HvMeta<D, H, T>) => P | P[]) | P | P[];
|
|
@@ -5241,7 +5260,9 @@ export declare interface HvSelectionListProps extends HvBaseProps<HTMLUListEleme
|
|
|
5241
5260
|
classes?: HvSelectionListClasses;
|
|
5242
5261
|
}
|
|
5243
5262
|
|
|
5244
|
-
export
|
|
5263
|
+
export { HvSemanticColor }
|
|
5264
|
+
|
|
5265
|
+
export declare type HvSemanticColorKeys = HvSemanticColor;
|
|
5245
5266
|
|
|
5246
5267
|
export declare type HvSemanticColors = Record<HvSemanticColorKeys, string>;
|
|
5247
5268
|
|
|
@@ -5275,6 +5296,8 @@ export declare interface HvSimpleGridProps extends HvBaseProps {
|
|
|
5275
5296
|
classes?: HvSimpleGridClasses;
|
|
5276
5297
|
}
|
|
5277
5298
|
|
|
5299
|
+
export { HvSize }
|
|
5300
|
+
|
|
5278
5301
|
/**
|
|
5279
5302
|
* Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.
|
|
5280
5303
|
*/
|
|
@@ -5560,7 +5583,9 @@ export declare interface HvSuggestionsProps extends HvBaseProps {
|
|
|
5560
5583
|
classes?: HvSuggestionsClasses;
|
|
5561
5584
|
}
|
|
5562
5585
|
|
|
5563
|
-
export
|
|
5586
|
+
export { HvSupportColor }
|
|
5587
|
+
|
|
5588
|
+
export declare type HvSupportColorKeys = HvSupportColor;
|
|
5564
5589
|
|
|
5565
5590
|
export declare type HvSupportColors = Record<HvSupportColorKeys, string>;
|
|
5566
5591
|
|
|
@@ -5876,6 +5901,8 @@ export declare interface HvTableHeaderProps extends Omit<ThHTMLAttributes<HTMLTa
|
|
|
5876
5901
|
resizerProps?: HTMLAttributes<HTMLDivElement>;
|
|
5877
5902
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
5878
5903
|
classes?: HvTableHeaderClasses;
|
|
5904
|
+
/** Extra props to be passed onto the sort button in the header. */
|
|
5905
|
+
sortButtonProps?: HvButtonProps;
|
|
5879
5906
|
}
|
|
5880
5907
|
|
|
5881
5908
|
export declare type HvTableHeaderRenderer<D extends object = Record<string, unknown>> = Renderer<HvHeaderProps_2<D>>;
|
|
@@ -6059,7 +6086,7 @@ export declare interface HvTagProps extends Omit<ChipProps, "color" | "classes">
|
|
|
6059
6086
|
/** The type of the tag element. A tag can be of semantic or categoric type. */
|
|
6060
6087
|
type?: "semantic" | "categorical";
|
|
6061
6088
|
/** Background color to be applied to the tag */
|
|
6062
|
-
color?:
|
|
6089
|
+
color?: HvColorAny;
|
|
6063
6090
|
/** Icon used to customize the delete icon in the Chip element */
|
|
6064
6091
|
deleteIcon?: React.ReactElement;
|
|
6065
6092
|
/**
|
|
@@ -10215,7 +10242,10 @@ export declare type UseTableStylesProps = (<D extends object = Record<string, un
|
|
|
10215
10242
|
pluginName: string;
|
|
10216
10243
|
};
|
|
10217
10244
|
|
|
10218
|
-
export declare const useTheme: () => HvThemeContextValue
|
|
10245
|
+
export declare const useTheme: () => HvThemeContextValue & {
|
|
10246
|
+
/** Colors of the currently active theme and mode */
|
|
10247
|
+
colors?: HvThemeColorModeStructure;
|
|
10248
|
+
};
|
|
10219
10249
|
|
|
10220
10250
|
export declare const useUniqueId: (id?: string, idPrefix?: string) => string;
|
|
10221
10251
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.27.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.0",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
35
|
"@emotion/utils": "^1.2.1",
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.6.
|
|
37
|
-
"@hitachivantara/uikit-react-shared": "^5.1.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.11.
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.6.4",
|
|
37
|
+
"@hitachivantara/uikit-react-shared": "^5.1.9",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.11.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": "d97e2f6b946dbebf4bac28e6f071f14d9aad0789",
|
|
68
68
|
"main": "dist/cjs/index.cjs",
|
|
69
69
|
"exports": {
|
|
70
70
|
".": {
|