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