@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.
Files changed (77) hide show
  1. package/dist/cjs/BaseInput/BaseInput.cjs +44 -83
  2. package/dist/cjs/BaseInput/BaseInput.styles.cjs +68 -142
  3. package/dist/cjs/BaseRadio/BaseRadio.styles.cjs +7 -6
  4. package/dist/cjs/BulkActions/BulkActions.cjs +9 -18
  5. package/dist/cjs/Calendar/CalendarHeader/CalendarHeader.cjs +0 -6
  6. package/dist/cjs/Calendar/CalendarHeader/CalendarHeader.styles.cjs +1 -5
  7. package/dist/cjs/CheckBoxGroup/CheckBoxGroup.cjs +9 -9
  8. package/dist/cjs/Dropdown/Dropdown.cjs +8 -10
  9. package/dist/cjs/FilterGroup/RightPanel/RightPanel.cjs +9 -10
  10. package/dist/cjs/InlineEditor/InlineEditor.cjs +10 -14
  11. package/dist/cjs/InlineEditor/InlineEditor.styles.cjs +13 -36
  12. package/dist/cjs/Input/Input.cjs +4 -5
  13. package/dist/cjs/Input/Input.styles.cjs +5 -19
  14. package/dist/cjs/List/List.cjs +11 -11
  15. package/dist/cjs/Pagination/Pagination.styles.cjs +1 -0
  16. package/dist/cjs/Radio/Radio.cjs +2 -1
  17. package/dist/cjs/Radio/Radio.styles.cjs +7 -27
  18. package/dist/cjs/Select/Select.styles.cjs +1 -1
  19. package/dist/cjs/Table/TableCell/TableCell.styles.cjs +14 -14
  20. package/dist/cjs/Table/TableHeader/TableHeader.styles.cjs +16 -15
  21. package/dist/cjs/TagsInput/TagsInput.styles.cjs +3 -8
  22. package/dist/cjs/TextArea/TextArea.styles.cjs +1 -1
  23. package/dist/cjs/TimePicker/Unit/Unit.cjs +0 -1
  24. package/dist/cjs/TimePicker/Unit/Unit.styles.cjs +0 -3
  25. package/dist/cjs/utils/CounterLabel.cjs +16 -0
  26. package/dist/esm/BaseInput/BaseInput.js +45 -84
  27. package/dist/esm/BaseInput/BaseInput.js.map +1 -1
  28. package/dist/esm/BaseInput/BaseInput.styles.js +68 -142
  29. package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
  30. package/dist/esm/BaseRadio/BaseRadio.styles.js +7 -6
  31. package/dist/esm/BaseRadio/BaseRadio.styles.js.map +1 -1
  32. package/dist/esm/BulkActions/BulkActions.js +10 -19
  33. package/dist/esm/BulkActions/BulkActions.js.map +1 -1
  34. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js +0 -6
  35. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
  36. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js +1 -5
  37. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  38. package/dist/esm/CheckBoxGroup/CheckBoxGroup.js +10 -10
  39. package/dist/esm/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
  40. package/dist/esm/Dropdown/Dropdown.js +8 -10
  41. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  42. package/dist/esm/FilterGroup/RightPanel/RightPanel.js +9 -10
  43. package/dist/esm/FilterGroup/RightPanel/RightPanel.js.map +1 -1
  44. package/dist/esm/InlineEditor/InlineEditor.js +10 -14
  45. package/dist/esm/InlineEditor/InlineEditor.js.map +1 -1
  46. package/dist/esm/InlineEditor/InlineEditor.styles.js +13 -36
  47. package/dist/esm/InlineEditor/InlineEditor.styles.js.map +1 -1
  48. package/dist/esm/Input/Input.js +4 -5
  49. package/dist/esm/Input/Input.js.map +1 -1
  50. package/dist/esm/Input/Input.styles.js +5 -19
  51. package/dist/esm/Input/Input.styles.js.map +1 -1
  52. package/dist/esm/List/List.js +11 -11
  53. package/dist/esm/List/List.js.map +1 -1
  54. package/dist/esm/Pagination/Pagination.styles.js +1 -0
  55. package/dist/esm/Pagination/Pagination.styles.js.map +1 -1
  56. package/dist/esm/Radio/Radio.js +2 -1
  57. package/dist/esm/Radio/Radio.js.map +1 -1
  58. package/dist/esm/Radio/Radio.styles.js +7 -27
  59. package/dist/esm/Radio/Radio.styles.js.map +1 -1
  60. package/dist/esm/Select/Select.styles.js +1 -1
  61. package/dist/esm/Select/Select.styles.js.map +1 -1
  62. package/dist/esm/Table/TableCell/TableCell.styles.js +14 -14
  63. package/dist/esm/Table/TableCell/TableCell.styles.js.map +1 -1
  64. package/dist/esm/Table/TableHeader/TableHeader.styles.js +16 -15
  65. package/dist/esm/Table/TableHeader/TableHeader.styles.js.map +1 -1
  66. package/dist/esm/TagsInput/TagsInput.styles.js +3 -8
  67. package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
  68. package/dist/esm/TextArea/TextArea.styles.js +1 -1
  69. package/dist/esm/TextArea/TextArea.styles.js.map +1 -1
  70. package/dist/esm/TimePicker/Unit/Unit.js +0 -1
  71. package/dist/esm/TimePicker/Unit/Unit.js.map +1 -1
  72. package/dist/esm/TimePicker/Unit/Unit.styles.js +0 -3
  73. package/dist/esm/TimePicker/Unit/Unit.styles.js.map +1 -1
  74. package/dist/esm/utils/CounterLabel.js +16 -0
  75. package/dist/esm/utils/CounterLabel.js.map +1 -0
  76. package/dist/types/index.d.ts +29 -31
  77. 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 { jsxs, Fragment, jsx } from "react/jsx-runtime";
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 localInvalid = invalid || formElementProps.status === "invalid";
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
- localInvalid,
48
+ invalid,
73
49
  id
