@mechane-ai/elements 0.32.1 → 0.34.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/README.md +20 -14
- package/dist/ai.js +43 -43
- package/dist/{categorical-values-Devj1xYe.js → categorical-values-bWZBzMpX.js} +2 -2
- package/dist/{chart-frame-DepdezdL.js → chart-frame-Cr4P6MF5.js} +20 -19
- package/dist/{chart-input-8sNm47Rp.js → chart-input-3wX0JoPE.js} +2 -2
- package/dist/charts/cartesian.js +6 -6
- package/dist/charts/distribution.js +2 -2
- package/dist/charts/graph.js +2 -2
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/timeline.js +3 -3
- package/dist/charts.js +1 -1
- package/dist/{code-block-B_qJ1JJ3.js → code-block-DT1TCkTC.js} +1 -1
- package/dist/collections.js +47 -46
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +2 -2
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-BtaiSKk8.js → content-link-B3ObdyZY.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/elements.css +22 -10
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +519 -73
- package/dist/forms-BQQFas9g.js +118 -0
- package/dist/forms.js +3 -1
- package/dist/header-styles-COxCYFZx.js +90 -0
- package/dist/index.js +1 -1
- package/dist/layout.js +126 -124
- package/dist/navigation/commands.js +1 -1
- package/dist/navigation.js +171 -76
- package/dist/packages/forms/src/dates/calendar.d.ts +2 -5
- package/dist/packages/forms/src/dates/civil.d.ts +28 -0
- package/dist/packages/forms/src/dates/date-inputs.d.ts +20 -0
- package/dist/packages/forms/src/dates/date-picker.d.ts +13 -0
- package/dist/packages/forms/src/dates/date-range-picker.d.ts +14 -12
- package/dist/packages/forms/src/dates/index.d.ts +8 -0
- package/dist/packages/forms/src/dates/month-calendar.d.ts +19 -0
- package/dist/packages/forms/src/dates/month-picker.d.ts +14 -0
- package/dist/packages/forms/src/dates/month-range-picker.d.ts +18 -0
- package/dist/packages/forms/src/dates/picker-popover.d.ts +22 -0
- package/dist/packages/navigation/src/page-navigation.d.ts +4 -2
- package/dist/packages/navigation/src/tab-styles.d.ts +89 -0
- package/dist/{pierre-tree-CPhT5CUP.js → pierre-tree-CYCRjdGG.js} +2 -2
- package/dist/{src-BjmKVOb2.js → src-BOZsJ8td.js} +18 -18
- package/dist/{src-BPIIuMeE.js → src-BYKjPC-0.js} +339 -448
- package/dist/{src-CALHXF-U.js → src-C-Sx37kz.js} +373 -458
- package/dist/{src-DfPfFOu1.js → src-D9DktxEq.js} +17 -17
- package/package.json +1 -1
package/dist/navigation.js
CHANGED
|
@@ -1,132 +1,227 @@
|
|
|
1
1
|
import { n as e, t } from "./navigation-D2_sGy3C.js";
|
|
2
|
-
import { t as n } from "./
|
|
3
|
-
import {
|
|
4
|
-
import "@
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { t as n } from "./header-styles-COxCYFZx.js";
|
|
3
|
+
import { t as r } from "./style-composition-uYlczSsB.js";
|
|
4
|
+
import { mergeProps as i } from "@base-ui/react/merge-props";
|
|
5
|
+
import * as a from "@stylexjs/stylex";
|
|
6
|
+
import { Children as o, useState as s } from "react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { Tabs as u } from "@base-ui/react/tabs";
|
|
9
|
+
// packages/navigation/src/tab-styles.ts
|
|
10
|
+
var d = {
|
|
11
|
+
list: {
|
|
12
|
+
k1xSpc: "x78zum5",
|
|
13
|
+
kOIVth: "xxhr3t",
|
|
14
|
+
k7Eaqz: "xeuugli",
|
|
15
|
+
kt9PQ7: "xso031l",
|
|
16
|
+
kfdmCh: "x1q0q8m5",
|
|
17
|
+
kL6WhQ: "x1qndepd",
|
|
18
|
+
kXHlph: "xw2csxc",
|
|
19
|
+
kCfx3h: "x16yzcw2",
|
|
20
|
+
k3ag91: "x1mxyneg",
|
|
21
|
+
kkwBia: "xyjviii",
|
|
22
|
+
kc2wEk: "x1y2jzqp",
|
|
23
|
+
k78XZB: "x12ub8kb",
|
|
24
|
+
kVSElv: "xxwvzwo",
|
|
25
|
+
k5sz9g: "x1ci5vm9",
|
|
26
|
+
$$css: !0
|
|
27
|
+
},
|
|
28
|
+
item: {
|
|
29
|
+
kVAEAm: "x1n2onr6",
|
|
30
|
+
kB7OPa: "x9f619",
|
|
31
|
+
k1xSpc: "x3nfvp2",
|
|
32
|
+
kGNEyG: "x6s0dn4",
|
|
33
|
+
kMnn75: "xkrqix3",
|
|
34
|
+
kmuXW: "x2lah0s",
|
|
35
|
+
kMv6JI: "x1hz01jw",
|
|
36
|
+
k63SB2: "xj57cvi",
|
|
37
|
+
khiITx: "xvmahel",
|
|
38
|
+
kMzoRj: "xc342km",
|
|
39
|
+
kAzted: "x1oec0jp",
|
|
40
|
+
k8WAf4: "xn9t2bk",
|
|
41
|
+
kg3NbH: "x1doqdfy",
|
|
42
|
+
kWkggS: "xjbqb8w",
|
|
43
|
+
kMwMTN: "x153jb6y",
|
|
44
|
+
kkrTdU: "x1ypdohk",
|
|
45
|
+
kGuDYH: "xtqrqnz",
|
|
46
|
+
kLWn49: "x1778rvt",
|
|
47
|
+
khDVqt: "xuxw1ft",
|
|
48
|
+
k4DVmp: "xy7uoan",
|
|
49
|
+
k2wZ5d: "xyg3wme",
|
|
50
|
+
kEZPYj: "xoqm7u7",
|
|
51
|
+
k5JduY: "x1s928wv",
|
|
52
|
+
kwXMNM: "x1j6awrg",
|
|
53
|
+
kcktkL: "x1ccaobo",
|
|
54
|
+
k8Iv0R: "x1xrz1ek",
|
|
55
|
+
k4zj60: "x3cntg4",
|
|
56
|
+
ks3ayO: "xyhc2n1",
|
|
57
|
+
kuyoRO: "x1t3xrl9",
|
|
58
|
+
kv1rg7: "xdsp783",
|
|
59
|
+
kKkqFp: "xv7chyw",
|
|
60
|
+
k2znAY: "x1pgiufq",
|
|
61
|
+
kuJC8G: "xrzcr2b",
|
|
62
|
+
kY2PSQ: "x1nten1d",
|
|
63
|
+
k54cxX: "x1wzsryr",
|
|
64
|
+
kxhOdL: "x1hjdyp1",
|
|
65
|
+
kiLJdH: "x1i5oxzy",
|
|
66
|
+
kDPfah: "xx75q12",
|
|
67
|
+
kAm7yQ: "x7dn452",
|
|
68
|
+
kk7Lky: "xwj21n9",
|
|
69
|
+
kXyCmE: "x1m8qfh3",
|
|
70
|
+
kPJHz1: "x13qnu6",
|
|
71
|
+
k7shQP: "x9v5kkp",
|
|
72
|
+
kZs9gx: "x19rmrnh",
|
|
73
|
+
kiEn40: "x1bqaal",
|
|
74
|
+
$$css: !0
|
|
75
|
+
}
|
|
76
|
+
}, f = {
|
|
77
|
+
navigation: {
|
|
78
|
+
kt9PQ7: "x1qhh985",
|
|
79
|
+
kUk6DE: "x12lumcd",
|
|
80
|
+
ks0D6T: "x193iq5w",
|
|
81
|
+
$$css: !0
|
|
82
|
+
},
|
|
83
|
+
actions: {
|
|
84
|
+
k1xSpc: "x78zum5",
|
|
85
|
+
kGNEyG: "x6s0dn4",
|
|
86
|
+
kwnvtZ: "x1a02dak",
|
|
87
|
+
kOIVth: "x1hnptsi",
|
|
88
|
+
keTefX: "xvc5jky",
|
|
89
|
+
k7Eaqz: "xeuugli",
|
|
90
|
+
ks0D6T: "x193iq5w",
|
|
91
|
+
kB7OPa: "x9f619",
|
|
92
|
+
$$css: !0
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
function p({ items: e, isEmbedded: t = !1, actions: r }) {
|
|
96
|
+
return /* @__PURE__ */ l("div", {
|
|
11
97
|
"aria-hidden": !0,
|
|
12
98
|
inert: !0,
|
|
13
99
|
...{
|
|
14
|
-
0: { className: "x78zum5
|
|
15
|
-
1: { className: "x78zum5
|
|
100
|
+
0: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd" },
|
|
101
|
+
1: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s x1q0q8m5 x1qndepd x1qhh985" }
|
|
16
102
|
}[!!t | 0],
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
children: e.
|
|
20
|
-
|
|
103
|
+
children: [/* @__PURE__ */ c("div", {
|
|
104
|
+
...a.props(d.list, f.navigation),
|
|
105
|
+
children: e.map((e) => /* @__PURE__ */ c("span", {
|
|
106
|
+
...a.props(d.item),
|
|
107
|
+
children: e.label
|
|
108
|
+
}, e.id))
|
|
109
|
+
}), o.toArray(r).length > 0 && /* @__PURE__ */ c("div", {
|
|
110
|
+
...a.props(n.row, f.actions),
|
|
111
|
+
children: r
|
|
112
|
+
})]
|
|
21
113
|
});
|
|
22
114
|
}
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
"aria-label": r,
|
|
115
|
+
function m({ items: e, selectedId: t, onNavigate: r, label: i = "Page sections", isEmbedded: s = !1, actions: u }) {
|
|
116
|
+
return /* @__PURE__ */ l("div", {
|
|
26
117
|
...{
|
|
27
|
-
0: { className: "x78zum5
|
|
28
|
-
1: { className: "x78zum5
|
|
29
|
-
}[!!
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
118
|
+
0: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd" },
|
|
119
|
+
1: { className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s x1q0q8m5 x1qndepd x1qhh985" }
|
|
120
|
+
}[!!s | 0],
|
|
121
|
+
children: [/* @__PURE__ */ c("nav", {
|
|
122
|
+
"aria-label": i,
|
|
123
|
+
...a.props(d.list, f.navigation),
|
|
124
|
+
children: e.map((e) => /* @__PURE__ */ c("a", {
|
|
125
|
+
href: e.href,
|
|
126
|
+
"aria-current": e.id === t ? "page" : void 0,
|
|
127
|
+
...a.props(d.item),
|
|
128
|
+
onClick: (t) => {
|
|
129
|
+
if (r === void 0 || t.defaultPrevented || t.button !== 0) return;
|
|
130
|
+
let n = t.metaKey || t.ctrlKey, i = t.shiftKey || t.altKey;
|
|
131
|
+
n || i || (t.preventDefault(), r(e.id));
|
|
132
|
+
},
|
|
133
|
+
children: e.label
|
|
134
|
+
}, e.id))
|
|
135
|
+
}), o.toArray(u).length > 0 && /* @__PURE__ */ c("div", {
|
|
136
|
+
...a.props(n.row, f.actions),
|
|
137
|
+
children: u
|
|
138
|
+
})]
|
|
44
139
|
});
|
|
45
140
|
}
|
|
46
141
|
// packages/navigation/src/skip-link.tsx
|
|
47
|
-
function
|
|
48
|
-
return /* @__PURE__ */
|
|
142
|
+
function h(e) {
|
|
143
|
+
return /* @__PURE__ */ c("a", { ...i({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
|
|
49
144
|
}
|
|
50
145
|
// packages/navigation/src/tabs.tsx
|
|
51
|
-
function
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
...
|
|
54
|
-
...
|
|
146
|
+
function g({ className: e, style: t, ...n }) {
|
|
147
|
+
return /* @__PURE__ */ c(u.Root, {
|
|
148
|
+
...n,
|
|
149
|
+
...r({
|
|
55
150
|
className: e,
|
|
56
151
|
style: t,
|
|
57
152
|
styles: { className: "x1hz01jw xj57cvi xtqrqnz x1778rvt xbixft xvmahel xeuugli xsg5m96 x7bu0ch x18eqmq0" }
|
|
58
153
|
})
|
|
59
154
|
});
|
|
60
155
|
}
|
|
61
|
-
function
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
...
|
|
64
|
-
...
|
|
156
|
+
function _({ className: e, style: t, ...n }) {
|
|
157
|
+
return /* @__PURE__ */ c(u.List, {
|
|
158
|
+
...n,
|
|
159
|
+
...r({
|
|
65
160
|
className: e,
|
|
66
161
|
style: t,
|
|
67
|
-
styles:
|
|
162
|
+
styles: a.props(d.list)
|
|
68
163
|
})
|
|
69
164
|
});
|
|
70
165
|
}
|
|
71
|
-
function
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
...
|
|
74
|
-
...
|
|
166
|
+
function v({ className: e, style: t, ...n }) {
|
|
167
|
+
return /* @__PURE__ */ c(u.Tab, {
|
|
168
|
+
...n,
|
|
169
|
+
...r({
|
|
75
170
|
className: e,
|
|
76
171
|
style: t,
|
|
77
|
-
styles:
|
|
172
|
+
styles: a.props(d.item)
|
|
78
173
|
})
|
|
79
174
|
});
|
|
80
175
|
}
|
|
81
|
-
function
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
...
|
|
84
|
-
...
|
|
176
|
+
function y({ className: e, style: t, ...n }) {
|
|
177
|
+
return /* @__PURE__ */ c(u.Panel, {
|
|
178
|
+
...n,
|
|
179
|
+
...r({
|
|
85
180
|
className: e,
|
|
86
181
|
style: t,
|
|
87
182
|
styles: { className: "x1o3kwql xeuugli x1k57tk5 xcqfl4l xwqq6z6 x13qnu6 x9v5kkp x19rmrnh x7s97pk" }
|
|
88
183
|
})
|
|
89
184
|
});
|
|
90
185
|
}
|
|
91
|
-
var
|
|
92
|
-
Root:
|
|
93
|
-
List:
|
|
94
|
-
Tab:
|
|
95
|
-
Panel:
|
|
186
|
+
var b = {
|
|
187
|
+
Root: g,
|
|
188
|
+
List: _,
|
|
189
|
+
Tab: v,
|
|
190
|
+
Panel: y
|
|
96
191
|
};
|
|
97
192
|
// packages/navigation/src/content-tabs.tsx
|
|
98
|
-
function
|
|
99
|
-
let [t, n] =
|
|
100
|
-
return r === void 0 ? /* @__PURE__ */
|
|
101
|
-
value:
|
|
193
|
+
function x(e) {
|
|
194
|
+
let [t, n] = s(e.defaultSelectedId ?? e.items[0]?.id), r = e.navigation, i = r?.selectedId ?? t, a = e.items.find((e) => e.id === i) ?? e.items[0];
|
|
195
|
+
return r === void 0 ? /* @__PURE__ */ l(b.Root, {
|
|
196
|
+
value: a?.id,
|
|
102
197
|
onValueChange: (e) => n(String(e)),
|
|
103
198
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ c(b.List, {
|
|
105
200
|
"aria-label": e.label,
|
|
106
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
201
|
+
children: e.items.map((e) => /* @__PURE__ */ c(b.Tab, {
|
|
107
202
|
value: e.id,
|
|
108
203
|
children: e.label
|
|
109
204
|
}, e.id))
|
|
110
|
-
}),
|
|
111
|
-
value:
|
|
205
|
+
}), a !== void 0 && /* @__PURE__ */ c(b.Panel, {
|
|
206
|
+
value: a.id,
|
|
112
207
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
|
|
113
|
-
children:
|
|
114
|
-
},
|
|
115
|
-
}) : /* @__PURE__ */
|
|
208
|
+
children: a.content
|
|
209
|
+
}, a.id)]
|
|
210
|
+
}) : /* @__PURE__ */ l("div", {
|
|
116
211
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ c(m, {
|
|
118
213
|
label: e.label,
|
|
119
214
|
items: e.items.map((e) => ({
|
|
120
215
|
id: e.id,
|
|
121
216
|
label: e.label,
|
|
122
217
|
href: r.href(e.id)
|
|
123
218
|
})),
|
|
124
|
-
selectedId:
|
|
219
|
+
selectedId: a?.id ?? "",
|
|
125
220
|
onNavigate: r.onNavigate
|
|
126
|
-
}), /* @__PURE__ */
|
|
221
|
+
}), /* @__PURE__ */ c("div", {
|
|
127
222
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
|
|
128
|
-
children:
|
|
223
|
+
children: a?.content
|
|
129
224
|
})]
|
|
130
225
|
});
|
|
131
226
|
}
|
|
132
|
-
export { t as Breadcrumb,
|
|
227
|
+
export { t as Breadcrumb, x as ContentTabs, e as Kbd, m as PageNavigation, p as PageNavigationPlaceholder, h as SkipLink, b as Tabs };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
readonly month: number;
|
|
5
|
-
readonly day: number;
|
|
6
|
-
};
|
|
2
|
+
import type { CalendarDate } from './civil.ts';
|
|
3
|
+
export type { CalendarDate } from './civil.ts';
|
|
7
4
|
export type CalendarRange = {
|
|
8
5
|
readonly from: CalendarDate;
|
|
9
6
|
readonly to?: CalendarDate | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type CalendarDate = {
|
|
2
|
+
readonly year: number;
|
|
3
|
+
readonly month: number;
|
|
4
|
+
readonly day: number;
|
|
5
|
+
};
|
|
6
|
+
export type CalendarMonth = {
|
|
7
|
+
readonly year: number;
|
|
8
|
+
readonly month: number;
|
|
9
|
+
};
|
|
10
|
+
export type DateRange = {
|
|
11
|
+
readonly from: CalendarDate;
|
|
12
|
+
readonly to: CalendarDate;
|
|
13
|
+
};
|
|
14
|
+
export type MonthRange = {
|
|
15
|
+
readonly from: CalendarMonth;
|
|
16
|
+
readonly to: CalendarMonth;
|
|
17
|
+
};
|
|
18
|
+
export declare function isMonth(value: CalendarMonth): boolean;
|
|
19
|
+
export declare function isDate(value: CalendarDate): boolean;
|
|
20
|
+
export declare function monthOrder(value: CalendarMonth): number;
|
|
21
|
+
export declare function dateInput(value: CalendarDate): string;
|
|
22
|
+
export declare function monthInput(value: CalendarMonth): string;
|
|
23
|
+
export declare function parseDate(value: string): CalendarDate | undefined;
|
|
24
|
+
export declare function parseMonth(value: string): CalendarMonth | undefined;
|
|
25
|
+
export declare function formatDate(value: CalendarDate, locale: string): string;
|
|
26
|
+
export declare function formatMonth(value: CalendarMonth, locale: string): string;
|
|
27
|
+
export declare function dateValidation(value: CalendarDate, minimum?: CalendarDate, maximum?: CalendarDate): string | undefined;
|
|
28
|
+
export declare function monthValidation(value: CalendarMonth, minimum?: CalendarMonth, maximum?: CalendarMonth): string | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CalendarDate } from './calendar.tsx';
|
|
3
|
+
import type { CalendarMonth } from './civil.ts';
|
|
4
|
+
export declare function DateInput({ label, value, minimum, maximum, onValueChange, }: {
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly value: CalendarDate | undefined;
|
|
7
|
+
readonly minimum?: CalendarDate | undefined;
|
|
8
|
+
readonly maximum?: CalendarDate | undefined;
|
|
9
|
+
readonly onValueChange: (value: CalendarDate | undefined) => void;
|
|
10
|
+
}): ReactNode;
|
|
11
|
+
export declare function MonthInput({ label, value, minimum, maximum, onValueChange, }: {
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly value: CalendarMonth | undefined;
|
|
14
|
+
readonly minimum?: CalendarMonth | undefined;
|
|
15
|
+
readonly maximum?: CalendarMonth | undefined;
|
|
16
|
+
readonly onValueChange: (value: CalendarMonth | undefined) => void;
|
|
17
|
+
}): ReactNode;
|
|
18
|
+
export declare function RangeInputs({ children }: {
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
}): ReactNode;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlDensity } from '../../../foundations/src/control-density.ts';
|
|
3
|
+
import type { CalendarDate, CalendarEnvironment } from './calendar.tsx';
|
|
4
|
+
export type DatePickerProps = CalendarEnvironment & {
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly value: CalendarDate | undefined;
|
|
7
|
+
readonly onValueChange: (value: CalendarDate | undefined) => void;
|
|
8
|
+
readonly formatValue?: (value: CalendarDate) => string;
|
|
9
|
+
readonly density?: ControlDensity;
|
|
10
|
+
readonly disabled?: boolean;
|
|
11
|
+
readonly isClearable?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function DatePicker({ label, value, onValueChange, formatValue, density, disabled, isClearable, ...environment }: DatePickerProps): ReactNode;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { ControlDensity } from '../../../foundations/src/control-density.ts';
|
|
3
|
+
import type { CalendarEnvironment } from './calendar.tsx';
|
|
4
|
+
import type { DateRange } from './civil.ts';
|
|
5
|
+
import type { PickerPreset } from './picker-popover.tsx';
|
|
6
|
+
export type DateRangePreset = PickerPreset<DateRange>;
|
|
7
|
+
export type DateRangePickerProps = CalendarEnvironment & {
|
|
5
8
|
readonly label: string;
|
|
6
|
-
readonly value:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly label: string;
|
|
10
|
-
readonly value: CalendarRange | undefined;
|
|
11
|
-
readonly onValueChange: (value: CalendarRange | undefined) => void;
|
|
12
|
-
readonly formatValue: (value: CalendarRange) => string;
|
|
9
|
+
readonly value: DateRange | undefined;
|
|
10
|
+
readonly onValueChange: (value: DateRange | undefined) => void;
|
|
11
|
+
readonly formatValue?: (value: DateRange) => string;
|
|
13
12
|
readonly presets?: ReadonlyArray<DateRangePreset>;
|
|
13
|
+
readonly validateRange?: (value: DateRange) => string | undefined;
|
|
14
|
+
readonly density?: ControlDensity;
|
|
14
15
|
readonly disabled?: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
readonly isClearable?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function DateRangePicker({ label, value, onValueChange, formatValue, presets, validateRange, density, disabled, isClearable, ...environment }: DateRangePickerProps): ReactNode;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export type { CalendarDate, CalendarRange, CalendarEnvironment, CalendarProps } from './calendar.tsx';
|
|
2
2
|
export { Calendar } from './calendar.tsx';
|
|
3
|
+
export type { CalendarMonth, DateRange, MonthRange } from './civil.ts';
|
|
4
|
+
export type { DatePickerProps } from './date-picker.tsx';
|
|
5
|
+
export { DatePicker } from './date-picker.tsx';
|
|
3
6
|
export type { DateRangePreset, DateRangePickerProps } from './date-range-picker.tsx';
|
|
4
7
|
export { DateRangePicker } from './date-range-picker.tsx';
|
|
8
|
+
export type { MonthEnvironment } from './month-calendar.tsx';
|
|
9
|
+
export type { MonthPickerProps } from './month-picker.tsx';
|
|
10
|
+
export { MonthPicker } from './month-picker.tsx';
|
|
11
|
+
export type { MonthRangePickerProps, MonthRangePreset } from './month-range-picker.tsx';
|
|
12
|
+
export { MonthRangePicker } from './month-range-picker.tsx';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CalendarMonth } from './civil.ts';
|
|
3
|
+
export type MonthEnvironment = {
|
|
4
|
+
readonly locale: string;
|
|
5
|
+
readonly timeZone: string;
|
|
6
|
+
readonly today: CalendarMonth;
|
|
7
|
+
readonly initialMonth: CalendarMonth;
|
|
8
|
+
readonly minimum?: CalendarMonth;
|
|
9
|
+
readonly maximum?: CalendarMonth;
|
|
10
|
+
};
|
|
11
|
+
export type MonthDraft = {
|
|
12
|
+
readonly from: CalendarMonth;
|
|
13
|
+
readonly to?: CalendarMonth | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare function MonthCalendar({ label, selection, onSelect, locale, today, initialMonth, minimum, maximum, }: MonthEnvironment & {
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly selection: MonthDraft | undefined;
|
|
18
|
+
readonly onSelect: (value: CalendarMonth) => void;
|
|
19
|
+
}): ReactNode;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlDensity } from '../../../foundations/src/control-density.ts';
|
|
3
|
+
import type { CalendarMonth } from './civil.ts';
|
|
4
|
+
import type { MonthEnvironment } from './month-calendar.tsx';
|
|
5
|
+
export type MonthPickerProps = MonthEnvironment & {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly value: CalendarMonth | undefined;
|
|
8
|
+
readonly onValueChange: (value: CalendarMonth | undefined) => void;
|
|
9
|
+
readonly formatValue?: (value: CalendarMonth) => string;
|
|
10
|
+
readonly density?: ControlDensity;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
readonly isClearable?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function MonthPicker({ label, value, onValueChange, formatValue, density, disabled, isClearable, ...environment }: MonthPickerProps): ReactNode;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlDensity } from '../../../foundations/src/control-density.ts';
|
|
3
|
+
import type { MonthRange } from './civil.ts';
|
|
4
|
+
import type { MonthEnvironment } from './month-calendar.tsx';
|
|
5
|
+
import type { PickerPreset } from './picker-popover.tsx';
|
|
6
|
+
export type MonthRangePreset = PickerPreset<MonthRange>;
|
|
7
|
+
export type MonthRangePickerProps = MonthEnvironment & {
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly value: MonthRange | undefined;
|
|
10
|
+
readonly onValueChange: (value: MonthRange | undefined) => void;
|
|
11
|
+
readonly formatValue?: (value: MonthRange) => string;
|
|
12
|
+
readonly presets?: ReadonlyArray<MonthRangePreset>;
|
|
13
|
+
readonly validateRange?: (value: MonthRange) => string | undefined;
|
|
14
|
+
readonly density?: ControlDensity;
|
|
15
|
+
readonly disabled?: boolean;
|
|
16
|
+
readonly isClearable?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function MonthRangePicker({ label, value, onValueChange, formatValue, presets, validateRange, density, disabled, isClearable, ...environment }: MonthRangePickerProps): ReactNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlDensity } from '../../../foundations/src/control-density.ts';
|
|
3
|
+
export type PickerPreset<Value> = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly value: Value;
|
|
7
|
+
};
|
|
8
|
+
type PickerPopoverProps<Value> = {
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly value: Value | undefined;
|
|
11
|
+
readonly onValueChange: (value: Value | undefined) => void;
|
|
12
|
+
readonly formatValue: (value: Value) => string;
|
|
13
|
+
readonly validateValue: (value: Value) => string | undefined;
|
|
14
|
+
readonly presets?: ReadonlyArray<PickerPreset<Value>> | undefined;
|
|
15
|
+
readonly density?: ControlDensity | undefined;
|
|
16
|
+
readonly disabled?: boolean | undefined;
|
|
17
|
+
readonly isClearable?: boolean | undefined;
|
|
18
|
+
readonly timeZone: string;
|
|
19
|
+
readonly children: (value: Value | undefined, onValueChange: (value: Value | undefined) => void) => ReactNode;
|
|
20
|
+
};
|
|
21
|
+
export declare function PickerPopover<Value>({ label, value, onValueChange, formatValue, validateValue, presets, density, disabled, isClearable, timeZone, children, }: PickerPopoverProps<Value>): ReactNode;
|
|
22
|
+
export {};
|
|
@@ -10,10 +10,12 @@ export type PageNavigationProps<ItemId extends string = string> = {
|
|
|
10
10
|
readonly onNavigate?: (id: ItemId) => void;
|
|
11
11
|
readonly label?: string;
|
|
12
12
|
readonly isEmbedded?: boolean;
|
|
13
|
+
readonly actions?: ReactNode;
|
|
13
14
|
};
|
|
14
15
|
export type PageNavigationPlaceholderProps = {
|
|
15
16
|
readonly items: ReadonlyArray<Pick<PageNavigationItem, 'id' | 'label'>>;
|
|
16
17
|
readonly isEmbedded?: boolean;
|
|
18
|
+
readonly actions?: ReactNode;
|
|
17
19
|
};
|
|
18
|
-
export declare function PageNavigationPlaceholder({ items, isEmbedded }: PageNavigationPlaceholderProps): ReactNode;
|
|
19
|
-
export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label, isEmbedded, }: PageNavigationProps<ItemId>): ReactNode;
|
|
20
|
+
export declare function PageNavigationPlaceholder({ items, isEmbedded, actions, }: PageNavigationPlaceholderProps): ReactNode;
|
|
21
|
+
export declare function PageNavigation<ItemId extends string>({ items, selectedId, onNavigate, label, isEmbedded, actions, }: PageNavigationProps<ItemId>): ReactNode;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { conditions } from '../../foundations/src/constants.stylex.ts';
|
|
3
|
+
export declare const tabStyles: Readonly<{
|
|
4
|
+
readonly list: Readonly<{
|
|
5
|
+
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
6
|
+
readonly gap: stylex.StyleXClassNameFor<"gap", 0>;
|
|
7
|
+
readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
|
|
8
|
+
readonly borderBottomWidth: stylex.StyleXClassNameFor<"borderBottomWidth", 1>;
|
|
9
|
+
readonly borderBottomStyle: stylex.StyleXClassNameFor<"borderBottomStyle", "solid">;
|
|
10
|
+
readonly borderBottomColor: stylex.StyleXClassNameFor<"borderBottomColor", string>;
|
|
11
|
+
readonly overflowX: stylex.StyleXClassNameFor<"overflowX", "auto">;
|
|
12
|
+
readonly ':is([data-orientation="vertical"])': stylex.StyleXClassNameFor<":is([data-orientation=\"vertical\"])", {
|
|
13
|
+
readonly flexDirection: "column";
|
|
14
|
+
readonly flexShrink: 0;
|
|
15
|
+
readonly maxWidth: "50%";
|
|
16
|
+
readonly borderBottomWidth: 0;
|
|
17
|
+
readonly borderInlineEndWidth: 1;
|
|
18
|
+
readonly borderInlineEndStyle: "solid";
|
|
19
|
+
readonly borderInlineEndColor: stylex.StyleXVar<string>;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
readonly item: Readonly<{
|
|
23
|
+
readonly position: stylex.StyleXClassNameFor<"position", "relative">;
|
|
24
|
+
readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
|
|
25
|
+
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
26
|
+
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
27
|
+
readonly textDecorationLine: stylex.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
28
|
+
readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
|
|
29
|
+
readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
|
|
30
|
+
readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
|
|
31
|
+
readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
|
|
32
|
+
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
33
|
+
readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
|
|
34
|
+
readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
|
|
35
|
+
readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
|
|
36
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
37
|
+
readonly color: stylex.StyleXClassNameFor<"color", string>;
|
|
38
|
+
readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
|
|
39
|
+
readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
|
|
40
|
+
readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
|
|
41
|
+
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
42
|
+
readonly ':hover:not([data-disabled])': stylex.StyleXClassNameFor<":hover:not([data-disabled])", {
|
|
43
|
+
readonly color: {
|
|
44
|
+
readonly [conditions.hoverPointer]: stylex.StyleXVar<string>;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
readonly ':active:not([data-disabled])': stylex.StyleXClassNameFor<":active:not([data-disabled])", {
|
|
48
|
+
readonly backgroundColor: stylex.StyleXVar<string>;
|
|
49
|
+
readonly color: stylex.StyleXVar<string>;
|
|
50
|
+
}>;
|
|
51
|
+
readonly '::after': stylex.StyleXClassNameFor<"::after", {
|
|
52
|
+
readonly content: "\"\"";
|
|
53
|
+
readonly position: "absolute";
|
|
54
|
+
readonly insetInline: stylex.StyleXVar<string>;
|
|
55
|
+
readonly bottom: 0;
|
|
56
|
+
readonly height: 2;
|
|
57
|
+
readonly backgroundColor: "transparent";
|
|
58
|
+
}>;
|
|
59
|
+
readonly ':is([data-active], [aria-current="page"])': stylex.StyleXClassNameFor<":is([data-active], [aria-current=\"page\"])", {
|
|
60
|
+
readonly color: stylex.StyleXVar<string>;
|
|
61
|
+
readonly '::after': {
|
|
62
|
+
backgroundColor: stylex.StyleXVar<string>;
|
|
63
|
+
};
|
|
64
|
+
}>;
|
|
65
|
+
readonly ':is([data-orientation="vertical"])': stylex.StyleXClassNameFor<":is([data-orientation=\"vertical\"])", {
|
|
66
|
+
readonly textAlign: "start";
|
|
67
|
+
readonly whiteSpace: "normal";
|
|
68
|
+
readonly overflowWrap: "anywhere";
|
|
69
|
+
readonly '::after': {
|
|
70
|
+
readonly insetInlineStart: "auto";
|
|
71
|
+
readonly insetInlineEnd: 0;
|
|
72
|
+
readonly top: stylex.StyleXVar<string>;
|
|
73
|
+
readonly bottom: stylex.StyleXVar<string>;
|
|
74
|
+
readonly width: 2;
|
|
75
|
+
readonly height: "auto";
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
78
|
+
readonly ':is([data-disabled])': stylex.StyleXClassNameFor<":is([data-disabled])", {
|
|
79
|
+
readonly opacity: stylex.StyleXVar<string>;
|
|
80
|
+
readonly cursor: "default";
|
|
81
|
+
}>;
|
|
82
|
+
readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
|
|
83
|
+
readonly outlineWidth: stylex.StyleXVar<string>;
|
|
84
|
+
readonly outlineStyle: "solid";
|
|
85
|
+
readonly outlineColor: stylex.StyleXVar<string>;
|
|
86
|
+
readonly outlineOffset: -2;
|
|
87
|
+
}>;
|
|
88
|
+
}>;
|
|
89
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as e } from "./src-
|
|
2
|
-
import {
|
|
1
|
+
import { c as e } from "./src-C-Sx37kz.js";
|
|
2
|
+
import { n as t } from "./forms-BQQFas9g.js";
|
|
3
3
|
import { p as n } from "./tokens.stylex-CJbIDPB9.js";
|
|
4
4
|
import { r } from "./pierre-theme-BpNaWn1x.js";
|
|
5
5
|
import * as i from "@stylexjs/stylex";
|