asma-ui-core 3.109.0 → 3.110.0
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/asma-ui-core.css +1 -1
- package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +17 -15
- package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +26 -24
- package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +61 -58
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +74 -71
- package/dist/components/inputs/dynamic-select/components/DynamicSelectReadOnlyValue.js +13 -10
- package/dist/components/inputs/field-styles.js +16 -6
- package/dist/components/inputs/form-layout/StyledFieldPair.js +22 -0
- package/dist/components/inputs/form-layout/StyledFieldPair.module.js +8 -0
- package/dist/components/inputs/form-layout/StyledFormColumn.js +13 -0
- package/dist/components/inputs/input-field/StyledInputField.js +235 -198
- package/dist/components/inputs/phone-field/StyledPhoneField.js +41 -39
- package/dist/components/inputs/search-field/StyledSearchField.js +22 -20
- package/dist/components/inputs/select/StyledSelect.js +110 -108
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +111 -108
- package/dist/components/inputs/slider/StyledSlider.js +2 -2
- package/dist/components/inputs/textarea/StyledTextarea.js +50 -52
- package/dist/components/inputs/textarea/StyledTextarea.module.js +3 -3
- package/dist/components/miscellaneous/StyledFormControl.js +29 -25
- package/dist/components/miscellaneous/StyledInputLabel.js +28 -18
- package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +137 -122
- package/dist/datetime/components/date-picker/components/DatePickerInputRangeCompact.js +17 -15
- package/dist/datetime/components/date-picker/components/DatePickerInputRangeCompact.module.js +2 -2
- package/dist/datetime/components/date-picker/components/DatePickerInputSingle.js +9 -8
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectMonth.js +17 -14
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerSelectYear.js +14 -9
- package/dist/datetime/components/time-picker/StyledTimePicker.js +78 -74
- package/dist/datetime/components/time-picker/TimePickerInput.js +43 -41
- package/dist/datetime/components/time-picker/helpers/timePickerWidth.js +12 -0
- package/dist/helpers/CharacterCounter.js +21 -0
- package/dist/index.js +219 -211
- package/dist/src/components/inputs/dynamic-select/components/DynamicSelectReadOnlyValue.d.ts +2 -2
- package/dist/src/components/inputs/dynamic-select/types.d.ts +3 -0
- package/dist/src/components/inputs/field-styles.d.ts +22 -0
- package/dist/src/components/inputs/form-layout/StyledFieldPair.d.ts +18 -0
- package/dist/src/components/inputs/form-layout/StyledFormColumn.d.ts +12 -0
- package/dist/src/components/inputs/form-layout/index.d.ts +4 -0
- package/dist/src/components/inputs/input-field/StyledInputField.d.ts +19 -4
- package/dist/src/components/inputs/select/StyledSelect.d.ts +7 -2
- package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +5 -1
- package/dist/src/components/inputs/textarea/StyledTextarea.d.ts +6 -0
- package/dist/src/components/miscellaneous/StyledFormControl.d.ts +5 -2
- package/dist/src/components/miscellaneous/StyledInputLabel.d.ts +7 -5
- package/dist/src/datetime/components/date-picker/components/BaseDatePickerInput.d.ts +2 -0
- package/dist/src/datetime/components/date-picker/types.d.ts +3 -0
- package/dist/src/datetime/components/time-picker/helpers/timePickerWidth.d.ts +7 -0
- package/dist/src/datetime/components/time-picker/types.d.ts +3 -1
- package/dist/src/helpers/CharacterCounter.d.ts +16 -0
- package/dist/src/helpers/CharacterCounter.test.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/tailwind.config.d.ts +14 -0
- package/package.json +1 -1
- package/src/styles/fieldWidthTokens.css +8 -0
- package/src/styles/index.css +1 -0
- package/tw-configs/twConfigs.json +14 -0
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { StyledTooltip as
|
|
3
|
-
import { LoadingIcon as
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import { PlusIconCircle as
|
|
6
|
-
import { StyledChip as
|
|
1
|
+
import { cn as q } from "../../../../helpers/cn.js";
|
|
2
|
+
import { StyledTooltip as E } from "../../../data-display/tooltip/StyledTooltip.js";
|
|
3
|
+
import { LoadingIcon as re } from "../../../icons/loading-icon/LoadingIcon.js";
|
|
4
|
+
import { CheckIcon as ae } from "../../../icons/check-icon/CheckIcon.js";
|
|
5
|
+
import { PlusIconCircle as ie } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
|
|
6
|
+
import { StyledChip as F } from "../../../data-display/chip/StyledChip.js";
|
|
7
7
|
import { StyledCheckbox as oe } from "../../checkbox/base-ui/StyledCheckbox.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { fieldWidthStyle as ne } from "../../field-styles.js";
|
|
9
|
+
import { StyledInputField as se } from "../../input-field/StyledInputField.js";
|
|
10
|
+
import { StyledSelectAutocomplete as de } from "../../select-autocomplete/StyledSelectAutocomplete.js";
|
|
11
|
+
import { DynamicSelectTitle as ce } from "./DynamicSelectTitle.js";
|
|
12
|
+
import { DynamicInteractiveChipGroup as ue } from "./DynamicInteractiveChipGroup.js";
|
|
13
|
+
import { createElement as K, forwardRef as me, useCallback as h, useState as pe } from "react";
|
|
14
|
+
import { Fragment as H, jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
15
|
+
var Ne = me((C, W) => {
|
|
16
|
+
const [_, O] = pe(!1), { options: S, dataTest: f, value: g, readOnly: u, multiple: i, required: R, onChange: x, size: G, rowSize: y = "compact", title: k, titleSize: J, width: I = "full", noOptionsText: M, placeholder: Q, disabled: N, helperText: U, disableHelperText: A, error: P, valueKey: V = "value", labelKey: X = "label", renderLabel: s, getOptionTooltip: $, startAdornment: Y, autocompleteProps: o, loading: m, maxTags: Z, onFocus: ee, onBlur: te } = C, d = (e) => typeof e == "object" ? e?.[X]?.toString() ?? "" : e?.toString() ?? "", p = h((e) => typeof e == "object" ? e?.[V] : e, [V]), B = h((e, t) => p(e) === p(t), [p]), v = (e) => {
|
|
16
17
|
const t = p(e);
|
|
17
18
|
return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : d(e);
|
|
18
|
-
},
|
|
19
|
-
O(!0),
|
|
20
|
-
}, [
|
|
21
|
-
O(!1),
|
|
22
|
-
}, [
|
|
23
|
-
if (
|
|
19
|
+
}, D = h((e) => {
|
|
20
|
+
O(!0), o?.onOpen?.(e);
|
|
21
|
+
}, [o]), le = h((e, t) => {
|
|
22
|
+
O(!1), o?.onClose?.(e, t);
|
|
23
|
+
}, [o]);
|
|
24
|
+
if (i && u) return /* @__PURE__ */ l(ue, { ...C });
|
|
24
25
|
const w = k ? `${f}-title` : void 0;
|
|
25
26
|
return /* @__PURE__ */ T("div", {
|
|
26
|
-
className: "flex
|
|
27
|
-
|
|
27
|
+
className: "flex flex-col gap-y-1",
|
|
28
|
+
"data-field-width": I,
|
|
29
|
+
style: ne(I),
|
|
30
|
+
children: [/* @__PURE__ */ l(ce, {
|
|
28
31
|
id: w,
|
|
29
32
|
title: k,
|
|
30
|
-
titleSize:
|
|
31
|
-
}), /* @__PURE__ */ l(
|
|
33
|
+
titleSize: J
|
|
34
|
+
}), /* @__PURE__ */ l(de, {
|
|
32
35
|
open: _,
|
|
33
|
-
onOpen:
|
|
34
|
-
onClose:
|
|
35
|
-
disableCloseOnSelect:
|
|
36
|
+
onOpen: D,
|
|
37
|
+
onClose: le,
|
|
38
|
+
disableCloseOnSelect: i,
|
|
36
39
|
dataTest: f,
|
|
37
|
-
disabled: !!
|
|
38
|
-
noOptionsText:
|
|
40
|
+
disabled: !!N || !!m,
|
|
41
|
+
noOptionsText: M,
|
|
39
42
|
loading: m,
|
|
40
43
|
readOnly: u,
|
|
41
44
|
value: g,
|
|
42
|
-
size:
|
|
45
|
+
size: G,
|
|
43
46
|
rowSize: y,
|
|
44
47
|
disableClearable: R,
|
|
45
48
|
options: S,
|
|
46
49
|
fullWidth: !0,
|
|
47
50
|
classes: { listbox: "max-h-[300px]" },
|
|
48
|
-
getOptionLabel:
|
|
51
|
+
getOptionLabel: o?.getOptionLabel ?? d,
|
|
49
52
|
onChange: (e, t) => {
|
|
50
53
|
x(t);
|
|
51
54
|
},
|
|
52
55
|
filterSelectedOptions: !1,
|
|
53
|
-
isOptionEqualToValue:
|
|
56
|
+
isOptionEqualToValue: o?.isOptionEqualToValue ?? B,
|
|
54
57
|
autoHeight: !0,
|
|
55
|
-
multiple:
|
|
56
|
-
renderValue:
|
|
58
|
+
multiple: i,
|
|
59
|
+
renderValue: i ? (e) => {
|
|
57
60
|
if (!Array.isArray(e)) return null;
|
|
58
|
-
const t = e, c =
|
|
59
|
-
return [...a.map((r) => /* @__PURE__ */ l(
|
|
61
|
+
const t = e, c = Z ?? S.length, a = t.slice(0, c), n = t.length - c;
|
|
62
|
+
return [...a.map((r) => /* @__PURE__ */ l(F, {
|
|
60
63
|
dataTest: `${v(r)}-chip`,
|
|
61
64
|
readOnly: u,
|
|
62
65
|
variant: "outlined",
|
|
@@ -65,85 +68,85 @@ var Se = ce((C, H) => {
|
|
|
65
68
|
root: "h-fit w-fit min-h-[32px]",
|
|
66
69
|
label: "block whitespace-normal"
|
|
67
70
|
},
|
|
68
|
-
disabled: !!
|
|
71
|
+
disabled: !!N || !!m,
|
|
69
72
|
deleteButtonTabIndex: -1,
|
|
70
73
|
onDelete: () => {
|
|
71
|
-
Array.isArray(g) && x(g.filter((b) =>
|
|
74
|
+
Array.isArray(g) && x(g.filter((b) => !B(b, r)));
|
|
72
75
|
}
|
|
73
|
-
}, v(r))), n > 0 ? /* @__PURE__ */ l(
|
|
76
|
+
}, v(r))), n > 0 ? /* @__PURE__ */ l(F, {
|
|
74
77
|
dataTest: "remaining-count-tag-chip",
|
|
75
78
|
label: `+${n}`,
|
|
76
79
|
variant: "outlined",
|
|
77
80
|
tabIndex: -1,
|
|
78
|
-
onClick:
|
|
81
|
+
onClick: D
|
|
79
82
|
}, "remaining-count") : null];
|
|
80
83
|
} : void 0,
|
|
81
|
-
popupIcon: m ? /* @__PURE__ */ l(
|
|
84
|
+
popupIcon: m ? /* @__PURE__ */ l(re, {
|
|
82
85
|
height: 24,
|
|
83
86
|
width: 24
|
|
84
|
-
}) :
|
|
87
|
+
}) : i ? /* @__PURE__ */ l(ie, {
|
|
85
88
|
height: 24,
|
|
86
89
|
width: 24
|
|
87
90
|
}) : void 0,
|
|
88
91
|
renderOption: (e, t, c) => {
|
|
89
|
-
const a = typeof t == "object" ? !!t?.disabled : !1, n =
|
|
92
|
+
const a = typeof t == "object" ? !!t?.disabled : !1, n = $ ? $(t) : null, r = a && n ? `${e.id}-reason` : void 0, b = r && e["data-active"] !== void 0 ? !0 : void 0, j = r && /* @__PURE__ */ l("span", {
|
|
90
93
|
id: r,
|
|
91
94
|
className: "sr-only",
|
|
92
95
|
"aria-hidden": "true",
|
|
93
96
|
children: n
|
|
94
97
|
});
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
+
if (i) {
|
|
99
|
+
const L = c.selected;
|
|
100
|
+
return /* @__PURE__ */ K("li", {
|
|
98
101
|
...e,
|
|
99
102
|
role: "option",
|
|
100
|
-
"aria-selected":
|
|
103
|
+
"aria-selected": L,
|
|
101
104
|
key: e.id,
|
|
102
105
|
onClick: a ? void 0 : e.onClick,
|
|
103
|
-
className:
|
|
106
|
+
className: q("relative box-border flex cursor-pointer items-center gap-x-1 bg-white px-2 py-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", y === "regular" ? "min-h-12" : "min-h-10", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
104
107
|
"aria-disabled": a,
|
|
105
108
|
"aria-describedby": r
|
|
106
|
-
},
|
|
109
|
+
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
107
110
|
"aria-hidden": "true",
|
|
108
111
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
109
|
-
}), /* @__PURE__ */ l(
|
|
112
|
+
}), /* @__PURE__ */ l(E, {
|
|
110
113
|
arrow: !0,
|
|
111
114
|
title: n,
|
|
112
115
|
open: b,
|
|
113
|
-
children: /* @__PURE__ */ T(
|
|
116
|
+
children: /* @__PURE__ */ T(H, { children: [/* @__PURE__ */ l(oe, {
|
|
114
117
|
disabled: a,
|
|
115
118
|
dataTest: `${v(t)}-checkbox`,
|
|
116
119
|
size: "small",
|
|
117
120
|
decorative: !0,
|
|
118
121
|
hideWrapper: !0,
|
|
119
122
|
className: "min-w-[36px]",
|
|
120
|
-
checked:
|
|
123
|
+
checked: L
|
|
121
124
|
}), s ? s(t) : /* @__PURE__ */ l("span", {
|
|
122
125
|
className: "line-clamp-2 h-fit min-w-0 flex-1 break-words text-base text-delta-800",
|
|
123
126
|
children: d(t)
|
|
124
127
|
})] })
|
|
125
128
|
}));
|
|
126
129
|
}
|
|
127
|
-
const
|
|
128
|
-
return /* @__PURE__ */
|
|
130
|
+
const z = c.selected;
|
|
131
|
+
return /* @__PURE__ */ K("li", {
|
|
129
132
|
...e,
|
|
130
133
|
role: "option",
|
|
131
|
-
"aria-selected":
|
|
134
|
+
"aria-selected": z,
|
|
132
135
|
key: e.id,
|
|
133
|
-
className:
|
|
136
|
+
className: q("relative box-border flex cursor-pointer items-center gap-x-1 px-2 py-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", y === "regular" ? "min-h-12" : "min-h-10", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
|
|
134
137
|
onClick: a ? void 0 : e.onClick,
|
|
135
138
|
"aria-disabled": a,
|
|
136
139
|
"aria-describedby": r
|
|
137
|
-
},
|
|
140
|
+
}, j, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
|
|
138
141
|
"aria-hidden": "true",
|
|
139
142
|
className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
|
|
140
|
-
}), /* @__PURE__ */ l(
|
|
143
|
+
}), /* @__PURE__ */ l(E, {
|
|
141
144
|
arrow: !0,
|
|
142
145
|
title: n,
|
|
143
146
|
open: b,
|
|
144
|
-
children: /* @__PURE__ */ T(
|
|
147
|
+
children: /* @__PURE__ */ T(H, { children: [/* @__PURE__ */ l("span", {
|
|
145
148
|
className: "w-5 min-w-5",
|
|
146
|
-
children:
|
|
149
|
+
children: z && /* @__PURE__ */ l(ae, {
|
|
147
150
|
className: "size-5 min-h-5 min-w-5 text-gama-500",
|
|
148
151
|
height: 20,
|
|
149
152
|
width: 20
|
|
@@ -154,26 +157,26 @@ var Se = ce((C, H) => {
|
|
|
154
157
|
})] })
|
|
155
158
|
}));
|
|
156
159
|
},
|
|
157
|
-
renderInput: (e) => /* @__PURE__ */ l(
|
|
160
|
+
renderInput: (e) => /* @__PURE__ */ l(se, {
|
|
158
161
|
dataTest: `${f}-input-field`,
|
|
159
162
|
...e,
|
|
160
|
-
inputRef:
|
|
161
|
-
error:
|
|
162
|
-
helperText:
|
|
163
|
-
reserveHelperText:
|
|
163
|
+
inputRef: W,
|
|
164
|
+
error: P,
|
|
165
|
+
helperText: A ? void 0 : U,
|
|
166
|
+
reserveHelperText: A ? !1 : P !== void 0,
|
|
164
167
|
variant: "outlined",
|
|
165
168
|
label: "",
|
|
166
|
-
placeholder:
|
|
169
|
+
placeholder: Q,
|
|
167
170
|
readOnly: u,
|
|
168
|
-
onFocus:
|
|
169
|
-
onBlur:
|
|
171
|
+
onFocus: ee,
|
|
172
|
+
onBlur: te,
|
|
170
173
|
onKeyDown: e.onKeyDown,
|
|
171
174
|
autoComplete: "off",
|
|
172
175
|
slotProps: {
|
|
173
176
|
...e.slotProps,
|
|
174
177
|
input: {
|
|
175
178
|
...e.slotProps?.input ?? {},
|
|
176
|
-
startAdornment:
|
|
179
|
+
startAdornment: Y ?? e.slotProps?.input?.startAdornment
|
|
177
180
|
},
|
|
178
181
|
htmlInput: {
|
|
179
182
|
...e.slotProps?.htmlInput ?? {},
|
|
@@ -181,10 +184,10 @@ var Se = ce((C, H) => {
|
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
}),
|
|
184
|
-
...
|
|
187
|
+
...o
|
|
185
188
|
})]
|
|
186
189
|
});
|
|
187
190
|
});
|
|
188
191
|
export {
|
|
189
|
-
|
|
192
|
+
Ne as DynamicSelectAutocomplete
|
|
190
193
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { fieldWidthStyle as y } from "../../field-styles.js";
|
|
2
|
+
import { DynamicSelectTitle as x } from "./DynamicSelectTitle.js";
|
|
3
|
+
import { jsx as d, jsxs as g } from "react/jsx-runtime";
|
|
4
|
+
var j = ({ dataTest: r, options: c, value: t, title: o, titleSize: s, width: a = "full", valueKey: f = "value", labelKey: m = "label", renderLabel: i }) => {
|
|
5
|
+
const n = (e) => typeof e == "object" ? e?.[f] : e, u = (e) => typeof e == "object" ? e?.[m]?.toString() ?? "" : e?.toString() ?? "", l = t == null ? null : c.find((e) => n(e) === n(t)) ?? t;
|
|
6
|
+
return /* @__PURE__ */ g("div", {
|
|
6
7
|
"data-testid": `${r}-read-only`,
|
|
7
8
|
className: "flex flex-col gap-y-1",
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
"data-field-width": a,
|
|
10
|
+
style: y(a),
|
|
11
|
+
children: [/* @__PURE__ */ d(x, {
|
|
12
|
+
title: o,
|
|
10
13
|
titleSize: s
|
|
11
|
-
}), /* @__PURE__ */
|
|
14
|
+
}), /* @__PURE__ */ d("div", {
|
|
12
15
|
"data-testid": `${r}-read-only-value`,
|
|
13
16
|
className: "text-base/6 text-delta-700",
|
|
14
|
-
children: l === null ? "-" :
|
|
17
|
+
children: l === null ? "-" : i ? i(l) : u(l)
|
|
15
18
|
})]
|
|
16
19
|
});
|
|
17
20
|
};
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
j as DynamicSelectReadOnlyValue
|
|
20
23
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as i } from "../../helpers/cn.js";
|
|
2
2
|
var d = () => ({
|
|
3
3
|
boxSizing: "border-box",
|
|
4
4
|
height: 40,
|
|
@@ -22,13 +22,23 @@ var d = () => ({
|
|
|
22
22
|
} : {
|
|
23
23
|
top: "50%",
|
|
24
24
|
transform: "translateY(-50%)"
|
|
25
|
-
},
|
|
25
|
+
}, b = (e) => ({
|
|
26
|
+
width: "100%",
|
|
27
|
+
maxWidth: `var(--field-width-${e})`
|
|
28
|
+
}), x = {
|
|
29
|
+
"--field-width-full": "100%",
|
|
30
|
+
"--form-column-width": "100%"
|
|
31
|
+
}, g = (e) => e <= 9 ? "xs" : e <= 15 ? "s" : e <= 27 ? "m" : "full", p = ({ disabled: e } = {}) => i("block pb-1 text-base font-semibold", e ? "text-delta-300" : "text-delta-800"), u = ({ focused: e, error: r, disabled: t, readOnly: o, borderless: a }) => i("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", a && !e ? "border-transparent" : t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), h = ({ focused: e, error: r, disabled: t, readOnly: o, notched: a = !0 }) => i("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", a ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-focus-ring shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), f = (e) => i("block h-[11px] overflow-hidden bg-white p-0 text-xs leading-[23px] text-transparent transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), m = ({ shrink: e, focused: r, error: t, disabled: o, readOnly: a }) => i("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-colors duration-150", o ? "text-delta-300" : a ? "text-delta-800" : t ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "text-base leading-[23px] tracking-[0.00938em]");
|
|
26
32
|
export {
|
|
27
|
-
p as
|
|
33
|
+
p as fieldLabelAboveClass,
|
|
34
|
+
g as fieldWidthForMaxLength,
|
|
35
|
+
b as fieldWidthStyle,
|
|
36
|
+
m as floatingLabelClass,
|
|
28
37
|
s as floatingLabelLayoutStyle,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
x as fullScreenFieldWidthVars,
|
|
39
|
+
f as notchedLegendClass,
|
|
40
|
+
h as notchedOutlineClass,
|
|
41
|
+
u as outlineClass,
|
|
32
42
|
l as singleLineInputLayoutStyle,
|
|
33
43
|
d as singleLineShellLayoutStyle
|
|
34
44
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn as r } from "../../../helpers/cn.js";
|
|
2
|
+
import { fieldLabelAboveClass as s } from "../field-styles.js";
|
|
3
|
+
import e from "./StyledFieldPair.module.js";
|
|
4
|
+
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
var p = ({ children: i, legend: d, className: t, dataTest: a }) => d == null ? /* @__PURE__ */ l("div", {
|
|
6
|
+
"data-testid": a,
|
|
7
|
+
className: r(e.row, t),
|
|
8
|
+
children: i
|
|
9
|
+
}) : /* @__PURE__ */ o("fieldset", {
|
|
10
|
+
"data-testid": a,
|
|
11
|
+
className: r(e.fieldset, t),
|
|
12
|
+
children: [/* @__PURE__ */ l("legend", {
|
|
13
|
+
className: r(e.legend, s()),
|
|
14
|
+
children: d
|
|
15
|
+
}), /* @__PURE__ */ l("div", {
|
|
16
|
+
className: e.row,
|
|
17
|
+
children: i
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
p as StyledFieldPair
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
var i = ({ children: t, className: d, dataTest: m }) => /* @__PURE__ */ o("div", {
|
|
3
|
+
"data-testid": m,
|
|
4
|
+
className: d,
|
|
5
|
+
style: {
|
|
6
|
+
width: "100%",
|
|
7
|
+
maxWidth: "var(--form-column-width)"
|
|
8
|
+
},
|
|
9
|
+
children: t
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
i as StyledFormColumn
|
|
13
|
+
};
|