@serendie/ui 2.1.3 → 2.2.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/client.js +79 -74
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +22 -21
- package/dist/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/components/DatePicker/DatePicker.js +203 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +6 -0
- package/dist/components/DatePicker/parseDate.d.ts +1 -0
- package/dist/components/DatePicker/styles.d.ts +1 -0
- package/dist/components/DatePicker/styles.js +224 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
- package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
- package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
- package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
- package/dist/components/ProgressIndicator/index.d.ts +4 -1
- package/dist/components/ProgressIndicator/index.js +3 -2
- package/dist/components/ProgressIndicator/util.d.ts +1 -0
- package/dist/components/ProgressIndicator/util.js +13 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/TextField/TextField.js +59 -156
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +80 -75
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
- package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
- package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
- package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
- package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
- package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
- package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
- package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
- package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
- package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
- package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
- package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
- package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
- package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
- package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
- package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
- package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
- package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
- package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
- package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
- package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
- package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
- package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
- package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
- package/dist/preset.d.ts +11 -1
- package/dist/recipes/index.d.ts +3 -2
- package/dist/recipes/index.js +5 -2
- package/dist/recipes/textFieldRecipe.d.ts +6 -0
- package/dist/recipes/textFieldRecipe.js +107 -0
- package/dist/styled-system/css/cva.js +43 -38
- package/dist/styled-system/recipes/create-recipe.js +37 -0
- package/dist/styled-system/recipes/text-field-recipe.js +61 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/keyframes/index.d.ts +8 -0
- package/dist/tokens/keyframes/index.js +6 -2
- package/package.json +3 -3
- package/styled-system/recipes/create-recipe.js +82 -0
- package/styled-system/recipes/index.d.ts +2 -0
- package/styled-system/recipes/index.js +1 -0
- package/styled-system/recipes/text-field-recipe.d.ts +28 -0
- package/styled-system/recipes/text-field-recipe.js +72 -0
- package/styled-system/types/prop-type.d.ts +1 -1
- package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
- package/dist/node_modules/proxy-compare/dist/index.js +0 -7
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
import { createAnatomy as
|
|
2
|
-
import { dataAttr as u, visuallyHiddenStyle as
|
|
3
|
-
import { isFocusVisible as
|
|
4
|
-
import { createMachine as
|
|
5
|
-
import { isString as
|
|
6
|
-
import { createProps as
|
|
7
|
-
var
|
|
1
|
+
import { createAnatomy as k } from "../../anatomy/dist/index.js";
|
|
2
|
+
import { dataAttr as u, visuallyHiddenStyle as R, isSafari as D, isLeftClick as F, dispatchInputCheckedEvent as A, trackElementRect as $, trackFormControl as P, queryAll as _ } from "../../dom-query/dist/index.js";
|
|
3
|
+
import { isFocusVisible as w, trackFocusVisible as O } from "../../focus-visible/dist/index.js";
|
|
4
|
+
import { createMachine as H, createGuards as L } from "../../core/dist/index.js";
|
|
5
|
+
import { isString as U } from "../../utils/dist/index.js";
|
|
6
|
+
import { createProps as T } from "../../types/dist/index.js";
|
|
7
|
+
var B = k("radio-group").parts(
|
|
8
8
|
"root",
|
|
9
9
|
"label",
|
|
10
10
|
"item",
|
|
11
11
|
"itemText",
|
|
12
12
|
"itemControl",
|
|
13
13
|
"indicator"
|
|
14
|
-
),
|
|
14
|
+
), c = B.build(), m = (e) => {
|
|
15
15
|
var t;
|
|
16
16
|
return ((t = e.ids) == null ? void 0 : t.root) ?? `radio-group:${e.id}`;
|
|
17
17
|
}, I = (e) => {
|
|
18
18
|
var t;
|
|
19
19
|
return ((t = e.ids) == null ? void 0 : t.label) ?? `radio-group:${e.id}:label`;
|
|
20
|
-
},
|
|
20
|
+
}, C = (e, t) => {
|
|
21
21
|
var i, r;
|
|
22
22
|
return ((r = (i = e.ids) == null ? void 0 : i.item) == null ? void 0 : r.call(i, t)) ?? `radio-group:${e.id}:radio:${t}`;
|
|
23
|
-
},
|
|
23
|
+
}, y = (e, t) => {
|
|
24
24
|
var i, r;
|
|
25
25
|
return ((r = (i = e.ids) == null ? void 0 : i.itemHiddenInput) == null ? void 0 : r.call(i, t)) ?? `radio-group:${e.id}:radio:input:${t}`;
|
|
26
|
-
},
|
|
26
|
+
}, q = (e, t) => {
|
|
27
27
|
var i, r;
|
|
28
28
|
return ((r = (i = e.ids) == null ? void 0 : i.itemControl) == null ? void 0 : r.call(i, t)) ?? `radio-group:${e.id}:radio:control:${t}`;
|
|
29
|
-
},
|
|
29
|
+
}, K = (e, t) => {
|
|
30
30
|
var i, r;
|
|
31
31
|
return ((r = (i = e.ids) == null ? void 0 : i.itemLabel) == null ? void 0 : r.call(i, t)) ?? `radio-group:${e.id}:radio:label:${t}`;
|
|
32
|
-
},
|
|
32
|
+
}, S = (e) => {
|
|
33
33
|
var t;
|
|
34
34
|
return ((t = e.ids) == null ? void 0 : t.indicator) ?? `radio-group:${e.id}:indicator`;
|
|
35
|
-
},
|
|
35
|
+
}, h = (e) => e.getById(m(e)), M = (e, t) => e.getById(y(e, t)), N = (e) => e.getById(S(e)), G = (e) => {
|
|
36
36
|
var t;
|
|
37
|
-
return (t =
|
|
38
|
-
},
|
|
37
|
+
return (t = h(e)) == null ? void 0 : t.querySelector("input:not(:disabled)");
|
|
38
|
+
}, W = (e) => {
|
|
39
39
|
var t;
|
|
40
|
-
return (t =
|
|
41
|
-
},
|
|
42
|
-
const i = `input[type=radio][data-ownedby='${CSS.escape(
|
|
43
|
-
return
|
|
44
|
-
},
|
|
40
|
+
return (t = h(e)) == null ? void 0 : t.querySelector("input:not(:disabled):checked");
|
|
41
|
+
}, b = (e) => {
|
|
42
|
+
const i = `input[type=radio][data-ownedby='${CSS.escape(m(e))}']:not([disabled])`;
|
|
43
|
+
return _(h(e), i);
|
|
44
|
+
}, j = (e, t) => {
|
|
45
45
|
if (t)
|
|
46
|
-
return e.getById(
|
|
47
|
-
},
|
|
46
|
+
return e.getById(C(e, t));
|
|
47
|
+
}, J = (e) => ({
|
|
48
48
|
left: (e == null ? void 0 : e.offsetLeft) ?? 0,
|
|
49
49
|
top: (e == null ? void 0 : e.offsetTop) ?? 0,
|
|
50
50
|
width: (e == null ? void 0 : e.offsetWidth) ?? 0,
|
|
51
51
|
height: (e == null ? void 0 : e.offsetHeight) ?? 0
|
|
52
|
-
}),
|
|
52
|
+
}), Q = (e) => ({
|
|
53
53
|
width: `${e.width}px`,
|
|
54
54
|
height: `${e.height}px`,
|
|
55
55
|
left: `${e.left}px`,
|
|
56
56
|
top: `${e.top}px`
|
|
57
57
|
});
|
|
58
|
-
function
|
|
59
|
-
const { context: i, send: r, computed:
|
|
58
|
+
function ae(e, t) {
|
|
59
|
+
const { context: i, send: r, computed: s, prop: n, scope: l, refs: v } = e, g = s("isDisabled"), E = n("readOnly");
|
|
60
60
|
function f(a) {
|
|
61
|
-
const n = i.get("focusedValue") === a.value, d = n && _();
|
|
62
61
|
return {
|
|
63
62
|
value: a.value,
|
|
64
63
|
invalid: !!a.invalid,
|
|
65
|
-
disabled: !!a.disabled ||
|
|
64
|
+
disabled: !!a.disabled || g,
|
|
66
65
|
checked: i.get("value") === a.value,
|
|
67
|
-
focused:
|
|
68
|
-
focusVisible:
|
|
66
|
+
focused: i.get("focusedValue") === a.value,
|
|
67
|
+
focusVisible: v.get("focusVisibleValue") === a.value,
|
|
69
68
|
hovered: i.get("hoveredValue") === a.value,
|
|
70
69
|
active: i.get("activeValue") === a.value
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
function
|
|
74
|
-
const
|
|
72
|
+
function p(a) {
|
|
73
|
+
const o = f(a);
|
|
75
74
|
return {
|
|
76
|
-
"data-focus": u(
|
|
77
|
-
"data-focus-visible": u(
|
|
78
|
-
"data-disabled": u(
|
|
79
|
-
"data-readonly": u(
|
|
80
|
-
"data-state":
|
|
81
|
-
"data-hover": u(
|
|
82
|
-
"data-invalid": u(
|
|
83
|
-
"data-orientation":
|
|
75
|
+
"data-focus": u(o.focused),
|
|
76
|
+
"data-focus-visible": u(o.focusVisible),
|
|
77
|
+
"data-disabled": u(o.disabled),
|
|
78
|
+
"data-readonly": u(E),
|
|
79
|
+
"data-state": o.checked ? "checked" : "unchecked",
|
|
80
|
+
"data-hover": u(o.hovered),
|
|
81
|
+
"data-invalid": u(o.invalid),
|
|
82
|
+
"data-orientation": n("orientation"),
|
|
84
83
|
"data-ssr": u(i.get("ssr"))
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
|
-
const
|
|
88
|
-
const a =
|
|
86
|
+
const V = () => {
|
|
87
|
+
const a = W(l) ?? G(l);
|
|
89
88
|
a == null || a.focus();
|
|
90
89
|
};
|
|
91
90
|
return {
|
|
92
|
-
focus:
|
|
91
|
+
focus: V,
|
|
93
92
|
value: i.get("value"),
|
|
94
93
|
setValue(a) {
|
|
95
94
|
r({ type: "SET_VALUE", value: a, isTrusted: !1 });
|
|
@@ -99,14 +98,14 @@ function te(e, t) {
|
|
|
99
98
|
},
|
|
100
99
|
getRootProps() {
|
|
101
100
|
return t.element({
|
|
102
|
-
...
|
|
101
|
+
...c.root.attrs,
|
|
103
102
|
role: "radiogroup",
|
|
104
|
-
id:
|
|
103
|
+
id: m(l),
|
|
105
104
|
"aria-labelledby": I(l),
|
|
106
|
-
"data-orientation":
|
|
107
|
-
"data-disabled": u(
|
|
108
|
-
"aria-orientation":
|
|
109
|
-
dir:
|
|
105
|
+
"data-orientation": n("orientation"),
|
|
106
|
+
"data-disabled": u(g),
|
|
107
|
+
"aria-orientation": n("orientation"),
|
|
108
|
+
dir: n("dir"),
|
|
110
109
|
style: {
|
|
111
110
|
position: "relative"
|
|
112
111
|
}
|
|
@@ -114,71 +113,71 @@ function te(e, t) {
|
|
|
114
113
|
},
|
|
115
114
|
getLabelProps() {
|
|
116
115
|
return t.element({
|
|
117
|
-
...
|
|
118
|
-
dir:
|
|
119
|
-
"data-orientation":
|
|
120
|
-
"data-disabled": u(
|
|
116
|
+
...c.label.attrs,
|
|
117
|
+
dir: n("dir"),
|
|
118
|
+
"data-orientation": n("orientation"),
|
|
119
|
+
"data-disabled": u(g),
|
|
121
120
|
id: I(l),
|
|
122
|
-
onClick:
|
|
121
|
+
onClick: V
|
|
123
122
|
});
|
|
124
123
|
},
|
|
125
124
|
getItemState: f,
|
|
126
125
|
getItemProps(a) {
|
|
127
|
-
const
|
|
126
|
+
const o = f(a);
|
|
128
127
|
return t.label({
|
|
129
|
-
...
|
|
130
|
-
dir:
|
|
131
|
-
id:
|
|
132
|
-
htmlFor:
|
|
133
|
-
...
|
|
128
|
+
...c.item.attrs,
|
|
129
|
+
dir: n("dir"),
|
|
130
|
+
id: C(l, a.value),
|
|
131
|
+
htmlFor: y(l, a.value),
|
|
132
|
+
...p(a),
|
|
134
133
|
onPointerMove() {
|
|
135
|
-
|
|
134
|
+
o.disabled || o.hovered || r({ type: "SET_HOVERED", value: a.value, hovered: !0 });
|
|
136
135
|
},
|
|
137
136
|
onPointerLeave() {
|
|
138
|
-
|
|
137
|
+
o.disabled || r({ type: "SET_HOVERED", value: null });
|
|
139
138
|
},
|
|
140
139
|
onPointerDown(d) {
|
|
141
|
-
|
|
140
|
+
o.disabled || F(d) && (o.focused && d.pointerType === "mouse" && d.preventDefault(), r({ type: "SET_ACTIVE", value: a.value, active: !0 }));
|
|
142
141
|
},
|
|
143
142
|
onPointerUp() {
|
|
144
|
-
|
|
143
|
+
o.disabled || r({ type: "SET_ACTIVE", value: null });
|
|
145
144
|
},
|
|
146
145
|
onClick() {
|
|
147
146
|
var d;
|
|
148
|
-
!
|
|
147
|
+
!o.disabled && D() && ((d = M(l, a.value)) == null || d.focus());
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
},
|
|
152
151
|
getItemTextProps(a) {
|
|
153
152
|
return t.element({
|
|
154
|
-
...
|
|
155
|
-
dir:
|
|
156
|
-
id:
|
|
157
|
-
...
|
|
153
|
+
...c.itemText.attrs,
|
|
154
|
+
dir: n("dir"),
|
|
155
|
+
id: K(l, a.value),
|
|
156
|
+
...p(a)
|
|
158
157
|
});
|
|
159
158
|
},
|
|
160
159
|
getItemControlProps(a) {
|
|
161
|
-
const
|
|
160
|
+
const o = f(a);
|
|
162
161
|
return t.element({
|
|
163
|
-
...
|
|
164
|
-
dir:
|
|
165
|
-
id:
|
|
166
|
-
"data-active": u(
|
|
162
|
+
...c.itemControl.attrs,
|
|
163
|
+
dir: n("dir"),
|
|
164
|
+
id: q(l, a.value),
|
|
165
|
+
"data-active": u(o.active),
|
|
167
166
|
"aria-hidden": !0,
|
|
168
|
-
...
|
|
167
|
+
...p(a)
|
|
169
168
|
});
|
|
170
169
|
},
|
|
171
170
|
getItemHiddenInputProps(a) {
|
|
172
|
-
const
|
|
171
|
+
const o = f(a);
|
|
173
172
|
return t.input({
|
|
174
|
-
"data-ownedby":
|
|
175
|
-
id:
|
|
173
|
+
"data-ownedby": m(l),
|
|
174
|
+
id: y(l, a.value),
|
|
176
175
|
type: "radio",
|
|
177
|
-
name:
|
|
178
|
-
form:
|
|
176
|
+
name: n("name") || n("id"),
|
|
177
|
+
form: n("form"),
|
|
179
178
|
value: a.value,
|
|
180
179
|
onClick(d) {
|
|
181
|
-
if (
|
|
180
|
+
if (E) {
|
|
182
181
|
d.preventDefault();
|
|
183
182
|
return;
|
|
184
183
|
}
|
|
@@ -188,7 +187,8 @@ function te(e, t) {
|
|
|
188
187
|
r({ type: "SET_FOCUSED", value: null, focused: !1 });
|
|
189
188
|
},
|
|
190
189
|
onFocus() {
|
|
191
|
-
|
|
190
|
+
const d = w();
|
|
191
|
+
r({ type: "SET_FOCUSED", value: a.value, focused: !0, focusVisible: d });
|
|
192
192
|
},
|
|
193
193
|
onKeyDown(d) {
|
|
194
194
|
d.defaultPrevented || d.key === " " && r({ type: "SET_ACTIVE", value: a.value, active: !0 });
|
|
@@ -196,20 +196,20 @@ function te(e, t) {
|
|
|
196
196
|
onKeyUp(d) {
|
|
197
197
|
d.defaultPrevented || d.key === " " && r({ type: "SET_ACTIVE", value: null });
|
|
198
198
|
},
|
|
199
|
-
disabled:
|
|
200
|
-
defaultChecked:
|
|
201
|
-
style:
|
|
199
|
+
disabled: o.disabled,
|
|
200
|
+
defaultChecked: o.checked,
|
|
201
|
+
style: R
|
|
202
202
|
});
|
|
203
203
|
},
|
|
204
204
|
getIndicatorProps() {
|
|
205
205
|
const a = i.get("indicatorRect");
|
|
206
206
|
return t.element({
|
|
207
|
-
id:
|
|
208
|
-
...
|
|
209
|
-
dir:
|
|
207
|
+
id: S(l),
|
|
208
|
+
...c.indicator.attrs,
|
|
209
|
+
dir: n("dir"),
|
|
210
210
|
hidden: i.get("value") == null,
|
|
211
|
-
"data-disabled": u(
|
|
212
|
-
"data-orientation":
|
|
211
|
+
"data-disabled": u(g),
|
|
212
|
+
"data-orientation": n("orientation"),
|
|
213
213
|
style: {
|
|
214
214
|
"--transition-property": "left, top, width, height",
|
|
215
215
|
"--left": a == null ? void 0 : a.left,
|
|
@@ -221,13 +221,13 @@ function te(e, t) {
|
|
|
221
221
|
transitionProperty: "var(--transition-property)",
|
|
222
222
|
transitionDuration: i.get("canIndicatorTransition") ? "var(--transition-duration, 150ms)" : "0ms",
|
|
223
223
|
transitionTimingFunction: "var(--transition-timing-function)",
|
|
224
|
-
[
|
|
224
|
+
[n("orientation") === "horizontal" ? "left" : "top"]: n("orientation") === "horizontal" ? "var(--left)" : "var(--top)"
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
var { not:
|
|
230
|
+
var { not: X } = L(), ie = H({
|
|
231
231
|
props({ props: e }) {
|
|
232
232
|
return {
|
|
233
233
|
orientation: "vertical",
|
|
@@ -272,7 +272,8 @@ var { not: Q } = H(), ae = O({
|
|
|
272
272
|
},
|
|
273
273
|
refs() {
|
|
274
274
|
return {
|
|
275
|
-
indicatorCleanup: null
|
|
275
|
+
indicatorCleanup: null,
|
|
276
|
+
focusVisibleValue: null
|
|
276
277
|
};
|
|
277
278
|
},
|
|
278
279
|
computed: {
|
|
@@ -289,7 +290,7 @@ var { not: Q } = H(), ae = O({
|
|
|
289
290
|
on: {
|
|
290
291
|
SET_VALUE: [
|
|
291
292
|
{
|
|
292
|
-
guard:
|
|
293
|
+
guard: X("isTrusted"),
|
|
293
294
|
actions: ["setValue", "dispatchChangeEvent"]
|
|
294
295
|
},
|
|
295
296
|
{
|
|
@@ -315,7 +316,7 @@ var { not: Q } = H(), ae = O({
|
|
|
315
316
|
},
|
|
316
317
|
effects: {
|
|
317
318
|
trackFormControlState({ context: e, scope: t }) {
|
|
318
|
-
return
|
|
319
|
+
return P(h(t), {
|
|
319
320
|
onFieldsetDisabledChange(i) {
|
|
320
321
|
e.set("fieldsetDisabled", i);
|
|
321
322
|
},
|
|
@@ -326,7 +327,7 @@ var { not: Q } = H(), ae = O({
|
|
|
326
327
|
},
|
|
327
328
|
trackFocusVisible({ scope: e }) {
|
|
328
329
|
var t;
|
|
329
|
-
return
|
|
330
|
+
return O({ root: (t = e.getRootNode) == null ? void 0 : t.call(e) });
|
|
330
331
|
}
|
|
331
332
|
},
|
|
332
333
|
actions: {
|
|
@@ -339,16 +340,16 @@ var { not: Q } = H(), ae = O({
|
|
|
339
340
|
setActive({ context: e, event: t }) {
|
|
340
341
|
e.set("activeValue", t.value);
|
|
341
342
|
},
|
|
342
|
-
setFocused({ context: e, event: t }) {
|
|
343
|
-
e.set("focusedValue", t.value);
|
|
343
|
+
setFocused({ context: e, event: t, refs: i }) {
|
|
344
|
+
e.set("focusedValue", t.value), i.set("focusVisibleValue", t.focusVisible ? t.value : null);
|
|
344
345
|
},
|
|
345
346
|
syncInputElements({ context: e, scope: t }) {
|
|
346
|
-
|
|
347
|
+
b(t).forEach((r) => {
|
|
347
348
|
r.checked = r.value === e.get("value");
|
|
348
349
|
});
|
|
349
350
|
},
|
|
350
351
|
setIndicatorTransition({ context: e }) {
|
|
351
|
-
e.set("canIndicatorTransition",
|
|
352
|
+
e.set("canIndicatorTransition", U(e.get("value")));
|
|
352
353
|
},
|
|
353
354
|
cleanupObserver({ refs: e }) {
|
|
354
355
|
var t;
|
|
@@ -359,32 +360,32 @@ var { not: Q } = H(), ae = O({
|
|
|
359
360
|
},
|
|
360
361
|
syncIndicatorRect({ context: e, scope: t, refs: i }) {
|
|
361
362
|
var l;
|
|
362
|
-
if ((l = i.get("indicatorCleanup")) == null || l(), !
|
|
363
|
-
const r = e.get("value"),
|
|
364
|
-
if (r == null || !
|
|
363
|
+
if ((l = i.get("indicatorCleanup")) == null || l(), !N(t)) return;
|
|
364
|
+
const r = e.get("value"), s = j(t, r);
|
|
365
|
+
if (r == null || !s) {
|
|
365
366
|
e.set("canIndicatorTransition", !1), e.set("indicatorRect", {});
|
|
366
367
|
return;
|
|
367
368
|
}
|
|
368
|
-
const
|
|
369
|
-
measure(
|
|
370
|
-
return
|
|
369
|
+
const n = $([s], {
|
|
370
|
+
measure(v) {
|
|
371
|
+
return J(v);
|
|
371
372
|
},
|
|
372
|
-
onEntry({ rects:
|
|
373
|
-
e.set("indicatorRect",
|
|
373
|
+
onEntry({ rects: v }) {
|
|
374
|
+
e.set("indicatorRect", Q(v[0]));
|
|
374
375
|
}
|
|
375
376
|
});
|
|
376
|
-
i.set("indicatorCleanup",
|
|
377
|
+
i.set("indicatorCleanup", n);
|
|
377
378
|
},
|
|
378
379
|
dispatchChangeEvent({ context: e, scope: t }) {
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
b(t).forEach((r) => {
|
|
381
|
+
const s = r.value === e.get("value");
|
|
382
|
+
s !== r.checked && A(r, { checked: s });
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
}
|
|
386
387
|
});
|
|
387
|
-
|
|
388
|
+
T()([
|
|
388
389
|
"dir",
|
|
389
390
|
"disabled",
|
|
390
391
|
"form",
|
|
@@ -398,9 +399,9 @@ b()([
|
|
|
398
399
|
"value",
|
|
399
400
|
"defaultValue"
|
|
400
401
|
]);
|
|
401
|
-
|
|
402
|
+
T()(["value", "disabled", "invalid"]);
|
|
402
403
|
export {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
B as anatomy,
|
|
405
|
+
ae as connect,
|
|
406
|
+
ie as machine
|
|
406
407
|
};
|