@stevederico/skateboard-ui 3.12.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +37 -31
- package/dist/shadcn/ui/accordion.d.ts +1 -6
- package/dist/shadcn/ui/accordion.js +3 -17
- package/dist/shadcn/ui/alert-dialog.d.ts +1 -18
- package/dist/shadcn/ui/alert-dialog.js +3 -43
- package/dist/shadcn/ui/alert.d.ts +1 -13
- package/dist/shadcn/ui/alert.js +3 -28
- package/dist/shadcn/ui/aspect-ratio.d.ts +1 -4
- package/dist/shadcn/ui/aspect-ratio.js +3 -8
- package/dist/shadcn/ui/avatar.d.ts +1 -11
- package/dist/shadcn/ui/avatar.js +3 -24
- package/dist/shadcn/ui/badge.d.ts +1 -14
- package/dist/shadcn/ui/badge.js +3 -33
- package/dist/shadcn/ui/breadcrumb.d.ts +1 -10
- package/dist/shadcn/ui/breadcrumb.js +3 -37
- package/dist/shadcn/ui/button-group.d.ts +1 -13
- package/dist/shadcn/ui/button-group.js +3 -36
- package/dist/shadcn/ui/button.d.ts +1 -34
- package/dist/shadcn/ui/button.js +3 -53
- package/dist/shadcn/ui/calendar.d.ts +1 -13
- package/dist/shadcn/ui/calendar.js +3 -75
- package/dist/shadcn/ui/card.d.ts +1 -11
- package/dist/shadcn/ui/card.js +3 -25
- package/dist/shadcn/ui/checkbox.d.ts +1 -3
- package/dist/shadcn/ui/checkbox.js +3 -9
- package/dist/shadcn/ui/collapsible.d.ts +1 -5
- package/dist/shadcn/ui/collapsible.js +3 -13
- package/dist/shadcn/ui/command.d.ts +1 -19
- package/dist/shadcn/ui/command.js +3 -35
- package/dist/shadcn/ui/context-menu.d.ts +1 -29
- package/dist/shadcn/ui/context-menu.js +3 -52
- package/dist/shadcn/ui/dialog.d.ts +1 -17
- package/dist/shadcn/ui/dialog.js +3 -38
- package/dist/shadcn/ui/drawer.d.ts +1 -13
- package/dist/shadcn/ui/drawer.js +3 -196
- package/dist/shadcn/ui/dropdown-menu.d.ts +1 -29
- package/dist/shadcn/ui/dropdown-menu.js +3 -52
- package/dist/shadcn/ui/empty.d.ts +1 -14
- package/dist/shadcn/ui/empty.js +3 -33
- package/dist/shadcn/ui/field.d.ts +1 -28
- package/dist/shadcn/ui/field.js +3 -68
- package/dist/shadcn/ui/hover-card.d.ts +1 -5
- package/dist/shadcn/ui/hover-card.js +3 -14
- package/dist/shadcn/ui/input-group.d.ts +1 -28
- package/dist/shadcn/ui/input-group.js +3 -58
- package/dist/shadcn/ui/input.d.ts +1 -3
- package/dist/shadcn/ui/input.js +3 -8
- package/dist/shadcn/ui/item.d.ts +1 -34
- package/dist/shadcn/ui/item.js +3 -79
- package/dist/shadcn/ui/kbd.d.ts +1 -3
- package/dist/shadcn/ui/kbd.js +3 -9
- package/dist/shadcn/ui/label.d.ts +1 -3
- package/dist/shadcn/ui/label.js +3 -8
- package/dist/shadcn/ui/menubar.d.ts +1 -29
- package/dist/shadcn/ui/menubar.js +3 -57
- package/dist/shadcn/ui/navigation-menu.d.ts +1 -13
- package/dist/shadcn/ui/navigation-menu.js +3 -31
- package/dist/shadcn/ui/pagination.d.ts +1 -17
- package/dist/shadcn/ui/pagination.js +3 -27
- package/dist/shadcn/ui/popover.d.ts +1 -9
- package/dist/shadcn/ui/popover.js +3 -24
- package/dist/shadcn/ui/progress.d.ts +1 -7
- package/dist/shadcn/ui/progress.js +3 -20
- package/dist/shadcn/ui/radio-group.d.ts +1 -5
- package/dist/shadcn/ui/radio-group.js +3 -12
- package/dist/shadcn/ui/scroll-area.d.ts +1 -5
- package/dist/shadcn/ui/scroll-area.js +3 -12
- package/dist/shadcn/ui/select.d.ts +1 -15
- package/dist/shadcn/ui/select.js +3 -35
- package/dist/shadcn/ui/separator.d.ts +1 -3
- package/dist/shadcn/ui/separator.js +3 -8
- package/dist/shadcn/ui/sheet.d.ts +1 -14
- package/dist/shadcn/ui/sheet.js +3 -38
- package/dist/shadcn/ui/sidebar.d.ts +1 -70
- package/dist/shadcn/ui/sidebar.js +3 -256
- package/dist/shadcn/ui/skeleton.d.ts +1 -2
- package/dist/shadcn/ui/skeleton.js +3 -6
- package/dist/shadcn/ui/slider.d.ts +1 -3
- package/dist/shadcn/ui/slider.js +3 -12
- package/dist/shadcn/ui/spinner.d.ts +1 -2
- package/dist/shadcn/ui/spinner.js +3 -7
- package/dist/shadcn/ui/switch.d.ts +1 -5
- package/dist/shadcn/ui/switch.js +3 -8
- package/dist/shadcn/ui/table.d.ts +1 -10
- package/dist/shadcn/ui/table.js +3 -29
- package/dist/shadcn/ui/tabs.d.ts +1 -13
- package/dist/shadcn/ui/tabs.js +3 -29
- package/dist/shadcn/ui/textarea.d.ts +1 -3
- package/dist/shadcn/ui/textarea.js +3 -7
- package/dist/shadcn/ui/toggle-group.d.ts +1 -11
- package/dist/shadcn/ui/toggle-group.js +3 -25
- package/dist/shadcn/ui/toggle.d.ts +1 -15
- package/dist/shadcn/ui/toggle.js +3 -26
- package/dist/shadcn/ui/tooltip.d.ts +1 -6
- package/dist/shadcn/ui/tooltip.js +3 -17
- package/dist/ui/accordion.d.ts +21 -0
- package/dist/ui/accordion.js +67 -0
- package/dist/ui/alert-dialog.d.ts +32 -0
- package/dist/ui/alert-dialog.js +102 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/alert.js +28 -0
- package/dist/ui/aspect-ratio.d.ts +5 -0
- package/dist/ui/aspect-ratio.js +9 -0
- package/dist/ui/avatar.d.ts +14 -0
- package/dist/ui/avatar.js +49 -0
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.js +26 -0
- package/dist/ui/breadcrumb.d.ts +13 -0
- package/dist/ui/breadcrumb.js +29 -0
- package/dist/ui/button-group.d.ts +21 -0
- package/dist/ui/button-group.js +29 -0
- package/dist/ui/button.d.ts +38 -0
- package/dist/ui/button.js +49 -0
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +75 -0
- package/dist/ui/card.d.ts +11 -0
- package/dist/ui/card.js +25 -0
- package/dist/ui/checkbox.d.ts +17 -0
- package/dist/ui/checkbox.js +25 -0
- package/dist/ui/collapsible.d.ts +11 -0
- package/dist/ui/collapsible.js +40 -0
- package/dist/ui/command.d.ts +19 -0
- package/dist/ui/command.js +35 -0
- package/dist/ui/context-menu.d.ts +53 -0
- package/dist/ui/context-menu.js +345 -0
- package/dist/ui/dialog.d.ts +40 -0
- package/dist/ui/dialog.js +109 -0
- package/dist/ui/drawer.d.ts +36 -0
- package/dist/ui/drawer.js +234 -0
- package/dist/ui/dropdown-menu.d.ts +61 -0
- package/dist/ui/dropdown-menu.js +323 -0
- package/dist/ui/empty.d.ts +14 -0
- package/dist/ui/empty.js +33 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/field.js +68 -0
- package/dist/ui/hover-card.d.ts +32 -0
- package/dist/ui/hover-card.js +119 -0
- package/dist/ui/input-group.d.ts +28 -0
- package/dist/ui/input-group.js +58 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/item.d.ts +41 -0
- package/dist/ui/item.js +69 -0
- package/dist/ui/kbd.d.ts +4 -0
- package/dist/ui/kbd.js +10 -0
- package/dist/ui/label.d.ts +3 -0
- package/dist/ui/label.js +8 -0
- package/dist/ui/menubar.d.ts +59 -0
- package/dist/ui/menubar.js +384 -0
- package/dist/ui/navigation-menu.d.ts +24 -0
- package/dist/ui/navigation-menu.js +134 -0
- package/dist/ui/pagination.d.ts +17 -0
- package/dist/ui/pagination.js +36 -0
- package/dist/ui/popover.d.ts +25 -0
- package/dist/ui/popover.js +68 -0
- package/dist/ui/portal.d.ts +7 -0
- package/dist/ui/portal.js +12 -0
- package/dist/ui/progress.d.ts +15 -0
- package/dist/ui/progress.js +36 -0
- package/dist/ui/radio-group.d.ts +17 -0
- package/dist/ui/radio-group.js +54 -0
- package/dist/ui/scroll-area.d.ts +9 -0
- package/dist/ui/scroll-area.js +72 -0
- package/dist/ui/select.d.ts +37 -0
- package/dist/ui/select.js +216 -0
- package/dist/ui/separator.d.ts +14 -0
- package/dist/ui/separator.js +13 -0
- package/dist/ui/sheet.d.ts +31 -0
- package/dist/ui/sheet.js +121 -0
- package/dist/ui/sidebar.d.ts +86 -0
- package/dist/ui/sidebar.js +211 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/slider.d.ts +18 -0
- package/dist/ui/slider.js +94 -0
- package/dist/ui/slot.d.ts +27 -0
- package/dist/ui/slot.js +62 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/spinner.js +8 -0
- package/dist/ui/switch.d.ts +17 -0
- package/dist/ui/switch.js +23 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +29 -0
- package/dist/ui/tabs.d.ts +29 -0
- package/dist/ui/tabs.js +82 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/toggle-group.d.ts +23 -0
- package/dist/ui/toggle-group.js +52 -0
- package/dist/ui/toggle.d.ts +25 -0
- package/dist/ui/toggle.js +41 -0
- package/dist/ui/tooltip.d.ts +25 -0
- package/dist/ui/tooltip.js +90 -0
- package/dist/ui/use-controllable-state.d.ts +10 -0
- package/dist/ui/use-controllable-state.js +17 -0
- package/dist/ui/use-dismiss.d.ts +10 -0
- package/dist/ui/use-dismiss.js +51 -0
- package/dist/ui/use-floating.d.ts +38 -0
- package/dist/ui/use-floating.js +128 -0
- package/dist/ui/use-presence.d.ts +8 -0
- package/dist/ui/use-presence.js +48 -0
- package/package.json +6 -1
- package/dist/shadcn/lib/base-ui/LICENSE +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-000kmre8.js +0 -150
- package/dist/shadcn/lib/base-ui/_chunk-1vw45v38.js +0 -64
- package/dist/shadcn/lib/base-ui/_chunk-23rx7haq.js +0 -81
- package/dist/shadcn/lib/base-ui/_chunk-242gh8ph.js +0 -230
- package/dist/shadcn/lib/base-ui/_chunk-26cc610z.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-2z044bba.js +0 -5890
- package/dist/shadcn/lib/base-ui/_chunk-3cpd1vjz.js +0 -13
- package/dist/shadcn/lib/base-ui/_chunk-3enq1vat.js +0 -82
- package/dist/shadcn/lib/base-ui/_chunk-3xpke33f.js +0 -23
- package/dist/shadcn/lib/base-ui/_chunk-451nqgsa.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-4maf6pas.js +0 -11
- package/dist/shadcn/lib/base-ui/_chunk-4zhfq4d3.js +0 -16
- package/dist/shadcn/lib/base-ui/_chunk-5gaqyne5.js +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-5tt5hk59.js +0 -4
- package/dist/shadcn/lib/base-ui/_chunk-5tze5c8q.js +0 -13
- package/dist/shadcn/lib/base-ui/_chunk-5xmdvndx.js +0 -225
- package/dist/shadcn/lib/base-ui/_chunk-6adaer33.js +0 -435
- package/dist/shadcn/lib/base-ui/_chunk-6ejf1z1r.js +0 -9
- package/dist/shadcn/lib/base-ui/_chunk-6kqramh9.js +0 -27
- package/dist/shadcn/lib/base-ui/_chunk-7b9dc493.js +0 -14
- package/dist/shadcn/lib/base-ui/_chunk-8a9vv8am.js +0 -89
- package/dist/shadcn/lib/base-ui/_chunk-8ctgmf06.js +0 -129
- package/dist/shadcn/lib/base-ui/_chunk-8ganmsbg.js +0 -54
- package/dist/shadcn/lib/base-ui/_chunk-8xaqxgck.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-95tf2rxq.js +0 -62
- package/dist/shadcn/lib/base-ui/_chunk-9x63vfqj.js +0 -70
- package/dist/shadcn/lib/base-ui/_chunk-ase0ydtt.js +0 -9
- package/dist/shadcn/lib/base-ui/_chunk-b0nc8wq7.js +0 -34
- package/dist/shadcn/lib/base-ui/_chunk-b5ya6xds.js +0 -10
- package/dist/shadcn/lib/base-ui/_chunk-b6dkjkbw.js +0 -43
- package/dist/shadcn/lib/base-ui/_chunk-c2bz952e.js +0 -19
- package/dist/shadcn/lib/base-ui/_chunk-cdgfsr3q.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-cdj8cpx5.js +0 -347
- package/dist/shadcn/lib/base-ui/_chunk-cgptgywc.js +0 -104
- package/dist/shadcn/lib/base-ui/_chunk-cwvtvwc7.js +0 -35
- package/dist/shadcn/lib/base-ui/_chunk-dan0mva4.js +0 -23
- package/dist/shadcn/lib/base-ui/_chunk-dzvjwv25.js +0 -0
- package/dist/shadcn/lib/base-ui/_chunk-e13rsb6b.js +0 -184
- package/dist/shadcn/lib/base-ui/_chunk-e56mpvk1.js +0 -118
- package/dist/shadcn/lib/base-ui/_chunk-e6k2ecs7.js +0 -48
- package/dist/shadcn/lib/base-ui/_chunk-ebyxgtb4.js +0 -29
- package/dist/shadcn/lib/base-ui/_chunk-f2wttwrf.js +0 -39
- package/dist/shadcn/lib/base-ui/_chunk-fdzctasg.js +0 -38
- package/dist/shadcn/lib/base-ui/_chunk-ffpjy0ta.js +0 -39
- package/dist/shadcn/lib/base-ui/_chunk-fqry7pew.js +0 -603
- package/dist/shadcn/lib/base-ui/_chunk-ghn1tzt8.js +0 -84
- package/dist/shadcn/lib/base-ui/_chunk-gy0bpkmx.js +0 -12
- package/dist/shadcn/lib/base-ui/_chunk-hm5h9vsk.js +0 -16
- package/dist/shadcn/lib/base-ui/_chunk-htdj1jps.js +0 -833
- package/dist/shadcn/lib/base-ui/_chunk-j29xjete.js +0 -146
- package/dist/shadcn/lib/base-ui/_chunk-j3qkyd10.js +0 -50
- package/dist/shadcn/lib/base-ui/_chunk-ktvsd5k6.js +0 -2386
- package/dist/shadcn/lib/base-ui/_chunk-kw8nnq00.js +0 -546
- package/dist/shadcn/lib/base-ui/_chunk-m307wpdj.js +0 -18
- package/dist/shadcn/lib/base-ui/_chunk-mnd0j7v9.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-n11h505c.js +0 -32
- package/dist/shadcn/lib/base-ui/_chunk-p0e2qacz.js +0 -26
- package/dist/shadcn/lib/base-ui/_chunk-pv7b791x.js +0 -106
- package/dist/shadcn/lib/base-ui/_chunk-q5cg71p7.js +0 -83
- package/dist/shadcn/lib/base-ui/_chunk-qbezxj1g.js +0 -385
- package/dist/shadcn/lib/base-ui/_chunk-qmsqz6nt.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-rrh8rt4v.js +0 -65
- package/dist/shadcn/lib/base-ui/_chunk-s5pwkz8v.js +0 -25
- package/dist/shadcn/lib/base-ui/_chunk-svxv97ph.js +0 -218
- package/dist/shadcn/lib/base-ui/_chunk-t7ppm3t0.js +0 -68
- package/dist/shadcn/lib/base-ui/_chunk-vg16xxmb.js +0 -52
- package/dist/shadcn/lib/base-ui/_chunk-vgkfmtbe.js +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-watha94s.js +0 -14
- package/dist/shadcn/lib/base-ui/_chunk-wdqynnjf.js +0 -35
- package/dist/shadcn/lib/base-ui/_chunk-wx2nxg0p.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-x11e1k9r.js +0 -0
- package/dist/shadcn/lib/base-ui/_chunk-x8xehj6d.js +0 -302
- package/dist/shadcn/lib/base-ui/_chunk-xcqbtm2f.js +0 -28
- package/dist/shadcn/lib/base-ui/_chunk-ytnp24gq.js +0 -328
- package/dist/shadcn/lib/base-ui/_chunk-yzr7eg4b.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-zk4mtm9m.js +0 -9
- package/dist/shadcn/lib/base-ui/accordion.d.ts +0 -447
- package/dist/shadcn/lib/base-ui/accordion.js +0 -630
- package/dist/shadcn/lib/base-ui/alert-dialog.d.ts +0 -1467
- package/dist/shadcn/lib/base-ui/alert-dialog.js +0 -98
- package/dist/shadcn/lib/base-ui/avatar.d.ts +0 -123
- package/dist/shadcn/lib/base-ui/avatar.js +0 -235
- package/dist/shadcn/lib/base-ui/button.d.ts +0 -84
- package/dist/shadcn/lib/base-ui/button.js +0 -51
- package/dist/shadcn/lib/base-ui/checkbox.d.ts +0 -341
- package/dist/shadcn/lib/base-ui/checkbox.js +0 -501
- package/dist/shadcn/lib/base-ui/collapsible.d.ts +0 -291
- package/dist/shadcn/lib/base-ui/collapsible.js +0 -264
- package/dist/shadcn/lib/base-ui/context-menu.d.ts +0 -2213
- package/dist/shadcn/lib/base-ui/context-menu.js +0 -323
- package/dist/shadcn/lib/base-ui/dialog.d.ts +0 -1448
- package/dist/shadcn/lib/base-ui/dialog.js +0 -79
- package/dist/shadcn/lib/base-ui/input.d.ts +0 -506
- package/dist/shadcn/lib/base-ui/input.js +0 -1027
- package/dist/shadcn/lib/base-ui/menu.d.ts +0 -2275
- package/dist/shadcn/lib/base-ui/menu.js +0 -60
- package/dist/shadcn/lib/base-ui/menubar.d.ts +0 -48
- package/dist/shadcn/lib/base-ui/menubar.js +0 -156
- package/dist/shadcn/lib/base-ui/merge-props.d.ts +0 -70
- package/dist/shadcn/lib/base-ui/merge-props.js +0 -15
- package/dist/shadcn/lib/base-ui/navigation-menu.d.ts +0 -825
- package/dist/shadcn/lib/base-ui/navigation-menu.js +0 -1849
- package/dist/shadcn/lib/base-ui/popover.d.ts +0 -1743
- package/dist/shadcn/lib/base-ui/popover.js +0 -1089
- package/dist/shadcn/lib/base-ui/preview-card.d.ts +0 -1608
- package/dist/shadcn/lib/base-ui/preview-card.js +0 -919
- package/dist/shadcn/lib/base-ui/progress.d.ts +0 -172
- package/dist/shadcn/lib/base-ui/progress.js +0 -272
- package/dist/shadcn/lib/base-ui/radio-group.d.ts +0 -260
- package/dist/shadcn/lib/base-ui/radio-group.js +0 -239
- package/dist/shadcn/lib/base-ui/radio.d.ts +0 -176
- package/dist/shadcn/lib/base-ui/radio.js +0 -387
- package/dist/shadcn/lib/base-ui/scroll-area.d.ts +0 -241
- package/dist/shadcn/lib/base-ui/scroll-area.js +0 -1055
- package/dist/shadcn/lib/base-ui/select.d.ts +0 -1266
- package/dist/shadcn/lib/base-ui/select.js +0 -2450
- package/dist/shadcn/lib/base-ui/separator.d.ts +0 -76
- package/dist/shadcn/lib/base-ui/separator.js +0 -11
- package/dist/shadcn/lib/base-ui/slider.d.ts +0 -551
- package/dist/shadcn/lib/base-ui/slider.js +0 -1583
- package/dist/shadcn/lib/base-ui/switch.d.ts +0 -313
- package/dist/shadcn/lib/base-ui/switch.js +0 -326
- package/dist/shadcn/lib/base-ui/tabs.d.ts +0 -406
- package/dist/shadcn/lib/base-ui/tabs.js +0 -915
- package/dist/shadcn/lib/base-ui/toggle-group.d.ts +0 -235
- package/dist/shadcn/lib/base-ui/toggle-group.js +0 -145
- package/dist/shadcn/lib/base-ui/toggle.d.ts +0 -224
- package/dist/shadcn/lib/base-ui/toggle.js +0 -127
- package/dist/shadcn/lib/base-ui/tooltip.d.ts +0 -1656
- package/dist/shadcn/lib/base-ui/tooltip.js +0 -920
- package/dist/shadcn/lib/base-ui/use-render.d.ts +0 -87
- package/dist/shadcn/lib/base-ui/use-render.js +0 -15
|
@@ -1,1027 +0,0 @@
|
|
|
1
|
-
/* @base-ui/react 1.5.0 — vendored (MIT — MUI Inc).
|
|
2
|
-
* Refresh: scripts/vendor-base-ui.js (see header for instructions).
|
|
3
|
-
* Do not edit by hand. */
|
|
4
|
-
import {
|
|
5
|
-
useFieldsetRootContext
|
|
6
|
-
} from "./_chunk-c2bz952e.js";
|
|
7
|
-
import {
|
|
8
|
-
useLabel
|
|
9
|
-
} from "./_chunk-ghn1tzt8.js";
|
|
10
|
-
import {
|
|
11
|
-
useLabelableId
|
|
12
|
-
} from "./_chunk-23rx7haq.js";
|
|
13
|
-
import"./_chunk-vgkfmtbe.js";
|
|
14
|
-
import {
|
|
15
|
-
useCheckboxGroupContext
|
|
16
|
-
} from "./_chunk-8xaqxgck.js";
|
|
17
|
-
import {
|
|
18
|
-
FieldItemContext
|
|
19
|
-
} from "./_chunk-7b9dc493.js";
|
|
20
|
-
import {
|
|
21
|
-
useFormContext,
|
|
22
|
-
useRegisterFieldControl
|
|
23
|
-
} from "./_chunk-95tf2rxq.js";
|
|
24
|
-
import {
|
|
25
|
-
DEFAULT_VALIDITY_STATE,
|
|
26
|
-
FieldRootContext,
|
|
27
|
-
LabelableContext,
|
|
28
|
-
fieldValidityMapping,
|
|
29
|
-
useFieldRootContext,
|
|
30
|
-
useLabelableContext
|
|
31
|
-
} from "./_chunk-8ctgmf06.js";
|
|
32
|
-
import"./_chunk-dzvjwv25.js";
|
|
33
|
-
import {
|
|
34
|
-
useControlled
|
|
35
|
-
} from "./_chunk-9x63vfqj.js";
|
|
36
|
-
import {
|
|
37
|
-
activeElement
|
|
38
|
-
} from "./_chunk-cgptgywc.js";
|
|
39
|
-
import"./_chunk-rrh8rt4v.js";
|
|
40
|
-
import {
|
|
41
|
-
useTimeout
|
|
42
|
-
} from "./_chunk-b6dkjkbw.js";
|
|
43
|
-
import {
|
|
44
|
-
ownerDocument
|
|
45
|
-
} from "./_chunk-451nqgsa.js";
|
|
46
|
-
import {
|
|
47
|
-
createChangeEventDetails,
|
|
48
|
-
exports_reason_parts
|
|
49
|
-
} from "./_chunk-e56mpvk1.js";
|
|
50
|
-
import {
|
|
51
|
-
useBaseUiId
|
|
52
|
-
} from "./_chunk-wdqynnjf.js";
|
|
53
|
-
import {
|
|
54
|
-
transitionStatusMapping,
|
|
55
|
-
useOpenChangeComplete,
|
|
56
|
-
useTransitionStatus
|
|
57
|
-
} from "./_chunk-e13rsb6b.js";
|
|
58
|
-
import"./_chunk-zk4mtm9m.js";
|
|
59
|
-
import"./_chunk-8a9vv8am.js";
|
|
60
|
-
import"./_chunk-6ejf1z1r.js";
|
|
61
|
-
import {
|
|
62
|
-
error
|
|
63
|
-
} from "./_chunk-hm5h9vsk.js";
|
|
64
|
-
import"./_chunk-000kmre8.js";
|
|
65
|
-
import {
|
|
66
|
-
useStableCallback
|
|
67
|
-
} from "./_chunk-cwvtvwc7.js";
|
|
68
|
-
import {
|
|
69
|
-
SafeReact,
|
|
70
|
-
useIsoLayoutEffect
|
|
71
|
-
} from "./_chunk-5tze5c8q.js";
|
|
72
|
-
import {
|
|
73
|
-
EMPTY_OBJECT,
|
|
74
|
-
useRefWithInit,
|
|
75
|
-
useRenderElement
|
|
76
|
-
} from "./_chunk-x8xehj6d.js";
|
|
77
|
-
import {
|
|
78
|
-
__export,
|
|
79
|
-
mergeProps
|
|
80
|
-
} from "./_chunk-svxv97ph.js";
|
|
81
|
-
|
|
82
|
-
// node_modules/@base-ui/react/esm/input/Input.js
|
|
83
|
-
import * as React11 from "react";
|
|
84
|
-
|
|
85
|
-
// node_modules/@base-ui/react/esm/field/index.parts.js
|
|
86
|
-
var exports_index_parts = {};
|
|
87
|
-
__export(exports_index_parts, {
|
|
88
|
-
Validity: () => FieldValidity,
|
|
89
|
-
Root: () => FieldRoot,
|
|
90
|
-
Label: () => FieldLabel,
|
|
91
|
-
Item: () => FieldItem,
|
|
92
|
-
Error: () => FieldError,
|
|
93
|
-
Description: () => FieldDescription,
|
|
94
|
-
Control: () => FieldControl
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// node_modules/@base-ui/react/esm/field/root/FieldRoot.js
|
|
98
|
-
import * as React4 from "react";
|
|
99
|
-
|
|
100
|
-
// node_modules/@base-ui/react/esm/internals/labelable-provider/LabelableProvider.js
|
|
101
|
-
import * as React from "react";
|
|
102
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
103
|
-
"use client";
|
|
104
|
-
var LabelableProvider = function LabelableProvider2(props) {
|
|
105
|
-
const defaultId = useBaseUiId();
|
|
106
|
-
const initialControlId = props.controlId === undefined ? defaultId : props.controlId;
|
|
107
|
-
const [controlId, setControlIdState] = React.useState(initialControlId);
|
|
108
|
-
const [labelId, setLabelId] = React.useState(props.labelId);
|
|
109
|
-
const [messageIds, setMessageIds] = React.useState([]);
|
|
110
|
-
const registrationsRef = useRefWithInit(() => new Map);
|
|
111
|
-
const {
|
|
112
|
-
messageIds: parentMessageIds
|
|
113
|
-
} = useLabelableContext();
|
|
114
|
-
const registerControlId = useStableCallback((source, nextId) => {
|
|
115
|
-
const registrations = registrationsRef.current;
|
|
116
|
-
if (nextId === undefined) {
|
|
117
|
-
registrations.delete(source);
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
registrations.set(source, nextId);
|
|
121
|
-
setControlIdState((prev) => {
|
|
122
|
-
if (registrations.size === 0) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
let nextControlId;
|
|
126
|
-
for (const id of registrations.values()) {
|
|
127
|
-
if (prev !== undefined && id === prev) {
|
|
128
|
-
return prev;
|
|
129
|
-
}
|
|
130
|
-
if (nextControlId === undefined) {
|
|
131
|
-
nextControlId = id;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return nextControlId;
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
const getDescriptionProps = React.useCallback((externalProps) => {
|
|
138
|
-
return mergeProps({
|
|
139
|
-
"aria-describedby": parentMessageIds.concat(messageIds).join(" ") || undefined
|
|
140
|
-
}, externalProps);
|
|
141
|
-
}, [parentMessageIds, messageIds]);
|
|
142
|
-
const contextValue = React.useMemo(() => ({
|
|
143
|
-
controlId,
|
|
144
|
-
registerControlId,
|
|
145
|
-
labelId,
|
|
146
|
-
setLabelId,
|
|
147
|
-
messageIds,
|
|
148
|
-
setMessageIds,
|
|
149
|
-
getDescriptionProps
|
|
150
|
-
}), [controlId, registerControlId, labelId, setLabelId, messageIds, setMessageIds, getDescriptionProps]);
|
|
151
|
-
return /* @__PURE__ */ _jsx(LabelableContext.Provider, {
|
|
152
|
-
value: contextValue,
|
|
153
|
-
children: props.children
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
if (true)
|
|
157
|
-
LabelableProvider.displayName = "LabelableProvider";
|
|
158
|
-
|
|
159
|
-
// node_modules/@base-ui/react/esm/field/root/useFieldValidation.js
|
|
160
|
-
import * as React2 from "react";
|
|
161
|
-
|
|
162
|
-
// node_modules/@base-ui/react/esm/field/utils/getCombinedFieldValidityData.js
|
|
163
|
-
function getCombinedFieldValidityData(validityData, invalid) {
|
|
164
|
-
return {
|
|
165
|
-
...validityData,
|
|
166
|
-
state: {
|
|
167
|
-
...validityData.state,
|
|
168
|
-
valid: !invalid && validityData.state.valid
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// node_modules/@base-ui/react/esm/field/root/useFieldValidation.js
|
|
174
|
-
"use client";
|
|
175
|
-
var validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);
|
|
176
|
-
function isOnlyValueMissing(state) {
|
|
177
|
-
if (!state || state.valid || !state.valueMissing) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
let onlyValueMissing = false;
|
|
181
|
-
for (const key of validityKeys) {
|
|
182
|
-
if (key === "valid") {
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
if (key === "valueMissing") {
|
|
186
|
-
onlyValueMissing = state[key];
|
|
187
|
-
}
|
|
188
|
-
if (state[key]) {
|
|
189
|
-
onlyValueMissing = false;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return onlyValueMissing;
|
|
193
|
-
}
|
|
194
|
-
function useFieldValidation(params) {
|
|
195
|
-
const {
|
|
196
|
-
formRef,
|
|
197
|
-
clearErrors
|
|
198
|
-
} = useFormContext();
|
|
199
|
-
const {
|
|
200
|
-
setValidityData,
|
|
201
|
-
validate,
|
|
202
|
-
validityData,
|
|
203
|
-
validationDebounceTime,
|
|
204
|
-
invalid,
|
|
205
|
-
markedDirtyRef,
|
|
206
|
-
state,
|
|
207
|
-
name,
|
|
208
|
-
shouldValidateOnChange,
|
|
209
|
-
getRegisteredFieldId
|
|
210
|
-
} = params;
|
|
211
|
-
const {
|
|
212
|
-
controlId,
|
|
213
|
-
getDescriptionProps
|
|
214
|
-
} = useLabelableContext();
|
|
215
|
-
const timeout = useTimeout();
|
|
216
|
-
const inputRef = React2.useRef(null);
|
|
217
|
-
const commit = useStableCallback(async (value, revalidate = false) => {
|
|
218
|
-
const element = inputRef.current;
|
|
219
|
-
if (!element) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
function updateRegisteredFieldValidity(nextValidityData2, externalInvalid = invalid) {
|
|
223
|
-
const fieldId = getRegisteredFieldId() ?? controlId;
|
|
224
|
-
if (fieldId == null) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const currentFieldData = formRef.current.fields.get(fieldId);
|
|
228
|
-
if (!currentFieldData) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData2, externalInvalid);
|
|
232
|
-
formRef.current.fields.set(fieldId, {
|
|
233
|
-
...currentFieldData,
|
|
234
|
-
validityData: validityDataWithFormErrors
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
if (revalidate) {
|
|
238
|
-
if (state.valid !== false) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
const currentNativeValidity = element.validity;
|
|
242
|
-
if (!currentNativeValidity.valueMissing) {
|
|
243
|
-
const nextValidityData2 = {
|
|
244
|
-
value,
|
|
245
|
-
state: {
|
|
246
|
-
...DEFAULT_VALIDITY_STATE,
|
|
247
|
-
valid: true
|
|
248
|
-
},
|
|
249
|
-
error: "",
|
|
250
|
-
errors: [],
|
|
251
|
-
initialValue: validityData.initialValue
|
|
252
|
-
};
|
|
253
|
-
element.setCustomValidity("");
|
|
254
|
-
updateRegisteredFieldValidity(nextValidityData2, false);
|
|
255
|
-
setValidityData(nextValidityData2);
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
const currentNativeValidityObject = validityKeys.reduce((acc, key) => {
|
|
259
|
-
acc[key] = currentNativeValidity[key];
|
|
260
|
-
return acc;
|
|
261
|
-
}, {});
|
|
262
|
-
if (!currentNativeValidityObject.valid && !isOnlyValueMissing(currentNativeValidityObject)) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
function getState(el) {
|
|
267
|
-
const computedState = validityKeys.reduce((acc, key) => {
|
|
268
|
-
acc[key] = el.validity[key];
|
|
269
|
-
return acc;
|
|
270
|
-
}, {});
|
|
271
|
-
let hasOnlyValueMissingError = false;
|
|
272
|
-
for (const key of validityKeys) {
|
|
273
|
-
if (key === "valid") {
|
|
274
|
-
continue;
|
|
275
|
-
}
|
|
276
|
-
if (key === "valueMissing" && computedState[key]) {
|
|
277
|
-
hasOnlyValueMissingError = true;
|
|
278
|
-
} else if (computedState[key]) {
|
|
279
|
-
return computedState;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
if (hasOnlyValueMissingError && !markedDirtyRef.current) {
|
|
283
|
-
computedState.valid = true;
|
|
284
|
-
computedState.valueMissing = false;
|
|
285
|
-
}
|
|
286
|
-
return computedState;
|
|
287
|
-
}
|
|
288
|
-
timeout.clear();
|
|
289
|
-
let result = null;
|
|
290
|
-
let validationErrors = [];
|
|
291
|
-
const nextState = getState(element);
|
|
292
|
-
let defaultValidationMessage;
|
|
293
|
-
const validateOnChange = shouldValidateOnChange();
|
|
294
|
-
if (element.validationMessage && !validateOnChange) {
|
|
295
|
-
defaultValidationMessage = element.validationMessage;
|
|
296
|
-
validationErrors = [element.validationMessage];
|
|
297
|
-
} else {
|
|
298
|
-
const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
|
|
299
|
-
if (field.name) {
|
|
300
|
-
acc[field.name] = field.getValue();
|
|
301
|
-
}
|
|
302
|
-
return acc;
|
|
303
|
-
}, {});
|
|
304
|
-
const resultOrPromise = validate(value, formValues);
|
|
305
|
-
if (typeof resultOrPromise === "object" && resultOrPromise !== null && "then" in resultOrPromise) {
|
|
306
|
-
result = await resultOrPromise;
|
|
307
|
-
} else {
|
|
308
|
-
result = resultOrPromise;
|
|
309
|
-
}
|
|
310
|
-
if (result !== null) {
|
|
311
|
-
nextState.valid = false;
|
|
312
|
-
nextState.customError = true;
|
|
313
|
-
if (Array.isArray(result)) {
|
|
314
|
-
validationErrors = result;
|
|
315
|
-
element.setCustomValidity(result.join(`
|
|
316
|
-
`));
|
|
317
|
-
} else if (result) {
|
|
318
|
-
validationErrors = [result];
|
|
319
|
-
element.setCustomValidity(result);
|
|
320
|
-
}
|
|
321
|
-
} else if (validateOnChange) {
|
|
322
|
-
element.setCustomValidity("");
|
|
323
|
-
nextState.customError = false;
|
|
324
|
-
if (element.validationMessage) {
|
|
325
|
-
defaultValidationMessage = element.validationMessage;
|
|
326
|
-
validationErrors = [element.validationMessage];
|
|
327
|
-
} else if (element.validity.valid && !nextState.valid) {
|
|
328
|
-
nextState.valid = true;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
const nextValidityData = {
|
|
333
|
-
value,
|
|
334
|
-
state: nextState,
|
|
335
|
-
error: defaultValidationMessage ?? (Array.isArray(result) ? result[0] : result ?? ""),
|
|
336
|
-
errors: validationErrors,
|
|
337
|
-
initialValue: validityData.initialValue
|
|
338
|
-
};
|
|
339
|
-
updateRegisteredFieldValidity(nextValidityData);
|
|
340
|
-
setValidityData(nextValidityData);
|
|
341
|
-
});
|
|
342
|
-
const getValidationProps = React2.useCallback((externalProps = {}) => mergeProps(getDescriptionProps, state.valid === false ? {
|
|
343
|
-
"aria-invalid": true
|
|
344
|
-
} : EMPTY_OBJECT, externalProps), [getDescriptionProps, state.valid]);
|
|
345
|
-
const getInputValidationProps = React2.useCallback((externalProps = {}) => mergeProps({
|
|
346
|
-
onChange(event) {
|
|
347
|
-
if (event.nativeEvent.defaultPrevented) {
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
clearErrors(name);
|
|
351
|
-
if (!shouldValidateOnChange()) {
|
|
352
|
-
commit(event.currentTarget.value, true);
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
const element = event.currentTarget;
|
|
356
|
-
if (element.value === "") {
|
|
357
|
-
commit(element.value);
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
timeout.clear();
|
|
361
|
-
if (validationDebounceTime) {
|
|
362
|
-
timeout.start(validationDebounceTime, () => {
|
|
363
|
-
commit(element.value);
|
|
364
|
-
});
|
|
365
|
-
} else {
|
|
366
|
-
commit(element.value);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}, getValidationProps(externalProps)), [getValidationProps, clearErrors, name, timeout, commit, validationDebounceTime, shouldValidateOnChange]);
|
|
370
|
-
return React2.useMemo(() => ({
|
|
371
|
-
getValidationProps,
|
|
372
|
-
getInputValidationProps,
|
|
373
|
-
inputRef,
|
|
374
|
-
commit
|
|
375
|
-
}), [getValidationProps, getInputValidationProps, commit]);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// node_modules/@base-ui/react/esm/internals/field-register-control/useFieldControlRegistration.js
|
|
379
|
-
import * as React3 from "react";
|
|
380
|
-
"use client";
|
|
381
|
-
function useFieldControlRegistration(params) {
|
|
382
|
-
const {
|
|
383
|
-
commit,
|
|
384
|
-
invalid,
|
|
385
|
-
markedDirtyRef,
|
|
386
|
-
name,
|
|
387
|
-
setRegisteredFieldId,
|
|
388
|
-
setValidityData,
|
|
389
|
-
validityData
|
|
390
|
-
} = params;
|
|
391
|
-
const {
|
|
392
|
-
formRef
|
|
393
|
-
} = useFormContext();
|
|
394
|
-
const activeFieldControlSourceRef = React3.useRef(null);
|
|
395
|
-
const registrationRef = React3.useRef(null);
|
|
396
|
-
const fallbackControlRef = React3.useRef(null);
|
|
397
|
-
const getValueForForm = useStableCallback(() => {
|
|
398
|
-
const registration = registrationRef.current;
|
|
399
|
-
if (!registration) {
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
if (registration.getValue) {
|
|
403
|
-
return registration.getValue();
|
|
404
|
-
}
|
|
405
|
-
return registration.value;
|
|
406
|
-
});
|
|
407
|
-
const validate = useStableCallback(() => {
|
|
408
|
-
const registration = registrationRef.current;
|
|
409
|
-
if (!registration) {
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
let nextValue = registration.value;
|
|
413
|
-
if (nextValue === undefined) {
|
|
414
|
-
nextValue = getValueForForm();
|
|
415
|
-
}
|
|
416
|
-
markedDirtyRef.current = true;
|
|
417
|
-
commit(nextValue);
|
|
418
|
-
});
|
|
419
|
-
function refreshRegistration() {
|
|
420
|
-
const registration = registrationRef.current;
|
|
421
|
-
if (!registration || !registration.id) {
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
formRef.current.fields.set(registration.id, {
|
|
425
|
-
getValue: getValueForForm,
|
|
426
|
-
name,
|
|
427
|
-
controlRef: registration.controlRef ?? fallbackControlRef,
|
|
428
|
-
validityData: getCombinedFieldValidityData(validityData, invalid),
|
|
429
|
-
validate
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
function deleteRegistration(id = registrationRef.current?.id) {
|
|
433
|
-
if (id) {
|
|
434
|
-
formRef.current.fields.delete(id);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function syncInitialValue() {
|
|
438
|
-
const registration = registrationRef.current;
|
|
439
|
-
if (!registration) {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
let initialValue = registration.value;
|
|
443
|
-
if (initialValue === undefined) {
|
|
444
|
-
initialValue = getValueForForm();
|
|
445
|
-
}
|
|
446
|
-
if (validityData.initialValue === null && initialValue !== null) {
|
|
447
|
-
setValidityData((prev) => ({
|
|
448
|
-
...prev,
|
|
449
|
-
initialValue
|
|
450
|
-
}));
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
useIsoLayoutEffect(() => {
|
|
454
|
-
const registration = registrationRef.current;
|
|
455
|
-
if (!registration || !registration.id) {
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
formRef.current.fields.set(registration.id, {
|
|
459
|
-
getValue: getValueForForm,
|
|
460
|
-
name,
|
|
461
|
-
controlRef: registration.controlRef ?? fallbackControlRef,
|
|
462
|
-
validityData: getCombinedFieldValidityData(validityData, invalid),
|
|
463
|
-
validate
|
|
464
|
-
});
|
|
465
|
-
}, [formRef, getValueForForm, invalid, name, validate, validityData]);
|
|
466
|
-
useIsoLayoutEffect(() => {
|
|
467
|
-
const fields = formRef.current.fields;
|
|
468
|
-
return () => {
|
|
469
|
-
const id = registrationRef.current?.id;
|
|
470
|
-
if (id) {
|
|
471
|
-
fields.delete(id);
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
}, [formRef]);
|
|
475
|
-
return useStableCallback((source, registration) => {
|
|
476
|
-
if (!registration) {
|
|
477
|
-
if (activeFieldControlSourceRef.current === source) {
|
|
478
|
-
activeFieldControlSourceRef.current = null;
|
|
479
|
-
deleteRegistration();
|
|
480
|
-
registrationRef.current = null;
|
|
481
|
-
setRegisteredFieldId(undefined);
|
|
482
|
-
}
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
const previousId = registrationRef.current?.id;
|
|
486
|
-
activeFieldControlSourceRef.current = source;
|
|
487
|
-
registrationRef.current = registration;
|
|
488
|
-
setRegisteredFieldId(registration.id);
|
|
489
|
-
if (previousId && previousId !== registration.id) {
|
|
490
|
-
deleteRegistration(previousId);
|
|
491
|
-
}
|
|
492
|
-
syncInitialValue();
|
|
493
|
-
refreshRegistration();
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
// node_modules/@base-ui/react/esm/field/root/FieldRoot.js
|
|
498
|
-
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
499
|
-
"use client";
|
|
500
|
-
var FieldRootInner = /* @__PURE__ */ React4.forwardRef(function FieldRootInner2(componentProps, forwardedRef) {
|
|
501
|
-
const {
|
|
502
|
-
errors,
|
|
503
|
-
validationMode: formValidationMode,
|
|
504
|
-
submitAttemptedRef
|
|
505
|
-
} = useFormContext();
|
|
506
|
-
const {
|
|
507
|
-
render,
|
|
508
|
-
className,
|
|
509
|
-
validate: validateProp,
|
|
510
|
-
validationDebounceTime = 0,
|
|
511
|
-
validationMode = formValidationMode,
|
|
512
|
-
name,
|
|
513
|
-
disabled: disabledProp = false,
|
|
514
|
-
invalid: invalidProp,
|
|
515
|
-
dirty: dirtyProp,
|
|
516
|
-
touched: touchedProp,
|
|
517
|
-
actionsRef,
|
|
518
|
-
style,
|
|
519
|
-
...elementProps
|
|
520
|
-
} = componentProps;
|
|
521
|
-
const {
|
|
522
|
-
disabled: disabledFieldset
|
|
523
|
-
} = useFieldsetRootContext();
|
|
524
|
-
const validate = useStableCallback(validateProp || (() => null));
|
|
525
|
-
const disabled = disabledFieldset || disabledProp;
|
|
526
|
-
const [touchedState, setTouchedUnwrapped] = React4.useState(false);
|
|
527
|
-
const [dirtyState, setDirtyUnwrapped] = React4.useState(false);
|
|
528
|
-
const [filled, setFilled] = React4.useState(false);
|
|
529
|
-
const [focused, setFocused] = React4.useState(false);
|
|
530
|
-
const dirty = dirtyProp ?? dirtyState;
|
|
531
|
-
const touched = touchedProp ?? touchedState;
|
|
532
|
-
const markedDirtyRef = React4.useRef(false);
|
|
533
|
-
const registeredFieldIdRef = React4.useRef(undefined);
|
|
534
|
-
const getRegisteredFieldId = React4.useCallback(() => registeredFieldIdRef.current, []);
|
|
535
|
-
const setRegisteredFieldId = React4.useCallback((id) => {
|
|
536
|
-
registeredFieldIdRef.current = id;
|
|
537
|
-
}, []);
|
|
538
|
-
const setDirty = useStableCallback((value) => {
|
|
539
|
-
if (dirtyProp !== undefined) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
if (value) {
|
|
543
|
-
markedDirtyRef.current = true;
|
|
544
|
-
}
|
|
545
|
-
setDirtyUnwrapped(value);
|
|
546
|
-
});
|
|
547
|
-
const setTouched = useStableCallback((value) => {
|
|
548
|
-
if (touchedProp !== undefined) {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
setTouchedUnwrapped(value);
|
|
552
|
-
});
|
|
553
|
-
const shouldValidateOnChange = useStableCallback(() => validationMode === "onChange" || validationMode === "onSubmit" && submitAttemptedRef.current);
|
|
554
|
-
const hasFormError = !!name && Object.hasOwn(errors, name) && errors[name] !== undefined;
|
|
555
|
-
const invalid = invalidProp === true || hasFormError;
|
|
556
|
-
const [validityData, setValidityData] = React4.useState({
|
|
557
|
-
state: DEFAULT_VALIDITY_STATE,
|
|
558
|
-
error: "",
|
|
559
|
-
errors: [],
|
|
560
|
-
value: null,
|
|
561
|
-
initialValue: null
|
|
562
|
-
});
|
|
563
|
-
const valid = !invalid && validityData.state.valid;
|
|
564
|
-
const state = React4.useMemo(() => ({
|
|
565
|
-
disabled,
|
|
566
|
-
touched,
|
|
567
|
-
dirty,
|
|
568
|
-
valid,
|
|
569
|
-
filled,
|
|
570
|
-
focused
|
|
571
|
-
}), [disabled, touched, dirty, valid, filled, focused]);
|
|
572
|
-
const validation = useFieldValidation({
|
|
573
|
-
setValidityData,
|
|
574
|
-
validate,
|
|
575
|
-
validityData,
|
|
576
|
-
validationDebounceTime,
|
|
577
|
-
invalid,
|
|
578
|
-
markedDirtyRef,
|
|
579
|
-
state,
|
|
580
|
-
name,
|
|
581
|
-
shouldValidateOnChange,
|
|
582
|
-
getRegisteredFieldId
|
|
583
|
-
});
|
|
584
|
-
const validityValue = validityData.value;
|
|
585
|
-
const handleImperativeValidate = React4.useCallback(() => {
|
|
586
|
-
markedDirtyRef.current = true;
|
|
587
|
-
validation.commit(validityValue);
|
|
588
|
-
}, [validation, validityValue]);
|
|
589
|
-
const registerFieldControl = useFieldControlRegistration({
|
|
590
|
-
commit: validation.commit,
|
|
591
|
-
invalid,
|
|
592
|
-
markedDirtyRef,
|
|
593
|
-
name,
|
|
594
|
-
setRegisteredFieldId,
|
|
595
|
-
setValidityData,
|
|
596
|
-
validityData
|
|
597
|
-
});
|
|
598
|
-
React4.useImperativeHandle(actionsRef, () => ({
|
|
599
|
-
validate: handleImperativeValidate
|
|
600
|
-
}), [handleImperativeValidate]);
|
|
601
|
-
const contextValue = React4.useMemo(() => ({
|
|
602
|
-
invalid,
|
|
603
|
-
name,
|
|
604
|
-
validityData,
|
|
605
|
-
setValidityData,
|
|
606
|
-
disabled,
|
|
607
|
-
touched,
|
|
608
|
-
setTouched,
|
|
609
|
-
dirty,
|
|
610
|
-
setDirty,
|
|
611
|
-
filled,
|
|
612
|
-
setFilled,
|
|
613
|
-
focused,
|
|
614
|
-
setFocused,
|
|
615
|
-
validate,
|
|
616
|
-
validationMode,
|
|
617
|
-
validationDebounceTime,
|
|
618
|
-
shouldValidateOnChange,
|
|
619
|
-
state,
|
|
620
|
-
markedDirtyRef,
|
|
621
|
-
registerFieldControl,
|
|
622
|
-
validation
|
|
623
|
-
}), [invalid, name, validityData, disabled, touched, setTouched, dirty, setDirty, filled, setFilled, focused, setFocused, validate, validationMode, validationDebounceTime, shouldValidateOnChange, state, registerFieldControl, validation]);
|
|
624
|
-
const element = useRenderElement("div", componentProps, {
|
|
625
|
-
ref: forwardedRef,
|
|
626
|
-
state,
|
|
627
|
-
props: elementProps,
|
|
628
|
-
stateAttributesMapping: fieldValidityMapping
|
|
629
|
-
});
|
|
630
|
-
return /* @__PURE__ */ _jsx2(FieldRootContext.Provider, {
|
|
631
|
-
value: contextValue,
|
|
632
|
-
children: element
|
|
633
|
-
});
|
|
634
|
-
});
|
|
635
|
-
if (true)
|
|
636
|
-
FieldRootInner.displayName = "FieldRootInner";
|
|
637
|
-
var FieldRoot = /* @__PURE__ */ React4.forwardRef(function FieldRoot2(componentProps, forwardedRef) {
|
|
638
|
-
return /* @__PURE__ */ _jsx2(LabelableProvider, {
|
|
639
|
-
children: /* @__PURE__ */ _jsx2(FieldRootInner, {
|
|
640
|
-
...componentProps,
|
|
641
|
-
ref: forwardedRef
|
|
642
|
-
})
|
|
643
|
-
});
|
|
644
|
-
});
|
|
645
|
-
if (true)
|
|
646
|
-
FieldRoot.displayName = "FieldRoot";
|
|
647
|
-
// node_modules/@base-ui/react/esm/field/label/FieldLabel.js
|
|
648
|
-
import * as React5 from "react";
|
|
649
|
-
"use client";
|
|
650
|
-
var FieldLabel = /* @__PURE__ */ React5.forwardRef(function FieldLabel2(componentProps, forwardedRef) {
|
|
651
|
-
const {
|
|
652
|
-
render,
|
|
653
|
-
className,
|
|
654
|
-
style,
|
|
655
|
-
id: idProp,
|
|
656
|
-
nativeLabel = true,
|
|
657
|
-
...elementProps
|
|
658
|
-
} = componentProps;
|
|
659
|
-
const fieldRootContext = useFieldRootContext(false);
|
|
660
|
-
const {
|
|
661
|
-
labelId
|
|
662
|
-
} = useLabelableContext();
|
|
663
|
-
const labelRef = React5.useRef(null);
|
|
664
|
-
const labelProps = useLabel({
|
|
665
|
-
id: labelId ?? idProp,
|
|
666
|
-
native: nativeLabel
|
|
667
|
-
});
|
|
668
|
-
if (true) {
|
|
669
|
-
React5.useEffect(() => {
|
|
670
|
-
if (!labelRef.current) {
|
|
671
|
-
return;
|
|
672
|
-
}
|
|
673
|
-
const isLabelTag = labelRef.current.tagName === "LABEL";
|
|
674
|
-
if (nativeLabel) {
|
|
675
|
-
if (!isLabelTag) {
|
|
676
|
-
const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
|
|
677
|
-
const message = "<Field.Label> expected a <label> element because the `nativeLabel` prop is true. " + "Rendering a non-<label> disables native label association, so `htmlFor` will not " + "work. Use a real <label> in the `render` prop, or set `nativeLabel` to `false`.";
|
|
678
|
-
error(`${message}${ownerStackMessage}`);
|
|
679
|
-
}
|
|
680
|
-
} else if (isLabelTag) {
|
|
681
|
-
const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
|
|
682
|
-
const message = "<Field.Label> expected a non-<label> element because the `nativeLabel` prop is false. " + "Rendering a <label> assumes native label behavior while Base UI treats it as " + "non-native, which can cause unexpected pointer behavior. Use a non-<label> in the " + "`render` prop, or set `nativeLabel` to `true`.";
|
|
683
|
-
error(`${message}${ownerStackMessage}`);
|
|
684
|
-
}
|
|
685
|
-
}, [nativeLabel]);
|
|
686
|
-
}
|
|
687
|
-
const element = useRenderElement("label", componentProps, {
|
|
688
|
-
ref: [forwardedRef, labelRef],
|
|
689
|
-
state: fieldRootContext.state,
|
|
690
|
-
props: [labelProps, elementProps],
|
|
691
|
-
stateAttributesMapping: fieldValidityMapping
|
|
692
|
-
});
|
|
693
|
-
return element;
|
|
694
|
-
});
|
|
695
|
-
if (true)
|
|
696
|
-
FieldLabel.displayName = "FieldLabel";
|
|
697
|
-
// node_modules/@base-ui/react/esm/field/error/FieldError.js
|
|
698
|
-
import * as React6 from "react";
|
|
699
|
-
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
700
|
-
"use client";
|
|
701
|
-
var stateAttributesMapping = {
|
|
702
|
-
...fieldValidityMapping,
|
|
703
|
-
...transitionStatusMapping
|
|
704
|
-
};
|
|
705
|
-
var FieldError = /* @__PURE__ */ React6.forwardRef(function FieldError2(componentProps, forwardedRef) {
|
|
706
|
-
const {
|
|
707
|
-
render,
|
|
708
|
-
id: idProp,
|
|
709
|
-
className,
|
|
710
|
-
match,
|
|
711
|
-
style,
|
|
712
|
-
...elementProps
|
|
713
|
-
} = componentProps;
|
|
714
|
-
const id = useBaseUiId(idProp);
|
|
715
|
-
const {
|
|
716
|
-
validityData,
|
|
717
|
-
state: fieldState,
|
|
718
|
-
name
|
|
719
|
-
} = useFieldRootContext(false);
|
|
720
|
-
const {
|
|
721
|
-
setMessageIds
|
|
722
|
-
} = useLabelableContext();
|
|
723
|
-
const {
|
|
724
|
-
errors
|
|
725
|
-
} = useFormContext();
|
|
726
|
-
const formError = name ? errors[name] : null;
|
|
727
|
-
const hasSpecificMatch = typeof match === "string";
|
|
728
|
-
let rendered = false;
|
|
729
|
-
if (match === true) {
|
|
730
|
-
rendered = true;
|
|
731
|
-
} else if (hasSpecificMatch) {
|
|
732
|
-
rendered = Boolean(validityData.state[match]);
|
|
733
|
-
} else {
|
|
734
|
-
rendered = Boolean(formError) || validityData.state.valid === false;
|
|
735
|
-
}
|
|
736
|
-
const {
|
|
737
|
-
mounted,
|
|
738
|
-
transitionStatus,
|
|
739
|
-
setMounted
|
|
740
|
-
} = useTransitionStatus(rendered);
|
|
741
|
-
useIsoLayoutEffect(() => {
|
|
742
|
-
if (!rendered || !id) {
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
setMessageIds((v) => v.concat(id));
|
|
746
|
-
return () => {
|
|
747
|
-
setMessageIds((v) => v.filter((item) => item !== id));
|
|
748
|
-
};
|
|
749
|
-
}, [rendered, id, setMessageIds]);
|
|
750
|
-
const errorRef = React6.useRef(null);
|
|
751
|
-
const [lastRenderedMessage, setLastRenderedMessage] = React6.useState(null);
|
|
752
|
-
const [lastRenderedMessageKey, setLastRenderedMessageKey] = React6.useState(null);
|
|
753
|
-
const clientErrorMessage = validityData.errors.length > 1 ? /* @__PURE__ */ _jsx3("ul", {
|
|
754
|
-
children: validityData.errors.map((message) => /* @__PURE__ */ _jsx3("li", {
|
|
755
|
-
children: message
|
|
756
|
-
}, message))
|
|
757
|
-
}) : validityData.error;
|
|
758
|
-
const errorMessage = hasSpecificMatch ? clientErrorMessage : formError || clientErrorMessage;
|
|
759
|
-
let errorKey = validityData.error;
|
|
760
|
-
if (formError != null) {
|
|
761
|
-
errorKey = Array.isArray(formError) ? JSON.stringify(formError) : formError;
|
|
762
|
-
} else if (validityData.errors.length > 1) {
|
|
763
|
-
errorKey = JSON.stringify(validityData.errors);
|
|
764
|
-
}
|
|
765
|
-
if (rendered && errorKey !== lastRenderedMessageKey) {
|
|
766
|
-
setLastRenderedMessageKey(errorKey);
|
|
767
|
-
setLastRenderedMessage(errorMessage);
|
|
768
|
-
}
|
|
769
|
-
useOpenChangeComplete({
|
|
770
|
-
open: rendered,
|
|
771
|
-
ref: errorRef,
|
|
772
|
-
onComplete() {
|
|
773
|
-
if (!rendered) {
|
|
774
|
-
setMounted(false);
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
});
|
|
778
|
-
const state = {
|
|
779
|
-
...fieldState,
|
|
780
|
-
transitionStatus
|
|
781
|
-
};
|
|
782
|
-
const element = useRenderElement("div", componentProps, {
|
|
783
|
-
ref: [forwardedRef, errorRef],
|
|
784
|
-
state,
|
|
785
|
-
props: [{
|
|
786
|
-
id,
|
|
787
|
-
children: rendered ? errorMessage : lastRenderedMessage
|
|
788
|
-
}, elementProps],
|
|
789
|
-
stateAttributesMapping,
|
|
790
|
-
enabled: mounted
|
|
791
|
-
});
|
|
792
|
-
if (!mounted) {
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
return element;
|
|
796
|
-
});
|
|
797
|
-
if (true)
|
|
798
|
-
FieldError.displayName = "FieldError";
|
|
799
|
-
// node_modules/@base-ui/react/esm/field/description/FieldDescription.js
|
|
800
|
-
import * as React7 from "react";
|
|
801
|
-
"use client";
|
|
802
|
-
var FieldDescription = /* @__PURE__ */ React7.forwardRef(function FieldDescription2(componentProps, forwardedRef) {
|
|
803
|
-
const {
|
|
804
|
-
render,
|
|
805
|
-
id: idProp,
|
|
806
|
-
className,
|
|
807
|
-
style,
|
|
808
|
-
...elementProps
|
|
809
|
-
} = componentProps;
|
|
810
|
-
const id = useBaseUiId(idProp);
|
|
811
|
-
const fieldRootContext = useFieldRootContext(false);
|
|
812
|
-
const {
|
|
813
|
-
setMessageIds
|
|
814
|
-
} = useLabelableContext();
|
|
815
|
-
useIsoLayoutEffect(() => {
|
|
816
|
-
if (!id) {
|
|
817
|
-
return;
|
|
818
|
-
}
|
|
819
|
-
setMessageIds((v) => v.concat(id));
|
|
820
|
-
return () => {
|
|
821
|
-
setMessageIds((v) => v.filter((item) => item !== id));
|
|
822
|
-
};
|
|
823
|
-
}, [id, setMessageIds]);
|
|
824
|
-
const element = useRenderElement("p", componentProps, {
|
|
825
|
-
ref: forwardedRef,
|
|
826
|
-
state: fieldRootContext.state,
|
|
827
|
-
props: [{
|
|
828
|
-
id
|
|
829
|
-
}, elementProps],
|
|
830
|
-
stateAttributesMapping: fieldValidityMapping
|
|
831
|
-
});
|
|
832
|
-
return element;
|
|
833
|
-
});
|
|
834
|
-
if (true)
|
|
835
|
-
FieldDescription.displayName = "FieldDescription";
|
|
836
|
-
// node_modules/@base-ui/react/esm/field/control/FieldControl.js
|
|
837
|
-
import * as React8 from "react";
|
|
838
|
-
"use client";
|
|
839
|
-
var FieldControl = /* @__PURE__ */ React8.forwardRef(function FieldControl2(componentProps, forwardedRef) {
|
|
840
|
-
const {
|
|
841
|
-
render,
|
|
842
|
-
className,
|
|
843
|
-
id: idProp,
|
|
844
|
-
name: nameProp,
|
|
845
|
-
value: valueProp,
|
|
846
|
-
disabled: disabledProp = false,
|
|
847
|
-
onValueChange,
|
|
848
|
-
defaultValue,
|
|
849
|
-
autoFocus = false,
|
|
850
|
-
style,
|
|
851
|
-
...elementProps
|
|
852
|
-
} = componentProps;
|
|
853
|
-
const {
|
|
854
|
-
state: fieldState,
|
|
855
|
-
name: fieldName,
|
|
856
|
-
disabled: fieldDisabled,
|
|
857
|
-
setTouched,
|
|
858
|
-
setDirty,
|
|
859
|
-
validityData,
|
|
860
|
-
setFocused,
|
|
861
|
-
setFilled,
|
|
862
|
-
validationMode,
|
|
863
|
-
validation
|
|
864
|
-
} = useFieldRootContext();
|
|
865
|
-
const disabled = fieldDisabled || disabledProp;
|
|
866
|
-
const name = fieldName ?? nameProp;
|
|
867
|
-
const state = {
|
|
868
|
-
...fieldState,
|
|
869
|
-
disabled
|
|
870
|
-
};
|
|
871
|
-
const {
|
|
872
|
-
labelId
|
|
873
|
-
} = useLabelableContext();
|
|
874
|
-
const id = useLabelableId({
|
|
875
|
-
id: idProp
|
|
876
|
-
});
|
|
877
|
-
useIsoLayoutEffect(() => {
|
|
878
|
-
const hasExternalValue = valueProp != null;
|
|
879
|
-
if (validation.inputRef.current?.value || hasExternalValue && valueProp !== "") {
|
|
880
|
-
setFilled(true);
|
|
881
|
-
} else if (hasExternalValue && valueProp === "") {
|
|
882
|
-
setFilled(false);
|
|
883
|
-
}
|
|
884
|
-
}, [validation.inputRef, setFilled, valueProp]);
|
|
885
|
-
const inputRef = React8.useRef(null);
|
|
886
|
-
useIsoLayoutEffect(() => {
|
|
887
|
-
if (autoFocus && inputRef.current === activeElement(ownerDocument(inputRef.current))) {
|
|
888
|
-
setFocused(true);
|
|
889
|
-
}
|
|
890
|
-
}, [autoFocus, setFocused]);
|
|
891
|
-
const [valueUnwrapped] = useControlled({
|
|
892
|
-
controlled: valueProp,
|
|
893
|
-
default: defaultValue,
|
|
894
|
-
name: "FieldControl",
|
|
895
|
-
state: "value"
|
|
896
|
-
});
|
|
897
|
-
const isControlled = valueProp !== undefined;
|
|
898
|
-
const value = isControlled ? valueUnwrapped : undefined;
|
|
899
|
-
const getValueFromInput = useStableCallback(() => validation.inputRef.current?.value);
|
|
900
|
-
useRegisterFieldControl(validation.inputRef, id, value, getValueFromInput);
|
|
901
|
-
const element = useRenderElement("input", componentProps, {
|
|
902
|
-
ref: [forwardedRef, inputRef],
|
|
903
|
-
state,
|
|
904
|
-
props: [{
|
|
905
|
-
id,
|
|
906
|
-
disabled,
|
|
907
|
-
name,
|
|
908
|
-
ref: validation.inputRef,
|
|
909
|
-
"aria-labelledby": labelId,
|
|
910
|
-
autoFocus,
|
|
911
|
-
...isControlled ? {
|
|
912
|
-
value
|
|
913
|
-
} : {
|
|
914
|
-
defaultValue
|
|
915
|
-
},
|
|
916
|
-
onChange(event) {
|
|
917
|
-
const inputValue = event.currentTarget.value;
|
|
918
|
-
onValueChange?.(inputValue, createChangeEventDetails(exports_reason_parts.none, event.nativeEvent));
|
|
919
|
-
setDirty(inputValue !== validityData.initialValue);
|
|
920
|
-
setFilled(inputValue !== "");
|
|
921
|
-
},
|
|
922
|
-
onFocus() {
|
|
923
|
-
setFocused(true);
|
|
924
|
-
},
|
|
925
|
-
onBlur(event) {
|
|
926
|
-
setTouched(true);
|
|
927
|
-
setFocused(false);
|
|
928
|
-
if (validationMode === "onBlur") {
|
|
929
|
-
validation.commit(event.currentTarget.value);
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
onKeyDown(event) {
|
|
933
|
-
if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
|
|
934
|
-
setTouched(true);
|
|
935
|
-
validation.commit(event.currentTarget.value);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}, validation.getInputValidationProps(), elementProps],
|
|
939
|
-
stateAttributesMapping: fieldValidityMapping
|
|
940
|
-
});
|
|
941
|
-
return element;
|
|
942
|
-
});
|
|
943
|
-
if (true)
|
|
944
|
-
FieldControl.displayName = "FieldControl";
|
|
945
|
-
// node_modules/@base-ui/react/esm/field/validity/FieldValidity.js
|
|
946
|
-
import * as React9 from "react";
|
|
947
|
-
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
948
|
-
"use client";
|
|
949
|
-
var FieldValidity = function FieldValidity2(props) {
|
|
950
|
-
const {
|
|
951
|
-
children
|
|
952
|
-
} = props;
|
|
953
|
-
const {
|
|
954
|
-
validityData,
|
|
955
|
-
invalid
|
|
956
|
-
} = useFieldRootContext(false);
|
|
957
|
-
const combinedFieldValidityData = React9.useMemo(() => getCombinedFieldValidityData(validityData, invalid), [validityData, invalid]);
|
|
958
|
-
const isInvalid = combinedFieldValidityData.state.valid === false;
|
|
959
|
-
const {
|
|
960
|
-
transitionStatus
|
|
961
|
-
} = useTransitionStatus(isInvalid);
|
|
962
|
-
const fieldValidityState = React9.useMemo(() => {
|
|
963
|
-
return {
|
|
964
|
-
...combinedFieldValidityData,
|
|
965
|
-
validity: combinedFieldValidityData.state,
|
|
966
|
-
transitionStatus
|
|
967
|
-
};
|
|
968
|
-
}, [combinedFieldValidityData, transitionStatus]);
|
|
969
|
-
return /* @__PURE__ */ _jsx4(React9.Fragment, {
|
|
970
|
-
children: children(fieldValidityState)
|
|
971
|
-
});
|
|
972
|
-
};
|
|
973
|
-
if (true)
|
|
974
|
-
FieldValidity.displayName = "FieldValidity";
|
|
975
|
-
// node_modules/@base-ui/react/esm/field/item/FieldItem.js
|
|
976
|
-
import * as React10 from "react";
|
|
977
|
-
import { jsx as _jsx5 } from "react/jsx-runtime";
|
|
978
|
-
"use client";
|
|
979
|
-
var FieldItem = /* @__PURE__ */ React10.forwardRef(function FieldItem2(componentProps, forwardedRef) {
|
|
980
|
-
const {
|
|
981
|
-
render,
|
|
982
|
-
className,
|
|
983
|
-
style,
|
|
984
|
-
disabled: disabledProp = false,
|
|
985
|
-
...elementProps
|
|
986
|
-
} = componentProps;
|
|
987
|
-
const {
|
|
988
|
-
state,
|
|
989
|
-
disabled: rootDisabled
|
|
990
|
-
} = useFieldRootContext(false);
|
|
991
|
-
const disabled = rootDisabled || disabledProp;
|
|
992
|
-
const checkboxGroupContext = useCheckboxGroupContext();
|
|
993
|
-
const hasParentCheckbox = checkboxGroupContext?.allValues !== undefined;
|
|
994
|
-
const controlId = hasParentCheckbox ? checkboxGroupContext?.parent.id : undefined;
|
|
995
|
-
const fieldItemContext = React10.useMemo(() => ({
|
|
996
|
-
disabled
|
|
997
|
-
}), [disabled]);
|
|
998
|
-
const element = useRenderElement("div", componentProps, {
|
|
999
|
-
ref: forwardedRef,
|
|
1000
|
-
state,
|
|
1001
|
-
props: elementProps,
|
|
1002
|
-
stateAttributesMapping: fieldValidityMapping
|
|
1003
|
-
});
|
|
1004
|
-
return /* @__PURE__ */ _jsx5(LabelableProvider, {
|
|
1005
|
-
controlId,
|
|
1006
|
-
children: /* @__PURE__ */ _jsx5(FieldItemContext.Provider, {
|
|
1007
|
-
value: fieldItemContext,
|
|
1008
|
-
children: element
|
|
1009
|
-
})
|
|
1010
|
-
});
|
|
1011
|
-
});
|
|
1012
|
-
if (true)
|
|
1013
|
-
FieldItem.displayName = "FieldItem";
|
|
1014
|
-
// node_modules/@base-ui/react/esm/input/Input.js
|
|
1015
|
-
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
1016
|
-
"use client";
|
|
1017
|
-
var Input = /* @__PURE__ */ React11.forwardRef(function Input2(props, forwardedRef) {
|
|
1018
|
-
return /* @__PURE__ */ _jsx6(exports_index_parts.Control, {
|
|
1019
|
-
ref: forwardedRef,
|
|
1020
|
-
...props
|
|
1021
|
-
});
|
|
1022
|
-
});
|
|
1023
|
-
if (true)
|
|
1024
|
-
Input.displayName = "Input";
|
|
1025
|
-
export {
|
|
1026
|
-
Input
|
|
1027
|
-
};
|