@serendie/ui 3.5.1-dev.202605201240 → 3.5.1-dev.202606091509
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/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
- package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +1 -1
- package/dist/components/Tabs/TabItem.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/i18n/provider.d.ts +1 -1
- package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +49 -50
- package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +70 -68
- package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +322 -308
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +93 -79
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +35 -43
- package/dist/node_modules/@zag-js/date-utils/dist/locale.js +12 -0
- package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +36 -35
- package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +27 -37
- package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +56 -41
- package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +51 -31
- package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +46 -25
- package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
- package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +13 -21
- package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +11 -0
- package/dist/node_modules/@zag-js/live-region/dist/index.js +29 -19
- package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +138 -135
- package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
- package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
- package/dist/node_modules/@zag-js/popper/dist/get-placement.js +82 -71
- package/dist/node_modules/@zag-js/react/dist/machine.js +105 -96
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +34 -26
- package/dist/node_modules/@zag-js/select/dist/select.connect.js +104 -101
- package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
- package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +63 -60
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +27 -25
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -14
- package/dist/theme/initColorScheme.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
export declare const BottomNavigation: ({ children, className, ...props }: ComponentProps<"nav">) => import("react
|
|
2
|
+
export declare const BottomNavigation: ({ children, className, ...props }: ComponentProps<"nav">) => import("react").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { TableOptions } from '@tanstack/react-table';
|
|
|
2
2
|
export interface DataTableComponentProps<TData = Record<string, unknown>> extends Omit<TableOptions<TData>, "getCoreRowModel" | "getSortedRowModel"> {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function DataTableComponent<TData = Record<string, unknown>>({ className, enableRowSelection, onRowSelectionChange, onSortingChange, state, ...tableOptions }: DataTableComponentProps<TData>): import("react
|
|
5
|
+
export declare function DataTableComponent<TData = Record<string, unknown>>({ className, enableRowSelection, onRowSelectionChange, onSortingChange, state, ...tableOptions }: DataTableComponentProps<TData>): import("react").JSX.Element;
|
|
6
6
|
export default DataTableComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ChoiceBoxProps } from '../../ChoiceBox';
|
|
2
2
|
export declare const BodyCheckbox: ({ checked, onChange, value, state, ...props }: {
|
|
3
3
|
state?: "enabled" | "hovered" | "selected";
|
|
4
|
-
} & Omit<ChoiceBoxProps, "type">) => import("react
|
|
4
|
+
} & Omit<ChoiceBoxProps, "type">) => import("react").JSX.Element;
|
|
@@ -29,5 +29,5 @@ export declare const DividerStyle: import('../../../styled-system/types').Recipe
|
|
|
29
29
|
};
|
|
30
30
|
}>;
|
|
31
31
|
type DividerProps = ComponentProps<"hr"> & RecipeVariantProps<typeof DividerStyle>;
|
|
32
|
-
export declare const Divider: (props: DividerProps) => import("react
|
|
32
|
+
export declare const Divider: (props: DividerProps) => import("react").JSX.Element;
|
|
33
33
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
export declare const List: ({ children, ...props }: ComponentProps<"ul">) => import("react
|
|
2
|
+
export declare const List: ({ children, ...props }: ComponentProps<"ul">) => import("react").JSX.Element;
|
|
@@ -6,6 +6,6 @@ export interface ProgressIndicatorProps extends React.ComponentProps<"div"> {
|
|
|
6
6
|
max?: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const ProgressIndicator: {
|
|
9
|
-
({ value, max, type, size, className, style, ...props }: ProgressIndicatorProps):
|
|
9
|
+
({ value, max, type, size, className, style, ...props }: ProgressIndicatorProps): React.JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -5,6 +5,6 @@ export interface ProgressIndicatorIndeterminateProps extends React.ComponentProp
|
|
|
5
5
|
color?: "primary" | "subtle";
|
|
6
6
|
}
|
|
7
7
|
export declare const ProgressIndicatorIndeterminate: {
|
|
8
|
-
({ type, size, color, className, style, ...props }: ProgressIndicatorIndeterminateProps):
|
|
8
|
+
({ type, size, color, className, style, ...props }: ProgressIndicatorIndeterminateProps): React.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
@@ -18,5 +18,5 @@ type ExclusiveBadgeProps = ({
|
|
|
18
18
|
dot?: boolean;
|
|
19
19
|
});
|
|
20
20
|
export type TabItemProps = TabItemBaseProps & RecipeVariantProps<typeof TabItemStyle> & ArkTabs.TriggerProps & ExclusiveBadgeProps;
|
|
21
|
-
export declare const TabItem: ({ title, value, disabled, dot, badge, className, ...props }: TabItemProps) => import("react
|
|
21
|
+
export declare const TabItem: ({ title, value, disabled, dot, badge, className, ...props }: TabItemProps) => import("react").JSX.Element;
|
|
22
22
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tabs as ArkTabs } from '@ark-ui/react';
|
|
2
2
|
export declare const TabsStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"list" | "root", import('../../../styled-system/types').SlotRecipeVariantRecord<"list" | "root">>;
|
|
3
|
-
export declare const Tabs: ({ children, className, ...props }: ArkTabs.RootProps) => import("react
|
|
3
|
+
export declare const Tabs: ({ children, className, ...props }: ArkTabs.RootProps) => import("react").JSX.Element;
|
package/dist/i18n/provider.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface SerendieProviderProps {
|
|
|
32
32
|
* </SerendieProvider>
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare function SerendieProvider({ lang, colorTheme, colorMode, children, }: SerendieProviderProps): import("react
|
|
35
|
+
export declare function SerendieProvider({ lang, colorTheme, colorMode, children, }: SerendieProviderProps): import("react").JSX.Element;
|
|
36
36
|
/**
|
|
37
37
|
* @deprecated LanguageProvider は SerendieProvider にリネームされました
|
|
38
38
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getEventKey as G } from "../../dom-query/dist/event.js";
|
|
2
2
|
import { isSafari as E } from "../../dom-query/dist/platform.js";
|
|
3
|
-
import { dataAttr as
|
|
4
|
-
import { parts as
|
|
3
|
+
import { dataAttr as i } from "../../dom-query/dist/shared.js";
|
|
4
|
+
import { parts as l } from "./accordion.anatomy.js";
|
|
5
5
|
import { getRootId as I, getItemContentId as f, getItemTriggerId as v, getItemId as S } from "./accordion.dom.js";
|
|
6
|
-
function H(T,
|
|
7
|
-
const { send:
|
|
6
|
+
function H(T, u) {
|
|
7
|
+
const { send: o, context: p, prop: a, scope: d, computed: c } = T, m = p.get("focusedValue"), g = p.get("value"), y = a("multiple");
|
|
8
8
|
function O(t) {
|
|
9
9
|
let e = t;
|
|
10
|
-
!y && e.length > 1 && (e = [e[0]]),
|
|
10
|
+
!y && e.length > 1 && (e = [e[0]]), o({ type: "VALUE.SET", value: e });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function s(t) {
|
|
13
13
|
return {
|
|
14
14
|
expanded: g.includes(t.value),
|
|
15
15
|
focused: m === t.value,
|
|
@@ -20,99 +20,98 @@ function H(T, s) {
|
|
|
20
20
|
focusedValue: m,
|
|
21
21
|
value: g,
|
|
22
22
|
setValue: O,
|
|
23
|
-
getItemState:
|
|
23
|
+
getItemState: s,
|
|
24
24
|
getRootProps() {
|
|
25
|
-
return
|
|
26
|
-
...
|
|
25
|
+
return u.element({
|
|
26
|
+
...l.root.attrs,
|
|
27
27
|
dir: a("dir"),
|
|
28
|
-
id: I(
|
|
28
|
+
id: I(d),
|
|
29
29
|
"data-orientation": a("orientation")
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
32
|
getItemProps(t) {
|
|
33
|
-
const e =
|
|
34
|
-
return
|
|
35
|
-
...
|
|
33
|
+
const e = s(t);
|
|
34
|
+
return u.element({
|
|
35
|
+
...l.item.attrs,
|
|
36
36
|
dir: a("dir"),
|
|
37
|
-
id: S(
|
|
37
|
+
id: S(d, t.value),
|
|
38
38
|
"data-state": e.expanded ? "open" : "closed",
|
|
39
|
-
"data-focus":
|
|
40
|
-
"data-disabled":
|
|
39
|
+
"data-focus": i(e.focused),
|
|
40
|
+
"data-disabled": i(e.disabled),
|
|
41
41
|
"data-orientation": a("orientation")
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
44
|
getItemContentProps(t) {
|
|
45
|
-
const e =
|
|
46
|
-
return
|
|
47
|
-
...
|
|
45
|
+
const e = s(t);
|
|
46
|
+
return u.element({
|
|
47
|
+
...l.itemContent.attrs,
|
|
48
48
|
dir: a("dir"),
|
|
49
49
|
role: "region",
|
|
50
|
-
id: f(
|
|
51
|
-
"aria-labelledby": v(
|
|
50
|
+
id: f(d, t.value),
|
|
51
|
+
"aria-labelledby": v(d, t.value),
|
|
52
52
|
hidden: !e.expanded,
|
|
53
53
|
"data-state": e.expanded ? "open" : "closed",
|
|
54
|
-
"data-disabled":
|
|
55
|
-
"data-focus":
|
|
54
|
+
"data-disabled": i(e.disabled),
|
|
55
|
+
"data-focus": i(e.focused),
|
|
56
56
|
"data-orientation": a("orientation")
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
59
|
getItemIndicatorProps(t) {
|
|
60
|
-
const e =
|
|
61
|
-
return
|
|
62
|
-
...
|
|
60
|
+
const e = s(t);
|
|
61
|
+
return u.element({
|
|
62
|
+
...l.itemIndicator.attrs,
|
|
63
63
|
dir: a("dir"),
|
|
64
64
|
"aria-hidden": !0,
|
|
65
65
|
"data-state": e.expanded ? "open" : "closed",
|
|
66
|
-
"data-disabled":
|
|
67
|
-
"data-focus":
|
|
66
|
+
"data-disabled": i(e.disabled),
|
|
67
|
+
"data-focus": i(e.focused),
|
|
68
68
|
"data-orientation": a("orientation")
|
|
69
69
|
});
|
|
70
70
|
},
|
|
71
71
|
getItemTriggerProps(t) {
|
|
72
|
-
const { value: e } = t,
|
|
73
|
-
return
|
|
74
|
-
...
|
|
72
|
+
const { value: e } = t, r = s(t);
|
|
73
|
+
return u.button({
|
|
74
|
+
...l.itemTrigger.attrs,
|
|
75
75
|
type: "button",
|
|
76
76
|
dir: a("dir"),
|
|
77
|
-
id: v(
|
|
78
|
-
"aria-controls": f(
|
|
79
|
-
"data-controls": f(
|
|
80
|
-
"aria-expanded":
|
|
81
|
-
disabled:
|
|
77
|
+
id: v(d, e),
|
|
78
|
+
"aria-controls": f(d, e),
|
|
79
|
+
"data-controls": f(d, e),
|
|
80
|
+
"aria-expanded": r.expanded,
|
|
81
|
+
disabled: r.disabled,
|
|
82
82
|
"data-orientation": a("orientation"),
|
|
83
|
-
"
|
|
84
|
-
"data-
|
|
85
|
-
"data-
|
|
86
|
-
"data-ownedby": I(i),
|
|
83
|
+
"data-state": r.expanded ? "open" : "closed",
|
|
84
|
+
"data-focus": i(r.focused),
|
|
85
|
+
"data-ownedby": I(d),
|
|
87
86
|
onFocus() {
|
|
88
|
-
|
|
87
|
+
r.disabled || o({ type: "TRIGGER.FOCUS", value: e });
|
|
89
88
|
},
|
|
90
89
|
onBlur() {
|
|
91
|
-
|
|
90
|
+
r.disabled || o({ type: "TRIGGER.BLUR" });
|
|
92
91
|
},
|
|
93
92
|
onClick(n) {
|
|
94
|
-
|
|
93
|
+
r.disabled || (E() && n.currentTarget.focus(), o({ type: "TRIGGER.CLICK", value: e }));
|
|
95
94
|
},
|
|
96
95
|
onKeyDown(n) {
|
|
97
|
-
if (n.defaultPrevented ||
|
|
96
|
+
if (n.defaultPrevented || r.disabled) return;
|
|
98
97
|
const R = {
|
|
99
98
|
ArrowDown() {
|
|
100
|
-
c("isHorizontal") ||
|
|
99
|
+
c("isHorizontal") || o({ type: "GOTO.NEXT", value: e });
|
|
101
100
|
},
|
|
102
101
|
ArrowUp() {
|
|
103
|
-
c("isHorizontal") ||
|
|
102
|
+
c("isHorizontal") || o({ type: "GOTO.PREV", value: e });
|
|
104
103
|
},
|
|
105
104
|
ArrowRight() {
|
|
106
|
-
c("isHorizontal") &&
|
|
105
|
+
c("isHorizontal") && o({ type: "GOTO.NEXT", value: e });
|
|
107
106
|
},
|
|
108
107
|
ArrowLeft() {
|
|
109
|
-
c("isHorizontal") &&
|
|
108
|
+
c("isHorizontal") && o({ type: "GOTO.PREV", value: e });
|
|
110
109
|
},
|
|
111
110
|
Home() {
|
|
112
|
-
|
|
111
|
+
o({ type: "GOTO.FIRST", value: e });
|
|
113
112
|
},
|
|
114
113
|
End() {
|
|
115
|
-
|
|
114
|
+
o({ type: "GOTO.LAST", value: e });
|
|
116
115
|
}
|
|
117
116
|
}, x = G(n, {
|
|
118
117
|
dir: a("dir"),
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { isDownloadingEvent as
|
|
2
|
-
import { isAnchorElement as
|
|
3
|
-
import { dataAttr as a, ariaAttr as
|
|
4
|
-
import { getPlacementStyles as
|
|
1
|
+
import { isDownloadingEvent as J, isOpeningInNewTab as Y, isContextMenuEvent as $, isLeftClick as v, getEventKey as w, isComposingEvent as Q } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { isAnchorElement as X } from "../../dom-query/dist/node.js";
|
|
3
|
+
import { dataAttr as a, ariaAttr as D } from "../../dom-query/dist/shared.js";
|
|
4
|
+
import { getPlacementStyles as Z } from "../../popper/dist/get-styles.js";
|
|
5
|
+
import { getPlacementSide as z } from "../../popper/dist/placement.js";
|
|
5
6
|
import { parts as u } from "./combobox.anatomy.js";
|
|
6
|
-
import { getItemGroupLabelId as
|
|
7
|
-
import { ensure as
|
|
8
|
-
function
|
|
9
|
-
const { context: p, prop: r, state:
|
|
7
|
+
import { getItemGroupLabelId as K, getItemGroupId as ee, getItemId as x, getInputId as O, getClearTriggerId as te, getLabelId as U, getContentId as A, focusInputEl as re, getTriggerId as ie, getPositionerId as ae, getControlId as ne, getTriggerEl as oe, getRootId as le, getInputEl as de, getItemEl as se } from "./combobox.dom.js";
|
|
8
|
+
import { ensure as ue } from "../../utils/dist/warning.js";
|
|
9
|
+
function Ee(M, d) {
|
|
10
|
+
const { context: p, prop: r, state: L, send: i, scope: n, computed: y, event: G } = M, V = r("translations"), h = r("collection"), c = !!r("disabled"), E = y("isInteractive"), m = !!r("invalid"), H = !!r("required"), P = !!r("readOnly"), s = L.hasTag("open"), S = L.hasTag("focused"), I = r("composite"), g = p.get("highlightedValue"), T = p.get("currentPlacement"), _ = T ? z(T) : void 0, F = Z({
|
|
10
11
|
...r("positioning"),
|
|
11
|
-
placement:
|
|
12
|
+
placement: T
|
|
12
13
|
});
|
|
13
|
-
function
|
|
14
|
+
function C(e) {
|
|
14
15
|
const t = h.getItemDisabled(e.item), l = h.getItemValue(e.item);
|
|
15
|
-
return
|
|
16
|
+
return ue(l, () => `[zag-js] No value found for item ${JSON.stringify(e.item)}`), {
|
|
16
17
|
value: l,
|
|
17
18
|
disabled: !!(c || t),
|
|
18
19
|
highlighted: g === l,
|
|
@@ -20,7 +21,7 @@ function me(x, d) {
|
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
return {
|
|
23
|
-
focused:
|
|
24
|
+
focused: S,
|
|
24
25
|
open: s,
|
|
25
26
|
inputValue: p.get("inputValue"),
|
|
26
27
|
highlightedValue: g,
|
|
@@ -58,16 +59,16 @@ function me(x, d) {
|
|
|
58
59
|
},
|
|
59
60
|
focus() {
|
|
60
61
|
var e;
|
|
61
|
-
(e =
|
|
62
|
+
(e = de(n)) == null || e.focus();
|
|
62
63
|
},
|
|
63
64
|
setOpen(e, t = "script") {
|
|
64
|
-
|
|
65
|
+
L.hasTag("open") !== e && i({ type: e ? "OPEN" : "CLOSE", src: t });
|
|
65
66
|
},
|
|
66
67
|
getRootProps() {
|
|
67
68
|
return d.element({
|
|
68
69
|
...u.root.attrs,
|
|
69
70
|
dir: r("dir"),
|
|
70
|
-
id:
|
|
71
|
+
id: le(n),
|
|
71
72
|
"data-invalid": a(m),
|
|
72
73
|
"data-readonly": a(P)
|
|
73
74
|
});
|
|
@@ -76,16 +77,16 @@ function me(x, d) {
|
|
|
76
77
|
return d.label({
|
|
77
78
|
...u.label.attrs,
|
|
78
79
|
dir: r("dir"),
|
|
79
|
-
htmlFor:
|
|
80
|
-
id:
|
|
80
|
+
htmlFor: O(n),
|
|
81
|
+
id: U(n),
|
|
81
82
|
"data-readonly": a(P),
|
|
82
83
|
"data-disabled": a(c),
|
|
83
84
|
"data-invalid": a(m),
|
|
84
|
-
"data-required": a(
|
|
85
|
-
"data-focus": a(
|
|
85
|
+
"data-required": a(H),
|
|
86
|
+
"data-focus": a(S),
|
|
86
87
|
onClick(e) {
|
|
87
88
|
var t;
|
|
88
|
-
I || (e.preventDefault(), (t =
|
|
89
|
+
I || (e.preventDefault(), (t = oe(n)) == null || t.focus({ preventScroll: !0 }));
|
|
89
90
|
}
|
|
90
91
|
});
|
|
91
92
|
},
|
|
@@ -93,9 +94,9 @@ function me(x, d) {
|
|
|
93
94
|
return d.element({
|
|
94
95
|
...u.control.attrs,
|
|
95
96
|
dir: r("dir"),
|
|
96
|
-
id:
|
|
97
|
+
id: ne(n),
|
|
97
98
|
"data-state": s ? "open" : "closed",
|
|
98
|
-
"data-focus": a(
|
|
99
|
+
"data-focus": a(S),
|
|
99
100
|
"data-disabled": a(c),
|
|
100
101
|
"data-invalid": a(m)
|
|
101
102
|
});
|
|
@@ -104,15 +105,15 @@ function me(x, d) {
|
|
|
104
105
|
return d.element({
|
|
105
106
|
...u.positioner.attrs,
|
|
106
107
|
dir: r("dir"),
|
|
107
|
-
id:
|
|
108
|
-
style:
|
|
108
|
+
id: ae(n),
|
|
109
|
+
style: F.floating
|
|
109
110
|
});
|
|
110
111
|
},
|
|
111
112
|
getInputProps() {
|
|
112
113
|
return d.input({
|
|
113
114
|
...u.input.attrs,
|
|
114
115
|
dir: r("dir"),
|
|
115
|
-
"aria-invalid":
|
|
116
|
+
"aria-invalid": D(m),
|
|
116
117
|
"data-invalid": a(m),
|
|
117
118
|
"data-autofocus": a(r("autoFocus")),
|
|
118
119
|
name: r("name"),
|
|
@@ -125,17 +126,17 @@ function me(x, d) {
|
|
|
125
126
|
spellCheck: "false",
|
|
126
127
|
readOnly: P,
|
|
127
128
|
placeholder: r("placeholder"),
|
|
128
|
-
id:
|
|
129
|
+
id: O(n),
|
|
129
130
|
type: "text",
|
|
130
131
|
role: "combobox",
|
|
131
132
|
defaultValue: p.get("inputValue"),
|
|
132
133
|
"aria-autocomplete": y("autoComplete") ? "both" : "list",
|
|
133
|
-
"aria-controls":
|
|
134
|
+
"aria-controls": A(n),
|
|
134
135
|
"aria-expanded": s,
|
|
135
136
|
"data-state": s ? "open" : "closed",
|
|
136
|
-
"aria-activedescendant": g ?
|
|
137
|
+
"aria-activedescendant": g ? x(n, g) : void 0,
|
|
137
138
|
onClick(e) {
|
|
138
|
-
e.defaultPrevented || r("openOnClick") &&
|
|
139
|
+
e.defaultPrevented || r("openOnClick") && E && i({ type: "INPUT.CLICK", src: "input-click" });
|
|
139
140
|
},
|
|
140
141
|
onFocus() {
|
|
141
142
|
c || i({ type: "INPUT.FOCUS" });
|
|
@@ -147,8 +148,8 @@ function me(x, d) {
|
|
|
147
148
|
i({ type: "INPUT.CHANGE", value: e.currentTarget.value, src: "input-change" });
|
|
148
149
|
},
|
|
149
150
|
onKeyDown(e) {
|
|
150
|
-
if (e.defaultPrevented || !
|
|
151
|
-
const t = r("openOnKeyPress"), l = e.ctrlKey || e.metaKey || e.shiftKey, o = !0,
|
|
151
|
+
if (e.defaultPrevented || !E || e.ctrlKey || e.shiftKey || Q(e)) return;
|
|
152
|
+
const t = r("openOnKeyPress"), l = e.ctrlKey || e.metaKey || e.shiftKey, o = !0, b = {
|
|
152
153
|
ArrowDown(f) {
|
|
153
154
|
!t && !s || (i({ type: f.altKey ? "OPEN" : "INPUT.ARROW_DOWN", keypress: o, src: "arrow-key" }), f.preventDefault());
|
|
154
155
|
},
|
|
@@ -162,17 +163,17 @@ function me(x, d) {
|
|
|
162
163
|
l || (i({ type: "INPUT.END", keypress: o }), s && f.preventDefault());
|
|
163
164
|
},
|
|
164
165
|
Enter(f) {
|
|
165
|
-
var
|
|
166
|
+
var R;
|
|
166
167
|
i({ type: "INPUT.ENTER", keypress: o, src: "item-select" });
|
|
167
|
-
const
|
|
168
|
-
if (s && !
|
|
169
|
-
const
|
|
170
|
-
|
|
168
|
+
const W = g != null, B = r("alwaysSubmitOnEnter"), j = y("isCustomValue") && !r("allowCustomValue");
|
|
169
|
+
if (s && !B && (W || j) && f.preventDefault(), g == null) return;
|
|
170
|
+
const k = se(n, g);
|
|
171
|
+
X(k) && ((R = r("navigate")) == null || R({ value: g, node: k, href: k.href }));
|
|
171
172
|
},
|
|
172
173
|
Escape() {
|
|
173
174
|
i({ type: "INPUT.ESCAPE", keypress: o, src: "escape-key" }), e.preventDefault();
|
|
174
175
|
}
|
|
175
|
-
},
|
|
176
|
+
}, q = w(e, { dir: r("dir") }), N = b[q];
|
|
176
177
|
N == null || N(e);
|
|
177
178
|
}
|
|
178
179
|
});
|
|
@@ -181,14 +182,14 @@ function me(x, d) {
|
|
|
181
182
|
return d.button({
|
|
182
183
|
...u.trigger.attrs,
|
|
183
184
|
dir: r("dir"),
|
|
184
|
-
id:
|
|
185
|
+
id: ie(n),
|
|
185
186
|
"aria-haspopup": I ? "listbox" : "dialog",
|
|
186
187
|
type: "button",
|
|
187
188
|
tabIndex: e.focusable ? void 0 : -1,
|
|
188
|
-
"aria-label":
|
|
189
|
+
"aria-label": V.triggerLabel,
|
|
189
190
|
"aria-expanded": s,
|
|
190
191
|
"data-state": s ? "open" : "closed",
|
|
191
|
-
"aria-controls": s ?
|
|
192
|
+
"aria-controls": s ? A(n) : void 0,
|
|
192
193
|
disabled: c,
|
|
193
194
|
"data-invalid": a(m),
|
|
194
195
|
"data-focusable": a(e.focusable),
|
|
@@ -198,11 +199,11 @@ function me(x, d) {
|
|
|
198
199
|
e.focusable && i({ type: "INPUT.FOCUS", src: "trigger" });
|
|
199
200
|
},
|
|
200
201
|
onClick(t) {
|
|
201
|
-
t.defaultPrevented ||
|
|
202
|
+
t.defaultPrevented || E && v(t) && i({ type: "TRIGGER.CLICK", src: "trigger-click" });
|
|
202
203
|
},
|
|
203
204
|
onPointerDown(t) {
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
E && t.pointerType !== "touch" && v(t) && (t.preventDefault(), queueMicrotask(() => {
|
|
206
|
+
re(n);
|
|
206
207
|
}));
|
|
207
208
|
},
|
|
208
209
|
onKeyDown(t) {
|
|
@@ -214,8 +215,8 @@ function me(x, d) {
|
|
|
214
215
|
ArrowUp() {
|
|
215
216
|
i({ type: "INPUT.ARROW_UP", src: "arrow-key" });
|
|
216
217
|
}
|
|
217
|
-
}, o =
|
|
218
|
-
|
|
218
|
+
}, o = w(t, { dir: r("dir") }), b = l[o];
|
|
219
|
+
b && (b(t), t.preventDefault());
|
|
219
220
|
}
|
|
220
221
|
});
|
|
221
222
|
},
|
|
@@ -223,17 +224,18 @@ function me(x, d) {
|
|
|
223
224
|
return d.element({
|
|
224
225
|
...u.content.attrs,
|
|
225
226
|
dir: r("dir"),
|
|
226
|
-
id:
|
|
227
|
+
id: A(n),
|
|
227
228
|
role: I ? "listbox" : "dialog",
|
|
228
229
|
tabIndex: -1,
|
|
229
230
|
hidden: !s,
|
|
230
231
|
"data-state": s ? "open" : "closed",
|
|
231
|
-
"data-placement":
|
|
232
|
-
"
|
|
232
|
+
"data-placement": T,
|
|
233
|
+
"data-side": _,
|
|
234
|
+
"aria-labelledby": U(n),
|
|
233
235
|
"aria-multiselectable": r("multiple") && I ? !0 : void 0,
|
|
234
236
|
"data-empty": a(h.size === 0),
|
|
235
237
|
onPointerDown(e) {
|
|
236
|
-
|
|
238
|
+
v(e) && e.preventDefault();
|
|
237
239
|
}
|
|
238
240
|
});
|
|
239
241
|
},
|
|
@@ -242,7 +244,7 @@ function me(x, d) {
|
|
|
242
244
|
...u.list.attrs,
|
|
243
245
|
role: I ? void 0 : "listbox",
|
|
244
246
|
"data-empty": a(h.size === 0),
|
|
245
|
-
"aria-labelledby":
|
|
247
|
+
"aria-labelledby": U(n),
|
|
246
248
|
"aria-multiselectable": r("multiple") && !I ? !0 : void 0
|
|
247
249
|
});
|
|
248
250
|
},
|
|
@@ -250,35 +252,35 @@ function me(x, d) {
|
|
|
250
252
|
return d.button({
|
|
251
253
|
...u.clearTrigger.attrs,
|
|
252
254
|
dir: r("dir"),
|
|
253
|
-
id:
|
|
255
|
+
id: te(n),
|
|
254
256
|
type: "button",
|
|
255
257
|
tabIndex: -1,
|
|
256
258
|
disabled: c,
|
|
257
259
|
"data-invalid": a(m),
|
|
258
|
-
"aria-label":
|
|
259
|
-
"aria-controls":
|
|
260
|
+
"aria-label": V.clearTriggerLabel,
|
|
261
|
+
"aria-controls": O(n),
|
|
260
262
|
hidden: !p.get("value").length,
|
|
261
263
|
onPointerDown(e) {
|
|
262
|
-
|
|
264
|
+
v(e) && e.preventDefault();
|
|
263
265
|
},
|
|
264
266
|
onClick(e) {
|
|
265
|
-
e.defaultPrevented ||
|
|
267
|
+
e.defaultPrevented || E && i({ type: "VALUE.CLEAR", src: "clear-trigger" });
|
|
266
268
|
}
|
|
267
269
|
});
|
|
268
270
|
},
|
|
269
|
-
getItemState:
|
|
271
|
+
getItemState: C,
|
|
270
272
|
getItemProps(e) {
|
|
271
|
-
const t =
|
|
273
|
+
const t = C(e), l = t.value;
|
|
272
274
|
return d.element({
|
|
273
275
|
...u.item.attrs,
|
|
274
276
|
dir: r("dir"),
|
|
275
|
-
id:
|
|
277
|
+
id: x(n, l),
|
|
276
278
|
role: "option",
|
|
277
279
|
tabIndex: -1,
|
|
278
280
|
"data-highlighted": a(t.highlighted),
|
|
279
281
|
"data-state": t.selected ? "checked" : "unchecked",
|
|
280
|
-
"aria-selected":
|
|
281
|
-
"aria-disabled":
|
|
282
|
+
"aria-selected": D(t.selected),
|
|
283
|
+
"aria-disabled": D(t.disabled),
|
|
282
284
|
"data-disabled": a(t.disabled),
|
|
283
285
|
"data-value": t.value,
|
|
284
286
|
onPointerMove() {
|
|
@@ -286,16 +288,16 @@ function me(x, d) {
|
|
|
286
288
|
},
|
|
287
289
|
onPointerLeave() {
|
|
288
290
|
if (e.persistFocus || t.disabled) return;
|
|
289
|
-
const o =
|
|
291
|
+
const o = G.previous();
|
|
290
292
|
o != null && o.type.includes("POINTER") && i({ type: "ITEM.POINTER_LEAVE", value: l });
|
|
291
293
|
},
|
|
292
294
|
onClick(o) {
|
|
293
|
-
|
|
295
|
+
J(o) || Y(o) || $(o) || t.disabled || i({ type: "ITEM.CLICK", src: "item-select", value: l });
|
|
294
296
|
}
|
|
295
297
|
});
|
|
296
298
|
},
|
|
297
299
|
getItemTextProps(e) {
|
|
298
|
-
const t =
|
|
300
|
+
const t = C(e);
|
|
299
301
|
return d.element({
|
|
300
302
|
...u.itemText.attrs,
|
|
301
303
|
dir: r("dir"),
|
|
@@ -305,7 +307,7 @@ function me(x, d) {
|
|
|
305
307
|
});
|
|
306
308
|
},
|
|
307
309
|
getItemIndicatorProps(e) {
|
|
308
|
-
const t =
|
|
310
|
+
const t = C(e);
|
|
309
311
|
return d.element({
|
|
310
312
|
"aria-hidden": !0,
|
|
311
313
|
...u.itemIndicator.attrs,
|
|
@@ -319,8 +321,8 @@ function me(x, d) {
|
|
|
319
321
|
return d.element({
|
|
320
322
|
...u.itemGroup.attrs,
|
|
321
323
|
dir: r("dir"),
|
|
322
|
-
id:
|
|
323
|
-
"aria-labelledby":
|
|
324
|
+
id: ee(n, t),
|
|
325
|
+
"aria-labelledby": K(n, t),
|
|
324
326
|
"data-empty": a(h.size === 0),
|
|
325
327
|
role: "group"
|
|
326
328
|
});
|
|
@@ -330,12 +332,12 @@ function me(x, d) {
|
|
|
330
332
|
return d.element({
|
|
331
333
|
...u.itemGroupLabel.attrs,
|
|
332
334
|
dir: r("dir"),
|
|
333
|
-
id:
|
|
335
|
+
id: K(n, t),
|
|
334
336
|
role: "presentation"
|
|
335
337
|
});
|
|
336
338
|
}
|
|
337
339
|
};
|
|
338
340
|
}
|
|
339
341
|
export {
|
|
340
|
-
|
|
342
|
+
Ee as connect
|
|
341
343
|
};
|
|
@@ -15,7 +15,7 @@ import { isBoolean as j } from "../../utils/dist/guard.js";
|
|
|
15
15
|
import { isEqual as z } from "../../utils/dist/equal.js";
|
|
16
16
|
import { clickIfLink as $ } from "../../dom-query/dist/navigate.js";
|
|
17
17
|
import { setup as J } from "../../core/dist/create-machine.js";
|
|
18
|
-
import { scrollIntoView as k } from "../../dom-query/dist/
|
|
18
|
+
import { scrollIntoView as k } from "../../dom-query/dist/scroll.js";
|
|
19
19
|
var { guards: Q, createMachine: X, choose: Z } = J(), { and: c, not: m } = Q, ve = X({
|
|
20
20
|
props({ props: e }) {
|
|
21
21
|
return {
|