@povio/ui 5.0.0-rc.3 → 5.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/{Breadcrumbs-CbKzAq1v.js → Breadcrumbs-FF8hMfXd.js} +1 -1
- package/dist/{Calendar-CVSQH-rC.js → Calendar-BTjajO6i.js} +6 -136
- package/dist/{Checkbox-BU0d702K.js → Checkbox-CV1ILXXO.js} +1 -1
- package/dist/{CheckboxCheckmark-usHsolNj.js → CheckboxCheckmark-CpC3wlMs.js} +1 -1
- package/dist/{ComponentGallery-DIFeJqGx.js → ComponentGallery-BWiPGUL8.js} +1343 -206
- package/dist/{DatePicker-D95gDPhg.js → DatePicker-DOLL7mkc.js} +12 -12
- package/dist/{DatePickerInput-CX6NYim4.js → DatePickerInput-BLBcySA2.js} +8 -7
- package/dist/{DateRangePicker-_uTQk_ae.js → DateRangePicker-BF-1CztH.js} +13 -185
- package/dist/{DateTimePicker-BB058Z34.js → DateTimePicker-Cj0qvJUz.js} +12 -12
- package/dist/{FileInput-C0-6bw4w.js → FileInput-Br5DQaGQ.js} +3 -2
- package/dist/{FileTrigger-CDXcQthK.js → FileTrigger-Cthk5_Wp.js} +1 -30
- package/dist/{FileUpload-DDpYMn8f.js → FileUpload--7ub3EZO.js} +3 -2
- package/dist/{FormField-U_-d4V_g.js → FormField-B99dLt8o.js} +1 -1
- package/dist/{FormFieldHeaderTooltip-DXbuu88v.js → FormFieldHeaderTooltip-BV2Ju4oB.js} +1 -1
- package/dist/{InlineTooltipWrapper-Bpmd--e7.js → InlineTooltipWrapper-BpApaGXV.js} +1 -1
- package/dist/{InputItem-D-KuiNSc.js → InputItem-CIxbTxZu.js} +10 -10
- package/dist/{Inputs-j3JmcLWR.js → Inputs-DJSKiaWY.js} +1 -1
- package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
- package/dist/{NumberRangeInput-C-8U05wF.js → NumberRangeInput-B8-LHfg3.js} +6 -5
- package/dist/{RadioGroup-B7_pNwn9.js → RadioGroup-DOw3PRoX.js} +1 -1
- package/dist/{RichTextEditor-D9-B1Cze.js → RichTextEditor-D4yN7Wj7.js} +2 -2
- package/dist/{Select-CkujlTjm.js → Select-UR0ec2Ux.js} +2 -2
- package/dist/{Slider-BHPl0OPy.js → Slider-CzEmKYBF.js} +1 -1
- package/dist/{Table-BDNSuEWc.js → Table-piX1SWvN.js} +1 -1
- package/dist/{TextArea-DqHDiRGJ.js → TextArea-D8WkKsGn.js} +3 -3
- package/dist/{TimePicker-DQ6JCkGB.js → TimePicker-C4taAOFQ.js} +10 -9
- package/dist/{ToggleGroup-DX0VYXwP.js → ToggleGroup-DOk27fgI.js} +5 -66
- package/dist/{Tooltip-B9DKcYvr.js → Tooltip-CpG1nz7Y.js} +2 -2
- package/dist/{TooltipWrapper-DznDgVJB.js → TooltipWrapper-3jyN0Wss.js} +1 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/number-field.js +7 -6
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination.js +32 -28
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/config/ui-configurator-theme.js +1 -1
- package/dist/config/ui-configurator.js +1081 -257
- package/dist/config/ui-router.js +1 -1
- package/dist/{datePickerValue.utils-CUzkWie8.js → datePickerValue.utils-DCgoSrP3.js} +5 -5
- package/dist/hooks/use-filters.js +1 -1
- package/dist/index.js +15 -15
- package/dist/numberStatic.utils-BX50PSee.js +421 -0
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.js +15 -15
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
- package/dist/staticDateTimeSegments-DtU63_dw.js +1764 -0
- package/dist/{staticSelect.utils-BemUyaaA.js → staticSelect.utils-uHa8f_c6.js} +5 -144
- package/dist/styles/configurator.css +731 -218
- package/dist/{table.cva-BikE8qJH.js → table.cva-DlMT-zLD.js} +2 -3
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.js +27 -27
- package/dist/theme-model-DtYPxNvH.js +406 -0
- package/dist/upload-CXU83BJ4.js +30 -0
- package/dist/useControlledState-CzXkZCX8.js +30 -0
- package/dist/{useFieldAccessibility-B4MVL6fz.js → useFieldAccessibility-ScC6Mtd5.js} +2 -2
- package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
- package/dist/{useFormAutosave-Mg-tdwMh.js → useFormAutosave-DfuP7drj.js} +1 -1
- package/dist/{useStaticInputHandoff-CvSBPUB3.js → useStaticInputHandoff-NeZVnci-.js} +3 -3
- package/dist/{useTableColumnConfig-gfVame8v.js → useTableColumnConfig-BTGZiluz.js} +3 -3
- package/package.json +1 -1
- package/src/configurator/README.md +3 -3
- package/dist/FocusScope-CO9oJ1sc.js +0 -343
- package/dist/chain-DIXr2VAT.js +0 -10
- package/dist/focusSafely-DCGrr2bb.js +0 -447
- package/dist/getScrollParent-kSR7EtoT.js +0 -47
- package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
- package/dist/openLink-CQhMhfzO.js +0 -121
- package/dist/platform-BXNIIAfU.js +0 -42
- package/dist/staticDateTimeSegments-CsCE9Buo.js +0 -3604
- package/dist/theme-model-C-QMCksE.js +0 -136
- package/dist/useControlledState-DQxX6LMN.js +0 -189
- package/dist/useFocusable-Bd0UsrQ7.js +0 -63
- package/dist/useFormValidationState-D3z-gafz.js +0 -1341
- package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
- package/dist/useSyncRef-RGMv0rXK.js +0 -338
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
//#region src/configurator/theme-model.ts
|
|
2
|
-
const groups = [
|
|
3
|
-
"Colors",
|
|
4
|
-
"Typography",
|
|
5
|
-
"Spacing",
|
|
6
|
-
"Radius",
|
|
7
|
-
"Sizing",
|
|
8
|
-
"Effects"
|
|
9
|
-
];
|
|
10
|
-
const declarations = (source) => Object.fromEntries([...source.matchAll(/(--[\w-]+)\s*:\s*([^;]+);/g)].map(([, name, value]) => [name, value.trim()]));
|
|
11
|
-
const selectorDeclarations = (source, selector) => Object.assign({}, ...[...source.matchAll(selector)].map((match) => declarations(match[1])));
|
|
12
|
-
const parseThemeCss = (themeSource) => ({
|
|
13
|
-
light: selectorDeclarations(themeSource, /:root\s*\{([^}]+)\}/g),
|
|
14
|
-
dark: selectorDeclarations(themeSource, /\.dark\s*\{([^}]+)\}/g),
|
|
15
|
-
theme: declarations([...themeSource.matchAll(/@theme(?:\s+static)?\s*\{([^}]+)\}/g)].map((match) => match[1]).join("\n"))
|
|
16
|
-
});
|
|
17
|
-
function groupFor(name) {
|
|
18
|
-
if (name.startsWith("--color-") || name.endsWith("-base")) return "Colors";
|
|
19
|
-
if (/^--(font|text|tracking)-/.test(name)) return "Typography";
|
|
20
|
-
if (name.startsWith("--spacing-")) return "Spacing";
|
|
21
|
-
if (name.startsWith("--radius-")) return "Radius";
|
|
22
|
-
if (name.startsWith("--container-")) return "Sizing";
|
|
23
|
-
return "Effects";
|
|
24
|
-
}
|
|
25
|
-
const labelFor = (name) => name.replace(/^--/, "").replace(/-base$/, "").replaceAll("-", " ");
|
|
26
|
-
const isRgb = (value) => /^\d+\s+\d+\s+\d+$/.test(value);
|
|
27
|
-
const toHex = (value) => `#${value.split(/\s+/).map((part) => Number(part).toString(16).padStart(2, "0")).join("")}`;
|
|
28
|
-
const toRgb = (hex) => [
|
|
29
|
-
1,
|
|
30
|
-
3,
|
|
31
|
-
5
|
|
32
|
-
].map((offset) => parseInt(hex.slice(offset, offset + 2), 16)).join(" ");
|
|
33
|
-
function validToken(name, value, original) {
|
|
34
|
-
if (!value.trim() || /[;{}<>]/.test(value)) return false;
|
|
35
|
-
if (isRgb(original)) return isRgb(value) && value.split(/\s+/).every((part) => Number(part) <= 255);
|
|
36
|
-
if (name.endsWith("-base") && /^var\(--[\w-]+\)$/.test(original)) return /^var\(--[\w-]+\)$/.test(value) || isRgb(value) && value.split(/\s+/).every((part) => Number(part) <= 255);
|
|
37
|
-
const property = name.startsWith("--color-") || /^#[0-9a-f]+$/i.test(original) ? "color" : name.startsWith("--font-weight-") ? "font-weight" : name.startsWith("--font-") ? "font-family" : name.endsWith("--line-height") ? "line-height" : name.endsWith("--letter-spacing") || name.startsWith("--tracking-") ? "letter-spacing" : name.startsWith("--shadow-") || name.startsWith("--drop-shadow-") ? "box-shadow" : "width";
|
|
38
|
-
return CSS.supports(property, value);
|
|
39
|
-
}
|
|
40
|
-
const emptyTheme = () => ({
|
|
41
|
-
light: {},
|
|
42
|
-
dark: {},
|
|
43
|
-
theme: {}
|
|
44
|
-
});
|
|
45
|
-
function previewTokens(defaults, edits, mode) {
|
|
46
|
-
return mode === "dark" ? {
|
|
47
|
-
...defaults.theme,
|
|
48
|
-
...edits.theme,
|
|
49
|
-
...defaults.light,
|
|
50
|
-
...edits.light,
|
|
51
|
-
...defaults.dark,
|
|
52
|
-
...edits.dark
|
|
53
|
-
} : {
|
|
54
|
-
...defaults.theme,
|
|
55
|
-
...edits.theme,
|
|
56
|
-
...defaults.light,
|
|
57
|
-
...edits.light
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/** Numbered RGB shades in the root theme form the shared base palette. */
|
|
61
|
-
/**
|
|
62
|
-
* Tailwind-style shade weights around a 500 base: lighter steps mix toward white by the weight, darker steps scale
|
|
63
|
-
* the channels by it. Matches common Tailwind shade generators, extended with the 10, 950 and 1000 steps used here.
|
|
64
|
-
*/
|
|
65
|
-
const lighten = {
|
|
66
|
-
10: .98,
|
|
67
|
-
50: .95,
|
|
68
|
-
100: .9,
|
|
69
|
-
200: .75,
|
|
70
|
-
300: .6,
|
|
71
|
-
400: .3,
|
|
72
|
-
500: 0
|
|
73
|
-
};
|
|
74
|
-
const darken = {
|
|
75
|
-
500: 1,
|
|
76
|
-
600: .9,
|
|
77
|
-
700: .6,
|
|
78
|
-
800: .45,
|
|
79
|
-
900: .3,
|
|
80
|
-
950: .2,
|
|
81
|
-
1e3: .15
|
|
82
|
-
};
|
|
83
|
-
/** Interpolates a weight for steps between the known ones, such as 150 or 850. */
|
|
84
|
-
function weightFor(table, step) {
|
|
85
|
-
const known = Object.keys(table).map(Number).sort((a, b) => a - b);
|
|
86
|
-
if (step <= known[0]) return table[known[0]];
|
|
87
|
-
if (step >= known.at(-1)) return table[known.at(-1)];
|
|
88
|
-
const upper = known.findIndex((value) => value >= step);
|
|
89
|
-
const [low, high] = [known[upper - 1], known[upper]];
|
|
90
|
-
return table[low] + (table[high] - table[low]) * (step - low) / (high - low);
|
|
91
|
-
}
|
|
92
|
-
/** Generates a palette's RGB channel values from its 500 color, keyed by step. */
|
|
93
|
-
function generateShades(baseRgb, steps) {
|
|
94
|
-
const channels = baseRgb.split(/\s+/).map(Number);
|
|
95
|
-
return Object.fromEntries(steps.map((step) => {
|
|
96
|
-
return [step, (step <= 500 ? channels.map((channel) => channel + (255 - channel) * weightFor(lighten, step)) : channels.map((channel) => channel * weightFor(darken, step))).map((channel) => Math.round(channel)).join(" ")];
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
function baseColorNames(defaults) {
|
|
100
|
-
return new Set(Object.entries(defaults.light).filter(([name, value]) => /^--[\w-]+-\d+-base$/.test(name) && isRgb(value) && !(name in defaults.dark)).map(([name]) => name));
|
|
101
|
-
}
|
|
102
|
-
function exportCss(edits, defaults) {
|
|
103
|
-
const block = (selector, values) => {
|
|
104
|
-
const entries = Object.entries(values).sort(([a], [b]) => a.localeCompare(b));
|
|
105
|
-
return entries.length ? `${selector} {\n${entries.map(([key, value]) => ` ${key}: ${value};`).join("\n")}\n}\n` : "";
|
|
106
|
-
};
|
|
107
|
-
return "/* Import after your Povio UI theme in your Tailwind CSS entrypoint. */\n\n" + (block(":root", edits.light) + block(".dark", {
|
|
108
|
-
...darkFallback(defaults, edits),
|
|
109
|
-
...edits.dark
|
|
110
|
-
}) + block("@theme", edits.theme) || "/* No token overrides. */\n");
|
|
111
|
-
}
|
|
112
|
-
/** Runtime rules must use ordinary selectors: Tailwind directives only work at build time. */
|
|
113
|
-
function runtimeCss(defaults, edits) {
|
|
114
|
-
const block = (selector, values) => `${selector} {${Object.entries(values).map(([key, value]) => `${key}: ${value};`).join(" ")}}`;
|
|
115
|
-
return block(":root", {
|
|
116
|
-
...referencedThemeTokens(defaults, edits.theme),
|
|
117
|
-
...edits.theme,
|
|
118
|
-
...edits.light
|
|
119
|
-
}) + block(".dark", {
|
|
120
|
-
...darkFallback(defaults, edits),
|
|
121
|
-
...edits.dark
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Tailwind only emits `@theme` variables that utilities use, so an edit aliasing another theme token (for example
|
|
126
|
-
* `var(--radius-global-rounding-m)`) redeclares that token's value to make sure it resolves at runtime.
|
|
127
|
-
*/
|
|
128
|
-
function referencedThemeTokens(defaults, edits) {
|
|
129
|
-
const referenced = Object.values(edits).flatMap((value) => [...value.matchAll(/var\((--[\w-]+)/g)].map((match) => match[1]));
|
|
130
|
-
return Object.fromEntries(referenced.filter((name) => name in defaults.theme && !(name in edits)).map((name) => [name, defaults.theme[name]]));
|
|
131
|
-
}
|
|
132
|
-
function darkFallback(defaults, edits) {
|
|
133
|
-
return Object.fromEntries(Object.keys(edits.light).filter((key) => key in defaults.dark).map((key) => [key, defaults.dark[key]]));
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
|
-
export { groupFor as a, labelFor as c, runtimeCss as d, toHex as f, generateShades as i, parseThemeCss as l, validToken as m, emptyTheme as n, groups as o, toRgb as p, exportCss as r, isRgb as s, baseColorNames as t, previewTokens as u };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { i as $c7eafbbe1ea5834e$export$535bd6ca7f90a273 } from "./focusSafely-DCGrr2bb.js";
|
|
2
|
-
import $ahdqC$react, { useCallback, useContext, useEffect, useReducer, useRef, useState } from "react";
|
|
3
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/i18n/utils.mjs
|
|
4
|
-
const $d805ff57cab8bee2$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
5
|
-
"Arab",
|
|
6
|
-
"Syrc",
|
|
7
|
-
"Samr",
|
|
8
|
-
"Mand",
|
|
9
|
-
"Thaa",
|
|
10
|
-
"Mend",
|
|
11
|
-
"Nkoo",
|
|
12
|
-
"Adlm",
|
|
13
|
-
"Rohg",
|
|
14
|
-
"Hebr"
|
|
15
|
-
]);
|
|
16
|
-
const $d805ff57cab8bee2$var$RTL_LANGS = /* @__PURE__ */ new Set([
|
|
17
|
-
"ae",
|
|
18
|
-
"ar",
|
|
19
|
-
"arc",
|
|
20
|
-
"bcc",
|
|
21
|
-
"bqi",
|
|
22
|
-
"ckb",
|
|
23
|
-
"dv",
|
|
24
|
-
"fa",
|
|
25
|
-
"glk",
|
|
26
|
-
"he",
|
|
27
|
-
"ku",
|
|
28
|
-
"mzn",
|
|
29
|
-
"nqo",
|
|
30
|
-
"pnb",
|
|
31
|
-
"ps",
|
|
32
|
-
"sd",
|
|
33
|
-
"ug",
|
|
34
|
-
"ur",
|
|
35
|
-
"yi"
|
|
36
|
-
]);
|
|
37
|
-
function $d805ff57cab8bee2$export$702d680b21cbd764(localeString) {
|
|
38
|
-
if (Intl.Locale) {
|
|
39
|
-
let locale = new Intl.Locale(localeString).maximize();
|
|
40
|
-
let textInfo = typeof locale.getTextInfo === "function" ? locale.getTextInfo() : locale.textInfo;
|
|
41
|
-
if (textInfo) return textInfo.direction === "rtl";
|
|
42
|
-
if (locale.script) return $d805ff57cab8bee2$var$RTL_SCRIPTS.has(locale.script);
|
|
43
|
-
}
|
|
44
|
-
let lang = localeString.split("-")[0];
|
|
45
|
-
return $d805ff57cab8bee2$var$RTL_LANGS.has(lang);
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/i18n/useDefaultLocale.mjs
|
|
49
|
-
const $520a025cdb0d710d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
|
|
50
|
-
function $520a025cdb0d710d$export$f09106e7c6677ec5() {
|
|
51
|
-
let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
52
|
-
try {
|
|
53
|
-
Intl.DateTimeFormat.supportedLocalesOf([locale]);
|
|
54
|
-
} catch {
|
|
55
|
-
locale = "en-US";
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
locale,
|
|
59
|
-
direction: $d805ff57cab8bee2$export$702d680b21cbd764(locale) ? "rtl" : "ltr"
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
let $520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
63
|
-
let $520a025cdb0d710d$var$listeners = /* @__PURE__ */ new Set();
|
|
64
|
-
function $520a025cdb0d710d$var$updateLocale() {
|
|
65
|
-
$520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
|
|
66
|
-
for (let listener of $520a025cdb0d710d$var$listeners) listener($520a025cdb0d710d$var$currentLocale);
|
|
67
|
-
}
|
|
68
|
-
function $520a025cdb0d710d$export$188ec29ebc2bdc3a() {
|
|
69
|
-
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
70
|
-
let [defaultLocale, setDefaultLocale] = useState($520a025cdb0d710d$var$currentLocale);
|
|
71
|
-
useEffect(() => {
|
|
72
|
-
if ($520a025cdb0d710d$var$listeners.size === 0) window.addEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
73
|
-
$520a025cdb0d710d$var$listeners.add(setDefaultLocale);
|
|
74
|
-
return () => {
|
|
75
|
-
$520a025cdb0d710d$var$listeners.delete(setDefaultLocale);
|
|
76
|
-
if ($520a025cdb0d710d$var$listeners.size === 0) window.removeEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
|
|
77
|
-
};
|
|
78
|
-
}, []);
|
|
79
|
-
if (isSSR) return {
|
|
80
|
-
locale: typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol] || "en-US",
|
|
81
|
-
direction: "ltr"
|
|
82
|
-
};
|
|
83
|
-
return defaultLocale;
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/i18n/I18nProvider.mjs
|
|
87
|
-
const $2eb8e6d23f3d0cb0$var$I18nContext = /*#__PURE__*/ $ahdqC$react.createContext(null);
|
|
88
|
-
function $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7() {
|
|
89
|
-
let defaultLocale = $520a025cdb0d710d$export$188ec29ebc2bdc3a();
|
|
90
|
-
return useContext($2eb8e6d23f3d0cb0$var$I18nContext) || defaultLocale;
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/filterDOMProps.mjs
|
|
94
|
-
const $8e9d2fae0ecb9001$var$DOMPropNames = /* @__PURE__ */ new Set(["id"]);
|
|
95
|
-
const $8e9d2fae0ecb9001$var$labelablePropNames = /* @__PURE__ */ new Set([
|
|
96
|
-
"aria-label",
|
|
97
|
-
"aria-labelledby",
|
|
98
|
-
"aria-describedby",
|
|
99
|
-
"aria-details"
|
|
100
|
-
]);
|
|
101
|
-
const $8e9d2fae0ecb9001$var$linkPropNames = /* @__PURE__ */ new Set([
|
|
102
|
-
"href",
|
|
103
|
-
"hrefLang",
|
|
104
|
-
"target",
|
|
105
|
-
"rel",
|
|
106
|
-
"download",
|
|
107
|
-
"ping",
|
|
108
|
-
"referrerPolicy"
|
|
109
|
-
]);
|
|
110
|
-
const $8e9d2fae0ecb9001$var$globalAttrs = /* @__PURE__ */ new Set([
|
|
111
|
-
"dir",
|
|
112
|
-
"lang",
|
|
113
|
-
"hidden",
|
|
114
|
-
"inert",
|
|
115
|
-
"translate"
|
|
116
|
-
]);
|
|
117
|
-
const $8e9d2fae0ecb9001$var$globalEvents = /* @__PURE__ */ new Set([
|
|
118
|
-
"onClick",
|
|
119
|
-
"onAuxClick",
|
|
120
|
-
"onContextMenu",
|
|
121
|
-
"onDoubleClick",
|
|
122
|
-
"onMouseDown",
|
|
123
|
-
"onMouseEnter",
|
|
124
|
-
"onMouseLeave",
|
|
125
|
-
"onMouseMove",
|
|
126
|
-
"onMouseOut",
|
|
127
|
-
"onMouseOver",
|
|
128
|
-
"onMouseUp",
|
|
129
|
-
"onTouchCancel",
|
|
130
|
-
"onTouchEnd",
|
|
131
|
-
"onTouchMove",
|
|
132
|
-
"onTouchStart",
|
|
133
|
-
"onPointerDown",
|
|
134
|
-
"onPointerMove",
|
|
135
|
-
"onPointerUp",
|
|
136
|
-
"onPointerCancel",
|
|
137
|
-
"onPointerEnter",
|
|
138
|
-
"onPointerLeave",
|
|
139
|
-
"onPointerOver",
|
|
140
|
-
"onPointerOut",
|
|
141
|
-
"onGotPointerCapture",
|
|
142
|
-
"onLostPointerCapture",
|
|
143
|
-
"onScroll",
|
|
144
|
-
"onWheel",
|
|
145
|
-
"onAnimationStart",
|
|
146
|
-
"onAnimationEnd",
|
|
147
|
-
"onAnimationIteration",
|
|
148
|
-
"onTransitionCancel",
|
|
149
|
-
"onTransitionEnd",
|
|
150
|
-
"onTransitionRun",
|
|
151
|
-
"onTransitionStart"
|
|
152
|
-
]);
|
|
153
|
-
const $8e9d2fae0ecb9001$var$propRe = /^(data-.*)$/;
|
|
154
|
-
function $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
155
|
-
let { labelable, isLink, global, events = global, propNames } = opts;
|
|
156
|
-
let filteredProps = {};
|
|
157
|
-
for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($8e9d2fae0ecb9001$var$DOMPropNames.has(prop) || labelable && $8e9d2fae0ecb9001$var$labelablePropNames.has(prop) || isLink && $8e9d2fae0ecb9001$var$linkPropNames.has(prop) || global && $8e9d2fae0ecb9001$var$globalAttrs.has(prop) || events && ($8e9d2fae0ecb9001$var$globalEvents.has(prop) || prop.endsWith("Capture") && $8e9d2fae0ecb9001$var$globalEvents.has(prop.slice(0, -7))) || propNames?.has(prop) || $8e9d2fae0ecb9001$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
158
|
-
return filteredProps;
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/utils/useControlledState.mjs
|
|
162
|
-
const $3e6197669829fe11$var$useEarlyEffect = typeof document !== "undefined" ? $ahdqC$react["useInsertionEffect"] ?? $ahdqC$react.useLayoutEffect : () => {};
|
|
163
|
-
function $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
164
|
-
let [stateValue, setStateValue] = useState(value || defaultValue);
|
|
165
|
-
let valueRef = useRef(stateValue);
|
|
166
|
-
let isControlledRef = useRef(value !== void 0);
|
|
167
|
-
let isControlled = value !== void 0;
|
|
168
|
-
useEffect(() => {
|
|
169
|
-
let wasControlled = isControlledRef.current;
|
|
170
|
-
if (wasControlled !== isControlled && true) console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
171
|
-
isControlledRef.current = isControlled;
|
|
172
|
-
}, [isControlled]);
|
|
173
|
-
let currentValue = isControlled ? value : stateValue;
|
|
174
|
-
$3e6197669829fe11$var$useEarlyEffect(() => {
|
|
175
|
-
valueRef.current = currentValue;
|
|
176
|
-
});
|
|
177
|
-
let [, forceUpdate] = useReducer(() => ({}), {});
|
|
178
|
-
return [currentValue, useCallback((value, ...args) => {
|
|
179
|
-
let newValue = typeof value === "function" ? value(valueRef.current) : value;
|
|
180
|
-
if (!Object.is(valueRef.current, newValue)) {
|
|
181
|
-
valueRef.current = newValue;
|
|
182
|
-
setStateValue(newValue);
|
|
183
|
-
forceUpdate();
|
|
184
|
-
onChange?.(newValue, ...args);
|
|
185
|
-
}
|
|
186
|
-
}, [onChange])];
|
|
187
|
-
}
|
|
188
|
-
//#endregion
|
|
189
|
-
export { $8e9d2fae0ecb9001$export$457c3d6518dd4c6f as n, $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 as r, $3e6197669829fe11$export$40bfa8c7b0832715 as t };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { i as $23f2114a1b82827e$export$e58f029f0fbfdb29, r as $23f2114a1b82827e$export$cd4e5573fbe2b576, s as $d447af545b77c9f1$export$b204af158042fbac } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
2
|
-
import { l as $a92dc41f639950be$export$715c682d09d639cc, t as $f192c2f16961cbe0$export$80f3e147d781571c } from "./focusSafely-DCGrr2bb.js";
|
|
3
|
-
import { n as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, r as $bbaa08b3cd72f041$export$9d1611c77c2fe928, t as $b7115c395c64f7b5$export$4debdb1a3f0fa79e } from "./useSyncRef-RGMv0rXK.js";
|
|
4
|
-
import $ahdqC$react, { useCallback, useContext, useEffect, useRef } from "react";
|
|
5
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/useFocus.mjs
|
|
6
|
-
function $1e74c67db218ce67$export$f8168d8dd8fd66e6(props) {
|
|
7
|
-
let { isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
|
|
8
|
-
const onBlur = useCallback((e) => {
|
|
9
|
-
if ($23f2114a1b82827e$export$e58f029f0fbfdb29(e) === e.currentTarget) {
|
|
10
|
-
if (onBlurProp) onBlurProp(e);
|
|
11
|
-
if (onFocusChange) onFocusChange(false);
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
}, [onBlurProp, onFocusChange]);
|
|
15
|
-
const onSyntheticFocus = $a92dc41f639950be$export$715c682d09d639cc(onBlur);
|
|
16
|
-
const onFocus = useCallback((e) => {
|
|
17
|
-
let eventTarget = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
18
|
-
const ownerDocument = $d447af545b77c9f1$export$b204af158042fbac(eventTarget);
|
|
19
|
-
const activeElement = ownerDocument ? $23f2114a1b82827e$export$cd4e5573fbe2b576(ownerDocument) : $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
20
|
-
if (eventTarget === e.currentTarget && eventTarget === activeElement) {
|
|
21
|
-
if (onFocusProp) onFocusProp(e);
|
|
22
|
-
if (onFocusChange) onFocusChange(true);
|
|
23
|
-
onSyntheticFocus(e);
|
|
24
|
-
}
|
|
25
|
-
}, [
|
|
26
|
-
onFocusChange,
|
|
27
|
-
onFocusProp,
|
|
28
|
-
onSyntheticFocus
|
|
29
|
-
]);
|
|
30
|
-
return { focusProps: {
|
|
31
|
-
onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
|
|
32
|
-
onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : void 0
|
|
33
|
-
} };
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/interactions/useFocusable.mjs
|
|
37
|
-
let $d1116acdf220c2da$export$f9762fab77588ecb = /*#__PURE__*/ $ahdqC$react.createContext(null);
|
|
38
|
-
function $d1116acdf220c2da$var$useFocusableContext(ref) {
|
|
39
|
-
let context = useContext($d1116acdf220c2da$export$f9762fab77588ecb) || {};
|
|
40
|
-
$b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref);
|
|
41
|
-
let { ref: _, ...otherProps } = context;
|
|
42
|
-
return otherProps;
|
|
43
|
-
}
|
|
44
|
-
function $d1116acdf220c2da$export$4c014de7c8940b4c(props, domRef) {
|
|
45
|
-
let { focusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6(props);
|
|
46
|
-
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd(props);
|
|
47
|
-
let interactions = $bbaa08b3cd72f041$export$9d1611c77c2fe928(focusProps, keyboardProps);
|
|
48
|
-
let domProps = $d1116acdf220c2da$var$useFocusableContext(domRef);
|
|
49
|
-
let interactionProps = props.isDisabled ? {} : domProps;
|
|
50
|
-
let autoFocusRef = useRef(props.autoFocus);
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (autoFocusRef.current && domRef.current) $f192c2f16961cbe0$export$80f3e147d781571c(domRef.current);
|
|
53
|
-
autoFocusRef.current = false;
|
|
54
|
-
}, [domRef]);
|
|
55
|
-
let tabIndex = props.excludeFromTabOrder ? -1 : 0;
|
|
56
|
-
if (props.isDisabled) tabIndex = void 0;
|
|
57
|
-
return { focusableProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928({
|
|
58
|
-
...interactions,
|
|
59
|
-
tabIndex
|
|
60
|
-
}, interactionProps) };
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
export { $1e74c67db218ce67$export$f8168d8dd8fd66e6 as n, $d1116acdf220c2da$export$4c014de7c8940b4c as t };
|