@galaxy-io/dls 1.5.16 → 1.5.18
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/containers/FlexItem.js +1 -1
- package/dist/containers/FlexWrapper.js +2 -2
- package/dist/inputs/Input.d.ts +2 -0
- package/dist/inputs/Input.js +2 -2
- package/dist/inputs/MultiSelectInput.js +2 -2
- package/dist/inputs/NumberInput.d.ts +1 -1
- package/dist/inputs/NumberInput.js +2 -1
- package/dist/inputs/PasswordInput.js +2 -1
- package/dist/inputs/TextInput.js +2 -1
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ var _exp11 = () => ({ $maxHeight }) => $maxHeight != null ? getCssSizeValue($max
|
|
|
28
28
|
var _exp12 = () => ({ $overflow }) => $overflow ?? "visible";
|
|
29
29
|
var _exp13 = () => ({ $whiteSpace }) => $whiteSpace ?? "normal";
|
|
30
30
|
var _exp14 = () => ({ $textOverflow }) => $textOverflow ?? "clip";
|
|
31
|
-
var _exp15 = () => ({ $padding }) => $padding
|
|
31
|
+
var _exp15 = () => ({ $padding }) => getCssSizeValue($padding, "0");
|
|
32
32
|
var _exp16 = () => ({ $onClick }) => $onClick ? "pointer" : "inherit";
|
|
33
33
|
var StyledFlexItem = /*#__PURE__*/ styled("div")({
|
|
34
34
|
name: "StyledFlexItem",
|
|
@@ -73,8 +73,8 @@ var _exp10 = () => ({ maxWidth }) => maxWidth != null ? getCssSizeValue(maxWidth
|
|
|
73
73
|
var _exp11 = () => ({ minHeight }) => minHeight != null ? getCssSizeValue(minHeight) : "auto";
|
|
74
74
|
var _exp12 = () => ({ maxHeight }) => maxHeight != null ? getCssSizeValue(maxHeight) : "none";
|
|
75
75
|
var _exp13 = () => ({ overflow = "visible" }) => overflow;
|
|
76
|
-
var _exp14 = () => ({ padding
|
|
77
|
-
var _exp15 = () => ({ margin
|
|
76
|
+
var _exp14 = () => ({ padding }) => getCssSizeValue(padding, "0");
|
|
77
|
+
var _exp15 = () => ({ margin }) => getCssSizeValue(margin, "0");
|
|
78
78
|
var _exp16 = () => ({ onClick }) => onClick ? "pointer" : "inherit";
|
|
79
79
|
var StyledFlexWrapper = /*#__PURE__*/ styled("div")({
|
|
80
80
|
name: "StyledFlexWrapper",
|
package/dist/inputs/Input.d.ts
CHANGED
|
@@ -175,6 +175,8 @@ export interface InputProps<T> {
|
|
|
175
175
|
labelTooltip?: string | React.ReactNode;
|
|
176
176
|
/** Message shown under the field; also switches the border to the error color. */
|
|
177
177
|
error?: string;
|
|
178
|
+
/** Switches the border to the error color without a message. Implied by `error`. */
|
|
179
|
+
isError?: boolean;
|
|
178
180
|
/** Appends the red required asterisk to the label. */
|
|
179
181
|
isRequired?: boolean;
|
|
180
182
|
isDisabled?: boolean;
|
package/dist/inputs/Input.js
CHANGED
|
@@ -217,7 +217,7 @@ var TrailingActionButton = /*#__PURE__*/ styled("button")({
|
|
|
217
217
|
* pin `type` and `parse` for you. Use this directly only for a value type none of
|
|
218
218
|
* them cover.
|
|
219
219
|
*/
|
|
220
|
-
var Input = forwardRef(({ parse, onChange, variant = "PRIMARY", size = "MEDIUM", type, value, label, labelTooltip, error, placeholder, leading, trailing, isRequired, isDisabled, autoFocus, min, max, step, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace }, ref) => {
|
|
220
|
+
var Input = forwardRef(({ parse, onChange, variant = "PRIMARY", size = "MEDIUM", type, value, label, labelTooltip, error, isError, placeholder, leading, trailing, isRequired, isDisabled, autoFocus, min, max, step, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace }, ref) => {
|
|
221
221
|
const handleChange = (e) => {
|
|
222
222
|
onChange(parse(e.target.value));
|
|
223
223
|
};
|
|
@@ -250,7 +250,7 @@ var Input = forwardRef(({ parse, onChange, variant = "PRIMARY", size = "MEDIUM",
|
|
|
250
250
|
$variant: variant,
|
|
251
251
|
$width: width,
|
|
252
252
|
$fillWidth: fillWidth || hasLeading || hasTrailing,
|
|
253
|
-
$isError: !!error,
|
|
253
|
+
$isError: isError || !!error,
|
|
254
254
|
$hasLeadingIcon: hasLeading,
|
|
255
255
|
$hasTrailingAction: hasTrailing,
|
|
256
256
|
$isMonospace: isMonospace,
|
|
@@ -406,8 +406,8 @@ var MultiSelectInput = ({ label, icon, variant = InputVariant.PRIMARY, size = In
|
|
|
406
406
|
]
|
|
407
407
|
})
|
|
408
408
|
}, option.id);
|
|
409
|
-
}) : /* @__PURE__ */ jsx(
|
|
410
|
-
|
|
409
|
+
}) : /* @__PURE__ */ jsx(FlexWrapper, {
|
|
410
|
+
padding: 8,
|
|
411
411
|
children: /* @__PURE__ */ jsx(Text, {
|
|
412
412
|
variant: TextVariant.TERTIARY,
|
|
413
413
|
size: getInputTextSize(size),
|
|
@@ -6,5 +6,5 @@ export type NumberInputProps = Omit<InputProps<number>, "type" | "parse">;
|
|
|
6
6
|
* where they bound character count) and values outside it are clamped, not
|
|
7
7
|
* rejected — `onChange` only ever sees an in-range number.
|
|
8
8
|
*/
|
|
9
|
-
declare const NumberInput: ({ value, placeholder, label, labelTooltip, variant, size, leading, trailing, error, isRequired, isDisabled, autoFocus, min, max, step, onChange, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace, }: NumberInputProps) => import("react").JSX.Element;
|
|
9
|
+
declare const NumberInput: ({ value, placeholder, label, labelTooltip, variant, size, leading, trailing, error, isError, isRequired, isDisabled, autoFocus, min, max, step, onChange, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace, }: NumberInputProps) => import("react").JSX.Element;
|
|
10
10
|
export default NumberInput;
|
|
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* where they bound character count) and values outside it are clamped, not
|
|
8
8
|
* rejected — `onChange` only ever sees an in-range number.
|
|
9
9
|
*/
|
|
10
|
-
var NumberInput = ({ value, placeholder, label, labelTooltip, variant, size, leading, trailing, error, isRequired, isDisabled, autoFocus, min, max, step, onChange, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace }) => {
|
|
10
|
+
var NumberInput = ({ value, placeholder, label, labelTooltip, variant, size, leading, trailing, error, isError, isRequired, isDisabled, autoFocus, min, max, step, onChange, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace }) => {
|
|
11
11
|
return /* @__PURE__ */ jsx(Input, {
|
|
12
12
|
type: "number",
|
|
13
13
|
value,
|
|
@@ -19,6 +19,7 @@ var NumberInput = ({ value, placeholder, label, labelTooltip, variant, size, lea
|
|
|
19
19
|
leading,
|
|
20
20
|
trailing,
|
|
21
21
|
error,
|
|
22
|
+
isError,
|
|
22
23
|
isRequired,
|
|
23
24
|
isDisabled,
|
|
24
25
|
autoFocus,
|
|
@@ -8,7 +8,7 @@ var DEFAULT_STATE = { showPassword: false };
|
|
|
8
8
|
* A masked text field with a built-in reveal toggle in the trailing slot.
|
|
9
9
|
* Toggling only flips the DOM `type` — the value is never transformed.
|
|
10
10
|
*/
|
|
11
|
-
var PasswordInput = forwardRef(({ variant, size, value, placeholder, label, labelTooltip, leading, error, isRequired, isDisabled, autoFocus, onChange, width, fillWidth, onKeyDown, onBlur, onFocus, isMonospace }, ref) => {
|
|
11
|
+
var PasswordInput = forwardRef(({ variant, size, value, placeholder, label, labelTooltip, leading, error, isError, isRequired, isDisabled, autoFocus, onChange, width, fillWidth, onKeyDown, onBlur, onFocus, isMonospace }, ref) => {
|
|
12
12
|
const [state, setState] = useState(DEFAULT_STATE);
|
|
13
13
|
return /* @__PURE__ */ jsx(Input, {
|
|
14
14
|
ref,
|
|
@@ -31,6 +31,7 @@ var PasswordInput = forwardRef(({ variant, size, value, placeholder, label, labe
|
|
|
31
31
|
isDisabled
|
|
32
32
|
},
|
|
33
33
|
error,
|
|
34
|
+
isError,
|
|
34
35
|
isRequired,
|
|
35
36
|
isDisabled,
|
|
36
37
|
autoFocus,
|
package/dist/inputs/TextInput.js
CHANGED
|
@@ -9,7 +9,7 @@ var DEFAULT_STATE = { error: "" };
|
|
|
9
9
|
* `min`/`max` bound the *character count*, not a numeric range — the field
|
|
10
10
|
* validates length on blur and shows its own error. A `error` you pass wins.
|
|
11
11
|
*/
|
|
12
|
-
var TextInput = forwardRef(({ variant, size, value, min, max, placeholder, label, labelTooltip, leading, trailing, error, isRequired, isDisabled, autoFocus, onChange, onKeyDown, onBlur, fillWidth, width, isMonospace }, ref) => {
|
|
12
|
+
var TextInput = forwardRef(({ variant, size, value, min, max, placeholder, label, labelTooltip, leading, trailing, error, isError, isRequired, isDisabled, autoFocus, onChange, onKeyDown, onBlur, fillWidth, width, isMonospace }, ref) => {
|
|
13
13
|
const [state, setState] = useState(DEFAULT_STATE);
|
|
14
14
|
const handleFocus = () => {
|
|
15
15
|
setState({
|
|
@@ -45,6 +45,7 @@ var TextInput = forwardRef(({ variant, size, value, min, max, placeholder, label
|
|
|
45
45
|
trailing,
|
|
46
46
|
autoFocus,
|
|
47
47
|
error: state.error || error,
|
|
48
|
+
isError,
|
|
48
49
|
isRequired,
|
|
49
50
|
isDisabled,
|
|
50
51
|
onKeyDown,
|