@hitachivantara/uikit-react-core 5.87.1 → 5.87.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/BaseInput/BaseInput.cjs +44 -83
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +68 -142
- package/dist/cjs/BaseRadio/BaseRadio.styles.cjs +7 -6
- package/dist/cjs/BulkActions/BulkActions.cjs +9 -18
- package/dist/cjs/Calendar/CalendarHeader/CalendarHeader.cjs +0 -6
- package/dist/cjs/Calendar/CalendarHeader/CalendarHeader.styles.cjs +1 -5
- package/dist/cjs/CheckBoxGroup/CheckBoxGroup.cjs +9 -9
- package/dist/cjs/Dropdown/Dropdown.cjs +8 -10
- package/dist/cjs/FilterGroup/RightPanel/RightPanel.cjs +9 -10
- package/dist/cjs/InlineEditor/InlineEditor.cjs +10 -14
- package/dist/cjs/InlineEditor/InlineEditor.styles.cjs +13 -36
- package/dist/cjs/Input/Input.cjs +4 -5
- package/dist/cjs/Input/Input.styles.cjs +5 -19
- package/dist/cjs/List/List.cjs +11 -11
- package/dist/cjs/Pagination/Pagination.styles.cjs +1 -0
- package/dist/cjs/Radio/Radio.cjs +2 -1
- package/dist/cjs/Radio/Radio.styles.cjs +7 -27
- package/dist/cjs/Select/Select.styles.cjs +1 -1
- package/dist/cjs/Table/TableCell/TableCell.styles.cjs +14 -14
- package/dist/cjs/Table/TableHeader/TableHeader.styles.cjs +16 -15
- package/dist/cjs/TagsInput/TagsInput.styles.cjs +3 -8
- package/dist/cjs/TextArea/TextArea.styles.cjs +1 -1
- package/dist/cjs/TimePicker/Unit/Unit.cjs +0 -1
- package/dist/cjs/TimePicker/Unit/Unit.styles.cjs +0 -3
- package/dist/cjs/utils/CounterLabel.cjs +16 -0
- package/dist/esm/BaseInput/BaseInput.js +45 -84
- package/dist/esm/BaseInput/BaseInput.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js +68 -142
- package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/BaseRadio/BaseRadio.styles.js +7 -6
- package/dist/esm/BaseRadio/BaseRadio.styles.js.map +1 -1
- package/dist/esm/BulkActions/BulkActions.js +10 -19
- package/dist/esm/BulkActions/BulkActions.js.map +1 -1
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js +0 -6
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js +1 -5
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/dist/esm/CheckBoxGroup/CheckBoxGroup.js +10 -10
- package/dist/esm/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js +8 -10
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/FilterGroup/RightPanel/RightPanel.js +9 -10
- package/dist/esm/FilterGroup/RightPanel/RightPanel.js.map +1 -1
- package/dist/esm/InlineEditor/InlineEditor.js +10 -14
- package/dist/esm/InlineEditor/InlineEditor.js.map +1 -1
- package/dist/esm/InlineEditor/InlineEditor.styles.js +13 -36
- package/dist/esm/InlineEditor/InlineEditor.styles.js.map +1 -1
- package/dist/esm/Input/Input.js +4 -5
- package/dist/esm/Input/Input.js.map +1 -1
- package/dist/esm/Input/Input.styles.js +5 -19
- package/dist/esm/Input/Input.styles.js.map +1 -1
- package/dist/esm/List/List.js +11 -11
- package/dist/esm/List/List.js.map +1 -1
- package/dist/esm/Pagination/Pagination.styles.js +1 -0
- package/dist/esm/Pagination/Pagination.styles.js.map +1 -1
- package/dist/esm/Radio/Radio.js +2 -1
- package/dist/esm/Radio/Radio.js.map +1 -1
- package/dist/esm/Radio/Radio.styles.js +7 -27
- package/dist/esm/Radio/Radio.styles.js.map +1 -1
- package/dist/esm/Select/Select.styles.js +1 -1
- package/dist/esm/Select/Select.styles.js.map +1 -1
- package/dist/esm/Table/TableCell/TableCell.styles.js +14 -14
- package/dist/esm/Table/TableCell/TableCell.styles.js.map +1 -1
- package/dist/esm/Table/TableHeader/TableHeader.styles.js +16 -15
- package/dist/esm/Table/TableHeader/TableHeader.styles.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.styles.js +3 -8
- package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
- package/dist/esm/TextArea/TextArea.styles.js +1 -1
- package/dist/esm/TextArea/TextArea.styles.js.map +1 -1
- package/dist/esm/TimePicker/Unit/Unit.js +0 -1
- package/dist/esm/TimePicker/Unit/Unit.js.map +1 -1
- package/dist/esm/TimePicker/Unit/Unit.styles.js +0 -3
- package/dist/esm/TimePicker/Unit/Unit.styles.js.map +1 -1
- package/dist/esm/utils/CounterLabel.js +16 -0
- package/dist/esm/utils/CounterLabel.js.map +1 -0
- package/dist/types/index.d.ts +29 -31
- package/package.json +6 -6
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const CounterLabel = ({
|
|
5
|
+
selected,
|
|
6
|
+
total,
|
|
7
|
+
conjunctionLabel = "/",
|
|
8
|
+
...others
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { ...others, children: [
|
|
11
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: selected }),
|
|
12
|
+
" ",
|
|
13
|
+
` ${conjunctionLabel} ${total}`
|
|
14
|
+
] });
|
|
15
|
+
};
|
|
16
|
+
exports.CounterLabel = CounterLabel;
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext } from "react";
|
|
3
|
-
import { css, Global } from "@emotion/react";
|
|
4
3
|
import MuiInputBase from "@mui/material/InputBase";
|
|
5
4
|
import { useForkRef } from "@mui/material/utils";
|
|
6
5
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
7
|
-
import { theme } from "@hitachivantara/uikit-styles";
|
|
8
6
|
import { useClasses } from "./BaseInput.styles.js";
|
|
9
7
|
import { staticClasses } from "./BaseInput.styles.js";
|
|
10
8
|
import { HvFormElementContext, HvFormElementDescriptorsContext } from "../FormElement/context.js";
|
|
11
9
|
import { buildFormElementPropsFromContext, buildAriaPropsFromContext } from "../FormElement/utils.js";
|
|
12
|
-
const baseInputStyles = css({
|
|
13
|
-
"input:-webkit-autofill": {
|
|
14
|
-
WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.atmo1} inset`,
|
|
15
|
-
WebkitTextFillColor: theme.colors.secondary
|
|
16
|
-
},
|
|
17
|
-
// Clears number input up/down arrows in Chrome and Firefox
|
|
18
|
-
"input::-webkit-outer-spin-button,input::-webkit-inner-spin-button": {
|
|
19
|
-
WebkitAppearance: "none",
|
|
20
|
-
margin: 0
|
|
21
|
-
},
|
|
22
|
-
"input[type=number]": {
|
|
23
|
-
MozAppearance: "textfield"
|
|
24
|
-
},
|
|
25
|
-
// Clears time input clock in Chrome
|
|
26
|
-
"input::-webkit-calendar-picker-indicator": {
|
|
27
|
-
display: "none"
|
|
28
|
-
},
|
|
29
|
-
// Clears search input clear button in Chrome
|
|
30
|
-
"input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration": {
|
|
31
|
-
display: "none"
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
10
|
const HvBaseInput = forwardRef(function HvBaseInput2(props, ref) {
|
|
35
11
|
const {
|
|
36
12
|
classes: classesProp,
|
|
@@ -47,7 +23,7 @@ const HvBaseInput = forwardRef(function HvBaseInput2(props, ref) {
|
|
|
47
23
|
placeholder,
|
|
48
24
|
multiline,
|
|
49
25
|
resizable,
|
|
50
|
-
invalid,
|
|
26
|
+
invalid: invalidProp,
|
|
51
27
|
inputRef,
|
|
52
28
|
inputProps = {},
|
|
53
29
|
...others
|
|
@@ -62,72 +38,57 @@ const HvBaseInput = forwardRef(function HvBaseInput2(props, ref) {
|
|
|
62
38
|
formElementContext
|
|
63
39
|
);
|
|
64
40
|
const forkedRef = useForkRef(ref, inputRef);
|
|
65
|
-
const
|
|
41
|
+
const invalid = invalidProp || formElementProps.status === "invalid";
|
|
66
42
|
const formElementDescriptorsContext = useContext(
|
|
67
43
|
HvFormElementDescriptorsContext
|
|
68
44
|
);
|
|
69
45
|
const ariaProps = buildAriaPropsFromContext(
|
|
70
46
|
inputProps,
|
|
71
47
|
formElementDescriptorsContext,
|
|
72
|
-
|
|
48
|
+
invalid,
|
|
73
49
|
id
|
|
74
50
|
);
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
required: formElementProps.required,
|
|
117
|
-
...inputProps,
|
|
118
|
-
...ariaProps
|
|
119
|
-
},
|
|
120
|
-
inputRef: forkedRef,
|
|
121
|
-
multiline,
|
|
122
|
-
rows: 10,
|
|
123
|
-
...others
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
!multiline && /* @__PURE__ */ jsx("div", { role: "presentation", className: classes.inputBorderContainer })
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
] });
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
MuiInputBase,
|
|
53
|
+
{
|
|
54
|
+
id,
|
|
55
|
+
name: formElementProps.name,
|
|
56
|
+
value,
|
|
57
|
+
defaultValue,
|
|
58
|
+
placeholder,
|
|
59
|
+
readOnly: !!formElementProps.readOnly,
|
|
60
|
+
disabled: formElementProps.disabled,
|
|
61
|
+
onChange: (event) => onChange?.(event, event.target.value),
|
|
62
|
+
className: cx(classes.root, classes.inputRoot, className, {
|
|
63
|
+
[classes.inputRootMultiline]: multiline,
|
|
64
|
+
[classes.multiline]: multiline,
|
|
65
|
+
[classes.inputRootInvalid]: invalid,
|
|
66
|
+
[classes.invalid]: invalid,
|
|
67
|
+
[classes.inputRootReadOnly]: formElementProps.readOnly,
|
|
68
|
+
[classes.readOnly]: formElementProps.readOnly,
|
|
69
|
+
[classes.inputRootDisabled]: formElementProps.disabled,
|
|
70
|
+
[classes.disabled]: formElementProps.disabled
|
|
71
|
+
}),
|
|
72
|
+
classes: {
|
|
73
|
+
focused: cx(classes.focused, classes.inputRootFocused),
|
|
74
|
+
input: cx(classes.input, {
|
|
75
|
+
[classes.inputResizable]: !formElementProps.disabled && resizable,
|
|
76
|
+
[classes.inputDisabled]: formElementProps.disabled,
|
|
77
|
+
[classes.inputReadOnly]: formElementProps.readOnly
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
inputProps: {
|
|
81
|
+
// Avoid the required attribute at the root node
|
|
82
|
+
required: formElementProps.required,
|
|
83
|
+
...inputProps,
|
|
84
|
+
...ariaProps
|
|
85
|
+
},
|
|
86
|
+
inputRef: forkedRef,
|
|
87
|
+
multiline,
|
|
88
|
+
...multiline ? { rows: 10 } : { type },
|
|
89
|
+
...others
|
|
90
|
+
}
|
|
91
|
+
);
|
|
131
92
|
});
|
|
132
93
|
export {
|
|
133
94
|
HvBaseInput,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","sources":["../../../src/BaseInput/BaseInput.tsx"],"sourcesContent":["import { forwardRef, useContext } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"BaseInput.js","sources":["../../../src/BaseInput/BaseInput.tsx"],"sourcesContent":["import { forwardRef, useContext } from \"react\";\nimport MuiInputBase, { type InputBaseProps } from \"@mui/material/InputBase\";\nimport { useForkRef } from \"@mui/material/utils\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n buildAriaPropsFromContext,\n buildFormElementPropsFromContext,\n HvFormElementContext,\n HvFormElementDescriptorsContext,\n} from \"../FormElement\";\nimport { staticClasses, useClasses } from \"./BaseInput.styles\";\n\nexport { staticClasses as baseInputClasses };\n\nexport type HvBaseInputClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBaseInputProps\n extends Omit<\n InputBaseProps,\n \"onChange\" | \"classes\" | \"ref\" | \"color\" | \"size\"\n > {\n /** The input name. */\n name?: string;\n /** The value of the input, when controlled. */\n value?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** The initial value of the input, when uncontrolled. */\n defaultValue?: React.InputHTMLAttributes<HTMLInputElement>[\"value\"];\n /** If `true` the input is disabled. */\n disabled?: boolean;\n /** Indicates that the input is not editable. */\n readOnly?: boolean;\n /** If true, the input element will be required. */\n required?: boolean;\n /** The function that will be executed onChange, allows modification of the input,\n * it receives the value. If a new value should be presented it must returned it. */\n onChange?: (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n value: string,\n ) => void;\n /** If true, a textarea element will be rendered. */\n multiline?: boolean;\n /** If true and multiline is also true the textarea element will be resizable. */\n resizable?: boolean;\n /** Denotes if the input is in an invalid state. */\n invalid?: boolean;\n /**\n * Allows passing a ref to the underlying input\n * @deprecated Use `ref` directly instead\n * */\n inputRef?: InputBaseProps[\"inputRef\"];\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBaseInputClasses;\n}\n\n/**\n * An Input component that only posses the most basic functionalities.\n * It should be used alongside the other form elements to construct a proper accessible form.\n */\nexport const HvBaseInput = forwardRef<\n // no-indent\n React.ElementRef<\"input\">,\n HvBaseInputProps\n>(function HvBaseInput(props, ref) {\n const {\n classes: classesProp,\n className = \"\",\n id,\n name,\n value,\n defaultValue,\n required,\n readOnly,\n disabled,\n onChange,\n type = \"text\",\n placeholder,\n multiline,\n resizable,\n invalid: invalidProp,\n inputRef,\n inputProps = {},\n ...others\n } = useDefaultProps(\"HvBaseInput\", props);\n const { classes, cx } = useClasses(classesProp);\n const formElementContext = useContext(HvFormElementContext);\n const formElementProps = buildFormElementPropsFromContext(\n name,\n disabled,\n readOnly,\n required,\n formElementContext,\n );\n\n const forkedRef = useForkRef(ref, inputRef);\n\n const invalid = invalidProp || formElementProps.status === \"invalid\";\n\n const formElementDescriptorsContext = useContext(\n HvFormElementDescriptorsContext,\n );\n const ariaProps = buildAriaPropsFromContext(\n inputProps,\n formElementDescriptorsContext,\n invalid,\n id,\n );\n\n return (\n <MuiInputBase\n id={id}\n name={formElementProps.name}\n value={value}\n defaultValue={defaultValue}\n placeholder={placeholder}\n readOnly={!!formElementProps.readOnly}\n disabled={formElementProps.disabled}\n onChange={(event) => onChange?.(event, event.target.value)}\n className={cx(classes.root, classes.inputRoot, className, {\n [classes.inputRootMultiline]: multiline,\n [classes.multiline]: multiline,\n [classes.inputRootInvalid]: invalid,\n [classes.invalid]: invalid,\n [classes.inputRootReadOnly]: formElementProps.readOnly,\n [classes.readOnly]: formElementProps.readOnly,\n [classes.inputRootDisabled]: formElementProps.disabled,\n [classes.disabled]: formElementProps.disabled,\n })}\n classes={{\n focused: cx(classes.focused, classes.inputRootFocused),\n input: cx(classes.input, {\n [classes.inputResizable]: !formElementProps.disabled && resizable,\n [classes.inputDisabled]: formElementProps.disabled,\n [classes.inputReadOnly]: formElementProps.readOnly,\n }),\n }}\n inputProps={{\n // Avoid the required attribute at the root node\n required: formElementProps.required,\n ...inputProps,\n ...ariaProps,\n }}\n inputRef={forkedRef}\n multiline={multiline}\n {...(multiline ? { rows: 10 } : { type })}\n {...others}\n />\n );\n});\n"],"names":["HvBaseInput"],"mappings":";;;;;;;;;AA8DO,MAAM,cAAc,WAIzB,SAASA,aAAY,OAAO,KAAK;AAC3B,QAAA;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,aAAa,CAAC;AAAA,IACd,GAAG;AAAA,EAAA,IACD,gBAAgB,eAAe,KAAK;AACxC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AACxC,QAAA,qBAAqB,WAAW,oBAAoB;AAC1D,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEM,QAAA,YAAY,WAAW,KAAK,QAAQ;AAEpC,QAAA,UAAU,eAAe,iBAAiB,WAAW;AAE3D,QAAM,gCAAgC;AAAA,IACpC;AAAA,EACF;AACA,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAM,iBAAiB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,CAAC,iBAAiB;AAAA,MAC7B,UAAU,iBAAiB;AAAA,MAC3B,UAAU,CAAC,UAAU,WAAW,OAAO,MAAM,OAAO,KAAK;AAAA,MACzD,WAAW,GAAG,QAAQ,MAAM,QAAQ,WAAW,WAAW;AAAA,QACxD,CAAC,QAAQ,kBAAkB,GAAG;AAAA,QAC9B,CAAC,QAAQ,SAAS,GAAG;AAAA,QACrB,CAAC,QAAQ,gBAAgB,GAAG;AAAA,QAC5B,CAAC,QAAQ,OAAO,GAAG;AAAA,QACnB,CAAC,QAAQ,iBAAiB,GAAG,iBAAiB;AAAA,QAC9C,CAAC,QAAQ,QAAQ,GAAG,iBAAiB;AAAA,QACrC,CAAC,QAAQ,iBAAiB,GAAG,iBAAiB;AAAA,QAC9C,CAAC,QAAQ,QAAQ,GAAG,iBAAiB;AAAA,MAAA,CACtC;AAAA,MACD,SAAS;AAAA,QACP,SAAS,GAAG,QAAQ,SAAS,QAAQ,gBAAgB;AAAA,QACrD,OAAO,GAAG,QAAQ,OAAO;AAAA,UACvB,CAAC,QAAQ,cAAc,GAAG,CAAC,iBAAiB,YAAY;AAAA,UACxD,CAAC,QAAQ,aAAa,GAAG,iBAAiB;AAAA,UAC1C,CAAC,QAAQ,aAAa,GAAG,iBAAiB;AAAA,QAC3C,CAAA;AAAA,MACH;AAAA,MACA,YAAY;AAAA;AAAA,QAEV,UAAU,iBAAiB;AAAA,QAC3B,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACC,GAAI,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK;AAAA,MACtC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ,CAAC;"}
|
|
@@ -3,176 +3,99 @@ import { theme } from "@hitachivantara/uikit-styles";
|
|
|
3
3
|
import { outlineStyles } from "../utils/focusUtils.js";
|
|
4
4
|
const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
5
5
|
root: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"& $inputRoot": {
|
|
18
|
-
backgroundColor: theme.colors.atmo2,
|
|
19
|
-
borderColor: theme.colors.secondary_60
|
|
20
|
-
},
|
|
21
|
-
"& $inputBorderContainer": {
|
|
22
|
-
backgroundColor: theme.colors.atmo4
|
|
23
|
-
},
|
|
24
|
-
"&:hover $inputBorderContainer": {
|
|
25
|
-
backgroundColor: theme.colors.atmo4
|
|
26
|
-
},
|
|
27
|
-
"&& $input": {
|
|
28
|
-
color: theme.colors.secondary_60,
|
|
29
|
-
WebkitTextFillColor: theme.colors.secondary_60
|
|
30
|
-
},
|
|
31
|
-
"& $inputRootMultiline": {
|
|
32
|
-
"& $input": {
|
|
33
|
-
backgroundColor: theme.colors.atmo2,
|
|
34
|
-
border: `1px solid ${theme.colors.secondary_60}`
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"&:hover $inputRootMultiline": {
|
|
38
|
-
"& $input": {
|
|
39
|
-
backgroundColor: theme.colors.atmo2,
|
|
40
|
-
border: `1px solid ${theme.colors.secondary_60}`
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
invalid: {
|
|
45
|
-
"&:not(.disabled)": {
|
|
46
|
-
"& $inputBorderContainer": {
|
|
47
|
-
backgroundColor: theme.colors.negative_120
|
|
48
|
-
},
|
|
49
|
-
"&:hover $inputBorderContainer": {
|
|
50
|
-
backgroundColor: theme.colors.negative_120
|
|
51
|
-
},
|
|
52
|
-
"& $inputRootMultiline": {
|
|
53
|
-
"& $input": {
|
|
54
|
-
border: `1px solid ${theme.colors.negative_120}`
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"&:hover $inputRootMultiline": {
|
|
58
|
-
"& $input": {
|
|
59
|
-
border: `1px solid ${theme.colors.negative_120}`
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"&:focus-within $inputRootMultiline": {
|
|
63
|
-
"& $input": {
|
|
64
|
-
border: `1px solid ${theme.colors.negative_120}`
|
|
65
|
-
}
|
|
6
|
+
// #region `input` style reset
|
|
7
|
+
"input:-webkit-autofill": {
|
|
8
|
+
WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.atmo1} inset`,
|
|
9
|
+
WebkitTextFillColor: theme.colors.secondary
|
|
10
|
+
},
|
|
11
|
+
// Clears number input up/down arrows in Chrome and Firefox
|
|
12
|
+
"input[type=number]": {
|
|
13
|
+
MozAppearance: "textfield",
|
|
14
|
+
"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button": {
|
|
15
|
+
WebkitAppearance: "none",
|
|
16
|
+
margin: 0
|
|
66
17
|
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
resizable: { width: "auto" },
|
|
70
|
-
readOnly: {
|
|
71
|
-
"& $inputBorderContainer": {
|
|
72
|
-
backgroundColor: "transparent"
|
|
73
18
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"&:focus-within $inputBorderContainer": {
|
|
78
|
-
backgroundColor: "transparent"
|
|
79
|
-
},
|
|
80
|
-
"& $inputRootMultiline": {
|
|
81
|
-
"& $input": {
|
|
82
|
-
border: `1px solid ${theme.colors.secondary_60}`,
|
|
83
|
-
backgroundColor: theme.colors.atmo2
|
|
84
|
-
}
|
|
19
|
+
// Clears time input clock in Chrome
|
|
20
|
+
"input::-webkit-calendar-picker-indicator": {
|
|
21
|
+
display: "none"
|
|
85
22
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
backgroundColor: theme.colors.atmo2
|
|
90
|
-
}
|
|
23
|
+
// Clears search input clear button in Chrome
|
|
24
|
+
"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": {
|
|
25
|
+
display: "none"
|
|
91
26
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
border: `1px solid ${theme.colors.secondary_60}`,
|
|
95
|
-
backgroundColor: theme.colors.atmo2
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
inputBorderContainer: {
|
|
100
|
-
position: "absolute",
|
|
101
|
-
width: "calc(100% - 4px)",
|
|
102
|
-
height: "0px",
|
|
103
|
-
top: "31px",
|
|
104
|
-
left: "2px",
|
|
105
|
-
backgroundColor: theme.colors.atmo4
|
|
106
|
-
},
|
|
107
|
-
inputRootInvalid: { borderColor: theme.colors.negative_120 },
|
|
108
|
-
inputRootReadOnly: {
|
|
109
|
-
borderColor: theme.colors.secondary_60,
|
|
110
|
-
backgroundColor: theme.colors.atmo2
|
|
111
|
-
},
|
|
112
|
-
inputRoot: {
|
|
113
|
-
margin: 0,
|
|
27
|
+
// #endregion
|
|
28
|
+
display: "inline-flex",
|
|
114
29
|
width: "100%",
|
|
30
|
+
position: "relative",
|
|
31
|
+
margin: 0,
|
|
115
32
|
borderRadius: theme.radii.base,
|
|
116
33
|
height: "32px",
|
|
117
|
-
|
|
34
|
+
borderWidth: 1,
|
|
35
|
+
borderColor: theme.colors.secondary,
|
|
118
36
|
boxSizing: "border-box",
|
|
119
37
|
backgroundColor: theme.colors.atmo1,
|
|
120
38
|
fontFamily: theme.fontFamily.body,
|
|
121
|
-
"
|
|
39
|
+
":hover:not($disabled,$invalid,$readOnly)": {
|
|
122
40
|
borderColor: theme.colors.primary
|
|
123
41
|
},
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
"&::before": {
|
|
128
|
-
borderBottom: "none"
|
|
129
|
-
},
|
|
130
|
-
"&::after": {
|
|
131
|
-
borderBottom: "none"
|
|
42
|
+
":focus-within:not($disabled)": {
|
|
43
|
+
...outlineStyles
|
|
132
44
|
}
|
|
133
45
|
},
|
|
134
|
-
|
|
135
|
-
backgroundColor: theme.colors.
|
|
136
|
-
|
|
137
|
-
"&:hover": {
|
|
138
|
-
backgroundColor: theme.colors.atmo1
|
|
139
|
-
},
|
|
140
|
-
"&$inputRootReadOnly": {
|
|
141
|
-
backgroundColor: theme.colors.atmo2
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
inputRootDisabled: {
|
|
46
|
+
disabled: {
|
|
47
|
+
backgroundColor: theme.colors.atmo2,
|
|
48
|
+
borderColor: theme.colors.secondary_60,
|
|
145
49
|
cursor: "not-allowed",
|
|
146
50
|
"&&::before": {
|
|
147
51
|
borderBottomStyle: "none"
|
|
148
52
|
}
|
|
149
53
|
},
|
|
150
|
-
|
|
54
|
+
invalid: {
|
|
55
|
+
borderColor: theme.colors.negative_120
|
|
56
|
+
},
|
|
57
|
+
multiline: {
|
|
151
58
|
padding: 0,
|
|
152
|
-
backgroundColor: "transparent",
|
|
153
59
|
overflow: "auto",
|
|
154
|
-
border: "none",
|
|
155
60
|
height: "auto",
|
|
156
61
|
"& $input": {
|
|
157
|
-
border: `1px solid ${theme.colors.secondary}`,
|
|
158
62
|
borderRadius: theme.radii.base,
|
|
159
|
-
backgroundColor: theme.colors.atmo1,
|
|
160
63
|
height: "auto",
|
|
161
64
|
minHeight: "21px",
|
|
162
65
|
padding: "5px 10px",
|
|
163
66
|
overflow: "auto",
|
|
164
|
-
|
|
165
|
-
marginRight: "0px",
|
|
166
|
-
"&:hover": {
|
|
167
|
-
border: `1px solid ${theme.colors.primary}`
|
|
168
|
-
}
|
|
67
|
+
margin: 0
|
|
169
68
|
}
|
|
170
69
|
},
|
|
70
|
+
resizable: { width: "auto" },
|
|
71
|
+
readOnly: {
|
|
72
|
+
borderColor: theme.colors.secondary_60,
|
|
73
|
+
backgroundColor: theme.colors.atmo2
|
|
74
|
+
},
|
|
75
|
+
focused: {},
|
|
76
|
+
/** @deprecated unused. use `::after` instead */
|
|
77
|
+
inputBorderContainer: {},
|
|
78
|
+
/** @deprecated use `classes.invalid` instead */
|
|
79
|
+
inputRootInvalid: { borderColor: theme.colors.negative_120 },
|
|
80
|
+
/** @deprecated use `classes.readOnly` instead */
|
|
81
|
+
inputRootReadOnly: {
|
|
82
|
+
borderColor: theme.colors.secondary_60,
|
|
83
|
+
backgroundColor: theme.colors.atmo2
|
|
84
|
+
},
|
|
85
|
+
/** @deprecated use `classes.root` instead */
|
|
86
|
+
inputRoot: {},
|
|
87
|
+
/** @deprecated unused */
|
|
88
|
+
inputRootFocused: {},
|
|
89
|
+
/** @deprecated use `classes.disabled` instead */
|
|
90
|
+
inputRootDisabled: {},
|
|
91
|
+
/** @deprecated use `classes.multiline` instead */
|
|
92
|
+
inputRootMultiline: {},
|
|
171
93
|
input: {
|
|
172
|
-
height: "
|
|
94
|
+
height: "100%",
|
|
173
95
|
marginLeft: theme.space.xs,
|
|
174
96
|
marginRight: theme.space.xs,
|
|
175
|
-
padding: "
|
|
97
|
+
padding: theme.spacing("5px", 0),
|
|
98
|
+
backgroundColor: "transparent",
|
|
176
99
|
overflow: "hidden",
|
|
177
100
|
textOverflow: "ellipsis",
|
|
178
101
|
outline: "none",
|
|
@@ -182,16 +105,19 @@ const { staticClasses, useClasses } = createClasses("HvBaseInput", {
|
|
|
182
105
|
"&::placeholder": {
|
|
183
106
|
opacity: 1,
|
|
184
107
|
color: theme.colors.secondary_80
|
|
185
|
-
},
|
|
186
|
-
"&::-ms-clear": {
|
|
187
|
-
display: "none"
|
|
188
108
|
}
|
|
189
109
|
},
|
|
190
|
-
inputDisabled: {
|
|
110
|
+
inputDisabled: {
|
|
111
|
+
color: theme.colors.secondary_60,
|
|
112
|
+
WebkitTextFillColor: theme.colors.secondary_60
|
|
113
|
+
},
|
|
191
114
|
inputReadOnly: {
|
|
192
115
|
color: theme.colors.secondary_80
|
|
193
116
|
},
|
|
194
|
-
inputResizable: {
|
|
117
|
+
inputResizable: {
|
|
118
|
+
resize: "both",
|
|
119
|
+
width: "100%"
|
|
120
|
+
}
|
|
195
121
|
});
|
|
196
122
|
export {
|
|
197
123
|
staticClasses,
|
|
@@ -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
|
|
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 \"input:-webkit-autofill\": {\n WebkitBoxShadow: `0 0 0px 1000px ${theme.colors.atmo1} inset`,\n WebkitTextFillColor: theme.colors.secondary,\n },\n\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.secondary,\n boxSizing: \"border-box\",\n backgroundColor: theme.colors.atmo1,\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.atmo2,\n borderColor: theme.colors.secondary_60,\n\n cursor: \"not-allowed\",\n\n \"&&::before\": {\n borderBottomStyle: \"none\",\n },\n },\n invalid: {\n borderColor: theme.colors.negative_120,\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.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n focused: {},\n /** @deprecated unused. use `::after` instead */\n inputBorderContainer: {},\n /** @deprecated use `classes.invalid` instead */\n inputRootInvalid: { borderColor: theme.colors.negative_120 },\n /** @deprecated use `classes.readOnly` instead */\n inputRootReadOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\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: theme.spacing(\"5px\", 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.secondary_80,\n },\n },\n inputDisabled: {\n color: theme.colors.secondary_60,\n WebkitTextFillColor: theme.colors.secondary_60,\n },\n inputReadOnly: {\n color: theme.colors.secondary_80,\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,IAEJ,0BAA0B;AAAA,MACxB,iBAAiB,kBAAkB,MAAM,OAAO,KAAK;AAAA,MACrD,qBAAqB,MAAM,OAAO;AAAA,IACpC;AAAA;AAAA,IAGA,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,IAE7B,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,OAAO;AAAA,EAC5B;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,EAAE,aAAa,MAAM,OAAO,aAAa;AAAA;AAAA,EAE3D,mBAAmB;AAAA,IACjB,aAAa,MAAM,OAAO;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA;AAAA,EAEA,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,MAAM,QAAQ,OAAO,CAAC;AAAA,IAC/B,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;"}
|
|
@@ -16,7 +16,8 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
16
16
|
width: 16,
|
|
17
17
|
height: 16,
|
|
18
18
|
borderRadius: theme.radii.circle,
|
|
19
|
-
|
|
19
|
+
borderWidth: 1,
|
|
20
|
+
borderColor: theme.colors.secondary,
|
|
20
21
|
backgroundColor: theme.colors.atmo1
|
|
21
22
|
},
|
|
22
23
|
borderRadius: 0
|
|
@@ -25,7 +26,7 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
25
26
|
cursor: "not-allowed",
|
|
26
27
|
pointerEvents: "initial",
|
|
27
28
|
"& svg": {
|
|
28
|
-
|
|
29
|
+
borderColor: theme.colors.secondary_60,
|
|
29
30
|
backgroundColor: theme.colors.atmo3
|
|
30
31
|
}
|
|
31
32
|
},
|
|
@@ -38,20 +39,20 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
38
39
|
icon: {},
|
|
39
40
|
checked: {
|
|
40
41
|
"& svg": {
|
|
41
|
-
|
|
42
|
+
borderColor: theme.colors.secondary,
|
|
42
43
|
backgroundColor: theme.colors.secondary,
|
|
43
44
|
color: theme.colors.atmo2
|
|
44
45
|
},
|
|
45
46
|
"&$semantic": {
|
|
46
47
|
"& svg": {
|
|
47
|
-
|
|
48
|
+
borderColor: theme.colors.base_dark,
|
|
48
49
|
backgroundColor: theme.colors.base_light,
|
|
49
50
|
color: theme.colors.base_dark
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
"&$disabled": {
|
|
53
54
|
"& svg": {
|
|
54
|
-
|
|
55
|
+
borderColor: theme.colors.secondary_60,
|
|
55
56
|
backgroundColor: theme.colors.secondary_60,
|
|
56
57
|
color: theme.colors.atmo3
|
|
57
58
|
}
|
|
@@ -59,7 +60,7 @@ const { staticClasses, useClasses } = createClasses("HvBaseRadio", {
|
|
|
59
60
|
},
|
|
60
61
|
semantic: {
|
|
61
62
|
"& svg": {
|
|
62
|
-
|
|
63
|
+
borderColor: theme.colors.base_dark,
|
|
63
64
|
backgroundColor: theme.colors.base_light
|
|
64
65
|
}
|
|
65
66
|
}
|
|
@@ -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\n \"&:hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n borderRadius: theme.radii.base,\n },\n \"& svg\": {\n width: 16,\n height: 16,\n borderRadius: theme.radii.circle,\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\n \"&:hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n borderRadius: theme.radii.base,\n },\n \"& svg\": {\n width: 16,\n height: 16,\n borderRadius: theme.radii.circle,\n borderWidth: 1,\n borderColor: theme.colors.secondary,\n backgroundColor: theme.colors.atmo1,\n },\n borderRadius: 0,\n },\n disabled: {\n cursor: \"not-allowed\",\n pointerEvents: \"initial\",\n \"& svg\": {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo3,\n },\n },\n focusVisible: {\n \"& svg\": {\n borderRadius: \"8px\",\n ...outlineStyles,\n },\n },\n icon: {},\n checked: {\n \"& svg\": {\n borderColor: theme.colors.secondary,\n backgroundColor: theme.colors.secondary,\n color: theme.colors.atmo2,\n },\n \"&$semantic\": {\n \"& svg\": {\n borderColor: theme.colors.base_dark,\n backgroundColor: theme.colors.base_light,\n color: theme.colors.base_dark,\n },\n },\n \"&$disabled\": {\n \"& svg\": {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.secondary_60,\n color: theme.colors.atmo3,\n },\n },\n },\n semantic: {\n \"& svg\": {\n borderColor: theme.colors.base_dark,\n backgroundColor: theme.colors.base_light,\n },\n },\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,IAER,WAAW;AAAA,MACT,iBAAiB,MAAM,OAAO;AAAA,MAC9B,cAAc,MAAM,MAAM;AAAA,IAC5B;AAAA,IACA,SAAS;AAAA,MACP,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,cAAc,MAAM,MAAM;AAAA,MAC1B,aAAa;AAAA,MACb,aAAa,MAAM,OAAO;AAAA,MAC1B,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,cAAc;AAAA,EAChB;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,SAAS;AAAA,MACP,aAAa,MAAM,OAAO;AAAA,MAC1B,iBAAiB,MAAM,OAAO;AAAA,IAAA;AAAA,EAElC;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,MACP,cAAc;AAAA,MACd,GAAG;AAAA,IAAA;AAAA,EAEP;AAAA,EACA,MAAM,CAAC;AAAA,EACP,SAAS;AAAA,IACP,SAAS;AAAA,MACP,aAAa,MAAM,OAAO;AAAA,MAC1B,iBAAiB,MAAM,OAAO;AAAA,MAC9B,OAAO,MAAM,OAAO;AAAA,IACtB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,QACP,aAAa,MAAM,OAAO;AAAA,QAC1B,iBAAiB,MAAM,OAAO;AAAA,QAC9B,OAAO,MAAM,OAAO;AAAA,MAAA;AAAA,IAExB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,QACP,aAAa,MAAM,OAAO;AAAA,QAC1B,iBAAiB,MAAM,OAAO;AAAA,QAC9B,OAAO,MAAM,OAAO;AAAA,MAAA;AAAA,IACtB;AAAA,EAEJ;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,aAAa,MAAM,OAAO;AAAA,MAC1B,iBAAiB,MAAM,OAAO;AAAA,IAAA;AAAA,EAChC;AAEJ,CAAC;"}
|