minerva-design 1.0.0 → 1.0.2
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/CHANGELOG.md +12 -0
- package/custom-elements.json +663 -0
- package/dist/angular/fesm2022/minerva-angular.mjs +1163 -34
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +237 -1
- package/dist/core/calendar-date.d.cts +5 -0
- package/dist/core/calendar-date.d.ts +5 -0
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +671 -630
- package/dist/core/index.js.map +1 -1
- package/dist/core/styling-hooks/components/date-picker.d.cts +45 -0
- package/dist/core/styling-hooks/components/date-picker.d.ts +45 -0
- package/dist/core/styling-hooks/manifest.d.cts +44 -0
- package/dist/core/styling-hooks/manifest.d.ts +44 -0
- package/dist/core/styling-hooks.cjs +1 -1
- package/dist/core/styling-hooks.cjs.map +1 -1
- package/dist/core/styling-hooks.js +62 -0
- package/dist/core/styling-hooks.js.map +1 -1
- package/dist/native/components/Calendar/Calendar.cjs +1 -1
- package/dist/native/components/Calendar/Calendar.cjs.map +1 -1
- package/dist/native/components/Calendar/Calendar.d.cts +2 -0
- package/dist/native/components/Calendar/Calendar.d.ts +2 -0
- package/dist/native/components/Calendar/Calendar.js +115 -112
- package/dist/native/components/Calendar/Calendar.js.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.js +8 -8
- package/dist/native/components/Checkbox/CheckboxGroup.cjs +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.cjs.map +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.js +6 -6
- package/dist/native/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/native/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/native/components/DatePicker/DatePicker.d.cts +40 -0
- package/dist/native/components/DatePicker/DatePicker.d.ts +40 -0
- package/dist/native/components/DatePicker/DatePicker.js +110 -0
- package/dist/native/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/native/components/DatePicker/index.cjs +1 -0
- package/dist/native/components/DatePicker/index.d.cts +2 -0
- package/dist/native/components/DatePicker/index.d.ts +2 -0
- package/dist/native/components/DatePicker/index.js +2 -0
- package/dist/native/components/Radio/RadioGroup.cjs +1 -1
- package/dist/native/components/Radio/RadioGroup.cjs.map +1 -1
- package/dist/native/components/Radio/RadioGroup.js +9 -9
- package/dist/native/components/Switch/Switch.cjs +1 -1
- package/dist/native/components/Switch/Switch.cjs.map +1 -1
- package/dist/native/components/Switch/Switch.js +23 -23
- package/dist/native/components/Switch/Switch.js.map +1 -1
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.d.cts +1 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +70 -68
- package/dist/native/source/components/Calendar/Calendar.tsx +14 -6
- package/dist/native/source/components/DatePicker/DatePicker.tsx +201 -0
- package/dist/native/source/components/DatePicker/index.ts +2 -0
- package/dist/native/source/index.ts +1 -0
- package/dist/native/source/manifest.ts +6 -0
- package/dist/react/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/react/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/react/components/DatePicker/DatePicker.d.cts +13 -0
- package/dist/react/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/react/components/DatePicker/DatePicker.js +315 -0
- package/dist/react/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs +2 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js +23 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js.map +1 -0
- package/dist/react/components/DatePicker/index.cjs +1 -0
- package/dist/react/components/DatePicker/index.d.cts +5 -0
- package/dist/react/components/DatePicker/index.d.ts +5 -0
- package/dist/react/components/DatePicker/index.js +3 -0
- package/dist/react/components/DatePicker/types.d.cts +97 -0
- package/dist/react/components/DatePicker/types.d.ts +97 -0
- package/dist/react/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/react/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/react/components/Tooltip/Tooltip.js +5 -5
- package/dist/react/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/react/components/index.cjs +1 -1
- package/dist/react/components/index.d.cts +1 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/components/index.js +3 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +7 -6
- package/dist/react/style.css +1 -0
- package/dist/react/styles/date-picker.css +7 -0
- package/dist/taro/date-picker.d.ts +20 -0
- package/dist/taro/index.d.ts +1 -0
- package/dist/taro/index.js +1155 -990
- package/dist/uni/DatePicker.vue +225 -0
- package/dist/uni/DatePicker.vue.d.ts +36 -0
- package/dist/uni/MonthCalendar.vue +2 -0
- package/dist/uni/MonthCalendar.vue.d.ts +2 -0
- package/dist/uni/index.d.ts +1 -0
- package/dist/uni/index.js +1 -0
- package/dist/uni/manifest.d.ts +7 -0
- package/dist/uni/manifest.js +8 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.d.ts +36 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js +7 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js.map +1 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +380 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/DatePicker/index.d.ts +2 -0
- package/dist/vue/components/DatePicker/index.js +2 -0
- package/dist/vue/components/DatePicker/types.d.ts +26 -0
- package/dist/vue/components/MonthCalendar/MonthCalendar.vue.d.ts +1 -1
- package/dist/vue/global.d.ts +108 -0
- package/dist/vue/groups/forms-pickers.d.ts +1 -0
- package/dist/vue/groups/forms-pickers.js +5 -2
- package/dist/vue/groups/forms-pickers.js.map +1 -1
- package/dist/vue/index.js +95 -94
- package/dist/weapp/controls.js +259 -76
- package/dist/weapp/date-picker/index.js +1 -0
- package/dist/weapp/date-picker/index.json +1 -0
- package/dist/weapp/date-picker/index.wxml +1 -0
- package/dist/weapp/date-picker/index.wxss +1 -0
- package/dist/weapp/types.d.ts +19 -0
- package/dist/web-components/cdn/minerva.js +461 -335
- package/dist/web-components/cdn/minerva.js.map +1 -1
- package/dist/web-components/components/date-picker/date-picker.d.ts +110 -0
- package/dist/web-components/components/date-picker/date-picker.js +378 -0
- package/dist/web-components/components/date-picker/date-picker.js.map +1 -0
- package/dist/web-components/elements/date-picker.d.ts +1 -0
- package/dist/web-components/elements/date-picker.js +8 -0
- package/dist/web-components/elements/date-picker.js.map +1 -0
- package/dist/web-components/html-custom-data.json +85 -0
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components/index.js +8 -6
- package/dist/web-components/styles/DatePicker/datePicker.css.js +6 -0
- package/dist/web-components/styles/DatePicker/datePicker.css.js.map +1 -0
- package/dist/web-components/types/react.d.ts +12 -0
- package/dist/web-components/types/solid.d.ts +9 -0
- package/dist/web-components/types/svelte.d.ts +9 -0
- package/dist/web-components/types/vue.d.ts +10 -0
- package/package.json +9 -1
package/dist/core/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var u = [
|
|
|
107
107
|
palette: null
|
|
108
108
|
}
|
|
109
109
|
}, v = (e, t) => typeof t == "string" && e.includes(t), y = (e) => v(p, e), te = (e) => v(m, e), ne = (e) => v(h, e), re = (e) => v(g, e), b = (e) => v(ee, e);
|
|
110
|
-
function
|
|
110
|
+
function x(e = {}, t) {
|
|
111
111
|
let n = b(e.preset) ? e.preset : t?.preset ?? "minerva", r = t && !b(e.preset) ? t : _[n];
|
|
112
112
|
return {
|
|
113
113
|
preset: n,
|
|
@@ -117,53 +117,53 @@ function ie(e = {}, t) {
|
|
|
117
117
|
fontScale: re(e.fontScale) ? e.fontScale : r.fontScale
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
var
|
|
120
|
+
var ie = (e) => b(e) ? _[e].palette : null, S = {
|
|
121
121
|
density: "data-density",
|
|
122
122
|
radius: "data-radius",
|
|
123
123
|
shadow: "data-shadow",
|
|
124
124
|
fontScale: "data-font-scale"
|
|
125
|
-
},
|
|
125
|
+
}, ae = {
|
|
126
126
|
density: "standard",
|
|
127
127
|
radius: "medium",
|
|
128
128
|
shadow: "standard",
|
|
129
129
|
fontScale: "standard"
|
|
130
130
|
};
|
|
131
|
-
function
|
|
132
|
-
let n =
|
|
133
|
-
for (let e of Object.keys(
|
|
131
|
+
function oe(e = {}, { all: t = !1 } = {}) {
|
|
132
|
+
let n = x(e), r = {};
|
|
133
|
+
for (let e of Object.keys(S)) (t || n[e] !== ae[e]) && (r[S[e]] = n[e]);
|
|
134
134
|
return r;
|
|
135
135
|
}
|
|
136
136
|
//#endregion
|
|
137
137
|
//#region src/tokens/expr.ts
|
|
138
|
-
var
|
|
138
|
+
var C = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
139
139
|
kind: "ref",
|
|
140
140
|
name: e
|
|
141
|
-
}),
|
|
141
|
+
}), w = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => ({
|
|
142
142
|
kind: "mix",
|
|
143
143
|
a: e,
|
|
144
144
|
amount: t,
|
|
145
145
|
b: n
|
|
146
|
-
}),
|
|
146
|
+
}), T = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
147
147
|
kind: "length",
|
|
148
148
|
value: e,
|
|
149
149
|
unit: "rem"
|
|
150
|
-
}),
|
|
150
|
+
}), E = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
151
151
|
kind: "length",
|
|
152
152
|
value: e,
|
|
153
153
|
unit: "px"
|
|
154
|
-
}),
|
|
154
|
+
}), se = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => ({
|
|
155
155
|
kind: "clamp",
|
|
156
156
|
min: e,
|
|
157
157
|
vw: t,
|
|
158
158
|
max: n
|
|
159
|
-
}),
|
|
159
|
+
}), D = /* @__NO_SIDE_EFFECTS__ */ (...e) => ({
|
|
160
160
|
kind: "shadow",
|
|
161
161
|
layers: e
|
|
162
|
-
}),
|
|
162
|
+
}), ce = /* @__NO_SIDE_EFFECTS__ */ (e, t) => ({
|
|
163
163
|
kind: "transition",
|
|
164
164
|
duration: e,
|
|
165
165
|
easing: t
|
|
166
|
-
}),
|
|
166
|
+
}), le = /* @__NO_SIDE_EFFECTS__ */ (e, t, n, r) => ({
|
|
167
167
|
kind: "cubic-bezier",
|
|
168
168
|
points: [
|
|
169
169
|
e,
|
|
@@ -173,25 +173,25 @@ var x = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
|
173
173
|
]
|
|
174
174
|
});
|
|
175
175
|
/*#__NO_SIDE_EFFECTS__*/
|
|
176
|
-
function
|
|
176
|
+
function O(...e) {
|
|
177
177
|
return Object.assign({}, ...e);
|
|
178
178
|
}
|
|
179
|
-
var
|
|
179
|
+
var k = (e) => e === 0 ? "0" : `${e}px`;
|
|
180
180
|
/*#__NO_SIDE_EFFECTS__*/
|
|
181
|
-
function
|
|
181
|
+
function A(e) {
|
|
182
182
|
if (typeof e == "string") return e;
|
|
183
183
|
if (typeof e == "number") return String(e);
|
|
184
184
|
switch (e.kind) {
|
|
185
185
|
case "ref": return `var(--${e.name})`;
|
|
186
|
-
case "mix": return `color-mix(in srgb, ${/* @__PURE__ */
|
|
186
|
+
case "mix": return `color-mix(in srgb, ${/* @__PURE__ */ A(e.a)} ${e.amount}%, ${/* @__PURE__ */ A(e.b)})`;
|
|
187
187
|
case "length": return e.value === 0 ? "0" : `${e.value}${e.unit}`;
|
|
188
|
-
case "clamp": return `clamp(${/* @__PURE__ */
|
|
188
|
+
case "clamp": return `clamp(${/* @__PURE__ */ A(e.min)}, ${e.vw}vw, ${/* @__PURE__ */ A(e.max)})`;
|
|
189
189
|
case "shadow": return e.layers.length === 0 ? "none" : e.layers.map((e) => [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
...e.spread === void 0 ? [] : [
|
|
194
|
-
/* @__PURE__ */
|
|
190
|
+
k(e.x),
|
|
191
|
+
k(e.y),
|
|
192
|
+
k(e.blur),
|
|
193
|
+
...e.spread === void 0 ? [] : [k(e.spread)],
|
|
194
|
+
/* @__PURE__ */ A(e.color)
|
|
195
195
|
].join(" ")).join(", ");
|
|
196
196
|
case "transition": return `${e.duration}ms ${e.easing}`;
|
|
197
197
|
case "cubic-bezier": return `cubic-bezier(${e.points.join(", ")})`;
|
|
@@ -199,151 +199,151 @@ function D(e) {
|
|
|
199
199
|
}
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/tokens/design.ts
|
|
202
|
-
var
|
|
203
|
-
"control-height-xs": /* @__PURE__ */
|
|
204
|
-
"control-height-sm": /* @__PURE__ */
|
|
205
|
-
"control-height-md": /* @__PURE__ */
|
|
206
|
-
"control-height-lg": /* @__PURE__ */
|
|
207
|
-
"control-height-xl": /* @__PURE__ */
|
|
208
|
-
"control-padding-x-xs": /* @__PURE__ */
|
|
209
|
-
"control-padding-x-sm": /* @__PURE__ */
|
|
210
|
-
"control-padding-x-md": /* @__PURE__ */
|
|
211
|
-
"control-padding-x-lg": /* @__PURE__ */
|
|
212
|
-
"control-padding-x-xl": /* @__PURE__ */
|
|
213
|
-
"row-padding-y": /* @__PURE__ */
|
|
214
|
-
"row-padding-x": /* @__PURE__ */
|
|
215
|
-
"touch-target-min": /* @__PURE__ */
|
|
202
|
+
var j = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ C(`space-${e}`), ue = {
|
|
203
|
+
"control-height-xs": /* @__PURE__ */ T(1.5),
|
|
204
|
+
"control-height-sm": /* @__PURE__ */ T(2),
|
|
205
|
+
"control-height-md": /* @__PURE__ */ T(2.5),
|
|
206
|
+
"control-height-lg": /* @__PURE__ */ T(3),
|
|
207
|
+
"control-height-xl": /* @__PURE__ */ T(3.5),
|
|
208
|
+
"control-padding-x-xs": /* @__PURE__ */ j("2"),
|
|
209
|
+
"control-padding-x-sm": /* @__PURE__ */ j("3"),
|
|
210
|
+
"control-padding-x-md": /* @__PURE__ */ j("4"),
|
|
211
|
+
"control-padding-x-lg": /* @__PURE__ */ j("5"),
|
|
212
|
+
"control-padding-x-xl": /* @__PURE__ */ j("6"),
|
|
213
|
+
"row-padding-y": /* @__PURE__ */ j("2"),
|
|
214
|
+
"row-padding-x": /* @__PURE__ */ j("3"),
|
|
215
|
+
"touch-target-min": /* @__PURE__ */ E(32)
|
|
216
|
+
}, de = {
|
|
217
|
+
"radius-sm": /* @__PURE__ */ E(4),
|
|
218
|
+
"radius-md": /* @__PURE__ */ E(6),
|
|
219
|
+
"radius-lg": /* @__PURE__ */ E(8)
|
|
220
|
+
}, fe = {
|
|
221
|
+
"radius-xl": /* @__PURE__ */ E(12),
|
|
222
|
+
"radius-2xl": /* @__PURE__ */ E(16)
|
|
223
|
+
}, pe = {
|
|
224
|
+
"font-size-xs": /* @__PURE__ */ T(.75),
|
|
225
|
+
"font-size-sm": /* @__PURE__ */ T(.8125),
|
|
226
|
+
"font-size-md": /* @__PURE__ */ T(.875),
|
|
227
|
+
"font-size-lg": /* @__PURE__ */ T(1),
|
|
228
|
+
"font-size-xl": /* @__PURE__ */ T(1.125),
|
|
229
|
+
"font-size-2xl": /* @__PURE__ */ T(1.375),
|
|
230
|
+
"font-size-3xl": /* @__PURE__ */ T(1.75),
|
|
231
|
+
"font-size-4xl": /* @__PURE__ */ T(2.25),
|
|
232
|
+
"font-size-5xl": /* @__PURE__ */ T(3),
|
|
233
|
+
"font-size-6xl": /* @__PURE__ */ T(3.75)
|
|
216
234
|
}, me = {
|
|
217
|
-
|
|
218
|
-
"radius-md": /* @__PURE__ */ w(6),
|
|
219
|
-
"radius-lg": /* @__PURE__ */ w(8)
|
|
220
|
-
}, he = {
|
|
221
|
-
"radius-xl": /* @__PURE__ */ w(12),
|
|
222
|
-
"radius-2xl": /* @__PURE__ */ w(16)
|
|
223
|
-
}, ge = {
|
|
224
|
-
"font-size-xs": /* @__PURE__ */ C(.75),
|
|
225
|
-
"font-size-sm": /* @__PURE__ */ C(.8125),
|
|
226
|
-
"font-size-md": /* @__PURE__ */ C(.875),
|
|
227
|
-
"font-size-lg": /* @__PURE__ */ C(1),
|
|
228
|
-
"font-size-xl": /* @__PURE__ */ C(1.125),
|
|
229
|
-
"font-size-2xl": /* @__PURE__ */ C(1.375),
|
|
230
|
-
"font-size-3xl": /* @__PURE__ */ C(1.75),
|
|
231
|
-
"font-size-4xl": /* @__PURE__ */ C(2.25),
|
|
232
|
-
"font-size-5xl": /* @__PURE__ */ C(3),
|
|
233
|
-
"font-size-6xl": /* @__PURE__ */ C(3.75)
|
|
234
|
-
}, k = {
|
|
235
|
-
standard: pe,
|
|
235
|
+
standard: ue,
|
|
236
236
|
compact: {
|
|
237
|
-
"control-height-xs": /* @__PURE__ */
|
|
238
|
-
"control-height-sm": /* @__PURE__ */
|
|
239
|
-
"control-height-md": /* @__PURE__ */
|
|
240
|
-
"control-height-lg": /* @__PURE__ */
|
|
241
|
-
"control-height-xl": /* @__PURE__ */
|
|
242
|
-
"control-padding-x-xs": /* @__PURE__ */
|
|
243
|
-
"control-padding-x-sm": /* @__PURE__ */
|
|
244
|
-
"control-padding-x-md": /* @__PURE__ */
|
|
245
|
-
"control-padding-x-lg": /* @__PURE__ */
|
|
246
|
-
"control-padding-x-xl": /* @__PURE__ */
|
|
247
|
-
"row-padding-y": /* @__PURE__ */
|
|
248
|
-
"row-padding-x": /* @__PURE__ */
|
|
249
|
-
"touch-target-min": /* @__PURE__ */
|
|
237
|
+
"control-height-xs": /* @__PURE__ */ T(1.25),
|
|
238
|
+
"control-height-sm": /* @__PURE__ */ T(1.75),
|
|
239
|
+
"control-height-md": /* @__PURE__ */ T(2),
|
|
240
|
+
"control-height-lg": /* @__PURE__ */ T(2.5),
|
|
241
|
+
"control-height-xl": /* @__PURE__ */ T(3),
|
|
242
|
+
"control-padding-x-xs": /* @__PURE__ */ j("1-5"),
|
|
243
|
+
"control-padding-x-sm": /* @__PURE__ */ j("2"),
|
|
244
|
+
"control-padding-x-md": /* @__PURE__ */ j("3"),
|
|
245
|
+
"control-padding-x-lg": /* @__PURE__ */ j("4"),
|
|
246
|
+
"control-padding-x-xl": /* @__PURE__ */ j("5"),
|
|
247
|
+
"row-padding-y": /* @__PURE__ */ j("1"),
|
|
248
|
+
"row-padding-x": /* @__PURE__ */ j("2"),
|
|
249
|
+
"touch-target-min": /* @__PURE__ */ E(24)
|
|
250
250
|
},
|
|
251
251
|
comfortable: {
|
|
252
|
-
"control-height-xs": /* @__PURE__ */
|
|
253
|
-
"control-height-sm": /* @__PURE__ */
|
|
254
|
-
"control-height-md": /* @__PURE__ */
|
|
255
|
-
"control-height-lg": /* @__PURE__ */
|
|
256
|
-
"control-height-xl": /* @__PURE__ */
|
|
257
|
-
"control-padding-x-xs": /* @__PURE__ */
|
|
258
|
-
"control-padding-x-sm": /* @__PURE__ */
|
|
259
|
-
"control-padding-x-md": /* @__PURE__ */
|
|
260
|
-
"control-padding-x-lg": /* @__PURE__ */
|
|
261
|
-
"control-padding-x-xl": /* @__PURE__ */
|
|
262
|
-
"row-padding-y": /* @__PURE__ */
|
|
263
|
-
"row-padding-x": /* @__PURE__ */
|
|
264
|
-
"touch-target-min": /* @__PURE__ */
|
|
252
|
+
"control-height-xs": /* @__PURE__ */ T(1.75),
|
|
253
|
+
"control-height-sm": /* @__PURE__ */ T(2.25),
|
|
254
|
+
"control-height-md": /* @__PURE__ */ T(2.75),
|
|
255
|
+
"control-height-lg": /* @__PURE__ */ T(3.25),
|
|
256
|
+
"control-height-xl": /* @__PURE__ */ T(3.75),
|
|
257
|
+
"control-padding-x-xs": /* @__PURE__ */ j("2-5"),
|
|
258
|
+
"control-padding-x-sm": /* @__PURE__ */ j("3"),
|
|
259
|
+
"control-padding-x-md": /* @__PURE__ */ j("5"),
|
|
260
|
+
"control-padding-x-lg": /* @__PURE__ */ j("6"),
|
|
261
|
+
"control-padding-x-xl": /* @__PURE__ */ j("7"),
|
|
262
|
+
"row-padding-y": /* @__PURE__ */ j("3"),
|
|
263
|
+
"row-padding-x": /* @__PURE__ */ j("4"),
|
|
264
|
+
"touch-target-min": /* @__PURE__ */ E(44)
|
|
265
265
|
}
|
|
266
|
-
},
|
|
266
|
+
}, he = {
|
|
267
267
|
none: {
|
|
268
|
-
"radius-sm": /* @__PURE__ */
|
|
269
|
-
"radius-md": /* @__PURE__ */
|
|
270
|
-
"radius-lg": /* @__PURE__ */
|
|
271
|
-
"radius-xl": /* @__PURE__ */
|
|
272
|
-
"radius-2xl": /* @__PURE__ */
|
|
268
|
+
"radius-sm": /* @__PURE__ */ E(0),
|
|
269
|
+
"radius-md": /* @__PURE__ */ E(0),
|
|
270
|
+
"radius-lg": /* @__PURE__ */ E(0),
|
|
271
|
+
"radius-xl": /* @__PURE__ */ E(0),
|
|
272
|
+
"radius-2xl": /* @__PURE__ */ E(0)
|
|
273
273
|
},
|
|
274
274
|
small: {
|
|
275
|
-
"radius-sm": /* @__PURE__ */
|
|
276
|
-
"radius-md": /* @__PURE__ */
|
|
277
|
-
"radius-lg": /* @__PURE__ */
|
|
278
|
-
"radius-xl": /* @__PURE__ */
|
|
279
|
-
"radius-2xl": /* @__PURE__ */
|
|
275
|
+
"radius-sm": /* @__PURE__ */ E(2),
|
|
276
|
+
"radius-md": /* @__PURE__ */ E(3),
|
|
277
|
+
"radius-lg": /* @__PURE__ */ E(4),
|
|
278
|
+
"radius-xl": /* @__PURE__ */ E(6),
|
|
279
|
+
"radius-2xl": /* @__PURE__ */ E(8)
|
|
280
280
|
},
|
|
281
|
-
medium: /* @__PURE__ */
|
|
281
|
+
medium: /* @__PURE__ */ O(de, fe),
|
|
282
282
|
large: {
|
|
283
|
-
"radius-sm": /* @__PURE__ */
|
|
284
|
-
"radius-md": /* @__PURE__ */
|
|
285
|
-
"radius-lg": /* @__PURE__ */
|
|
286
|
-
"radius-xl": /* @__PURE__ */
|
|
287
|
-
"radius-2xl": /* @__PURE__ */
|
|
283
|
+
"radius-sm": /* @__PURE__ */ E(6),
|
|
284
|
+
"radius-md": /* @__PURE__ */ E(10),
|
|
285
|
+
"radius-lg": /* @__PURE__ */ E(14),
|
|
286
|
+
"radius-xl": /* @__PURE__ */ E(18),
|
|
287
|
+
"radius-2xl": /* @__PURE__ */ E(24)
|
|
288
288
|
}
|
|
289
|
-
},
|
|
289
|
+
}, ge = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ w(/* @__PURE__ */ C("shadow-color"), e, "transparent"), _e = {
|
|
290
290
|
none: {
|
|
291
|
-
"shadow-sm": /* @__PURE__ */
|
|
292
|
-
"shadow-md": /* @__PURE__ */
|
|
293
|
-
"shadow-lg": /* @__PURE__ */
|
|
294
|
-
"shadow-xl": /* @__PURE__ */
|
|
291
|
+
"shadow-sm": /* @__PURE__ */ D(),
|
|
292
|
+
"shadow-md": /* @__PURE__ */ D(),
|
|
293
|
+
"shadow-lg": /* @__PURE__ */ D(),
|
|
294
|
+
"shadow-xl": /* @__PURE__ */ D()
|
|
295
295
|
},
|
|
296
296
|
subtle: {
|
|
297
|
-
"shadow-sm": /* @__PURE__ */
|
|
297
|
+
"shadow-sm": /* @__PURE__ */ D({
|
|
298
298
|
x: 0,
|
|
299
299
|
y: 1,
|
|
300
300
|
blur: 1,
|
|
301
|
-
color: /* @__PURE__ */
|
|
301
|
+
color: /* @__PURE__ */ ge(45)
|
|
302
302
|
}),
|
|
303
|
-
"shadow-md": /* @__PURE__ */
|
|
303
|
+
"shadow-md": /* @__PURE__ */ D({
|
|
304
304
|
x: 0,
|
|
305
305
|
y: 2,
|
|
306
306
|
blur: 6,
|
|
307
|
-
color: /* @__PURE__ */
|
|
307
|
+
color: /* @__PURE__ */ ge(45)
|
|
308
308
|
}),
|
|
309
|
-
"shadow-lg": /* @__PURE__ */
|
|
309
|
+
"shadow-lg": /* @__PURE__ */ D({
|
|
310
310
|
x: 0,
|
|
311
311
|
y: 6,
|
|
312
312
|
blur: 16,
|
|
313
|
-
color: /* @__PURE__ */
|
|
313
|
+
color: /* @__PURE__ */ ge(50)
|
|
314
314
|
}),
|
|
315
|
-
"shadow-xl": /* @__PURE__ */
|
|
315
|
+
"shadow-xl": /* @__PURE__ */ D({
|
|
316
316
|
x: 0,
|
|
317
317
|
y: 10,
|
|
318
318
|
blur: 24,
|
|
319
|
-
color: /* @__PURE__ */
|
|
319
|
+
color: /* @__PURE__ */ ge(55)
|
|
320
320
|
})
|
|
321
321
|
}
|
|
322
322
|
}, ve = {
|
|
323
|
-
"font-size-xs": /* @__PURE__ */
|
|
324
|
-
"font-size-sm": /* @__PURE__ */
|
|
325
|
-
"font-size-md": /* @__PURE__ */
|
|
326
|
-
"font-size-lg": /* @__PURE__ */
|
|
327
|
-
"font-size-xl": /* @__PURE__ */
|
|
328
|
-
"font-size-2xl": /* @__PURE__ */
|
|
329
|
-
"font-size-3xl": /* @__PURE__ */
|
|
330
|
-
"font-size-4xl": /* @__PURE__ */
|
|
331
|
-
"font-size-5xl": /* @__PURE__ */
|
|
332
|
-
"font-size-6xl": /* @__PURE__ */
|
|
323
|
+
"font-size-xs": /* @__PURE__ */ T(.6875),
|
|
324
|
+
"font-size-sm": /* @__PURE__ */ T(.75),
|
|
325
|
+
"font-size-md": /* @__PURE__ */ T(.8125),
|
|
326
|
+
"font-size-lg": /* @__PURE__ */ T(.9375),
|
|
327
|
+
"font-size-xl": /* @__PURE__ */ T(1.0625),
|
|
328
|
+
"font-size-2xl": /* @__PURE__ */ T(1.25),
|
|
329
|
+
"font-size-3xl": /* @__PURE__ */ T(1.5),
|
|
330
|
+
"font-size-4xl": /* @__PURE__ */ T(2),
|
|
331
|
+
"font-size-5xl": /* @__PURE__ */ T(2.625),
|
|
332
|
+
"font-size-6xl": /* @__PURE__ */ T(3.25)
|
|
333
333
|
}, ye = {
|
|
334
|
-
"font-size-xs": /* @__PURE__ */
|
|
335
|
-
"font-size-sm": /* @__PURE__ */
|
|
336
|
-
"font-size-md": /* @__PURE__ */
|
|
337
|
-
"font-size-lg": /* @__PURE__ */
|
|
338
|
-
"font-size-xl": /* @__PURE__ */
|
|
339
|
-
"font-size-2xl": /* @__PURE__ */
|
|
340
|
-
"font-size-3xl": /* @__PURE__ */
|
|
341
|
-
"font-size-4xl": /* @__PURE__ */
|
|
342
|
-
"font-size-5xl": /* @__PURE__ */
|
|
343
|
-
"font-size-6xl": /* @__PURE__ */
|
|
334
|
+
"font-size-xs": /* @__PURE__ */ T(.8125),
|
|
335
|
+
"font-size-sm": /* @__PURE__ */ T(.875),
|
|
336
|
+
"font-size-md": /* @__PURE__ */ T(1),
|
|
337
|
+
"font-size-lg": /* @__PURE__ */ T(1.125),
|
|
338
|
+
"font-size-xl": /* @__PURE__ */ T(1.25),
|
|
339
|
+
"font-size-2xl": /* @__PURE__ */ T(1.5),
|
|
340
|
+
"font-size-3xl": /* @__PURE__ */ T(2),
|
|
341
|
+
"font-size-4xl": /* @__PURE__ */ T(2.5),
|
|
342
|
+
"font-size-5xl": /* @__PURE__ */ T(3.25),
|
|
343
|
+
"font-size-6xl": /* @__PURE__ */ T(4)
|
|
344
344
|
}, be = {
|
|
345
345
|
small: ve,
|
|
346
|
-
standard:
|
|
346
|
+
standard: pe,
|
|
347
347
|
large: ye
|
|
348
348
|
}, xe = { "line-height-base": 1.45 }, Se = {
|
|
349
349
|
"line-height-base": 1.5,
|
|
@@ -355,11 +355,11 @@ var O = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ x(`space-${e}`), pe =
|
|
|
355
355
|
small: xe,
|
|
356
356
|
standard: Se,
|
|
357
357
|
large: Ce
|
|
358
|
-
}, M = {
|
|
359
|
-
small: /* @__PURE__ */ E(ve, xe),
|
|
360
|
-
standard: /* @__PURE__ */ E(ge, Se),
|
|
361
|
-
large: /* @__PURE__ */ E(ye, Ce)
|
|
362
358
|
}, Te = {
|
|
359
|
+
small: /* @__PURE__ */ O(ve, xe),
|
|
360
|
+
standard: /* @__PURE__ */ O(pe, Se),
|
|
361
|
+
large: /* @__PURE__ */ O(ye, Ce)
|
|
362
|
+
}, Ee = {
|
|
363
363
|
"primary-color": "#2563eb",
|
|
364
364
|
"secondary-color": "#475569",
|
|
365
365
|
"success-color": "#15803d",
|
|
@@ -383,48 +383,48 @@ var O = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ x(`space-${e}`), pe =
|
|
|
383
383
|
"link-hover-color": "#1e40af",
|
|
384
384
|
"link-active-color": "#1e3a8a",
|
|
385
385
|
"link-visited-color": "#6d28d9"
|
|
386
|
-
},
|
|
387
|
-
"surface-color":
|
|
388
|
-
"surface-muted-color": /* @__PURE__ */
|
|
389
|
-
"surface-elevated-color":
|
|
390
|
-
"surface-subtle-color": /* @__PURE__ */
|
|
391
|
-
"canvas-color": /* @__PURE__ */
|
|
392
|
-
"control-color": /* @__PURE__ */
|
|
393
|
-
"hover-color": /* @__PURE__ */
|
|
394
|
-
"selected-color": /* @__PURE__ */
|
|
395
|
-
"overlay-color": /* @__PURE__ */
|
|
396
|
-
"border-strong-color": /* @__PURE__ */
|
|
397
|
-
"text-color":
|
|
398
|
-
"text-secondary-color": /* @__PURE__ */
|
|
399
|
-
"text-muted-color": /* @__PURE__ */
|
|
400
|
-
"text-disabled-color": /* @__PURE__ */
|
|
386
|
+
}, M = /* @__PURE__ */ C("foreground-color"), N = /* @__PURE__ */ C("background-color"), De = /* @__PURE__ */ C("surface-color"), P = /* @__PURE__ */ C("shadow-color"), Oe = {
|
|
387
|
+
"surface-color": N,
|
|
388
|
+
"surface-muted-color": /* @__PURE__ */ w(M, 6, N),
|
|
389
|
+
"surface-elevated-color": N,
|
|
390
|
+
"surface-subtle-color": /* @__PURE__ */ w(M, 3, N),
|
|
391
|
+
"canvas-color": /* @__PURE__ */ C("surface-subtle-color"),
|
|
392
|
+
"control-color": /* @__PURE__ */ C("surface-subtle-color"),
|
|
393
|
+
"hover-color": /* @__PURE__ */ C("surface-muted-color"),
|
|
394
|
+
"selected-color": /* @__PURE__ */ w(/* @__PURE__ */ C("primary-color"), 14, De),
|
|
395
|
+
"overlay-color": /* @__PURE__ */ w("#000000", 45, "transparent"),
|
|
396
|
+
"border-strong-color": /* @__PURE__ */ w(M, 35, N),
|
|
397
|
+
"text-color": M,
|
|
398
|
+
"text-secondary-color": /* @__PURE__ */ w(M, 75, N),
|
|
399
|
+
"text-muted-color": /* @__PURE__ */ w(M, 62, N),
|
|
400
|
+
"text-disabled-color": /* @__PURE__ */ w(M, 45, N),
|
|
401
401
|
"text-inverse-color": "#ffffff",
|
|
402
|
-
"focus-ring-color": /* @__PURE__ */
|
|
403
|
-
"shadow-sm": /* @__PURE__ */
|
|
402
|
+
"focus-ring-color": /* @__PURE__ */ w(/* @__PURE__ */ C("primary-color"), 45, "transparent"),
|
|
403
|
+
"shadow-sm": /* @__PURE__ */ D({
|
|
404
404
|
x: 0,
|
|
405
405
|
y: 1,
|
|
406
406
|
blur: 2,
|
|
407
|
-
color:
|
|
407
|
+
color: P
|
|
408
408
|
}),
|
|
409
|
-
"shadow-md": /* @__PURE__ */
|
|
409
|
+
"shadow-md": /* @__PURE__ */ D({
|
|
410
410
|
x: 0,
|
|
411
411
|
y: 4,
|
|
412
412
|
blur: 12,
|
|
413
|
-
color:
|
|
413
|
+
color: P
|
|
414
414
|
}),
|
|
415
|
-
"shadow-lg": /* @__PURE__ */
|
|
415
|
+
"shadow-lg": /* @__PURE__ */ D({
|
|
416
416
|
x: 0,
|
|
417
417
|
y: 12,
|
|
418
418
|
blur: 32,
|
|
419
|
-
color:
|
|
419
|
+
color: P
|
|
420
420
|
}),
|
|
421
|
-
"shadow-xl": /* @__PURE__ */
|
|
421
|
+
"shadow-xl": /* @__PURE__ */ D({
|
|
422
422
|
x: 0,
|
|
423
423
|
y: 20,
|
|
424
424
|
blur: 48,
|
|
425
|
-
color:
|
|
425
|
+
color: P
|
|
426
426
|
}),
|
|
427
|
-
"accent-color": /* @__PURE__ */
|
|
427
|
+
"accent-color": /* @__PURE__ */ C("primary-color")
|
|
428
428
|
}, ke = [
|
|
429
429
|
"primary",
|
|
430
430
|
"secondary",
|
|
@@ -434,29 +434,29 @@ var O = /* @__NO_SIDE_EFFECTS__ */ (e) => /* @__PURE__ */ x(`space-${e}`), pe =
|
|
|
434
434
|
"info",
|
|
435
435
|
"accent"
|
|
436
436
|
], Ae = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
437
|
-
let t = /* @__PURE__ */
|
|
437
|
+
let t = /* @__PURE__ */ C(`${e}-color`);
|
|
438
438
|
return {
|
|
439
|
-
[`${e}-color-hover`]: /* @__PURE__ */
|
|
440
|
-
[`${e}-color-active`]: /* @__PURE__ */
|
|
441
|
-
[`${e}-color-subtle`]: /* @__PURE__ */
|
|
442
|
-
[`${e}-color-border`]: /* @__PURE__ */
|
|
443
|
-
[`${e}-color-text`]: /* @__PURE__ */
|
|
439
|
+
[`${e}-color-hover`]: /* @__PURE__ */ w(t, 85, M),
|
|
440
|
+
[`${e}-color-active`]: /* @__PURE__ */ w(t, 72, M),
|
|
441
|
+
[`${e}-color-subtle`]: /* @__PURE__ */ w(t, 12, De),
|
|
442
|
+
[`${e}-color-border`]: /* @__PURE__ */ w(t, 40, De),
|
|
443
|
+
[`${e}-color-text`]: /* @__PURE__ */ w(t, 80, M)
|
|
444
444
|
};
|
|
445
445
|
};
|
|
446
446
|
/*#__NO_SIDE_EFFECTS__*/
|
|
447
447
|
function je() {
|
|
448
|
-
return /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ O({}, ...ke.map(Ae));
|
|
449
449
|
}
|
|
450
|
-
var Me = /* @__PURE__ */
|
|
450
|
+
var Me = /* @__PURE__ */ O(Ee, Oe, de, /* @__PURE__ */ je());
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region src/theme/themes.ts
|
|
453
453
|
/*#__NO_SIDE_EFFECTS__*/
|
|
454
454
|
function Ne(e, t) {
|
|
455
455
|
let n = {};
|
|
456
|
-
for (let r of t) n[r] = /* @__PURE__ */
|
|
456
|
+
for (let r of t) n[r] = /* @__PURE__ */ A(e[r]);
|
|
457
457
|
return n;
|
|
458
458
|
}
|
|
459
|
-
var Pe = /* @__PURE__ */
|
|
459
|
+
var Pe = /* @__PURE__ */ O(Ee, /* @__PURE__ */ Ne(Oe, [
|
|
460
460
|
"surface-color",
|
|
461
461
|
"surface-muted-color",
|
|
462
462
|
"surface-elevated-color",
|
|
@@ -545,7 +545,7 @@ var Le = /* @__PURE__ */ Ie(Pe, F, Fe), Re = {
|
|
|
545
545
|
light: Pe,
|
|
546
546
|
dark: F,
|
|
547
547
|
"github-dark": Fe
|
|
548
|
-
}, ze = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(Re, e),
|
|
548
|
+
}, ze = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(Re, e), I = {
|
|
549
549
|
editorial: {
|
|
550
550
|
light: {
|
|
551
551
|
"primary-color": "#1e3a5f",
|
|
@@ -1154,30 +1154,30 @@ var Le = /* @__PURE__ */ Ie(Pe, F, Fe), Re = {
|
|
|
1154
1154
|
"font-family-mono": "'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace"
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
+
}, Be = {
|
|
1158
|
+
"space-0": /* @__PURE__ */ T(0),
|
|
1159
|
+
"space-0-5": /* @__PURE__ */ T(.125),
|
|
1160
|
+
"space-1": /* @__PURE__ */ T(.25),
|
|
1161
|
+
"space-1-5": /* @__PURE__ */ T(.375),
|
|
1162
|
+
"space-2": /* @__PURE__ */ T(.5),
|
|
1163
|
+
"space-2-5": /* @__PURE__ */ T(.625),
|
|
1164
|
+
"space-3": /* @__PURE__ */ T(.75),
|
|
1165
|
+
"space-4": /* @__PURE__ */ T(1),
|
|
1166
|
+
"space-5": /* @__PURE__ */ T(1.25),
|
|
1167
|
+
"space-6": /* @__PURE__ */ T(1.5),
|
|
1168
|
+
"space-7": /* @__PURE__ */ T(1.75),
|
|
1169
|
+
"space-8": /* @__PURE__ */ T(2),
|
|
1170
|
+
"space-10": /* @__PURE__ */ T(2.5),
|
|
1171
|
+
"space-12": /* @__PURE__ */ T(3),
|
|
1172
|
+
"space-14": /* @__PURE__ */ T(3.5),
|
|
1173
|
+
"space-16": /* @__PURE__ */ T(4),
|
|
1174
|
+
"space-20": /* @__PURE__ */ T(5),
|
|
1175
|
+
"space-24": /* @__PURE__ */ T(6)
|
|
1157
1176
|
}, Ve = {
|
|
1158
|
-
"space-0": /* @__PURE__ */ C(0),
|
|
1159
|
-
"space-0-5": /* @__PURE__ */ C(.125),
|
|
1160
|
-
"space-1": /* @__PURE__ */ C(.25),
|
|
1161
|
-
"space-1-5": /* @__PURE__ */ C(.375),
|
|
1162
|
-
"space-2": /* @__PURE__ */ C(.5),
|
|
1163
|
-
"space-2-5": /* @__PURE__ */ C(.625),
|
|
1164
|
-
"space-3": /* @__PURE__ */ C(.75),
|
|
1165
|
-
"space-4": /* @__PURE__ */ C(1),
|
|
1166
|
-
"space-5": /* @__PURE__ */ C(1.25),
|
|
1167
|
-
"space-6": /* @__PURE__ */ C(1.5),
|
|
1168
|
-
"space-7": /* @__PURE__ */ C(1.75),
|
|
1169
|
-
"space-8": /* @__PURE__ */ C(2),
|
|
1170
|
-
"space-10": /* @__PURE__ */ C(2.5),
|
|
1171
|
-
"space-12": /* @__PURE__ */ C(3),
|
|
1172
|
-
"space-14": /* @__PURE__ */ C(3.5),
|
|
1173
|
-
"space-16": /* @__PURE__ */ C(4),
|
|
1174
|
-
"space-20": /* @__PURE__ */ C(5),
|
|
1175
|
-
"space-24": /* @__PURE__ */ C(6)
|
|
1176
|
-
}, He = {
|
|
1177
1177
|
"font-family-sans": "system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"PingFang SC\", \"Microsoft YaHei\", sans-serif",
|
|
1178
|
-
"font-family-display": /* @__PURE__ */
|
|
1178
|
+
"font-family-display": /* @__PURE__ */ C("font-family-sans"),
|
|
1179
1179
|
"font-family-mono": "ui-monospace, \"SF Mono\", \"JetBrains Mono\", Menlo, Consolas, monospace"
|
|
1180
|
-
},
|
|
1180
|
+
}, L = /* @__PURE__ */ O(Be, { "radius-none": /* @__PURE__ */ E(0) }, fe, { "radius-full": /* @__PURE__ */ E(9999) }, Ve, pe, {
|
|
1181
1181
|
"font-weight-regular": 400,
|
|
1182
1182
|
"font-weight-medium": 500,
|
|
1183
1183
|
"font-weight-semibold": 600,
|
|
@@ -1193,27 +1193,27 @@ var Le = /* @__PURE__ */ Ie(Pe, F, Fe), Re = {
|
|
|
1193
1193
|
"z-modal": 1400,
|
|
1194
1194
|
"z-popover": 1500,
|
|
1195
1195
|
"z-toast": 1700,
|
|
1196
|
-
"transition-fast": /* @__PURE__ */
|
|
1197
|
-
"transition-base": /* @__PURE__ */
|
|
1198
|
-
"transition-slow": /* @__PURE__ */
|
|
1199
|
-
"ease-out": /* @__PURE__ */
|
|
1200
|
-
"ease-spring": /* @__PURE__ */
|
|
1201
|
-
"ease-in": /* @__PURE__ */
|
|
1202
|
-
"rhythm-section": /* @__PURE__ */
|
|
1203
|
-
"rhythm-block": /* @__PURE__ */
|
|
1204
|
-
"rhythm-tight": /* @__PURE__ */
|
|
1196
|
+
"transition-fast": /* @__PURE__ */ ce(120, "ease-out"),
|
|
1197
|
+
"transition-base": /* @__PURE__ */ ce(200, "ease-out"),
|
|
1198
|
+
"transition-slow": /* @__PURE__ */ ce(360, "ease-out"),
|
|
1199
|
+
"ease-out": /* @__PURE__ */ le(.22, 1, .36, 1),
|
|
1200
|
+
"ease-spring": /* @__PURE__ */ le(.34, 1.56, .64, 1),
|
|
1201
|
+
"ease-in": /* @__PURE__ */ le(.5, 0, .75, 0),
|
|
1202
|
+
"rhythm-section": /* @__PURE__ */ se(/* @__PURE__ */ T(3), 6, /* @__PURE__ */ T(5)),
|
|
1203
|
+
"rhythm-block": /* @__PURE__ */ se(/* @__PURE__ */ T(1.5), 3, /* @__PURE__ */ T(2.5)),
|
|
1204
|
+
"rhythm-tight": /* @__PURE__ */ T(.75),
|
|
1205
1205
|
"elevation-flat": "none",
|
|
1206
|
-
"elevation-subtle": /* @__PURE__ */
|
|
1207
|
-
"elevation-raised": /* @__PURE__ */
|
|
1208
|
-
"elevation-floating": /* @__PURE__ */
|
|
1209
|
-
},
|
|
1210
|
-
"focus-ring-width": /* @__PURE__ */
|
|
1211
|
-
"focus-ring-offset": /* @__PURE__ */
|
|
1212
|
-
}),
|
|
1206
|
+
"elevation-subtle": /* @__PURE__ */ C("shadow-sm"),
|
|
1207
|
+
"elevation-raised": /* @__PURE__ */ C("shadow-md"),
|
|
1208
|
+
"elevation-floating": /* @__PURE__ */ C("shadow-lg")
|
|
1209
|
+
}, ue, {
|
|
1210
|
+
"focus-ring-width": /* @__PURE__ */ E(2),
|
|
1211
|
+
"focus-ring-offset": /* @__PURE__ */ E(2)
|
|
1212
|
+
}), He = {
|
|
1213
1213
|
"transition-fast": "0s",
|
|
1214
1214
|
"transition-base": "0s",
|
|
1215
1215
|
"transition-slow": "0s"
|
|
1216
|
-
},
|
|
1216
|
+
}, Ue = { "focus-ring-color": "Highlight" }, We = {
|
|
1217
1217
|
black: "#000000",
|
|
1218
1218
|
silver: "#c0c0c0",
|
|
1219
1219
|
gray: "#808080",
|
|
@@ -1235,8 +1235,8 @@ var Le = /* @__PURE__ */ Ie(Pe, F, Fe), Re = {
|
|
|
1235
1235
|
cyan: "#00ffff",
|
|
1236
1236
|
orange: "#ffa500",
|
|
1237
1237
|
transparent: "#00000000"
|
|
1238
|
-
},
|
|
1239
|
-
function
|
|
1238
|
+
}, R = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
1239
|
+
function Ge(e) {
|
|
1240
1240
|
if (!/^[\da-f]+$/i.test(e)) return;
|
|
1241
1241
|
let t = e.length === 3 || e.length === 4 ? e.replace(/./g, (e) => e + e) : e;
|
|
1242
1242
|
if (t.length !== 6 && t.length !== 8) return;
|
|
@@ -1248,29 +1248,29 @@ function qe(e) {
|
|
|
1248
1248
|
a: t.length === 8 ? n(6) / 255 : 1
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Ke(e, t) {
|
|
1252
1252
|
let n = /^(-?(?:\d+\.?\d*|\.\d+))(%?)$/.exec(e);
|
|
1253
1253
|
if (!n) return;
|
|
1254
1254
|
let r = Number(n[1]);
|
|
1255
1255
|
return n[2] ? r / 100 * t : r;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function qe(e) {
|
|
1258
1258
|
let t = e.includes(",") ? e.split(",").map((e) => e.trim()) : e.replace("/", " / ").trim().split(/\s+/).filter((e) => e !== "/");
|
|
1259
1259
|
if (t.length !== 3 && t.length !== 4) return;
|
|
1260
|
-
let [n, r, i] = t.slice(0, 3).map((e) =>
|
|
1260
|
+
let [n, r, i] = t.slice(0, 3).map((e) => Ke(e, 255)), a = t.length === 4 ? Ke(t[3], 1) : 1;
|
|
1261
1261
|
if (![
|
|
1262
1262
|
n,
|
|
1263
1263
|
r,
|
|
1264
1264
|
i,
|
|
1265
1265
|
a
|
|
1266
1266
|
].some((e) => e === void 0 || Number.isNaN(e))) return {
|
|
1267
|
-
r:
|
|
1268
|
-
g:
|
|
1269
|
-
b:
|
|
1270
|
-
a:
|
|
1267
|
+
r: R(n, 0, 255),
|
|
1268
|
+
g: R(r, 0, 255),
|
|
1269
|
+
b: R(i, 0, 255),
|
|
1270
|
+
a: R(a, 0, 1)
|
|
1271
1271
|
};
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function z(e, t = ",") {
|
|
1274
1274
|
let n = [], r = 0, i = 0;
|
|
1275
1275
|
for (let a = 0; a < e.length; a++) {
|
|
1276
1276
|
let o = e[a];
|
|
@@ -1278,28 +1278,28 @@ function Xe(e, t = ",") {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return n.push(e.slice(i).trim()), n;
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1282
|
-
let t = /^(.+?)\s+(-?[\d.]+)%$/s.exec(e), n = /^(-?[\d.]+)%\s+(.+)$/s.exec(e), [r, i] = t ? [t[1], t[2]] : n ? [n[2], n[1]] : [e, void 0], a =
|
|
1281
|
+
function Je(e) {
|
|
1282
|
+
let t = /^(.+?)\s+(-?[\d.]+)%$/s.exec(e), n = /^(-?[\d.]+)%\s+(.+)$/s.exec(e), [r, i] = t ? [t[1], t[2]] : n ? [n[2], n[1]] : [e, void 0], a = B(r);
|
|
1283
1283
|
if (a) return {
|
|
1284
1284
|
color: a,
|
|
1285
1285
|
pct: i === void 0 ? void 0 : Number(i)
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function B(e) {
|
|
1289
1289
|
let t = e.trim().toLowerCase();
|
|
1290
|
-
if (t.startsWith("#")) return
|
|
1291
|
-
if (t in
|
|
1290
|
+
if (t.startsWith("#")) return Ge(t.slice(1));
|
|
1291
|
+
if (t in We) return Ge(We[t].slice(1));
|
|
1292
1292
|
let n = /^([a-z-]+)\((.*)\)$/s.exec(t);
|
|
1293
1293
|
if (!n) return;
|
|
1294
1294
|
let [, r, i] = n;
|
|
1295
|
-
if (r === "rgb" || r === "rgba") return
|
|
1295
|
+
if (r === "rgb" || r === "rgba") return qe(i);
|
|
1296
1296
|
if (r !== "color-mix") return;
|
|
1297
|
-
let [a, o, s] =
|
|
1297
|
+
let [a, o, s] = z(i);
|
|
1298
1298
|
if (a !== "in srgb" || o === void 0 || s === void 0) return;
|
|
1299
|
-
let c =
|
|
1300
|
-
if (c && l) return
|
|
1299
|
+
let c = Je(o), l = Je(s);
|
|
1300
|
+
if (c && l) return Ye(c.color, l.color, c.pct, l.pct);
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Ye(e, t, n, r) {
|
|
1303
1303
|
if ([n, r].some((e) => e !== void 0 && (e < 0 || e > 100))) return;
|
|
1304
1304
|
let i = n ?? (r === void 0 ? 50 : 100 - r), a = r ?? 100 - i, o = i + a;
|
|
1305
1305
|
if (o === 0) return;
|
|
@@ -1313,44 +1313,44 @@ function Qe(e, t, n, r) {
|
|
|
1313
1313
|
a: c * s
|
|
1314
1314
|
};
|
|
1315
1315
|
}
|
|
1316
|
-
var
|
|
1317
|
-
function
|
|
1316
|
+
var Xe = 1e3, Ze = (e) => e.toString(16).padStart(2, "0");
|
|
1317
|
+
function V({ r: e, g: t, b: n, a: r }) {
|
|
1318
1318
|
let [i, a, o] = [
|
|
1319
1319
|
e,
|
|
1320
1320
|
t,
|
|
1321
1321
|
n
|
|
1322
|
-
].map((e) =>
|
|
1323
|
-
return s === 1 ? `#${
|
|
1322
|
+
].map((e) => R(Math.round(e), 0, 255)), s = Math.round(R(r, 0, 1) * Xe) / Xe;
|
|
1323
|
+
return s === 1 ? `#${Ze(i)}${Ze(a)}${Ze(o)}` : `rgba(${i}, ${a}, ${o}, ${s})`;
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
let i =
|
|
1327
|
-
return o &&
|
|
1325
|
+
function Qe(e, t, n, r) {
|
|
1326
|
+
let i = B(e), a = B(t), o = i && a ? Ye(i, a, n, r) : void 0;
|
|
1327
|
+
return o && V(o);
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
let t =
|
|
1331
|
-
return t &&
|
|
1329
|
+
function $e(e) {
|
|
1330
|
+
let t = B(e);
|
|
1331
|
+
return t && V(t);
|
|
1332
1332
|
}
|
|
1333
1333
|
//#endregion
|
|
1334
1334
|
//#region src/tokens/values.ts
|
|
1335
|
-
function
|
|
1335
|
+
function et(e, t) {
|
|
1336
1336
|
let n = 0;
|
|
1337
1337
|
for (let r = t; r < e.length; r++) if (e[r] === "(") n++;
|
|
1338
1338
|
else if (e[r] === ")" && --n === 0) return r;
|
|
1339
1339
|
return -1;
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function tt(e, t) {
|
|
1342
1342
|
let n = "", r = 0;
|
|
1343
1343
|
for (;;) {
|
|
1344
1344
|
let i = e.indexOf("var(", r);
|
|
1345
1345
|
if (i < 0) return n + e.slice(r);
|
|
1346
|
-
let a =
|
|
1346
|
+
let a = et(e, i + 3);
|
|
1347
1347
|
if (a < 0) return;
|
|
1348
|
-
let [o, ...s] =
|
|
1348
|
+
let [o, ...s] = z(e.slice(i + 4, a)), c = s.length ? s.join(",") : void 0, l = (o.startsWith("--") ? t(o.slice(2)) : void 0) ?? (c === void 0 ? void 0 : tt(c, t));
|
|
1349
1349
|
if (l === void 0) return;
|
|
1350
1350
|
n += e.slice(r, i) + l, r = a + 1;
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
|
-
var
|
|
1353
|
+
var nt = class {
|
|
1354
1354
|
constructor(e, t) {
|
|
1355
1355
|
this.text = e, this.context = t, this.i = 0;
|
|
1356
1356
|
}
|
|
@@ -1453,7 +1453,7 @@ var at = class {
|
|
|
1453
1453
|
length: !1
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
|
-
},
|
|
1456
|
+
}, rt = (e, t) => new nt(e.trim(), t).parse(), H = (e) => Math.round(e * 1e4) / 1e4, it = () => ({
|
|
1457
1457
|
css: "none",
|
|
1458
1458
|
layers: [],
|
|
1459
1459
|
color: "#000000",
|
|
@@ -1464,18 +1464,18 @@ var at = class {
|
|
|
1464
1464
|
opacity: 0,
|
|
1465
1465
|
radius: 0,
|
|
1466
1466
|
elevation: 0
|
|
1467
|
-
}),
|
|
1468
|
-
function
|
|
1469
|
-
if (e.trim() === "none") return
|
|
1467
|
+
}), U = (e) => `${H(e)}px`;
|
|
1468
|
+
function at(e, t) {
|
|
1469
|
+
if (e.trim() === "none") return it();
|
|
1470
1470
|
let n = [];
|
|
1471
|
-
for (let r of
|
|
1472
|
-
let e =
|
|
1471
|
+
for (let r of z(e)) {
|
|
1472
|
+
let e = z(r.replace(/\s+/g, " "), " "), i = e.includes("inset"), a = [], o = [];
|
|
1473
1473
|
for (let n of e) {
|
|
1474
1474
|
if (n === "inset") continue;
|
|
1475
|
-
let e = o.length ? void 0 :
|
|
1475
|
+
let e = o.length ? void 0 : rt(n, t);
|
|
1476
1476
|
e === void 0 ? o.push(n) : a.push(e);
|
|
1477
1477
|
}
|
|
1478
|
-
let s =
|
|
1478
|
+
let s = B(o.length ? o.join(" ") : "black");
|
|
1479
1479
|
if (a.length < 2 || a.length > 4 || !s) return;
|
|
1480
1480
|
let [c, l, u = 0, d = 0] = a;
|
|
1481
1481
|
n.push({
|
|
@@ -1483,22 +1483,22 @@ function ct(e, t) {
|
|
|
1483
1483
|
y: l,
|
|
1484
1484
|
blur: u,
|
|
1485
1485
|
spread: d,
|
|
1486
|
-
color:
|
|
1486
|
+
color: V(s),
|
|
1487
1487
|
inset: i
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
1490
|
let r = n.map((e) => [
|
|
1491
1491
|
...e.inset ? ["inset"] : [],
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
...e.spread ? [
|
|
1492
|
+
U(e.x),
|
|
1493
|
+
U(e.y),
|
|
1494
|
+
U(e.blur),
|
|
1495
|
+
...e.spread ? [U(e.spread)] : [],
|
|
1496
1496
|
e.color
|
|
1497
|
-
].join(" ")).join(", "), i = n[0], a =
|
|
1497
|
+
].join(" ")).join(", "), i = n[0], a = B(i.color);
|
|
1498
1498
|
return {
|
|
1499
1499
|
css: r,
|
|
1500
1500
|
layers: n,
|
|
1501
|
-
color:
|
|
1501
|
+
color: V({
|
|
1502
1502
|
...a,
|
|
1503
1503
|
a: 1
|
|
1504
1504
|
}),
|
|
@@ -1506,12 +1506,12 @@ function ct(e, t) {
|
|
|
1506
1506
|
width: i.x,
|
|
1507
1507
|
height: i.y
|
|
1508
1508
|
},
|
|
1509
|
-
opacity:
|
|
1510
|
-
radius:
|
|
1509
|
+
opacity: H(a.a),
|
|
1510
|
+
radius: H(i.blur / 2),
|
|
1511
1511
|
elevation: Math.round(i.blur / 2)
|
|
1512
1512
|
};
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1514
|
+
function ot(e) {
|
|
1515
1515
|
let t = /^(\d*\.?\d+)(ms|s)(?:\s+(.+))?$/.exec(e.trim());
|
|
1516
1516
|
if (!t) return;
|
|
1517
1517
|
let n = Number(t[1]) * (t[2] === "s" ? 1e3 : 1);
|
|
@@ -1521,7 +1521,7 @@ function lt(e) {
|
|
|
1521
1521
|
easing: t[3] ?? "ease"
|
|
1522
1522
|
};
|
|
1523
1523
|
}
|
|
1524
|
-
var
|
|
1524
|
+
var st = {
|
|
1525
1525
|
linear: [
|
|
1526
1526
|
0,
|
|
1527
1527
|
0,
|
|
@@ -1553,15 +1553,15 @@ var ut = {
|
|
|
1553
1553
|
1
|
|
1554
1554
|
]
|
|
1555
1555
|
};
|
|
1556
|
-
function
|
|
1556
|
+
function ct(e) {
|
|
1557
1557
|
let t = e.trim();
|
|
1558
|
-
if (t in
|
|
1558
|
+
if (t in st) return [...st[t]];
|
|
1559
1559
|
let n = /^cubic-bezier\((.*)\)$/.exec(t)?.[1].split(",").map(Number);
|
|
1560
1560
|
return n?.length === 4 && n.every(Number.isFinite) ? n : void 0;
|
|
1561
1561
|
}
|
|
1562
1562
|
//#endregion
|
|
1563
1563
|
//#region src/tokens/resolve.ts
|
|
1564
|
-
var
|
|
1564
|
+
var lt = [
|
|
1565
1565
|
[
|
|
1566
1566
|
/^space-/,
|
|
1567
1567
|
"length",
|
|
@@ -1640,39 +1640,39 @@ var ft = [
|
|
|
1640
1640
|
"sizes",
|
|
1641
1641
|
""
|
|
1642
1642
|
]
|
|
1643
|
-
],
|
|
1643
|
+
], ut = [
|
|
1644
1644
|
/./,
|
|
1645
1645
|
"color",
|
|
1646
1646
|
"colors",
|
|
1647
1647
|
""
|
|
1648
|
-
],
|
|
1649
|
-
function
|
|
1650
|
-
let a =
|
|
1651
|
-
for (let [t, n] of Object.entries(e)) n !== void 0 && s.set(t, /* @__PURE__ */
|
|
1648
|
+
], dt = (e) => lt.find(([t]) => t.test(e)) ?? ut, ft = (e) => dt(e)[1];
|
|
1649
|
+
function pt({ mode: e = "light", palette: t, design: n, overrides: r = {}, reducedMotion: i = !1 } = {}) {
|
|
1650
|
+
let a = x(n), o = t === void 0 ? ie(a.preset) : t, s = /* @__PURE__ */ new Map(), c = (e) => {
|
|
1651
|
+
for (let [t, n] of Object.entries(e)) n !== void 0 && s.set(t, /* @__PURE__ */ A(n));
|
|
1652
1652
|
};
|
|
1653
|
-
return c(Me), c(
|
|
1653
|
+
return c(Me), c(L), o ? c(I[o][e]) : e === "dark" && c(F), c(me[a.density]), c(he[a.radius]), a.shadow !== "standard" && c(_e[a.shadow]), c(Te[a.fontScale]), i && c(He), c(r), {
|
|
1654
1654
|
values: s,
|
|
1655
1655
|
palette: o,
|
|
1656
1656
|
design: a
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
|
-
var
|
|
1660
|
-
function
|
|
1659
|
+
var mt = (e) => `${H(e)}px`;
|
|
1660
|
+
function ht(e, t, n) {
|
|
1661
1661
|
switch (e) {
|
|
1662
1662
|
case "color": {
|
|
1663
|
-
let e =
|
|
1663
|
+
let e = B(t);
|
|
1664
1664
|
if (!e) return;
|
|
1665
|
-
let n =
|
|
1665
|
+
let n = V(e);
|
|
1666
1666
|
return {
|
|
1667
1667
|
value: n,
|
|
1668
1668
|
css: n
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
1671
|
case "length": {
|
|
1672
|
-
let e =
|
|
1672
|
+
let e = rt(t, n);
|
|
1673
1673
|
return e === void 0 ? void 0 : {
|
|
1674
|
-
value:
|
|
1675
|
-
css:
|
|
1674
|
+
value: H(e),
|
|
1675
|
+
css: mt(e)
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
1678
|
case "number": {
|
|
@@ -1690,21 +1690,21 @@ function vt(e, t, n) {
|
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
1692
|
case "shadow": {
|
|
1693
|
-
let e =
|
|
1693
|
+
let e = at(t, n);
|
|
1694
1694
|
return e && {
|
|
1695
1695
|
value: e,
|
|
1696
1696
|
css: e.css
|
|
1697
1697
|
};
|
|
1698
1698
|
}
|
|
1699
1699
|
case "transition": {
|
|
1700
|
-
let e =
|
|
1700
|
+
let e = ot(t);
|
|
1701
1701
|
return e && {
|
|
1702
1702
|
value: e,
|
|
1703
1703
|
css: e.css
|
|
1704
1704
|
};
|
|
1705
1705
|
}
|
|
1706
1706
|
case "easing": {
|
|
1707
|
-
let e =
|
|
1707
|
+
let e = ct(t);
|
|
1708
1708
|
return e && {
|
|
1709
1709
|
value: e,
|
|
1710
1710
|
css: t.trim()
|
|
@@ -1712,17 +1712,17 @@ function vt(e, t, n) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function W(e = {}) {
|
|
1716
1716
|
let { mode: t = "light" } = e, n = {
|
|
1717
1717
|
rootFontSize: e.rootFontSize ?? 16,
|
|
1718
1718
|
viewportWidth: e.viewportWidth ?? 375,
|
|
1719
1719
|
viewportHeight: e.viewportHeight ?? 667
|
|
1720
|
-
}, { values: r, palette: i, design: a } =
|
|
1720
|
+
}, { values: r, palette: i, design: a } = pt(e), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), c = (e) => {
|
|
1721
1721
|
if (o.has(e)) return o.get(e);
|
|
1722
1722
|
let t = r.get(e);
|
|
1723
1723
|
if (t === void 0 || s.has(e)) return;
|
|
1724
1724
|
s.add(e);
|
|
1725
|
-
let n =
|
|
1725
|
+
let n = tt(t, c);
|
|
1726
1726
|
return s.delete(e), o.set(e, n), n;
|
|
1727
1727
|
}, l = {
|
|
1728
1728
|
mode: t,
|
|
@@ -1746,7 +1746,7 @@ function V(e = {}) {
|
|
|
1746
1746
|
unresolved: []
|
|
1747
1747
|
};
|
|
1748
1748
|
for (let e of r.keys()) {
|
|
1749
|
-
let t = c(e), [, r, i, a] =
|
|
1749
|
+
let t = c(e), [, r, i, a] = dt(e), o = t === void 0 ? void 0 : ht(r, t, n);
|
|
1750
1750
|
if (o === void 0) {
|
|
1751
1751
|
l.unresolved.push(e);
|
|
1752
1752
|
continue;
|
|
@@ -1757,12 +1757,12 @@ function V(e = {}) {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
//#endregion
|
|
1759
1759
|
//#region src/tokens/css.ts
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1760
|
+
var G = (e, t = (e) => e) => Object.entries(e).map(([e, n]) => [`--${e}`, t(/* @__PURE__ */ A(n))]);
|
|
1761
|
+
function gt(e, t = 0) {
|
|
1762
1762
|
let n = " ".repeat(t);
|
|
1763
1763
|
return e.map(({ selectors: e, declarations: t }) => `${n}${e.join(`,\n${n}`)} {\n${t.map(([e, t]) => `${n} ${e}: ${t};`).join("\n")}\n${n}}`);
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var _t = (e, t) => `@media ${e} {\n${gt(t, 1).join("\n\n")}\n}`, K = (e, t) => t === void 0 ? `[${e}]` : `[${e}=${t}]`, vt = (e) => e.replace(/'/g, "\""), yt = [":root", "[data-minerva-theme-scope]"], bt = () => ({
|
|
1766
1766
|
selectors: [".minerva-sr-only"],
|
|
1767
1767
|
declarations: [
|
|
1768
1768
|
["position", "absolute"],
|
|
@@ -1776,138 +1776,138 @@ var bt = (e, t) => `@media ${e} {\n${yt(t, 1).join("\n\n")}\n}`, U = (e, t) => t
|
|
|
1776
1776
|
["border", "0"]
|
|
1777
1777
|
].map(([e, t]) => [e, `${t} !important`])
|
|
1778
1778
|
});
|
|
1779
|
-
function
|
|
1780
|
-
let e =
|
|
1779
|
+
function xt() {
|
|
1780
|
+
let e = K.bind(null, "data-theme");
|
|
1781
1781
|
return u.flatMap((t) => {
|
|
1782
|
-
let n =
|
|
1782
|
+
let n = K("data-palette", t);
|
|
1783
1783
|
return [{
|
|
1784
1784
|
selectors: [`${n}${e("light")}`, `${n}:not(${e("dark")})`],
|
|
1785
|
-
declarations:
|
|
1785
|
+
declarations: G(I[t].light, vt)
|
|
1786
1786
|
}, {
|
|
1787
1787
|
selectors: [`${n}${e("dark")}`],
|
|
1788
|
-
declarations:
|
|
1788
|
+
declarations: G(I[t].dark, vt)
|
|
1789
1789
|
}];
|
|
1790
1790
|
});
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function St() {
|
|
1793
1793
|
return [
|
|
1794
|
-
["density",
|
|
1795
|
-
["radius",
|
|
1794
|
+
["density", me],
|
|
1795
|
+
["radius", he],
|
|
1796
1796
|
["shadow", _e],
|
|
1797
|
-
["fontScale",
|
|
1797
|
+
["fontScale", Te]
|
|
1798
1798
|
].flatMap(([e, t]) => {
|
|
1799
|
-
let n =
|
|
1799
|
+
let n = S[e];
|
|
1800
1800
|
return Object.entries(t).map(([e, t]) => ({
|
|
1801
|
-
selectors: [`${
|
|
1802
|
-
declarations:
|
|
1801
|
+
selectors: [`${K(n, e)}${K(n)}`],
|
|
1802
|
+
declarations: G(t)
|
|
1803
1803
|
}));
|
|
1804
1804
|
});
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function Ct({ layer: e = "minerva" } = {}) {
|
|
1807
1807
|
let t = [
|
|
1808
1808
|
{
|
|
1809
|
-
selectors:
|
|
1810
|
-
declarations:
|
|
1809
|
+
selectors: yt,
|
|
1810
|
+
declarations: G(Me)
|
|
1811
1811
|
},
|
|
1812
1812
|
{
|
|
1813
1813
|
selectors: [":root"],
|
|
1814
|
-
declarations:
|
|
1814
|
+
declarations: G(L)
|
|
1815
1815
|
},
|
|
1816
|
-
|
|
1817
|
-
...
|
|
1816
|
+
bt(),
|
|
1817
|
+
...xt(),
|
|
1818
1818
|
{
|
|
1819
|
-
selectors: [`${
|
|
1820
|
-
declarations:
|
|
1819
|
+
selectors: [`${K("data-theme", "dark")}:not(${K("data-palette")})`],
|
|
1820
|
+
declarations: G(F)
|
|
1821
1821
|
},
|
|
1822
|
-
...
|
|
1822
|
+
...St()
|
|
1823
1823
|
], n = (e) => [{
|
|
1824
1824
|
selectors: [":root"],
|
|
1825
|
-
declarations:
|
|
1826
|
-
}], r = [
|
|
1825
|
+
declarations: G(e)
|
|
1826
|
+
}], r = [_t("(prefers-reduced-motion: reduce)", n(He)), _t("(forced-colors: active)", n(Ue))].join("\n"), i = [...gt(t), r].join("\n\n");
|
|
1827
1827
|
return e ? `@layer ${e} {\n${i}\n}\n` : `${i}\n`;
|
|
1828
1828
|
}
|
|
1829
1829
|
//#endregion
|
|
1830
1830
|
//#region src/tokens/mini.ts
|
|
1831
|
-
var
|
|
1831
|
+
var wt = "mn-", Tt = "page, .mn-root", Et = [
|
|
1832
1832
|
"sm",
|
|
1833
1833
|
"md",
|
|
1834
1834
|
"lg",
|
|
1835
1835
|
"xl"
|
|
1836
|
-
],
|
|
1836
|
+
], q = (...e) => `mn-${e.join("-")}`, J = (e, t) => t ? q("palette", t, ...e === "dark" ? ["dark"] : []) : e === "dark" ? q("theme", "dark") : null, Dt = (e, t) => q(e === "fontScale" ? "font-scale" : e, t), Ot = {
|
|
1837
1837
|
density: "standard",
|
|
1838
1838
|
radius: "medium",
|
|
1839
1839
|
shadow: "standard",
|
|
1840
1840
|
fontScale: "standard"
|
|
1841
1841
|
};
|
|
1842
|
-
function
|
|
1843
|
-
let r =
|
|
1842
|
+
function kt({ mode: e = "light", palette: t, design: n } = {}) {
|
|
1843
|
+
let r = x(n), i = t === void 0 ? W({ design: r }).palette : t, a = [q("root")], o = J(e, i);
|
|
1844
1844
|
o && a.push(o);
|
|
1845
|
-
for (let e of Object.keys(
|
|
1845
|
+
for (let e of Object.keys(Ot)) r[e] !== Ot[e] && a.push(Dt(e, r[e]));
|
|
1846
1846
|
return a.join(" ");
|
|
1847
1847
|
}
|
|
1848
|
-
var
|
|
1849
|
-
function
|
|
1850
|
-
let n =
|
|
1848
|
+
var At = (e, t) => `mn-shadow-${e}-${t}`;
|
|
1849
|
+
function jt(e, t) {
|
|
1850
|
+
let n = W({
|
|
1851
1851
|
mode: e,
|
|
1852
1852
|
palette: t
|
|
1853
|
-
}), r =
|
|
1853
|
+
}), r = W({
|
|
1854
1854
|
mode: e,
|
|
1855
1855
|
palette: t,
|
|
1856
1856
|
design: { shadow: "subtle" }
|
|
1857
1857
|
}), i = /* @__PURE__ */ new Map();
|
|
1858
|
-
for (let [e, t] of Object.entries(n.css)) (
|
|
1859
|
-
for (let e of
|
|
1858
|
+
for (let [e, t] of Object.entries(n.css)) (ft(e) === "color" || e.startsWith("font-family-")) && i.set(e, t);
|
|
1859
|
+
for (let e of Et) i.set(At("standard", e), n.css[`shadow-${e}`]), i.set(At("subtle", e), r.css[`shadow-${e}`]);
|
|
1860
1860
|
return i;
|
|
1861
1861
|
}
|
|
1862
|
-
var
|
|
1863
|
-
function
|
|
1864
|
-
let t =
|
|
1865
|
-
return typeof t == "object" && t.kind === "ref" && t.name.startsWith("shadow-") ? /* @__PURE__ */
|
|
1862
|
+
var Mt = (e) => [...e].map(([e, t]) => [`--${e}`, t]), Nt = (e, t) => [...e].filter(([e, n]) => t.get(e) !== n), Pt = "/* Minerva design tokens for mini-programs (generated) */", Ft = (e) => `${Pt}\n${gt(e).join("\n\n")}\n`;
|
|
1863
|
+
function It(e) {
|
|
1864
|
+
let t = L[e];
|
|
1865
|
+
return typeof t == "object" && t.kind === "ref" && t.name.startsWith("shadow-") ? /* @__PURE__ */ A(t) : void 0;
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1868
|
-
let e =
|
|
1869
|
-
for (let [t, r] of Object.entries(e.css)) /^shadow-(sm|md|lg|xl)$/.test(t) ? n.set(t, `var(--${
|
|
1867
|
+
function Lt() {
|
|
1868
|
+
let e = W(), t = jt("light", null), n = /* @__PURE__ */ new Map();
|
|
1869
|
+
for (let [t, r] of Object.entries(e.css)) /^shadow-(sm|md|lg|xl)$/.test(t) ? n.set(t, `var(--${At("standard", t.slice(7))})`) : It(t) ? n.set(t, It(t)) : n.set(t, r);
|
|
1870
1870
|
for (let [e, r] of t) n.set(e, r);
|
|
1871
1871
|
let r = (e, t, n) => t.map((t) => ({
|
|
1872
|
-
selectors: [`.${
|
|
1873
|
-
declarations:
|
|
1872
|
+
selectors: [`.${Dt(e, t)}`],
|
|
1873
|
+
declarations: Mt(n(t))
|
|
1874
1874
|
})), i = (e, t) => {
|
|
1875
|
-
let { css: n } =
|
|
1875
|
+
let { css: n } = W({ design: t });
|
|
1876
1876
|
return new Map(Object.keys(e).map((e) => [e, n[e]]));
|
|
1877
1877
|
};
|
|
1878
1878
|
return [
|
|
1879
1879
|
{
|
|
1880
|
-
selectors: [
|
|
1881
|
-
declarations:
|
|
1880
|
+
selectors: [Tt],
|
|
1881
|
+
declarations: Mt(n)
|
|
1882
1882
|
},
|
|
1883
1883
|
{
|
|
1884
|
-
selectors: [`.${
|
|
1885
|
-
declarations: Nt(
|
|
1884
|
+
selectors: [`.${J("dark", null)}`],
|
|
1885
|
+
declarations: Mt(Nt(jt("dark", null), t))
|
|
1886
1886
|
},
|
|
1887
|
-
...r("density", p, (e) => i(
|
|
1888
|
-
...r("radius", m, (e) => i(
|
|
1889
|
-
...r("shadow", h, (e) => new Map(
|
|
1890
|
-
...r("fontScale", g, (e) => i(
|
|
1887
|
+
...r("density", p, (e) => i(me[e], { density: e })),
|
|
1888
|
+
...r("radius", m, (e) => i(he[e], { radius: e })),
|
|
1889
|
+
...r("shadow", h, (e) => new Map(Et.map((t) => [`shadow-${t}`, e === "none" ? "none" : `var(--${At(e, t)})`]))),
|
|
1890
|
+
...r("fontScale", g, (e) => i(Te[e], { fontScale: e }))
|
|
1891
1891
|
];
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1894
|
-
let t =
|
|
1893
|
+
function Rt(e) {
|
|
1894
|
+
let t = jt("light", null);
|
|
1895
1895
|
return ["light", "dark"].map((n) => ({
|
|
1896
|
-
selectors: [`.${
|
|
1897
|
-
declarations: Nt(
|
|
1896
|
+
selectors: [`.${J(n, e)}`],
|
|
1897
|
+
declarations: Mt(Nt(jt(n, e), t))
|
|
1898
1898
|
}));
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1901
|
-
return
|
|
1900
|
+
function zt({ palettes: e = u } = {}) {
|
|
1901
|
+
return Ft([...Lt(), ...e.flatMap(Rt)]);
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function Bt() {
|
|
1904
1904
|
return {
|
|
1905
|
-
"tokens.mini.css":
|
|
1906
|
-
"tokens.mini.base.css":
|
|
1907
|
-
...Object.fromEntries(u.map((e) => [`tokens.mini.palette-${e}.css`,
|
|
1905
|
+
"tokens.mini.css": zt(),
|
|
1906
|
+
"tokens.mini.base.css": zt({ palettes: [] }),
|
|
1907
|
+
...Object.fromEntries(u.map((e) => [`tokens.mini.palette-${e}.css`, Ft(Rt(e))]))
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
var
|
|
1910
|
+
var Vt = {
|
|
1911
1911
|
avatar: {
|
|
1912
1912
|
default: "avatar",
|
|
1913
1913
|
group: "Avatar group",
|
|
@@ -1967,7 +1967,7 @@ var Ht = {
|
|
|
1967
1967
|
hidePassword: "Hide password"
|
|
1968
1968
|
},
|
|
1969
1969
|
iconButton: { default: "icon button" }
|
|
1970
|
-
},
|
|
1970
|
+
}, Ht = {
|
|
1971
1971
|
table: {
|
|
1972
1972
|
empty: "No data",
|
|
1973
1973
|
retry: "Retry",
|
|
@@ -1982,7 +1982,7 @@ var Ht = {
|
|
|
1982
1982
|
retryLabel: "Retry editor",
|
|
1983
1983
|
loading: "Loading editor"
|
|
1984
1984
|
}
|
|
1985
|
-
},
|
|
1985
|
+
}, Ut = {
|
|
1986
1986
|
loadingState: { label: "Loading..." },
|
|
1987
1987
|
codeBlock: {
|
|
1988
1988
|
label: "Code",
|
|
@@ -1990,7 +1990,7 @@ var Ht = {
|
|
|
1990
1990
|
copied: "Copied",
|
|
1991
1991
|
copyFailed: "Copy failed"
|
|
1992
1992
|
}
|
|
1993
|
-
},
|
|
1993
|
+
}, Wt = {
|
|
1994
1994
|
toast: {
|
|
1995
1995
|
region: "Notifications",
|
|
1996
1996
|
close: "Close",
|
|
@@ -2001,7 +2001,7 @@ var Ht = {
|
|
|
2001
2001
|
scrollRight: "Scroll pages right",
|
|
2002
2002
|
close: "Close {{label}}"
|
|
2003
2003
|
}
|
|
2004
|
-
},
|
|
2004
|
+
}, Gt = {
|
|
2005
2005
|
numberInput: {
|
|
2006
2006
|
increment: "Increase",
|
|
2007
2007
|
decrement: "Decrease",
|
|
@@ -2041,7 +2041,7 @@ var Ht = {
|
|
|
2041
2041
|
patternMismatch: "Please match the requested format.",
|
|
2042
2042
|
emailMismatch: "Please enter a valid email address."
|
|
2043
2043
|
}
|
|
2044
|
-
},
|
|
2044
|
+
}, Kt = {
|
|
2045
2045
|
steps: { label: "Steps" },
|
|
2046
2046
|
upload: {
|
|
2047
2047
|
select: "Select files",
|
|
@@ -2054,25 +2054,33 @@ var Ht = {
|
|
|
2054
2054
|
retry: "Retry {{name}}",
|
|
2055
2055
|
remove: "Remove {{name}}"
|
|
2056
2056
|
}
|
|
2057
|
-
},
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2057
|
+
}, qt = {
|
|
2058
|
+
monthCalendar: {
|
|
2059
|
+
label: "Month calendar",
|
|
2060
|
+
previousMonth: "Previous month",
|
|
2061
|
+
nextMonth: "Next month",
|
|
2062
|
+
today: "Today",
|
|
2063
|
+
weekdays: {
|
|
2064
|
+
mon: "Mon",
|
|
2065
|
+
tue: "Tue",
|
|
2066
|
+
wed: "Wed",
|
|
2067
|
+
thu: "Thu",
|
|
2068
|
+
fri: "Fri",
|
|
2069
|
+
sat: "Sat",
|
|
2070
|
+
sun: "Sun"
|
|
2071
|
+
},
|
|
2072
|
+
dayWithEvents_one: "{{date}}, {{count}} event",
|
|
2073
|
+
dayWithEvents_other: "{{date}}, {{count}} events",
|
|
2074
|
+
eventsLabel: "Events on {{date}}",
|
|
2075
|
+
noEvents: "No events"
|
|
2070
2076
|
},
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2077
|
+
datePicker: {
|
|
2078
|
+
placeholder: "Select date",
|
|
2079
|
+
label: "Date",
|
|
2080
|
+
clear: "Clear date",
|
|
2081
|
+
today: "Today"
|
|
2082
|
+
}
|
|
2083
|
+
}, Jt = { appShell: {
|
|
2076
2084
|
navigation: "Navigation",
|
|
2077
2085
|
expand: "Expand sidebar",
|
|
2078
2086
|
collapse: "Collapse sidebar",
|
|
@@ -2081,7 +2089,7 @@ var Ht = {
|
|
|
2081
2089
|
openNavigation: "Open navigation",
|
|
2082
2090
|
closeNavigation: "Close navigation",
|
|
2083
2091
|
skipToContent: "Skip to content"
|
|
2084
|
-
} },
|
|
2092
|
+
} }, Yt = {
|
|
2085
2093
|
actionSheet: { cancel: "Cancel" },
|
|
2086
2094
|
picker: {
|
|
2087
2095
|
confirm: "Confirm",
|
|
@@ -2154,7 +2162,7 @@ var Ht = {
|
|
|
2154
2162
|
compact: "Compact",
|
|
2155
2163
|
touch: "Touch"
|
|
2156
2164
|
}
|
|
2157
|
-
},
|
|
2165
|
+
}, Xt = {
|
|
2158
2166
|
modal: { close: "Close" },
|
|
2159
2167
|
drawer: {
|
|
2160
2168
|
close: "Close",
|
|
@@ -2173,7 +2181,7 @@ var Ht = {
|
|
|
2173
2181
|
results: "Command results",
|
|
2174
2182
|
enter: "Enter"
|
|
2175
2183
|
}
|
|
2176
|
-
},
|
|
2184
|
+
}, Zt = {
|
|
2177
2185
|
themeToggle: {
|
|
2178
2186
|
label: "Current theme {{theme}}",
|
|
2179
2187
|
light: "Light",
|
|
@@ -2188,18 +2196,18 @@ var Ht = {
|
|
|
2188
2196
|
graphite: "Graphite",
|
|
2189
2197
|
cool: "Cool"
|
|
2190
2198
|
}
|
|
2191
|
-
},
|
|
2192
|
-
function
|
|
2199
|
+
}, Qt = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
2200
|
+
function Y(e, ...t) {
|
|
2193
2201
|
let n = { ...e };
|
|
2194
2202
|
for (let e of t) for (let [t, r] of Object.entries(e)) {
|
|
2195
2203
|
let e = n[t];
|
|
2196
|
-
n[t] =
|
|
2204
|
+
n[t] = Qt(e) && Qt(r) ? Y(e, r) : r;
|
|
2197
2205
|
}
|
|
2198
2206
|
return n;
|
|
2199
2207
|
}
|
|
2200
2208
|
//#endregion
|
|
2201
2209
|
//#region src/i18n/locales/en/index.ts
|
|
2202
|
-
var
|
|
2210
|
+
var $t = /* @__PURE__ */ Y(Vt, Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt), en = /* @__PURE__ */ Y({
|
|
2203
2211
|
avatar: {
|
|
2204
2212
|
default: "avatar",
|
|
2205
2213
|
group: "Groupe d'avatars",
|
|
@@ -2346,25 +2354,33 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
2346
2354
|
retry: "Réessayer {{name}}",
|
|
2347
2355
|
remove: "Retirer {{name}}"
|
|
2348
2356
|
}
|
|
2349
|
-
}, {
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2357
|
+
}, {
|
|
2358
|
+
monthCalendar: {
|
|
2359
|
+
label: "Calendrier mensuel",
|
|
2360
|
+
previousMonth: "Mois précédent",
|
|
2361
|
+
nextMonth: "Mois suivant",
|
|
2362
|
+
today: "Aujourd’hui",
|
|
2363
|
+
weekdays: {
|
|
2364
|
+
mon: "lun.",
|
|
2365
|
+
tue: "mar.",
|
|
2366
|
+
wed: "mer.",
|
|
2367
|
+
thu: "jeu.",
|
|
2368
|
+
fri: "ven.",
|
|
2369
|
+
sat: "sam.",
|
|
2370
|
+
sun: "dim."
|
|
2371
|
+
},
|
|
2372
|
+
dayWithEvents_one: "{{date}}, {{count}} événement",
|
|
2373
|
+
dayWithEvents_other: "{{date}}, {{count}} événements",
|
|
2374
|
+
eventsLabel: "Événements du {{date}}",
|
|
2375
|
+
noEvents: "Aucun événement"
|
|
2362
2376
|
},
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2377
|
+
datePicker: {
|
|
2378
|
+
placeholder: "Choisir une date",
|
|
2379
|
+
label: "Date",
|
|
2380
|
+
clear: "Effacer la date",
|
|
2381
|
+
today: "Aujourd’hui"
|
|
2382
|
+
}
|
|
2383
|
+
}, { appShell: {
|
|
2368
2384
|
navigation: "Navigation",
|
|
2369
2385
|
expand: "Déplier la barre latérale",
|
|
2370
2386
|
collapse: "Replier la barre latérale",
|
|
@@ -2480,7 +2496,7 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
2480
2496
|
graphite: "Graphite",
|
|
2481
2497
|
cool: "Froid"
|
|
2482
2498
|
}
|
|
2483
|
-
}),
|
|
2499
|
+
}), tn = /* @__PURE__ */ Y({
|
|
2484
2500
|
avatar: {
|
|
2485
2501
|
default: "アバター",
|
|
2486
2502
|
group: "アバターグループ",
|
|
@@ -2627,25 +2643,33 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
2627
2643
|
retry: "{{name}} を再試行",
|
|
2628
2644
|
remove: "{{name}} を削除"
|
|
2629
2645
|
}
|
|
2630
|
-
}, {
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2646
|
+
}, {
|
|
2647
|
+
monthCalendar: {
|
|
2648
|
+
label: "月間カレンダー",
|
|
2649
|
+
previousMonth: "前の月",
|
|
2650
|
+
nextMonth: "次の月",
|
|
2651
|
+
today: "今日",
|
|
2652
|
+
weekdays: {
|
|
2653
|
+
mon: "月",
|
|
2654
|
+
tue: "火",
|
|
2655
|
+
wed: "水",
|
|
2656
|
+
thu: "木",
|
|
2657
|
+
fri: "金",
|
|
2658
|
+
sat: "土",
|
|
2659
|
+
sun: "日"
|
|
2660
|
+
},
|
|
2661
|
+
dayWithEvents_one: "{{date}}、予定 {{count}} 件",
|
|
2662
|
+
dayWithEvents_other: "{{date}}、予定 {{count}} 件",
|
|
2663
|
+
eventsLabel: "{{date}} の予定",
|
|
2664
|
+
noEvents: "予定はありません"
|
|
2643
2665
|
},
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2666
|
+
datePicker: {
|
|
2667
|
+
placeholder: "日付を選択",
|
|
2668
|
+
label: "日付",
|
|
2669
|
+
clear: "日付をクリア",
|
|
2670
|
+
today: "今日"
|
|
2671
|
+
}
|
|
2672
|
+
}, { appShell: {
|
|
2649
2673
|
navigation: "ナビゲーション",
|
|
2650
2674
|
expand: "サイドバーを展開",
|
|
2651
2675
|
collapse: "サイドバーを折りたたむ",
|
|
@@ -2761,7 +2785,7 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
2761
2785
|
graphite: "グラファイト",
|
|
2762
2786
|
cool: "クール"
|
|
2763
2787
|
}
|
|
2764
|
-
}),
|
|
2788
|
+
}), nn = /* @__PURE__ */ Y({
|
|
2765
2789
|
avatar: {
|
|
2766
2790
|
default: "头像",
|
|
2767
2791
|
group: "头像组",
|
|
@@ -2908,25 +2932,33 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
2908
2932
|
retry: "重试 {{name}}",
|
|
2909
2933
|
remove: "移除 {{name}}"
|
|
2910
2934
|
}
|
|
2911
|
-
}, {
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2935
|
+
}, {
|
|
2936
|
+
monthCalendar: {
|
|
2937
|
+
label: "月历",
|
|
2938
|
+
previousMonth: "上个月",
|
|
2939
|
+
nextMonth: "下个月",
|
|
2940
|
+
today: "今天",
|
|
2941
|
+
weekdays: {
|
|
2942
|
+
mon: "一",
|
|
2943
|
+
tue: "二",
|
|
2944
|
+
wed: "三",
|
|
2945
|
+
thu: "四",
|
|
2946
|
+
fri: "五",
|
|
2947
|
+
sat: "六",
|
|
2948
|
+
sun: "日"
|
|
2949
|
+
},
|
|
2950
|
+
dayWithEvents_one: "{{date}},{{count}} 项日程",
|
|
2951
|
+
dayWithEvents_other: "{{date}},{{count}} 项日程",
|
|
2952
|
+
eventsLabel: "{{date}} 日程",
|
|
2953
|
+
noEvents: "暂无日程"
|
|
2924
2954
|
},
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2955
|
+
datePicker: {
|
|
2956
|
+
placeholder: "选择日期",
|
|
2957
|
+
label: "日期",
|
|
2958
|
+
clear: "清除日期",
|
|
2959
|
+
today: "今天"
|
|
2960
|
+
}
|
|
2961
|
+
}, { appShell: {
|
|
2930
2962
|
navigation: "导航",
|
|
2931
2963
|
expand: "展开侧边栏",
|
|
2932
2964
|
collapse: "收起侧边栏",
|
|
@@ -3042,7 +3074,7 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
3042
3074
|
graphite: "石墨灰",
|
|
3043
3075
|
cool: "冷灰蓝"
|
|
3044
3076
|
}
|
|
3045
|
-
}),
|
|
3077
|
+
}), rn = "en", an = (e, t) => Object.prototype.hasOwnProperty.call(e, t), on = () => typeof Intl < "u" && typeof Intl.PluralRules == "function", sn = (e, t) => {
|
|
3046
3078
|
let n = Math.abs(t);
|
|
3047
3079
|
switch (e.toLowerCase().split("-")[0]) {
|
|
3048
3080
|
case "zh":
|
|
@@ -3056,79 +3088,79 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
3056
3088
|
case "pt": return n < 2 ? "one" : Number.isInteger(n) && n % 1e6 == 0 ? "many" : "other";
|
|
3057
3089
|
default: return n === 1 ? "one" : "other";
|
|
3058
3090
|
}
|
|
3059
|
-
},
|
|
3060
|
-
let t =
|
|
3091
|
+
}, cn = /* @__PURE__ */ new Map(), ln = (e) => {
|
|
3092
|
+
let t = cn.get(e);
|
|
3061
3093
|
if (t === void 0) {
|
|
3062
3094
|
try {
|
|
3063
3095
|
t = new Intl.PluralRules(e);
|
|
3064
3096
|
} catch {
|
|
3065
3097
|
t = null;
|
|
3066
3098
|
}
|
|
3067
|
-
|
|
3099
|
+
cn.set(e, t);
|
|
3068
3100
|
}
|
|
3069
3101
|
return t;
|
|
3070
|
-
},
|
|
3102
|
+
}, un = (e, t) => on() ? ln(e)?.select(t) ?? "other" : sn(e, t), dn = (e, t) => {
|
|
3071
3103
|
let n = e;
|
|
3072
3104
|
for (let e of t.split(".")) {
|
|
3073
|
-
if (typeof n != "object" || !
|
|
3105
|
+
if (typeof n != "object" || !an(n, e)) return;
|
|
3074
3106
|
n = n[e];
|
|
3075
3107
|
}
|
|
3076
3108
|
return typeof n == "string" ? n : void 0;
|
|
3077
|
-
},
|
|
3078
|
-
if (
|
|
3109
|
+
}, fn = (e, t) => {
|
|
3110
|
+
if (an(e, t)) return e[t];
|
|
3079
3111
|
let n = e;
|
|
3080
3112
|
for (let e of t.split(".")) {
|
|
3081
|
-
if (typeof n != "object" || !n || !
|
|
3113
|
+
if (typeof n != "object" || !n || !an(n, e)) return;
|
|
3082
3114
|
n = n[e];
|
|
3083
3115
|
}
|
|
3084
3116
|
return n;
|
|
3085
|
-
},
|
|
3086
|
-
let r =
|
|
3117
|
+
}, pn = /\{\{\s*([\w.-]+)\s*\}\}/g, mn = (e, t = {}) => e.replace(pn, (e, n) => {
|
|
3118
|
+
let r = fn(t, n);
|
|
3087
3119
|
return r == null ? e : String(r);
|
|
3088
|
-
}),
|
|
3120
|
+
}), hn = (e, t) => {
|
|
3089
3121
|
let n = [e], r = e.split("-")[0];
|
|
3090
3122
|
return r && n.push(r), n.push(t), [...new Set(n)];
|
|
3091
|
-
},
|
|
3123
|
+
}, gn = ({ messages: e, language: t, fallbackLanguage: n = rn }, r, i = {}) => {
|
|
3092
3124
|
let { count: a, defaultValue: o } = i;
|
|
3093
|
-
for (let o of
|
|
3125
|
+
for (let o of hn(t, n)) {
|
|
3094
3126
|
let t = e[o];
|
|
3095
3127
|
if (!t) continue;
|
|
3096
|
-
let n = (typeof a == "number" ?
|
|
3097
|
-
if (n !== void 0) return
|
|
3128
|
+
let n = (typeof a == "number" ? dn(t, `${r}_${un(o, a)}`) : void 0) ?? dn(t, r);
|
|
3129
|
+
if (n !== void 0) return mn(n, i);
|
|
3098
3130
|
}
|
|
3099
|
-
return o === void 0 ? r :
|
|
3100
|
-
},
|
|
3131
|
+
return o === void 0 ? r : mn(o, i);
|
|
3132
|
+
}, _n = (e) => {
|
|
3101
3133
|
let t = { ...e };
|
|
3102
|
-
return (e, n) =>
|
|
3103
|
-
},
|
|
3134
|
+
return (e, n) => gn(t, e, n);
|
|
3135
|
+
}, vn = [
|
|
3104
3136
|
"en",
|
|
3105
3137
|
"zh",
|
|
3106
3138
|
"ja",
|
|
3107
3139
|
"fr"
|
|
3108
|
-
],
|
|
3109
|
-
en,
|
|
3110
|
-
zh:
|
|
3111
|
-
ja:
|
|
3112
|
-
fr:
|
|
3113
|
-
},
|
|
3140
|
+
], yn = "en", bn = {
|
|
3141
|
+
en: $t,
|
|
3142
|
+
zh: nn,
|
|
3143
|
+
ja: tn,
|
|
3144
|
+
fr: en
|
|
3145
|
+
}, xn = (e) => typeof e == "string" && vn.includes(e), Sn = /(HH|H|hh|h|mm|m|ss|s|a)/g, Cn = (e) => String(e).padStart(2, "0"), wn = (e, t) => {
|
|
3114
3146
|
let n = e.getHours(), r = n % 12 || 12, i = {
|
|
3115
|
-
HH:
|
|
3147
|
+
HH: Cn(n),
|
|
3116
3148
|
H: String(n),
|
|
3117
|
-
hh:
|
|
3149
|
+
hh: Cn(r),
|
|
3118
3150
|
h: String(r),
|
|
3119
|
-
mm:
|
|
3151
|
+
mm: Cn(e.getMinutes()),
|
|
3120
3152
|
m: String(e.getMinutes()),
|
|
3121
|
-
ss:
|
|
3153
|
+
ss: Cn(e.getSeconds()),
|
|
3122
3154
|
s: String(e.getSeconds()),
|
|
3123
3155
|
a: n >= 12 ? "PM" : "AM"
|
|
3124
3156
|
};
|
|
3125
|
-
return t.replace(
|
|
3126
|
-
},
|
|
3157
|
+
return t.replace(Sn, (e) => i[e]);
|
|
3158
|
+
}, Tn = (e, t, { strict: n, base: r }) => {
|
|
3127
3159
|
let i = e.trim();
|
|
3128
3160
|
if (!i) return;
|
|
3129
|
-
let a = t.match(
|
|
3161
|
+
let a = t.match(Sn) ?? [];
|
|
3130
3162
|
if (n) {
|
|
3131
|
-
let e = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(
|
|
3163
|
+
let e = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(Sn, (e) => e === "a" ? "\\s*([AaPp][Mm])" : `(\\d{${e.length === 2 ? 2 : "1,2"}})`);
|
|
3132
3164
|
if (!RegExp(`^${e}$`).test(i)) return;
|
|
3133
3165
|
}
|
|
3134
3166
|
let o = i.match(/\d+/g) ?? [], s = i.match(/[AaPp][Mm]/)?.[0]?.toUpperCase(), c = a.filter((e) => e !== "a");
|
|
@@ -3146,11 +3178,11 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
3146
3178
|
if (u > 23 || d > 59 || f > 59) return;
|
|
3147
3179
|
let p = new Date(r ?? /* @__PURE__ */ new Date());
|
|
3148
3180
|
return p.setHours(u, d, f, 0), p;
|
|
3149
|
-
},
|
|
3181
|
+
}, En = () => {
|
|
3150
3182
|
let e = /* @__PURE__ */ new Date();
|
|
3151
3183
|
return e.setHours(0, 0, 0, 0), e;
|
|
3152
|
-
},
|
|
3153
|
-
let t =
|
|
3184
|
+
}, Dn = /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/, On = (e) => {
|
|
3185
|
+
let t = Dn.exec((e ?? "").trim());
|
|
3154
3186
|
if (!t) return null;
|
|
3155
3187
|
let [n, r, i] = [
|
|
3156
3188
|
t[1],
|
|
@@ -3158,30 +3190,30 @@ var en = /* @__PURE__ */ J(Ht, Ut, Wt, Gt, Kt, qt, Jt, Yt, Xt, Zt, Qt), tn = /*
|
|
|
3158
3190
|
t[3] ?? "0"
|
|
3159
3191
|
].map(Number);
|
|
3160
3192
|
if (n > 23 || r > 59 || i > 59) return null;
|
|
3161
|
-
let a =
|
|
3193
|
+
let a = En();
|
|
3162
3194
|
return a.setHours(n, r, i, 0), a;
|
|
3163
|
-
},
|
|
3195
|
+
}, kn = (e, t) => wn(e, t ? "HH:mm:ss" : "HH:mm"), An = (e) => e.getHours() * 3600 + e.getMinutes() * 60 + e.getSeconds(), jn = (e) => /(^|[^a-zA-Z])s{1,2}([^a-zA-Z]|$)/.test(e), Mn = (e, t) => t ? e : e.replace(/[:.\s]?s{1,2}(?![a-zA-Z])/, "");
|
|
3164
3196
|
//#endregion
|
|
3165
3197
|
//#region src/shortcuts.ts
|
|
3166
|
-
function
|
|
3198
|
+
function Nn(e) {
|
|
3167
3199
|
return (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string" && e.trim() !== "");
|
|
3168
3200
|
}
|
|
3169
|
-
function
|
|
3201
|
+
function Pn(e, t) {
|
|
3170
3202
|
if (typeof t != "string") return !1;
|
|
3171
3203
|
let n = t.trim().toLowerCase().split("+").map((e) => e.trim()).filter(Boolean), r = n[n.length - 1];
|
|
3172
3204
|
if (!r || String(e.key ?? "").toLowerCase() !== r) return !1;
|
|
3173
3205
|
let i = (...e) => e.some((e) => n.includes(e));
|
|
3174
3206
|
return !(i("mod") && !e.metaKey && !e.ctrlKey || i("ctrl") && !e.ctrlKey || i("meta", "cmd") && !e.metaKey || i("shift") && !e.shiftKey || i("alt", "option") && !e.altKey);
|
|
3175
3207
|
}
|
|
3176
|
-
var
|
|
3208
|
+
var Fn = (e) => e.trim().toLowerCase(), In = (e) => `${e.group ?? ""} ${e.title} ${e.description ?? ""} ${e.keywords ?? ""}`, Ln = [
|
|
3177
3209
|
"altKey",
|
|
3178
3210
|
"ctrlKey",
|
|
3179
3211
|
"metaKey",
|
|
3180
3212
|
"shiftKey"
|
|
3181
|
-
],
|
|
3213
|
+
], Rn = (e, t) => t.length > 0 && t.every((t) => Ln.includes(t) ? e[t] : e.code === t || e.key === t), zn = (e) => e.map((e) => e.replace(/Key$/, "").replace(/^Key(?=.)/, "").replace(/^Digit/, "").replace(/^./, (e) => e.toUpperCase())).join("+");
|
|
3182
3214
|
//#endregion
|
|
3183
3215
|
//#region src/keyboard-navigation.ts
|
|
3184
|
-
function
|
|
3216
|
+
function Bn(e, t, n, r) {
|
|
3185
3217
|
let i = t !== "horizontal", a = t !== "vertical";
|
|
3186
3218
|
switch (e) {
|
|
3187
3219
|
case "ArrowDown": return i ? "next" : null;
|
|
@@ -3195,25 +3227,25 @@ function Vn(e, t, n, r) {
|
|
|
3195
3227
|
default: return null;
|
|
3196
3228
|
}
|
|
3197
3229
|
}
|
|
3198
|
-
function
|
|
3230
|
+
function X(e, t, n, r) {
|
|
3199
3231
|
for (let i = e; i >= 0 && i < n; i += t) if (!r(i)) return i;
|
|
3200
3232
|
return null;
|
|
3201
3233
|
}
|
|
3202
|
-
function
|
|
3234
|
+
function Vn({ currentIndex: e, count: t, key: n, orientation: r = "vertical", dir: i = "ltr", loop: a = !0, isDisabled: o = () => !1, pageSize: s }) {
|
|
3203
3235
|
if (t <= 0) return null;
|
|
3204
|
-
let c =
|
|
3236
|
+
let c = Bn(n, r, i, s);
|
|
3205
3237
|
if (!c) return null;
|
|
3206
3238
|
switch (c) {
|
|
3207
|
-
case "first": return
|
|
3208
|
-
case "last": return
|
|
3239
|
+
case "first": return X(0, 1, t, o);
|
|
3240
|
+
case "last": return X(t - 1, -1, t, o);
|
|
3209
3241
|
case "pageNext":
|
|
3210
3242
|
case "pagePrev": {
|
|
3211
|
-
let n = c === "pageNext" ? 1 : -1, r = e < 0 ? n === 1 ? -1 : t : e, i = Math.min(t - 1, Math.max(0, r + n * s)), a =
|
|
3243
|
+
let n = c === "pageNext" ? 1 : -1, r = e < 0 ? n === 1 ? -1 : t : e, i = Math.min(t - 1, Math.max(0, r + n * s)), a = X(i, n === 1 ? -1 : 1, t, o) ?? X(i, n, t, o);
|
|
3212
3244
|
return a === e ? null : a;
|
|
3213
3245
|
}
|
|
3214
3246
|
default: {
|
|
3215
3247
|
let n = c === "next" ? 1 : -1;
|
|
3216
|
-
if (e < 0 || e >= t) return
|
|
3248
|
+
if (e < 0 || e >= t) return X(n === 1 ? 0 : t - 1, n, t, o);
|
|
3217
3249
|
for (let r = 1; r < t; r++) {
|
|
3218
3250
|
let i = e + n * r;
|
|
3219
3251
|
if (i < 0 || i >= t) {
|
|
@@ -3228,7 +3260,7 @@ function Hn({ currentIndex: e, count: t, key: n, orientation: r = "vertical", di
|
|
|
3228
3260
|
}
|
|
3229
3261
|
//#endregion
|
|
3230
3262
|
//#region src/typeahead.ts
|
|
3231
|
-
function
|
|
3263
|
+
function Hn(e = {}) {
|
|
3232
3264
|
let { timeout: t = 500 } = e, n = "", r = 0;
|
|
3233
3265
|
return {
|
|
3234
3266
|
search(e, i, a) {
|
|
@@ -3253,7 +3285,7 @@ function Un(e = {}) {
|
|
|
3253
3285
|
}
|
|
3254
3286
|
//#endregion
|
|
3255
3287
|
//#region src/fixed-columns.ts
|
|
3256
|
-
var
|
|
3288
|
+
var Un = (e) => {
|
|
3257
3289
|
if (typeof e == "number") return e;
|
|
3258
3290
|
if (typeof e == "string") {
|
|
3259
3291
|
let t = parseFloat(e);
|
|
@@ -3261,13 +3293,13 @@ var Wn = (e) => {
|
|
|
3261
3293
|
}
|
|
3262
3294
|
return 0;
|
|
3263
3295
|
};
|
|
3264
|
-
function
|
|
3296
|
+
function Wn(e) {
|
|
3265
3297
|
let t = {}, n = {}, r = 0;
|
|
3266
|
-
for (let n of e) n.fixed === "left" && (t[n.key] = r, r +=
|
|
3298
|
+
for (let n of e) n.fixed === "left" && (t[n.key] = r, r += Un(n.width));
|
|
3267
3299
|
let i = 0;
|
|
3268
3300
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
3269
3301
|
let r = e[t];
|
|
3270
|
-
r.fixed === "right" && (n[r.key] = i, i +=
|
|
3302
|
+
r.fixed === "right" && (n[r.key] = i, i += Un(r.width));
|
|
3271
3303
|
}
|
|
3272
3304
|
let a;
|
|
3273
3305
|
for (let t of e) if (t.fixed === "left") a = t.key;
|
|
@@ -3287,17 +3319,17 @@ function Gn(e) {
|
|
|
3287
3319
|
}
|
|
3288
3320
|
//#endregion
|
|
3289
3321
|
//#region src/table-sort.ts
|
|
3290
|
-
var
|
|
3291
|
-
function
|
|
3292
|
-
return
|
|
3322
|
+
var Gn = (e) => e == null || e === "", Kn = null;
|
|
3323
|
+
function qn(e, t) {
|
|
3324
|
+
return Gn(e) || Gn(t) ? Gn(e) ? +!Gn(t) : -1 : typeof e == "number" && typeof t == "number" ? e - t : e instanceof Date && t instanceof Date ? e.getTime() - t.getTime() : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : (Kn ?? (Kn = new Intl.Collator(void 0, {
|
|
3293
3325
|
numeric: !0,
|
|
3294
3326
|
sensitivity: "base"
|
|
3295
|
-
})),
|
|
3327
|
+
})), Kn.compare(String(e), String(t)));
|
|
3296
3328
|
}
|
|
3297
|
-
function
|
|
3298
|
-
return typeof e.sortable == "function" ? e.sortable : e.sortable ? (t, n) =>
|
|
3329
|
+
function Jn(e) {
|
|
3330
|
+
return typeof e.sortable == "function" ? e.sortable : e.sortable ? (t, n) => qn(t[e.key], n[e.key]) : null;
|
|
3299
3331
|
}
|
|
3300
|
-
function
|
|
3332
|
+
function Yn(e, t) {
|
|
3301
3333
|
let n = e?.key === t ? e.order : null;
|
|
3302
3334
|
return {
|
|
3303
3335
|
key: t,
|
|
@@ -3306,67 +3338,76 @@ function Xn(e, t) {
|
|
|
3306
3338
|
}
|
|
3307
3339
|
//#endregion
|
|
3308
3340
|
//#region src/pagination.ts
|
|
3309
|
-
var
|
|
3341
|
+
var Xn = 5, Z = (e, t) => {
|
|
3310
3342
|
let n = [];
|
|
3311
3343
|
for (let r = e; r <= t; r++) n.push(r);
|
|
3312
3344
|
return n;
|
|
3313
3345
|
};
|
|
3314
|
-
function
|
|
3346
|
+
function Zn(e, t, n = 5) {
|
|
3315
3347
|
let r = Math.max(1, e - Math.floor(n / 2)), i = Math.min(t, r + n - 1);
|
|
3316
|
-
return i - r + 1 < n && (r = Math.max(1, i - n + 1)),
|
|
3348
|
+
return i - r + 1 < n && (r = Math.max(1, i - n + 1)), Z(r, i);
|
|
3317
3349
|
}
|
|
3318
|
-
function
|
|
3319
|
-
if (e <= r * 2 + n * 2 + 3) return
|
|
3350
|
+
function Qn(e, t, n, r) {
|
|
3351
|
+
if (e <= r * 2 + n * 2 + 3) return Z(1, e);
|
|
3320
3352
|
let i = Math.max(t - n, r + 1), a = Math.min(t + n, e - r), o = i > r + 2, s = a < e - r - 1, c = r + n * 2 + 2;
|
|
3321
3353
|
return o ? s ? [
|
|
3322
|
-
...
|
|
3354
|
+
...Z(1, r),
|
|
3323
3355
|
"ellipsis-start",
|
|
3324
|
-
...
|
|
3356
|
+
...Z(i, a),
|
|
3325
3357
|
"ellipsis-end",
|
|
3326
|
-
...
|
|
3358
|
+
...Z(e - r + 1, e)
|
|
3327
3359
|
] : [
|
|
3328
|
-
...
|
|
3360
|
+
...Z(1, r),
|
|
3329
3361
|
"ellipsis-start",
|
|
3330
|
-
...
|
|
3362
|
+
...Z(e - c + 1, e)
|
|
3331
3363
|
] : [
|
|
3332
|
-
...
|
|
3364
|
+
...Z(1, c),
|
|
3333
3365
|
"ellipsis-end",
|
|
3334
|
-
...
|
|
3366
|
+
...Z(e - r + 1, e)
|
|
3335
3367
|
];
|
|
3336
3368
|
}
|
|
3337
3369
|
//#endregion
|
|
3338
3370
|
//#region src/calendar-date.ts
|
|
3339
|
-
function
|
|
3371
|
+
function $n(e, t, n) {
|
|
3340
3372
|
let r = /* @__PURE__ */ new Date(0);
|
|
3341
3373
|
return r.setFullYear(e, t, n), r.setHours(0, 0, 0, 0), r;
|
|
3342
3374
|
}
|
|
3343
|
-
function
|
|
3375
|
+
function er(e) {
|
|
3344
3376
|
return `${String(e.getFullYear()).padStart(4, "0")}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
3345
3377
|
}
|
|
3346
|
-
function
|
|
3347
|
-
return
|
|
3378
|
+
function tr(e, t) {
|
|
3379
|
+
return $n(e.getFullYear(), e.getMonth(), e.getDate() + t);
|
|
3348
3380
|
}
|
|
3349
|
-
function
|
|
3350
|
-
return
|
|
3381
|
+
function nr(e, t = 0) {
|
|
3382
|
+
return $n(e.getFullYear(), e.getMonth() + t, 1);
|
|
3351
3383
|
}
|
|
3352
|
-
function
|
|
3384
|
+
function rr(e, t) {
|
|
3353
3385
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
|
|
3354
3386
|
}
|
|
3387
|
+
var ir = /^(\d{4})-(\d{2})-(\d{2})$/, ar = /^\s*(\d{4})-(\d{1,2})-(\d{1,2})\s*$/;
|
|
3388
|
+
function or(e, t = !0) {
|
|
3389
|
+
let n = (t ? ir : ar).exec(e);
|
|
3390
|
+
if (!n) return null;
|
|
3391
|
+
let r = Number(n[1]), i = Number(n[2]), a = Number(n[3]);
|
|
3392
|
+
if (i < 1 || i > 12 || a < 1 || a > 31) return null;
|
|
3393
|
+
let o = $n(r, i - 1, a);
|
|
3394
|
+
return o.getFullYear() !== r || o.getMonth() !== i - 1 || o.getDate() !== a ? null : o;
|
|
3395
|
+
}
|
|
3355
3396
|
//#endregion
|
|
3356
3397
|
//#region src/number-input.ts
|
|
3357
|
-
function
|
|
3398
|
+
function sr(e) {
|
|
3358
3399
|
if (!e || e >= 1) return 0;
|
|
3359
3400
|
let t = String(e), n = t.indexOf(".");
|
|
3360
3401
|
return n === -1 ? 0 : t.length - n - 1;
|
|
3361
3402
|
}
|
|
3362
|
-
function
|
|
3403
|
+
function cr(e, t, n) {
|
|
3363
3404
|
let r = e;
|
|
3364
3405
|
return t !== void 0 && (r = Math.max(t, r)), n !== void 0 && (r = Math.min(n, r)), r;
|
|
3365
3406
|
}
|
|
3366
|
-
function
|
|
3407
|
+
function lr(e, t) {
|
|
3367
3408
|
return e == null || Number.isNaN(e) ? "" : e.toFixed(t);
|
|
3368
3409
|
}
|
|
3369
|
-
function
|
|
3410
|
+
function ur(e) {
|
|
3370
3411
|
let t = e.trim();
|
|
3371
3412
|
if (!t || !/^-?\d*(\.\d*)?$/.test(t)) return null;
|
|
3372
3413
|
let n = Number(t);
|
|
@@ -3374,17 +3415,17 @@ function sr(e) {
|
|
|
3374
3415
|
}
|
|
3375
3416
|
//#endregion
|
|
3376
3417
|
//#region src/spacing.ts
|
|
3377
|
-
function
|
|
3418
|
+
function dr(e) {
|
|
3378
3419
|
let t = String(e).trim();
|
|
3379
3420
|
return typeof e != "number" && !/^\d+(\.\d+)?$/.test(t) ? t : `var(--space-${t.replace(".", "-")})`;
|
|
3380
3421
|
}
|
|
3381
|
-
function
|
|
3422
|
+
function fr(e) {
|
|
3382
3423
|
let t = String(e).trim();
|
|
3383
3424
|
return typeof e == "number" || /^-?\d+(\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
3384
3425
|
}
|
|
3385
3426
|
//#endregion
|
|
3386
3427
|
//#region src/virtual-range.ts
|
|
3387
|
-
function
|
|
3428
|
+
function pr({ scrollTop: e, viewportHeight: t, itemHeight: n, itemCount: r, overscan: i = 0 }) {
|
|
3388
3429
|
if (!(n > 0)) return {
|
|
3389
3430
|
start: 0,
|
|
3390
3431
|
end: 0,
|
|
@@ -3399,7 +3440,7 @@ function ur({ scrollTop: e, viewportHeight: t, itemHeight: n, itemCount: r, over
|
|
|
3399
3440
|
}
|
|
3400
3441
|
//#endregion
|
|
3401
3442
|
//#region src/file-accept.ts
|
|
3402
|
-
function
|
|
3443
|
+
function mr(e, t) {
|
|
3403
3444
|
return t.split(",").some((t) => {
|
|
3404
3445
|
let n = t.trim().toLowerCase();
|
|
3405
3446
|
if (!n || n === "*" || n === "*/*") return !0;
|
|
@@ -3410,15 +3451,15 @@ function dr(e, t) {
|
|
|
3410
3451
|
}
|
|
3411
3452
|
//#endregion
|
|
3412
3453
|
//#region src/tag-separators.ts
|
|
3413
|
-
var
|
|
3414
|
-
function
|
|
3454
|
+
var hr = [",", "Enter"];
|
|
3455
|
+
function gr(e, t) {
|
|
3415
3456
|
if (t.length === 0) return [e];
|
|
3416
3457
|
let n = [...t].sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
3417
3458
|
return e.split(new RegExp(n));
|
|
3418
3459
|
}
|
|
3419
3460
|
//#endregion
|
|
3420
3461
|
//#region src/cascader-options.ts
|
|
3421
|
-
function
|
|
3462
|
+
function _r(e, t) {
|
|
3422
3463
|
let n = [], r = e;
|
|
3423
3464
|
for (let e of t) {
|
|
3424
3465
|
let t = r?.find((t) => t.value === e);
|
|
@@ -3427,39 +3468,39 @@ function mr(e, t) {
|
|
|
3427
3468
|
}
|
|
3428
3469
|
return n;
|
|
3429
3470
|
}
|
|
3430
|
-
function
|
|
3471
|
+
function vr(e, t = []) {
|
|
3431
3472
|
return e.flatMap((e) => {
|
|
3432
3473
|
if (e.disabled) return [];
|
|
3433
3474
|
let n = [...t, e];
|
|
3434
3475
|
return [{
|
|
3435
3476
|
option: e,
|
|
3436
3477
|
path: n
|
|
3437
|
-
}, ...e.children ?
|
|
3478
|
+
}, ...e.children ? vr(e.children, n) : []];
|
|
3438
3479
|
});
|
|
3439
3480
|
}
|
|
3440
3481
|
//#endregion
|
|
3441
3482
|
//#region src/rating.ts
|
|
3442
3483
|
var Q = (e) => Math.round(e * 10) / 10;
|
|
3443
|
-
function
|
|
3484
|
+
function yr(e, t) {
|
|
3444
3485
|
let n = t > 0 ? e / t * 5 : 0, r = Math.floor(n), i = n - r, a = i >= .25 && i < .75;
|
|
3445
3486
|
return (i >= .75 ? r + 1 : r) + (a ? .5 : 0);
|
|
3446
3487
|
}
|
|
3447
|
-
var
|
|
3488
|
+
var br = (e, t) => e < Math.floor(t) ? "full" : e < t ? "half" : "empty", xr = (e, t) => {
|
|
3448
3489
|
if (t && t !== !0) {
|
|
3449
3490
|
if (typeof t == "string" || typeof t == "number") e.push(String(t));
|
|
3450
3491
|
else if (typeof t == "bigint") e.push(t.toString());
|
|
3451
|
-
else if (Array.isArray(t)) for (let n of t)
|
|
3492
|
+
else if (Array.isArray(t)) for (let n of t) xr(e, n);
|
|
3452
3493
|
else for (let n of Object.keys(t)) n && t[n] && e.push(n);
|
|
3453
3494
|
}
|
|
3454
3495
|
};
|
|
3455
|
-
function
|
|
3496
|
+
function Sr(...e) {
|
|
3456
3497
|
let t = [];
|
|
3457
|
-
for (let n of e)
|
|
3498
|
+
for (let n of e) xr(t, n);
|
|
3458
3499
|
return t.join(" ");
|
|
3459
3500
|
}
|
|
3460
3501
|
//#endregion
|
|
3461
3502
|
//#region src/machines/store.ts
|
|
3462
|
-
function
|
|
3503
|
+
function Cr(e, t) {
|
|
3463
3504
|
if (Object.is(e, t)) return !0;
|
|
3464
3505
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
3465
3506
|
let n = Object.keys(e), r = Object.keys(t);
|
|
@@ -3467,8 +3508,8 @@ function br(e, t) {
|
|
|
3467
3508
|
for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || !Object.is(e[r], t[r])) return !1;
|
|
3468
3509
|
return !0;
|
|
3469
3510
|
}
|
|
3470
|
-
function
|
|
3471
|
-
let n = t.equals ??
|
|
3511
|
+
function wr(e, t = {}) {
|
|
3512
|
+
let n = t.equals ?? Cr, r = e, i = /* @__PURE__ */ new Set();
|
|
3472
3513
|
return {
|
|
3473
3514
|
getState: () => r,
|
|
3474
3515
|
setState(e) {
|
|
@@ -3485,11 +3526,11 @@ function xr(e, t = {}) {
|
|
|
3485
3526
|
}
|
|
3486
3527
|
};
|
|
3487
3528
|
}
|
|
3488
|
-
var
|
|
3529
|
+
var Tr = {
|
|
3489
3530
|
setTimeout: (e, t) => globalThis.setTimeout(e, t),
|
|
3490
3531
|
clearTimeout: (e) => globalThis.clearTimeout(e),
|
|
3491
3532
|
now: () => Date.now()
|
|
3492
|
-
},
|
|
3533
|
+
}, Er = (e, t, n) => {
|
|
3493
3534
|
let r = e;
|
|
3494
3535
|
for (let e of n) {
|
|
3495
3536
|
let n = t[e];
|
|
@@ -3501,12 +3542,12 @@ var Sr = {
|
|
|
3501
3542
|
return r;
|
|
3502
3543
|
};
|
|
3503
3544
|
function $(e, t) {
|
|
3504
|
-
let n = e.controlled ?? [], r = { ...t }, i = (t, n, r) => e.normalize ? e.normalize(t, n, r) : t, a = e.initial(r), o =
|
|
3545
|
+
let n = e.controlled ?? [], r = { ...t }, i = (t, n, r) => e.normalize ? e.normalize(t, n, r) : t, a = e.initial(r), o = wr(i(Er(a, r, n), r, a)), s = (e, t) => {
|
|
3505
3546
|
let a = t ? {
|
|
3506
3547
|
...r,
|
|
3507
3548
|
...t
|
|
3508
3549
|
} : r;
|
|
3509
|
-
return i(
|
|
3550
|
+
return i(Er(e, a, n), a, e);
|
|
3510
3551
|
}, c = (t) => {
|
|
3511
3552
|
let a = o.getState();
|
|
3512
3553
|
if (t?.type === "SYNC") {
|
|
@@ -3517,7 +3558,7 @@ function $(e, t) {
|
|
|
3517
3558
|
return;
|
|
3518
3559
|
}
|
|
3519
3560
|
let c = e.reduce(a, t, r);
|
|
3520
|
-
c !== a && (o.setState(i(
|
|
3561
|
+
c !== a && (o.setState(i(Er(c, r, n), r, a)), e.changed?.(i(c, r, a), a, r));
|
|
3521
3562
|
};
|
|
3522
3563
|
return {
|
|
3523
3564
|
getState: o.getState,
|
|
@@ -3531,14 +3572,14 @@ function $(e, t) {
|
|
|
3531
3572
|
project: s
|
|
3532
3573
|
};
|
|
3533
3574
|
}
|
|
3534
|
-
var
|
|
3575
|
+
var Dr = (e, t, n) => !Object.is(e[n], t[n]), Or = (e) => e.phase === "opening" ? {
|
|
3535
3576
|
...e,
|
|
3536
3577
|
phase: "open"
|
|
3537
3578
|
} : e.phase === "closing" ? {
|
|
3538
3579
|
...e,
|
|
3539
3580
|
phase: "closed"
|
|
3540
|
-
} : e,
|
|
3541
|
-
function
|
|
3581
|
+
} : e, kr = (e) => e.phase !== "closed";
|
|
3582
|
+
function Ar(e = {}) {
|
|
3542
3583
|
return $({
|
|
3543
3584
|
controlled: ["open"],
|
|
3544
3585
|
initial: (e) => {
|
|
@@ -3561,7 +3602,7 @@ function Dr(e = {}) {
|
|
|
3561
3602
|
};
|
|
3562
3603
|
}
|
|
3563
3604
|
case "ANIMATION_END":
|
|
3564
|
-
case "SKIP_ANIMATION": return
|
|
3605
|
+
case "SKIP_ANIMATION": return Or(e);
|
|
3565
3606
|
default: return e;
|
|
3566
3607
|
}
|
|
3567
3608
|
},
|
|
@@ -3579,17 +3620,17 @@ function Dr(e = {}) {
|
|
|
3579
3620
|
}
|
|
3580
3621
|
//#endregion
|
|
3581
3622
|
//#region src/machines/toast.ts
|
|
3582
|
-
var
|
|
3623
|
+
var jr = {
|
|
3583
3624
|
setTimeout: (e, t) => globalThis.setTimeout(e, t),
|
|
3584
3625
|
clearTimeout: (e) => globalThis.clearTimeout(e),
|
|
3585
3626
|
now: () => Date.now()
|
|
3586
|
-
},
|
|
3587
|
-
function
|
|
3627
|
+
}, Mr = 4e3, Nr = 200;
|
|
3628
|
+
function Pr(e, t) {
|
|
3588
3629
|
let n = e.filter((e) => e.state === "open");
|
|
3589
3630
|
return n.slice(0, Math.max(0, n.length - t));
|
|
3590
3631
|
}
|
|
3591
|
-
function
|
|
3592
|
-
let t = e.isClient ?? (() => !0), n = e.scheduler ??
|
|
3632
|
+
function Fr(e = {}) {
|
|
3633
|
+
let t = e.isClient ?? (() => !0), n = e.scheduler ?? jr, r = e.defaultDuration ?? 4e3, i = e.exitDuration ?? 200, a = wr({ toasts: [] }, { equals: Object.is }), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = 0, l = () => a.getState().toasts, u = (e) => a.setState({ toasts: e }), d = (e) => {
|
|
3593
3634
|
for (let t of [...o]) t(e);
|
|
3594
3635
|
}, f = (e) => {
|
|
3595
3636
|
let t = s.get(e);
|
|
@@ -3707,8 +3748,8 @@ function Mr(e = {}) {
|
|
|
3707
3748
|
}
|
|
3708
3749
|
//#endregion
|
|
3709
3750
|
//#region src/machines/selection.ts
|
|
3710
|
-
var
|
|
3711
|
-
function
|
|
3751
|
+
var Ir = (e, t) => e.value.includes(t), Lr = (e, t) => e.length === t.length && e.every((e, n) => Object.is(e, t[n]));
|
|
3752
|
+
function Rr(e = {}) {
|
|
3712
3753
|
let t = (e, t, n) => {
|
|
3713
3754
|
let r = n.mode === "multiple", i = n.isDisabled ?? (() => !1), a = r ? n.max ?? Infinity : 1, o = r || (n.allowEmpty ?? !0), s = r ? e.filter(i) : [], c = (t) => i(t) || e.includes(t) ? e : r ? e.length >= a ? e : [...e, t] : [t], l = (t) => {
|
|
3714
3755
|
if (!e.includes(t) || r && i(t)) return e;
|
|
@@ -3744,16 +3785,16 @@ function Fr(e = {}) {
|
|
|
3744
3785
|
initial: (e) => ({ value: e.value ?? e.defaultValue ?? [] }),
|
|
3745
3786
|
reduce(e, n, r) {
|
|
3746
3787
|
let i = t(e.value, n, r);
|
|
3747
|
-
return
|
|
3788
|
+
return Lr(i, e.value) ? e : { value: i };
|
|
3748
3789
|
},
|
|
3749
3790
|
changed(e, t, n) {
|
|
3750
|
-
|
|
3791
|
+
Lr(e.value, t.value) || n.onValueChange?.([...e.value]);
|
|
3751
3792
|
}
|
|
3752
3793
|
}, e);
|
|
3753
3794
|
}
|
|
3754
3795
|
//#endregion
|
|
3755
3796
|
//#region src/machines/tabs.ts
|
|
3756
|
-
var
|
|
3797
|
+
var zr = ({ key: e, currentIndex: t, tabs: n, orientation: r = "horizontal", dir: i = "ltr", loop: a = !0 }) => Vn({
|
|
3757
3798
|
currentIndex: t,
|
|
3758
3799
|
count: n.length,
|
|
3759
3800
|
key: e,
|
|
@@ -3761,8 +3802,8 @@ var Ir = ({ key: e, currentIndex: t, tabs: n, orientation: r = "horizontal", dir
|
|
|
3761
3802
|
dir: i,
|
|
3762
3803
|
loop: a,
|
|
3763
3804
|
isDisabled: (e) => !!n[e].disabled
|
|
3764
|
-
}),
|
|
3765
|
-
function
|
|
3805
|
+
}), Br = (e, t) => e.find((e) => e.value === t && !e.disabled) ?? e.find((e) => !e.disabled), Vr = (e, t, n) => n ?? e?.find((e) => e.value === t)?.disabled ?? !1;
|
|
3806
|
+
function Hr(e = {}) {
|
|
3766
3807
|
return $({
|
|
3767
3808
|
controlled: ["value"],
|
|
3768
3809
|
initial: (e) => ({
|
|
@@ -3771,12 +3812,12 @@ function zr(e = {}) {
|
|
|
3771
3812
|
}),
|
|
3772
3813
|
reduce(e, t, n) {
|
|
3773
3814
|
switch (t.type) {
|
|
3774
|
-
case "SELECT": return
|
|
3815
|
+
case "SELECT": return Vr(n.tabs, t.value, t.disabled) || t.value === e.value ? e : {
|
|
3775
3816
|
...e,
|
|
3776
3817
|
value: t.value
|
|
3777
3818
|
};
|
|
3778
3819
|
case "FOCUS": {
|
|
3779
|
-
let r = !
|
|
3820
|
+
let r = !Vr(n.tabs, t.value, t.disabled) && (n.activationMode ?? "automatic") === "automatic" && t.value !== e.value;
|
|
3780
3821
|
return {
|
|
3781
3822
|
focusedValue: t.value,
|
|
3782
3823
|
value: r ? t.value : e.value
|
|
@@ -3787,7 +3828,7 @@ function zr(e = {}) {
|
|
|
3787
3828
|
focusedValue: void 0
|
|
3788
3829
|
};
|
|
3789
3830
|
case "NAVIGATE": {
|
|
3790
|
-
let r = t.tabs ?? n.tabs ?? [], i = t.from ?? e.focusedValue ?? e.value, a =
|
|
3831
|
+
let r = t.tabs ?? n.tabs ?? [], i = t.from ?? e.focusedValue ?? e.value, a = zr({
|
|
3791
3832
|
key: t.key,
|
|
3792
3833
|
currentIndex: r.findIndex((e) => e.value === i),
|
|
3793
3834
|
tabs: r,
|
|
@@ -3810,33 +3851,33 @@ function zr(e = {}) {
|
|
|
3810
3851
|
}
|
|
3811
3852
|
//#endregion
|
|
3812
3853
|
//#region src/machines/picker.ts
|
|
3813
|
-
var
|
|
3814
|
-
function
|
|
3854
|
+
var Ur = (e) => e.findIndex((e) => !e.disabled);
|
|
3855
|
+
function Wr(e, t) {
|
|
3815
3856
|
let n = [], r = e;
|
|
3816
3857
|
for (let e = 0; r && r.length > 0; e++) {
|
|
3817
3858
|
let i = r.findIndex((n) => !n.disabled && Object.is(n.value, t[e]));
|
|
3818
|
-
i < 0 && (i =
|
|
3859
|
+
i < 0 && (i = Ur(r)), n.push({
|
|
3819
3860
|
options: r,
|
|
3820
3861
|
selectedIndex: i
|
|
3821
3862
|
}), r = i < 0 ? void 0 : r[i].children;
|
|
3822
3863
|
}
|
|
3823
3864
|
return n;
|
|
3824
3865
|
}
|
|
3825
|
-
var
|
|
3826
|
-
function
|
|
3866
|
+
var Gr = (e) => e.filter((e) => e.selectedIndex >= 0).map((e) => e.options[e.selectedIndex]), Kr = (e, t) => Gr(Wr(e, t)).map((e) => e.value), qr = (e, t) => e.length === t.length && e.every((e, n) => Object.is(e, t[n]));
|
|
3867
|
+
function Jr(e) {
|
|
3827
3868
|
return $({
|
|
3828
3869
|
controlled: ["value"],
|
|
3829
3870
|
initial: (e) => ({ value: e.value ?? e.defaultValue ?? [] }),
|
|
3830
3871
|
reduce(e, t, n) {
|
|
3831
|
-
let r =
|
|
3872
|
+
let r = Wr(n.options, e.value), i = Gr(r).map((e) => e.value), a = (t, a) => {
|
|
3832
3873
|
let o = r[t]?.options[a];
|
|
3833
3874
|
if (!o || o.disabled) return e;
|
|
3834
|
-
let s =
|
|
3875
|
+
let s = Kr(n.options, [
|
|
3835
3876
|
...i.slice(0, t),
|
|
3836
3877
|
o.value,
|
|
3837
3878
|
...i.slice(t + 1)
|
|
3838
3879
|
]);
|
|
3839
|
-
return
|
|
3880
|
+
return qr(s, e.value) ? e : { value: s };
|
|
3840
3881
|
};
|
|
3841
3882
|
switch (t.type) {
|
|
3842
3883
|
case "SELECT": return a(t.column, t.index);
|
|
@@ -3848,27 +3889,27 @@ function Gr(e) {
|
|
|
3848
3889
|
return a(t.column, s);
|
|
3849
3890
|
}
|
|
3850
3891
|
case "SET": {
|
|
3851
|
-
let r =
|
|
3852
|
-
return
|
|
3892
|
+
let r = Kr(n.options, t.value);
|
|
3893
|
+
return qr(r, e.value) ? e : { value: r };
|
|
3853
3894
|
}
|
|
3854
3895
|
default: return e;
|
|
3855
3896
|
}
|
|
3856
3897
|
},
|
|
3857
3898
|
normalize(e, t) {
|
|
3858
|
-
let n =
|
|
3859
|
-
return
|
|
3899
|
+
let n = Kr(t.options, e.value);
|
|
3900
|
+
return qr(n, e.value) ? e : { value: n };
|
|
3860
3901
|
},
|
|
3861
3902
|
changed(e, t, n) {
|
|
3862
|
-
if (
|
|
3863
|
-
let r =
|
|
3903
|
+
if (qr(e.value, t.value)) return;
|
|
3904
|
+
let r = Gr(Wr(n.options, e.value));
|
|
3864
3905
|
n.onValueChange?.([...e.value], r);
|
|
3865
3906
|
}
|
|
3866
3907
|
}, e);
|
|
3867
3908
|
}
|
|
3868
3909
|
//#endregion
|
|
3869
3910
|
//#region src/machines/field.ts
|
|
3870
|
-
var
|
|
3871
|
-
required: (e = "validation.valueMissing") => (t) =>
|
|
3911
|
+
var Yr = (e) => e == null || e === "" || e === !1 || Array.isArray(e) && e.length === 0, Xr = (e) => typeof e == "string" || Array.isArray(e) ? e.length : void 0, Zr = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Qr = {
|
|
3912
|
+
required: (e = "validation.valueMissing") => (t) => Yr(t) ? { key: e } : null,
|
|
3872
3913
|
min: (e, t = "validation.rangeUnderflow") => (n) => typeof n == "number" && n < e ? {
|
|
3873
3914
|
key: t,
|
|
3874
3915
|
params: { min: e }
|
|
@@ -3878,14 +3919,14 @@ var Kr = (e) => e == null || e === "" || e === !1 || Array.isArray(e) && e.lengt
|
|
|
3878
3919
|
params: { max: e }
|
|
3879
3920
|
} : null,
|
|
3880
3921
|
minLength: (e, t = "validation.tooShort") => (n) => {
|
|
3881
|
-
let r =
|
|
3922
|
+
let r = Xr(n);
|
|
3882
3923
|
return r !== void 0 && r > 0 && r < e ? {
|
|
3883
3924
|
key: t,
|
|
3884
3925
|
params: { min: e }
|
|
3885
3926
|
} : null;
|
|
3886
3927
|
},
|
|
3887
3928
|
maxLength: (e, t = "validation.tooLong") => (n) => {
|
|
3888
|
-
let r =
|
|
3929
|
+
let r = Xr(n);
|
|
3889
3930
|
return r !== void 0 && r > e ? {
|
|
3890
3931
|
key: t,
|
|
3891
3932
|
params: { max: e }
|
|
@@ -3895,27 +3936,27 @@ var Kr = (e) => e == null || e === "" || e === !1 || Array.isArray(e) && e.lengt
|
|
|
3895
3936
|
let n = typeof e == "string" ? e : e.source, r = typeof e == "string" ? "" : e.flags, i = RegExp(`^(?:${n})$`, r.replace(/[gy]/g, ""));
|
|
3896
3937
|
return (e) => typeof e == "string" && e !== "" && !i.test(e) ? { key: t } : null;
|
|
3897
3938
|
},
|
|
3898
|
-
email: (e = "validation.emailMismatch") => (t) => typeof t == "string" && t !== "" && !
|
|
3939
|
+
email: (e = "validation.emailMismatch") => (t) => typeof t == "string" && t !== "" && !Zr.test(t) ? { key: e } : null,
|
|
3899
3940
|
custom: (e, t = {}) => (n) => e(n) ? null : {
|
|
3900
3941
|
key: t.key ?? "validation.badInput",
|
|
3901
3942
|
message: t.message
|
|
3902
3943
|
}
|
|
3903
|
-
},
|
|
3904
|
-
messages:
|
|
3944
|
+
}, $r = /* @__PURE__ */ _n({
|
|
3945
|
+
messages: bn,
|
|
3905
3946
|
language: "en"
|
|
3906
|
-
}),
|
|
3947
|
+
}), ei = (e, t = $r) => ({
|
|
3907
3948
|
...e,
|
|
3908
3949
|
message: e.message ?? t(e.key, {
|
|
3909
3950
|
...e.params,
|
|
3910
3951
|
defaultValue: e.key
|
|
3911
3952
|
})
|
|
3912
|
-
}),
|
|
3913
|
-
function
|
|
3953
|
+
}), ti = (e) => e.errors.length > 0;
|
|
3954
|
+
function ni(e) {
|
|
3914
3955
|
let t = (e, t) => {
|
|
3915
3956
|
let n = [];
|
|
3916
3957
|
for (let r of t.validators ?? []) {
|
|
3917
3958
|
let i = r(e);
|
|
3918
|
-
i && n.push(
|
|
3959
|
+
i && n.push(ei(i, t.translate));
|
|
3919
3960
|
}
|
|
3920
3961
|
return n;
|
|
3921
3962
|
}, n = (e, n) => {
|
|
@@ -3989,7 +4030,7 @@ function $r(e) {
|
|
|
3989
4030
|
}
|
|
3990
4031
|
}, e), i = null, a = (e) => {
|
|
3991
4032
|
let t = r.getProps(), { run: n, value: a } = e, o = Promise.all((t.asyncValidators ?? []).map((e) => e(a))).then((e) => {
|
|
3992
|
-
let t = e.filter((e) => !!e).map((e) =>
|
|
4033
|
+
let t = e.filter((e) => !!e).map((e) => ei(e, r.getProps().translate));
|
|
3993
4034
|
r.send({
|
|
3994
4035
|
type: "ASYNC_RESULT",
|
|
3995
4036
|
run: n,
|
|
@@ -3999,7 +4040,7 @@ function $r(e) {
|
|
|
3999
4040
|
r.send({
|
|
4000
4041
|
type: "ASYNC_RESULT",
|
|
4001
4042
|
run: n,
|
|
4002
|
-
errors: [
|
|
4043
|
+
errors: [ei({ key: "validation.badInput" }, r.getProps().translate)]
|
|
4003
4044
|
});
|
|
4004
4045
|
});
|
|
4005
4046
|
i = o, o.then(() => {
|
|
@@ -4018,14 +4059,14 @@ function $r(e) {
|
|
|
4018
4059
|
}
|
|
4019
4060
|
//#endregion
|
|
4020
4061
|
//#region src/machines/pagination.ts
|
|
4021
|
-
var
|
|
4022
|
-
function
|
|
4062
|
+
var ri = (e, t) => Math.max(1, t > 0 ? Math.ceil(e / t) : 0);
|
|
4063
|
+
function ii(e, t, n) {
|
|
4023
4064
|
if (n <= 0) return [0, 0];
|
|
4024
|
-
let r = Math.min(Math.max(1, e),
|
|
4065
|
+
let r = Math.min(Math.max(1, e), ri(n, t));
|
|
4025
4066
|
return [(r - 1) * t + 1, Math.min(r * t, n)];
|
|
4026
4067
|
}
|
|
4027
|
-
var
|
|
4028
|
-
function
|
|
4068
|
+
var ai = (e, t, n, r = !1) => !r && t !== e && t >= 1 && t <= n;
|
|
4069
|
+
function oi(e, t, n) {
|
|
4029
4070
|
switch (e) {
|
|
4030
4071
|
case "ArrowLeft": return t - 1;
|
|
4031
4072
|
case "ArrowRight": return t + 1;
|
|
@@ -4034,7 +4075,7 @@ function ri(e, t, n) {
|
|
|
4034
4075
|
default: return null;
|
|
4035
4076
|
}
|
|
4036
4077
|
}
|
|
4037
|
-
function
|
|
4078
|
+
function si({ page: e, totalPages: t, siblingCount: n, boundaryCount: r, hideEdges: i = !1 }) {
|
|
4038
4079
|
let a = (t) => i ? [] : [{
|
|
4039
4080
|
key: t,
|
|
4040
4081
|
kind: t,
|
|
@@ -4045,7 +4086,7 @@ function ii({ page: e, totalPages: t, siblingCount: n, boundaryCount: r, hideEdg
|
|
|
4045
4086
|
page: e
|
|
4046
4087
|
});
|
|
4047
4088
|
if (n !== void 0 || r !== void 0) {
|
|
4048
|
-
let i =
|
|
4089
|
+
let i = Qn(t, e, Math.max(0, n ?? 1), Math.max(1, r ?? 1));
|
|
4049
4090
|
return [
|
|
4050
4091
|
...a("prev"),
|
|
4051
4092
|
...i.map((e) => typeof e == "number" ? o(e) : {
|
|
@@ -4056,7 +4097,7 @@ function ii({ page: e, totalPages: t, siblingCount: n, boundaryCount: r, hideEdg
|
|
|
4056
4097
|
...a("next")
|
|
4057
4098
|
];
|
|
4058
4099
|
}
|
|
4059
|
-
let s =
|
|
4100
|
+
let s = Zn(e, t), c = [...a("prev")];
|
|
4060
4101
|
s.length > 0 && s[0] > 1 && (c.push(o(1)), s[0] > 2 && c.push({
|
|
4061
4102
|
key: "jump-prev",
|
|
4062
4103
|
kind: "jump-prev",
|
|
@@ -4070,7 +4111,7 @@ function ii({ page: e, totalPages: t, siblingCount: n, boundaryCount: r, hideEdg
|
|
|
4070
4111
|
page: Math.min(t, e + 5)
|
|
4071
4112
|
}), c.push(o(t))), c.push(...a("next")), c;
|
|
4072
4113
|
}
|
|
4073
|
-
function
|
|
4114
|
+
function ci(e = {}) {
|
|
4074
4115
|
return $({
|
|
4075
4116
|
controlled: ["page", "pageSize"],
|
|
4076
4117
|
initial: (e) => ({
|
|
@@ -4079,7 +4120,7 @@ function ai(e = {}) {
|
|
|
4079
4120
|
}),
|
|
4080
4121
|
reduce(e, t, n) {
|
|
4081
4122
|
if (n.disabled) return e;
|
|
4082
|
-
let r =
|
|
4123
|
+
let r = ri(n.total ?? 0, e.pageSize), i = (t) => t !== null && ai(e.page, t, r) ? {
|
|
4083
4124
|
...e,
|
|
4084
4125
|
page: t
|
|
4085
4126
|
} : e;
|
|
@@ -4089,7 +4130,7 @@ function ai(e = {}) {
|
|
|
4089
4130
|
case "PREV": return i(e.page - 1);
|
|
4090
4131
|
case "FIRST": return i(1);
|
|
4091
4132
|
case "LAST": return i(r);
|
|
4092
|
-
case "KEY": return i(
|
|
4133
|
+
case "KEY": return i(oi(t.key, e.page, r));
|
|
4093
4134
|
case "SET_PAGE_SIZE": return {
|
|
4094
4135
|
page: 1,
|
|
4095
4136
|
pageSize: t.pageSize
|
|
@@ -4104,9 +4145,9 @@ function ai(e = {}) {
|
|
|
4104
4145
|
}
|
|
4105
4146
|
//#endregion
|
|
4106
4147
|
//#region src/machines/rating.ts
|
|
4107
|
-
var
|
|
4108
|
-
function
|
|
4109
|
-
let i = n / (5 * (r ? 2 : 1)), a = n / 5 *
|
|
4148
|
+
var li = 5, ui = 1;
|
|
4149
|
+
function di(e, t, n, r = !0) {
|
|
4150
|
+
let i = n / (5 * (r ? 2 : 1)), a = n / 5 * ui;
|
|
4110
4151
|
switch (e) {
|
|
4111
4152
|
case "ArrowRight":
|
|
4112
4153
|
case "ArrowUp": return Math.min(n, Q(t + i));
|
|
@@ -4119,11 +4160,11 @@ function ci(e, t, n, r = !0) {
|
|
|
4119
4160
|
default: return null;
|
|
4120
4161
|
}
|
|
4121
4162
|
}
|
|
4122
|
-
var
|
|
4123
|
-
let n =
|
|
4124
|
-
return Array.from({ length: 5 }, (e, t) =>
|
|
4163
|
+
var fi = (e, t, n, r = !0) => Q((e + (t && r ? .5 : 1)) / 5 * n), pi = (e, t) => e.hoverStars ?? yr(e.value, t), mi = (e, t) => {
|
|
4164
|
+
let n = pi(e, t);
|
|
4165
|
+
return Array.from({ length: 5 }, (e, t) => br(t, n));
|
|
4125
4166
|
};
|
|
4126
|
-
function
|
|
4167
|
+
function hi(e = {}) {
|
|
4127
4168
|
return $({
|
|
4128
4169
|
controlled: ["value"],
|
|
4129
4170
|
initial: (e) => ({
|
|
@@ -4149,11 +4190,11 @@ function fi(e = {}) {
|
|
|
4149
4190
|
hoverStars: null
|
|
4150
4191
|
};
|
|
4151
4192
|
case "PICK": {
|
|
4152
|
-
let o =
|
|
4193
|
+
let o = fi(t.index, !!t.half, r, i);
|
|
4153
4194
|
return a(n.clearable && o === e.value ? 0 : o);
|
|
4154
4195
|
}
|
|
4155
4196
|
case "KEY": {
|
|
4156
|
-
let n =
|
|
4197
|
+
let n = di(t.key, e.value, r, i);
|
|
4157
4198
|
return n === null ? e : a(n);
|
|
4158
4199
|
}
|
|
4159
4200
|
case "SET": return a(Math.min(r, Math.max(0, t.value)));
|
|
@@ -4172,8 +4213,8 @@ function fi(e = {}) {
|
|
|
4172
4213
|
}
|
|
4173
4214
|
//#endregion
|
|
4174
4215
|
//#region src/machines/number-stepper.ts
|
|
4175
|
-
var
|
|
4176
|
-
function
|
|
4216
|
+
var gi = (e) => e.precision ?? sr(e.step ?? 1), _i = (e, t) => cr(Number(e.toFixed(gi(t))), t.min, t.max), vi = (e, t) => e.draft ?? lr(e.value, gi(t)), yi = (e, t) => !t.disabled && !t.readOnly && (e.value === null || t.max === void 0 || e.value < t.max), bi = (e, t) => !t.disabled && !t.readOnly && (e.value === null || t.min === void 0 || e.value > t.min);
|
|
4217
|
+
function xi(e = {}) {
|
|
4177
4218
|
return $({
|
|
4178
4219
|
controlled: ["value"],
|
|
4179
4220
|
initial: (e) => ({
|
|
@@ -4186,13 +4227,13 @@ function vi(e = {}) {
|
|
|
4186
4227
|
value: t,
|
|
4187
4228
|
draft: null
|
|
4188
4229
|
}, a = (t) => {
|
|
4189
|
-
let r = e.value ??
|
|
4190
|
-
return i(
|
|
4230
|
+
let r = e.value ?? cr(0, n.min, n.max), a = e.value === null ? r : r + t;
|
|
4231
|
+
return i(_i(a, n));
|
|
4191
4232
|
};
|
|
4192
4233
|
switch (t.type) {
|
|
4193
4234
|
case "INCREMENT": return a(r * (t.multiplier ?? 1));
|
|
4194
4235
|
case "DECREMENT": return a(-r * (t.multiplier ?? 1));
|
|
4195
|
-
case "SET": return i(t.value === null || Number.isNaN(t.value) ? null :
|
|
4236
|
+
case "SET": return i(t.value === null || Number.isNaN(t.value) ? null : _i(t.value, n));
|
|
4196
4237
|
case "INPUT": return t.text === e.draft ? e : {
|
|
4197
4238
|
...e,
|
|
4198
4239
|
draft: t.text
|
|
@@ -4200,13 +4241,13 @@ function vi(e = {}) {
|
|
|
4200
4241
|
case "COMMIT": {
|
|
4201
4242
|
if (e.draft === null) return e;
|
|
4202
4243
|
if (e.draft.trim() === "") return i(null);
|
|
4203
|
-
let t =
|
|
4244
|
+
let t = ur(e.draft);
|
|
4204
4245
|
if (t === null) return {
|
|
4205
4246
|
...e,
|
|
4206
4247
|
draft: null
|
|
4207
4248
|
};
|
|
4208
|
-
let r = Number(t.toFixed(
|
|
4209
|
-
return i(n.clampOnBlur ?? !0 ?
|
|
4249
|
+
let r = Number(t.toFixed(gi(n)));
|
|
4250
|
+
return i(n.clampOnBlur ?? !0 ? cr(r, n.min, n.max) : r);
|
|
4210
4251
|
}
|
|
4211
4252
|
case "KEY": {
|
|
4212
4253
|
let o = n.pageMultiplier ?? 10;
|
|
@@ -4230,8 +4271,8 @@ function vi(e = {}) {
|
|
|
4230
4271
|
}
|
|
4231
4272
|
//#endregion
|
|
4232
4273
|
//#region src/machines/toggle.ts
|
|
4233
|
-
var
|
|
4234
|
-
function
|
|
4274
|
+
var Si = (e) => e.indeterminate ? "mixed" : e.checked ? "true" : "false";
|
|
4275
|
+
function Ci(e = {}) {
|
|
4235
4276
|
return $({
|
|
4236
4277
|
controlled: ["checked", "indeterminate"],
|
|
4237
4278
|
initial: (e) => ({
|
|
@@ -4251,7 +4292,7 @@ function bi(e = {}) {
|
|
|
4251
4292
|
}
|
|
4252
4293
|
}, e);
|
|
4253
4294
|
}
|
|
4254
|
-
function
|
|
4295
|
+
function wi(e = {}) {
|
|
4255
4296
|
return $({
|
|
4256
4297
|
controlled: ["checked"],
|
|
4257
4298
|
initial: (e) => ({ checked: e.checked ?? e.defaultChecked ?? !1 }),
|
|
@@ -4265,8 +4306,8 @@ function xi(e = {}) {
|
|
|
4265
4306
|
}
|
|
4266
4307
|
}, e);
|
|
4267
4308
|
}
|
|
4268
|
-
var
|
|
4269
|
-
function
|
|
4309
|
+
var Ti = (e, t) => e.find((e) => e.value === t && !e.disabled) ?? e.find((e) => !e.disabled);
|
|
4310
|
+
function Ei(e = {}) {
|
|
4270
4311
|
let t = (e, t) => !!e.items?.find((e) => e.value === t)?.disabled;
|
|
4271
4312
|
return $({
|
|
4272
4313
|
controlled: ["value"],
|
|
@@ -4290,7 +4331,7 @@ function Ci(e = {}) {
|
|
|
4290
4331
|
};
|
|
4291
4332
|
case "NAVIGATE": {
|
|
4292
4333
|
if (r.disabled || n.key === "Home" || n.key === "End") return e;
|
|
4293
|
-
let t = n.items ?? r.items ?? [], i = e.focusedValue ?? e.value, a =
|
|
4334
|
+
let t = n.items ?? r.items ?? [], i = e.focusedValue ?? e.value, a = Vn({
|
|
4294
4335
|
currentIndex: t.findIndex((e) => e.value === i),
|
|
4295
4336
|
count: t.length,
|
|
4296
4337
|
key: n.key,
|
|
@@ -4315,6 +4356,6 @@ function Ci(e = {}) {
|
|
|
4315
4356
|
}, e);
|
|
4316
4357
|
}
|
|
4317
4358
|
//#endregion
|
|
4318
|
-
export {
|
|
4359
|
+
export { yn as DEFAULT_LANGUAGE, hr as DEFAULT_TAG_SEPARATORS, p as DENSITIES, S as DESIGN_ATTRIBUTES, ee as DESIGN_PRESETS, r as DEV_MESSAGE_PREFIX, g as FONT_SCALES, wt as MINI_CLASS_PREFIX, Tt as MINI_ROOT_SELECTOR, Xn as PAGINATION_JUMP_SIZE, u as PALETTES, m as RADIUS_SCALES, li as RATING_STAR_COUNT, ke as ROLE_COLORS, h as SHADOW_SCALES, vn as SUPPORTED_LANGUAGES, Mr as TOAST_DEFAULT_DURATION, Nr as TOAST_DEFAULT_EXIT_DURATION, tr as addDays, Ee as baseTokens, bi as canDecrementStepper, ai as canGoToPage, yi as canIncrementStepper, Dr as changedKey, cr as clampNumber, Sr as cn, Qe as colorMix, In as commandSearchText, qn as compareTableValues, Wn as computeFixedColumnLayout, Ci as createCheckboxMachine, n as createControllableState, Ar as createDisclosureMachine, ni as createFieldMachine, t as createId, $ as createMachine, xi as createNumberStepperMachine, ci as createPaginationMachine, Jr as createPickerMachine, Ei as createRadioGroupMachine, hi as createRatingMachine, Rr as createSelectionMachine, wr as createStore, wi as createSwitchMachine, Hr as createTabsMachine, Fr as createToastQueue, _n as createTranslator, Hn as createTypeahead, F as dark, er as dayKey, Tr as defaultScheduler, Me as defaultThemeTokens, me as densityTokens, oe as designAttributes, _ as designPresets, sn as fallbackPluralCategory, Qr as fieldValidators, _r as findCascaderPath, vr as flattenCascaderOptions, Ve as fontFamilyTokens, Te as fontScaleTokens, be as fontSizeTokens, Ue as forcedColorsTokens, V as formatColor, i as formatDevMessage, jn as formatHasSeconds, zn as formatHotkey, lr as formatNumberValue, wn as formatTime, zt as generateMiniTokensCss, Bt as generateMiniTokensFiles, Ct as generateTokensCss, Si as getCheckboxAriaChecked, Jn as getColumnCompare, Qn as getCompactPageItems, Vn as getNextIndex, vi as getNumberStepperText, Zn as getPageRange, si as getPaginationItems, oi as getPaginationKeyTarget, ii as getPaginationVisibleRange, Wr as getPickerColumns, Gr as getPickerSelectedOptions, un as getPluralCategory, Ti as getRadioGroupTabStop, pi as getRatingDisplayStars, di as getRatingKeyValue, fi as getRatingPickValue, mi as getRatingStarFills, zr as getTabsNavigationIndex, Br as getTabsTabStop, Pr as getToastOverflow, ri as getTotalPages, pr as getVirtualRange, Fe as githubDark, sr as inferStepPrecision, mn as interpolate, y as isDensity, b as isDesignPreset, kr as isDisclosurePresent, Yr as isEmptyFieldValue, ti as isFieldInvalid, re as isFontScale, f as isPalette, te as isRadiusScale, s as isSafeUrl, Ir as isSelected, ne as isShadowScale, xn as isSupportedLanguage, d as isThemeMode, ze as isThemeName, Pe as light, we as lineHeightTokens, l as linkRel, $n as localDate, mr as matchesAccept, Rn as matchesHotkey, Pn as matchesShortcut, Y as mergeMessages, bn as messages, J as miniColorClass, kt as miniTokenClassNames, Ye as mixRgba, nr as monthStart, Yn as nextSortState, $e as normalizeColor, Fn as normalizeSearchText, Nn as normalizeShortcuts, _i as normalizeStepperValue, I as palettes, B as parseColor, or as parseDayKey, ur as parseNumberDraft, Tn as parseTimeInput, On as parseTimeValue, ie as presetPalette, he as radiusTokens, yr as ratingDisplayStars, br as ratingStarFill, He as reducedMotionTokens, x as resolveDesign, fr as resolveSize, dr as resolveSpace, Mn as resolveTimeFormat, W as resolveTokens, Ae as roleTokens, Q as roundRating, rr as sameMonth, c as sanitizeUrl, L as scaleTokens, An as secondsOfDay, Oe as semanticTokens, _e as shadowTokens, Cr as shallowEqual, Be as spaceTokens, gr as splitBySeparators, En as startOfToday, Le as themeKeys, Re as themes, ei as toFieldError, kn as toTimeValue, pt as tokenCascade, ft as tokenKind, A as tokenToCss, gn as translate };
|
|
4319
4360
|
|
|
4320
4361
|
//# sourceMappingURL=index.js.map
|