@serendie/ui 3.5.1-dev.202605201240 → 3.5.1-dev.202606160617
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/DataTable.sampleData.d.ts +12 -0
- package/dist/components/DataTable/DataTable.sampleData.test.d.ts +1 -0
- 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/AnimatedArc.d.ts +1 -0
- package/dist/components/ProgressIndicator/AnimatedArc.js +31 -34
- package/dist/components/ProgressIndicator/AnimatedArc.test.d.ts +1 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +2 -1
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +49 -36
- package/dist/components/ProgressIndicator/animatedArcProps.d.ts +11 -0
- package/dist/components/ProgressIndicator/animatedArcProps.js +19 -0
- 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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DataRow = {
|
|
2
|
+
id: number;
|
|
3
|
+
area: string;
|
|
4
|
+
time: string;
|
|
5
|
+
status: string;
|
|
6
|
+
connections: number;
|
|
7
|
+
households: number;
|
|
8
|
+
coverage: string;
|
|
9
|
+
errorRate: string;
|
|
10
|
+
process: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function createDataTableRows(seed?: number): DataRow[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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;
|
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
const [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { getAnimatedArcProps as P } from "./animatedArcProps.js";
|
|
4
|
+
const F = 2.5, E = ({ className: l, radius: u, width: o, progress: t }) => {
|
|
5
|
+
const [s, m] = e.useState(0), r = e.useRef(null), n = e.useRef(null);
|
|
6
|
+
e.useEffect(() => {
|
|
7
|
+
if (t != null)
|
|
8
|
+
return;
|
|
9
|
+
const a = (c) => {
|
|
10
|
+
r.current == null && (r.current = c);
|
|
11
|
+
const d = (c - r.current) / 1e3;
|
|
12
|
+
r.current = c;
|
|
13
|
+
const A = d / F;
|
|
14
|
+
m((p) => (p + A) % 1), n.current = requestAnimationFrame(a);
|
|
13
15
|
};
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
+
return n.current = requestAnimationFrame(a), () => {
|
|
17
|
+
n.current != null && cancelAnimationFrame(n.current);
|
|
16
18
|
};
|
|
17
|
-
}, []);
|
|
18
|
-
const { d:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
t * 360 + u,
|
|
28
|
-
t * 360 + r
|
|
29
|
-
), rotationDeg: t * 360 };
|
|
30
|
-
}, [t, o, c]);
|
|
31
|
-
return /* @__PURE__ */ A(
|
|
19
|
+
}, [t]);
|
|
20
|
+
const { d: f, rotationDeg: i } = e.useMemo(
|
|
21
|
+
() => P({
|
|
22
|
+
progress: t ?? s,
|
|
23
|
+
radius: u,
|
|
24
|
+
width: o
|
|
25
|
+
}),
|
|
26
|
+
[t, s, u, o]
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ R(
|
|
32
29
|
"path",
|
|
33
30
|
{
|
|
34
|
-
d:
|
|
35
|
-
transform: `rotate(${
|
|
31
|
+
d: f,
|
|
32
|
+
transform: `rotate(${i})`,
|
|
36
33
|
strokeLinecap: "butt",
|
|
37
34
|
stroke: "currentColor",
|
|
38
|
-
strokeWidth:
|
|
35
|
+
strokeWidth: o,
|
|
39
36
|
fill: "none",
|
|
40
|
-
className:
|
|
37
|
+
className: l
|
|
41
38
|
}
|
|
42
39
|
);
|
|
43
40
|
};
|
|
44
41
|
export {
|
|
45
|
-
|
|
42
|
+
E as AnimatedArc
|
|
46
43
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
};
|
|
@@ -3,8 +3,9 @@ export interface ProgressIndicatorIndeterminateProps extends React.ComponentProp
|
|
|
3
3
|
type?: "linear" | "circular";
|
|
4
4
|
size?: "small" | "medium" | "large";
|
|
5
5
|
color?: "primary" | "subtle";
|
|
6
|
+
animationProgress?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const ProgressIndicatorIndeterminate: {
|
|
8
|
-
({ type, size, color, className, style, ...props }: ProgressIndicatorIndeterminateProps):
|
|
9
|
+
({ type, size, color, animationProgress, className, style, ...props }: ProgressIndicatorIndeterminateProps): React.JSX.Element;
|
|
9
10
|
displayName: string;
|
|
10
11
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { AnimatedArc as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatedArc as y } from "./AnimatedArc.js";
|
|
3
|
+
import { normalizeProgress as f } from "./animatedArcProps.js";
|
|
4
|
+
import { cx as u } from "../../styled-system/css/cx.js";
|
|
5
|
+
import { cva as l } from "../../styled-system/css/cva.js";
|
|
6
|
+
const p = l({
|
|
6
7
|
base: {
|
|
7
8
|
position: "relative",
|
|
8
9
|
display: "flex",
|
|
@@ -80,7 +81,7 @@ const m = o({
|
|
|
80
81
|
size: "medium",
|
|
81
82
|
color: "primary"
|
|
82
83
|
}
|
|
83
|
-
}),
|
|
84
|
+
}), b = l({
|
|
84
85
|
base: {
|
|
85
86
|
position: "absolute",
|
|
86
87
|
backgroundColor: "sd.reference.color.scale.gray.100"
|
|
@@ -106,7 +107,7 @@ const m = o({
|
|
|
106
107
|
}
|
|
107
108
|
},
|
|
108
109
|
compoundVariants: []
|
|
109
|
-
}),
|
|
110
|
+
}), g = l({
|
|
110
111
|
base: {
|
|
111
112
|
position: "absolute"
|
|
112
113
|
},
|
|
@@ -140,7 +141,7 @@ const m = o({
|
|
|
140
141
|
}
|
|
141
142
|
},
|
|
142
143
|
compoundVariants: []
|
|
143
|
-
}),
|
|
144
|
+
}), x = (r) => ({
|
|
144
145
|
small: {
|
|
145
146
|
radius: 6,
|
|
146
147
|
strokeWidth: 2
|
|
@@ -153,37 +154,40 @@ const m = o({
|
|
|
153
154
|
radius: 20,
|
|
154
155
|
strokeWidth: 8
|
|
155
156
|
}
|
|
156
|
-
})[
|
|
157
|
-
type:
|
|
158
|
-
size:
|
|
157
|
+
})[r], v = ({
|
|
158
|
+
type: r = "linear",
|
|
159
|
+
size: e = "medium",
|
|
159
160
|
color: s = "primary",
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
animationProgress: n,
|
|
162
|
+
className: d,
|
|
163
|
+
style: c,
|
|
164
|
+
...m
|
|
163
165
|
}) => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
const a = n == null ? void 0 : f(n);
|
|
167
|
+
if (r === "circular") {
|
|
168
|
+
const { radius: t, strokeWidth: o } = x(e);
|
|
166
169
|
return /* @__PURE__ */ i(
|
|
167
170
|
"div",
|
|
168
171
|
{
|
|
169
|
-
className:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
className: u(
|
|
173
|
+
p({ type: r, size: e, color: s }),
|
|
174
|
+
d
|
|
172
175
|
),
|
|
173
176
|
role: "progressbar",
|
|
174
177
|
"aria-valuetext": "Loading",
|
|
175
|
-
style:
|
|
176
|
-
...
|
|
178
|
+
style: c,
|
|
179
|
+
...m,
|
|
177
180
|
children: /* @__PURE__ */ i(
|
|
178
181
|
"svg",
|
|
179
182
|
{
|
|
180
|
-
viewBox: `0 0 ${
|
|
183
|
+
viewBox: `0 0 ${t * 2 + o * 2} ${t * 2 + o * 2}`,
|
|
181
184
|
children: /* @__PURE__ */ i(
|
|
182
|
-
|
|
185
|
+
y,
|
|
183
186
|
{
|
|
184
|
-
className:
|
|
185
|
-
radius:
|
|
186
|
-
width:
|
|
187
|
+
className: g({ type: r, size: e, color: s }),
|
|
188
|
+
radius: t,
|
|
189
|
+
width: o,
|
|
190
|
+
progress: a
|
|
187
191
|
}
|
|
188
192
|
)
|
|
189
193
|
}
|
|
@@ -191,25 +195,34 @@ const m = o({
|
|
|
191
195
|
}
|
|
192
196
|
);
|
|
193
197
|
}
|
|
194
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ h(
|
|
195
199
|
"div",
|
|
196
200
|
{
|
|
197
|
-
className:
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
className: u(
|
|
202
|
+
p({ type: r, size: e, color: s }),
|
|
203
|
+
d
|
|
200
204
|
),
|
|
201
205
|
role: "progressbar",
|
|
202
206
|
"aria-valuetext": "Loading",
|
|
203
|
-
style:
|
|
204
|
-
...
|
|
207
|
+
style: c,
|
|
208
|
+
...m,
|
|
205
209
|
children: [
|
|
206
|
-
/* @__PURE__ */ i("div", { className:
|
|
207
|
-
/* @__PURE__ */ i(
|
|
210
|
+
/* @__PURE__ */ i("div", { className: b({ type: r, size: e }) }),
|
|
211
|
+
/* @__PURE__ */ i(
|
|
212
|
+
"div",
|
|
213
|
+
{
|
|
214
|
+
className: g({ type: r, size: e, color: s }),
|
|
215
|
+
style: a == null ? void 0 : {
|
|
216
|
+
animation: "none",
|
|
217
|
+
transform: `translateX(${a * 300 - 150}%)`
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
)
|
|
208
221
|
]
|
|
209
222
|
}
|
|
210
223
|
);
|
|
211
224
|
};
|
|
212
|
-
|
|
225
|
+
v.displayName = "ProgressIndicatorIndeterminate";
|
|
213
226
|
export {
|
|
214
|
-
|
|
227
|
+
v as ProgressIndicatorIndeterminate
|
|
215
228
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type AnimatedArcProps = {
|
|
2
|
+
progress: number;
|
|
3
|
+
radius: number;
|
|
4
|
+
width: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const normalizeProgress: (progress: number) => number;
|
|
7
|
+
export declare const getAnimatedArcProps: ({ progress, radius, width, }: AnimatedArcProps) => {
|
|
8
|
+
d: string;
|
|
9
|
+
rotationDeg: number;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { describeArc as a } from "./util.js";
|
|
2
|
+
const i = (n) => (n % 1 + 1) % 1, h = ({
|
|
3
|
+
progress: n,
|
|
4
|
+
radius: o,
|
|
5
|
+
width: r
|
|
6
|
+
}) => {
|
|
7
|
+
const t = i(n), e = t * Math.PI * 2, s = 180 + 40 * Math.sin(-e) + 40, c = 90 * Math.sin(e) + 90;
|
|
8
|
+
return { d: a(
|
|
9
|
+
o + r,
|
|
10
|
+
o + r,
|
|
11
|
+
o,
|
|
12
|
+
t * 360 + c,
|
|
13
|
+
t * 360 + s
|
|
14
|
+
), rotationDeg: t * 360 };
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
h as getAnimatedArcProps,
|
|
18
|
+
i as normalizeProgress
|
|
19
|
+
};
|
|
@@ -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"),
|