@hitachivantara/uikit-react-core 5.24.6 → 5.25.1
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/Badge/Badge.cjs +0 -1
- package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
- package/dist/cjs/components/ColorPicker/ColorPicker.cjs +12 -1
- package/dist/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/cjs/components/EmptyState/EmptyState.styles.cjs +1 -5
- package/dist/cjs/components/EmptyState/EmptyState.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/WarningText/WarningText.cjs +1 -0
- package/dist/cjs/components/Forms/WarningText/WarningText.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.cjs +2 -2
- package/dist/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Action.cjs +12 -5
- package/dist/cjs/components/VerticalNavigation/Actions/Action.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Action.styles.cjs +31 -34
- package/dist/cjs/components/VerticalNavigation/Actions/Action.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.cjs +10 -5
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.styles.cjs +16 -19
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Header/Header.cjs +13 -7
- package/dist/cjs/components/VerticalNavigation/Header/Header.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Header/Header.styles.cjs +21 -37
- package/dist/cjs/components/VerticalNavigation/Header/Header.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs +13 -8
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.styles.cjs +20 -17
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.cjs +16 -10
- package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopupContainer.cjs +7 -1
- package/dist/cjs/components/VerticalNavigation/NavigationPopup/NavigationPopupContainer.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs +10 -6
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +19 -22
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeView.cjs +8 -5
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeView.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeView.styles.cjs +16 -17
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeView.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs +74 -49
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +106 -130
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs +13 -7
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs +36 -36
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs.map +1 -1
- package/dist/cjs/index.cjs +16 -16
- package/dist/esm/components/Badge/Badge.js +0 -1
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/ColorPicker/ColorPicker.js +12 -1
- package/dist/esm/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.styles.js +1 -5
- package/dist/esm/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/dist/esm/components/Forms/WarningText/WarningText.js +1 -0
- package/dist/esm/components/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.js +2 -2
- package/dist/esm/components/TagsInput/TagsInput.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Action.js +15 -7
- package/dist/esm/components/VerticalNavigation/Actions/Action.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Action.styles.js +31 -32
- package/dist/esm/components/VerticalNavigation/Actions/Action.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Actions.js +13 -7
- package/dist/esm/components/VerticalNavigation/Actions/Actions.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Actions.styles.js +16 -17
- package/dist/esm/components/VerticalNavigation/Actions/Actions.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Header/Header.js +16 -9
- package/dist/esm/components/VerticalNavigation/Header/Header.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Header/Header.styles.js +21 -35
- package/dist/esm/components/VerticalNavigation/Header/Header.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js +16 -10
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.styles.js +20 -15
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.js +16 -10
- package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopup.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopupContainer.js +10 -3
- package/dist/esm/components/VerticalNavigation/NavigationPopup/NavigationPopupContainer.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js +13 -8
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +19 -20
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeView.js +11 -7
- package/dist/esm/components/VerticalNavigation/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeView.styles.js +16 -15
- package/dist/esm/components/VerticalNavigation/TreeView/TreeView.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js +77 -51
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.styles.js +106 -128
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.js +15 -8
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js +36 -34
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js.map +1 -1
- package/dist/esm/index.js +42 -42
- package/dist/types/index.d.ts +243 -174
- package/package.json +5 -5
- package/dist/cjs/components/VerticalNavigation/Actions/actionClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/Actions/actionClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/Actions/actionsClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/Actions/actionsClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/Header/headerClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/Header/headerClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/Navigation/navigationClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/Navigation/navigationClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/treeViewClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/TreeView/treeViewClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/treeViewItemClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/TreeView/treeViewItemClasses.cjs.map +0 -1
- package/dist/cjs/components/VerticalNavigation/verticalNavigationClasses.cjs +0 -8
- package/dist/cjs/components/VerticalNavigation/verticalNavigationClasses.cjs.map +0 -1
- package/dist/cjs/utils/transientOptions.cjs +0 -7
- package/dist/cjs/utils/transientOptions.cjs.map +0 -1
- package/dist/esm/components/VerticalNavigation/Actions/actionClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/Actions/actionClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/Actions/actionsClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/Actions/actionsClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/Header/headerClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/Header/headerClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/Navigation/navigationClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/Navigation/navigationClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/TreeView/treeViewClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/TreeView/treeViewClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/TreeView/treeViewItemClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/TreeView/treeViewItemClasses.js.map +0 -1
- package/dist/esm/components/VerticalNavigation/verticalNavigationClasses.js +0 -8
- package/dist/esm/components/VerticalNavigation/verticalNavigationClasses.js.map +0 -1
- package/dist/esm/utils/transientOptions.js +0 -7
- package/dist/esm/utils/transientOptions.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeViewItem.styles.cjs","sources":["../../../../../src/components/VerticalNavigation/TreeView/TreeViewItem.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"TreeViewItem.styles.cjs","sources":["../../../../../src/components/VerticalNavigation/TreeView/TreeViewItem.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nconst selected = () => ({\n background: theme.colors.atmo3,\n borderLeft: theme.verticalNavigation.activeBorderLeft,\n \"& *\": {\n background: theme.colors.atmo3,\n },\n});\n\nconst hover = () => ({\n background: theme.verticalNavigation.hoverColor,\n});\n\nexport const { staticClasses, useClasses } = createClasses(\n \"HvVerticalNavigationTreeViewItem\",\n {\n node: {\n listStyle: \"none\",\n minHeight: \"32px\",\n \"&:not(:last-child)\": {\n marginBottom: \"8px\",\n },\n \"&$collapsed\": {\n \"&>$group\": {\n display: \"none\",\n },\n },\n \"&$expanded\": {\n \"&>$group\": {\n display: \"block\",\n },\n },\n \"&$link\": {\n textDecoration: \"none\",\n },\n \"&$hide\": {\n display: \"none\",\n },\n },\n content: {\n width: \"100%\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n height: \"32px\",\n borderLeft: theme.verticalNavigation.inactiveBorderLeft,\n paddingRight: theme.space.xs,\n \"&$minimized\": {\n justifyContent: \"center\",\n paddingRight: 0,\n },\n \"$expandable>&\": {\n fontWeight: 600,\n },\n \"$selected>&\": selected(),\n // hover\n \":not($disabled>&):not($selected>&):hover\": hover(),\n \":not($disabled)$selected>&:hover\": {},\n\n // focus\n \":not($disabled>&):not($selected>&):focus-visible\": hover(),\n \":not($disabled>&):not($selected>&).focus-visible\": hover(),\n\n \"*:focus-visible $focused>&\": {\n ...outlineStyles,\n },\n\n \".focus-visible $focused>&\": {\n ...outlineStyles,\n },\n \"$focused>&\": {\n ...hover(),\n },\n\n \"&[disabled], &:active\": {\n outline: \"none\",\n },\n\n \"&:focus\": {\n outline: \"none\",\n },\n\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n\n \"&.focus-visible\": {\n ...outlineStyles,\n },\n\n // cursor\n cursor: \"pointer\",\n \"& *\": {\n cursor: \"pointer\",\n },\n\n \"$disabled>&\": {\n cursor: \"not-allowed\",\n \"& *\": {\n cursor: \"not-allowed\",\n },\n },\n },\n link: {},\n group: {\n margin: \"8px 0 0 0\",\n padding: 0,\n },\n disabled: {},\n expandable: {\n fontWeight: 600,\n },\n collapsed: {},\n expanded: {},\n selectable: {},\n unselectable: {},\n selected: {},\n unselected: {},\n focused: {},\n minimized: {},\n hide: {},\n label: {\n display: \"flex\",\n flexGrow: 1,\n maxWidth: \"100%\",\n },\n labelIcon: {\n maxWidth: \"calc(100% - 32px)\",\n },\n labelExpandable: {\n maxWidth: \"calc(100% - 32px)\",\n\n \"&$labelIcon\": {\n maxWidth: \"calc(100% - 64px)\",\n },\n },\n }\n);\n"],"names":["selected","background","theme","colors","atmo3","borderLeft","verticalNavigation","activeBorderLeft","hover","hoverColor","staticClasses","useClasses","createClasses","node","listStyle","minHeight","marginBottom","display","textDecoration","content","width","justifyContent","alignItems","height","inactiveBorderLeft","paddingRight","space","xs","fontWeight","outlineStyles","outline","cursor","link","group","margin","padding","disabled","expandable","collapsed","expanded","selectable","unselectable","unselected","focused","minimized","hide","label","flexGrow","maxWidth","labelIcon","labelExpandable"],"mappings":";;;;;AAMA,MAAMA,WAAWA,OAAO;AAAA,EACtBC,YAAYC,YAAAA,MAAMC,OAAOC;AAAAA,EACzBC,YAAYH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A,MACZ,GAAGrB,MAAM;AAAA,IACX;AAAA,IAEA,yBAAyB;AAAA,MACvBsB,SAAS;AAAA,IACX;AAAA,IAEA,WAAW;AAAA,MACTA,SAAS;AAAA,IACX;AAAA,IAEA,mBAAmB;AAAA,MACjB,GAAGD,WAAAA;AAAAA,IACL;AAAA,IAEA,mBAAmB;AAAA,MACjB,GAAGA,WAAAA;AAAAA,IACL;AAAA;AAAA,IAGAE,QAAQ;AAAA,IACR,OAAO;AAAA,MACLA,QAAQ;AAAA,IACV;AAAA,IAEA,eAAe;AAAA,MACbA,QAAQ;AAAA,MACR,OAAO;AAAA,QACLA,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AAAA,EACAC,MAAM,CAAC;AAAA,EACPC,OAAO;AAAA,IACLC,QAAQ;AAAA,IACRC,SAAS;AAAA,EACX;AAAA,EACAC,UAAU,CAAC;AAAA,EACXC,YAAY;AAAA,IACVT,YAAY;AAAA,EACd;AAAA,EACAU,WAAW,CAAC;AAAA,EACZC,UAAU,CAAC;AAAA,EACXC,YAAY,CAAC;AAAA,EACbC,cAAc,CAAC;AAAA,EACfzC,UAAU,CAAC;AAAA,EACX0C,YAAY,CAAC;AAAA,EACbC,SAAS,CAAC;AAAA,EACVC,WAAW,CAAC;AAAA,EACZC,MAAM,CAAC;AAAA,EACPC,OAAO;AAAA,IACL7B,SAAS;AAAA,IACT8B,UAAU;AAAA,IACVC,UAAU;AAAA,EACZ;AAAA,EACAC,WAAW;AAAA,IACTD,UAAU;AAAA,EACZ;AAAA,EACAE,iBAAiB;AAAA,IACfF,UAAU;AAAA,IAEV,eAAe;AAAA,MACbA,UAAU;AAAA,IACZ;AAAA,EACF;AACF,CACF;;;"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const clsx = require("clsx");
|
|
4
3
|
const useDefaultProps = require("../../hooks/useDefaultProps.cjs");
|
|
5
4
|
const React = require("react");
|
|
6
|
-
const VerticalNavigation_styles = require("./VerticalNavigation.styles.cjs");
|
|
7
|
-
const verticalNavigationClasses = require("./verticalNavigationClasses.cjs");
|
|
8
5
|
const VerticalNavigationContext = require("./VerticalNavigationContext.cjs");
|
|
9
6
|
const VerticalNavigation_utils = require("./utils/VerticalNavigation.utils.cjs");
|
|
7
|
+
const VerticalNavigation_styles = require("./VerticalNavigation.styles.cjs");
|
|
10
8
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
9
|
const NavigationSlider_utils = require("./NavigationSlider/utils/NavigationSlider.utils.cjs");
|
|
12
10
|
const HvVerticalNavigation = (props) => {
|
|
13
11
|
const {
|
|
14
12
|
id,
|
|
15
13
|
className,
|
|
16
|
-
classes,
|
|
14
|
+
classes: classesProp,
|
|
17
15
|
children,
|
|
18
16
|
open = true,
|
|
19
17
|
slider = false,
|
|
20
18
|
useIcons = false,
|
|
21
19
|
...others
|
|
22
20
|
} = useDefaultProps.useDefaultProps("HvVerticalNavigation", props);
|
|
21
|
+
const {
|
|
22
|
+
classes,
|
|
23
|
+
cx
|
|
24
|
+
} = VerticalNavigation_styles.useClasses(classesProp);
|
|
23
25
|
const [parentData, setParentData] = React.useState([]);
|
|
24
26
|
const [parentSelected, setParentSelected] = React.useState();
|
|
25
27
|
const [headerTitle, setHeaderTitle] = React.useState();
|
|
@@ -54,15 +56,19 @@ const HvVerticalNavigation = (props) => {
|
|
|
54
56
|
}), [open, useIcons, slider, headerTitle, setHeaderTitle, parentItem, setParentItem, withParentData, navigateToChildHandler, navigateToParentHandler, hasAnyChildWithData, parentData, parentSelected]);
|
|
55
57
|
const content = /* @__PURE__ */ jsxRuntime.jsx(VerticalNavigationContext.VerticalNavigationContext.Provider, {
|
|
56
58
|
value,
|
|
57
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
58
60
|
id,
|
|
59
|
-
className:
|
|
60
|
-
|
|
61
|
+
className: cx(classes.root, {
|
|
62
|
+
[classes.collapsed]: !open,
|
|
63
|
+
[classes.slider]: slider,
|
|
64
|
+
[classes.childData]: hasAnyChildWithData
|
|
65
|
+
}, className),
|
|
61
66
|
...others,
|
|
62
67
|
children
|
|
63
68
|
})
|
|
64
69
|
});
|
|
65
70
|
return content;
|
|
66
71
|
};
|
|
72
|
+
exports.verticalNavigationClasses = VerticalNavigation_styles.staticClasses;
|
|
67
73
|
exports.HvVerticalNavigation = HvVerticalNavigation;
|
|
68
74
|
//# sourceMappingURL=VerticalNavigation.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalNavigation.cjs","sources":["../../../../src/components/VerticalNavigation/VerticalNavigation.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.cjs","sources":["../../../../src/components/VerticalNavigation/VerticalNavigation.tsx"],"sourcesContent":["import { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\nimport {\n VerticalNavigationContext,\n NavigationData,\n} from \"./VerticalNavigationContext\";\nimport {\n fillDataWithParentId,\n getNavigationItemById,\n getParentItemById,\n} from \"./NavigationSlider/utils\";\nimport { hasChildNavigationItems } from \"./utils/VerticalNavigation.utils\";\n\nimport { staticClasses, useClasses } from \"./VerticalNavigation.styles\";\n\nexport { staticClasses as verticalNavigationClasses };\n\nexport type HvVerticalNavigationClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvVerticalNavigationProps {\n /**\n * Id to be applied to the root node.\n */\n id?: string;\n /**\n * Class names to be applied.\n */\n className?: string;\n /**\n * A Jss Object used to override or extend the styles applied to the component.\n */\n classes?: HvVerticalNavigationClasses;\n /**\n * Current State of the Vertical Navigation Collapse\n */\n open?: boolean;\n /**\n * Collpased Mode for the Vertical Navigation, the default value is \"simple\".\n *\n * @deprecated - `useIcons` property should be used instead.\n */\n collapsedMode?: HvVerticalNavigationMode;\n /**\n * Boolean to determine if treeview is in slider mode (for mobile navigation), the default value is false.\n */\n slider?: boolean;\n /**\n * The content inside the actions container.\n */\n children?: React.ReactNode;\n /**\n * Boolean to determine if icons should be displayed in the navigation menu.\n * When `true` a icon will always be displayed, if no icon is provided the first letter of the label will be\n * displayed inside an Avatar component.\n * When `false` no icons will be shown, even if an icon is provided.\n */\n useIcons?: boolean;\n}\n\n/**\n * Navigation enables users to move through an app to complete tasks.\n *\n * It is recommended to use vertical navigation when your application requires global navigation that is displayed on the left.\n * While vertical navigation menus generally consume more space than their horizontal counterparts, they have become more popular as desktop monitors move to wide-screen formats.\n *\n * Although both the hierarchically organized data and the visual style resemble a treeview-like structure, the [Treeview Design Pattern](https://w3c.github.io/aria-practices/#TreeView)\n * isn't necessarily the most appropriate.\n *\n * The tree role provides complex functionality that is not needed for typical site navigation, and changes the most common keyboard navigation using TAB.\n *\n * The [Disclosure Design Pattern](https://w3c.github.io/aria-practices/#disclosure) is more suited for typical site navigation, with expandable groups of links.\n * However it can be tedious to TAB through all navigation items to reach the actions panel.\n *\n * Both modes are available via the `mode` property and each app should choose the most appropriate.\n */\nexport const HvVerticalNavigation = (props: HvVerticalNavigationProps) => {\n const {\n id,\n className,\n classes: classesProp,\n\n children,\n\n open = true,\n\n slider = false,\n\n useIcons = false,\n\n ...others\n } = useDefaultProps(\"HvVerticalNavigation\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const [parentData, setParentData] = useState<NavigationData[]>([]);\n\n const [parentSelected, setParentSelected] = useState();\n\n const [headerTitle, setHeaderTitle] = useState<string | undefined>();\n\n // navigationSlider\n const withParentData = useMemo(\n () => fillDataWithParentId(parentData),\n [parentData]\n );\n\n const initialParentItem = useMemo(\n () => getParentItemById(withParentData, parentSelected),\n [withParentData, parentSelected]\n );\n\n const [parentItem, setParentItem] = useState(initialParentItem);\n\n const hasAnyChildWithData = useMemo(\n () => hasChildNavigationItems(parentData),\n [parentData]\n );\n\n useEffect(\n () => setHeaderTitle(parentItem?.label),\n [parentItem, setParentItem]\n );\n\n const navigateToParentHandler = useCallback(() => {\n setParentItem(getParentItemById(withParentData, parentItem.id));\n }, [parentItem, setParentItem, withParentData]);\n\n const navigateToChildHandler = useCallback(\n (event, item) => {\n setParentItem(getNavigationItemById(withParentData, item.id));\n event.stopPropagation();\n },\n [setParentItem, withParentData]\n );\n\n const value = useMemo(\n () => ({\n isOpen: open,\n useIcons,\n slider,\n headerTitle,\n setHeaderTitle,\n\n parentItem,\n setParentItem,\n withParentData,\n navigateToChildHandler,\n navigateToParentHandler,\n\n parentData,\n setParentData,\n parentSelected,\n setParentSelected,\n hasAnyChildWithData,\n }),\n [\n open,\n useIcons,\n slider,\n headerTitle,\n setHeaderTitle,\n parentItem,\n setParentItem,\n withParentData,\n navigateToChildHandler,\n navigateToParentHandler,\n hasAnyChildWithData,\n parentData,\n parentSelected,\n ]\n );\n\n const content = (\n <VerticalNavigationContext.Provider value={value}>\n <div\n id={id}\n className={cx(\n classes.root,\n {\n [classes.collapsed]: !open,\n [classes.slider]: slider,\n [classes.childData]: hasAnyChildWithData,\n },\n className\n )}\n {...others}\n >\n {children}\n </div>\n </VerticalNavigationContext.Provider>\n );\n\n return content;\n};\n\nexport type HvVerticalNavigationMode = \"icon\" | \"simple\";\n\nexport type HvVerticalNavigationPosition =\n | \"static\"\n | \"relative\"\n | \"fixed\"\n | \"absolute\";\n"],"names":["HvVerticalNavigation","props","id","className","classes","classesProp","children","open","slider","useIcons","others","useDefaultProps","cx","useClasses","parentData","setParentData","useState","parentSelected","setParentSelected","headerTitle","setHeaderTitle","withParentData","useMemo","fillDataWithParentId","initialParentItem","getParentItemById","parentItem","setParentItem","hasAnyChildWithData","hasChildNavigationItems","useEffect","label","navigateToParentHandler","useCallback","navigateToChildHandler","event","item","getNavigationItemById","stopPropagation","value","isOpen","content","VerticalNavigationContext","Provider","root","collapsed","childData"],"mappings":";;;;;;;;;AA8EaA,MAAAA,u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eN,cAAc,CAChC;AAEMkB,QAAAA,QAAQjB,MAAAA,QACZ,OAAO;AAAA,IACLkB,QAAQjC;AAAAA,IACRE;AAAAA,IACAD;AAAAA,IACAW;AAAAA,IACAC;AAAAA,IAEAM;AAAAA,IACAC;AAAAA,IACAN;AAAAA,IACAa;AAAAA,IACAF;AAAAA,IAEAlB;AAAAA,IACAC;AAAAA,IACAE;AAAAA,IACAC;AAAAA,IACAU;AAAAA,EAAAA,IAEF,CACErB,MACAE,UACAD,QACAW,aACAC,gBACAM,YACAC,eACAN,gBACAa,wBACAF,yBACAJ,qBACAd,YACAG,cAAc,CAElB;AAEMwB,QAAAA,UACHC,2BAAAA,IAAAA,0BAAAA,0BAA0BC,UAAQ;AAAA,IAACJ;AAAAA,IAAajC,yCAC/C,OAAA;AAAA,MACEJ;AAAAA,MACAC,WAAWS,GACTR,QAAQwC,MACR;AAAA,QACE,CAACxC,QAAQyC,SAAS,GAAG,CAACtC;AAAAA,QACtB,CAACH,QAAQI,MAAM,GAAGA;AAAAA,QAClB,CAACJ,QAAQ0C,SAAS,GAAGlB;AAAAA,SAEvBzB,SACF;AAAA,MAAE,GACEO;AAAAA,MAAMJ;AAAAA,IAAAA,CAGP;AAAA,EAAA,CAC6B;AAG/BmC,SAAAA;AACT;;;"}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const classes = require("../../utils/classes.cjs");
|
|
4
4
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
const {
|
|
6
|
+
staticClasses,
|
|
7
|
+
useClasses
|
|
8
|
+
} = classes.createClasses("HvVerticalNavigation", {
|
|
9
|
+
root: {
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
justifyContent: uikitStyles.theme.verticalNavigation.justifyContent,
|
|
13
|
+
width: "220px",
|
|
14
|
+
background: uikitStyles.theme.colors.atmo1,
|
|
15
|
+
boxShadow: uikitStyles.theme.colors.shadow,
|
|
16
|
+
clipPath: "inset(0px -12px 0px 0px)",
|
|
17
|
+
"& > :only-child": {
|
|
18
|
+
padding: uikitStyles.theme.space.sm
|
|
19
|
+
},
|
|
20
|
+
"& > :not(nav:first-of-type)": {
|
|
21
|
+
borderTop: `3px solid ${uikitStyles.theme.colors.atmo2}`,
|
|
22
|
+
padding: uikitStyles.theme.spacing(["xs", "sm", "sm", "sm"])
|
|
23
|
+
},
|
|
24
|
+
"& > :first-of-type:not(:last-child)": {
|
|
25
|
+
borderTop: "none",
|
|
26
|
+
padding: uikitStyles.theme.spacing(["sm", "sm", "xs", "sm"])
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
collapsed: {
|
|
30
|
+
width: "56px",
|
|
31
|
+
"&$childData": {
|
|
32
|
+
width: "66px"
|
|
33
|
+
},
|
|
25
34
|
"& > :first-of-type:not(:last-child)": {
|
|
26
35
|
padding: uikitStyles.theme.spacing(["sm", "xs", "xs", "xs"])
|
|
27
36
|
},
|
|
@@ -29,22 +38,13 @@ const StyledRoot = /* @__PURE__ */ _styled__default.default("div", process.env.N
|
|
|
29
38
|
padding: uikitStyles.theme.spacing(["xs", "xs", "sm", "xs"])
|
|
30
39
|
}
|
|
31
40
|
},
|
|
32
|
-
|
|
33
|
-
padding: uikitStyles.theme.space.sm
|
|
34
|
-
},
|
|
35
|
-
"& > :not(nav:first-of-type)": {
|
|
36
|
-
borderTop: `3px solid ${uikitStyles.theme.colors.atmo2}`,
|
|
37
|
-
padding: uikitStyles.theme.spacing(["xs", "sm", "sm", "sm"])
|
|
38
|
-
},
|
|
39
|
-
"& > :first-of-type:not(:last-child)": {
|
|
40
|
-
borderTop: "none",
|
|
41
|
-
padding: uikitStyles.theme.spacing(["sm", "sm", "xs", "sm"])
|
|
42
|
-
},
|
|
43
|
-
[`&.${verticalNavigationClasses.default.slider}`]: {
|
|
41
|
+
slider: {
|
|
44
42
|
"& > div:first-of-type": {
|
|
45
43
|
borderBottom: `3px solid ${uikitStyles.theme.colors.atmo2}`
|
|
46
44
|
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
},
|
|
46
|
+
childData: {}
|
|
47
|
+
});
|
|
48
|
+
exports.staticClasses = staticClasses;
|
|
49
|
+
exports.useClasses = useClasses;
|
|
50
50
|
//# sourceMappingURL=VerticalNavigation.styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalNavigation.styles.cjs","sources":["../../../../src/components/VerticalNavigation/VerticalNavigation.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.styles.cjs","sources":["../../../../src/components/VerticalNavigation/VerticalNavigation.styles.tsx"],"sourcesContent":["import { createClasses } from \"@core/utils/classes\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\n \"HvVerticalNavigation\",\n {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: theme.verticalNavigation.justifyContent,\n\n width: \"220px\",\n\n background: theme.colors.atmo1,\n boxShadow: theme.colors.shadow,\n clipPath: \"inset(0px -12px 0px 0px)\",\n\n \"& > :only-child\": {\n padding: theme.space.sm,\n },\n \"& > :not(nav:first-of-type)\": {\n borderTop: `3px solid ${theme.colors.atmo2}`,\n padding: theme.spacing([\"xs\", \"sm\", \"sm\", \"sm\"]),\n },\n\n \"& > :first-of-type:not(:last-child)\": {\n borderTop: \"none\",\n padding: theme.spacing([\"sm\", \"sm\", \"xs\", \"sm\"]),\n },\n },\n collapsed: {\n width: \"56px\",\n \"&$childData\": {\n width: \"66px\",\n },\n \"& > :first-of-type:not(:last-child)\": {\n padding: theme.spacing([\"sm\", \"xs\", \"xs\", \"xs\"]),\n },\n\n \"& > :not(nav:first-of-type)\": {\n padding: theme.spacing([\"xs\", \"xs\", \"sm\", \"xs\"]),\n },\n },\n\n slider: {\n \"& > div:first-of-type\": {\n borderBottom: `3px solid ${theme.colors.atmo2}`,\n },\n },\n\n childData: {},\n }\n);\n"],"names":["staticClasses","useClasses","createClasses","root","display","flexDirection","justifyContent","theme","verticalNavigation","width","background","colors","atmo1","boxShadow","shadow","clipPath","padding","space","sm","borderTop","atmo2","spacing","collapsed","slider","borderBottom","childData"],"mappings":";;;;AAGa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAC3C,wBACA;AAAA,EACEC,MAAM;AAAA,IACJC,SAAS;AAAA,IACTC,eAAe;AAAA,IACfC,gBAAgBC,YAAAA,MAAMC,mBAAmBF;AAAAA,IAEzCG,OAAO;AAAA,IAEPC,YAAYH,YAAAA,MAAMI,OAAOC;AAAAA,IACzBC,WAAWN,YAAAA,MAAMI,OAAOG;AAAAA,IACxBC,UAAU;AAAA,IAEV,mBAAmB;AAAA,MACjBC,SAAST,YAAAA,MAAMU,MAAMC;AAAAA,IACvB;AAAA,IACA,+BAA+B;AAAA,MAC7BC,WAAY,aAAYZ,YAAAA,MAAMI,OAAOS;AAAAA,MACrCJ,SAAST,kBAAMc,QAAQ,CAAC,MAAM,MAAM,MAAM,IAAI,CAAC;AAAA,IACjD;AAAA,IAEA,uCAAuC;AAAA,MACrCF,WAAW;AAAA,MACXH,SAAST,kBAAMc,QAAQ,CAAC,MAAM,MAAM,MAAM,IAAI,CAAC;AAAA,IACjD;AAAA,EACF;AAAA,EACAC,WAAW;AAAA,IACTb,OAAO;AAAA,IACP,eAAe;AAAA,MACbA,OAAO;AAAA,IACT;AAAA,IACA,uCAAuC;AAAA,MACrCO,SAAST,kBAAMc,QAAQ,CAAC,MAAM,MAAM,MAAM,IAAI,CAAC;AAAA,IACjD;AAAA,IAEA,+BAA+B;AAAA,MAC7BL,SAAST,kBAAMc,QAAQ,CAAC,MAAM,MAAM,MAAM,IAAI,CAAC;AAAA,IACjD;AAAA,EACF;AAAA,EAEAE,QAAQ;AAAA,IACN,yBAAyB;AAAA,MACvBC,cAAe,aAAYjB,YAAAA,MAAMI,OAAOS;AAAAA,IAC1C;AAAA,EACF;AAAA,EAEAK,WAAW,CAAC;AACd,CACF;;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -215,21 +215,21 @@ const Calendar_styles = require("./components/Calendar/Calendar.styles.cjs");
|
|
|
215
215
|
const Calendar = require("./components/Calendar/Calendar.cjs");
|
|
216
216
|
const CalendarHeader_styles = require("./components/Calendar/CalendarHeader/CalendarHeader.styles.cjs");
|
|
217
217
|
const CalendarHeader = require("./components/Calendar/CalendarHeader/CalendarHeader.cjs");
|
|
218
|
-
const
|
|
218
|
+
const VerticalNavigation_styles = require("./components/VerticalNavigation/VerticalNavigation.styles.cjs");
|
|
219
219
|
const VerticalNavigation = require("./components/VerticalNavigation/VerticalNavigation.cjs");
|
|
220
|
-
const
|
|
220
|
+
const Header_styles$2 = require("./components/VerticalNavigation/Header/Header.styles.cjs");
|
|
221
221
|
const Header$2 = require("./components/VerticalNavigation/Header/Header.cjs");
|
|
222
|
-
const
|
|
223
|
-
const actionsClasses = require("./components/VerticalNavigation/Actions/actionsClasses.cjs");
|
|
222
|
+
const Actions_styles$2 = require("./components/VerticalNavigation/Actions/Actions.styles.cjs");
|
|
224
223
|
const Actions$2 = require("./components/VerticalNavigation/Actions/Actions.cjs");
|
|
224
|
+
const Action_styles$1 = require("./components/VerticalNavigation/Actions/Action.styles.cjs");
|
|
225
225
|
const Action$1 = require("./components/VerticalNavigation/Actions/Action.cjs");
|
|
226
|
-
const
|
|
226
|
+
const Navigation_styles$1 = require("./components/VerticalNavigation/Navigation/Navigation.styles.cjs");
|
|
227
227
|
const Navigation$1 = require("./components/VerticalNavigation/Navigation/Navigation.cjs");
|
|
228
|
-
const
|
|
228
|
+
const NavigationSlider_styles = require("./components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs");
|
|
229
229
|
const NavigationSlider = require("./components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs");
|
|
230
|
-
const
|
|
231
|
-
const treeViewItemClasses = require("./components/VerticalNavigation/TreeView/treeViewItemClasses.cjs");
|
|
230
|
+
const TreeView_styles = require("./components/VerticalNavigation/TreeView/TreeView.styles.cjs");
|
|
232
231
|
const TreeView = require("./components/VerticalNavigation/TreeView/TreeView.cjs");
|
|
232
|
+
const TreeViewItem_styles = require("./components/VerticalNavigation/TreeView/TreeViewItem.styles.cjs");
|
|
233
233
|
const TreeViewItem = require("./components/VerticalNavigation/TreeView/TreeViewItem.cjs");
|
|
234
234
|
const VerticalNavigationContext = require("./components/VerticalNavigation/VerticalNavigationContext.cjs");
|
|
235
235
|
const Slider_styles = require("./components/Slider/Slider.styles.cjs");
|
|
@@ -571,21 +571,21 @@ exports.calendarClasses = Calendar_styles.staticClasses;
|
|
|
571
571
|
exports.HvCalendar = Calendar.HvCalendar;
|
|
572
572
|
exports.calendarHeaderClasses = CalendarHeader_styles.staticClasses;
|
|
573
573
|
exports.HvCalendarHeader = CalendarHeader.HvCalendarHeader;
|
|
574
|
-
exports.verticalNavigationClasses =
|
|
574
|
+
exports.verticalNavigationClasses = VerticalNavigation_styles.staticClasses;
|
|
575
575
|
exports.HvVerticalNavigation = VerticalNavigation.HvVerticalNavigation;
|
|
576
|
-
exports.verticalNavigationHeaderClasses =
|
|
576
|
+
exports.verticalNavigationHeaderClasses = Header_styles$2.staticClasses;
|
|
577
577
|
exports.HvVerticalNavigationHeader = Header$2.HvVerticalNavigationHeader;
|
|
578
|
-
exports.
|
|
579
|
-
exports.actionsClasses = actionsClasses.default;
|
|
578
|
+
exports.actionsClasses = Actions_styles$2.staticClasses;
|
|
580
579
|
exports.HvVerticalNavigationActions = Actions$2.HvVerticalNavigationActions;
|
|
580
|
+
exports.actionClasses = Action_styles$1.staticClasses;
|
|
581
581
|
exports.HvVerticalNavigationAction = Action$1.HvVerticalNavigationAction;
|
|
582
|
-
exports.verticalNavigationTreeClasses =
|
|
582
|
+
exports.verticalNavigationTreeClasses = Navigation_styles$1.staticClasses;
|
|
583
583
|
exports.HvVerticalNavigationTree = Navigation$1.HvVerticalNavigationTree;
|
|
584
|
-
exports.verticalNavigationSliderClasses =
|
|
584
|
+
exports.verticalNavigationSliderClasses = NavigationSlider_styles.staticClasses;
|
|
585
585
|
exports.HvVerticalNavigationSlider = NavigationSlider.HvVerticalNavigationSlider;
|
|
586
|
-
exports.treeViewClasses =
|
|
587
|
-
exports.treeViewItemClasses = treeViewItemClasses.default;
|
|
586
|
+
exports.treeViewClasses = TreeView_styles.staticClasses;
|
|
588
587
|
exports.HvVerticalNavigationTreeView = TreeView.HvVerticalNavigationTreeView;
|
|
588
|
+
exports.treeViewItemClasses = TreeViewItem_styles.staticClasses;
|
|
589
589
|
exports.HvVerticalNavigationTreeViewItem = TreeViewItem.HvVerticalNavigationTreeViewItem;
|
|
590
590
|
exports.VerticalNavigationContext = VerticalNavigationContext.VerticalNavigationContext;
|
|
591
591
|
exports.sliderClasses = Slider_styles.staticClasses;
|
|
@@ -27,7 +27,6 @@ const HvBadge = (props) => {
|
|
|
27
27
|
children: text
|
|
28
28
|
});
|
|
29
29
|
return /* @__PURE__ */ jsxs("div", {
|
|
30
|
-
"aria-label": renderedCountOrLabel == null ? void 0 : renderedCountOrLabel.toString(),
|
|
31
30
|
className: cx(classes.root, className),
|
|
32
31
|
...others,
|
|
33
32
|
children: [Component, /* @__PURE__ */ jsx("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import {\n HvTypography,\n HvTypographyVariants,\n} from \"@core/components/Typography\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./Badge.styles\";\n\nexport { staticClasses as badgeClasses };\n\nexport type HvBadgeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBadgeProps extends HvBaseProps {\n /**\n * Count is the number of unread notifications.\n * Note count and label are mutually exclusive.\n * count is ignored when label is specified at the same time.\n */\n count?: number;\n /**\n * True if count should be displayed.\n * Note showCount and label are mutually exclusive.\n * showCount is ignored when label is specified at the same time.\n */\n showCount?: boolean;\n /** The maximum number of unread notifications to be displayed */\n maxCount?: number;\n /**\n * Custom text to show in place of count.\n * Note showCount and label are mutually exclusive.\n * showCount is ignored when label is specified at the same time.\n */\n label?: string;\n /** Icon which the notification will be attached. */\n icon?: React.ReactNode;\n /** Text which the notification will be attached. */\n text?: string;\n /** Text variant. */\n textVariant?: HvTypographyVariants;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBadgeClasses;\n}\n\n/**\n * The badge is a component used to notify the user that something has occurred, in the app context.\n */\nexport const HvBadge = (props: HvBadgeProps) => {\n const {\n classes: classesProp,\n className,\n showCount = false,\n count = 0,\n maxCount = 99,\n label = null,\n icon = null,\n text = null,\n textVariant = undefined,\n ...others\n } = useDefaultProps(\"HvBadge\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const renderedCount = count > maxCount ? `${maxCount}+` : count;\n // If label is specified and non-empty, render it.\n // If showCount is specified and count > 0, render the count.\n // Otherwise, render nothing on the badge.\n // (Note count=0 should not be rendered to avoid ghosty 0.)\n const renderedCountOrLabel =\n label || (showCount && count > 0 && renderedCount) || null;\n const Component =\n icon || (text && <HvTypography variant={textVariant}>{text}</HvTypography>);\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import {\n HvTypography,\n HvTypographyVariants,\n} from \"@core/components/Typography\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./Badge.styles\";\n\nexport { staticClasses as badgeClasses };\n\nexport type HvBadgeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBadgeProps extends HvBaseProps {\n /**\n * Count is the number of unread notifications.\n * Note count and label are mutually exclusive.\n * count is ignored when label is specified at the same time.\n */\n count?: number;\n /**\n * True if count should be displayed.\n * Note showCount and label are mutually exclusive.\n * showCount is ignored when label is specified at the same time.\n */\n showCount?: boolean;\n /** The maximum number of unread notifications to be displayed */\n maxCount?: number;\n /**\n * Custom text to show in place of count.\n * Note showCount and label are mutually exclusive.\n * showCount is ignored when label is specified at the same time.\n */\n label?: string;\n /** Icon which the notification will be attached. */\n icon?: React.ReactNode;\n /** Text which the notification will be attached. */\n text?: string;\n /** Text variant. */\n textVariant?: HvTypographyVariants;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBadgeClasses;\n}\n\n/**\n * The badge is a component used to notify the user that something has occurred, in the app context.\n */\nexport const HvBadge = (props: HvBadgeProps) => {\n const {\n classes: classesProp,\n className,\n showCount = false,\n count = 0,\n maxCount = 99,\n label = null,\n icon = null,\n text = null,\n textVariant = undefined,\n ...others\n } = useDefaultProps(\"HvBadge\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const renderedCount = count > maxCount ? `${maxCount}+` : count;\n // If label is specified and non-empty, render it.\n // If showCount is specified and count > 0, render the count.\n // Otherwise, render nothing on the badge.\n // (Note count=0 should not be rendered to avoid ghosty 0.)\n const renderedCountOrLabel =\n label || (showCount && count > 0 && renderedCount) || null;\n const Component =\n icon || (text && <HvTypography variant={textVariant}>{text}</HvTypography>);\n\n return (\n <div className={cx(classes.root, className)} {...others}>\n {Component}\n <div className={Component ? classes.badgeContainer : undefined}>\n <div\n className={cx(classes.badgePosition, {\n [classes.badge]: !!(count > 0 || renderedCountOrLabel),\n [classes.showCount]: !!(!label && renderedCountOrLabel),\n [classes.showLabel]: !!label,\n [classes.badgeIcon]: !!icon,\n [classes.badgeOneDigit]: String(renderedCountOrLabel).length === 1,\n })}\n >\n {renderedCountOrLabel}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["HvBadge","props","classes","classesProp","className","showCount","count","maxCount","label","icon","text","textVariant","undefined","others","useDefaultProps","cx","useClasses","renderedCount","renderedCountOrLabel","Component","_jsx","HvTypography","variant","children","root","badgeContainer","badgePosition","badge","showLabel","badgeIcon","badgeOneDigit","String","length"],"mappings":";;;;;AAgDaA,MAAAA,UAAUA,CAACC,UAAwB;AACxC,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IACAC,YAAY;AAAA,IACZC,QAAQ;AAAA,IACRC,WAAW;AAAA,IACXC,QAAQ;AAAA,IACRC,OAAO;AAAA,IACPC,OAAO;AAAA,IACPC,cAAcC;AAAAA,IACd,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,WAAWb,KAAK;AAE9B,QAAA;AAAA,IAAEC;AAAAA,IAASa;AAAAA,EAAAA,IAAOC,WAAWb,WAAW;AAE9C,QAAMc,gBAAgBX,QAAQC,WAAY,GAAEA,cAAcD;AAK1D,QAAMY,uBACJV,SAAUH,aAAaC,QAAQ,KAAKW,iBAAkB;AACxD,QAAME,YACJV,QAASC,QAAQU,oBAACC,cAAY;AAAA,IAACC,SAASX;AAAAA,IAAYY,UAAEb;AAAAA,EAAAA,CAAmB;AAE3E,8BACE,OAAA;AAAA,IAAKN,WAAWW,GAAGb,QAAQsB,MAAMpB,SAAS;AAAA,IAAE,GAAKS;AAAAA,IAAMU,UAAA,CACpDJ,WACDC,oBAAA,OAAA;AAAA,MAAKhB,WAAWe,YAAYjB,QAAQuB,iBAAiBb;AAAAA,MAAUW,8BAC7D,OAAA;AAAA,QACEnB,WAAWW,GAAGb,QAAQwB,eAAe;AAAA,UACnC,CAACxB,QAAQyB,KAAK,GAAG,CAAC,EAAErB,QAAQ,KAAKY;AAAAA,UACjC,CAAChB,QAAQG,SAAS,GAAG,CAAC,EAAE,CAACG,SAASU;AAAAA,UAClC,CAAChB,QAAQ0B,SAAS,GAAG,CAAC,CAACpB;AAAAA,UACvB,CAACN,QAAQ2B,SAAS,GAAG,CAAC,CAACpB;AAAAA,UACvB,CAACP,QAAQ4B,aAAa,GAAGC,OAAOb,oBAAoB,EAAEc,WAAW;AAAA,QAAA,CAClE;AAAA,QAAET,UAEFL;AAAAA,MAAAA,CACE;AAAA,IAAA,CACF,CAAC;AAAA,EAAA,CACH;AAET;"}
|
|
@@ -36,6 +36,7 @@ const HvColorPicker = (props) => {
|
|
|
36
36
|
classes: classesProp,
|
|
37
37
|
value,
|
|
38
38
|
onChange,
|
|
39
|
+
onChangeComplete,
|
|
39
40
|
defaultValue = "",
|
|
40
41
|
expanded,
|
|
41
42
|
defaultExpanded = false,
|
|
@@ -74,6 +75,15 @@ const HvColorPicker = (props) => {
|
|
|
74
75
|
};
|
|
75
76
|
const handleSelect = (val) => {
|
|
76
77
|
onChange == null ? void 0 : onChange(val.hex);
|
|
78
|
+
onChangeComplete == null ? void 0 : onChangeComplete(val.hex);
|
|
79
|
+
setColor(val.hex);
|
|
80
|
+
};
|
|
81
|
+
const handleOnChange = (val) => {
|
|
82
|
+
onChange == null ? void 0 : onChange(val.hex);
|
|
83
|
+
setColor(val.hex);
|
|
84
|
+
};
|
|
85
|
+
const handleOnChangeComplete = (val) => {
|
|
86
|
+
onChangeComplete == null ? void 0 : onChangeComplete(val.hex);
|
|
77
87
|
setColor(val.hex);
|
|
78
88
|
};
|
|
79
89
|
const handleAddColor = () => {
|
|
@@ -164,7 +174,8 @@ const HvColorPicker = (props) => {
|
|
|
164
174
|
},
|
|
165
175
|
title: showLabels ? labels == null ? void 0 : labels.customColorsLabel : void 0,
|
|
166
176
|
color,
|
|
167
|
-
onChange:
|
|
177
|
+
onChange: handleOnChange,
|
|
178
|
+
onChangeComplete: handleOnChangeComplete
|
|
168
179
|
}), showSavedColors && /* @__PURE__ */ jsx(SavedColors, {
|
|
169
180
|
colors: savedColors,
|
|
170
181
|
onAddColor: handleAddColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sources":["../../../../src/components/ColorPicker/ColorPicker.tsx"],"sourcesContent":["import { Checkbox, ColorPicker } from \"@hitachivantara/uikit-react-icons\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { ColorState } from \"react-color\";\n\nimport { useControlled } from \"@core/hooks/useControlled\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useLabels } from \"@core/hooks/useLabels\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { setId } from \"@core/utils/setId\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { HvPanel } from \"@core/components/Panel\";\nimport { HvFormElement, HvInfoMessage, HvLabel } from \"@core/components/Forms\";\nimport { HvBaseDropdown } from \"@core/components/BaseDropdown\";\nimport { HvDropdownProps } from \"@core/components/Dropdown\";\n\nimport { Picker } from \"./Picker\";\nimport { staticClasses, useClasses } from \"./ColorPicker.styles\";\nimport { PresetColors } from \"./PresetColors\";\nimport { SavedColors } from \"./SavedColors\";\n\nexport { staticClasses as colorPickerClasses };\n\nexport type HvColorPickerClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvColorPickerProps {\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n /** Class names to be applied. */\n className?: string;\n /** Id to be applied to the form element root node. */\n id?: string;\n /** The form element name. */\n name?: string;\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be provided instead.\n */\n label?: React.ReactNode;\n /** Provide additional descriptive text for the form element. */\n description?: React.ReactNode;\n /** Indicates that user input is required on the form element. */\n required?: boolean;\n /** The value color, in HEX format. */\n value?: string;\n /** The default value color, in HEX format. */\n defaultValue?: string;\n /** If `true` the dropdown is disabled unable to be interacted, if `false` it is enabled. */\n disabled?: boolean;\n /** If `true` the dropdown starts opened if `false` it starts closed. */\n expanded?: boolean;\n /** When uncontrolled, defines the initial expanded state. */\n defaultExpanded?: boolean;\n /** A function to be executed whenever the color changes. */\n onChange?: (color: string) => void;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvColorPickerClasses;\n /** The placeholder value when nothing is selected. */\n placeholder?: string;\n /** Recommended colors. The colors are HEX values. */\n recommendedColors?: string[];\n /** Recommended colors position. */\n recommendedColorsPosition?: \"top\" | \"bottom\";\n /** If `true`, the labels are shown. If `false`, they are not shown. */\n showLabels?: boolean;\n /** An object containing all the labels. */\n labels?: {\n recommendedColorsLabel?: string;\n customColorsLabel?: string;\n };\n /** Icon type for the input's end adornment. */\n dropdownIcon?: \"arrow\" | \"colorPicker\";\n /** If `true`, the input only shows an icon. If `false`, the input shows text and icons. */\n iconOnly?: boolean;\n /** If `true`, the saved colors area is shown. If `false`, it is not shown. */\n showSavedColors?: boolean;\n /** If `true`, the custom colors area is shown. If `false`, it is not shown. */\n showCustomColors?: boolean;\n /** The saved colors. The colors are HEX values. */\n savedColorsValue?: string[];\n /** The default saved colors. The colors are HEX values. */\n defaultSavedColorsValue?: string[];\n /** Callback fired when a new saved color is added. */\n onSavedColorAdded?: (color?: string) => void;\n /** Callback fired when a new saved color is removed. */\n onSavedColorRemoved?: (color?: string) => void;\n /** Aria label to apply to delete saved color button. */\n deleteSavedColorButtonArialLabel?: string;\n}\n\nconst DEFAULT_LABELS: HvColorPickerProps[\"labels\"] = {\n recommendedColorsLabel: \"Recommended colors:\",\n customColorsLabel: \"Custom colors:\",\n};\n\n/**\n * 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.\n * It receives a color string in HEX format and outputs an HEX formatted color.\n */\nexport const HvColorPicker = (props: HvColorPickerProps) => {\n const {\n id,\n name,\n required = false,\n disabled = false,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n description,\n \"aria-describedby\": ariaDescribedBy,\n className,\n classes: classesProp,\n value,\n onChange,\n defaultValue = \"\",\n expanded,\n defaultExpanded = false,\n recommendedColorsPosition = \"top\",\n recommendedColors = [\n \"#95AFE8\",\n \"#E89E5D\",\n \"#83B8A6\",\n \"#70759C\",\n \"#C57E7E\",\n \"#FADA95\",\n \"#ADBFE8\",\n \"#E3B386\",\n \"#9AC6B7\",\n \"#8B90AF\",\n \"#CF9797\",\n \"#FAE1AA\",\n ],\n showLabels = true,\n labels: labelsProp,\n dropdownIcon = \"colorPicker\",\n placeholder = \"Select color...\",\n iconOnly = false,\n showSavedColors = true,\n showCustomColors = true,\n savedColorsValue,\n defaultSavedColorsValue = [],\n onSavedColorAdded,\n onSavedColorRemoved,\n deleteSavedColorButtonArialLabel = \"Delete saved color\",\n } = useDefaultProps(\"HvColorPicker\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n\n const [isOpen, setIsOpen] = useControlled(expanded, Boolean(defaultExpanded));\n const [color, setColor] = useControlled(value, defaultValue);\n const [savedColors, setSavedColors] = useControlled(\n savedColorsValue,\n defaultSavedColorsValue\n );\n const elementId = useUniqueId(id, \"hvdropdown\");\n const hasLabel = label != null;\n const hasDescription = description != null;\n\n const handleToggle: HvDropdownProps[\"onToggle\"] = (_, open) => {\n setIsOpen(open);\n };\n\n const handleSelect = (val: ColorState | { hex: string; source: string }) => {\n onChange?.(val.hex);\n setColor(val.hex);\n };\n\n const handleAddColor = () => {\n // When no color is provided, react-color sets the picker to #000000.\n // This is the color that should be added in this case.\n const colorToAdd = color || \"#000000\";\n\n onSavedColorAdded?.(colorToAdd);\n setSavedColors([...savedColors, colorToAdd]);\n };\n\n const handleRemoveColor = (val: string, position: number) => {\n if (savedColors[position] === val) {\n const sColors = [...savedColors];\n sColors.splice(position, 1);\n onSavedColorRemoved?.(val);\n setSavedColors(sColors);\n }\n };\n\n const setFocusToContent = (containerRef: HTMLElement | null) => {\n const inputs = containerRef?.getElementsByTagName(\"input\");\n if (inputs && inputs.length > 0) {\n inputs[0].focus();\n }\n };\n\n return (\n <HvFormElement\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n className={cx(classes.root, className)}\n >\n {(hasLabel || hasDescription) && (\n <div className={classes.labelContainer}>\n {hasLabel && (\n <HvLabel\n id={setId(elementId, \"label\")}\n label={label}\n className={classes.label}\n />\n )}\n\n {hasDescription && (\n <HvInfoMessage\n id={setId(elementId, \"description\")}\n className={classes.description}\n >\n {description}\n </HvInfoMessage>\n )}\n </div>\n )}\n <HvBaseDropdown\n variableWidth\n className={className}\n expanded={isOpen}\n onToggle={handleToggle}\n onContainerCreation={setFocusToContent}\n classes={{\n root: cx({ [classes.dropdownRootIconOnly]: iconOnly }),\n selection: cx(iconOnly && css({ padding: 0 })),\n }}\n adornment={\n iconOnly && color ? (\n <Checkbox\n className={classes.headerColorIconOnly}\n color={[color, \"transparent\"]}\n />\n ) : dropdownIcon === \"colorPicker\" ? (\n <ColorPicker className={classes.colorPickerIcon} />\n ) : undefined\n }\n placeholder={\n iconOnly ? undefined : color ? (\n <>\n <Checkbox\n className={classes.headerColorIcon}\n color={[color, \"transparent\"]}\n />\n <HvTypography\n className={classes.headerColorValue}\n variant={activeTheme?.colorPicker.inputValueVariant}\n >\n {color}\n </HvTypography>\n </>\n ) : (\n placeholder\n )\n }\n aria-label={ariaLabel}\n aria-labelledby={\n [label && setId(elementId, \"label\"), ariaLabelledBy]\n .join(\" \")\n .trim() || undefined\n }\n aria-describedby={\n [description && setId(elementId, \"description\"), ariaDescribedBy]\n .join(\" \")\n .trim() || undefined\n }\n >\n <HvPanel className={classes.panel}>\n <div className={classes.colorPicker}>\n {recommendedColorsPosition === \"top\" && (\n <PresetColors\n className={cx(\n (showCustomColors || showSavedColors) &&\n css({\n paddingBottom:\n activeTheme?.colorPicker.recommendedColorsBottomPadding,\n }),\n classes.recommendedColorsRoot\n )}\n colors={recommendedColors}\n onClick={handleSelect}\n title={showLabels ? labels?.recommendedColorsLabel : undefined}\n />\n )}\n {showCustomColors && (\n <Picker\n classes={{\n fields: cx({\n [classes.pickerFields]:\n recommendedColorsPosition === \"bottom\" || showSavedColors,\n }),\n }}\n title={showLabels ? labels?.customColorsLabel : undefined}\n color={color}\n onChange={handleSelect}\n />\n )}\n {showSavedColors && (\n <SavedColors\n colors={savedColors}\n onAddColor={handleAddColor}\n onClickColor={handleSelect}\n onRemoveColor={handleRemoveColor}\n deleteButtonArialLabel={deleteSavedColorButtonArialLabel}\n />\n )}\n {recommendedColorsPosition === \"bottom\" && (\n <PresetColors\n colors={recommendedColors}\n onClick={handleSelect}\n title={showLabels ? labels?.recommendedColorsLabel : undefined}\n />\n )}\n </div>\n </HvPanel>\n </HvBaseDropdown>\n </HvFormElement>\n );\n};\n"],"names":["DEFAULT_LABELS","recommendedColorsLabel","customColorsLabel","HvColorPicker","props","id","name","required","disabled","label","ariaLabel","ariaLabelledBy","description","ariaDescribedBy","className","classes","classesProp","value","onChange","defaultValue","expanded","defaultExpanded","recommendedColorsPosition","recommendedColors","showLabels","labels","labelsProp","dropdownIcon","placeholder","iconOnly","showSavedColors","showCustomColors","savedColorsValue","defaultSavedColorsValue","onSavedColorAdded","onSavedColorRemoved","deleteSavedColorButtonArialLabel","useDefaultProps","css","cx","useClasses","activeTheme","useTheme","useLabels","isOpen","setIsOpen","useControlled","Boolean","color","setColor","savedColors","setSavedColors","elementId","useUniqueId","hasLabel","hasDescription","handleToggle","_","open","handleSelect","val","hex","handleAddColor","colorToAdd","handleRemoveColor","position","sColors","splice","setFocusToContent","containerRef","inputs","getElementsByTagName","length","focus","HvFormElement","root","children","labelContainer","_jsx","HvLabel","setId","HvInfoMessage","HvBaseDropdown","variableWidth","onToggle","onContainerCreation","dropdownRootIconOnly","selection","padding","adornment","Checkbox","headerColorIconOnly","ColorPicker","colorPickerIcon","undefined","_Fragment","headerColorIcon","HvTypography","headerColorValue","variant","colorPicker","inputValueVariant","join","trim","HvPanel","panel","PresetColors","paddingBottom","recommendedColorsBottomPadding","recommendedColorsRoot","colors","onClick","title","Picker","fields","pickerFields","SavedColors","onAddColor","onClickColor","onRemoveColor","deleteButtonArialLabel"],"mappings":";;;;;;;;;;;;;;;;;;;AA8FA,MAAMA,iBAA+C;AAAA,EACnDC,wBAAwB;AAAA,EACxBC,mBAAmB;AACrB;AAMaC,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC,WAAW;AAAA,IACXC,WAAW;AAAA,IACXC;AAAAA,IACA,cAAcC;AAAAA,IACd,mBAAmBC;AAAAA,IACnBC;AAAAA,IACA,oBAAoBC;AAAAA,IACpBC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC,eAAe;AAAA,IACfC;AAAAA,IACAC,kBAAkB;AAAA,IAClBC,4BAA4B;AAAA,IAC5BC,oBAAoB,CAClB,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,SAAS;AAAA,IAEXC,aAAa;AAAA,IACbC,QAAQC;AAAAA,IACRC,eAAe;AAAA,IACfC,cAAc;AAAA,IACdC,WAAW;AAAA,IACXC,kBAAkB;AAAA,IAClBC,mBAAmB;AAAA,IACnBC;AAAAA,IACAC,0BAA0B,CAAE;AAAA,IAC5BC;AAAAA,IACAC;AAAAA,IACAC,mCAAmC;AAAA,EAAA,IACjCC,gBAAgB,iBAAiBjC,KAAK;AAEpC,QAAA;AAAA,IAAEW;AAAAA,IAASuB;AAAAA,IAAKC;AAAAA,EAAAA,IAAOC,WAAWxB,WAAW;AAC7C,QAAA;AAAA,IAAEyB;AAAAA,MAAgBC,SAAS;AAE3BjB,QAAAA,SAASkB,UAAU3C,gBAAgB0B,UAAU;AAE7C,QAAA,CAACkB,QAAQC,SAAS,IAAI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AAAA,IAAA,CACK,CAAC;AAAA,EAAA,CACJ;AAEnB;"}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sources":["../../../../src/components/ColorPicker/ColorPicker.tsx"],"sourcesContent":["import { Checkbox, ColorPicker } from \"@hitachivantara/uikit-react-icons\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { ColorState } from \"react-color\";\n\nimport { useControlled } from \"@core/hooks/useControlled\";\nimport { useUniqueId } from \"@core/hooks/useUniqueId\";\nimport { useLabels } from \"@core/hooks/useLabels\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { setId } from \"@core/utils/setId\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { HvPanel } from \"@core/components/Panel\";\nimport { HvFormElement, HvInfoMessage, HvLabel } from \"@core/components/Forms\";\nimport { HvBaseDropdown } from \"@core/components/BaseDropdown\";\nimport { HvDropdownProps } from \"@core/components/Dropdown\";\n\nimport { Picker } from \"./Picker\";\nimport { staticClasses, useClasses } from \"./ColorPicker.styles\";\nimport { PresetColors } from \"./PresetColors\";\nimport { SavedColors } from \"./SavedColors\";\n\nexport { staticClasses as colorPickerClasses };\n\nexport type HvColorPickerClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvColorPickerProps {\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n /** Class names to be applied. */\n className?: string;\n /** Id to be applied to the form element root node. */\n id?: string;\n /** The form element name. */\n name?: string;\n /**\n * The label of the form element.\n *\n * The form element must be labeled for accessibility reasons.\n * If not provided, an aria-label or aria-labelledby must be provided instead.\n */\n label?: React.ReactNode;\n /** Provide additional descriptive text for the form element. */\n description?: React.ReactNode;\n /** Indicates that user input is required on the form element. */\n required?: boolean;\n /** The value color, in HEX format. */\n value?: string;\n /** The default value color, in HEX format. */\n defaultValue?: string;\n /** If `true` the dropdown is disabled unable to be interacted, if `false` it is enabled. */\n disabled?: boolean;\n /** If `true` the dropdown starts opened if `false` it starts closed. */\n expanded?: boolean;\n /** When uncontrolled, defines the initial expanded state. */\n defaultExpanded?: boolean;\n /** A function to be executed whenever the color changes. */\n onChange?: (color: string) => void;\n /** A function to be executed whenever the color change is complete. */\n onChangeComplete?: (color: string) => void;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvColorPickerClasses;\n /** The placeholder value when nothing is selected. */\n placeholder?: string;\n /** Recommended colors. The colors are HEX values. */\n recommendedColors?: string[];\n /** Recommended colors position. */\n recommendedColorsPosition?: \"top\" | \"bottom\";\n /** If `true`, the labels are shown. If `false`, they are not shown. */\n showLabels?: boolean;\n /** An object containing all the labels. */\n labels?: {\n recommendedColorsLabel?: string;\n customColorsLabel?: string;\n };\n /** Icon type for the input's end adornment. */\n dropdownIcon?: \"arrow\" | \"colorPicker\";\n /** If `true`, the input only shows an icon. If `false`, the input shows text and icons. */\n iconOnly?: boolean;\n /** If `true`, the saved colors area is shown. If `false`, it is not shown. */\n showSavedColors?: boolean;\n /** If `true`, the custom colors area is shown. If `false`, it is not shown. */\n showCustomColors?: boolean;\n /** The saved colors. The colors are HEX values. */\n savedColorsValue?: string[];\n /** The default saved colors. The colors are HEX values. */\n defaultSavedColorsValue?: string[];\n /** Callback fired when a new saved color is added. */\n onSavedColorAdded?: (color?: string) => void;\n /** Callback fired when a new saved color is removed. */\n onSavedColorRemoved?: (color?: string) => void;\n /** Aria label to apply to delete saved color button. */\n deleteSavedColorButtonArialLabel?: string;\n}\n\nconst DEFAULT_LABELS: HvColorPickerProps[\"labels\"] = {\n recommendedColorsLabel: \"Recommended colors:\",\n customColorsLabel: \"Custom colors:\",\n};\n\n/**\n * 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.\n * It receives a color string in HEX format and outputs an HEX formatted color.\n */\nexport const HvColorPicker = (props: HvColorPickerProps) => {\n const {\n id,\n name,\n required = false,\n disabled = false,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n description,\n \"aria-describedby\": ariaDescribedBy,\n className,\n classes: classesProp,\n value,\n onChange,\n onChangeComplete,\n defaultValue = \"\",\n expanded,\n defaultExpanded = false,\n recommendedColorsPosition = \"top\",\n recommendedColors = [\n \"#95AFE8\",\n \"#E89E5D\",\n \"#83B8A6\",\n \"#70759C\",\n \"#C57E7E\",\n \"#FADA95\",\n \"#ADBFE8\",\n \"#E3B386\",\n \"#9AC6B7\",\n \"#8B90AF\",\n \"#CF9797\",\n \"#FAE1AA\",\n ],\n showLabels = true,\n labels: labelsProp,\n dropdownIcon = \"colorPicker\",\n placeholder = \"Select color...\",\n iconOnly = false,\n showSavedColors = true,\n showCustomColors = true,\n savedColorsValue,\n defaultSavedColorsValue = [],\n onSavedColorAdded,\n onSavedColorRemoved,\n deleteSavedColorButtonArialLabel = \"Delete saved color\",\n } = useDefaultProps(\"HvColorPicker\", props);\n\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n\n const [isOpen, setIsOpen] = useControlled(expanded, Boolean(defaultExpanded));\n const [color, setColor] = useControlled(value, defaultValue);\n const [savedColors, setSavedColors] = useControlled(\n savedColorsValue,\n defaultSavedColorsValue\n );\n const elementId = useUniqueId(id, \"hvdropdown\");\n const hasLabel = label != null;\n const hasDescription = description != null;\n\n const handleToggle: HvDropdownProps[\"onToggle\"] = (_, open) => {\n setIsOpen(open);\n };\n\n const handleSelect = (val: ColorState | { hex: string; source: string }) => {\n onChange?.(val.hex);\n onChangeComplete?.(val.hex);\n setColor(val.hex);\n };\n\n const handleOnChange = (\n val: ColorState | { hex: string; source: string }\n ) => {\n onChange?.(val.hex);\n setColor(val.hex);\n };\n\n const handleOnChangeComplete = (\n val: ColorState | { hex: string; source: string }\n ) => {\n onChangeComplete?.(val.hex);\n setColor(val.hex);\n };\n\n const handleAddColor = () => {\n // When no color is provided, react-color sets the picker to #000000.\n // This is the color that should be added in this case.\n const colorToAdd = color || \"#000000\";\n\n onSavedColorAdded?.(colorToAdd);\n setSavedColors([...savedColors, colorToAdd]);\n };\n\n const handleRemoveColor = (val: string, position: number) => {\n if (savedColors[position] === val) {\n const sColors = [...savedColors];\n sColors.splice(position, 1);\n onSavedColorRemoved?.(val);\n setSavedColors(sColors);\n }\n };\n\n const setFocusToContent = (containerRef: HTMLElement | null) => {\n const inputs = containerRef?.getElementsByTagName(\"input\");\n if (inputs && inputs.length > 0) {\n inputs[0].focus();\n }\n };\n\n return (\n <HvFormElement\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n className={cx(classes.root, className)}\n >\n {(hasLabel || hasDescription) && (\n <div className={classes.labelContainer}>\n {hasLabel && (\n <HvLabel\n id={setId(elementId, \"label\")}\n label={label}\n className={classes.label}\n />\n )}\n\n {hasDescription && (\n <HvInfoMessage\n id={setId(elementId, \"description\")}\n className={classes.description}\n >\n {description}\n </HvInfoMessage>\n )}\n </div>\n )}\n <HvBaseDropdown\n variableWidth\n className={className}\n expanded={isOpen}\n onToggle={handleToggle}\n onContainerCreation={setFocusToContent}\n classes={{\n root: cx({ [classes.dropdownRootIconOnly]: iconOnly }),\n selection: cx(iconOnly && css({ padding: 0 })),\n }}\n adornment={\n iconOnly && color ? (\n <Checkbox\n className={classes.headerColorIconOnly}\n color={[color, \"transparent\"]}\n />\n ) : dropdownIcon === \"colorPicker\" ? (\n <ColorPicker className={classes.colorPickerIcon} />\n ) : undefined\n }\n placeholder={\n iconOnly ? undefined : color ? (\n <>\n <Checkbox\n className={classes.headerColorIcon}\n color={[color, \"transparent\"]}\n />\n <HvTypography\n className={classes.headerColorValue}\n variant={activeTheme?.colorPicker.inputValueVariant}\n >\n {color}\n </HvTypography>\n </>\n ) : (\n placeholder\n )\n }\n aria-label={ariaLabel}\n aria-labelledby={\n [label && setId(elementId, \"label\"), ariaLabelledBy]\n .join(\" \")\n .trim() || undefined\n }\n aria-describedby={\n [description && setId(elementId, \"description\"), ariaDescribedBy]\n .join(\" \")\n .trim() || undefined\n }\n >\n <HvPanel className={classes.panel}>\n <div className={classes.colorPicker}>\n {recommendedColorsPosition === \"top\" && (\n <PresetColors\n className={cx(\n (showCustomColors || showSavedColors) &&\n css({\n paddingBottom:\n activeTheme?.colorPicker.recommendedColorsBottomPadding,\n }),\n classes.recommendedColorsRoot\n )}\n colors={recommendedColors}\n onClick={handleSelect}\n title={showLabels ? labels?.recommendedColorsLabel : undefined}\n />\n )}\n {showCustomColors && (\n <Picker\n classes={{\n fields: cx({\n [classes.pickerFields]:\n recommendedColorsPosition === \"bottom\" || showSavedColors,\n }),\n }}\n title={showLabels ? labels?.customColorsLabel : undefined}\n color={color}\n onChange={handleOnChange}\n onChangeComplete={handleOnChangeComplete}\n />\n )}\n {showSavedColors && (\n <SavedColors\n colors={savedColors}\n onAddColor={handleAddColor}\n onClickColor={handleSelect}\n onRemoveColor={handleRemoveColor}\n deleteButtonArialLabel={deleteSavedColorButtonArialLabel}\n />\n )}\n {recommendedColorsPosition === \"bottom\" && (\n <PresetColors\n colors={recommendedColors}\n onClick={handleSelect}\n title={showLabels ? labels?.recommendedColorsLabel : undefined}\n />\n )}\n </div>\n </HvPanel>\n </HvBaseDropdown>\n </HvFormElement>\n );\n};\n"],"names":["DEFAULT_LABELS","recommendedColorsLabel","customColorsLabel","HvColorPicker","props","id","name","required","disabled","label","ariaLabel","ariaLabelledBy","description","ariaDescribedBy","className","classes","classesProp","value","onChange","onChangeComplete","defaultValue","expanded","defaultExpanded","recommendedColorsPosition","recommendedColors","showLabels","labels","labelsProp","dropdownIcon","placeholder","iconOnly","showSavedColors","showCustomColors","savedColorsValue","defaultSavedColorsValue","onSavedColorAdded","onSavedColorRemoved","deleteSavedColorButtonArialLabel","useDefaultProps","css","cx","useClasses","activeTheme","useTheme","useLabels","isOpen","setIsOpen","useControlled","Boolean","color","setColor","savedColors","setSavedColors","elementId","useUniqueId","hasLabel","hasDescription","handleToggle","_","open","handleSelect","val","hex","handleOnChange","handleOnChangeComplete","handleAddColor","colorToAdd","handleRemoveColor","position","sColors","splice","setFocusToContent","containerRef","inputs","getElementsByTagName","length","focus","HvFormElement","root","children","labelContainer","_jsx","HvLabel","setId","HvInfoMessage","HvBaseDropdown","variableWidth","onToggle","onContainerCreation","dropdownRootIconOnly","selection","padding","adornment","Checkbox","headerColorIconOnly","ColorPicker","colorPickerIcon","undefined","_Fragment","headerColorIcon","HvTypography","headerColorValue","variant","colorPicker","inputValueVariant","join","trim","HvPanel","panel","PresetColors","paddingBottom","recommendedColorsBottomPadding","recommendedColorsRoot","colors","onClick","title","Picker","fields","pickerFields","SavedColors","onAddColor","onClickColor","onRemoveColor","deleteButtonArialLabel"],"mappings":";;;;;;;;;;;;;;;;;;;AAgGA,MAAMA,iBAA+C;AAAA,EACnDC,wBAAwB;AAAA,EACxBC,mBAAmB;AACrB;AAMaC,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC,WAAW;AAAA,IACXC,WAAW;AAAA,IACXC;AAAAA,IACA,cAAcC;AAAAA,IACd,mBAAmBC;AAAAA,IACnBC;AAAAA,IACA,oBAAoBC;AAAAA,IACpBC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,eAAe;AAAA,IACfC;AAAAA,IACAC,kBAAkB;AAAA,IAClBC,4BAA4B;AAAA,IAC5BC,oBAAoB,CAClB,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,SAAS;AAAA,IAEXC,aAAa;AAAA,IACbC,QAAQC;AAAAA,IACRC,eAAe;AAAA,IACfC,cAAc;AAAA,IACdC,WAAW;AAAA,IACXC,kBAAkB;AAAA,IAClBC,mBAAmB;AAAA,IACnBC;AAAAA,IACAC,0BAA0B,CAAE;AAAA,IAC5BC;AAAAA,IACAC;AAAAA,IACAC,mCAAmC;AAAA,EAAA,IACjCC,gBAAgB,iBAAiBlC,KAAK;AAEp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AA,YACAoF,OAAO1F,aAAaC,iCAAQxB,oBAAoB+F;AAAAA,YAChDhD;AAAAA,YACA/B,UAAU6C;AAAAA,YACV5C,kBAAkB6C;AAAAA,UAAAA,CACnB,GAEFjC,mBACCkD,oBAACsC,aAAW;AAAA,YACVN,QAAQ9D;AAAAA,YACRqE,YAAYvD;AAAAA,YACZwD,cAAc7D;AAAAA,YACd8D,eAAevD;AAAAA,YACfwD,wBAAwBtF;AAAAA,UACzB,CAAA,GAEFd,8BAA8B,gCAC5BsF,cAAY;AAAA,YACXI,QAAQzF;AAAAA,YACR0F,SAAStD;AAAAA,YACTuD,OAAO1F,aAAaC,iCAAQzB,yBAAyBgG;AAAAA,UAAAA,CACtD,CACF;AAAA,QAAA,CACE;AAAA,MAAA,CACE;AAAA,IAAA,CACK,CAAC;AAAA,EAAA,CACJ;AAEnB;"}
|
|
@@ -28,11 +28,7 @@ const {
|
|
|
28
28
|
textContainer: {
|
|
29
29
|
background: "transparent",
|
|
30
30
|
maxWidth: "510px",
|
|
31
|
-
overflow: "hidden"
|
|
32
|
-
"& a": {
|
|
33
|
-
color: theme.colors.primary,
|
|
34
|
-
textDecoration: "none"
|
|
35
|
-
}
|
|
31
|
+
overflow: "hidden"
|
|
36
32
|
},
|
|
37
33
|
messageContainer: {},
|
|
38
34
|
actionContainer: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.styles.js","sources":["../../../../src/components/EmptyState/EmptyState.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvEmptyState\", {\n root: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n container: { display: \"flex\", flexDirection: \"row\" },\n containerMessageOnly: {\n alignItems: \"center\",\n \"& $textContainer\": {\n marginLeft: 0,\n },\n },\n iconContainer: {},\n titleContainer: {\n marginTop: theme.emptyState.titleMarginTop,\n marginBottom: theme.space.sm,\n },\n textContainer: {\n background: \"transparent\",\n maxWidth: \"510px\",\n overflow: \"hidden\",\n
|
|
1
|
+
{"version":3,"file":"EmptyState.styles.js","sources":["../../../../src/components/EmptyState/EmptyState.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvEmptyState\", {\n root: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n container: { display: \"flex\", flexDirection: \"row\" },\n containerMessageOnly: {\n alignItems: \"center\",\n \"& $textContainer\": {\n marginLeft: 0,\n },\n },\n iconContainer: {},\n titleContainer: {\n marginTop: theme.emptyState.titleMarginTop,\n marginBottom: theme.space.sm,\n },\n textContainer: {\n background: \"transparent\",\n maxWidth: \"510px\",\n overflow: \"hidden\",\n },\n messageContainer: {},\n actionContainer: { marginTop: theme.space.sm },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","width","height","display","justifyContent","container","flexDirection","containerMessageOnly","alignItems","marginLeft","iconContainer","titleContainer","marginTop","theme","emptyState","titleMarginTop","marginBottom","space","sm","textContainer","background","maxWidth","overflow","messageContainer","actionContainer"],"mappings":";;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IACJC,OAAO;AAAA,IACPC,QAAQ;AAAA,IACRC,SAAS;AAAA,IACTC,gBAAgB;AAAA,EAClB;AAAA,EACAC,WAAW;AAAA,IAAEF,SAAS;AAAA,IAAQG,eAAe;AAAA,EAAM;AAAA,EACnDC,sBAAsB;AAAA,IACpBC,YAAY;AAAA,IACZ,oBAAoB;AAAA,MAClBC,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACAC,eAAe,CAAC;AAAA,EAChBC,gBAAgB;AAAA,IACdC,WAAWC,MAAMC,WAAWC;AAAAA,IAC5BC,cAAcH,MAAMI,MAAMC;AAAAA,EAC5B;AAAA,EACAC,eAAe;AAAA,IACbC,YAAY;AAAA,IACZC,UAAU;AAAA,IACVC,UAAU;AAAA,EACZ;AAAA,EACAC,kBAAkB,CAAC;AAAA,EACnBC,iBAAiB;AAAA,IAAEZ,WAAWC,MAAMI,MAAMC;AAAAA,EAAG;AAC/C,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningText.js","sources":["../../../../../src/components/Forms/WarningText/WarningText.tsx"],"sourcesContent":["import { useContext } from \"react\";\n\nimport isNil from \"lodash/isNil\";\n\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { setId } from \"@core/utils/setId\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { HvTypography } from \"@core/components/Typography\";\n\nimport { staticClasses, useClasses } from \"./WarningText.styles\";\nimport { HvFormElementContext } from \"../FormElement\";\n\nexport { staticClasses as warningTextClasses };\n\nexport type HvWarningTextClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvWarningTextProps extends HvBaseProps {\n /** Icon to be rendered alongside the warning text. */\n adornment?: React.ReactNode;\n /** If `true` the text is not rendered. */\n isVisible?: boolean;\n /** If `true` the text is disabled. */\n disabled?: boolean;\n /** If `true` the text won't include a gutter. */\n disableGutter?: boolean;\n /** If `true` the text won't include the top border. */\n disableBorder?: boolean;\n /** If `true` the adornment icon isn't shown. */\n disableAdornment?: boolean;\n /** If `true` the text isn't shown. */\n hideText?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvWarningTextClasses;\n}\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nexport const HvWarningText = (props: HvWarningTextProps) => {\n const {\n children,\n adornment,\n isVisible,\n classes: classesProp,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = useDefaultProps(\"HvWarningText\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const { elementId, elementStatus, elementDisabled } =\n useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible)\n ? isVisible\n : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || (\n <Fail className={classes.defaultIcon} semantic=\"negative\" />\n );\n\n return (\n <div\n className={cx(\n classes.root,\n {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n },\n className\n )}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={cx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n role=\"status\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n"],"names":["HvWarningText","props","children","adornment","isVisible","classes","classesProp","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","useDefaultProps","cx","useClasses","elementId","elementStatus","elementDisabled","useContext","HvFormElementContext","localDisabled","localVisible","isNil","localId","setId","showWarning","content","localAdornment","_jsx","Fail","defaultIcon","semantic","root","show","topBorder","HvTypography","warningText","topGutter","role"],"mappings":";;;;;;;;;;AAyCaA,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,gBAAgB;AAAA,IAChBC,gBAAgB;AAAA,IAChBC,mBAAmB;AAAA,IACnBC,WAAW;AAAA,IACX,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,iBAAiBd,KAAK;AAEpC,QAAA;AAAA,IAAEI;AAAAA,IAASW;AAAAA,EAAAA,IAAOC,WAAWX,WAAW;AAExC,QAAA;AAAA,IAAEY;AAAAA,IAAWC;AAAAA,IAAeC;AAAAA,EAAAA,IAChCC,WAAWC,oBAAoB;AACjC,QAAMC,gBAAgBd,YAAYW;AAClC,QAAMI,eAAe,CAACC,MAAMrB,SAAS,IACjCA,YACAe,kBAAkB;AACtB,QAAMO,UAAUlB,MAAMmB,MAAMT,WAAW,OAAO;AACxCU,QAAAA,cAAcJ,gBAAgB,CAACD;AAC/BM,QAAAA,UAAUD,cAAc1B,WAAW;AACnC4B,QAAAA,iBAAiB3B,aACrB4B,oBAACC,MAAI;AAAA,IAACzB,WAAWF,QAAQ4B;AAAAA,IAAaC,UAAS;AAAA,EAAA,CAAY;AAG7D,8BACE,OAAA;AAAA,IACE3B,WAAWS,GACTX,QAAQ8B,MACR;AAAA,MACE,CAAC9B,QAAQ+B,IAAI,GAAGR;AAAAA,MAChB,CAACvB,QAAQgC,SAAS,GAAG,CAAC1B;AAAAA,OAExBJ,SACF;AAAA,IAAEL,UAAA,CAED,CAACU,oBAAoBkB,oCACrBQ,cAAY;AAAA,MACX9B,IAAIkB;AAAAA,MACJnB,WAAWS,GAAGX,QAAQkC,aAAa;AAAA,QACjC,CAAClC,QAAQmC,SAAS,GAAG,CAAC9B;AAAAA,QACtB,CAACL,QAAQQ,QAAQ,GAAGA;AAAAA,MAAAA,CACrB;AAAA,MACD4B,MAAK;AAAA,MACL,iBAAc;AAAA,MAAgB,GAC1B3B;AAAAA,MAAMZ,UAET0B,eAAeC;AAAAA,IAAAA,CACJ,CAAC;AAAA,EAAA,CACZ;AAET;"}
|
|
1
|
+
{"version":3,"file":"WarningText.js","sources":["../../../../../src/components/Forms/WarningText/WarningText.tsx"],"sourcesContent":["import { useContext } from \"react\";\n\nimport isNil from \"lodash/isNil\";\n\nimport { Fail } from \"@hitachivantara/uikit-react-icons\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { setId } from \"@core/utils/setId\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { HvTypography } from \"@core/components/Typography\";\n\nimport { staticClasses, useClasses } from \"./WarningText.styles\";\nimport { HvFormElementContext } from \"../FormElement\";\n\nexport { staticClasses as warningTextClasses };\n\nexport type HvWarningTextClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvWarningTextProps extends HvBaseProps {\n /** Icon to be rendered alongside the warning text. */\n adornment?: React.ReactNode;\n /** If `true` the text is not rendered. */\n isVisible?: boolean;\n /** If `true` the text is disabled. */\n disabled?: boolean;\n /** If `true` the text won't include a gutter. */\n disableGutter?: boolean;\n /** If `true` the text won't include the top border. */\n disableBorder?: boolean;\n /** If `true` the adornment icon isn't shown. */\n disableAdornment?: boolean;\n /** If `true` the text isn't shown. */\n hideText?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvWarningTextClasses;\n}\n\n/**\n * Provides the user with a descriptive text, signaling an error, for when the form element is in an invalid state.\n */\nexport const HvWarningText = (props: HvWarningTextProps) => {\n const {\n children,\n adornment,\n isVisible,\n classes: classesProp,\n className,\n id,\n disabled,\n disableGutter = false,\n disableBorder = false,\n disableAdornment = false,\n hideText = false,\n ...others\n } = useDefaultProps(\"HvWarningText\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const { elementId, elementStatus, elementDisabled } =\n useContext(HvFormElementContext);\n const localDisabled = disabled || elementDisabled;\n const localVisible = !isNil(isVisible)\n ? isVisible\n : elementStatus === \"invalid\";\n const localId = id ?? setId(elementId, \"error\");\n const showWarning = localVisible && !localDisabled;\n const content = showWarning ? children : \"\";\n const localAdornment = adornment || (\n <Fail className={classes.defaultIcon} semantic=\"negative\" />\n );\n\n return (\n <div\n className={cx(\n classes.root,\n {\n [classes.show]: showWarning,\n [classes.topBorder]: !disableBorder,\n },\n className\n )}\n >\n {!disableAdornment && localAdornment}\n <HvTypography\n id={localId}\n className={cx(classes.warningText, {\n [classes.topGutter]: !disableGutter,\n [classes.hideText]: hideText,\n })}\n role=\"status\"\n aria-live=\"polite\"\n aria-relevant=\"additions text\"\n {...others}\n >\n {showWarning && content}\n </HvTypography>\n </div>\n );\n};\n"],"names":["HvWarningText","props","children","adornment","isVisible","classes","classesProp","className","id","disabled","disableGutter","disableBorder","disableAdornment","hideText","others","useDefaultProps","cx","useClasses","elementId","elementStatus","elementDisabled","useContext","HvFormElementContext","localDisabled","localVisible","isNil","localId","setId","showWarning","content","localAdornment","_jsx","Fail","defaultIcon","semantic","root","show","topBorder","HvTypography","warningText","topGutter","role"],"mappings":";;;;;;;;;;AAyCaA,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,gBAAgB;AAAA,IAChBC,gBAAgB;AAAA,IAChBC,mBAAmB;AAAA,IACnBC,WAAW;AAAA,IACX,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,iBAAiBd,KAAK;AAEpC,QAAA;AAAA,IAAEI;AAAAA,IAASW;AAAAA,EAAAA,IAAOC,WAAWX,WAAW;AAExC,QAAA;AAAA,IAAEY;AAAAA,IAAWC;AAAAA,IAAeC;AAAAA,EAAAA,IAChCC,WAAWC,oBAAoB;AACjC,QAAMC,gBAAgBd,YAAYW;AAClC,QAAMI,eAAe,CAACC,MAAMrB,SAAS,IACjCA,YACAe,kBAAkB;AACtB,QAAMO,UAAUlB,MAAMmB,MAAMT,WAAW,OAAO;AACxCU,QAAAA,cAAcJ,gBAAgB,CAACD;AAC/BM,QAAAA,UAAUD,cAAc1B,WAAW;AACnC4B,QAAAA,iBAAiB3B,aACrB4B,oBAACC,MAAI;AAAA,IAACzB,WAAWF,QAAQ4B;AAAAA,IAAaC,UAAS;AAAA,EAAA,CAAY;AAG7D,8BACE,OAAA;AAAA,IACE3B,WAAWS,GACTX,QAAQ8B,MACR;AAAA,MACE,CAAC9B,QAAQ+B,IAAI,GAAGR;AAAAA,MAChB,CAACvB,QAAQgC,SAAS,GAAG,CAAC1B;AAAAA,OAExBJ,SACF;AAAA,IAAEL,UAAA,CAED,CAACU,oBAAoBkB,oCACrBQ,cAAY;AAAA,MACX9B,IAAIkB;AAAAA,MACJnB,WAAWS,GAAGX,QAAQkC,aAAa;AAAA,QACjC,CAAClC,QAAQmC,SAAS,GAAG,CAAC9B;AAAAA,QACtB,CAACL,QAAQQ,QAAQ,GAAGA;AAAAA,MAAAA,CACrB;AAAA,MACD4B,MAAK;AAAA,MACL,aAAU;AAAA,MACV,iBAAc;AAAA,MAAgB,GAC1B3B;AAAAA,MAAMZ,UAET0B,eAAeC;AAAAA,IAAAA,CACJ,CAAC;AAAA,EAAA,CACZ;AAET;"}
|
|
@@ -312,7 +312,7 @@ const HvTagsInput = (props) => {
|
|
|
312
312
|
gutters: classes.listItemGutters,
|
|
313
313
|
root: classes.listItemRoot
|
|
314
314
|
},
|
|
315
|
-
id: `tag-${i}
|
|
315
|
+
id: setId(elementId, `tag-${i}`),
|
|
316
316
|
children: /* @__PURE__ */ jsx(HvTag, {
|
|
317
317
|
label,
|
|
318
318
|
className: cx({
|
|
@@ -344,7 +344,7 @@ const HvTagsInput = (props) => {
|
|
|
344
344
|
root: classes.tagInputContainerRoot,
|
|
345
345
|
gutters: classes.listItemGutters
|
|
346
346
|
},
|
|
347
|
-
id: `tag-${value.length}
|
|
347
|
+
id: setId(elementId, `tag-${value.length}`),
|
|
348
348
|
children: /* @__PURE__ */ jsx(HvInput, {
|
|
349
349
|
value: tagInput,
|
|
350
350
|
disableClear: true,
|