@hitachivantara/uikit-react-core 5.91.2 → 5.91.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseCheckBox/BaseCheckBox.styles.cjs +4 -8
- package/dist/cjs/BaseCheckBox/CheckBoxIcon.cjs +4 -8
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +3 -0
- package/dist/cjs/BaseRadio/RadioIcon.cjs +2 -7
- package/dist/cjs/CheckBox/CheckBox.cjs +1 -1
- package/dist/cjs/CheckBox/CheckBox.styles.cjs +13 -39
- package/dist/cjs/Dropdown/List/List.cjs +12 -18
- package/dist/cjs/Dropdown/List/List.styles.cjs +0 -2
- package/dist/cjs/Input/Input.cjs +2 -1
- package/dist/cjs/Input/Input.styles.cjs +7 -1
- package/dist/cjs/Input/icons.cjs +19 -0
- package/dist/cjs/Radio/Radio.styles.cjs +8 -5
- package/dist/cjs/TimePicker/Unit/Unit.cjs +1 -2
- package/dist/cjs/TimePicker/Unit/Unit.styles.cjs +0 -6
- package/dist/cjs/VerticalNavigation/VerticalNavigation.styles.cjs +1 -4
- package/dist/cjs/icons.cjs +15 -0
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js +4 -8
- package/dist/esm/BaseCheckBox/BaseCheckBox.styles.js.map +1 -1
- package/dist/esm/BaseCheckBox/CheckBoxIcon.js +4 -8
- package/dist/esm/BaseCheckBox/CheckBoxIcon.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js +3 -0
- package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/BaseRadio/RadioIcon.js +2 -7
- package/dist/esm/BaseRadio/RadioIcon.js.map +1 -1
- package/dist/esm/CheckBox/CheckBox.js +1 -1
- package/dist/esm/CheckBox/CheckBox.js.map +1 -1
- package/dist/esm/CheckBox/CheckBox.styles.js +13 -39
- package/dist/esm/CheckBox/CheckBox.styles.js.map +1 -1
- package/dist/esm/Dropdown/List/List.js +13 -19
- package/dist/esm/Dropdown/List/List.js.map +1 -1
- package/dist/esm/Dropdown/List/List.styles.js +0 -2
- package/dist/esm/Dropdown/List/List.styles.js.map +1 -1
- package/dist/esm/Dropdown/utils.js.map +1 -1
- package/dist/esm/Input/Input.js +3 -2
- package/dist/esm/Input/Input.js.map +1 -1
- package/dist/esm/Input/Input.styles.js +7 -1
- package/dist/esm/Input/Input.styles.js.map +1 -1
- package/dist/esm/Input/icons.js +19 -0
- package/dist/esm/Input/icons.js.map +1 -0
- package/dist/esm/Radio/Radio.styles.js +8 -5
- package/dist/esm/Radio/Radio.styles.js.map +1 -1
- package/dist/esm/TimePicker/Unit/Unit.js +1 -2
- package/dist/esm/TimePicker/Unit/Unit.js.map +1 -1
- package/dist/esm/TimePicker/Unit/Unit.styles.js +0 -6
- package/dist/esm/TimePicker/Unit/Unit.styles.js.map +1 -1
- package/dist/esm/VerticalNavigation/VerticalNavigation.styles.js +1 -4
- package/dist/esm/VerticalNavigation/VerticalNavigation.styles.js.map +1 -1
- package/dist/esm/icons.js +13 -0
- package/dist/esm/icons.js.map +1 -0
- package/dist/types/index.d.ts +5 -7
- package/package.json +6 -6
|
@@ -9,19 +9,15 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBaseCheck
|
|
|
9
9
|
width: 32,
|
|
10
10
|
minWidth: 32,
|
|
11
11
|
height: 32,
|
|
12
|
-
borderRadius: uikitStyles.theme.radii.
|
|
12
|
+
borderRadius: uikitStyles.theme.radii.round,
|
|
13
13
|
cursor: "pointer",
|
|
14
|
-
"
|
|
15
|
-
backgroundColor: uikitStyles.theme.colors.bgHover
|
|
16
|
-
borderRadius: uikitStyles.theme.radii.round
|
|
14
|
+
":hover": {
|
|
15
|
+
backgroundColor: uikitStyles.theme.colors.bgHover
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
18
|
disabled: {
|
|
20
19
|
cursor: "not-allowed",
|
|
21
|
-
pointerEvents: "initial"
|
|
22
|
-
"&:hover": {
|
|
23
|
-
backgroundColor: "transparent"
|
|
24
|
-
}
|
|
20
|
+
pointerEvents: "initial"
|
|
25
21
|
},
|
|
26
22
|
focusVisible: {
|
|
27
23
|
"& svg": {
|
|
@@ -4,14 +4,9 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
6
6
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
7
|
+
const icons = require("../icons.cjs");
|
|
7
8
|
const { useClasses } = uikitReactUtils.createClasses("HvCheckBoxIcon", {
|
|
8
9
|
root: {
|
|
9
|
-
display: "inline-flex",
|
|
10
|
-
fill: "currentcolor",
|
|
11
|
-
width: "1em",
|
|
12
|
-
height: "1em",
|
|
13
|
-
flexShrink: 0,
|
|
14
|
-
fontSize: 16,
|
|
15
10
|
color: uikitStyles.theme.colors.bgContainer,
|
|
16
11
|
borderRadius: uikitStyles.theme.radii.base,
|
|
17
12
|
border: `1px solid ${uikitStyles.theme.colors.borderStrong}`
|
|
@@ -22,7 +17,8 @@ const { useClasses } = uikitReactUtils.createClasses("HvCheckBoxIcon", {
|
|
|
22
17
|
color: uikitStyles.theme.colors.bgContainer
|
|
23
18
|
},
|
|
24
19
|
indeterminate: {
|
|
25
|
-
color: uikitStyles.theme.colors.textSubtle
|
|
20
|
+
color: uikitStyles.theme.colors.textSubtle,
|
|
21
|
+
backgroundColor: uikitStyles.theme.colors.bgContainer
|
|
26
22
|
},
|
|
27
23
|
semantic: {
|
|
28
24
|
"&[data-variant=indeterminate]": {
|
|
@@ -61,7 +57,7 @@ const HvCheckBoxIcon = (props) => {
|
|
|
61
57
|
}
|
|
62
58
|
}, [variant]);
|
|
63
59
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
-
|
|
60
|
+
icons.SvgBase,
|
|
65
61
|
{
|
|
66
62
|
viewBox: "0 0 14 14",
|
|
67
63
|
"data-variant": variant,
|
|
@@ -26,6 +26,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBaseInput
|
|
|
26
26
|
display: "inline-flex",
|
|
27
27
|
width: "100%",
|
|
28
28
|
position: "relative",
|
|
29
|
+
overflow: "hidden",
|
|
29
30
|
margin: 0,
|
|
30
31
|
borderRadius: uikitStyles.theme.radii.base,
|
|
31
32
|
height: "32px",
|
|
@@ -34,6 +35,8 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBaseInput
|
|
|
34
35
|
boxSizing: "border-box",
|
|
35
36
|
backgroundColor: uikitStyles.theme.colors.bgContainer,
|
|
36
37
|
fontFamily: uikitStyles.theme.fontFamily.body,
|
|
38
|
+
alignItems: "stretch",
|
|
39
|
+
...uikitStyles.theme.typography.body,
|
|
37
40
|
":hover:not($disabled,$invalid,$readOnly)": {
|
|
38
41
|
borderColor: uikitStyles.theme.colors.primary
|
|
39
42
|
},
|
|
@@ -3,14 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
5
5
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
6
|
+
const icons = require("../icons.cjs");
|
|
6
7
|
const { useClasses } = uikitReactUtils.createClasses("HvRadioIcon", {
|
|
7
8
|
root: {
|
|
8
|
-
display: "inline-flex",
|
|
9
|
-
fill: "currentcolor",
|
|
10
|
-
width: "1em",
|
|
11
|
-
height: "1em",
|
|
12
|
-
flexShrink: 0,
|
|
13
|
-
fontSize: 16,
|
|
14
9
|
borderRadius: uikitStyles.theme.radii.full,
|
|
15
10
|
border: `1px solid ${uikitStyles.theme.colors.borderStrong}`,
|
|
16
11
|
backgroundColor: uikitStyles.theme.colors.bgContainer
|
|
@@ -39,7 +34,7 @@ const HvRadioIcon = (props) => {
|
|
|
39
34
|
} = uikitReactUtils.useDefaultProps("HvRadioIcon", props);
|
|
40
35
|
const { classes, cx } = useClasses(classesProp, false);
|
|
41
36
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
|
-
|
|
37
|
+
icons.SvgBase,
|
|
43
38
|
{
|
|
44
39
|
viewBox: "0 0 16 16",
|
|
45
40
|
className: cx(classes.root, className, {
|
|
@@ -154,6 +154,7 @@ const HvCheckBox = React.forwardRef(
|
|
|
154
154
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
155
155
|
Label.HvLabel,
|
|
156
156
|
{
|
|
157
|
+
noWrap: true,
|
|
157
158
|
id: setId.setId(elementId, "label"),
|
|
158
159
|
htmlFor: setId.setId(elementId, "input"),
|
|
159
160
|
label,
|
|
@@ -170,7 +171,6 @@ const HvCheckBox = React.forwardRef(
|
|
|
170
171
|
id: setId.setId(elementId, "error"),
|
|
171
172
|
disableAdornment: !hasLabel,
|
|
172
173
|
hideText: !hasLabel,
|
|
173
|
-
disableBorder: true,
|
|
174
174
|
children: validationMessage
|
|
175
175
|
}
|
|
176
176
|
)
|
|
@@ -8,58 +8,32 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvCheckBox"
|
|
|
8
8
|
container: {
|
|
9
9
|
cursor: "pointer",
|
|
10
10
|
display: "flex",
|
|
11
|
-
|
|
11
|
+
alignItems: "center",
|
|
12
12
|
transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
borderRadius: uikitStyles.theme.radii.base,
|
|
14
|
+
"&:hover:not($disabled)": {
|
|
15
|
+
backgroundColor: uikitStyles.theme.colors.bgHover
|
|
16
|
+
},
|
|
17
|
+
":where(:has($label)) $checkbox": {
|
|
18
|
+
borderRadius: "inherit"
|
|
16
19
|
}
|
|
17
20
|
},
|
|
21
|
+
invalidContainer: {},
|
|
18
22
|
disabled: {
|
|
19
23
|
cursor: "not-allowed",
|
|
20
|
-
"& $label": { color: uikitStyles.theme.colors.textDisabled, cursor: "not-allowed" }
|
|
21
|
-
"&:hover": {
|
|
22
|
-
backgroundColor: "transparent"
|
|
23
|
-
}
|
|
24
|
+
"& $label": { color: uikitStyles.theme.colors.textDisabled, cursor: "not-allowed" }
|
|
24
25
|
},
|
|
25
26
|
focusVisible: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
backgroundColor: uikitStyles.theme.colors.bgPageSecondary
|
|
29
|
-
},
|
|
30
|
-
[`& $checkbox div > svg`]: {
|
|
31
|
-
outline: "none",
|
|
32
|
-
boxShadow: "none"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
invalidContainer: {
|
|
36
|
-
borderBottom: `1px solid ${uikitStyles.theme.form.errorColor}`,
|
|
37
|
-
"&:hover": {
|
|
38
|
-
borderBottomLeftRadius: "0px",
|
|
39
|
-
borderBottomRightRadius: "0px"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
checkbox: { height: "32px" },
|
|
43
|
-
invalidCheckbox: {
|
|
44
|
-
"::after": {
|
|
45
|
-
content: '""',
|
|
46
|
-
position: "absolute",
|
|
47
|
-
bottom: 0,
|
|
48
|
-
left: 0,
|
|
49
|
-
width: "100%",
|
|
50
|
-
height: 1,
|
|
51
|
-
backgroundColor: uikitStyles.theme.form.errorColor
|
|
52
|
-
}
|
|
27
|
+
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
28
|
+
...focusUtils.outlineStyles
|
|
53
29
|
},
|
|
30
|
+
checkbox: {},
|
|
31
|
+
invalidCheckbox: {},
|
|
54
32
|
label: {
|
|
55
|
-
overflow: "hidden",
|
|
56
|
-
textOverflow: "ellipsis",
|
|
57
33
|
verticalAlign: "middle",
|
|
58
34
|
paddingRight: uikitStyles.theme.space.xs,
|
|
59
|
-
whiteSpace: "nowrap",
|
|
60
35
|
...uikitStyles.theme.typography.body,
|
|
61
36
|
cursor: "pointer",
|
|
62
|
-
height: "32px",
|
|
63
37
|
lineHeight: "32px",
|
|
64
38
|
width: "100%"
|
|
65
39
|
},
|
|
@@ -5,6 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
6
6
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
7
7
|
const context = require("../../BaseDropdown/context.cjs");
|
|
8
|
+
const CounterLabel = require("../../utils/CounterLabel.cjs");
|
|
8
9
|
const setId = require("../../utils/setId.cjs");
|
|
9
10
|
const utils = require("../utils.cjs");
|
|
10
11
|
const List_styles = require("./List.styles.cjs");
|
|
@@ -12,7 +13,6 @@ const ActionBar = require("../../ActionBar/ActionBar.cjs");
|
|
|
12
13
|
const Button = require("../../Button/Button.cjs");
|
|
13
14
|
const List = require("../../List/List.cjs");
|
|
14
15
|
const Input = require("../../Input/Input.cjs");
|
|
15
|
-
const Typography = require("../../Typography/Typography.cjs");
|
|
16
16
|
const CheckBox = require("../../CheckBox/CheckBox.cjs");
|
|
17
17
|
const clone = (values) => values.map((value) => ({ ...value }));
|
|
18
18
|
const cleanHidden = (lst) => lst.map((item) => ({ ...item, isHidden: false }));
|
|
@@ -111,30 +111,24 @@ const HvDropdownList = (props) => {
|
|
|
111
111
|
updateSelectAll(newList);
|
|
112
112
|
};
|
|
113
113
|
const renderSelectAll = () => {
|
|
114
|
-
|
|
115
|
-
const multiSelectionConjunction = labels?.multiSelectionConjunction;
|
|
116
|
-
const nbrSelected = utils.getSelected(list).length;
|
|
117
|
-
const defaultLabel = /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { component: "span", children: nbrSelected > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsx("b", { children: nbrSelected }),
|
|
119
|
-
` ${multiSelectionConjunction} ${list.length}`
|
|
120
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
121
|
-
/* @__PURE__ */ jsxRuntime.jsx("b", { children: selectAll }),
|
|
122
|
-
` (${list.length})`
|
|
123
|
-
] }) });
|
|
124
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.selectAllContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
114
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
115
|
CheckBox.HvCheckBox,
|
|
126
116
|
{
|
|
127
117
|
id: setId.setId(id, "select-all"),
|
|
128
|
-
label:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
label: /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
CounterLabel.CounterLabel,
|
|
120
|
+
{
|
|
121
|
+
selected: utils.getSelected(list).length,
|
|
122
|
+
total: list.length,
|
|
123
|
+
conjunctionLabel: labels?.multiSelectionConjunction
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
onChange: handleSelectAll,
|
|
133
127
|
className: classes.selectAll,
|
|
134
128
|
indeterminate: anySelected && !allSelected,
|
|
135
129
|
checked: allSelected
|
|
136
130
|
}
|
|
137
|
-
)
|
|
131
|
+
);
|
|
138
132
|
};
|
|
139
133
|
const onSelection = (listValues) => {
|
|
140
134
|
if (!multiSelect) {
|
|
@@ -20,8 +20,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvDropdownL
|
|
|
20
20
|
searchContainer: { marginBottom: uikitStyles.theme.space.xs },
|
|
21
21
|
listBorderDown: {},
|
|
22
22
|
listContainer: { padding: uikitStyles.theme.space.sm },
|
|
23
|
-
selectAllContainer: {},
|
|
24
|
-
selection: {},
|
|
25
23
|
selectAll: {}
|
|
26
24
|
});
|
|
27
25
|
exports.staticClasses = staticClasses;
|
package/dist/cjs/Input/Input.cjs
CHANGED
|
@@ -14,6 +14,7 @@ const useUniqueId = require("../hooks/useUniqueId.cjs");
|
|
|
14
14
|
const generic = require("../types/generic.cjs");
|
|
15
15
|
const keyboardUtils = require("../utils/keyboardUtils.cjs");
|
|
16
16
|
const setId = require("../utils/setId.cjs");
|
|
17
|
+
const icons = require("./icons.cjs");
|
|
17
18
|
const Input_styles = require("./Input.styles.cjs");
|
|
18
19
|
const Adornment = require("../FormElement/Adornment/Adornment.cjs");
|
|
19
20
|
const utils$1 = require("../FormElement/utils.cjs");
|
|
@@ -319,7 +320,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
|
|
|
319
320
|
onClick: () => setRevealPassword((s) => !s),
|
|
320
321
|
"aria-label": labels?.revealPasswordButtonLabel,
|
|
321
322
|
"aria-controls": setId.setId(elementId, "input"),
|
|
322
|
-
icon:
|
|
323
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EyeIcon, { selected: revealPassword }),
|
|
323
324
|
tabIndex: 0,
|
|
324
325
|
...{ selected: revealPassword }
|
|
325
326
|
}
|
|
@@ -17,7 +17,13 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvInput", {
|
|
|
17
17
|
justifyContent: "center",
|
|
18
18
|
marginRight: 1
|
|
19
19
|
},
|
|
20
|
-
icon: {
|
|
20
|
+
icon: {
|
|
21
|
+
// TODO: review in v6 - don't assume/force size
|
|
22
|
+
":has(svg)": {
|
|
23
|
+
width: "30px",
|
|
24
|
+
height: "30px"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
21
27
|
adornmentButton: {
|
|
22
28
|
":focus-visible,:hover": {
|
|
23
29
|
backgroundColor: "transparent"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const icons = require("../icons.cjs");
|
|
5
|
+
const EyeIcon = ({ selected }) => /* @__PURE__ */ jsxRuntime.jsxs(icons.SvgBase, { viewBox: "0 0 16 16", style: { margin: 8 }, children: [
|
|
6
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 8a3 3 0 1 1-3-3 3 3 0 0 1 3 3m5 0s-3.58 6-8 6-8-6-8-6 4-6 8-6 8 6 8 6m-1.2.03a22 22 0 0 0-2-2.32C11.01 3.94 9.35 3 8 3s-3 .93-4.77 2.68a22 22 0 0 0-2.02 2.35 18 18 0 0 0 1.85 2.28C4.25 11.53 6.08 13 8 13s3.73-1.45 4.91-2.67a18 18 0 0 0 1.88-2.3z" }),
|
|
7
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8
|
+
"rect",
|
|
9
|
+
{
|
|
10
|
+
style: { transition: "width 0.2s ease" },
|
|
11
|
+
width: selected ? 20 : 0,
|
|
12
|
+
height: 1,
|
|
13
|
+
x: -2,
|
|
14
|
+
y: 8,
|
|
15
|
+
transform: "translate(-4 8) rotate(-45)"
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
] });
|
|
19
|
+
exports.EyeIcon = EyeIcon;
|
|
@@ -11,8 +11,11 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvRadio", {
|
|
|
11
11
|
alignItems: "center",
|
|
12
12
|
transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
13
13
|
borderRadius: uikitStyles.theme.radii.base,
|
|
14
|
-
"
|
|
14
|
+
"&:hover:not($disabled)": {
|
|
15
15
|
backgroundColor: uikitStyles.theme.colors.bgHover
|
|
16
|
+
},
|
|
17
|
+
":where(:has($label)) $radio": {
|
|
18
|
+
borderRadius: "inherit"
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
invalidContainer: {},
|
|
@@ -20,6 +23,10 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvRadio", {
|
|
|
20
23
|
cursor: "not-allowed",
|
|
21
24
|
"& $label": { color: uikitStyles.theme.colors.textDisabled, cursor: "not-allowed" }
|
|
22
25
|
},
|
|
26
|
+
focusVisible: {
|
|
27
|
+
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
28
|
+
...focusUtils.outlineStyles
|
|
29
|
+
},
|
|
23
30
|
radio: {},
|
|
24
31
|
invalidRadio: {},
|
|
25
32
|
label: {
|
|
@@ -30,10 +37,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvRadio", {
|
|
|
30
37
|
lineHeight: "32px",
|
|
31
38
|
width: "100%"
|
|
32
39
|
},
|
|
33
|
-
focusVisible: {
|
|
34
|
-
backgroundColor: uikitStyles.theme.colors.bgPageSecondary,
|
|
35
|
-
...focusUtils.outlineStyles
|
|
36
|
-
},
|
|
37
40
|
checked: {},
|
|
38
41
|
semantic: {}
|
|
39
42
|
});
|
|
@@ -29,8 +29,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTimePicke
|
|
|
29
29
|
...uikitStyles.theme.typography.title3,
|
|
30
30
|
fontWeight: 600,
|
|
31
31
|
textAlign: "center",
|
|
32
|
-
height: 40,
|
|
33
|
-
width: 40,
|
|
34
32
|
padding: 0,
|
|
35
33
|
margin: 0,
|
|
36
34
|
"&::placeholder": {
|
|
@@ -44,10 +42,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTimePicke
|
|
|
44
42
|
},
|
|
45
43
|
subtractIcon: {
|
|
46
44
|
marginTop: uikitStyles.theme.space.xs
|
|
47
|
-
},
|
|
48
|
-
inputContainer: {
|
|
49
|
-
minWidth: 40,
|
|
50
|
-
maxWidth: 40
|
|
51
45
|
}
|
|
52
46
|
});
|
|
53
47
|
exports.staticClasses = staticClasses;
|
|
@@ -26,10 +26,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses(
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
collapsed: {
|
|
29
|
-
width: "
|
|
30
|
-
"&$childData": {
|
|
31
|
-
width: "66px"
|
|
32
|
-
},
|
|
29
|
+
width: "fit-content",
|
|
33
30
|
"& > :first-of-type:not(:last-child)": {
|
|
34
31
|
padding: uikitStyles.theme.spacing("sm", "xs", "xs", "xs")
|
|
35
32
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const styled = require("@emotion/styled");
|
|
4
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
|
+
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
6
|
+
const SvgBase = styled__default.default("svg")({
|
|
7
|
+
display: "inline-block",
|
|
8
|
+
fill: "currentcolor",
|
|
9
|
+
width: "1em",
|
|
10
|
+
height: "1em",
|
|
11
|
+
fontSize: 16,
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
transition: "rotate 0.2s ease"
|
|
14
|
+
});
|
|
15
|
+
exports.SvgBase = SvgBase;
|
|
@@ -7,19 +7,15 @@ const { staticClasses, useClasses } = createClasses("HvBaseCheckBox", {
|
|
|
7
7
|
width: 32,
|
|
8
8
|
minWidth: 32,
|
|
9
9
|
height: 32,
|
|
10
|
-
borderRadius: theme.radii.
|
|
10
|
+
borderRadius: theme.radii.round,
|
|
11
11
|
cursor: "pointer",
|
|
12
|
-
"
|
|
13
|
-
backgroundColor: theme.colors.bgHover
|
|
14
|
-
borderRadius: theme.radii.round
|
|
12
|
+
":hover": {
|
|
13
|
+
backgroundColor: theme.colors.bgHover
|
|
15
14
|
}
|
|
16
15
|
},
|
|
17
16
|
disabled: {
|
|
18
17
|
cursor: "not-allowed",
|
|
19
|
-
pointerEvents: "initial"
|
|
20
|
-
"&:hover": {
|
|
21
|
-
backgroundColor: "transparent"
|
|
22
|
-
}
|
|
18
|
+
pointerEvents: "initial"
|
|
23
19
|
},
|
|
24
20
|
focusVisible: {
|
|
25
21
|
"& svg": {
|
|
@@ -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.
|
|
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.round,\n cursor: \"pointer\",\n \":hover\": {\n backgroundColor: theme.colors.bgHover,\n },\n },\n disabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"initial\",\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,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,GAAG;AAAA,IAAA;AAAA,EAEP;AAAA,EACA,MAAM,CAAC;AAAA,EACP,SAAS,CAAC;AAAA,EACV,eAAe,CAAC;AAAA,EAChB,UAAU,CAAA;AACZ,CAAC;"}
|
|
@@ -2,14 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
4
4
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
5
|
+
import { SvgBase } from "../icons.js";
|
|
5
6
|
const { useClasses } = createClasses("HvCheckBoxIcon", {
|
|
6
7
|
root: {
|
|
7
|
-
display: "inline-flex",
|
|
8
|
-
fill: "currentcolor",
|
|
9
|
-
width: "1em",
|
|
10
|
-
height: "1em",
|
|
11
|
-
flexShrink: 0,
|
|
12
|
-
fontSize: 16,
|
|
13
8
|
color: theme.colors.bgContainer,
|
|
14
9
|
borderRadius: theme.radii.base,
|
|
15
10
|
border: `1px solid ${theme.colors.borderStrong}`
|
|
@@ -20,7 +15,8 @@ const { useClasses } = createClasses("HvCheckBoxIcon", {
|
|
|
20
15
|
color: theme.colors.bgContainer
|
|
21
16
|
},
|
|
22
17
|
indeterminate: {
|
|
23
|
-
color: theme.colors.textSubtle
|
|
18
|
+
color: theme.colors.textSubtle,
|
|
19
|
+
backgroundColor: theme.colors.bgContainer
|
|
24
20
|
},
|
|
25
21
|
semantic: {
|
|
26
22
|
"&[data-variant=indeterminate]": {
|
|
@@ -59,7 +55,7 @@ const HvCheckBoxIcon = (props) => {
|
|
|
59
55
|
}
|
|
60
56
|
}, [variant]);
|
|
61
57
|
return /* @__PURE__ */ jsx(
|
|
62
|
-
|
|
58
|
+
SvgBase,
|
|
63
59
|
{
|
|
64
60
|
viewBox: "0 0 14 14",
|
|
65
61
|
"data-variant": variant,
|
|
@@ -1 +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
|
|
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 { SvgBase } from \"../icons\";\nimport type { HvBaseCheckBoxProps } from \"./BaseCheckBox\";\n\nconst { useClasses } = createClasses(\"HvCheckBoxIcon\", {\n root: {\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 backgroundColor: theme.colors.bgContainer,\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 <SvgBase\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 </SvgBase>\n );\n};\n"],"names":[],"mappings":";;;;;AAWA,MAAM,EAAE,WAAA,IAAe,cAAc,kBAAkB;AAAA,EACrD,MAAM;AAAA,IACJ,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,IACpB,iBAAiB,MAAM,OAAO;AAAA,EAChC;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;"}
|
|
@@ -24,6 +24,7 @@ const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
|
24
24
|
display: "inline-flex",
|
|
25
25
|
width: "100%",
|
|
26
26
|
position: "relative",
|
|
27
|
+
overflow: "hidden",
|
|
27
28
|
margin: 0,
|
|
28
29
|
borderRadius: theme.radii.base,
|
|
29
30
|
height: "32px",
|
|
@@ -32,6 +33,8 @@ const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
|
32
33
|
boxSizing: "border-box",
|
|
33
34
|
backgroundColor: theme.colors.bgContainer,
|
|
34
35
|
fontFamily: theme.fontFamily.body,
|
|
36
|
+
alignItems: "stretch",
|
|
37
|
+
...theme.typography.body,
|
|
35
38
|
":hover:not($disabled,$invalid,$readOnly)": {
|
|
36
39
|
borderColor: theme.colors.primary
|
|
37
40
|
},
|
|
@@ -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 // 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,MAAM;AAAA;AAAA;AAAA,IAGJ,sBAAsB;AAAA,MACpB,eAAe;AAAA,MACf,6DAA6D;AAAA,QAC3D,kBAAkB;AAAA,QAClB,QAAQ;AAAA,MAAA;AAAA,IAEZ;AAAA;AAAA,IAGA,4CAA4C;AAAA,MAC1C,SAAS;AAAA,IACX;AAAA;AAAA,IAGA,0MACE;AAAA,MACE,SAAS;AAAA,IACX;AAAA;AAAA,IAGF,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc,MAAM,MAAM;AAAA,IAC1B,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,aAAa,MAAM,OAAO;AAAA,IAC1B,WAAW;AAAA,IACX,iBAAiB,MAAM,OAAO;AAAA,IAC9B,YAAY,MAAM,WAAW;AAAA,
|
|
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 overflow: \"hidden\",\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 alignItems: \"stretch\",\n ...theme.typography.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,MAAM;AAAA;AAAA;AAAA,IAGJ,sBAAsB;AAAA,MACpB,eAAe;AAAA,MACf,6DAA6D;AAAA,QAC3D,kBAAkB;AAAA,QAClB,QAAQ;AAAA,MAAA;AAAA,IAEZ;AAAA;AAAA,IAGA,4CAA4C;AAAA,MAC1C,SAAS;AAAA,IACX;AAAA;AAAA,IAGA,0MACE;AAAA,MACE,SAAS;AAAA,IACX;AAAA;AAAA,IAGF,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc,MAAM,MAAM;AAAA,IAC1B,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,aAAa,MAAM,OAAO;AAAA,IAC1B,WAAW;AAAA,IACX,iBAAiB,MAAM,OAAO;AAAA,IAC9B,YAAY,MAAM,WAAW;AAAA,IAC7B,YAAY;AAAA,IACZ,GAAG,MAAM,WAAW;AAAA,IAEpB,4CAA4C;AAAA,MAC1C,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IACA,gCAAgC;AAAA,MAC9B,GAAG;AAAA,IAAA;AAAA,EAEP;AAAA,EACA,UAAU;AAAA,IACR,iBAAiB,MAAM,OAAO;AAAA,IAC9B,aAAa,MAAM,OAAO;AAAA,IAE1B,QAAQ;AAAA,IAER,cAAc;AAAA,MACZ,mBAAmB;AAAA,IAAA;AAAA,EAEvB;AAAA,EACA,SAAS;AAAA,IACP,aAAa,MAAM,KAAK;AAAA,EAC1B;AAAA,EACA,WAAW;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IAER,YAAY;AAAA,MACV,cAAc,MAAM,MAAM;AAAA,MAC1B,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,SAAS;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,WAAW,EAAE,OAAO,OAAO;AAAA,EAC3B,UAAU;AAAA,IACR,aAAa,MAAM,OAAO;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,SAAS,CAAC;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;"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
3
3
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
4
|
+
import { SvgBase } from "../icons.js";
|
|
4
5
|
const { useClasses } = createClasses("HvRadioIcon", {
|
|
5
6
|
root: {
|
|
6
|
-
display: "inline-flex",
|
|
7
|
-
fill: "currentcolor",
|
|
8
|
-
width: "1em",
|
|
9
|
-
height: "1em",
|
|
10
|
-
flexShrink: 0,
|
|
11
|
-
fontSize: 16,
|
|
12
7
|
borderRadius: theme.radii.full,
|
|
13
8
|
border: `1px solid ${theme.colors.borderStrong}`,
|
|
14
9
|
backgroundColor: theme.colors.bgContainer
|
|
@@ -37,7 +32,7 @@ const HvRadioIcon = (props) => {
|
|
|
37
32
|
} = useDefaultProps("HvRadioIcon", props);
|
|
38
33
|
const { classes, cx } = useClasses(classesProp, false);
|
|
39
34
|
return /* @__PURE__ */ jsx(
|
|
40
|
-
|
|
35
|
+
SvgBase,
|
|
41
36
|
{
|
|
42
37
|
viewBox: "0 0 16 16",
|
|
43
38
|
className: cx(classes.root, className, {
|
|
@@ -1 +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
|
|
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 { SvgBase } from \"../icons\";\nimport type { HvBaseRadioProps } from \"./BaseRadio\";\n\nconst { useClasses } = createClasses(\"HvRadioIcon\", {\n root: {\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 <SvgBase\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 </SvgBase>\n );\n};\n"],"names":[],"mappings":";;;;AAUA,MAAM,EAAE,WAAA,IAAe,cAAc,eAAe;AAAA,EAClD,MAAM;AAAA,IACJ,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;"}
|
|
@@ -153,6 +153,7 @@ const HvCheckBox = forwardRef(
|
|
|
153
153
|
/* @__PURE__ */ jsx(
|
|
154
154
|
HvLabel,
|
|
155
155
|
{
|
|
156
|
+
noWrap: true,
|
|
156
157
|
id: setId(elementId, "label"),
|
|
157
158
|
htmlFor: setId(elementId, "input"),
|
|
158
159
|
label,
|
|
@@ -169,7 +170,6 @@ const HvCheckBox = forwardRef(
|
|
|
169
170
|
id: setId(elementId, "error"),
|
|
170
171
|
disableAdornment: !hasLabel,
|
|
171
172
|
hideText: !hasLabel,
|
|
172
|
-
disableBorder: true,
|
|
173
173
|
children: validationMessage
|
|
174
174
|
}
|
|
175
175
|
)
|