74
50
  );
75
- return /* @__PURE__ */ jsxs(Fragment, { children: [
76
- /* @__PURE__ */ jsx(Global, { styles: baseInputStyles }),
77
- /* @__PURE__ */ jsxs(
78
- "div",
79
- {
80
- className: cx(classes.root, className, {
81
- [classes.disabled]: formElementProps.disabled,
82
- [classes.invalid]: localInvalid,
83
- [classes.resizable]: multiline && resizable,
84
- [classes.readOnly]: formElementProps.readOnly
85
- }),
86
- children: [
87
- /* @__PURE__ */ jsx(
88
- MuiInputBase,
89
- {
90
- id,
91
- name: formElementProps.name,
92
- value,
93
- defaultValue,
94
- type,
95
- placeholder,
96
- readOnly: !!formElementProps.readOnly,
97
- disabled: formElementProps.disabled,
98
- onChange: (event) => onChange?.(event, event.target.value),
99
- className: cx({
100
- [classes.inputRootInvalid]: localInvalid,
101
- [classes.inputRootReadOnly]: formElementProps.readOnly
102
- }),
103
- classes: {
104
- root: classes.inputRoot,
105
- focused: classes.inputRootFocused,
106
- disabled: classes.inputRootDisabled,
107
- multiline: classes.inputRootMultiline,
108
- input: cx(classes.input, {
109
- [classes.inputResizable]: !formElementProps.disabled && resizable,
110
- [classes.inputDisabled]: formElementProps.disabled,
111
- [classes.inputReadOnly]: formElementProps.readOnly
112
- })
113
- },
114
- inputProps: {
115
- // Avoid the required attribute at the root node
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 { css as emotionCss, Global } from \"@emotion/react\";\nimport MuiInputBase, { InputBaseProps } from \"@mui/material/InputBase\";\nimport { useForkRef } from \"@mui/material/utils\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\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\n// Global styles for the base input.\nconst baseInputStyles = emotionCss({\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::-webkit-outer-spin-button,input::-webkit-inner-spin-button\": {\n WebkitAppearance: \"none\",\n margin: 0,\n },\n \"input[type=number]\": {\n MozAppearance: \"textfield\",\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::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration\":\n {\n display: \"none\",\n },\n});\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,\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 localInvalid = invalid || formElementProps.status === \"invalid\";\n\n const formElementDescriptorsContext = useContext(\n HvFormElementDescriptorsContext,\n );\n const ariaProps = buildAriaPropsFromContext(\n inputProps,\n formElementDescriptorsContext,\n localInvalid,\n id,\n );\n\n return (\n <>\n <Global styles={baseInputStyles} />\n <div\n className={cx(classes.root, className, {\n [classes.disabled]: formElementProps.disabled,\n [classes.invalid]: localInvalid,\n [classes.resizable]: multiline && resizable,\n [classes.readOnly]: formElementProps.readOnly,\n })}\n >\n <MuiInputBase\n id={id}\n name={formElementProps.name}\n value={value}\n defaultValue={defaultValue}\n type={type}\n placeholder={placeholder}\n readOnly={!!formElementProps.readOnly}\n disabled={formElementProps.disabled}\n onChange={(event) => onChange?.(event, event.target.value)}\n className={cx({\n [classes.inputRootInvalid]: localInvalid,\n [classes.inputRootReadOnly]: formElementProps.readOnly,\n })}\n classes={{\n root: classes.inputRoot,\n focused: classes.inputRootFocused,\n disabled: classes.inputRootDisabled,\n multiline: classes.inputRootMultiline,\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 rows={10}\n {...others}\n />\n {!multiline && (\n <div role=\"presentation\" className={classes.inputBorderContainer} />\n )}\n </div>\n </>\n );\n});\n"],"names":["emotionCss","HvBaseInput"],"mappings":";;;;;;;;;;;AAuBA,MAAM,kBAAkBA,IAAW;AAAA,EACjC,0BAA0B;AAAA,IACxB,iBAAiB,kBAAkB,MAAM,OAAO,KAAK;AAAA,IACrD,qBAAqB,MAAM,OAAO;AAAA,EACpC;AAAA;AAAA,EAGA,qEAAqE;AAAA,IACnE,kBAAkB;AAAA,IAClB,QAAQ;AAAA,EACV;AAAA,EACA,sBAAsB;AAAA,IACpB,eAAe;AAAA,EACjB;AAAA;AAAA,EAGA,4CAA4C;AAAA,IAC1C,SAAS;AAAA,EACX;AAAA;AAAA,EAGA,sJACE;AAAA,IACE,SAAS;AAAA,EAAA;AAEf,CAAC;AA4CM,MAAM,cAAc,WAIzB,SAASC,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;AAAA,IACA;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,eAAe,WAAW,iBAAiB,WAAW;AAE5D,QAAM,gCAAgC;AAAA,IACpC;AAAA,EACF;AACA,QAAM,YAAY;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAC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AA,cACA,MAAM;AAAA,cACL,GAAG;AAAA,YAAA;AAAA,UACN;AAAA,UACC,CAAC,aACC,oBAAA,OAAA,EAAI,MAAK,gBAAe,WAAW,QAAQ,qBAAsB,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEtE,GACF;AAEJ,CAAC;"}
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
- display: "inline-block",
7
- width: "100%",
8
- position: "relative",
9
- "&:hover $inputBorderContainer": {
10
- backgroundColor: theme.colors.primary
11
- },
12
- "&:focus-within $inputBorderContainer": {
13
- backgroundColor: theme.colors.primary
14
- }
15
- },
16
- disabled: {
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
- "&:hover $inputBorderContainer": {
75
- backgroundColor: "transparent"
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
- "&:hover $inputRootMultiline": {
87
- "& $input": {
88
- border: `1px solid ${theme.colors.secondary_60}`,
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
- "&:focus-within $inputRootMultiline": {
93
- "& $input": {
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
- border: `1px solid ${theme.colors.secondary}`,
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
- "&:hover:not($inputRootDisabled):not($inputRootInvalid):not($inputRootReadOnly)": {
39
+ ":hover:not($disabled,$invalid,$readOnly)": {
122
40
  borderColor: theme.colors.primary
123
41
  },
124
- "&:hover:not($inputRootDisabled)::before": {
125
- borderBottom: "none"
126
- },
127
- "&::before": {
128
- borderBottom: "none"
129
- },
130
- "&::after": {
131
- borderBottom: "none"
42
+ ":focus-within:not($disabled)": {
43
+ ...outlineStyles
132
44
  }
133
45
  },
134
- inputRootFocused: {
135
- backgroundColor: theme.colors.atmo1,
136
- ...outlineStyles,
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
- inputRootMultiline: {
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
- marginLeft: "0px",
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: "19px",
94
+ height: "100%",
173
95
  marginLeft: theme.space.xs,
174
96
  marginRight: theme.space.xs,
175
- padding: "6px 0 5px",
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: { resize: "both", width: "100%" }
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 display: \"inline-block\",\n width: \"100%\",\n position: \"relative\",\n\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.colors.primary,\n },\n\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: theme.colors.primary,\n },\n },\n disabled: {\n \"& $inputRoot\": {\n backgroundColor: theme.colors.atmo2,\n borderColor: theme.colors.secondary_60,\n },\n\n \"& $inputBorderContainer\": {\n backgroundColor: theme.colors.atmo4,\n },\n\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.colors.atmo4,\n },\n\n \"&& $input\": {\n color: theme.colors.secondary_60,\n WebkitTextFillColor: theme.colors.secondary_60,\n },\n\n \"& $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.colors.atmo2,\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n backgroundColor: theme.colors.atmo2,\n border: `1px solid ${theme.colors.secondary_60}`,\n },\n },\n },\n invalid: {\n \"&:not(.disabled)\": {\n \"& $inputBorderContainer\": {\n backgroundColor: theme.colors.negative_120,\n },\n\n \"&:hover $inputBorderContainer\": {\n backgroundColor: theme.colors.negative_120,\n },\n\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.negative_120}`,\n },\n },\n\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.negative_120}`,\n },\n },\n\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.negative_120}`,\n },\n },\n },\n },\n resizable: { width: \"auto\" },\n readOnly: {\n \"& $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n \"&:hover $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n \"&:focus-within $inputBorderContainer\": {\n backgroundColor: \"transparent\",\n },\n\n \"& $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n backgroundColor: theme.colors.atmo2,\n },\n },\n\n \"&:hover $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n backgroundColor: theme.colors.atmo2,\n },\n },\n\n \"&:focus-within $inputRootMultiline\": {\n \"& $input\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n backgroundColor: theme.colors.atmo2,\n },\n },\n },\n inputBorderContainer: {\n position: \"absolute\",\n width: \"calc(100% - 4px)\",\n height: \"0px\",\n top: \"31px\",\n left: \"2px\",\n backgroundColor: theme.colors.atmo4,\n },\n inputRootInvalid: { borderColor: theme.colors.negative_120 },\n inputRootReadOnly: {\n borderColor: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo2,\n },\n inputRoot: {\n margin: 0,\n width: \"100%\",\n borderRadius: theme.radii.base,\n height: \"32px\",\n border: `1px solid ${theme.colors.secondary}`,\n boxSizing: \"border-box\",\n backgroundColor: theme.colors.atmo1,\n fontFamily: theme.fontFamily.body,\n\n \"&:hover:not($inputRootDisabled):not($inputRootInvalid):not($inputRootReadOnly)\":\n {\n borderColor: theme.colors.primary,\n },\n\n \"&:hover:not($inputRootDisabled)::before\": {\n borderBottom: \"none\",\n },\n\n \"&::before\": {\n borderBottom: \"none\",\n },\n\n \"&::after\": {\n borderBottom: \"none\",\n },\n },\n inputRootFocused: {\n backgroundColor: theme.colors.atmo1,\n ...outlineStyles,\n\n \"&:hover\": {\n backgroundColor: theme.colors.atmo1,\n },\n\n \"&$inputRootReadOnly\": {\n backgroundColor: theme.colors.atmo2,\n },\n },\n inputRootDisabled: {\n cursor: \"not-allowed\",\n\n \"&&::before\": {\n borderBottomStyle: \"none\",\n },\n },\n inputRootMultiline: {\n padding: 0,\n backgroundColor: \"transparent\",\n overflow: \"auto\",\n border: \"none\",\n height: \"auto\",\n\n \"& $input\": {\n border: `1px solid ${theme.colors.secondary}`,\n borderRadius: theme.radii.base,\n backgroundColor: theme.colors.atmo1,\n height: \"auto\",\n minHeight: \"21px\",\n padding: \"5px 10px\",\n overflow: \"auto\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n\n \"&:hover\": {\n border: `1px solid ${theme.colors.primary}`,\n },\n },\n },\n input: {\n height: \"19px\",\n marginLeft: theme.space.xs,\n marginRight: theme.space.xs,\n padding: \"6px 0 5px\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n outline: \"none\",\n width: \"initial\",\n flexGrow: 1,\n ...(theme.typography.body as React.CSSProperties),\n\n \"&::placeholder\": {\n opacity: 1,\n color: theme.colors.secondary_80,\n },\n\n \"&::-ms-clear\": {\n display: \"none\",\n },\n },\n inputDisabled: {},\n inputReadOnly: {\n color: theme.colors.secondary_80,\n },\n inputResizable: { resize: \"both\", width: \"100%\" },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA,EACxE,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IAEV,iCAAiC;AAAA,MAC/B,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IAEA,wCAAwC;AAAA,MACtC,iBAAiB,MAAM,OAAO;AAAA,IAAA;AAAA,EAElC;AAAA,EACA,UAAU;AAAA,IACR,gBAAgB;AAAA,MACd,iBAAiB,MAAM,OAAO;AAAA,MAC9B,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IAEA,2BAA2B;AAAA,MACzB,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IAEA,iCAAiC;AAAA,MAC/B,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IAEA,aAAa;AAAA,MACX,OAAO,MAAM,OAAO;AAAA,MACpB,qBAAqB,MAAM,OAAO;AAAA,IACpC;AAAA,IAEA,yBAAyB;AAAA,MACvB,YAAY;AAAA,QACV,iBAAiB,MAAM,OAAO;AAAA,QAC9B,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,MAAA;AAAA,IAElD;AAAA,IAEA,+BAA+B;AAAA,MAC7B,YAAY;AAAA,QACV,iBAAiB,MAAM,OAAO;AAAA,QAC9B,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,MAAA;AAAA,IAChD;AAAA,EAEJ;AAAA,EACA,SAAS;AAAA,IACP,oBAAoB;AAAA,MAClB,2BAA2B;AAAA,QACzB,iBAAiB,MAAM,OAAO;AAAA,MAChC;AAAA,MAEA,iCAAiC;AAAA,QAC/B,iBAA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,MAAA;AAAA,IAC3C;AAAA,EAEJ;AAAA,EACA,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,YAAY,MAAM,MAAM;AAAA,IACxB,aAAa,MAAM,MAAM;AAAA,IACzB,SAAS;AAAA,IACT,UAAU;AAAA,IACV,cAAc;AAAA,IACd,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,GAAI,MAAM,WAAW;AAAA,IAErB,kBAAkB;AAAA,MAChB,SAAS;AAAA,MACT,OAAO,MAAM,OAAO;AAAA,IACtB;AAAA,IAEA,gBAAgB;AAAA,MACd,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,eAAe;AAAA,IACb,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,gBAAgB,EAAE,QAAQ,QAAQ,OAAO,OAAO;AAClD,CAAC;"}
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,W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,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
- border: `1px solid ${theme.colors.secondary}`,
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
- border: `1px solid ${theme.colors.secondary_60}`,
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
- border: `1px solid ${theme.colors.secondary}`,
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
- border: `1px solid ${theme.colors.base_dark}`,
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
- border: `1px solid ${theme.colors.secondary_60}`,
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
- border: `1px solid ${theme.colors.base_dark}`,
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 border: `1px solid ${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 border: `1px solid ${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 border: `1px solid ${theme.colors.secondary}`,\n backgroundColor: theme.colors.secondary,\n color: theme.colors.atmo2,\n },\n \"&$semantic\": {\n \"& svg\": {\n border: `1px solid ${theme.colors.base_dark}`,\n backgroundColor: theme.colors.base_light,\n color: theme.colors.base_dark,\n },\n },\n \"&$disabled\": {\n \"& svg\": {\n border: `1px solid ${theme.colors.secondary_60}`,\n backgroundColor: theme.colors.secondary_60,\n color: theme.colors.atmo3,\n },\n },\n },\n semantic: {\n \"& svg\": {\n border: `1px solid ${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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":["../../../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,MAA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