@gv-tech/ui-web 2.29.1 → 2.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-Bd0-CZQn.js +1 -0
- package/dist/{accordion-D5QXSsCK.mjs → accordion-Cf6DNbLH.mjs} +47 -51
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +1 -2
- package/dist/{alert-dialog-B-a0Wa1M.mjs → alert-dialog-BxFH0Lwn.mjs} +43 -45
- package/dist/alert-dialog-C6vNmGBL.js +1 -0
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +1 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -3
- package/dist/{aspect-ratio-s7Ji1MSr.mjs → aspect-ratio-CdQevcDV.mjs} +4 -6
- package/dist/aspect-ratio-Z4Nkc56X.js +1 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +1 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +3 -4
- package/dist/{avatar-d8Di248f.mjs → avatar-B5PWwGhY.mjs} +50 -52
- package/dist/avatar-CFhYRM52.js +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +1 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -6
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +3 -4
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +3 -4
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +4 -5
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +3 -4
- package/dist/calendar-D5qgt2o2.js +1 -0
- package/dist/{calendar-UW8h9dfh.mjs → calendar-DIqXNjOR.mjs} +687 -840
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +1 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel-D-xEqRCX.js +1 -0
- package/dist/{carousel-DG9xGJns.mjs → carousel-DPjWmM_A.mjs} +13 -15
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +1 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/{checkbox-Dq8VHKDH.mjs → checkbox-DEPm1BBc.mjs} +36 -38
- package/dist/checkbox-DI9Hn_e_.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +1 -2
- package/dist/chunk-HBS6WEDP-D2-yWzIN.js +1 -0
- package/dist/{chunk-HBS6WEDP-aK8IuEX9.mjs → chunk-HBS6WEDP-DD8ZmxRM.mjs} +3 -4
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +2 -3
- package/dist/{combobox-b4OmCNw1.mjs → combobox-C4y8AbZX.mjs} +348 -591
- package/dist/combobox-boXp-mix.js +3 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +1 -2
- package/dist/command-BnW6UIVk.js +1 -0
- package/dist/{command-5hobOyGG.mjs → command-Cbsp7PBx.mjs} +121 -124
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +1 -2
- package/dist/context-menu-CwsdFpx1.js +1 -0
- package/dist/{context-menu-DzzU-_v8.mjs → context-menu-FNgV55ZV.mjs} +117 -119
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +1 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +3 -4
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +2 -3
- package/dist/{dist-Bb5W_J2F.mjs → dist-7YyzJonC.mjs} +4 -4
- package/dist/{dist-BPL7gUpg.mjs → dist-AlmToDtO.mjs} +2 -3
- package/dist/{dist-BB78QQyQ.mjs → dist-B76UOZbx.mjs} +1 -2
- package/dist/{dist-BEbV0Hal.mjs → dist-B7Ph9-T6.mjs} +2 -3
- package/dist/dist-B7jnFMko.js +1 -0
- package/dist/{dist-CS572Be42.mjs → dist-BOiFyvyS.mjs} +1 -2
- package/dist/dist-BQkDLAY7.js +1 -0
- package/dist/dist-Bal96K8t.js +1 -0
- package/dist/dist-Blgp9lfa.js +1 -0
- package/dist/{dist-CpKLY_uZ.mjs → dist-BnlI08Je.mjs} +4 -4
- package/dist/{dist-BexAB6yo.mjs → dist-Bu-uFV1C.mjs} +33 -34
- package/dist/{dist-OqDzLHTa.mjs → dist-C2BHd5i1.mjs} +31 -31
- package/dist/{dist-Dq-h6VAy.mjs → dist-C516Vwxy.mjs} +4 -6
- package/dist/dist-CBlqVBTk.js +1 -0
- package/dist/dist-CDcZ8WMF.js +1 -0
- package/dist/{dist-E8ieJTBC.mjs → dist-CDksSmTD.mjs} +5 -6
- package/dist/dist-CF-qVmmV.js +1 -0
- package/dist/dist-CIgGRTmJ.js +1 -0
- package/dist/dist-CJqVmdrU.js +1 -0
- package/dist/{dist-CPAF050o.mjs → dist-COqM3IM6.mjs} +3 -4
- package/dist/{dist-s7ibhASj.mjs → dist-CbWpCWog.mjs} +12 -13
- package/dist/{dist-DI1vapnL.mjs → dist-CcGLWbPa.mjs} +3 -4
- package/dist/{dist-Dt6m-kwU.mjs → dist-Cn4F8XlY.mjs} +50 -51
- package/dist/dist-CoTs6T03.js +1 -0
- package/dist/dist-Co_xSt6d.js +1 -0
- package/dist/{dist-UkWa-Arh.mjs → dist-Cu0GG-3j.mjs} +2 -3
- package/dist/{dist-Bvfb4y_L.mjs → dist-DKI-XYwI.mjs} +3 -5
- package/dist/{dist-DatgTWLz.mjs → dist-DQeXXRYL.mjs} +81 -82
- package/dist/dist-DW2ltK5-.js +1 -0
- package/dist/dist-DWcKY_sJ.js +1 -0
- package/dist/dist-DdAeWIwf.js +1 -0
- package/dist/dist-DhubV_gU.mjs +4 -0
- package/dist/dist-DmY7elIQ.js +1 -0
- package/dist/{dist-Dm3IQk5b.mjs → dist-DoWtzxYc.mjs} +234 -235
- package/dist/dist-DuQlxGyN.js +1 -0
- package/dist/dist-KFF7QKuL.js +1 -0
- package/dist/dist-RXrZgzkO.js +1 -0
- package/dist/dist-R_G5UQRm.js +1 -0
- package/dist/{dist-BbI6NHqR.mjs → dist-dwRwxUPt.mjs} +1 -2
- package/dist/dist-fzmUl3YX.mjs +553 -0
- package/dist/{dist-vu20fMUK.mjs → dist-hBsne-A2.mjs} +22 -23
- package/dist/{dist-B057I8ju.mjs → dist-ljiGYyay.mjs} +2 -3
- package/dist/dist-pqMcQ1Nk.js +1 -0
- package/dist/dist-zmnQp5Xf.js +1 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu-ChuqZeix.js +1 -0
- package/dist/{dropdown-menu-BqAhn64y.mjs → dropdown-menu-DU7KNoXP.mjs} +75 -77
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +1 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +2 -3
- package/dist/{es2015-DbsmTzuc.mjs → es2015-BooeZGhO.mjs} +94 -111
- package/dist/es2015-Dggv0vx3.js +41 -0
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +4 -5
- package/dist/{floating-ui.react-dom-CyupHsR6.mjs → floating-ui.react-dom-2hihjuTL.mjs} +12 -17
- package/dist/floating-ui.react-dom-BtFIezY4.js +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +19 -20
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card-BeqCs_2R.js +1 -0
- package/dist/{hover-card-DMsxpR9G.mjs → hover-card-w8PmCyw2.mjs} +62 -64
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +2 -3
- package/dist/{input-otp-D49Y9VcH.mjs → input-otp-Bn_Uy1mR.mjs} +6 -17
- package/dist/input-otp-CTRB_0Xp.js +20 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +1 -2
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +4 -5
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +2 -3
- package/dist/{label-DsSICLPc.mjs → label-Da0kELfR.mjs} +4 -6
- package/dist/label-JMa1tFfC.js +1 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +1 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +3 -4
- package/dist/{menubar-DZqEj6S1.mjs → menubar-B7sRxpE4.mjs} +179 -181
- package/dist/menubar-Bd-QKMcw.js +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +1 -2
- package/dist/{message-scroller-CS4t7Ypn.mjs → message-scroller-B8AU0v3Y.mjs} +83 -102
- package/dist/message-scroller-BJb4Mh_I.js +1 -0
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +1 -2
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/{navigation-menu-RO6thDOF.mjs → navigation-menu-B-RwfscB.mjs} +161 -159
- package/dist/navigation-menu-kPwxYZCR.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +1 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +2 -3
- package/dist/popover-Cq5cTNtC.js +1 -0
- package/dist/{popover-DSBkc70V.mjs → popover-T6Ra737i.mjs} +79 -81
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +1 -2
- package/dist/{progress-CQ4nQ85t.mjs → progress-e9YzxvRo.mjs} +11 -13
- package/dist/progress-iUSEI7J9.js +6 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +1 -2
- package/dist/{questionnaire-CVED7G7R.mjs → questionnaire-BLCvUX1C.mjs} +153 -175
- package/dist/questionnaire-CcymIPae.js +1 -0
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +1 -2
- package/dist/{radio-group-TRiAhMZB.mjs → radio-group-BKpiDcIb.mjs} +58 -60
- package/dist/radio-group-DPEzCmxe.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +1 -2
- package/dist/resizable-ByF0NmN9.mjs +2153 -0
- package/dist/resizable-oL3v42zT.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +1 -2
- package/dist/{chunk-BmowowmI.mjs → rolldown-runtime-D7yIeQp2.mjs} +2 -3
- package/dist/rolldown-runtime-DbbDpzbe.js +1 -0
- package/dist/{scroll-area-D6MiNHnJ.mjs → scroll-area-BzNeOQ6C.mjs} +109 -105
- package/dist/scroll-area-s4_ZJK59.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +1 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +6 -11
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +12 -13
- package/dist/{select-BFJUmjvX.mjs → select-B_nRxX2Y.mjs} +280 -279
- package/dist/select-j5_dph9S.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +1 -2
- package/dist/separator-Bn-3XUSJ.js +1 -0
- package/dist/{separator-2kr96SyF.mjs → separator-CCcMNS78.mjs} +4 -6
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +1 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +3 -4
- package/dist/{sidebar-DM9ee9wf.mjs → sidebar-C2ax_A0G.mjs} +47 -49
- package/dist/sidebar-Cnem2n5A.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +1 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/{slider-CdTCoQu1.mjs → slider-B2PUTc7W.mjs} +103 -104
- package/dist/slider-wZuXwuib.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +1 -2
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +2 -3
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch-CD675xU7.js +1 -0
- package/dist/{switch-zUBdj7jK.mjs → switch-ikzIzrme.mjs} +29 -31
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +1 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +5 -6
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -3
- package/dist/{tabs-DaE9pEbo.mjs → tabs-DCm5zOYB.mjs} +45 -47
- package/dist/tabs-fcahDQDp.js +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +1 -2
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +14 -12
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.mjs +1 -2
- package/dist/{theme-toggle-DKh8WFLT.js → theme-toggle-BGTJsIA-.js} +1 -1
- package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-BSMwXb8o.mjs} +13 -15
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +1 -2
- package/dist/toast-C31v9P1K.js +1 -0
- package/dist/{toast-D0Yb-K84.mjs → toast-vU5ISM03.mjs} +181 -181
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +1 -2
- package/dist/toaster-CaJyOCyC.js +1 -0
- package/dist/{toaster-gT2b7mfE.mjs → toaster-D2BV6jez.mjs} +3 -5
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +1 -2
- package/dist/toggle-CSZdCCwX.js +1 -0
- package/dist/{toggle-BAeKd2N0.mjs → toggle-Cv9YYwLI.mjs} +8 -9
- package/dist/toggle-group-RT8wyBwK.js +1 -0
- package/dist/{toggle-group-CEKhUozD.mjs → toggle-group-qvjasXS-.mjs} +44 -45
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +1 -2
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +1 -2
- package/dist/{tooltip-R_nK_Qh5.mjs → tooltip-7ERoN5mV.mjs} +97 -101
- package/dist/tooltip-CC9_spXT.js +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +1 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +3 -3
- package/dist/accordion-DjyDOX-h.js +0 -1
- package/dist/alert-dialog-DYQAhGBC.js +0 -1
- package/dist/aspect-ratio-C-KOOyGP.js +0 -1
- package/dist/avatar-4K3XjhP8.js +0 -1
- package/dist/calendar-DFj14O6r.js +0 -1
- package/dist/carousel-CNGpg5df.js +0 -1
- package/dist/checkbox-BCgbTAdU.js +0 -1
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-CpPIGtPJ.js +0 -4
- package/dist/command-Dbqnm9kI.js +0 -1
- package/dist/context-menu-DyTUismw.js +0 -1
- package/dist/dist-1zUKVGvf.js +0 -1
- package/dist/dist-BBvidwzC.js +0 -1
- package/dist/dist-BTUvBzOm.js +0 -1
- package/dist/dist-BU-TFzJf.js +0 -1
- package/dist/dist-BgXIqHHq.js +0 -1
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-CUvxOuXM.mjs +0 -551
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-ClYM7l1t.js +0 -1
- package/dist/dist-D1qkELLT.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-DEpkkABT.js +0 -1
- package/dist/dist-DKXojpVG.js +0 -1
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DoivLw3t.js +0 -1
- package/dist/dist-GazS1kfR.mjs +0 -5
- package/dist/dist-N97cIp0_.js +0 -1
- package/dist/dist-Qm9hFvM1.js +0 -1
- package/dist/dist-UnTrOmPV.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-Zs2sjYhL.js +0 -1
- package/dist/dist-hFLuJoMi.js +0 -1
- package/dist/dropdown-menu-BtKOr--r.js +0 -1
- package/dist/es2015-DbAsWDbs.js +0 -41
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/hover-card-DWXusgiI.js +0 -1
- package/dist/input-otp-u3obpt-Q.js +0 -20
- package/dist/label-Dacwh21G.js +0 -1
- package/dist/menubar-BYNeRuzx.js +0 -1
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-B36G3O83.js +0 -1
- package/dist/popover-DUHbvKB8.js +0 -1
- package/dist/progress-B9z08UXf.js +0 -6
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-Bd3WbH5I.js +0 -1
- package/dist/resizable-Cq60hEWB.js +0 -1
- package/dist/resizable-Qc8cVUKd.mjs +0 -2857
- package/dist/scroll-area-DFUdJeSZ.js +0 -1
- package/dist/select-iQFoKU1s.js +0 -1
- package/dist/separator-Bo49G2aj.js +0 -1
- package/dist/sidebar-C6O8hLkz.js +0 -1
- package/dist/slider-CagVxozY.js +0 -1
- package/dist/switch-CoeAC1Wk.js +0 -1
- package/dist/tabs-TMhXe20x.js +0 -1
- package/dist/toast-B0S3F09s.js +0 -1
- package/dist/toaster-CX9im8R_.js +0 -1
- package/dist/toggle-B0hXPsi7.js +0 -1
- package/dist/toggle-group-htyug3G7.js +0 -1
- package/dist/tooltip-BZazhXDZ.js +0 -1
- /package/dist/{dist-DJqkhIXb2.js → dist-DJqkhIXb.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as e, r as t, t as n } from "./chunk-HBS6WEDP-DD8ZmxRM.mjs";
|
|
2
|
+
import { t as r } from "./dist-DoWtzxYc.mjs";
|
|
3
|
+
import { buttonVariants as i } from "./button.mjs";
|
|
4
4
|
import { CheckIcon as a } from "lucide-react";
|
|
5
5
|
import * as o from "react";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// ../../node_modules/.bun/@shadcn+react@0.3.1+0ac650c021fb1b59/node_modules/@shadcn/react/dist/questionnaire/index.js
|
|
8
8
|
var l = o.createContext(null), u = o.createContext(null), d = o.createContext(null);
|
|
9
9
|
function f(e) {
|
|
10
10
|
let t = o.useContext(u);
|
|
@@ -70,7 +70,7 @@ function w(e, t) {
|
|
|
70
70
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
71
71
|
}
|
|
72
72
|
function T({ checked: e, defaultChecked: t = !1, disabled: n = !1, onChange: r, value: i }) {
|
|
73
|
-
let { disabled: a, hasInputAnswer: s, invalid: c, multiple: l, name: u, registerAnswerControl: d, registerAnswerSelection: f, required: p, resetVersion: h, selectedAnswerIds: g, setAnswerDefault: _, setAnswerSelectionFromInteraction: y, shortcutByAnswerId: b, shortcutByChoiceValue: x, status: S, syncControlledAnswerSelection: C } = m("Questionnaire.Choice"), w = o.useId(), [T, E] = o.useState(null), ee = o.useRef(t), D = e !== void 0, O = a || n, k = g.includes(w), A = D ? S
|
|
73
|
+
let { disabled: a, hasInputAnswer: s, invalid: c, multiple: l, name: u, registerAnswerControl: d, registerAnswerSelection: f, required: p, resetVersion: h, selectedAnswerIds: g, setAnswerDefault: _, setAnswerSelectionFromInteraction: y, shortcutByAnswerId: b, shortcutByChoiceValue: x, status: S, syncControlledAnswerSelection: C } = m("Questionnaire.Choice"), w = o.useId(), [T, E] = o.useState(null), ee = o.useRef(t), D = e !== void 0, O = a || n, k = g.includes(w), A = D ? S !== "skipped" && e : k, j = l ? "checkbox" : "radio", M = x?.get(i) ?? b.get(w) ?? null;
|
|
74
74
|
o.useLayoutEffect(() => f(w, ee.current), [w, f]), o.useLayoutEffect(() => _(w, t), [
|
|
75
75
|
w,
|
|
76
76
|
t,
|
|
@@ -142,8 +142,8 @@ function T({ checked: e, defaultChecked: t = !1, disabled: n = !1, onChange: r,
|
|
|
142
142
|
state: P
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function E({ defaultValue: e, disabled:
|
|
146
|
-
let { disabled: c, invalid: l, name: u, registerAnswerControl: d, registerAnswerSelection: f, resetVersion: p, selectedAnswerIds: g, setAnswerDefault: _, setAnswerSelectionFromInteraction: y, syncControlledAnswerSelection: b } = m("Questionnaire.Input"), x = o.useId(), S = o.useRef(null), C = o.useRef(h(e)), w = s !== void 0, T = h(e), E = h(s), [ee, D] = o.useState(T), O = c ||
|
|
145
|
+
function E({ defaultValue: e, disabled: n = !1, onChange: r, ref: i, type: a = "text", value: s }) {
|
|
146
|
+
let { disabled: c, invalid: l, name: u, registerAnswerControl: d, registerAnswerSelection: f, resetVersion: p, selectedAnswerIds: g, setAnswerDefault: _, setAnswerSelectionFromInteraction: y, syncControlledAnswerSelection: b } = m("Questionnaire.Input"), x = o.useId(), S = o.useRef(null), C = o.useRef(h(e)), w = s !== void 0, T = h(e), E = h(s), [ee, D] = o.useState(T), O = c || n, k = w ? E : ee, A = g.includes(x);
|
|
147
147
|
o.useLayoutEffect(() => f(x, C.current), [x, f]), o.useLayoutEffect(() => _(x, T), [
|
|
148
148
|
T,
|
|
149
149
|
x,
|
|
@@ -161,11 +161,7 @@ function E({ defaultValue: e, disabled: t = !1, onChange: n, ref: i, type: a = "
|
|
|
161
161
|
x,
|
|
162
162
|
d
|
|
163
163
|
]), o.useLayoutEffect(() => {
|
|
164
|
-
|
|
165
|
-
b(x, E);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
p > 0 && D(T);
|
|
164
|
+
w ? b(x, E) : p > 0 && D(T);
|
|
169
165
|
}, [
|
|
170
166
|
w,
|
|
171
167
|
E,
|
|
@@ -179,7 +175,7 @@ function E({ defaultValue: e, disabled: t = !1, onChange: n, ref: i, type: a = "
|
|
|
179
175
|
!e || !w || (e.defaultValue = String(s));
|
|
180
176
|
}, [w, s]);
|
|
181
177
|
function j(e) {
|
|
182
|
-
if (
|
|
178
|
+
if (r?.(e), e.defaultPrevented) return;
|
|
183
179
|
let t = e.target.value.trim().length > 0;
|
|
184
180
|
w || (D(t), y(x, t));
|
|
185
181
|
}
|
|
@@ -188,7 +184,7 @@ function E({ defaultValue: e, disabled: t = !1, onChange: n, ref: i, type: a = "
|
|
|
188
184
|
filled: k,
|
|
189
185
|
invalid: l
|
|
190
186
|
}, N = o.useCallback((e) => {
|
|
191
|
-
S.current = e,
|
|
187
|
+
S.current = e, t(i)?.(e);
|
|
192
188
|
}, [i]);
|
|
193
189
|
return {
|
|
194
190
|
inputProps: {
|
|
@@ -256,11 +252,7 @@ function A(e, t, n) {
|
|
|
256
252
|
let a = t.choices ?? [], o = new Map(a.map((e) => [e.value, e])), s = new Map(e.choices.map((e) => [e.value, e]));
|
|
257
253
|
for (let e of a) {
|
|
258
254
|
let n = s.get(e.value);
|
|
259
|
-
|
|
260
|
-
r.push(`Choice "${e.value}" is defined for item "${t.name}" but has no rendered Questionnaire.Choice.`);
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
n.disabled !== !!e.disabled && r.push(`Choice "${e.value}" in item "${t.name}" has different disabled values in Root.items and Questionnaire.Choice.`);
|
|
255
|
+
n ? n.disabled !== !!e.disabled && r.push(`Choice "${e.value}" in item "${t.name}" has different disabled values in Root.items and Questionnaire.Choice.`) : r.push(`Choice "${e.value}" is defined for item "${t.name}" but has no rendered Questionnaire.Choice.`);
|
|
264
256
|
}
|
|
265
257
|
if (n) {
|
|
266
258
|
for (let n of e.choices) o.has(n.value) || r.push(`Rendered choice "${n.value}" in item "${t.name}" is missing from Root.items and will not receive a shortcut.`);
|
|
@@ -271,10 +263,10 @@ function A(e, t, n) {
|
|
|
271
263
|
for (let n of t) !n.disabled && !e.itemByName.has(n.name) && r.push(`Rendered item "${n.name}" is missing from Root.items and is excluded from the questionnaire collection.`);
|
|
272
264
|
return r;
|
|
273
265
|
}
|
|
274
|
-
function j({ "aria-describedby": e, "aria-keyshortcuts":
|
|
266
|
+
function j({ "aria-describedby": e, "aria-keyshortcuts": n, disabled: r = !1, invalid: i = !1, multiple: a = !1, name: s, onStatusChange: c, ref: l, required: u = !1 }) {
|
|
275
267
|
let { activeItemName: d, domVersion: p, first: m, itemDefinitionByName: h, last: _, nativeValidation: v, registerItem: C, shortcuts: T } = f("Questionnaire.Item"), [E, ee] = o.useState(null), [D, k] = o.useState([]), [A, j] = o.useState(!1), [M, N] = o.useState([]), [P, F] = o.useState(!1), [I, L] = o.useState(0), [R, z] = o.useState([]), [te, B] = o.useState([]), V = o.useRef([]), ne = o.useRef(a), H = o.useRef(a);
|
|
276
268
|
ne.current = a;
|
|
277
|
-
let U = !
|
|
269
|
+
let U = !r && d === s, W = o.useMemo(() => [...D].sort(w), [D, p]), G = o.useMemo(() => W.filter((e) => !e.disabled), [W]), K = G.some((e) => M.includes(e.id)), q = P ? "skipped" : K ? "answered" : "unanswered", J = q === "skipped" && !u, Y = r || J || !i && q === "answered", X = !r && !J && (i || A && !Y), re = G.some((e) => e.type === "input"), ie = o.useRef(q), ae = h?.get(s), Z = o.useMemo(() => h ? O(ae, T) : null, [
|
|
278
270
|
ae,
|
|
279
271
|
h,
|
|
280
272
|
T
|
|
@@ -301,11 +293,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
301
293
|
}, [$]), le = o.useCallback((e, t) => (t && (V.current = [...V.current.filter((t) => t !== e), e], N((t) => ne.current ? t.includes(e) ? t : [...t, e] : t.length ? t : [e])), () => {
|
|
302
294
|
V.current = V.current.filter((t) => t !== e), N((t) => t.filter((t) => t !== e));
|
|
303
295
|
}), []), ue = o.useCallback((e, t) => {
|
|
304
|
-
|
|
305
|
-
V.current = V.current.includes(e) ? V.current : [...V.current, e];
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
V.current = V.current.filter((t) => t !== e);
|
|
296
|
+
t ? V.current = V.current.includes(e) ? V.current : [...V.current, e] : V.current = V.current.filter((t) => t !== e);
|
|
309
297
|
}, []), de = o.useCallback((e) => (z((t) => t.includes(e) ? t : [...t, e]), () => {
|
|
310
298
|
z((t) => t.filter((t) => t !== e));
|
|
311
299
|
}), []), fe = o.useCallback((e) => (B((t) => t.includes(e) ? t : [...t, e]), () => {
|
|
@@ -314,7 +302,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
314
302
|
if (j(!0), !Y) return !1;
|
|
315
303
|
if (!v) return !0;
|
|
316
304
|
let e = G.find((e) => y(e) && e.element.willValidate && !e.element.validity.valid);
|
|
317
|
-
return e
|
|
305
|
+
return !e || (e.element.focus(), e.element.reportValidity(), !1);
|
|
318
306
|
}, [
|
|
319
307
|
G,
|
|
320
308
|
v,
|
|
@@ -331,7 +319,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
331
319
|
}, [u]);
|
|
332
320
|
o.useLayoutEffect(() => {
|
|
333
321
|
let e = H.current;
|
|
334
|
-
H.current = a,
|
|
322
|
+
H.current = a, e && !a && N((e) => {
|
|
335
323
|
let t = G.find((t) => e.includes(t.id));
|
|
336
324
|
return t ? [t.id] : [];
|
|
337
325
|
});
|
|
@@ -359,7 +347,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
359
347
|
disabled: e.ownDisabled,
|
|
360
348
|
value: e.value
|
|
361
349
|
}] : []),
|
|
362
|
-
disabled:
|
|
350
|
+
disabled: r,
|
|
363
351
|
element: E,
|
|
364
352
|
focus: me,
|
|
365
353
|
focusInvalid: he,
|
|
@@ -375,7 +363,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
375
363
|
});
|
|
376
364
|
}, [
|
|
377
365
|
W,
|
|
378
|
-
|
|
366
|
+
r,
|
|
379
367
|
E,
|
|
380
368
|
me,
|
|
381
369
|
he,
|
|
@@ -392,7 +380,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
392
380
|
]);
|
|
393
381
|
let xe = o.useMemo(() => ({
|
|
394
382
|
active: U,
|
|
395
|
-
disabled:
|
|
383
|
+
disabled: r,
|
|
396
384
|
hasInputAnswer: re,
|
|
397
385
|
invalid: X,
|
|
398
386
|
multiple: a,
|
|
@@ -413,7 +401,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
413
401
|
syncControlledAnswerSelection: ce
|
|
414
402
|
}), [
|
|
415
403
|
U,
|
|
416
|
-
|
|
404
|
+
r,
|
|
417
405
|
re,
|
|
418
406
|
X,
|
|
419
407
|
a,
|
|
@@ -433,13 +421,13 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
433
421
|
q,
|
|
434
422
|
ce
|
|
435
423
|
]), Se = o.useCallback((e) => {
|
|
436
|
-
ee(e),
|
|
424
|
+
ee(e), t(l)?.(e);
|
|
437
425
|
}, [l]), Ce = [
|
|
438
426
|
...R,
|
|
439
427
|
...X ? te : [],
|
|
440
428
|
e
|
|
441
429
|
].filter(Boolean).join(" ") || void 0, we = [
|
|
442
|
-
|
|
430
|
+
n,
|
|
443
431
|
U ? "Meta+Enter Control+Enter" : void 0,
|
|
444
432
|
U && G.length ? "ArrowUp ArrowDown" : void 0,
|
|
445
433
|
U && !m ? "ArrowLeft" : void 0,
|
|
@@ -451,7 +439,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
451
439
|
"aria-describedby": Ce,
|
|
452
440
|
"aria-invalid": X || void 0,
|
|
453
441
|
"aria-keyshortcuts": we,
|
|
454
|
-
disabled:
|
|
442
|
+
disabled: r,
|
|
455
443
|
hidden: !U,
|
|
456
444
|
inert: !U,
|
|
457
445
|
ref: Se,
|
|
@@ -459,7 +447,7 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
459
447
|
},
|
|
460
448
|
state: {
|
|
461
449
|
active: U,
|
|
462
|
-
disabled:
|
|
450
|
+
disabled: r,
|
|
463
451
|
invalid: X,
|
|
464
452
|
multiple: a,
|
|
465
453
|
required: u,
|
|
@@ -467,8 +455,8 @@ function j({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: n = !1, in
|
|
|
467
455
|
}
|
|
468
456
|
};
|
|
469
457
|
}
|
|
470
|
-
function M({ defaultItem: e, item:
|
|
471
|
-
let d = o.useMemo(() => ee(
|
|
458
|
+
function M({ defaultItem: e, item: n, items: r, noValidate: i, onItemChange: a, onReset: s, onSubmit: c, ref: l, shortcuts: u }) {
|
|
459
|
+
let d = o.useMemo(() => ee(r), [r]), [f, p] = o.useState([]), [m, h] = o.useState(() => D(d, e)), [g, v] = o.useState(null), [b, w] = o.useState(0), T = o.useRef(null), E = n !== void 0, O = E ? n : m, j = o.useRef(O), M = i === !1, N = u ?? null, P = o.useRef(/* @__PURE__ */ new Set());
|
|
472
460
|
o.useLayoutEffect(() => {
|
|
473
461
|
if (process.env.NODE_ENV === "production") return;
|
|
474
462
|
if (!d || !g) {
|
|
@@ -529,11 +517,7 @@ function M({ defaultItem: e, item: t, items: n, noValidate: i, onItemChange: a,
|
|
|
529
517
|
return;
|
|
530
518
|
}
|
|
531
519
|
let e = T.current, t = j.current !== O;
|
|
532
|
-
|
|
533
|
-
E && t && (T.current = null, z?.focus());
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
e.target === "invalid" ? z?.focusInvalid() : z?.focus(), T.current = null;
|
|
520
|
+
j.current = O, !e || e.name !== O ? E && t && (T.current = null, z?.focus()) : (e.target === "invalid" ? z?.focusInvalid() : z?.focus(), T.current = null);
|
|
537
521
|
}, [
|
|
538
522
|
z,
|
|
539
523
|
O,
|
|
@@ -585,7 +569,7 @@ function M({ defaultItem: e, item: t, items: n, noValidate: i, onItemChange: a,
|
|
|
585
569
|
g,
|
|
586
570
|
K
|
|
587
571
|
]), re = o.useCallback(() => {
|
|
588
|
-
if (
|
|
572
|
+
if (z && !z.required) {
|
|
589
573
|
if (z.skip(), !G) {
|
|
590
574
|
K(L[R + 1].name);
|
|
591
575
|
return;
|
|
@@ -610,11 +594,7 @@ function M({ defaultItem: e, item: t, items: n, noValidate: i, onItemChange: a,
|
|
|
610
594
|
}
|
|
611
595
|
function ae(e) {
|
|
612
596
|
let t = ne.find((e) => !e.validate());
|
|
613
|
-
|
|
614
|
-
e.preventDefault(), K(t.name, "invalid"), t.name === O && (t.focusInvalid(), T.current = null);
|
|
615
|
-
return;
|
|
616
|
-
}
|
|
617
|
-
c?.(e);
|
|
597
|
+
t ? (e.preventDefault(), K(t.name, "invalid"), t.name === O && (t.focusInvalid(), T.current = null)) : c?.(e);
|
|
618
598
|
}
|
|
619
599
|
function Z(e) {
|
|
620
600
|
if (e.defaultPrevented || e.nativeEvent.isComposing || e.keyCode === 229 || !z || !(e.target instanceof Element)) return;
|
|
@@ -679,7 +659,7 @@ function M({ defaultItem: e, item: t, items: n, noValidate: i, onItemChange: a,
|
|
|
679
659
|
re,
|
|
680
660
|
H
|
|
681
661
|
]), $ = o.useCallback((e) => {
|
|
682
|
-
v(e),
|
|
662
|
+
v(e), t(l)?.(e);
|
|
683
663
|
}, [l]);
|
|
684
664
|
return {
|
|
685
665
|
context: oe,
|
|
@@ -693,20 +673,20 @@ function M({ defaultItem: e, item: t, items: n, noValidate: i, onItemChange: a,
|
|
|
693
673
|
state: Q
|
|
694
674
|
};
|
|
695
675
|
}
|
|
696
|
-
function N({ defaultItem:
|
|
676
|
+
function N({ defaultItem: t, item: r, items: i, noValidate: a = !0, onItemChange: o, onReset: c, onSubmit: l, ref: d, shortcuts: f, ...p }) {
|
|
697
677
|
let { context: m, rootProps: h, state: g } = M({
|
|
698
|
-
defaultItem:
|
|
699
|
-
item:
|
|
700
|
-
items:
|
|
678
|
+
defaultItem: t,
|
|
679
|
+
item: r,
|
|
680
|
+
items: i,
|
|
701
681
|
noValidate: a,
|
|
702
682
|
onItemChange: o,
|
|
703
683
|
onReset: c,
|
|
704
684
|
onSubmit: l,
|
|
705
685
|
ref: d,
|
|
706
686
|
shortcuts: f
|
|
707
|
-
}), _ =
|
|
687
|
+
}), _ = n({
|
|
708
688
|
defaultTagName: "form",
|
|
709
|
-
props:
|
|
689
|
+
props: e({
|
|
710
690
|
...h,
|
|
711
691
|
noValidate: a
|
|
712
692
|
}, p),
|
|
@@ -717,21 +697,21 @@ function N({ defaultItem: e, item: t, items: r, noValidate: a = !0, onItemChange
|
|
|
717
697
|
children: _
|
|
718
698
|
});
|
|
719
699
|
}
|
|
720
|
-
function P({ children:
|
|
700
|
+
function P({ children: t, render: r, ...i }) {
|
|
721
701
|
let { current: a, first: o, last: s, total: c } = f("Questionnaire.Progress"), l = c ? `Question ${a} of ${c}` : void 0;
|
|
722
|
-
return
|
|
702
|
+
return n({
|
|
723
703
|
defaultTagName: "div",
|
|
724
|
-
props:
|
|
704
|
+
props: e({
|
|
725
705
|
"aria-label": "Questionnaire progress",
|
|
726
706
|
"aria-live": "polite",
|
|
727
707
|
"aria-valuemax": c || void 0,
|
|
728
708
|
"aria-valuemin": c ? 1 : void 0,
|
|
729
709
|
"aria-valuenow": c ? a : void 0,
|
|
730
710
|
"aria-valuetext": l,
|
|
731
|
-
children:
|
|
711
|
+
children: t ?? l,
|
|
732
712
|
role: "progressbar"
|
|
733
|
-
},
|
|
734
|
-
render:
|
|
713
|
+
}, i),
|
|
714
|
+
render: r,
|
|
735
715
|
state: {
|
|
736
716
|
current: a,
|
|
737
717
|
first: o,
|
|
@@ -740,10 +720,10 @@ function P({ children: e, render: t, ...r }) {
|
|
|
740
720
|
}
|
|
741
721
|
});
|
|
742
722
|
}
|
|
743
|
-
function F({ "aria-describedby":
|
|
723
|
+
function F({ "aria-describedby": t, "aria-keyshortcuts": r, children: i, disabled: a = !1, invalid: o = !1, multiple: c = !1, name: l, onStatusChange: u, ref: f, required: p = !1, ...m }) {
|
|
744
724
|
let { context: h, itemProps: g, state: _ } = j({
|
|
745
|
-
"aria-describedby":
|
|
746
|
-
"aria-keyshortcuts":
|
|
725
|
+
"aria-describedby": t,
|
|
726
|
+
"aria-keyshortcuts": r,
|
|
747
727
|
disabled: a,
|
|
748
728
|
invalid: o,
|
|
749
729
|
multiple: c,
|
|
@@ -751,11 +731,11 @@ function F({ "aria-describedby": e, "aria-keyshortcuts": t, children: r, disable
|
|
|
751
731
|
onStatusChange: u,
|
|
752
732
|
ref: f,
|
|
753
733
|
required: p
|
|
754
|
-
}), v =
|
|
734
|
+
}), v = n({
|
|
755
735
|
defaultTagName: "fieldset",
|
|
756
|
-
props:
|
|
736
|
+
props: e({
|
|
757
737
|
...g,
|
|
758
|
-
children:
|
|
738
|
+
children: i
|
|
759
739
|
}, m),
|
|
760
740
|
state: _,
|
|
761
741
|
stateAttributesMapping: { active: (e) => ({ "data-active": e ? "" : void 0 }) }
|
|
@@ -766,39 +746,39 @@ function F({ "aria-describedby": e, "aria-keyshortcuts": t, children: r, disable
|
|
|
766
746
|
});
|
|
767
747
|
}
|
|
768
748
|
function I({ render: e, ...t }) {
|
|
769
|
-
return m("Questionnaire.Title"),
|
|
749
|
+
return m("Questionnaire.Title"), n({
|
|
770
750
|
defaultTagName: "legend",
|
|
771
751
|
props: t,
|
|
772
752
|
render: e
|
|
773
753
|
});
|
|
774
754
|
}
|
|
775
|
-
function L({ id:
|
|
776
|
-
let { registerDescription: a } = m("Questionnaire.Description"), s = o.useId(), c =
|
|
777
|
-
return o.useLayoutEffect(() => a(c), [c, a]),
|
|
755
|
+
function L({ id: t, render: r, ...i }) {
|
|
756
|
+
let { registerDescription: a } = m("Questionnaire.Description"), s = o.useId(), c = t ?? s;
|
|
757
|
+
return o.useLayoutEffect(() => a(c), [c, a]), n({
|
|
778
758
|
defaultTagName: "p",
|
|
779
|
-
props:
|
|
780
|
-
render:
|
|
759
|
+
props: e({ id: c }, i),
|
|
760
|
+
render: r
|
|
781
761
|
});
|
|
782
762
|
}
|
|
783
763
|
function R({ render: e, ...t }) {
|
|
784
|
-
let { shortcuts:
|
|
785
|
-
return
|
|
764
|
+
let { shortcuts: r } = m("Questionnaire.Choices");
|
|
765
|
+
return n({
|
|
786
766
|
defaultTagName: "div",
|
|
787
767
|
props: t,
|
|
788
768
|
render: e,
|
|
789
|
-
state: { shortcuts:
|
|
769
|
+
state: { shortcuts: r }
|
|
790
770
|
});
|
|
791
771
|
}
|
|
792
|
-
function z({ checked:
|
|
772
|
+
function z({ checked: t, children: r, defaultChecked: i = !1, disabled: a = !1, onChange: o, render: c, value: u, ...d }) {
|
|
793
773
|
let { inputProps: f, state: p } = T({
|
|
794
|
-
checked:
|
|
795
|
-
defaultChecked:
|
|
774
|
+
checked: t,
|
|
775
|
+
defaultChecked: i,
|
|
796
776
|
disabled: a,
|
|
797
777
|
onChange: o,
|
|
798
778
|
value: u
|
|
799
|
-
}), m =
|
|
779
|
+
}), m = n({
|
|
800
780
|
defaultTagName: "label",
|
|
801
|
-
props:
|
|
781
|
+
props: e({ children: r }, d),
|
|
802
782
|
render: c,
|
|
803
783
|
state: p,
|
|
804
784
|
stateAttributesMapping: { checked: (e) => ({
|
|
@@ -814,12 +794,12 @@ function z({ checked: e, children: t, defaultChecked: r = !1, disabled: a = !1,
|
|
|
814
794
|
children: m
|
|
815
795
|
});
|
|
816
796
|
}
|
|
817
|
-
function te({ render:
|
|
818
|
-
let { inputProps:
|
|
819
|
-
return
|
|
797
|
+
function te({ render: t, ...r }) {
|
|
798
|
+
let { inputProps: i, state: a } = p("Questionnaire.ChoiceInput");
|
|
799
|
+
return n({
|
|
820
800
|
defaultTagName: "input",
|
|
821
|
-
props:
|
|
822
|
-
render:
|
|
801
|
+
props: e(i, r),
|
|
802
|
+
render: t,
|
|
823
803
|
state: a,
|
|
824
804
|
stateAttributesMapping: { checked: (e) => ({
|
|
825
805
|
"data-checked": e ? "" : void 0,
|
|
@@ -828,37 +808,37 @@ function te({ render: e, ...t }) {
|
|
|
828
808
|
});
|
|
829
809
|
}
|
|
830
810
|
function B({ render: e, ...t }) {
|
|
831
|
-
return p("Questionnaire.ChoiceLabel"),
|
|
811
|
+
return p("Questionnaire.ChoiceLabel"), n({
|
|
832
812
|
defaultTagName: "span",
|
|
833
813
|
props: t,
|
|
834
814
|
render: e
|
|
835
815
|
});
|
|
836
816
|
}
|
|
837
|
-
function V({ children:
|
|
817
|
+
function V({ children: t, render: r, ...i }) {
|
|
838
818
|
let { state: a } = p("Questionnaire.ChoiceShortcut"), o = { shortcut: a.shortcut };
|
|
839
|
-
return
|
|
819
|
+
return n({
|
|
840
820
|
defaultTagName: "span",
|
|
841
|
-
props:
|
|
821
|
+
props: e({
|
|
842
822
|
"aria-hidden": !0,
|
|
843
|
-
children:
|
|
823
|
+
children: t ?? a.shortcut,
|
|
844
824
|
hidden: a.shortcut === null
|
|
845
|
-
},
|
|
846
|
-
render:
|
|
825
|
+
}, i),
|
|
826
|
+
render: r,
|
|
847
827
|
state: o
|
|
848
828
|
});
|
|
849
829
|
}
|
|
850
|
-
function ne({ defaultValue:
|
|
830
|
+
function ne({ defaultValue: t, disabled: r = !1, onChange: i, ref: a, render: o, type: s = "text", value: c, ...l }) {
|
|
851
831
|
let { inputProps: u, state: d } = E({
|
|
852
|
-
defaultValue:
|
|
853
|
-
disabled:
|
|
854
|
-
onChange:
|
|
832
|
+
defaultValue: t,
|
|
833
|
+
disabled: r,
|
|
834
|
+
onChange: i,
|
|
855
835
|
ref: a,
|
|
856
836
|
type: s,
|
|
857
837
|
value: c
|
|
858
838
|
});
|
|
859
|
-
return
|
|
839
|
+
return n({
|
|
860
840
|
defaultTagName: "input",
|
|
861
|
-
props:
|
|
841
|
+
props: e(u, l),
|
|
862
842
|
render: o,
|
|
863
843
|
state: d,
|
|
864
844
|
stateAttributesMapping: { filled: (e) => ({
|
|
@@ -867,17 +847,17 @@ function ne({ defaultValue: e, disabled: t = !1, onChange: r, ref: a, render: o,
|
|
|
867
847
|
}) }
|
|
868
848
|
});
|
|
869
849
|
}
|
|
870
|
-
function H({ children:
|
|
871
|
-
let { invalid: s, registerError: c, required: l } = m("Questionnaire.Error"), u = o.useId(), d =
|
|
872
|
-
return o.useLayoutEffect(() => c(d), [d, c]),
|
|
850
|
+
function H({ children: t, id: r, render: i, ...a }) {
|
|
851
|
+
let { invalid: s, registerError: c, required: l } = m("Questionnaire.Error"), u = o.useId(), d = r ?? u;
|
|
852
|
+
return o.useLayoutEffect(() => c(d), [d, c]), n({
|
|
873
853
|
defaultTagName: "p",
|
|
874
|
-
props:
|
|
875
|
-
children:
|
|
854
|
+
props: e({
|
|
855
|
+
children: t ?? (l ? "Choose an answer to continue." : "Choose an answer or skip this question."),
|
|
876
856
|
hidden: !s,
|
|
877
857
|
id: d,
|
|
878
858
|
role: s ? "alert" : void 0
|
|
879
859
|
}, a),
|
|
880
|
-
render:
|
|
860
|
+
render: i,
|
|
881
861
|
state: { invalid: s }
|
|
882
862
|
});
|
|
883
863
|
}
|
|
@@ -947,23 +927,23 @@ function K({ children: e, disabled: t = !1, render: n, tabIndex: r, type: i = "s
|
|
|
947
927
|
visible: s
|
|
948
928
|
});
|
|
949
929
|
}
|
|
950
|
-
function q({ children:
|
|
951
|
-
let f = d && !
|
|
952
|
-
disabled:
|
|
930
|
+
function q({ children: t, disabled: r, onClick: i, props: a, render: o, shortcut: s, status: c, tabIndex: l, type: u, visible: d }) {
|
|
931
|
+
let f = d && !r ? s ?? null : null, p = {
|
|
932
|
+
disabled: r,
|
|
953
933
|
shortcut: f,
|
|
954
934
|
status: c,
|
|
955
935
|
visible: d
|
|
956
936
|
};
|
|
957
|
-
return
|
|
937
|
+
return n({
|
|
958
938
|
defaultTagName: "button",
|
|
959
|
-
props:
|
|
939
|
+
props: e({
|
|
960
940
|
"aria-hidden": !d || void 0,
|
|
961
941
|
"aria-keyshortcuts": f ?? void 0,
|
|
962
|
-
children:
|
|
963
|
-
disabled:
|
|
942
|
+
children: t,
|
|
943
|
+
disabled: r,
|
|
964
944
|
hidden: !d,
|
|
965
945
|
inert: !d,
|
|
966
|
-
onClick:
|
|
946
|
+
onClick: i,
|
|
967
947
|
tabIndex: d ? l : -1,
|
|
968
948
|
type: u
|
|
969
949
|
}, a),
|
|
@@ -993,55 +973,54 @@ var J = {
|
|
|
993
973
|
Next: G,
|
|
994
974
|
Submit: K
|
|
995
975
|
};
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
function Y({ className: t, ...n }) {
|
|
976
|
+
// src/questionnaire.tsx
|
|
977
|
+
function Y({ className: e, ...t }) {
|
|
999
978
|
return /* @__PURE__ */ s(J.Root, {
|
|
1000
979
|
"data-slot": "questionnaire",
|
|
1001
|
-
className:
|
|
1002
|
-
...
|
|
980
|
+
className: r("flex w-full min-w-0 flex-col gap-4", e),
|
|
981
|
+
...t
|
|
1003
982
|
});
|
|
1004
983
|
}
|
|
1005
|
-
function X({ className:
|
|
984
|
+
function X({ className: e, ...t }) {
|
|
1006
985
|
return /* @__PURE__ */ s(J.Progress, {
|
|
1007
986
|
"data-slot": "questionnaire-progress",
|
|
1008
|
-
className:
|
|
1009
|
-
...
|
|
987
|
+
className: r("text-muted-foreground min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium tabular-nums", e),
|
|
988
|
+
...t
|
|
1010
989
|
});
|
|
1011
990
|
}
|
|
1012
|
-
function re({ className:
|
|
991
|
+
function re({ className: e, ...t }) {
|
|
1013
992
|
return /* @__PURE__ */ s(J.Item, {
|
|
1014
993
|
"data-slot": "questionnaire-item",
|
|
1015
|
-
className:
|
|
1016
|
-
...
|
|
994
|
+
className: r("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", e),
|
|
995
|
+
...t
|
|
1017
996
|
});
|
|
1018
997
|
}
|
|
1019
|
-
function ie({ className:
|
|
998
|
+
function ie({ className: e, ...t }) {
|
|
1020
999
|
return /* @__PURE__ */ s(J.Title, {
|
|
1021
1000
|
"data-slot": "questionnaire-title",
|
|
1022
|
-
className:
|
|
1023
|
-
...
|
|
1001
|
+
className: r("text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", e),
|
|
1002
|
+
...t
|
|
1024
1003
|
});
|
|
1025
1004
|
}
|
|
1026
|
-
function ae({ className:
|
|
1005
|
+
function ae({ className: e, ...t }) {
|
|
1027
1006
|
return /* @__PURE__ */ s(J.Description, {
|
|
1028
1007
|
"data-slot": "questionnaire-description",
|
|
1029
|
-
className:
|
|
1030
|
-
...
|
|
1008
|
+
className: r("text-muted-foreground text-sm text-pretty", e),
|
|
1009
|
+
...t
|
|
1031
1010
|
});
|
|
1032
1011
|
}
|
|
1033
|
-
function Z({ className:
|
|
1012
|
+
function Z({ className: e, ...t }) {
|
|
1034
1013
|
return /* @__PURE__ */ s(J.Choices, {
|
|
1035
1014
|
"data-slot": "questionnaire-choices",
|
|
1036
|
-
className:
|
|
1037
|
-
...
|
|
1015
|
+
className: r("group/questionnaire-choices grid min-w-0 gap-2", e),
|
|
1016
|
+
...t
|
|
1038
1017
|
});
|
|
1039
1018
|
}
|
|
1040
|
-
function Q({ children:
|
|
1019
|
+
function Q({ children: e, className: t, ...n }) {
|
|
1041
1020
|
return /* @__PURE__ */ c(J.Choice, {
|
|
1042
1021
|
"data-slot": "questionnaire-choice",
|
|
1043
|
-
className:
|
|
1044
|
-
...
|
|
1022
|
+
className: r("group/questionnaire-choice border-input hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none has-[>input:focus-visible]:ring-3", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", t),
|
|
1023
|
+
...n,
|
|
1045
1024
|
children: [
|
|
1046
1025
|
/* @__PURE__ */ s(J.ChoiceInput, {
|
|
1047
1026
|
"data-slot": "questionnaire-choice-input",
|
|
@@ -1062,7 +1041,7 @@ function Q({ children: t, className: n, ...r }) {
|
|
|
1062
1041
|
/* @__PURE__ */ s(J.ChoiceLabel, {
|
|
1063
1042
|
"data-slot": "questionnaire-choice-label",
|
|
1064
1043
|
className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
|
|
1065
|
-
children:
|
|
1044
|
+
children: e
|
|
1066
1045
|
}),
|
|
1067
1046
|
/* @__PURE__ */ s(J.ChoiceShortcut, {
|
|
1068
1047
|
"data-slot": "questionnaire-choice-shortcut",
|
|
@@ -1071,89 +1050,88 @@ function Q({ children: t, className: n, ...r }) {
|
|
|
1071
1050
|
]
|
|
1072
1051
|
});
|
|
1073
1052
|
}
|
|
1074
|
-
function oe({ className:
|
|
1053
|
+
function oe({ className: e, ...t }) {
|
|
1075
1054
|
return /* @__PURE__ */ s("span", {
|
|
1076
1055
|
"data-slot": "questionnaire-choice-description",
|
|
1077
|
-
className:
|
|
1078
|
-
...
|
|
1056
|
+
className: r("text-muted-foreground", e),
|
|
1057
|
+
...t
|
|
1079
1058
|
});
|
|
1080
1059
|
}
|
|
1081
|
-
function $({ className:
|
|
1060
|
+
function $({ className: e, ...t }) {
|
|
1082
1061
|
return /* @__PURE__ */ s("div", {
|
|
1083
1062
|
"data-slot": "questionnaire-input-wrapper",
|
|
1084
1063
|
className: "group/questionnaire-input relative w-full min-w-0",
|
|
1085
1064
|
children: /* @__PURE__ */ s(J.Input, {
|
|
1086
1065
|
"data-slot": "questionnaire-input",
|
|
1087
|
-
className:
|
|
1088
|
-
...
|
|
1066
|
+
className: r("border-input focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-8 min-h-11 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 sm:min-h-0 md:text-sm", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", e),
|
|
1067
|
+
...t
|
|
1089
1068
|
})
|
|
1090
1069
|
});
|
|
1091
1070
|
}
|
|
1092
|
-
function se({ className:
|
|
1071
|
+
function se({ className: e, ...t }) {
|
|
1093
1072
|
return /* @__PURE__ */ s(J.Error, {
|
|
1094
1073
|
"data-slot": "questionnaire-error",
|
|
1095
|
-
className:
|
|
1096
|
-
...
|
|
1074
|
+
className: r("text-destructive mt-2 text-sm", e),
|
|
1075
|
+
...t
|
|
1097
1076
|
});
|
|
1098
1077
|
}
|
|
1099
|
-
function ce({ className:
|
|
1078
|
+
function ce({ className: e, ...t }) {
|
|
1100
1079
|
return /* @__PURE__ */ s("div", {
|
|
1101
1080
|
"data-slot": "questionnaire-actions",
|
|
1102
|
-
className:
|
|
1103
|
-
...
|
|
1081
|
+
className: r("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", e),
|
|
1082
|
+
...t
|
|
1104
1083
|
});
|
|
1105
1084
|
}
|
|
1106
|
-
function le({ children:
|
|
1085
|
+
function le({ children: e, className: t, size: n = "default", variant: a = "outline", ...o }) {
|
|
1107
1086
|
return /* @__PURE__ */ s(J.Previous, {
|
|
1108
1087
|
"data-slot": "questionnaire-previous",
|
|
1109
|
-
"data-size":
|
|
1088
|
+
"data-size": n,
|
|
1110
1089
|
"data-variant": a,
|
|
1111
|
-
className:
|
|
1112
|
-
size:
|
|
1090
|
+
className: r(i({
|
|
1091
|
+
size: n,
|
|
1113
1092
|
variant: a
|
|
1114
|
-
}), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0",
|
|
1093
|
+
}), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", t),
|
|
1115
1094
|
...o,
|
|
1116
|
-
children:
|
|
1095
|
+
children: e ?? "Previous"
|
|
1117
1096
|
});
|
|
1118
1097
|
}
|
|
1119
|
-
function ue({ children:
|
|
1098
|
+
function ue({ children: e, className: t, size: n = "default", variant: a = "outline", ...o }) {
|
|
1120
1099
|
return /* @__PURE__ */ s(J.Skip, {
|
|
1121
1100
|
"data-slot": "questionnaire-skip",
|
|
1122
|
-
"data-size":
|
|
1101
|
+
"data-size": n,
|
|
1123
1102
|
"data-variant": a,
|
|
1124
|
-
className:
|
|
1125
|
-
size:
|
|
1103
|
+
className: r(i({
|
|
1104
|
+
size: n,
|
|
1126
1105
|
variant: a
|
|
1127
|
-
}), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
1106
|
+
}), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", t),
|
|
1128
1107
|
...o,
|
|
1129
|
-
children:
|
|
1108
|
+
children: e ?? "Skip"
|
|
1130
1109
|
});
|
|
1131
1110
|
}
|
|
1132
|
-
function de({ children:
|
|
1111
|
+
function de({ children: e, className: t, size: n = "default", variant: a = "default", ...o }) {
|
|
1133
1112
|
return /* @__PURE__ */ s(J.Next, {
|
|
1134
1113
|
"data-slot": "questionnaire-next",
|
|
1135
|
-
"data-size":
|
|
1114
|
+
"data-size": n,
|
|
1136
1115
|
"data-variant": a,
|
|
1137
|
-
className:
|
|
1138
|
-
size:
|
|
1116
|
+
className: r(i({
|
|
1117
|
+
size: n,
|
|
1139
1118
|
variant: a
|
|
1140
|
-
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
1119
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", t),
|
|
1141
1120
|
...o,
|
|
1142
|
-
children:
|
|
1121
|
+
children: e ?? "Next"
|
|
1143
1122
|
});
|
|
1144
1123
|
}
|
|
1145
|
-
function fe({ children:
|
|
1124
|
+
function fe({ children: e, className: t, size: n = "default", variant: a = "default", ...o }) {
|
|
1146
1125
|
return /* @__PURE__ */ s(J.Submit, {
|
|
1147
1126
|
"data-slot": "questionnaire-submit",
|
|
1148
|
-
"data-size":
|
|
1127
|
+
"data-size": n,
|
|
1149
1128
|
"data-variant": a,
|
|
1150
|
-
className:
|
|
1151
|
-
size:
|
|
1129
|
+
className: r(i({
|
|
1130
|
+
size: n,
|
|
1152
1131
|
variant: a
|
|
1153
|
-
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
1132
|
+
}), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", t),
|
|
1154
1133
|
...o,
|
|
1155
|
-
children:
|
|
1134
|
+
children: e ?? "Submit"
|
|
1156
1135
|
});
|
|
1157
1136
|
}
|
|
1158
|
-
//#endregion
|
|
1159
1137
|
export { Z as a, $ as c, le as d, X as f, ie as h, oe as i, re as l, fe as m, ce as n, ae as o, ue as p, Q as r, se as s, Y as t, de as u };
|