@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
|
|
2
|
+
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/upload.mjs
|
|
3
|
+
/**
|
|
4
|
+
* @license lucide-react v1.43.0 - ISC
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the ISC license.
|
|
7
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
const __iconData = {
|
|
10
|
+
name: "upload",
|
|
11
|
+
size: 24,
|
|
12
|
+
node: [
|
|
13
|
+
["path", {
|
|
14
|
+
d: "M12 3v12",
|
|
15
|
+
key: "1x0j5s"
|
|
16
|
+
}],
|
|
17
|
+
["path", {
|
|
18
|
+
d: "m17 8-5-5-5 5",
|
|
19
|
+
key: "7q97r8"
|
|
20
|
+
}],
|
|
21
|
+
["path", {
|
|
22
|
+
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
23
|
+
key: "ih7n3h"
|
|
24
|
+
}]
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
__iconData.node;
|
|
28
|
+
const Upload = createLucideIcon(__iconData);
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Upload as t };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import $ahdqC$react, { useCallback, useEffect, useReducer, useRef, useState } from "react";
|
|
2
|
+
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/utils/useControlledState.mjs
|
|
3
|
+
const $3e6197669829fe11$var$useEarlyEffect = typeof document !== "undefined" ? $ahdqC$react["useInsertionEffect"] ?? $ahdqC$react.useLayoutEffect : () => {};
|
|
4
|
+
function $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
5
|
+
let [stateValue, setStateValue] = useState(value || defaultValue);
|
|
6
|
+
let valueRef = useRef(stateValue);
|
|
7
|
+
let isControlledRef = useRef(value !== void 0);
|
|
8
|
+
let isControlled = value !== void 0;
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
let wasControlled = isControlledRef.current;
|
|
11
|
+
if (wasControlled !== isControlled && true) console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
12
|
+
isControlledRef.current = isControlled;
|
|
13
|
+
}, [isControlled]);
|
|
14
|
+
let currentValue = isControlled ? value : stateValue;
|
|
15
|
+
$3e6197669829fe11$var$useEarlyEffect(() => {
|
|
16
|
+
valueRef.current = currentValue;
|
|
17
|
+
});
|
|
18
|
+
let [, forceUpdate] = useReducer(() => ({}), {});
|
|
19
|
+
return [currentValue, useCallback((value, ...args) => {
|
|
20
|
+
let newValue = typeof value === "function" ? value(valueRef.current) : value;
|
|
21
|
+
if (!Object.is(valueRef.current, newValue)) {
|
|
22
|
+
valueRef.current = newValue;
|
|
23
|
+
setStateValue(newValue);
|
|
24
|
+
forceUpdate();
|
|
25
|
+
onChange?.(newValue, ...args);
|
|
26
|
+
}
|
|
27
|
+
}, [onChange])];
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { $3e6197669829fe11$export$40bfa8c7b0832715 as t };
|
|
@@ -4,9 +4,9 @@ import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
|
|
|
4
4
|
import { t as typographyDefinition } from "./typography.cva-iD15k56p.js";
|
|
5
5
|
import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
6
6
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
7
|
-
import { r as FormFieldLabel } from "./FormField-
|
|
7
|
+
import { r as FormFieldLabel } from "./FormField-B99dLt8o.js";
|
|
8
8
|
import { a as inputSizeDefinition, r as inputContentWrapperDefinition } from "./input.cva-DJA8ovm_.js";
|
|
9
|
-
import { n as InputClear } from "./TooltipWrapper-
|
|
9
|
+
import { n as InputClear } from "./TooltipWrapper-3jyN0Wss.js";
|
|
10
10
|
import { isValidElement, useId } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/inputs/Input/shared/InputContent.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as UIRouter } from "./router.context-
|
|
1
|
+
import { t as UIRouter } from "./router.context-B4FvsTim.js";
|
|
2
2
|
import { t as RoutingUtils } from "./routing.utils-UTQonIhB.js";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -3,7 +3,7 @@ import { n as useForm } from "./form.binding-CG1RPv6o.js";
|
|
|
3
3
|
import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
|
|
4
4
|
import { t as ZodUtils } from "./zod.utils-DrrPDT9v.js";
|
|
5
5
|
import { n as getDefaultInputComponentType } from "./dynamicInputs-CRMWIpHA.js";
|
|
6
|
-
import { t as InputItem } from "./InputItem-
|
|
6
|
+
import { t as InputItem } from "./InputItem-CIxbTxZu.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -5,9 +5,9 @@ import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
|
|
|
5
5
|
import { t as typographyDefinition } from "./typography.cva-iD15k56p.js";
|
|
6
6
|
import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
7
7
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
8
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
8
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
9
9
|
import { a as inputSizeDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
10
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
10
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-3jyN0Wss.js";
|
|
11
11
|
import { isValidElement, useId, useLayoutEffect, useRef, useState } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useFocusRing as $32daac5f69beb98a$re_export$useFocusRing } from "react-aria/useFocusRing";
|
|
@@ -101,7 +101,7 @@ const InputFrame = (props) => {
|
|
|
101
101
|
children: [
|
|
102
102
|
leadingContent,
|
|
103
103
|
leadingIcon && /* @__PURE__ */ jsx("div", {
|
|
104
|
-
className: clsx(!isLeadingIconElement && "pointer-events-none"),
|
|
104
|
+
className: clsx("flex shrink-0", !isLeadingIconElement && "pointer-events-none"),
|
|
105
105
|
children: renderIconVisual(leadingIcon)
|
|
106
106
|
}),
|
|
107
107
|
labelPlacement === "content-row" && labelContent,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Table } from "./Table-
|
|
2
|
-
import { t as Checkbox } from "./Checkbox-
|
|
1
|
+
import { t as Table } from "./Table-piX1SWvN.js";
|
|
2
|
+
import { t as Checkbox } from "./Checkbox-CV1ILXXO.js";
|
|
3
3
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
4
4
|
import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
5
5
|
import "./i18n-CX2EjhJI.js";
|
|
@@ -11,7 +11,7 @@ import { t as ZodUtils } from "./zod.utils-DrrPDT9v.js";
|
|
|
11
11
|
import { t as Dialog } from "./Dialog-9manOgMA.js";
|
|
12
12
|
import { Pagination } from "./components/pagination.js";
|
|
13
13
|
import { t as useTranslationMemo } from "./useTranslationMemo-CrZbeyBv.js";
|
|
14
|
-
import { t as UIRouter } from "./router.context-
|
|
14
|
+
import { t as UIRouter } from "./router.context-B4FvsTim.js";
|
|
15
15
|
import { t as RoutingUtils } from "./routing.utils-UTQonIhB.js";
|
|
16
16
|
import { useEffect, useState } from "react";
|
|
17
17
|
import { c } from "react/compiler-runtime";
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ function App() {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Tokens are grouped into colors, typography, spacing, radius, sizing, and effects. The Colors section reads every `:root` and `.dark` block in `theme.css`. Base palette values (such as `--primary-800-base`) are shared by both modes; semantic aliases (such as `--interactive-primary-background-base`) can differ by mode. Alias fields offer a selector populated from the theme's base palette, plus a Custom value option for literal RGB values or other references. Changing a palette value updates every component color that references it through an alias. Button and input defaults use the existing `UIConfig` API. Explicit component props still take precedence.
|
|
33
|
+
Tokens are grouped into colors, typography, spacing, radius, sizing, and effects. The Colors section reads every `:root` and `.dark` block in `theme.css`. Base palette values (such as `--primary-800-base`) are shared by both modes; semantic aliases (such as `--interactive-primary-background-base`) can differ by mode. Alias fields offer a selector populated from the theme's base palette, plus a Custom value option for literal RGB values or other references. Changing a palette value updates every component color that references it through an alias. Radius, spacing, sizing and font size share a Layout tab with a sub-tab each (Font size lists the Typography font sizes again). Every sub-tab opens with a global stepper that rescales its tokens from the theme defaults: rounding goes from square to pill (pill rounds only controls such as buttons, inputs and badges; surfaces keep their radii, and focus rings keep their offset), spacing scales padding and gaps, sizing scales button and input heights, avatars, icons, minimum widths and container widths, and font size scales every text style while its ratio line heights follow. Spacing, sizing and font size values snap to whole pixels, and spacing and sizing update the mirrored `--spacing-*` and `--container-*` tokens together. The Spacing sub-tab lists the `--spacing-*` copy of padding and gap tokens and Sizing lists the `--container-*` copy of size tokens; editing either updates its mirror too. Buttons and inputs of the same size always share one height: the app themes alias `input-height-*` to `button-height-*`, and editing an input height in the configurator updates the button height with it. Button and input defaults use the existing `UIConfig` API. Explicit component props still take precedence.
|
|
34
34
|
|
|
35
35
|
Typed values update the preview on blur or Enter; presets and color pickers update immediately. The preview sets CSS variables on `:root` / `.dark` and updates the provider. The top bar rem/px switch (px by default) changes display units without changing stored tokens; bare numbers use the selected unit, and explicit units are converted for display. Apply retains the configuration for the mounted session; Cancel, Close, and Escape restore the last applied configuration. Reset previews the application's original defaults and can itself be canceled. Unmounting removes the runtime overrides. The modal's controls use independent styling so editing app colors does not make the editor unusable.
|
|
36
36
|
|
|
@@ -56,7 +56,7 @@ export default defineConfig({
|
|
|
56
56
|
|
|
57
57
|
`themeFile` defaults to `src/styles/theme.css` and resolves against this app's Vite `root`, not the UI package or monorepo root. The file must already exist inside the app root; paths and symlinks into another app are rejected. Add the plugin to each app that needs saving. For Storybook's Vite builder, add it to `viteFinal`'s plugins.
|
|
58
58
|
|
|
59
|
-
With the dev server running, open **Export → Tailwind CSS → Save theme**. The plugin receives the existing CSS export and updates the matching declarations in that app's theme file. Imports, layers, unrelated tokens, and `@theme inline` blocks are preserved. Light and dark tokens stay separate. Vite watches the file and rebuilds its CSS, so changes persist across reloads and subsequent builds. Saving writes immediately; Cancel does not undo a file save. Apply still applies session settings only. UIConfig and UIOverrides exports continue to use Copy/Download.
|
|
59
|
+
With the dev server running, open **Advanced → Export → Tailwind CSS → Save theme**. The plugin receives the existing CSS export and updates the matching declarations in that app's theme file. Imports, layers, unrelated tokens, and `@theme inline` blocks are preserved. Light and dark tokens stay separate. Vite watches the file and rebuilds its CSS, so changes persist across reloads and subsequent builds. Saving writes immediately; Cancel does not undo a file save. Apply still applies session settings only. UIConfig and UIOverrides exports continue to use Copy/Download.
|
|
60
60
|
|
|
61
61
|
The plugin uses Vite's development middleware and HTML hooks and is enabled only for the dev server, regardless of mode. Production builds and `vite preview` have no writer endpoint, connection metadata, or Save theme action. No virtual-module import or provider callback is required. The browser can only write the server's configured theme file using its per-server token. Vite is an optional peer; ordinary component consumers do not need it.
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ The plugin uses Vite's development middleware and HTML hooks and is enabled only
|
|
|
64
64
|
|
|
65
65
|
The live preview lists every Povio UI component (`gallery/demos.tsx`). Click one to focus it, then hover to see the padding, gaps and radius that come from theme tokens; clicking a band opens that exact token in the editor. The inspector reads the rendered Tailwind classes (`inspector/token-classes.ts`), so it follows `UIOverrides` and responsive variants, and only offers tokens present in the supplied defaults. Dialog, popover, tooltip and dropdown demos are static replicas built from the components' own class definitions, because an open react-aria modal or popover would take focus away from the configurator.
|
|
66
66
|
|
|
67
|
-
The **Variants & overrides**
|
|
67
|
+
The **Advanced → Variants & overrides** sub-tab exposes the library's CVA slots by component. It resolves declarative app overrides before showing base classes, variant classes, default values, and compound-rule classes. Edits store a serializable snapshot of the effective slot using `overrideCva`; untouched slots and function mappers retain the inherited app configuration. Function-based CVA overrides are read-only. Reset slot restores the inherited definition. Apply, Cancel, Reset all, and host persistence cover CVA edits as well as tokens.
|
|
68
68
|
|
|
69
69
|
CVA edits change class names, not the Tailwind compiler. Existing compiled classes preview immediately; newly introduced classes require inclusion in your app's Tailwind sources and a rebuild. The UIOverrides export provides a `withUIOverrides(existing)` helper that preserves other components and sibling slots. Mount the configurator below app override providers; providers nested further inside an app intentionally take precedence.
|
|
70
70
|
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { c as $d447af545b77c9f1$export$f21a1ffae260145a, n as $23f2114a1b82827e$export$4282f70798064fe0, r as $23f2114a1b82827e$export$cd4e5573fbe2b576, s as $d447af545b77c9f1$export$b204af158042fbac } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
2
|
-
import { f as $3b8b240c1bf84ab9$export$4c063cf1350e6fed, p as $3b8b240c1bf84ab9$export$bebd5a1431fec25d, t as $f192c2f16961cbe0$export$80f3e147d781571c } from "./focusSafely-DCGrr2bb.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { shadowDOM } from "react-stately/private/flags/flags";
|
|
5
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/shadowdom/ShadowTreeWalker.mjs
|
|
6
|
-
var $654b97e09f2a30c1$export$63eb3ababa9c55c4 = class {
|
|
7
|
-
constructor(doc, root, whatToShow, filter) {
|
|
8
|
-
this._walkerStack = [];
|
|
9
|
-
this._currentSetFor = /* @__PURE__ */ new Set();
|
|
10
|
-
this._acceptNode = (node) => {
|
|
11
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
12
|
-
const shadowRoot = node.shadowRoot;
|
|
13
|
-
if (shadowRoot) {
|
|
14
|
-
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
|
|
15
|
-
this._walkerStack.unshift(walker);
|
|
16
|
-
return NodeFilter.FILTER_ACCEPT;
|
|
17
|
-
} else if (typeof this.filter === "function") return this.filter(node);
|
|
18
|
-
else if (this.filter?.acceptNode) return this.filter.acceptNode(node);
|
|
19
|
-
else if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
|
|
20
|
-
}
|
|
21
|
-
return NodeFilter.FILTER_SKIP;
|
|
22
|
-
};
|
|
23
|
-
this._doc = doc;
|
|
24
|
-
this.root = root;
|
|
25
|
-
this.filter = filter ?? null;
|
|
26
|
-
this.whatToShow = whatToShow ?? NodeFilter.SHOW_ALL;
|
|
27
|
-
this._currentNode = root;
|
|
28
|
-
this._walkerStack.unshift(doc.createTreeWalker(root, whatToShow, this._acceptNode));
|
|
29
|
-
const shadowRoot = root.shadowRoot;
|
|
30
|
-
if (shadowRoot) {
|
|
31
|
-
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
|
|
32
|
-
this._walkerStack.unshift(walker);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
get currentNode() {
|
|
36
|
-
return this._currentNode;
|
|
37
|
-
}
|
|
38
|
-
set currentNode(node) {
|
|
39
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(this.root, node)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
40
|
-
const walkers = [];
|
|
41
|
-
let curNode = node;
|
|
42
|
-
let currentWalkerCurrentNode = node;
|
|
43
|
-
this._currentNode = node;
|
|
44
|
-
while (curNode && curNode !== this.root) if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
45
|
-
const shadowRoot = curNode;
|
|
46
|
-
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode });
|
|
47
|
-
walkers.push(walker);
|
|
48
|
-
walker.currentNode = currentWalkerCurrentNode;
|
|
49
|
-
this._currentSetFor.add(walker);
|
|
50
|
-
curNode = currentWalkerCurrentNode = shadowRoot.host;
|
|
51
|
-
} else curNode = curNode.parentNode;
|
|
52
|
-
const walker = this._doc.createTreeWalker(this.root, this.whatToShow, { acceptNode: this._acceptNode });
|
|
53
|
-
walkers.push(walker);
|
|
54
|
-
walker.currentNode = currentWalkerCurrentNode;
|
|
55
|
-
this._currentSetFor.add(walker);
|
|
56
|
-
this._walkerStack = walkers;
|
|
57
|
-
}
|
|
58
|
-
get doc() {
|
|
59
|
-
return this._doc;
|
|
60
|
-
}
|
|
61
|
-
firstChild() {
|
|
62
|
-
let currentNode = this.currentNode;
|
|
63
|
-
let newNode = this.nextNode();
|
|
64
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(currentNode, newNode)) {
|
|
65
|
-
this.currentNode = currentNode;
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
if (newNode) this.currentNode = newNode;
|
|
69
|
-
return newNode;
|
|
70
|
-
}
|
|
71
|
-
lastChild() {
|
|
72
|
-
let newNode = this._walkerStack[0].lastChild();
|
|
73
|
-
if (newNode) this.currentNode = newNode;
|
|
74
|
-
return newNode;
|
|
75
|
-
}
|
|
76
|
-
nextNode() {
|
|
77
|
-
const nextNode = this._walkerStack[0].nextNode();
|
|
78
|
-
if (nextNode) {
|
|
79
|
-
if (nextNode.shadowRoot) {
|
|
80
|
-
let nodeResult;
|
|
81
|
-
if (typeof this.filter === "function") nodeResult = this.filter(nextNode);
|
|
82
|
-
else if (this.filter?.acceptNode) nodeResult = this.filter.acceptNode(nextNode);
|
|
83
|
-
if (nodeResult === NodeFilter.FILTER_ACCEPT) {
|
|
84
|
-
this.currentNode = nextNode;
|
|
85
|
-
return nextNode;
|
|
86
|
-
}
|
|
87
|
-
let newNode = this.nextNode();
|
|
88
|
-
if (newNode) this.currentNode = newNode;
|
|
89
|
-
return newNode;
|
|
90
|
-
}
|
|
91
|
-
if (nextNode) this.currentNode = nextNode;
|
|
92
|
-
return nextNode;
|
|
93
|
-
} else if (this._walkerStack.length > 1) {
|
|
94
|
-
this._walkerStack.shift();
|
|
95
|
-
let newNode = this.nextNode();
|
|
96
|
-
if (newNode) this.currentNode = newNode;
|
|
97
|
-
return newNode;
|
|
98
|
-
} else return null;
|
|
99
|
-
}
|
|
100
|
-
previousNode() {
|
|
101
|
-
const currentWalker = this._walkerStack[0];
|
|
102
|
-
if (currentWalker.currentNode === currentWalker.root) {
|
|
103
|
-
if (this._currentSetFor.has(currentWalker)) {
|
|
104
|
-
this._currentSetFor.delete(currentWalker);
|
|
105
|
-
if (this._walkerStack.length > 1) {
|
|
106
|
-
this._walkerStack.shift();
|
|
107
|
-
let newNode = this.previousNode();
|
|
108
|
-
if (newNode) this.currentNode = newNode;
|
|
109
|
-
return newNode;
|
|
110
|
-
} else return null;
|
|
111
|
-
}
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
const previousNode = currentWalker.previousNode();
|
|
115
|
-
if (previousNode) {
|
|
116
|
-
if (previousNode.shadowRoot) {
|
|
117
|
-
let nodeResult;
|
|
118
|
-
if (typeof this.filter === "function") nodeResult = this.filter(previousNode);
|
|
119
|
-
else if (this.filter?.acceptNode) nodeResult = this.filter.acceptNode(previousNode);
|
|
120
|
-
if (nodeResult === NodeFilter.FILTER_ACCEPT) {
|
|
121
|
-
if (previousNode) this.currentNode = previousNode;
|
|
122
|
-
return previousNode;
|
|
123
|
-
}
|
|
124
|
-
let newNode = this.lastChild();
|
|
125
|
-
if (newNode) this.currentNode = newNode;
|
|
126
|
-
return newNode;
|
|
127
|
-
}
|
|
128
|
-
if (previousNode) this.currentNode = previousNode;
|
|
129
|
-
return previousNode;
|
|
130
|
-
} else if (this._walkerStack.length > 1) {
|
|
131
|
-
this._walkerStack.shift();
|
|
132
|
-
let newNode = this.previousNode();
|
|
133
|
-
if (newNode) this.currentNode = newNode;
|
|
134
|
-
return newNode;
|
|
135
|
-
} else return null;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* @deprecated
|
|
139
|
-
*/ nextSibling() {
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated
|
|
144
|
-
*/ previousSibling() {
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* @deprecated
|
|
149
|
-
*/ parentNode() {
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
function $654b97e09f2a30c1$export$4d0f8be8b12a7ef6(doc, root, whatToShow, filter) {
|
|
154
|
-
if (shadowDOM()) return new $654b97e09f2a30c1$export$63eb3ababa9c55c4(doc, root, whatToShow, filter);
|
|
155
|
-
return doc.createTreeWalker(root, whatToShow, filter);
|
|
156
|
-
}
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/focus/FocusScope.mjs
|
|
159
|
-
function $535772f9d2c1f38d$var$getRadiosInGroup(element) {
|
|
160
|
-
if (!element.form) return Array.from($d447af545b77c9f1$export$b204af158042fbac(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)).filter((radio) => !radio.form);
|
|
161
|
-
const radioList = element.form.elements.namedItem(element.name);
|
|
162
|
-
let ownerWindow = $d447af545b77c9f1$export$f21a1ffae260145a(element);
|
|
163
|
-
if (radioList instanceof ownerWindow.RadioNodeList) return Array.from(radioList).filter((el) => el instanceof ownerWindow.HTMLInputElement);
|
|
164
|
-
if (radioList instanceof ownerWindow.HTMLInputElement) return [radioList];
|
|
165
|
-
return [];
|
|
166
|
-
}
|
|
167
|
-
function $535772f9d2c1f38d$var$isTabbableRadio(element) {
|
|
168
|
-
if (element.checked) return true;
|
|
169
|
-
const radios = $535772f9d2c1f38d$var$getRadiosInGroup(element);
|
|
170
|
-
return radios.length > 0 && !radios.some((radio) => radio.checked);
|
|
171
|
-
}
|
|
172
|
-
function $535772f9d2c1f38d$var$isElementInScope(element, scope) {
|
|
173
|
-
if (!element) return false;
|
|
174
|
-
if (!scope) return false;
|
|
175
|
-
return scope.some((node) => $23f2114a1b82827e$export$4282f70798064fe0(node, element));
|
|
176
|
-
}
|
|
177
|
-
function $535772f9d2c1f38d$var$focusElement(element, scroll = false) {
|
|
178
|
-
if (element != null && !scroll) try {
|
|
179
|
-
$f192c2f16961cbe0$export$80f3e147d781571c(element);
|
|
180
|
-
} catch {}
|
|
181
|
-
else if (element != null) try {
|
|
182
|
-
element.focus();
|
|
183
|
-
} catch {}
|
|
184
|
-
}
|
|
185
|
-
function $535772f9d2c1f38d$export$2d6ec8fc375ceafa(root, opts, scope) {
|
|
186
|
-
let filter = opts?.tabbable ? $3b8b240c1bf84ab9$export$bebd5a1431fec25d : $3b8b240c1bf84ab9$export$4c063cf1350e6fed;
|
|
187
|
-
let rootElement = root?.nodeType === Node.ELEMENT_NODE ? root : null;
|
|
188
|
-
let doc = $d447af545b77c9f1$export$b204af158042fbac(rootElement);
|
|
189
|
-
let walker = $654b97e09f2a30c1$export$4d0f8be8b12a7ef6(doc, root || doc, NodeFilter.SHOW_ELEMENT, { acceptNode(node) {
|
|
190
|
-
if ($23f2114a1b82827e$export$4282f70798064fe0(opts?.from, node)) return NodeFilter.FILTER_REJECT;
|
|
191
|
-
if (opts?.tabbable && node.tagName === "INPUT" && node.getAttribute("type") === "radio") {
|
|
192
|
-
if (!$535772f9d2c1f38d$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
|
|
193
|
-
if (walker.currentNode.tagName === "INPUT" && walker.currentNode.type === "radio" && walker.currentNode.name === node.name) return NodeFilter.FILTER_REJECT;
|
|
194
|
-
}
|
|
195
|
-
if (filter(node) && (!scope || $535772f9d2c1f38d$var$isElementInScope(node, scope)) && (!opts?.accept || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
|
|
196
|
-
return NodeFilter.FILTER_SKIP;
|
|
197
|
-
} });
|
|
198
|
-
if (opts?.from) walker.currentNode = opts.from;
|
|
199
|
-
return walker;
|
|
200
|
-
}
|
|
201
|
-
function $535772f9d2c1f38d$export$c5251b9e124bf29(ref, defaultOptions = {}) {
|
|
202
|
-
return {
|
|
203
|
-
focusNext(opts = {}) {
|
|
204
|
-
let root = ref.current;
|
|
205
|
-
if (!root) return null;
|
|
206
|
-
let { from, tabbable = defaultOptions.tabbable, wrap = defaultOptions.wrap, accept = defaultOptions.accept } = opts;
|
|
207
|
-
let node = from || $23f2114a1b82827e$export$cd4e5573fbe2b576($d447af545b77c9f1$export$b204af158042fbac(root));
|
|
208
|
-
let walker = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(root, {
|
|
209
|
-
tabbable,
|
|
210
|
-
accept
|
|
211
|
-
});
|
|
212
|
-
if ($23f2114a1b82827e$export$4282f70798064fe0(root, node)) walker.currentNode = node;
|
|
213
|
-
let nextNode = walker.nextNode();
|
|
214
|
-
if (!nextNode && wrap) {
|
|
215
|
-
walker.currentNode = root;
|
|
216
|
-
nextNode = walker.nextNode();
|
|
217
|
-
}
|
|
218
|
-
if (nextNode) $535772f9d2c1f38d$var$focusElement(nextNode, true);
|
|
219
|
-
return nextNode;
|
|
220
|
-
},
|
|
221
|
-
focusPrevious(opts = defaultOptions) {
|
|
222
|
-
let root = ref.current;
|
|
223
|
-
if (!root) return null;
|
|
224
|
-
let { from, tabbable = defaultOptions.tabbable, wrap = defaultOptions.wrap, accept = defaultOptions.accept } = opts;
|
|
225
|
-
let node = from || $23f2114a1b82827e$export$cd4e5573fbe2b576($d447af545b77c9f1$export$b204af158042fbac(root));
|
|
226
|
-
let walker = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(root, {
|
|
227
|
-
tabbable,
|
|
228
|
-
accept
|
|
229
|
-
});
|
|
230
|
-
if ($23f2114a1b82827e$export$4282f70798064fe0(root, node)) walker.currentNode = node;
|
|
231
|
-
else {
|
|
232
|
-
let next = $535772f9d2c1f38d$var$last(walker);
|
|
233
|
-
if (next) $535772f9d2c1f38d$var$focusElement(next, true);
|
|
234
|
-
return next ?? null;
|
|
235
|
-
}
|
|
236
|
-
let previousNode = walker.previousNode();
|
|
237
|
-
if (!previousNode && wrap) {
|
|
238
|
-
walker.currentNode = root;
|
|
239
|
-
let lastNode = $535772f9d2c1f38d$var$last(walker);
|
|
240
|
-
if (!lastNode) return null;
|
|
241
|
-
previousNode = lastNode;
|
|
242
|
-
}
|
|
243
|
-
if (previousNode) $535772f9d2c1f38d$var$focusElement(previousNode, true);
|
|
244
|
-
return previousNode ?? null;
|
|
245
|
-
},
|
|
246
|
-
focusFirst(opts = defaultOptions) {
|
|
247
|
-
let root = ref.current;
|
|
248
|
-
if (!root) return null;
|
|
249
|
-
let { tabbable = defaultOptions.tabbable, accept = defaultOptions.accept } = opts;
|
|
250
|
-
let nextNode = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(root, {
|
|
251
|
-
tabbable,
|
|
252
|
-
accept
|
|
253
|
-
}).nextNode();
|
|
254
|
-
if (nextNode) $535772f9d2c1f38d$var$focusElement(nextNode, true);
|
|
255
|
-
return nextNode;
|
|
256
|
-
},
|
|
257
|
-
focusLast(opts = defaultOptions) {
|
|
258
|
-
let root = ref.current;
|
|
259
|
-
if (!root) return null;
|
|
260
|
-
let { tabbable = defaultOptions.tabbable, accept = defaultOptions.accept } = opts;
|
|
261
|
-
let next = $535772f9d2c1f38d$var$last($535772f9d2c1f38d$export$2d6ec8fc375ceafa(root, {
|
|
262
|
-
tabbable,
|
|
263
|
-
accept
|
|
264
|
-
}));
|
|
265
|
-
if (next) $535772f9d2c1f38d$var$focusElement(next, true);
|
|
266
|
-
return next ?? null;
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
function $535772f9d2c1f38d$var$last(walker) {
|
|
271
|
-
let next = void 0;
|
|
272
|
-
let last;
|
|
273
|
-
do {
|
|
274
|
-
last = walker.lastChild();
|
|
275
|
-
if (last) next = last;
|
|
276
|
-
} while (last);
|
|
277
|
-
return next;
|
|
278
|
-
}
|
|
279
|
-
var $535772f9d2c1f38d$var$Tree = class $535772f9d2c1f38d$var$Tree {
|
|
280
|
-
constructor() {
|
|
281
|
-
this.fastMap = /* @__PURE__ */ new Map();
|
|
282
|
-
this.root = new $535772f9d2c1f38d$var$TreeNode({ scopeRef: null });
|
|
283
|
-
this.fastMap.set(null, this.root);
|
|
284
|
-
}
|
|
285
|
-
get size() {
|
|
286
|
-
return this.fastMap.size;
|
|
287
|
-
}
|
|
288
|
-
getTreeNode(data) {
|
|
289
|
-
return this.fastMap.get(data);
|
|
290
|
-
}
|
|
291
|
-
addTreeNode(scopeRef, parent, nodeToRestore) {
|
|
292
|
-
let parentNode = this.fastMap.get(parent ?? null);
|
|
293
|
-
if (!parentNode) return;
|
|
294
|
-
let node = new $535772f9d2c1f38d$var$TreeNode({ scopeRef });
|
|
295
|
-
parentNode.addChild(node);
|
|
296
|
-
node.parent = parentNode;
|
|
297
|
-
this.fastMap.set(scopeRef, node);
|
|
298
|
-
if (nodeToRestore) node.nodeToRestore = nodeToRestore;
|
|
299
|
-
}
|
|
300
|
-
addNode(node) {
|
|
301
|
-
this.fastMap.set(node.scopeRef, node);
|
|
302
|
-
}
|
|
303
|
-
removeTreeNode(scopeRef) {
|
|
304
|
-
if (scopeRef === null) return;
|
|
305
|
-
let node = this.fastMap.get(scopeRef);
|
|
306
|
-
if (!node) return;
|
|
307
|
-
let parentNode = node.parent;
|
|
308
|
-
for (let current of this.traverse()) if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $535772f9d2c1f38d$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
|
|
309
|
-
let children = node.children;
|
|
310
|
-
if (parentNode) {
|
|
311
|
-
parentNode.removeChild(node);
|
|
312
|
-
if (children.size > 0) children.forEach((child) => parentNode && parentNode.addChild(child));
|
|
313
|
-
}
|
|
314
|
-
this.fastMap.delete(node.scopeRef);
|
|
315
|
-
}
|
|
316
|
-
*traverse(node = this.root) {
|
|
317
|
-
if (node.scopeRef != null) yield node;
|
|
318
|
-
if (node.children.size > 0) for (let child of node.children) yield* this.traverse(child);
|
|
319
|
-
}
|
|
320
|
-
clone() {
|
|
321
|
-
let newTree = new $535772f9d2c1f38d$var$Tree();
|
|
322
|
-
for (let node of this.traverse()) newTree.addTreeNode(node.scopeRef, node.parent?.scopeRef ?? null, node.nodeToRestore);
|
|
323
|
-
return newTree;
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
var $535772f9d2c1f38d$var$TreeNode = class {
|
|
327
|
-
constructor(props) {
|
|
328
|
-
this.children = /* @__PURE__ */ new Set();
|
|
329
|
-
this.contain = false;
|
|
330
|
-
this.scopeRef = props.scopeRef;
|
|
331
|
-
}
|
|
332
|
-
addChild(node) {
|
|
333
|
-
this.children.add(node);
|
|
334
|
-
node.parent = this;
|
|
335
|
-
}
|
|
336
|
-
removeChild(node) {
|
|
337
|
-
this.children.delete(node);
|
|
338
|
-
node.parent = void 0;
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
new $535772f9d2c1f38d$var$Tree();
|
|
342
|
-
//#endregion
|
|
343
|
-
export { $535772f9d2c1f38d$export$c5251b9e124bf29 as n, $535772f9d2c1f38d$export$2d6ec8fc375ceafa as t };
|
package/dist/chain-DIXr2VAT.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/chain.mjs
|
|
2
|
-
/**
|
|
3
|
-
* Calls all functions in the order they were chained with the same arguments.
|
|
4
|
-
*/ function $a4e76a5424781910$export$e08e3b67e392101e(...callbacks) {
|
|
5
|
-
return (...args) => {
|
|
6
|
-
for (let callback of callbacks) if (typeof callback === "function") callback(...args);
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { $a4e76a5424781910$export$e08e3b67e392101e as t };
|