@hitachivantara/uikit-react-core 5.91.1 → 5.91.2
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/BaseCheckBox/BaseCheckBox.cjs +7 -15
- package/dist/cjs/BaseCheckBox/BaseCheckBox.styles.cjs +7 -50
- package/dist/cjs/BaseCheckBox/CheckBoxIcon.cjs +78 -0
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +0 -4
- package/dist/cjs/BaseRadio/BaseRadio.cjs +7 -17
- package/dist/cjs/BaseRadio/BaseRadio.styles.cjs +2 -26
- package/dist/cjs/BaseRadio/RadioIcon.cjs +54 -0
- package/dist/cjs/Dropdown/Dropdown.cjs +1 -1
- package/dist/cjs/InlineEditor/InlineEditor.cjs +1 -1
- package/dist/cjs/Tag/Tag.cjs +4 -4
- package/dist/cjs/Tag/Tag.styles.cjs +1 -2
- package/dist/cjs/TagsInput/TagsInput.cjs +1 -1
- package/dist/cjs/TreeView/internals/hooks/useInstanceEventHandler.cjs +1 -1
- package/dist/esm/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.js +7 -15
- package/dist/esm/BaseCheckBox/BaseCheckBox.js.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js +7 -50
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js.map +1 -1
- package/dist/esm/BaseCheckBox/CheckBoxIcon.js +78 -0
- package/dist/esm/BaseCheckBox/CheckBoxIcon.js.map +1 -0
- package/dist/esm/BaseInput/BaseInput.styles.js +0 -4
- package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/BaseRadio/BaseRadio.js +7 -17
- package/dist/esm/BaseRadio/BaseRadio.js.map +1 -1
- package/dist/esm/BaseRadio/BaseRadio.styles.js +2 -26
- package/dist/esm/BaseRadio/BaseRadio.styles.js.map +1 -1
- package/dist/esm/BaseRadio/RadioIcon.js +54 -0
- package/dist/esm/BaseRadio/RadioIcon.js.map +1 -0
- package/dist/esm/BreadCrumb/PathElement/PathElement.js.map +1 -1
- package/dist/esm/DotPagination/DotPagination.js.map +1 -1
- package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js +1 -1
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/FileUploader/Preview/Preview.js.map +1 -1
- package/dist/esm/Focus/Focus.js.map +1 -1
- package/dist/esm/InlineEditor/InlineEditor.js +1 -1
- package/dist/esm/InlineEditor/InlineEditor.js.map +1 -1
- package/dist/esm/MultiButton/MultiButton.js.map +1 -1
- package/dist/esm/Table/renderers/DateColumnCell.js.map +1 -1
- package/dist/esm/Table/renderers/ProgressColumnCell.js.map +1 -1
- package/dist/esm/Table/renderers/SwitchColumnCell.js.map +1 -1
- package/dist/esm/Tabs/Tab/Tab.js.map +1 -1
- package/dist/esm/Tag/Tag.js +5 -5
- package/dist/esm/Tag/Tag.js.map +1 -1
- package/dist/esm/Tag/Tag.styles.js +1 -2
- package/dist/esm/Tag/Tag.styles.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.js +1 -1
- package/dist/esm/TagsInput/TagsInput.js.map +1 -1
- package/dist/esm/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/TreeView/internals/hooks/useInstanceEventHandler.js +1 -1
- package/dist/esm/TreeView/internals/hooks/useInstanceEventHandler.js.map +1 -1
- package/dist/esm/hooks/useClickOutside.js.map +1 -1
- package/dist/esm/types/generic.js.map +1 -1
- package/dist/types/index.d.ts +29 -29
- package/package.json +9 -9
- package/dist/cjs/BaseCheckBox/icons.cjs +0 -15
- package/dist/cjs/BaseRadio/icons.cjs +0 -17
- package/dist/esm/BaseCheckBox/icons.js +0 -15
- package/dist/esm/BaseCheckBox/icons.js.map +0 -1
- package/dist/esm/BaseRadio/icons.js +0 -17
- package/dist/esm/BaseRadio/icons.js.map +0 -1
|
@@ -12,27 +12,13 @@ const { staticClasses, useClasses } = createClasses("HvBaseCheckBox", {
|
|
|
12
12
|
"&:hover": {
|
|
13
13
|
backgroundColor: theme.colors.bgHover,
|
|
14
14
|
borderRadius: theme.radii.round
|
|
15
|
-
},
|
|
16
|
-
"& svg": {
|
|
17
|
-
width: 16,
|
|
18
|
-
height: 16,
|
|
19
|
-
color: theme.colors.bgContainer,
|
|
20
|
-
borderRadius: theme.radii.base,
|
|
21
|
-
border: `1px solid ${theme.colors.borderStrong}`
|
|
22
15
|
}
|
|
23
16
|
},
|
|
24
17
|
disabled: {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color: theme.colors.bgDisabled,
|
|
30
|
-
borderColor: theme.colors.borderDisabled,
|
|
31
|
-
backgroundColor: theme.colors.bgDisabled
|
|
32
|
-
},
|
|
33
|
-
"&:hover": {
|
|
34
|
-
backgroundColor: "transparent"
|
|
35
|
-
}
|
|
18
|
+
cursor: "not-allowed",
|
|
19
|
+
pointerEvents: "initial",
|
|
20
|
+
"&:hover": {
|
|
21
|
+
backgroundColor: "transparent"
|
|
36
22
|
}
|
|
37
23
|
},
|
|
38
24
|
focusVisible: {
|
|
@@ -41,38 +27,9 @@ const { staticClasses, useClasses } = createClasses("HvBaseCheckBox", {
|
|
|
41
27
|
}
|
|
42
28
|
},
|
|
43
29
|
icon: {},
|
|
44
|
-
checked: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
backgroundColor: theme.colors.primaryStrong,
|
|
48
|
-
color: theme.colors.bgContainer
|
|
49
|
-
},
|
|
50
|
-
"&$disabled": {
|
|
51
|
-
"& svg": {
|
|
52
|
-
color: theme.colors.textDisabled,
|
|
53
|
-
borderColor: "currentcolor"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
indeterminate: {
|
|
58
|
-
"& svg": {
|
|
59
|
-
color: theme.colors.textSubtle
|
|
60
|
-
},
|
|
61
|
-
"&$disabled": {
|
|
62
|
-
"& svg": {
|
|
63
|
-
color: theme.colors.textDisabled,
|
|
64
|
-
borderColor: "currentcolor"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
semantic: {
|
|
69
|
-
"&$indeterminate": {
|
|
70
|
-
"& svg": {
|
|
71
|
-
backgroundColor: theme.colors.bgContainer,
|
|
72
|
-
border: `1px solid ${theme.colors.borderStrong}`
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
30
|
+
checked: {},
|
|
31
|
+
indeterminate: {},
|
|
32
|
+
semantic: {}
|
|
76
33
|
});
|
|
77
34
|
export {
|
|
78
35
|
staticClasses,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCheckBox.styles.js","sources":["../../../src/BaseCheckBox/BaseCheckBox.styles.ts"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseCheckBox\", {\n root: {\n padding: 0,\n width: 32,\n minWidth: 32,\n height: 32,\n borderRadius: theme.radii.base,\n cursor: \"pointer\",\n \"&:hover\": {\n backgroundColor: theme.colors.bgHover,\n borderRadius: theme.radii.round,\n },\n
|
|
1
|
+
{"version":3,"file":"BaseCheckBox.styles.js","sources":["../../../src/BaseCheckBox/BaseCheckBox.styles.ts"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseCheckBox\", {\n root: {\n padding: 0,\n width: 32,\n minWidth: 32,\n height: 32,\n borderRadius: theme.radii.base,\n cursor: \"pointer\",\n \"&:hover\": {\n backgroundColor: theme.colors.bgHover,\n borderRadius: theme.radii.round,\n },\n },\n disabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"initial\",\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n focusVisible: {\n \"& svg\": {\n ...outlineStyles,\n },\n },\n icon: {},\n checked: {},\n indeterminate: {},\n semantic: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,kBAAkB;AAAA,EAC3E,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc,MAAM,MAAM;AAAA,IAC1B,QAAQ;AAAA,IACR,WAAW;AAAA,MACT,iBAAiB,MAAM,OAAO;AAAA,MAC9B,cAAc,MAAM,MAAM;AAAA,IAAA;AAAA,EAE9B;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,WAAW;AAAA,MACT,iBAAiB;AAAA,IAAA;AAAA,EAErB;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,MACP,GAAG;AAAA,IAAA;AAAA,EAEP;AAAA,EACA,MAAM,CAAC;AAAA,EACP,SAAS,CAAC;AAAA,EACV,eAAe,CAAC;AAAA,EAChB,UAAU,CAAA;AACZ,CAAC;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { theme } from "@hitachivantara/uikit-styles";
|
|
5
|
+
const { useClasses } = createClasses("HvCheckBoxIcon", {
|
|
6
|
+
root: {
|
|
7
|
+
display: "inline-flex",
|
|
8
|
+
fill: "currentcolor",
|
|
9
|
+
width: "1em",
|
|
10
|
+
height: "1em",
|
|
11
|
+
flexShrink: 0,
|
|
12
|
+
fontSize: 16,
|
|
13
|
+
color: theme.colors.bgContainer,
|
|
14
|
+
borderRadius: theme.radii.base,
|
|
15
|
+
border: `1px solid ${theme.colors.borderStrong}`
|
|
16
|
+
},
|
|
17
|
+
checked: {
|
|
18
|
+
borderColor: "transparent",
|
|
19
|
+
backgroundColor: theme.colors.primaryStrong,
|
|
20
|
+
color: theme.colors.bgContainer
|
|
21
|
+
},
|
|
22
|
+
indeterminate: {
|
|
23
|
+
color: theme.colors.textSubtle
|
|
24
|
+
},
|
|
25
|
+
semantic: {
|
|
26
|
+
"&[data-variant=indeterminate]": {
|
|
27
|
+
backgroundColor: theme.colors.bgContainer,
|
|
28
|
+
borderColor: theme.colors.borderStrong
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
color: theme.colors.bgDisabled,
|
|
33
|
+
borderColor: theme.colors.borderDisabled,
|
|
34
|
+
backgroundColor: theme.colors.bgDisabled,
|
|
35
|
+
"&[data-variant=checked],&[data-variant=indeterminate]": {
|
|
36
|
+
color: theme.colors.textDisabled,
|
|
37
|
+
borderColor: "currentcolor"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const HvCheckBoxIcon = (props) => {
|
|
42
|
+
const {
|
|
43
|
+
className,
|
|
44
|
+
classes: classesProp,
|
|
45
|
+
variant,
|
|
46
|
+
disabled,
|
|
47
|
+
semantic
|
|
48
|
+
} = useDefaultProps("HvCheckBoxIcon", props);
|
|
49
|
+
const { classes, cx } = useClasses(classesProp, false);
|
|
50
|
+
const d = useMemo(() => {
|
|
51
|
+
switch (variant) {
|
|
52
|
+
case "checked":
|
|
53
|
+
return "m5.03,12.06l-3.76,-3.75l1.42,-1.42l2.24,2.25l6.3,-7.2l1.5,1.31l-7.7,8.81z";
|
|
54
|
+
case "indeterminate":
|
|
55
|
+
return "m3,8l8,0l0,-2l-8,0l0,2z";
|
|
56
|
+
case "default":
|
|
57
|
+
default:
|
|
58
|
+
return "m0,0l16,0l0,16l-16,0l0,-16z";
|
|
59
|
+
}
|
|
60
|
+
}, [variant]);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
"svg",
|
|
63
|
+
{
|
|
64
|
+
viewBox: "0 0 14 14",
|
|
65
|
+
"data-variant": variant,
|
|
66
|
+
className: cx(classes.root, className, {
|
|
67
|
+
[classes.checked]: variant === "checked",
|
|
68
|
+
[classes.indeterminate]: variant === "indeterminate",
|
|
69
|
+
[classes.semantic]: semantic,
|
|
70
|
+
[classes.disabled]: disabled
|
|
71
|
+
}),
|
|
72
|
+
children: /* @__PURE__ */ jsx("path", { d })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
HvCheckBoxIcon
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckBoxIcon.js","sources":["../../../src/BaseCheckBox/CheckBoxIcon.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport {\n createClasses,\n ExtractNames,\n useDefaultProps,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport type { HvBaseCheckBoxProps } from \"./BaseCheckBox\";\n\nconst { useClasses } = createClasses(\"HvCheckBoxIcon\", {\n root: {\n display: \"inline-flex\",\n fill: \"currentcolor\",\n width: \"1em\",\n height: \"1em\",\n flexShrink: 0,\n\n fontSize: 16,\n color: theme.colors.bgContainer,\n borderRadius: theme.radii.base,\n border: `1px solid ${theme.colors.borderStrong}`,\n },\n checked: {\n borderColor: \"transparent\",\n backgroundColor: theme.colors.primaryStrong,\n color: theme.colors.bgContainer,\n },\n indeterminate: {\n color: theme.colors.textSubtle,\n },\n semantic: {\n \"&[data-variant=indeterminate]\": {\n backgroundColor: theme.colors.bgContainer,\n borderColor: theme.colors.borderStrong,\n },\n },\n disabled: {\n color: theme.colors.bgDisabled,\n borderColor: theme.colors.borderDisabled,\n backgroundColor: theme.colors.bgDisabled,\n \"&[data-variant=checked],&[data-variant=indeterminate]\": {\n color: theme.colors.textDisabled,\n borderColor: \"currentcolor\",\n },\n },\n});\n\nexport type HvCheckBoxIconClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCheckBoxIconProps\n extends Pick<HvBaseCheckBoxProps, \"className\" | \"disabled\" | \"semantic\"> {\n variant?: \"default\" | \"checked\" | \"indeterminate\";\n classes?: HvCheckBoxIconClasses;\n}\n\nexport const HvCheckBoxIcon = (props: HvCheckBoxIconProps) => {\n const {\n className,\n classes: classesProp,\n variant,\n disabled,\n semantic,\n } = useDefaultProps(\"HvCheckBoxIcon\", props);\n const { classes, cx } = useClasses(classesProp, false);\n\n const d = useMemo(() => {\n switch (variant) {\n case \"checked\":\n return \"m5.03,12.06l-3.76,-3.75l1.42,-1.42l2.24,2.25l6.3,-7.2l1.5,1.31l-7.7,8.81z\";\n case \"indeterminate\":\n return \"m3,8l8,0l0,-2l-8,0l0,2z\";\n case \"default\":\n default:\n return \"m0,0l16,0l0,16l-16,0l0,-16z\";\n }\n }, [variant]);\n\n return (\n <svg\n viewBox=\"0 0 14 14\"\n data-variant={variant}\n className={cx(classes.root, className, {\n [classes.checked]: variant === \"checked\",\n [classes.indeterminate]: variant === \"indeterminate\",\n [classes.semantic]: semantic,\n [classes.disabled]: disabled,\n })}\n >\n <path d={d} />\n </svg>\n );\n};\n"],"names":[],"mappings":";;;;AAUA,MAAM,EAAE,WAAA,IAAe,cAAc,kBAAkB;AAAA,EACrD,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IAEZ,UAAU;AAAA,IACV,OAAO,MAAM,OAAO;AAAA,IACpB,cAAc,MAAM,MAAM;AAAA,IAC1B,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,EAChD;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,IACb,iBAAiB,MAAM,OAAO;AAAA,IAC9B,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,UAAU;AAAA,IACR,iCAAiC;AAAA,MAC/B,iBAAiB,MAAM,OAAO;AAAA,MAC9B,aAAa,MAAM,OAAO;AAAA,IAAA;AAAA,EAE9B;AAAA,EACA,UAAU;AAAA,IACR,OAAO,MAAM,OAAO;AAAA,IACpB,aAAa,MAAM,OAAO;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,IAC9B,yDAAyD;AAAA,MACvD,OAAO,MAAM,OAAO;AAAA,MACpB,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,CAAC;AAUY,MAAA,iBAAiB,CAAC,UAA+B;AACtD,QAAA;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,gBAAgB,kBAAkB,KAAK;AAC3C,QAAM,EAAE,SAAS,GAAA,IAAO,WAAW,aAAa,KAAK;AAE/C,QAAA,IAAI,QAAQ,MAAM;AACtB,YAAQ,SAAS;AAAA,MACf,KAAK;AACI,eAAA;AAAA,MACT,KAAK;AACI,eAAA;AAAA,MACT,KAAK;AAAA,MACL;AACS,eAAA;AAAA,IAAA;AAAA,EACX,GACC,CAAC,OAAO,CAAC;AAGV,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,gBAAc;AAAA,MACd,WAAW,GAAG,QAAQ,MAAM,WAAW;AAAA,QACrC,CAAC,QAAQ,OAAO,GAAG,YAAY;AAAA,QAC/B,CAAC,QAAQ,aAAa,GAAG,YAAY;AAAA,QACrC,CAAC,QAAQ,QAAQ,GAAG;AAAA,QACpB,CAAC,QAAQ,QAAQ,GAAG;AAAA,MAAA,CACrB;AAAA,MAED,UAAA,oBAAC,UAAK,EAAM,CAAA;AAAA,IAAA;AAAA,EACd;AAEJ;"}
|
|
@@ -4,10 +4,6 @@ import { outlineStyles } from "../utils/focusUtils.js";
|
|
|
4
4
|
const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
5
5
|
root: {
|
|
6
6
|
// #region `input` style reset
|
|
7
|
-
"input:-webkit-autofill": {
|
|
8
|
-
WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.textDimmed} inset`,
|
|
9
|
-
WebkitTextFillColor: theme.colors.text
|
|
10
|
-
},
|
|
11
7
|
// Clears number input up/down arrows in Chrome and Firefox
|
|
12
8
|
"input[type=number]": {
|
|
13
9
|
MozAppearance: "textfield",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.styles.js","sources":["../../../src/BaseInput/BaseInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseInput\", {\n root: {\n // #region `input` style reset\n
|
|
1
|
+
{"version":3,"file":"BaseInput.styles.js","sources":["../../../src/BaseInput/BaseInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseInput\", {\n root: {\n // #region `input` style reset\n // Clears number input up/down arrows in Chrome and Firefox\n \"input[type=number]\": {\n MozAppearance: \"textfield\",\n \"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0,\n },\n },\n\n // Clears time input clock in Chrome\n \"input::-webkit-calendar-picker-indicator\": {\n display: \"none\",\n },\n\n // Clears search input clear button in Chrome\n \"input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration\":\n {\n display: \"none\",\n },\n // #endregion\n\n display: \"inline-flex\",\n width: \"100%\",\n position: \"relative\",\n margin: 0,\n borderRadius: theme.radii.base,\n height: \"32px\",\n borderWidth: 1,\n borderColor: theme.colors.text,\n boxSizing: \"border-box\",\n backgroundColor: theme.colors.bgContainer,\n fontFamily: theme.fontFamily.body,\n\n \":hover:not($disabled,$invalid,$readOnly)\": {\n borderColor: theme.colors.primary,\n },\n \":focus-within:not($disabled)\": {\n ...outlineStyles,\n },\n },\n disabled: {\n backgroundColor: theme.colors.bgPage,\n borderColor: theme.colors.textDisabled,\n\n cursor: \"not-allowed\",\n\n \"&&::before\": {\n borderBottomStyle: \"none\",\n },\n },\n invalid: {\n borderColor: theme.form.errorColor,\n },\n multiline: {\n padding: 0,\n overflow: \"auto\",\n height: \"auto\",\n\n \"& $input\": {\n borderRadius: theme.radii.base,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n margin: 0,\n },\n },\n resizable: { width: \"auto\" },\n readOnly: {\n borderColor: theme.colors.textDisabled,\n backgroundColor: theme.colors.bgPage,\n },\n focused: {},\n /** @deprecated unused. use `::after` instead */\n inputBorderContainer: {},\n /** @deprecated use `classes.invalid` instead */\n inputRootInvalid: {},\n /** @deprecated use `classes.readOnly` instead */\n inputRootReadOnly: {},\n /** @deprecated use `classes.root` instead */\n inputRoot: {},\n /** @deprecated unused */\n inputRootFocused: {},\n /** @deprecated use `classes.disabled` instead */\n inputRootDisabled: {},\n /** @deprecated use `classes.multiline` instead */\n inputRootMultiline: {},\n input: {\n height: \"100%\",\n marginLeft: theme.space.xs,\n marginRight: theme.space.xs,\n padding: 0,\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n width: \"initial\",\n flexGrow: 1,\n ...theme.typography.body,\n\n \"&::placeholder\": {\n opacity: 1,\n color: theme.colors.textSubtle,\n },\n },\n inputDisabled: {\n color: theme.colors.textDisabled,\n WebkitTextFillColor: theme.colors.textDisabled,\n },\n inputReadOnly: {\n color: theme.colors.textSubtle,\n },\n inputResizable: {\n resize: \"both\",\n width: \"100%\",\n },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE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AC;AAAA;AAAA,EAEV,sBAAsB,CAAC;AAAA;AAAA,EAEvB,kBAAkB,CAAC;AAAA;AAAA,EAEnB,mBAAmB,CAAC;AAAA;AAAA,EAEpB,WAAW,CAAC;AAAA;AAAA,EAEZ,kBAAkB,CAAC;AAAA;AAAA,EAEnB,mBAAmB,CAAC;AAAA;AAAA,EAEpB,oBAAoB,CAAC;AAAA,EACrB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,YAAY,MAAM,MAAM;AAAA,IACxB,aAAa,MAAM,MAAM;AAAA,IACzB,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,cAAc;AAAA,IACd,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,GAAG,MAAM,WAAW;AAAA,IAEpB,kBAAkB;AAAA,MAChB,SAAS;AAAA,MACT,OAAO,MAAM,OAAO;AAAA,IAAA;AAAA,EAExB;AAAA,EACA,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,IACpB,qBAAqB,MAAM,OAAO;AAAA,EACpC;AAAA,EACA,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,gBAAgB;AAAA,IACd,QAAQ;AAAA,IACR,OAAO;AAAA,EAAA;AAEX,CAAC;"}
|
|
@@ -4,31 +4,23 @@ import MuiRadio from "@mui/material/Radio";
|
|
|
4
4
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
5
5
|
import { useClasses } from "./BaseRadio.styles.js";
|
|
6
6
|
import { staticClasses } from "./BaseRadio.styles.js";
|
|
7
|
-
import {
|
|
8
|
-
const icons = {
|
|
9
|
-
radio: /* @__PURE__ */ jsx(Unselected, {}),
|
|
10
|
-
radioChecked: /* @__PURE__ */ jsx(Selected, {})
|
|
11
|
-
};
|
|
7
|
+
import { HvRadioIcon } from "./RadioIcon.js";
|
|
12
8
|
const HvBaseRadio = forwardRef(
|
|
13
9
|
function HvBaseRadio2(props, ref) {
|
|
14
10
|
const {
|
|
15
11
|
classes: classesProp,
|
|
16
12
|
className,
|
|
17
|
-
id,
|
|
18
|
-
name,
|
|
19
13
|
value = "on",
|
|
20
|
-
required
|
|
21
|
-
readOnly
|
|
22
|
-
disabled
|
|
14
|
+
required,
|
|
15
|
+
readOnly,
|
|
16
|
+
disabled,
|
|
23
17
|
checked,
|
|
24
18
|
defaultChecked,
|
|
25
19
|
onChange,
|
|
26
|
-
semantic
|
|
20
|
+
semantic,
|
|
27
21
|
inputProps,
|
|
28
22
|
onFocusVisible,
|
|
29
23
|
onBlur,
|
|
30
|
-
icon,
|
|
31
|
-
checkedIcon,
|
|
32
24
|
...others
|
|
33
25
|
} = useDefaultProps("HvBaseRadio", props);
|
|
34
26
|
const { classes, cx } = useClasses(classesProp);
|
|
@@ -60,8 +52,6 @@ const HvBaseRadio = forwardRef(
|
|
|
60
52
|
MuiRadio,
|
|
61
53
|
{
|
|
62
54
|
ref,
|
|
63
|
-
id,
|
|
64
|
-
name,
|
|
65
55
|
className: cx(
|
|
66
56
|
classes.root,
|
|
67
57
|
{
|
|
@@ -72,8 +62,8 @@ const HvBaseRadio = forwardRef(
|
|
|
72
62
|
},
|
|
73
63
|
className
|
|
74
64
|
),
|
|
75
|
-
icon:
|
|
76
|
-
checkedIcon:
|
|
65
|
+
icon: /* @__PURE__ */ jsx(HvRadioIcon, { disabled }),
|
|
66
|
+
checkedIcon: /* @__PURE__ */ jsx(HvRadioIcon, { checked: true, disabled }),
|
|
77
67
|
color: "default",
|
|
78
68
|
disabled,
|
|
79
69
|
required,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRadio.js","sources":["../../../src/BaseRadio/BaseRadio.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\nimport MuiRadio, { RadioProps as MuiRadioProps } from \"@mui/material/Radio\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./BaseRadio.styles\";\nimport {
|
|
1
|
+
{"version":3,"file":"BaseRadio.js","sources":["../../../src/BaseRadio/BaseRadio.tsx"],"sourcesContent":["import { forwardRef, useCallback, useState } from \"react\";\nimport MuiRadio, { RadioProps as MuiRadioProps } from \"@mui/material/Radio\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./BaseRadio.styles\";\nimport { HvRadioIcon } from \"./RadioIcon\";\n\nexport { staticClasses as baseRadioClasses };\n\nexport type HvBaseRadioClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBaseRadioProps\n extends Omit<MuiRadioProps, \"onChange\" | \"classes\"> {\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 radio button.\n */\n classes?: HvBaseRadioClasses;\n /**\n * Id to be applied to the root node.\n */\n id?: string;\n /**\n * The input name.\n */\n name?: string;\n /**\n * The value of the input.\n *\n * The default value is \"on\".\n */\n value?: any;\n /**\n * Indicates that user input is required.\n */\n required?: boolean;\n /**\n * Indicates that the input is not editable.\n */\n readOnly?: boolean;\n /**\n * Indicates that the input is disabled.\n */\n disabled?: boolean;\n /**\n * If `true` the radio button is selected, if set to `false` the radio button is not selected.\n *\n * When defined the radio button state becomes controlled.\n */\n checked?: boolean;\n /**\n * When uncontrolled, defines the initial checked state.\n */\n defaultChecked?: boolean;\n /**\n * The callback fired when the radio button is pressed.\n */\n onChange?: (\n event: React.ChangeEvent<HTMLInputElement>,\n checked: boolean,\n value: any,\n ) => void;\n /**\n * Whether the selector should use semantic colors.\n */\n semantic?: boolean;\n /**\n * Properties passed on to the input element.\n */\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible?: (event: React.FocusEvent<any>) => void;\n /**\n * @ignore\n */\n onBlur?: (event: React.FocusEvent<any>) => void;\n}\n\n/**\n * A Radio Button is a mechanism that allows user to select one or more options.\n *\n * The Base Radio Button is a building block of the Radio Button form element. Don't\n * use unless implementing a custom use case not covered by the Radio Button form element.\n */\nexport const HvBaseRadio = forwardRef<HTMLButtonElement, HvBaseRadioProps>(\n function HvBaseRadio(props, ref) {\n const {\n classes: classesProp,\n className,\n value = \"on\",\n required,\n readOnly,\n disabled,\n checked,\n defaultChecked,\n onChange,\n semantic,\n inputProps,\n onFocusVisible,\n onBlur,\n ...others\n } = useDefaultProps(\"HvBaseRadio\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const [focusVisible, setFocusVisible] = useState(false);\n\n const onFocusVisibleCallback = useCallback(\n (evt: React.FocusEvent<any>) => {\n setFocusVisible(true);\n onFocusVisible?.(evt);\n },\n [onFocusVisible],\n );\n\n const onBlurCallback = useCallback(\n (evt: React.FocusEvent<any>) => {\n setFocusVisible(false);\n onBlur?.(evt);\n },\n [onBlur],\n );\n\n const onLocalChange = useCallback(\n (evt: React.ChangeEvent<HTMLInputElement>) => {\n if (readOnly) {\n return;\n }\n\n onChange?.(evt, evt.target.checked, value);\n },\n [onChange, readOnly, value],\n );\n\n return (\n <MuiRadio\n ref={ref}\n className={cx(\n classes.root,\n {\n [classes.disabled]: disabled,\n [classes.focusVisible]: focusVisible,\n [classes.checked]: checked,\n [classes.semantic]: semantic,\n },\n className,\n )}\n icon={<HvRadioIcon disabled={disabled} />}\n checkedIcon={<HvRadioIcon checked disabled={disabled} />}\n color=\"default\"\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n onChange={onLocalChange}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n inputProps={inputProps}\n onFocusVisible={onFocusVisibleCallback}\n onBlur={onBlurCallback}\n {...others}\n />\n );\n },\n);\n"],"names":["HvBaseRadio"],"mappings":";;;;;;;AA6FO,MAAM,cAAc;AAAA,EACzB,SAASA,aAAY,OAAO,KAAK;AACzB,UAAA;AAAA,MACJ,SAAS;AAAA,MACT;AAAA,MACA,QAAQ;A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,QAAQ;AAAA,QACP,GAAG;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;"}
|
|
@@ -9,24 +9,13 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
9
9
|
height: 32,
|
|
10
10
|
cursor: "pointer",
|
|
11
11
|
borderRadius: "inherit",
|
|
12
|
-
"& svg": {
|
|
13
|
-
width: 16,
|
|
14
|
-
height: 16,
|
|
15
|
-
borderRadius: theme.radii.full,
|
|
16
|
-
border: `1px solid ${theme.colors.borderStrong}`,
|
|
17
|
-
backgroundColor: theme.colors.bgContainer
|
|
18
|
-
},
|
|
19
12
|
":hover": {
|
|
20
13
|
backgroundColor: theme.colors.bgHover
|
|
21
14
|
}
|
|
22
15
|
},
|
|
23
16
|
disabled: {
|
|
24
17
|
cursor: "not-allowed",
|
|
25
|
-
pointerEvents: "initial"
|
|
26
|
-
"& svg": {
|
|
27
|
-
borderColor: theme.colors.textDisabled,
|
|
28
|
-
backgroundColor: theme.colors.bgDisabled
|
|
29
|
-
}
|
|
18
|
+
pointerEvents: "initial"
|
|
30
19
|
},
|
|
31
20
|
focusVisible: {
|
|
32
21
|
"& svg": {
|
|
@@ -35,20 +24,7 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
35
24
|
}
|
|
36
25
|
},
|
|
37
26
|
icon: {},
|
|
38
|
-
checked: {
|
|
39
|
-
"& svg": {
|
|
40
|
-
borderColor: "transparent",
|
|
41
|
-
backgroundColor: theme.colors.primaryStrong,
|
|
42
|
-
color: theme.colors.bgContainer
|
|
43
|
-
},
|
|
44
|
-
"&$disabled": {
|
|
45
|
-
"& svg": {
|
|
46
|
-
borderColor: "transparent",
|
|
47
|
-
backgroundColor: theme.colors.borderDisabled,
|
|
48
|
-
color: theme.colors.bgDisabled
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
27
|
+
checked: {},
|
|
52
28
|
semantic: {}
|
|
53
29
|
});
|
|
54
30
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRadio.styles.js","sources":["../../../src/BaseRadio/BaseRadio.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseRadio\", {\n root: {\n padding: 0,\n width: 32,\n minWidth: 32,\n height: 32,\n cursor: \"pointer\",\n borderRadius: \"inherit\",\n \"
|
|
1
|
+
{"version":3,"file":"BaseRadio.styles.js","sources":["../../../src/BaseRadio/BaseRadio.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBaseRadio\", {\n root: {\n padding: 0,\n width: 32,\n minWidth: 32,\n height: 32,\n cursor: \"pointer\",\n borderRadius: \"inherit\",\n \":hover\": {\n backgroundColor: theme.colors.bgHover,\n },\n },\n disabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"initial\",\n },\n focusVisible: {\n \"& svg\": {\n borderRadius: theme.radii.full,\n ...outlineStyles,\n },\n },\n icon: {},\n checked: {},\n semantic: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,UAAU;AAAA,MACR,iBAAiB,MAAM,OAAO;AAAA,IAAA;AAAA,EAElC;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,eAAe;AAAA,EACjB;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,MACP,cAAc,MAAM,MAAM;AAAA,MAC1B,GAAG;AAAA,IAAA;AAAA,EAEP;AAAA,EACA,MAAM,CAAC;AAAA,EACP,SAAS,CAAC;AAAA,EACV,UAAU,CAAA;AACZ,CAAC;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
3
|
+
import { theme } from "@hitachivantara/uikit-styles";
|
|
4
|
+
const { useClasses } = createClasses("HvRadioIcon", {
|
|
5
|
+
root: {
|
|
6
|
+
display: "inline-flex",
|
|
7
|
+
fill: "currentcolor",
|
|
8
|
+
width: "1em",
|
|
9
|
+
height: "1em",
|
|
10
|
+
flexShrink: 0,
|
|
11
|
+
fontSize: 16,
|
|
12
|
+
borderRadius: theme.radii.full,
|
|
13
|
+
border: `1px solid ${theme.colors.borderStrong}`,
|
|
14
|
+
backgroundColor: theme.colors.bgContainer
|
|
15
|
+
},
|
|
16
|
+
checked: {
|
|
17
|
+
borderColor: "transparent",
|
|
18
|
+
backgroundColor: theme.colors.primaryStrong,
|
|
19
|
+
color: theme.colors.bgContainer
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
borderColor: theme.colors.textDisabled,
|
|
23
|
+
backgroundColor: theme.colors.bgDisabled
|
|
24
|
+
},
|
|
25
|
+
checkedDisabled: {
|
|
26
|
+
borderColor: "transparent",
|
|
27
|
+
backgroundColor: theme.colors.borderDisabled,
|
|
28
|
+
color: theme.colors.bgDisabled
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const HvRadioIcon = (props) => {
|
|
32
|
+
const {
|
|
33
|
+
className,
|
|
34
|
+
classes: classesProp,
|
|
35
|
+
checked,
|
|
36
|
+
disabled
|
|
37
|
+
} = useDefaultProps("HvRadioIcon", props);
|
|
38
|
+
const { classes, cx } = useClasses(classesProp, false);
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"svg",
|
|
41
|
+
{
|
|
42
|
+
viewBox: "0 0 16 16",
|
|
43
|
+
className: cx(classes.root, className, {
|
|
44
|
+
[classes.checked]: checked,
|
|
45
|
+
[classes.disabled]: disabled,
|
|
46
|
+
[classes.checkedDisabled]: checked && disabled
|
|
47
|
+
}),
|
|
48
|
+
children: checked && /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "4.5" })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
HvRadioIcon
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioIcon.js","sources":["../../../src/BaseRadio/RadioIcon.tsx"],"sourcesContent":["import {\n createClasses,\n ExtractNames,\n useDefaultProps,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport type { HvBaseRadioProps } from \"./BaseRadio\";\n\nconst { useClasses } = createClasses(\"HvRadioIcon\", {\n root: {\n display: \"inline-flex\",\n fill: \"currentcolor\",\n width: \"1em\",\n height: \"1em\",\n flexShrink: 0,\n\n fontSize: 16,\n borderRadius: theme.radii.full,\n border: `1px solid ${theme.colors.borderStrong}`,\n backgroundColor: theme.colors.bgContainer,\n },\n checked: {\n borderColor: \"transparent\",\n backgroundColor: theme.colors.primaryStrong,\n color: theme.colors.bgContainer,\n },\n disabled: {\n borderColor: theme.colors.textDisabled,\n backgroundColor: theme.colors.bgDisabled,\n },\n checkedDisabled: {\n borderColor: \"transparent\",\n backgroundColor: theme.colors.borderDisabled,\n color: theme.colors.bgDisabled,\n },\n});\n\nexport type HvRadioIconClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvRadioIconProps\n extends Pick<HvBaseRadioProps, \"checked\" | \"disabled\" | \"className\"> {\n classes?: HvRadioIconClasses;\n}\n\nexport const HvRadioIcon = (props: HvRadioIconProps) => {\n const {\n className,\n classes: classesProp,\n checked,\n disabled,\n } = useDefaultProps(\"HvRadioIcon\", props);\n const { classes, cx } = useClasses(classesProp, false);\n\n return (\n <svg\n viewBox=\"0 0 16 16\"\n className={cx(classes.root, className, {\n [classes.checked]: checked,\n [classes.disabled]: disabled,\n [classes.checkedDisabled]: checked && disabled,\n })}\n >\n {checked && <circle cx=\"8\" cy=\"8\" r=\"4.5\" />}\n </svg>\n );\n};\n"],"names":[],"mappings":";;;AASA,MAAM,EAAE,WAAA,IAAe,cAAc,eAAe;AAAA,EAClD,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,IAEZ,UAAU;AAAA,IACV,cAAc,MAAM,MAAM;AAAA,IAC1B,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,IAC9C,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,IACb,iBAAiB,MAAM,OAAO;AAAA,IAC9B,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,UAAU;AAAA,IACR,aAAa,MAAM,OAAO;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB,MAAM,OAAO;AAAA,IAC9B,OAAO,MAAM,OAAO;AAAA,EAAA;AAExB,CAAC;AASY,MAAA,cAAc,CAAC,UAA4B;AAChD,QAAA;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA,IACE,gBAAgB,eAAe,KAAK;AACxC,QAAM,EAAE,SAAS,GAAA,IAAO,WAAW,aAAa,KAAK;AAGnD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAW,GAAG,QAAQ,MAAM,WAAW;AAAA,QACrC,CAAC,QAAQ,OAAO,GAAG;AAAA,QACnB,CAAC,QAAQ,QAAQ,GAAG;AAAA,QACpB,CAAC,QAAQ,eAAe,GAAG,WAAW;AAAA,MAAA,CACvC;AAAA,MAEA,UAAA,+BAAY,UAAO,EAAA,IAAG,KAAI,IAAG,KAAI,GAAE,MAAM,CAAA;AAAA,IAAA;AAAA,EAC5C;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathElement.js","sources":["../../../../src/BreadCrumb/PathElement/PathElement.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { type ExtractNames } from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./PathElement.styles\";\n\nexport { staticClasses as pathElementClasses };\n\nexport type HvPathElementClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvPathElementProps {\n last?: boolean;\n classes?: HvPathElementClasses;\n children: React.ReactElement
|
|
1
|
+
{"version":3,"file":"PathElement.js","sources":["../../../../src/BreadCrumb/PathElement/PathElement.tsx"],"sourcesContent":["import { DropRightXS } from \"@hitachivantara/uikit-react-icons\";\nimport { type ExtractNames } from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./PathElement.styles\";\n\nexport { staticClasses as pathElementClasses };\n\nexport type HvPathElementClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvPathElementProps {\n last?: boolean;\n classes?: HvPathElementClasses;\n children: React.ReactElement<any>;\n}\n\nexport const HvPathElement = ({\n classes: classesProp,\n last = false,\n children,\n}: HvPathElementProps) => {\n const { classes } = useClasses(classesProp);\n\n return (\n <li className={classes.centerContainer}>\n {children}\n {!last && (\n <DropRightXS\n className={classes.separatorContainer}\n color=\"textDisabled\"\n />\n )}\n </li>\n );\n};\n"],"names":[],"mappings":";;;;AAeO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AACF,MAA0B;AACxB,QAAM,EAAE,QAAA,IAAY,WAAW,WAAW;AAE1C,SACG,qBAAA,MAAA,EAAG,WAAW,QAAQ,iBACpB,UAAA;AAAA,IAAA;AAAA,IACA,CAAC,QACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,QAAQ;AAAA,QACnB,OAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EACR,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DotPagination.js","sources":["../../../src/DotPagination/DotPagination.tsx"],"sourcesContent":["import { cloneElement } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvBaseRadio } from \"../BaseRadio\";\nimport { HvRadioGroup, HvRadioGroupProps } from \"../RadioGroup\";\nimport { range } from \"../utils/helpers\";\nimport { staticClasses, useClasses } from \"./DotPagination.styles\";\n\nconst currentStep = (\n <div style={{ fontSize: 8 }}>\n <div />\n </div>\n);\n\nconst otherStep = (\n <div style={{ fontSize: 4 }}>\n <div />\n </div>\n);\n\nexport { staticClasses as dotPaginationClasses };\n\nexport type HvDotPaginationClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDotPaginationProps\n extends Omit<HvRadioGroupProps, \"classes\"> {\n /**\n * Icon to override the default one used for the unselected state.\n *\n * The default icon is `OtherStep`.\n */\n unselectedIcon?: React.ReactElement
|
|
1
|
+
{"version":3,"file":"DotPagination.js","sources":["../../../src/DotPagination/DotPagination.tsx"],"sourcesContent":["import { cloneElement } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvBaseRadio } from \"../BaseRadio\";\nimport { HvRadioGroup, HvRadioGroupProps } from \"../RadioGroup\";\nimport { range } from \"../utils/helpers\";\nimport { staticClasses, useClasses } from \"./DotPagination.styles\";\n\nconst currentStep = (\n <div style={{ fontSize: 8 }}>\n <div />\n </div>\n);\n\nconst otherStep = (\n <div style={{ fontSize: 4 }}>\n <div />\n </div>\n);\n\nexport { staticClasses as dotPaginationClasses };\n\nexport type HvDotPaginationClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDotPaginationProps\n extends Omit<HvRadioGroupProps, \"classes\"> {\n /**\n * Icon to override the default one used for the unselected state.\n *\n * The default icon is `OtherStep`.\n */\n unselectedIcon?: React.ReactElement<any>;\n /**\n * Icon to override the default one used for the selected state.\n *\n * The default icon is `CurrentStep`.\n */\n selectedIcon?: React.ReactElement<any>;\n /**\n * The number of pages the component has.\n */\n pages?: number;\n /**\n * The currently selected page.\n */\n page?: number;\n /**\n * The callback fired when the page value changes.\n */\n onPageChange?: (\n event: React.ChangeEvent<HTMLInputElement>,\n page: number,\n ) => void;\n /**\n * The callback fired to get the page aria label.\n */\n getItemAriaLabel?: (page: number) => string;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvDotPaginationClasses;\n}\n\nconst getSelectorIcons = (\n radioIcon?: React.ReactElement<any>,\n radioCheckedIcon?: React.ReactElement<any>,\n classes?: HvDotPaginationClasses,\n) => {\n return {\n radio: cloneElement(radioIcon || otherStep, {\n className: classes?.icon,\n }),\n radioChecked: cloneElement(radioCheckedIcon || currentStep, {\n className: classes?.icon,\n }),\n };\n};\n\n/**\n * Pagination is the process of dividing a document into discrete pages. It relates to how users interact with structured content on a website or application.\n * This component uses Radio Buttons to represent each page.\n */\nexport const HvDotPagination = (props: HvDotPaginationProps) => {\n const {\n className,\n classes: classesProp,\n unselectedIcon,\n selectedIcon,\n pages = 1,\n page = 0,\n onPageChange,\n getItemAriaLabel,\n ...others\n } = useDefaultProps(\"HvDotPagination\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const icons = getSelectorIcons(unselectedIcon, selectedIcon, classes);\n\n return (\n <HvRadioGroup\n className={cx(classes.root, className)}\n classes={{\n horizontal: classes.horizontal,\n }}\n orientation=\"horizontal\"\n {...others}\n >\n {range(pages).map((i) => (\n <HvBaseRadio\n className={cx(classes.radioRoot, classes.radio)}\n key={i}\n value={i}\n checked={page === i}\n onChange={(event) => onPageChange?.(event, i)}\n icon={icons.radio}\n checkedIcon={icons.radioChecked}\n inputProps={{ \"aria-label\": getItemAriaLabel?.(i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AAa,MAAM;AAAA,UACnB,YAAY,EAAE,cAAc,mBAAmB,CAAC,EAAE;AAAA,QAAA;AAAA,QAN7C;AAAA,MAQR,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDownMenu.js","sources":["../../../src/DropDownMenu/DropDownMenu.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\nimport { MoreOptionsVertical } from \"@hitachivantara/uikit-react-icons\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { HvSize } from \"@hitachivantara/uikit-styles\";\n\nimport { HvBaseDropdown } from \"../BaseDropdown\";\nimport { useBaseDropdownContext } from \"../BaseDropdown/context\";\nimport { HvButtonVariant } from \"../Button\";\nimport { HvDropdownButton, HvDropdownButtonProps } from \"../DropdownButton\";\nimport { useControlled } from \"../hooks/useControlled\";\nimport { useLabels } from \"../hooks/useLabels\";\nimport { useUniqueId } from \"../hooks/useUniqueId\";\nimport { HvList, HvListProps, HvListValue } from \"../List\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { getPrevNextFocus } from \"../utils/focusableElementFinder\";\nimport { isKey } from \"../utils/keyboardUtils\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./DropDownMenu.styles\";\n\nexport { staticClasses as dropDownMenuClasses };\n\nexport type HvDropDownMenuClasses = ExtractNames<typeof useClasses>;\n\nconst DEFAULT_LABELS = {\n dropdownMenu: \"Dropdown menu\",\n};\n\nexport interface HvDropDownMenuProps\n extends HvBaseProps<HTMLDivElement, \"onClick\" | \"onToggle\"> {\n /** Icon. */\n icon?: React.ReactElement
|
|
1
|
+
{"version":3,"file":"DropDownMenu.js","sources":["../../../src/DropDownMenu/DropDownMenu.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\nimport { MoreOptionsVertical } from \"@hitachivantara/uikit-react-icons\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { HvSize } from \"@hitachivantara/uikit-styles\";\n\nimport { HvBaseDropdown } from \"../BaseDropdown\";\nimport { useBaseDropdownContext } from \"../BaseDropdown/context\";\nimport { HvButtonVariant } from \"../Button\";\nimport { HvDropdownButton, HvDropdownButtonProps } from \"../DropdownButton\";\nimport { useControlled } from \"../hooks/useControlled\";\nimport { useLabels } from \"../hooks/useLabels\";\nimport { useUniqueId } from \"../hooks/useUniqueId\";\nimport { HvList, HvListProps, HvListValue } from \"../List\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { getPrevNextFocus } from \"../utils/focusableElementFinder\";\nimport { isKey } from \"../utils/keyboardUtils\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./DropDownMenu.styles\";\n\nexport { staticClasses as dropDownMenuClasses };\n\nexport type HvDropDownMenuClasses = ExtractNames<typeof useClasses>;\n\nconst DEFAULT_LABELS = {\n dropdownMenu: \"Dropdown menu\",\n};\n\nexport interface HvDropDownMenuProps\n extends HvBaseProps<HTMLDivElement, \"onClick\" | \"onToggle\"> {\n /** Icon. */\n icon?: React.ReactElement<any>;\n /**\n * A list containing the elements to be rendered.\n *\n * - label: The label of the element to be rendered.\n * - selected: The selection state of the element.\n * - disabled: The disabled state of the element.\n * - icon: The icon node to be rendered on the left.\n * - showNavIcon: If true renders the navigation icon on the right.\n */\n dataList: HvListValue[];\n /** Placement of the dropdown. */\n placement?: \"left\" | \"right\";\n /** Disable the portal behavior. The children stay within it's parent DOM hierarchy. */\n disablePortal?: boolean;\n /** Function executed on toggle of the dropdown. Should receive the open status. */\n onToggle?: (\n event:\n | Event\n | React.KeyboardEvent<HTMLUListElement>\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLIElement>,\n open: boolean,\n ) => void;\n /** Function executed in each onClick. Should received the clicked element. */\n onClick?: (\n event:\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLIElement>,\n value: HvListValue,\n ) => void;\n /** Keep the Dropdown Menu opened after clicking one option */\n keepOpened?: boolean;\n /** Defines if the component is disabled. */\n disabled?: boolean;\n /** If true it should be displayed open. */\n expanded?: boolean;\n /** When uncontrolled, defines the initial expanded state. */\n defaultExpanded?: boolean;\n /**\n * The variant to be used in the header.\n * @deprecated Use `variant` instead\n */\n category?: HvButtonVariant;\n /** The variant to be used in the header. */\n variant?: HvButtonVariant;\n /** Button size. */\n size?: HvSize;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvDropDownMenuClasses;\n /** An object containing all the labels. */\n labels?: Partial<typeof DEFAULT_LABELS>;\n}\n\nconst HeaderComponent = forwardRef<HTMLButtonElement, HvDropdownButtonProps>(\n function HeaderComponent(props, ref) {\n const { open, icon, disabled, ...others } = props;\n const { popperPlacement } = useBaseDropdownContext();\n\n return (\n <HvDropdownButton\n icon\n ref={ref}\n open={open}\n disabled={disabled}\n aria-expanded={open}\n aria-haspopup=\"menu\"\n placement={popperPlacement}\n {...others}\n >\n {icon || <MoreOptionsVertical role=\"presentation\" />}\n </HvDropdownButton>\n );\n },\n);\n\n/**\n * A dropdown menu is a graphical control element, similar to a list box, that allows the user to choose a value from a list.\n */\nexport const HvDropDownMenu = forwardRef<\n React.ComponentRef<typeof HvBaseDropdown>,\n HvDropDownMenuProps\n>(function HvDropDownMenu(props, ref) {\n const {\n id: idProp,\n classes: classesProp,\n className,\n icon,\n placement = \"right\",\n dataList,\n disablePortal = false,\n onToggle,\n onClick,\n keepOpened = true,\n disabled = false,\n expanded,\n defaultExpanded = false,\n category = \"secondaryGhost\", // TODO - remove and update variant default in v6\n variant,\n size = \"md\",\n labels: labelsProp,\n ...others\n } = useDefaultProps(\"HvDropDownMenu\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n\n const [open, setOpen] = useControlled(expanded, Boolean(defaultExpanded));\n const id = useUniqueId(idProp);\n\n const listId = setId(id, \"list\");\n\n const handleClose = (\n event:\n | React.KeyboardEvent<HTMLUListElement>\n | React.ChangeEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLIElement>,\n ) => {\n // this will only run if uncontrolled\n setOpen(false);\n onToggle?.(event, false);\n };\n\n // If the ESCAPE key is pressed inside the list, the close handler must be called.\n const handleKeyDown: HvListProps[\"onKeyDown\"] = (event) => {\n if (isKey(event, \"Tab\")) {\n const focusNodes = getPrevNextFocus(setId(id, \"icon-button\"));\n const node = event.shiftKey ? focusNodes.prevFocus : focusNodes.nextFocus;\n if (node) setTimeout(() => node.focus(), 0);\n handleClose(event);\n }\n event.preventDefault();\n };\n\n const condensed = useMemo(() => dataList.every((el) => !el.icon), [dataList]);\n\n return (\n <HvBaseDropdown\n ref={ref}\n id={id}\n className={cx(classes.root, classes.container, classes.icon, className, {\n [classes.iconSelected]: open, // TODO: rename to open\n })}\n classes={{\n container: classes.baseContainer,\n panel: classes.menuListRoot,\n }}\n expanded={open && !disabled}\n headerComponent={HeaderComponent}\n // @ts-expect-error infer HeaderComponent typings\n size={size}\n variant={variant ?? category}\n open={open}\n aria-label={labels.dropdownMenu}\n icon={icon}\n placement={placement}\n variableWidth\n disablePortal={disablePortal}\n onToggle={(e, s) => {\n // this will only run if uncontrolled\n setOpen(s);\n onToggle?.(e, s);\n }}\n disabled={disabled}\n onContainerCreation={(containerEl) => {\n containerEl?.getElementsByTagName(\"li\")[0]?.focus();\n }}\n {...others}\n >\n <HvList\n id={listId}\n values={dataList}\n selectable={false}\n condensed={condensed}\n onClick={(event, item) => {\n if (!keepOpened) handleClose(event);\n onClick?.(event, item);\n }}\n onKeyDown={handleKeyDown}\n classes={{\n root: classes.menuList,\n }}\n />\n </HvBaseDropdown>\n );\n});\n"],"names":["HeaderComponent","HvDropDownMenu"],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAM,iBAAiB;AAAA,EACrB,cAAc;AAChB;AA2DA,MAAM,kBAAkB;AAAA,EACtB,SAASA,iBAAgB,OAAO,KAAK;AACnC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ropdown = fixedForwardRef(function HvDropdown2(props, ref) {
|
|
|
100
100
|
getSelectionLabel(labels, placeholder, multiSelect, values)
|
|
101
101
|
);
|
|
102
102
|
}, [labels, multiSelect, placeholder, values]);
|
|
103
|
-
const dropdownHeaderRef = useRef();
|
|
103
|
+
const dropdownHeaderRef = useRef(void 0);
|
|
104
104
|
const {
|
|
105
105
|
ref: refProp,
|
|
106
106
|
dropdownHeaderRef: dropdownHeaderRefProp,
|