@povio/ui 5.0.0-rc.8 → 6.0.0-rc.1
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/MIGRATION.md +645 -0
- package/README.md +247 -21
- package/dist/{Accordion-BzwO4_ml.js → Accordion-DQRdeDs1.js} +5 -5
- package/dist/{Alert-DfiJbKH0.d.ts → Alert-Cee_nKWj.d.ts} +3 -3
- package/dist/{AlertDialog-OWTbR4km.d.ts → AlertDialog-uNDUIyng.d.ts} +3 -3
- package/dist/Autocomplete-CWU9Ev3J.js +142 -0
- package/dist/Autocomplete-D_4gEL7D.d.ts +23 -0
- package/dist/Autocomplete.bound-CqhZtdd8.d.ts +9 -0
- package/dist/Autocomplete.bound-D0pgmsHB.js +28 -0
- package/dist/{Badge-CBNpj823.d.ts → Badge-C4HI9XX4.d.ts} +2 -2
- package/dist/{BadgeButton-Ccgt3oGO.d.ts → BadgeButton-h3MeQYcp.d.ts} +2 -2
- package/dist/{BottomSheet-DbQuzfAB.d.ts → BottomSheet-BQXSdxoX.d.ts} +1 -1
- package/dist/{BottomSheet-BXLE3161.js → BottomSheet-z5brMtDt.js} +6 -80
- package/dist/{BottomSheet.lazy-D9LCEo7s.d.ts → BottomSheet.lazy-BzvLg8Ea.d.ts} +1 -1
- package/dist/{Breadcrumbs-FF8hMfXd.js → Breadcrumbs-AbUBqBTq.js} +9 -9
- package/dist/{Breadcrumbs-CUV6CU8Q.d.ts → Breadcrumbs-B9O0_VSN.d.ts} +1 -1
- package/dist/{Button-D6KlWSFL.js → Button-C1YB5dOw.js} +3 -3
- package/dist/Button-DER_6cxv.js +16 -0
- package/dist/Button-f7FPTaiN.d.ts +13 -0
- package/dist/ButtonBase-CYTFS-xK.d.ts +32 -0
- package/dist/{Button-BPTvffuk.js → ButtonBase-CeFSNcVs.js} +9 -9
- package/dist/{Calendar-BxtOuqIM.js → Calendar-DRQ536wk.js} +20 -16
- package/dist/{Checkbox-DYxXYfKL.js → Checkbox-BI3DQPLa.js} +19 -37
- package/dist/{Checkbox-DVTWaMKa.d.ts → Checkbox-CCvC7OVT.d.ts} +9 -8
- package/dist/Checkbox.bound-CMZnF2_d.js +33 -0
- package/dist/Checkbox.bound-DBt33Inx.d.ts +9 -0
- package/dist/{CheckboxCheckmark-D_uc9pon.js → CheckboxCheckmark-BzT6MwH5.js} +9 -6
- package/dist/CheckboxGroup-DQw4hsFa.js +139 -0
- package/dist/CheckboxGroup-MJ6crCZk.d.ts +30 -0
- package/dist/CheckboxGroup.bound-CTCdezUN.js +32 -0
- package/dist/CheckboxGroup.bound-j2Sc8QtU.d.ts +9 -0
- package/dist/ComboBox-DFlz6HJ8.js +212 -0
- package/dist/{DatePicker-wulRNGyL.js → DatePicker-CSm9c37c.js} +38 -48
- package/dist/{DatePicker-8xSs_jNd.d.ts → DatePicker-umTISfvn.d.ts} +21 -10
- package/dist/DatePicker.bound-KLyoWNcX.d.ts +9 -0
- package/dist/DatePicker.bound-Yqckg7Mk.js +36 -0
- package/dist/{DatePickerInput-BB_vPlKu.js → DatePickerInput-Cs9RwZfy.js} +41 -29
- package/dist/{DatePickerInput-D81ZJ3fT.d.ts → DatePickerInput-DwHQvLzi.d.ts} +3 -3
- package/dist/{DateRangePicker-Bfq-yDm7.d.ts → DateRangePicker-hV_U1IK0.d.ts} +30 -10
- package/dist/{DateRangePicker-B0tMVREG.js → DateRangePicker-s_4n-F_P.js} +75 -64
- package/dist/DateRangePicker.bound-C1klxYW0.js +35 -0
- package/dist/DateRangePicker.bound-D-GPENNe.d.ts +9 -0
- package/dist/{DateTimePicker-WGMr0bEH.js → DateTimePicker-411pU7VF.js} +38 -42
- package/dist/{DateTimePicker-D4lHyf6P.d.ts → DateTimePicker-wgV0SUeZ.d.ts} +21 -11
- package/dist/DateTimePicker.bound-BDyUzidV.js +32 -0
- package/dist/DateTimePicker.bound-cF2X_ncj.d.ts +9 -0
- package/dist/{Dialog-9manOgMA.js → Dialog-DSl1Fkqi.js} +10 -7
- package/dist/Dialog-V-2cgGk1.d.ts +21 -0
- package/dist/{Dialog-CKLkS00H.js → Dialog-lFYX-7Ax.js} +22 -27
- package/dist/DropdownMenu-Bl_C5W_E.d.ts +25 -0
- package/dist/{DropdownMenu-5jmtgLXd.js → DropdownMenu-DH7E2aXb.js} +6 -6
- package/dist/{DropdownMenuDesktop-Cl9gZVq0.js → DropdownMenuDesktop-nMoCa6N5.js} +3 -3
- package/dist/{FileInput-DP105Iy9.js → FileInput-CqRrQRM-.js} +25 -39
- package/dist/{FileInput-C4CE5kuP.d.ts → FileInput-Q72yXorH.d.ts} +24 -20
- package/dist/FileInput.bound-BZ7-g-dq.js +30 -0
- package/dist/FileInput.bound-CG2G5E2K.d.ts +8 -0
- package/dist/{FileTrigger-Cthk5_Wp.js → FileTrigger-DBX1Io6E.js} +36 -7
- package/dist/FileUpload-B4ibHWQn.d.ts +11 -0
- package/dist/{FileUpload-CgNDIvzg.js → FileUpload-CG60c6wM.js} +251 -140
- package/dist/FileUpload.bound-C-Zy1n5Y.d.ts +16 -0
- package/dist/FileUpload.bound-DQ6uuH2W.js +30 -0
- package/dist/{FileUploadContainer-042ztsaL.d.ts → FileUploadContainer-CtUhDntB.d.ts} +1 -1
- package/dist/{Form-DlQcyN1f.js → Form-CqF1SaVw.js} +2 -2
- package/dist/{FormField-Byiehm9y.d.ts → FormField-BIRMlgu4.d.ts} +4 -2
- package/dist/{FormField-AY25LzbW.js → FormField-D7KKJ6kG.js} +12 -10
- package/dist/{FormFieldError-BVAO5p7H.js → FormFieldError-Bqjg9cMb.js} +1 -1
- package/dist/FormFieldHeaderTooltip-k8Snf_oM.js +47 -0
- package/dist/{Heading-nI1_VOaE.js → Heading-D4XFYv__.js} +2 -2
- package/dist/IconButton-BM2DUNtN.d.ts +25 -0
- package/dist/{InlineTooltipWrapper-BpApaGXV.js → InlineTooltipWrapper-DBuQX2yo.js} +1 -1
- package/dist/{Input-BsbLZDtC.js → Input-BG0Xjw5X.js} +2 -2
- package/dist/{Input-DOanwj3l.d.ts → Input-BX3sZBEp.d.ts} +13 -9
- package/dist/Input-CG4Irgae.js +229 -0
- package/dist/Input.bound-BE-espm0.d.ts +9 -0
- package/dist/Input.bound-jZx8gJro.js +31 -0
- package/dist/{InputContent-CXuP1ghQ.d.ts → InputContent-DDFr0kml.d.ts} +4 -4
- package/dist/{useFieldAccessibility-CcBTgGfm.js → InputContent-KhD4_YvO.js} +12 -25
- package/dist/{Label-B2-B-uFY.js → Label-BGvF9vWx.js} +2 -2
- package/dist/{Link-Ow9H7kNv.d.ts → Link-Bw2m9W4B.d.ts} +3 -3
- package/dist/{Link-FupWOW1f.js → Link-Chux-Clm.js} +2 -2
- package/dist/{ListBox-CL8Ar4Q_.js → ListBox-CoUk0kkt.js} +10 -11
- package/dist/{MenuItem-DHyqOqln.d.ts → MenuItem-DPZzOqp2.d.ts} +1 -1
- package/dist/{Modal-w60dVQcb.js → Modal-B4p1zFqi.js} +58 -20
- package/dist/NumberField-CxwTlqud.js +225 -0
- package/dist/{NumberField-Cb9Gf6QJ.d.ts → NumberField-qjvHhCfN.d.ts} +13 -9
- package/dist/NumberField.bound-DXPGF5YK.d.ts +9 -0
- package/dist/NumberField.bound-zySl-v_q.js +32 -0
- package/dist/{NumberFormatter-CLDS_LRZ.js → NumberFormatter-DYarfm5F.js} +2 -36
- package/dist/{NumberRangeInput-B_sMIpP1.js → NumberRangeInput-BrW03wC6.js} +15 -43
- package/dist/{NumberRangeInput-BfbJQqzn.d.ts → NumberRangeInput-CS4Kn427.d.ts} +13 -8
- package/dist/NumberRangeInput.bound-C8I7m1cW.d.ts +9 -0
- package/dist/NumberRangeInput.bound-CKywKEKI.js +32 -0
- package/dist/{OverlayArrow-D8z7cCsw.js → OverlayArrow-DF0jMwul.js} +2 -2
- package/dist/{Pagination-CwQu5Py8.d.ts → Pagination-DkpAg2x6.d.ts} +1 -1
- package/dist/{PaginationList-DMRUGtf8.d.ts → PaginationList-DNmZRcS6.d.ts} +1 -1
- package/dist/{PaginationList-DptMNpNs.js → PaginationList-PjOxNQwB.js} +93 -94
- package/dist/PasswordInput-BHPFkVbM.d.ts +11 -0
- package/dist/PasswordInput.bound-CrXKvfil.js +23 -0
- package/dist/{PasswordInput-CLwFUgl0.d.ts → PasswordInput.bound-DC57m4NT.d.ts} +5 -6
- package/dist/{Popover-BTHPteIh.d.ts → Popover-pjd0Hu61.d.ts} +2 -2
- package/dist/{Progress-CjWOR38H.d.ts → Progress-1WGRZE8l.d.ts} +3 -3
- package/dist/{Progress-Du30L4_s.js → Progress-De76pCfX.js} +1 -1
- package/dist/{RadioGroup-CUGNSJql.js → RadioGroup-BPSvcre6.js} +12 -37
- package/dist/RadioGroup-DEwQ6B1F.d.ts +26 -0
- package/dist/RadioGroup.bound-CN4K9dV2.js +32 -0
- package/dist/RadioGroup.bound-Dj6CEG6M.d.ts +9 -0
- package/dist/{RichTextEditor-VDOpj7sk.js → RichTextEditor-BYIQW8QA.js} +147 -78
- package/dist/RichTextEditor-hJtuB7Y6.d.ts +28 -0
- package/dist/{staticSelect.utils-CzlnLPPd.js → Select-Br_3eecr.js} +194 -235
- package/dist/{SelectBase-Omiq2D3M.d.ts → Select-DHYddedn.d.ts} +32 -11
- package/dist/Select.bound-CJ-tCsmX.d.ts +17 -0
- package/dist/Select.bound-CgLKMzLn.js +34 -0
- package/dist/{SelectionIndicator-JblvLKCu.js → SelectionIndicator-B7C5Y0JM.js} +1 -1
- package/dist/{SharedElementTransition-Da1c_cOO.js → SharedElementTransition-DJ9CCbEa.js} +1 -1
- package/dist/{Slider-EYlGCLWe.d.ts → Slider-CcoNTFVN.d.ts} +9 -8
- package/dist/{Slider-Clc1szFY.js → Slider-CqB2TPTR.js} +12 -35
- package/dist/Slider.bound-8B5qzQ-8.d.ts +9 -0
- package/dist/Slider.bound-Bp7Zrs9_.js +31 -0
- package/dist/{Spinner-DbXeDOa2.d.ts → Spinner-B-crRcdG.d.ts} +2 -2
- package/dist/{SplitButton-D9ngY1rJ.d.ts → SplitButton-BzhbtpFA.d.ts} +3 -3
- package/dist/{Stepper-Cp5vbL5g.js → Stepper-CMw6QnCu.js} +2 -2
- package/dist/{Stepper-TATlHZhQ.d.ts → Stepper-LORgYAJr.d.ts} +8 -8
- package/dist/Switch-CSitpm4o.d.ts +24 -0
- package/dist/{Switch-CimmMqEk.js → Switch-R0kAicgM.js} +7 -32
- package/dist/Switch.bound-DVjqsum1.d.ts +9 -0
- package/dist/Switch.bound-Dk-BmxJd.js +33 -0
- package/dist/{Tag-AHfV_XSf.d.ts → Tag-CoqCTZRm.d.ts} +6 -6
- package/dist/{Text-D2MPZ3sY.js → Text-D72yc4S6.js} +1 -1
- package/dist/{TextArea-B3teIhsJ.js → TextArea-DCnqXuHC.js} +29 -30
- package/dist/{TextArea-l_keyLK7.d.ts → TextArea-e8sQm205.d.ts} +11 -9
- package/dist/TextArea.bound-BJZ9m_FE.js +28 -0
- package/dist/TextArea.bound-DEZuRYm_.d.ts +9 -0
- package/dist/{TimePicker-CU_yL2sY.js → TimePicker-BwF-Crbg.js} +54 -46
- package/dist/TimePicker-Zi7B6VTr.d.ts +45 -0
- package/dist/TimePicker.bound-B-BVLNbk.js +32 -0
- package/dist/TimePicker.bound-Bxtb6uJL.d.ts +9 -0
- package/dist/{Toast-ruXqONDA.d.ts → Toast-Dl6KMa58.d.ts} +1 -1
- package/dist/{ToastContainer-qgpzMFD4.js → ToastContainer-BDvta6st.js} +3 -3
- package/dist/ToggleButton-Cce9bnBw.d.ts +17 -0
- package/dist/{ToggleButton-BW1ensey.js → ToggleButton-DUQ8nwKY.js} +5 -5
- package/dist/{toggleGroup.types-Bp43zbSQ.d.ts → ToggleGroup-BJ8cqXaO.d.ts} +14 -13
- package/dist/{ToggleGroup-BULVwErp.js → ToggleGroup-s5sDSB6l.js} +132 -158
- package/dist/ToggleGroup.bound-Cv09n91n.d.ts +9 -0
- package/dist/ToggleGroup.bound-DEc7rdNF.js +67 -0
- package/dist/Tooltip-BiS7isYB.d.ts +16 -0
- package/dist/{Tooltip-CpG1nz7Y.js → Tooltip-CMigoyri.js} +42 -7
- package/dist/{TooltipWrapper-3jyN0Wss.js → TooltipWrapper-D7HUZLsP.js} +6 -6
- package/dist/{Typography-XljT9s02.d.ts → Typography-D2FfZr7a.d.ts} +1 -1
- package/dist/{accordion.cva-CL1bVscW.js → accordion.cva-CeBWV9EO.js} +6 -6
- package/dist/{badgeButton.cva-B2bgCQP6.d.ts → badgeButton.cva-B8EQLwPv.d.ts} +3 -3
- package/dist/{badgeButton.cva-CvN4CTx5.js → badgeButton.cva-BPyVejxO.js} +66 -66
- package/dist/{breadcrumbs.cva-7zzdDhVR.js → breadcrumbs.cva-DPwJJK_D.js} +4 -4
- package/dist/{button.cva-C7kEhgoA.d.ts → button.cva-CBckM91c.d.ts} +3 -3
- package/dist/{button.cva-rv5Uq4aW.js → button.cva-vO0fPUTn.js} +25 -25
- package/dist/{buttonContent.cva-DPIlROA9.d.ts → buttonContent.cva-DG-4lRz4.d.ts} +2 -2
- package/dist/{checkbox.cva-t1Ox50hy.d.ts → checkbox.cva-CJy87xUo.d.ts} +5 -5
- package/dist/{checkbox.cva-IfOByVLA.js → checkbox.cva-D-D9Qgaf.js} +3 -3
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +93 -86
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -134
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +3 -3
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +4 -4
- package/dist/components/bottom-sheet-header.d.ts +16 -0
- package/dist/components/bottom-sheet-header.js +79 -0
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumb/react-aria.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.js +46 -0
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -163
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/combo-box/react-aria.js +1 -1
- package/dist/components/date-picker/react-aria.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker/react-aria.js +1 -1
- package/dist/components/date-range-picker.d.ts +2 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog-trigger/react-aria.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +3 -3
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +3 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +17 -15
- package/dist/components/icon-slot.d.ts +1 -1
- package/dist/components/input-frame.d.ts +93 -0
- package/dist/{useStaticInputHandoff-kkQrc6DA.js → components/input-frame.js} +42 -91
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -241
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/menu-trigger/react-aria.js +1 -1
- package/dist/components/modal/react-aria.js +1 -1
- package/dist/components/modal-overlay/react-aria.js +1 -1
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +1 -245
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +10 -6
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +22 -1
- package/dist/components/popover/react-aria.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +38 -30
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select/react-aria.js +1 -1
- package/dist/components/select.d.ts +2 -3
- package/dist/components/select.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +2 -2
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +3 -0
- package/dist/components/style-definitions.js +121 -0
- package/dist/components/submenu-trigger/react-aria.js +1 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +4 -4
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +17 -30
- package/dist/components/toggle-group.d.ts +2 -3
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/component-configuration.d.ts +30 -0
- package/dist/config/component-configuration.js +69 -0
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/{confirmation.context-BOeEVczb.d.ts → confirmation.context-B2z9A1v3.d.ts} +1 -1
- package/dist/{confirmation.context-BuzgCfYl.js → confirmation.context-BSn1s-ip.js} +1 -1
- package/dist/{datePickerValue.utils-CIFHjKwv.js → datePickerValue.utils-OAQBDk1R.js} +18 -10
- package/dist/{dialog.cva-COhDZaVl.js → dialog.cva-sioU_5R7.js} +1 -1
- package/dist/{dist-CAdwxJbe.js → dist-CAFUM34b.js} +53 -1
- package/dist/{dom.utils-D1AopHx9.js → dom.utils-BbfrA6RP.js} +1 -1
- package/dist/{dropdownMenu.cva-DvEmX0bs.js → dropdownMenu.cva-Bi3a21lO.js} +4 -4
- package/dist/{PasswordInput-DYwUZ4-k.js → eye-BA4nRlMX.js} +1 -22
- package/dist/{fileUpload.types-n5FxK_F-.d.ts → fileUpload.types-BT8P1o7a.d.ts} +17 -17
- package/dist/form.binding-B-2id68q.js +49 -0
- package/dist/form.types-C8P4sznq.d.ts +22 -0
- package/dist/{formFieldError.cva-CsXaQRHX.js → formFieldError.cva-CTl0VeyG.js} +1 -1
- package/dist/{formFieldHelper.cva-B8F9LmsE.js → formFieldHelper.cva-CxAmrG2H.js} +9 -8
- package/dist/hooks/use-async-list.d.ts +2 -0
- package/dist/hooks/use-async-list.js +2 -0
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-CX1vFM9r.d.ts → i18n-2z5on9No.d.ts} +18 -0
- package/dist/{i18n-CX2EjhJI.js → i18n-BjNKHh_D.js} +20 -2
- package/dist/{iconSlot.cva-CnpFzAOR.d.ts → iconSlot.cva-BA9NahZH.d.ts} +2 -1
- package/dist/icons.d.ts +1 -1
- package/dist/index.d.ts +95 -91
- package/dist/index.js +79 -82
- package/dist/{input.cva-BsHgYa-L.d.ts → input.cva-L7jKDv6q.d.ts} +3 -3
- package/dist/{input.cva-DJA8ovm_.js → input.cva-w7ZEVQAM.js} +60 -41
- package/dist/{intlStrings-chfsan9H.js → intlStrings-Cu1YN1tA.js} +35 -35
- package/dist/isEqual-LFw0W5rU.js +97 -0
- package/dist/{link.context-D5qyz9Rf.d.ts → link.context-C4fE_aMo.d.ts} +1 -1
- package/dist/{link.cva-DMTHZiJG.js → link.cva-D3XRgcAv.js} +1 -1
- package/dist/{numberStatic.utils-BX50PSee.js → numberStatic.utils-BIyZuILs.js} +5 -5
- package/dist/{progress.cva-WQB8BGbk.js → progress.cva-D7iiX6Lh.js} +2 -2
- package/dist/{radio.cva-DGbvTymp.js → radio.cva-Ctdop1xV.js} +1 -1
- package/dist/{radio.cva-DN9VQ3Kb.d.ts → radio.cva-DO3UEac-.d.ts} +3 -3
- package/dist/rich-text-editor.d.ts +2 -2
- package/dist/rich-text-editor.js +1 -1
- package/dist/{routing.utils-UTQonIhB.js → routing.utils-DfxEt0_Y.js} +5 -0
- package/dist/selectDesktop.cva-RzxvSBkd.js +14 -0
- package/dist/{selectDesktop.cva-CHAMxhfO.js → selectItem.cva-BWfEkNs_.js} +3 -36
- package/dist/{staticDateTimeSegments-sf_ND7zL.js → staticDateTimeSegments-Bt5wCZvg.js} +58 -54
- package/dist/{status.cva-6HxNR4EP.js → status.cva-BFGMKZO_.js} +14 -14
- package/dist/{stepper.cva-CZ0Kj-s7.js → stepper.cva-CpRi0fGb.js} +10 -10
- package/dist/{configuration.context-f_FSPWhQ.d.ts → style-definitions-_RXJdSk-.d.ts} +183 -86
- package/dist/styles/editor.css +1 -1
- package/dist/styles/input.d.ts +1 -1
- package/dist/{switch.cva-BX3HOxbL.js → switch.cva-BsJ4iAFl.js} +1 -1
- package/dist/{switch.cva-CWNzmdRc.d.ts → switch.cva-psw67dK9.d.ts} +3 -3
- package/dist/table.cva-CmfeWLyW.d.ts +84 -0
- package/dist/table.cva-DFQM8VbM.js +111 -0
- package/dist/{tag.cva-B3MudLeC.js → tag.cva-BCCH7ku3.js} +12 -12
- package/dist/tanstack/autocomplete.d.ts +3 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +3 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +3 -2
- package/dist/tanstack/checkbox.js +2 -2
- package/dist/tanstack/date-picker.d.ts +3 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +3 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +3 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +3 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +4 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/input.d.ts +3 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +3 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +3 -2
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.d.ts +3 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +9 -2
- package/dist/tanstack/rich-text-editor.js +27 -1
- package/dist/tanstack/select.d.ts +3 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +3 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +3 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -2
- package/dist/tanstack/table.js +2 -3
- package/dist/tanstack/text-area.d.ts +3 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +3 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +3 -3
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack-DQu9PNjn.d.ts +469 -0
- package/dist/tanstack.d.ts +79 -78
- package/dist/tanstack.js +79 -83
- package/dist/{toast.cva-By5lvAfr.d.ts → toast.cva-L0k_TBiW.d.ts} +7 -7
- package/dist/{toast.cva-C_L_RffH.js → toast.cva-aC4NMpLb.js} +14 -14
- package/dist/{toast.runtime-Zf-XyAC3.js → toast.runtime-DKOeUnk6.js} +1 -2
- package/dist/{toggleGroup.cva-MbpaEBg1.js → toggleGroup.cva-CEhjMT4j.js} +1 -1
- package/dist/{tooltip.cva-BIzlOXHH.js → tooltip.cva-ClcaR72U.js} +4 -4
- package/dist/tw-ui-plugin.js +5 -1
- package/dist/{typography.cva-D1JOEYl-.d.ts → typography.cva-GpC6QQNx.d.ts} +2 -2
- package/dist/{uiConfig.context-DeBX2beU.d.ts → uiConfig.context-CQU9Tzq_.d.ts} +12 -20
- package/dist/{uiConfig.context-BS3r_kTS.js → uiConfig.context-CT9EVqC5.js} +3 -109
- package/dist/{uiOverrides.context-DEp139He.d.ts → uiOverrides.context-Dmev7iRS.d.ts} +44 -6
- package/dist/useAsyncList-Cu-Y8If2.d.ts +9 -0
- package/dist/useAsyncList-yHz7twsj.js +445 -0
- package/dist/{useBreakpoint-DQoMN-BG.js → useBreakpoint-BzYqQEBO.js} +1 -1
- package/dist/{useControlledState-CzXkZCX8.js → useControlledState-CuU1VIh1.js} +2 -2
- package/dist/useFieldAccessibility-eZIMECmG.js +19 -0
- package/dist/{useFilters-XNH27Md2.js → useFilters-HIngImwn.js} +1 -1
- package/dist/{form.binding-DVJ5F0JE.d.ts → useForm-I6z23FXf.d.ts} +15 -15
- package/dist/{form.binding-CG1RPv6o.js → useForm-eW4KpH1u.js} +79 -42
- package/dist/useFormAutosave-BBLm3Ujo.d.ts +34 -0
- package/dist/useFormAutosave-XEQqk1lK.js +216 -0
- package/dist/useStaticInputHandoff-DyYxfwv6.js +77 -0
- package/dist/useTableColumnConfig-CUINwVTR.js +1348 -0
- package/dist/{useTableNav-Ckj5PBRk.d.ts → useTableNav-rU9WmCj6.d.ts} +34 -96
- package/dist/{useToast-yreVCUer.d.ts → useToast-DfQif03I.d.ts} +1 -1
- package/dist/{utils-Czcqspm7.js → utils-BkLF-JA3.js} +1 -1
- package/package.json +69 -227
- package/.rulesync/rules/ui-buttons-and-content.md +0 -56
- package/.rulesync/rules/ui-inputs-and-forms.md +0 -62
- package/.rulesync/rules/ui-overlays-navigation-and-styling.md +0 -49
- package/.rulesync/rules/ui-overview.md +0 -33
- package/dist/Autocomplete-BwNHp8fy.d.ts +0 -15
- package/dist/Button-D-4qb0IR.d.ts +0 -42
- package/dist/CheckboxGroup-DGF12cmB.d.ts +0 -28
- package/dist/ComponentGallery-Da70Y4_Q.js +0 -3513
- package/dist/Dialog-CW93T9X1.d.ts +0 -56
- package/dist/DropdownMenu-JNpYT4-3.d.ts +0 -62
- package/dist/FileUpload-CR7bZxV1.d.ts +0 -7
- package/dist/Form-DbEWnCKc.d.ts +0 -49
- package/dist/FormFieldHeaderTooltip-BV2Ju4oB.js +0 -17
- package/dist/IconButton-D4thBurp.d.ts +0 -16
- package/dist/InlineIconButton-BeJCjl-q.d.ts +0 -15
- package/dist/InputItem-ZeN-aIz8.js +0 -63
- package/dist/Inputs-BC5q5Cvj.js +0 -17
- package/dist/Inputs-O84btFJL.d.ts +0 -13
- package/dist/QuerySelect-BGxb6Y0K.d.ts +0 -24
- package/dist/RadioGroup-CZg2kIMk.d.ts +0 -24
- package/dist/RichTextEditor-YxuRUlI7.d.ts +0 -26
- package/dist/Select-B2pAfwRk.js +0 -154
- package/dist/Select-pHbyJdZJ.d.ts +0 -15
- package/dist/Switch-s_EPn0Jz.d.ts +0 -22
- package/dist/Table-CqepqSfe.js +0 -637
- package/dist/TextButton-XUhV_1s0.d.ts +0 -15
- package/dist/TimePicker-B1POvGWs.d.ts +0 -33
- package/dist/Toast-DPbnLlBi.js +0 -53
- package/dist/ToggleButton-7aP8Jb11.d.ts +0 -11
- package/dist/ToggleGroup-CRFDIPGZ.d.ts +0 -7
- package/dist/Tooltip-DHv6vAqW.d.ts +0 -57
- package/dist/autocomplete-DeERHN8W.d.ts +0 -16
- package/dist/checkbox-DxIPDTK5.d.ts +0 -9
- package/dist/checkbox-group-B3BOVshI.d.ts +0 -9
- package/dist/chevron-left-Dgo_b9wJ.js +0 -20
- package/dist/chevron-up-D_Gqpb5M.js +0 -20
- package/dist/components/inline-icon-button.d.ts +0 -2
- package/dist/components/inline-icon-button.js +0 -40
- package/dist/components/query-autocomplete.d.ts +0 -8
- package/dist/components/query-autocomplete.js +0 -134
- package/dist/components/query-select.d.ts +0 -2
- package/dist/components/query-select.js +0 -147
- package/dist/components/text-button.d.ts +0 -2
- package/dist/components/text-button.js +0 -35
- package/dist/config/app-canvas.d.ts +0 -79
- package/dist/config/app-canvas.js +0 -2253
- package/dist/config/ui-configurator-theme.d.ts +0 -2
- package/dist/config/ui-configurator-theme.js +0 -2
- package/dist/config/ui-configurator-vite.d.ts +0 -10
- package/dist/config/ui-configurator-vite.js +0 -174
- package/dist/config/ui-configurator.d.ts +0 -15
- package/dist/config/ui-configurator.js +0 -5384
- package/dist/date-picker-DnxDmlOW.d.ts +0 -9
- package/dist/date-range-picker-DHDOSvHN.d.ts +0 -9
- package/dist/date-time-picker-UkTa0OJ8.d.ts +0 -9
- package/dist/date.transforms-DLg-eFcE.js +0 -15
- package/dist/dynamicInputs-ByVMnx4Z.d.ts +0 -772
- package/dist/dynamicInputs-CRMWIpHA.js +0 -194
- package/dist/dynamicInputs-m_DQu5q0.js +0 -214
- package/dist/fieldAdapter-C4sDFC8f.d.ts +0 -9
- package/dist/fieldAdapter-DjYls12j.js +0 -63
- package/dist/file-input-DkbkdI7l.d.ts +0 -9
- package/dist/file-upload-CTsPhxJk.d.ts +0 -10
- package/dist/form.types-CecYaerF.d.ts +0 -13
- package/dist/form.types-ZNGbcqJS.d.ts +0 -13
- package/dist/grip-vertical-BVxcjdfr.js +0 -54
- package/dist/info-iUmX3uDk.js +0 -32
- package/dist/input-CdQNCPgH.d.ts +0 -8
- package/dist/inspection-model-LuI36xTg.js +0 -1339
- package/dist/number-field-CUDbenNV.d.ts +0 -8
- package/dist/number-range-input-DZGrcvjL.d.ts +0 -8
- package/dist/password-input-fYN20cQO.d.ts +0 -8
- package/dist/query-autocomplete-CfuQeiYG.d.ts +0 -14
- package/dist/query-select-CuT_sE6a.d.ts +0 -15
- package/dist/queryAutocomplete.types-tl3r6iaY.d.ts +0 -27
- package/dist/radio-group-B3ccPf0p.d.ts +0 -9
- package/dist/rhf/autocomplete.d.ts +0 -3
- package/dist/rhf/autocomplete.js +0 -8
- package/dist/rhf/checkbox-group.d.ts +0 -3
- package/dist/rhf/checkbox-group.js +0 -8
- package/dist/rhf/checkbox.d.ts +0 -3
- package/dist/rhf/checkbox.js +0 -8
- package/dist/rhf/date-picker.d.ts +0 -3
- package/dist/rhf/date-picker.js +0 -9
- package/dist/rhf/date-range-picker.d.ts +0 -3
- package/dist/rhf/date-range-picker.js +0 -9
- package/dist/rhf/date-time-picker.d.ts +0 -3
- package/dist/rhf/date-time-picker.js +0 -9
- package/dist/rhf/file-input.d.ts +0 -3
- package/dist/rhf/file-input.js +0 -6
- package/dist/rhf/file-upload.d.ts +0 -3
- package/dist/rhf/file-upload.js +0 -6
- package/dist/rhf/input.d.ts +0 -3
- package/dist/rhf/input.js +0 -6
- package/dist/rhf/inputs.d.ts +0 -4
- package/dist/rhf/inputs.js +0 -2
- package/dist/rhf/number-field.d.ts +0 -3
- package/dist/rhf/number-field.js +0 -6
- package/dist/rhf/number-range-input.d.ts +0 -3
- package/dist/rhf/number-range-input.js +0 -6
- package/dist/rhf/password-input.d.ts +0 -3
- package/dist/rhf/password-input.js +0 -6
- package/dist/rhf/query-autocomplete.d.ts +0 -2
- package/dist/rhf/query-autocomplete.js +0 -8
- package/dist/rhf/query-select.d.ts +0 -2
- package/dist/rhf/query-select.js +0 -8
- package/dist/rhf/radio-group.d.ts +0 -3
- package/dist/rhf/radio-group.js +0 -8
- package/dist/rhf/rich-text-editor.d.ts +0 -3
- package/dist/rhf/rich-text-editor.js +0 -6
- package/dist/rhf/select.d.ts +0 -3
- package/dist/rhf/select.js +0 -8
- package/dist/rhf/slider.d.ts +0 -3
- package/dist/rhf/slider.js +0 -6
- package/dist/rhf/switch.d.ts +0 -3
- package/dist/rhf/switch.js +0 -8
- package/dist/rhf/text-area.d.ts +0 -3
- package/dist/rhf/text-area.js +0 -6
- package/dist/rhf/time-picker.d.ts +0 -3
- package/dist/rhf/time-picker.js +0 -9
- package/dist/rhf/toggle-group.d.ts +0 -3
- package/dist/rhf/toggle-group.js +0 -6
- package/dist/rhf-t348TCCL.js +0 -256
- package/dist/rhf.d.ts +0 -106
- package/dist/rhf.js +0 -117
- package/dist/rich-text-editor-B-Onl7T8.d.ts +0 -8
- package/dist/select-B4a52eWW.d.ts +0 -16
- package/dist/slider-dNj9jruO.d.ts +0 -8
- package/dist/style-merge.util-zLimKwt6.d.ts +0 -40
- package/dist/styles/app-canvas.css +0 -733
- package/dist/styles/configurator.css +0 -3280
- package/dist/switch-C--iWnY8.d.ts +0 -9
- package/dist/table.cva-DlMT-zLD.js +0 -48
- package/dist/tanstack/inputs.d.ts +0 -5
- package/dist/tanstack/inputs.js +0 -3
- package/dist/tanstack/query-autocomplete.d.ts +0 -2
- package/dist/tanstack/query-autocomplete.js +0 -2
- package/dist/tanstack/query-select.d.ts +0 -2
- package/dist/tanstack/query-select.js +0 -2
- package/dist/text-area-DQAtpOQp.d.ts +0 -8
- package/dist/theme-model-DtYPxNvH.js +0 -406
- package/dist/theme-model-T1zIdBg8.d.ts +0 -12
- package/dist/time-picker-DoGfbil6.d.ts +0 -9
- package/dist/toggle-group-C1nMDOwz.d.ts +0 -9
- package/dist/underline-66hmELxa.js +0 -81
- package/dist/upload-CXU83BJ4.js +0 -30
- package/dist/useFormAutosave-BD_TFqDF.js +0 -198
- package/dist/useQueryAutocomplete-CraXvRm_.js +0 -152
- package/dist/useTableColumnConfig-aVUWC2Mp.js +0 -892
- package/dist/zod.utils-DrrPDT9v.js +0 -24
- package/rulesync.jsonc +0 -11
- package/scripts/generate-rules.mjs +0 -34
- package/src/configurator/README.md +0 -77
- package/dist/{import-BE0r63d8.js → import-D_3dPATF.js} +2 -2
- /package/dist/{queries.utils-CmbhAoHU.js → tanstack-CmbhAoHU.js} +0 -0
|
@@ -1,1339 +0,0 @@
|
|
|
1
|
-
import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
|
|
2
|
-
import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
3
|
-
import { n as selectListBoxItemDefinition, r as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-CHAMxhfO.js";
|
|
4
|
-
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
5
|
-
import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
6
|
-
import { a as breadcrumbsDefinition, i as breadcrumbSegmentDefinition, n as breadcrumbIconDefinition, r as breadcrumbItemDefinition, t as breadcrumbChevronDefinition } from "./breadcrumbs.cva-7zzdDhVR.js";
|
|
7
|
-
import { i as menuPopoverWrapperDefinition, n as menuItemDefinition, r as menuPopoverDefinition, t as dropdownMenuDefinition } from "./dropdownMenu.cva-DvEmX0bs.js";
|
|
8
|
-
import { i as tooltipTextDefinition, n as tooltipPointerHorizontalDefinition, r as tooltipPointerVerticalDefinition, t as tooltipDefinition } from "./tooltip.cva-BIzlOXHH.js";
|
|
9
|
-
import { t as typographyDefinition } from "./typography.cva-iD15k56p.js";
|
|
10
|
-
import { i as buttonSizeDefinition, n as buttonDefinition, r as buttonIconSizeDefinition, t as buttonContentDefinition } from "./button.cva-rv5Uq4aW.js";
|
|
11
|
-
import { r as badgeButtonDefinition } from "./badgeButton.cva-CvN4CTx5.js";
|
|
12
|
-
import { t as formFieldErrorDefinition } from "./formFieldError.cva-CsXaQRHX.js";
|
|
13
|
-
import { i as formFieldHeaderDefinition, n as labelDefinition, t as formFieldHelperDefinition } from "./formFieldHelper.cva-B8F9LmsE.js";
|
|
14
|
-
import { t as tagDefinition } from "./tag.cva-B3MudLeC.js";
|
|
15
|
-
import { a as inputSizeDefinition, i as inputSideDefinition, n as inputClearClassDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
16
|
-
import { a as checkboxGroupLabelDefinition, i as checkboxDefinition, n as checkboxContentRowDefinition, o as checkboxIconDefinition, r as checkboxContentWrapperDefinition } from "./checkbox.cva-IfOByVLA.js";
|
|
17
|
-
import { t as popoverDefinition } from "./popover.cva-Bhud1wnp.js";
|
|
18
|
-
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-Cd7UUN61.js";
|
|
19
|
-
import { n as switchDefinition } from "./switch.cva-BX3HOxbL.js";
|
|
20
|
-
import { a as progressValueDefinition, i as progressTrackWrapperDefinition, n as progressFillDefinition, r as progressTrackDefinition, t as progressDefinition } from "./progress.cva-WQB8BGbk.js";
|
|
21
|
-
import { t as fileUploadDropZoneDefinition } from "./fileUpload.cva-ujmStxB1.js";
|
|
22
|
-
import { i as radioDefinition, n as radioContentRowDefinition, r as radioContentWrapperDefinition } from "./radio.cva-DGbvTymp.js";
|
|
23
|
-
import { n as toggleGroupItemDefinition, t as toggleGroupDefinition } from "./toggleGroup.cva-MbpaEBg1.js";
|
|
24
|
-
import { t as textAreaWrapperDefinition } from "./TextArea.cva-Bb73hriz.js";
|
|
25
|
-
import { a as accordionHeadingTitleDefinition, c as accordionPanelContentDefinition, i as accordionHeadingSubtitleDefinition, l as accordionPanelDefinition, n as accordionDefinition, o as accordionIconDefinition, r as accordionHeadingDefinition, s as accordionItemDefinition, t as accordionChevronDefinition, u as accordionTriggerDefinition } from "./accordion.cva-CL1bVscW.js";
|
|
26
|
-
import { a as stepperSeparatorDefinition, i as stepperNumberDefinition, n as stepperIconDefinition, o as stepperSubtextDefinition, r as stepperItemDefinition, s as stepperTitleDefinition, t as stepperDefinition } from "./stepper.cva-CZ0Kj-s7.js";
|
|
27
|
-
import { i as dialogOverlayDefinition, n as dialogMainDefinition, t as dialogContentDefinition } from "./dialog.cva-COhDZaVl.js";
|
|
28
|
-
import { n as statusSeparatorDefinition, r as alertDefinition, t as statusIconDefinition } from "./status.cva-6HxNR4EP.js";
|
|
29
|
-
import { a as toastDefinition, i as toastContainerDefinition } from "./toast.cva-C_L_RffH.js";
|
|
30
|
-
import { a as tableHeaderTextDefinition, i as tableHeadRowDefinition, n as tableDataDefinition, o as tableRowDefinition, r as tableHeadDataDefinition, s as theadDefinition, t as tableCellTextDefinition } from "./table.cva-DlMT-zLD.js";
|
|
31
|
-
import { t as linkDefinition } from "./link.cva-DMTHZiJG.js";
|
|
32
|
-
import { t as tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva-BBQ4ic3D.js";
|
|
33
|
-
import { r as emptyTheme, y as runtimeCss } from "./theme-model-DtYPxNvH.js";
|
|
34
|
-
import { createContext, use, useState } from "react";
|
|
35
|
-
import { c } from "react/compiler-runtime";
|
|
36
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/moon.mjs
|
|
38
|
-
/**
|
|
39
|
-
* @license lucide-react v1.43.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
const __iconData$2 = {
|
|
45
|
-
name: "moon",
|
|
46
|
-
size: 24,
|
|
47
|
-
node: [["path", {
|
|
48
|
-
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
49
|
-
key: "kfwtm"
|
|
50
|
-
}]]
|
|
51
|
-
};
|
|
52
|
-
__iconData$2.node;
|
|
53
|
-
const Moon = createLucideIcon(__iconData$2);
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/pin.mjs
|
|
56
|
-
/**
|
|
57
|
-
* @license lucide-react v1.43.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/
|
|
62
|
-
const __iconData$1 = {
|
|
63
|
-
name: "pin",
|
|
64
|
-
size: 24,
|
|
65
|
-
node: [["path", {
|
|
66
|
-
d: "M12 17v5",
|
|
67
|
-
key: "bb1du9"
|
|
68
|
-
}], ["path", {
|
|
69
|
-
d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",
|
|
70
|
-
key: "1nkz8b"
|
|
71
|
-
}]]
|
|
72
|
-
};
|
|
73
|
-
__iconData$1.node;
|
|
74
|
-
const Pin = createLucideIcon(__iconData$1);
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/sun.mjs
|
|
77
|
-
/**
|
|
78
|
-
* @license lucide-react v1.43.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/
|
|
83
|
-
const __iconData = {
|
|
84
|
-
name: "sun",
|
|
85
|
-
size: 24,
|
|
86
|
-
node: [
|
|
87
|
-
["circle", {
|
|
88
|
-
cx: "12",
|
|
89
|
-
cy: "12",
|
|
90
|
-
r: "4",
|
|
91
|
-
key: "4exip2"
|
|
92
|
-
}],
|
|
93
|
-
["path", {
|
|
94
|
-
d: "M12 2v2",
|
|
95
|
-
key: "tus03m"
|
|
96
|
-
}],
|
|
97
|
-
["path", {
|
|
98
|
-
d: "M12 20v2",
|
|
99
|
-
key: "1lh1kg"
|
|
100
|
-
}],
|
|
101
|
-
["path", {
|
|
102
|
-
d: "m4.93 4.93 1.41 1.41",
|
|
103
|
-
key: "149t6j"
|
|
104
|
-
}],
|
|
105
|
-
["path", {
|
|
106
|
-
d: "m17.66 17.66 1.41 1.41",
|
|
107
|
-
key: "ptbguv"
|
|
108
|
-
}],
|
|
109
|
-
["path", {
|
|
110
|
-
d: "M2 12h2",
|
|
111
|
-
key: "1t8f8n"
|
|
112
|
-
}],
|
|
113
|
-
["path", {
|
|
114
|
-
d: "M20 12h2",
|
|
115
|
-
key: "1q8mjw"
|
|
116
|
-
}],
|
|
117
|
-
["path", {
|
|
118
|
-
d: "m6.34 17.66-1.41 1.41",
|
|
119
|
-
key: "1m8zz5"
|
|
120
|
-
}],
|
|
121
|
-
["path", {
|
|
122
|
-
d: "m19.07 4.93-1.41 1.41",
|
|
123
|
-
key: "1shlcs"
|
|
124
|
-
}]
|
|
125
|
-
]
|
|
126
|
-
};
|
|
127
|
-
__iconData.node;
|
|
128
|
-
const Sun = createLucideIcon(__iconData);
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/configurator/cva-definitions.ts
|
|
131
|
-
const cvaDefinitions = {
|
|
132
|
-
"datePickerInput.contentRowCva": datePickerInputContentRowDefinition,
|
|
133
|
-
"select.tagsContentWrapperCva": selectInputTagsContentWrapperDefinition,
|
|
134
|
-
"tooltip.pointerHorizontalCva": tooltipPointerHorizontalDefinition,
|
|
135
|
-
"accordion.chevronCva": accordionChevronDefinition,
|
|
136
|
-
"accordion.cva": accordionDefinition,
|
|
137
|
-
"accordion.headingCva": accordionHeadingDefinition,
|
|
138
|
-
"accordion.headingSubtitleCva": accordionHeadingSubtitleDefinition,
|
|
139
|
-
"accordion.headingTitleCva": accordionHeadingTitleDefinition,
|
|
140
|
-
"accordion.iconCva": accordionIconDefinition,
|
|
141
|
-
"accordion.itemCva": accordionItemDefinition,
|
|
142
|
-
"accordion.panelContentCva": accordionPanelContentDefinition,
|
|
143
|
-
"accordion.panelCva": accordionPanelDefinition,
|
|
144
|
-
"accordion.triggerCva": accordionTriggerDefinition,
|
|
145
|
-
"alert.cva": alertDefinition,
|
|
146
|
-
"breadcrumbs.chevronCva": breadcrumbChevronDefinition,
|
|
147
|
-
"breadcrumbs.cva": breadcrumbsDefinition,
|
|
148
|
-
"breadcrumbs.iconCva": breadcrumbIconDefinition,
|
|
149
|
-
"breadcrumbs.itemCva": breadcrumbItemDefinition,
|
|
150
|
-
"breadcrumbs.segmentCva": breadcrumbSegmentDefinition,
|
|
151
|
-
"button.contentCva": buttonContentDefinition,
|
|
152
|
-
"button.cva": buttonDefinition,
|
|
153
|
-
"button.iconSize": buttonIconSizeDefinition,
|
|
154
|
-
"button.sizeCva": buttonSizeDefinition,
|
|
155
|
-
"checkbox.contentRowCva": checkboxContentRowDefinition,
|
|
156
|
-
"checkbox.contentWrapperCva": checkboxContentWrapperDefinition,
|
|
157
|
-
"checkbox.cva": checkboxDefinition,
|
|
158
|
-
"checkbox.groupLabelCva": checkboxGroupLabelDefinition,
|
|
159
|
-
"checkbox.iconCva": checkboxIconDefinition,
|
|
160
|
-
"dialog.contentCva": dialogContentDefinition,
|
|
161
|
-
"dialog.mainCva": dialogMainDefinition,
|
|
162
|
-
"dialog.overlayCva": dialogOverlayDefinition,
|
|
163
|
-
"dropdownMenu.cva": dropdownMenuDefinition,
|
|
164
|
-
"dropdownMenu.itemCva": menuItemDefinition,
|
|
165
|
-
"dropdownMenu.popoverCva": menuPopoverDefinition,
|
|
166
|
-
"dropdownMenu.popoverWrapperCva": menuPopoverWrapperDefinition,
|
|
167
|
-
"fileUpload.dropZoneCva": fileUploadDropZoneDefinition,
|
|
168
|
-
"formField.errorLabelCva": formFieldErrorDefinition,
|
|
169
|
-
"formField.headerCva": formFieldHeaderDefinition,
|
|
170
|
-
"formField.helperLabelCva": formFieldHelperDefinition,
|
|
171
|
-
"input.baseCva": inputBaseDefinition,
|
|
172
|
-
"input.clearClassCva": inputClearClassDefinition,
|
|
173
|
-
"input.contentWrapperCva": inputContentWrapperDefinition,
|
|
174
|
-
"input.sideCva": inputSideDefinition,
|
|
175
|
-
"input.sizeCva": inputSizeDefinition,
|
|
176
|
-
"label.cva": labelDefinition,
|
|
177
|
-
"link.cva": linkDefinition,
|
|
178
|
-
"badgeButton.cva": badgeButtonDefinition,
|
|
179
|
-
"popover.cva": popoverDefinition,
|
|
180
|
-
"progress.cva": progressDefinition,
|
|
181
|
-
"progress.fillCva": progressFillDefinition,
|
|
182
|
-
"progress.trackCva": progressTrackDefinition,
|
|
183
|
-
"progress.trackWrapperCva": progressTrackWrapperDefinition,
|
|
184
|
-
"progress.valueCva": progressValueDefinition,
|
|
185
|
-
"radio.contentRowCva": radioContentRowDefinition,
|
|
186
|
-
"radio.contentWrapperCva": radioContentWrapperDefinition,
|
|
187
|
-
"radio.cva": radioDefinition,
|
|
188
|
-
"select.listBoxItemCva": selectListBoxItemDefinition,
|
|
189
|
-
"select.popoverCva": selectPopoverDefinition,
|
|
190
|
-
"status.iconCva": statusIconDefinition,
|
|
191
|
-
"status.separatorCva": statusSeparatorDefinition,
|
|
192
|
-
"stepper.cva": stepperDefinition,
|
|
193
|
-
"stepper.iconCva": stepperIconDefinition,
|
|
194
|
-
"stepper.itemCva": stepperItemDefinition,
|
|
195
|
-
"stepper.numberCva": stepperNumberDefinition,
|
|
196
|
-
"stepper.separatorCva": stepperSeparatorDefinition,
|
|
197
|
-
"stepper.subtextCva": stepperSubtextDefinition,
|
|
198
|
-
"stepper.titleCva": stepperTitleDefinition,
|
|
199
|
-
"switch.cva": switchDefinition,
|
|
200
|
-
"table.cellTextCva": tableCellTextDefinition,
|
|
201
|
-
"table.dataCva": tableDataDefinition,
|
|
202
|
-
"table.headDataCva": tableHeadDataDefinition,
|
|
203
|
-
"table.headRowCva": tableHeadRowDefinition,
|
|
204
|
-
"table.headerTextCva": tableHeaderTextDefinition,
|
|
205
|
-
"table.rowCva": tableRowDefinition,
|
|
206
|
-
"table.theadCva": theadDefinition,
|
|
207
|
-
"tag.cva": tagDefinition,
|
|
208
|
-
"textArea.wrapperCva": textAreaWrapperDefinition,
|
|
209
|
-
"toast.containerCva": toastContainerDefinition,
|
|
210
|
-
"toast.cva": toastDefinition,
|
|
211
|
-
"toggleGroup.cva": toggleGroupDefinition,
|
|
212
|
-
"toggleGroup.itemCva": toggleGroupItemDefinition,
|
|
213
|
-
"tooltip.cva": tooltipDefinition,
|
|
214
|
-
"tooltip.pointerVerticalCva": tooltipPointerVerticalDefinition,
|
|
215
|
-
"tooltip.textCva": tooltipTextDefinition,
|
|
216
|
-
"tooltipWrapper.triggerCva": tooltipWrapperTriggerDefinition,
|
|
217
|
-
"typography.cva": typographyDefinition
|
|
218
|
-
};
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/configurator/cva-model.ts
|
|
221
|
-
function resolveCvaDefinition(slot, inherited) {
|
|
222
|
-
const [component, part] = slot.split(".");
|
|
223
|
-
const override = (inherited?.[component])?.[part];
|
|
224
|
-
if (typeof override === "function") return null;
|
|
225
|
-
const fallback = cvaDefinitions[slot];
|
|
226
|
-
const definition = override && typeof override === "object" && "mode" in override ? StyleMergeUtils.mergeCvaDefinition(fallback, override) : fallback;
|
|
227
|
-
const config = definition.config;
|
|
228
|
-
return {
|
|
229
|
-
base: [...definition.base],
|
|
230
|
-
config: {
|
|
231
|
-
variants: Object.fromEntries(Object.entries(config?.variants ?? {}).map(([name, options]) => [name, Object.fromEntries(Object.entries(options).map(([value, classes]) => [value, clsx(classes)]))])),
|
|
232
|
-
defaultVariants: config?.defaultVariants ?? {},
|
|
233
|
-
compoundVariants: (config?.compoundVariants ?? []).map(({ class: classes, className, ...selectors }) => Object.assign(selectors, { className: clsx(classes, className) }))
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function applyCvaEdits(inherited, edits = {}) {
|
|
238
|
-
const result = { ...inherited };
|
|
239
|
-
for (const [slot, definition] of Object.entries(edits)) {
|
|
240
|
-
const [component, part] = slot.split(".");
|
|
241
|
-
const key = component;
|
|
242
|
-
result[key] = {
|
|
243
|
-
...result[key],
|
|
244
|
-
[part]: {
|
|
245
|
-
mode: "overrideCva",
|
|
246
|
-
...definition
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
return result;
|
|
251
|
-
}
|
|
252
|
-
function exportCvaEdits(edits = {}) {
|
|
253
|
-
const overrides = applyCvaEdits(void 0, edits);
|
|
254
|
-
const components = Object.keys(overrides).map((name) => ` ${name}: { ...existing.${name}, ...edited.${name} },`).join("\n");
|
|
255
|
-
return `import { UIOverrides } from "@povio/ui/ui-overrides";\n\nconst edited = ${JSON.stringify(overrides, null, 2)} satisfies UIOverrides.Config;\n\nexport function withUIOverrides(existing: UIOverrides.Config = {}): UIOverrides.Config {\n return {\n ...existing,\n${components}\n };\n}\n\n// <UIOverrides.Provider config={withUIOverrides(appOverrides)}>{children}</UIOverrides.Provider>\n`;
|
|
256
|
-
}
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/configurator/configuration.context.tsx
|
|
259
|
-
const emptyConfiguration = () => ({
|
|
260
|
-
theme: emptyTheme(),
|
|
261
|
-
config: {}
|
|
262
|
-
});
|
|
263
|
-
const ConfigurationContext = createContext(null);
|
|
264
|
-
function UIConfigurationProvider(t0) {
|
|
265
|
-
const $ = c(40);
|
|
266
|
-
const { defaults, initialValue, onApply, children } = t0;
|
|
267
|
-
const inheritedOverrides = UIOverrides.useConfig();
|
|
268
|
-
const [applied, setApplied] = useState(initialValue ?? emptyConfiguration);
|
|
269
|
-
const [draft, setDraft] = useState(applied);
|
|
270
|
-
const [isOpen, setOpen] = useState(false);
|
|
271
|
-
const [floating, setFloating] = useState(false);
|
|
272
|
-
const [revision, setRevision] = useState(0);
|
|
273
|
-
const [previewConfiguration, setPreviewConfiguration] = useState(null);
|
|
274
|
-
const active = previewConfiguration ?? (isOpen ? draft : applied);
|
|
275
|
-
let t1;
|
|
276
|
-
if ($[0] !== applied) {
|
|
277
|
-
t1 = () => {
|
|
278
|
-
setFloating(false);
|
|
279
|
-
setDraft(structuredClone(applied));
|
|
280
|
-
setRevision(_temp$1);
|
|
281
|
-
setOpen(true);
|
|
282
|
-
};
|
|
283
|
-
$[0] = applied;
|
|
284
|
-
$[1] = t1;
|
|
285
|
-
} else t1 = $[1];
|
|
286
|
-
const open = t1;
|
|
287
|
-
let t2;
|
|
288
|
-
if ($[2] !== isOpen || $[3] !== open) {
|
|
289
|
-
t2 = () => {
|
|
290
|
-
if (isOpen) setRevision(_temp2$1);
|
|
291
|
-
else open();
|
|
292
|
-
setFloating(true);
|
|
293
|
-
};
|
|
294
|
-
$[2] = isOpen;
|
|
295
|
-
$[3] = open;
|
|
296
|
-
$[4] = t2;
|
|
297
|
-
} else t2 = $[4];
|
|
298
|
-
const openFloating = t2;
|
|
299
|
-
let t3;
|
|
300
|
-
if ($[5] !== applied) {
|
|
301
|
-
t3 = () => {
|
|
302
|
-
setDraft(structuredClone(applied));
|
|
303
|
-
setOpen(false);
|
|
304
|
-
};
|
|
305
|
-
$[5] = applied;
|
|
306
|
-
$[6] = t3;
|
|
307
|
-
} else t3 = $[6];
|
|
308
|
-
const cancel = t3;
|
|
309
|
-
let t4;
|
|
310
|
-
if ($[7] !== draft || $[8] !== onApply) {
|
|
311
|
-
t4 = () => {
|
|
312
|
-
onApply?.(structuredClone(draft));
|
|
313
|
-
setApplied(structuredClone(draft));
|
|
314
|
-
setOpen(false);
|
|
315
|
-
};
|
|
316
|
-
$[7] = draft;
|
|
317
|
-
$[8] = onApply;
|
|
318
|
-
$[9] = t4;
|
|
319
|
-
} else t4 = $[9];
|
|
320
|
-
const apply = t4;
|
|
321
|
-
let t5;
|
|
322
|
-
if ($[10] !== active.overrides || $[11] !== inheritedOverrides) {
|
|
323
|
-
t5 = applyCvaEdits(inheritedOverrides, active.overrides);
|
|
324
|
-
$[10] = active.overrides;
|
|
325
|
-
$[11] = inheritedOverrides;
|
|
326
|
-
$[12] = t5;
|
|
327
|
-
} else t5 = $[12];
|
|
328
|
-
const overrides = t5;
|
|
329
|
-
let t6;
|
|
330
|
-
if ($[13] !== active || $[14] !== apply || $[15] !== cancel || $[16] !== defaults || $[17] !== draft || $[18] !== floating || $[19] !== inheritedOverrides || $[20] !== isOpen || $[21] !== open || $[22] !== openFloating || $[23] !== revision) {
|
|
331
|
-
t6 = {
|
|
332
|
-
defaults,
|
|
333
|
-
inheritedOverrides,
|
|
334
|
-
draft,
|
|
335
|
-
active,
|
|
336
|
-
setPreviewConfiguration,
|
|
337
|
-
setDraft,
|
|
338
|
-
isOpen,
|
|
339
|
-
open,
|
|
340
|
-
openFloating,
|
|
341
|
-
floating,
|
|
342
|
-
cancel,
|
|
343
|
-
apply,
|
|
344
|
-
revision
|
|
345
|
-
};
|
|
346
|
-
$[13] = active;
|
|
347
|
-
$[14] = apply;
|
|
348
|
-
$[15] = cancel;
|
|
349
|
-
$[16] = defaults;
|
|
350
|
-
$[17] = draft;
|
|
351
|
-
$[18] = floating;
|
|
352
|
-
$[19] = inheritedOverrides;
|
|
353
|
-
$[20] = isOpen;
|
|
354
|
-
$[21] = open;
|
|
355
|
-
$[22] = openFloating;
|
|
356
|
-
$[23] = revision;
|
|
357
|
-
$[24] = t6;
|
|
358
|
-
} else t6 = $[24];
|
|
359
|
-
const contextValue = t6;
|
|
360
|
-
let t7;
|
|
361
|
-
if ($[25] !== active.theme || $[26] !== defaults) {
|
|
362
|
-
t7 = runtimeCss(defaults, active.theme);
|
|
363
|
-
$[25] = active.theme;
|
|
364
|
-
$[26] = defaults;
|
|
365
|
-
$[27] = t7;
|
|
366
|
-
} else t7 = $[27];
|
|
367
|
-
let t8;
|
|
368
|
-
if ($[28] !== t7) {
|
|
369
|
-
t8 = /* @__PURE__ */ jsx("style", {
|
|
370
|
-
"data-povio-ui-configuration": true,
|
|
371
|
-
children: t7
|
|
372
|
-
});
|
|
373
|
-
$[28] = t7;
|
|
374
|
-
$[29] = t8;
|
|
375
|
-
} else t8 = $[29];
|
|
376
|
-
let t9;
|
|
377
|
-
if ($[30] !== active.config || $[31] !== children) {
|
|
378
|
-
t9 = /* @__PURE__ */ jsx(UIConfig.Provider, {
|
|
379
|
-
config: active.config,
|
|
380
|
-
children
|
|
381
|
-
});
|
|
382
|
-
$[30] = active.config;
|
|
383
|
-
$[31] = children;
|
|
384
|
-
$[32] = t9;
|
|
385
|
-
} else t9 = $[32];
|
|
386
|
-
let t10;
|
|
387
|
-
if ($[33] !== overrides || $[34] !== t9) {
|
|
388
|
-
t10 = /* @__PURE__ */ jsx(UIOverrides.Provider, {
|
|
389
|
-
config: overrides,
|
|
390
|
-
children: t9
|
|
391
|
-
});
|
|
392
|
-
$[33] = overrides;
|
|
393
|
-
$[34] = t9;
|
|
394
|
-
$[35] = t10;
|
|
395
|
-
} else t10 = $[35];
|
|
396
|
-
let t11;
|
|
397
|
-
if ($[36] !== contextValue || $[37] !== t10 || $[38] !== t8) {
|
|
398
|
-
t11 = /* @__PURE__ */ jsxs(ConfigurationContext.Provider, {
|
|
399
|
-
value: contextValue,
|
|
400
|
-
children: [t8, t10]
|
|
401
|
-
});
|
|
402
|
-
$[36] = contextValue;
|
|
403
|
-
$[37] = t10;
|
|
404
|
-
$[38] = t8;
|
|
405
|
-
$[39] = t11;
|
|
406
|
-
} else t11 = $[39];
|
|
407
|
-
return t11;
|
|
408
|
-
}
|
|
409
|
-
function _temp2$1(value_0) {
|
|
410
|
-
return value_0 + 1;
|
|
411
|
-
}
|
|
412
|
-
function _temp$1(value) {
|
|
413
|
-
return value + 1;
|
|
414
|
-
}
|
|
415
|
-
function useUIConfiguration() {
|
|
416
|
-
const context = use(ConfigurationContext);
|
|
417
|
-
if (!context) throw new Error("useUIConfiguration requires UIConfigurationProvider");
|
|
418
|
-
return context;
|
|
419
|
-
}
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region src/configurator/inspector/InspectorDetails.tsx
|
|
422
|
-
/** Shared inspector measurements and property groups for preview and app canvas. */
|
|
423
|
-
function InspectorDetails(t0) {
|
|
424
|
-
const $ = c(18);
|
|
425
|
-
const { snapshot, onSelect, onHighlight } = t0;
|
|
426
|
-
let t1;
|
|
427
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
428
|
-
t1 = /* @__PURE__ */ jsx("h3", { children: "Layout" });
|
|
429
|
-
$[0] = t1;
|
|
430
|
-
} else t1 = $[0];
|
|
431
|
-
let t2;
|
|
432
|
-
if ($[1] !== snapshot.display) {
|
|
433
|
-
t2 = /* @__PURE__ */ jsxs("div", {
|
|
434
|
-
className: "studio-inspector-section-heading",
|
|
435
|
-
children: [t1, /* @__PURE__ */ jsx("span", {
|
|
436
|
-
title: "CSS display",
|
|
437
|
-
children: snapshot.display
|
|
438
|
-
})]
|
|
439
|
-
});
|
|
440
|
-
$[1] = snapshot.display;
|
|
441
|
-
$[2] = t2;
|
|
442
|
-
} else t2 = $[2];
|
|
443
|
-
let t3;
|
|
444
|
-
if ($[3] !== onHighlight || $[4] !== onSelect || $[5] !== snapshot) {
|
|
445
|
-
t3 = /* @__PURE__ */ jsx(BoxModel, {
|
|
446
|
-
snapshot,
|
|
447
|
-
onSelect,
|
|
448
|
-
onHighlight
|
|
449
|
-
});
|
|
450
|
-
$[3] = onHighlight;
|
|
451
|
-
$[4] = onSelect;
|
|
452
|
-
$[5] = snapshot;
|
|
453
|
-
$[6] = t3;
|
|
454
|
-
} else t3 = $[6];
|
|
455
|
-
let t4;
|
|
456
|
-
if ($[7] !== t2 || $[8] !== t3) {
|
|
457
|
-
t4 = /* @__PURE__ */ jsxs("section", {
|
|
458
|
-
className: "studio-inspector-layout",
|
|
459
|
-
children: [t2, t3]
|
|
460
|
-
});
|
|
461
|
-
$[7] = t2;
|
|
462
|
-
$[8] = t3;
|
|
463
|
-
$[9] = t4;
|
|
464
|
-
} else t4 = $[9];
|
|
465
|
-
let t5;
|
|
466
|
-
if ($[10] !== onSelect || $[11] !== snapshot.groups) {
|
|
467
|
-
let t6;
|
|
468
|
-
if ($[13] !== onSelect) {
|
|
469
|
-
t6 = (group_1) => /* @__PURE__ */ jsxs("section", { children: [group_1.name !== "Layout" && /* @__PURE__ */ jsx("h3", { children: group_1.name }), /* @__PURE__ */ jsx("dl", { children: group_1.properties.map((property_0) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: property_0.label }), /* @__PURE__ */ jsxs("dd", { children: [
|
|
470
|
-
property_0.color && /* @__PURE__ */ jsx("i", { style: { background: property_0.color } }),
|
|
471
|
-
/* @__PURE__ */ jsx("span", { children: property_0.value }),
|
|
472
|
-
property_0.token && /* @__PURE__ */ jsx("button", {
|
|
473
|
-
type: "button",
|
|
474
|
-
title: `Edit ${property_0.token}`,
|
|
475
|
-
onClick: () => onSelect(property_0.token),
|
|
476
|
-
children: property_0.token.replace(/^--/, "")
|
|
477
|
-
})
|
|
478
|
-
] })] }, property_0.label)) })] }, group_1.name);
|
|
479
|
-
$[13] = onSelect;
|
|
480
|
-
$[14] = t6;
|
|
481
|
-
} else t6 = $[14];
|
|
482
|
-
t5 = snapshot.groups.map(_temp).filter(_temp2).map(t6);
|
|
483
|
-
$[10] = onSelect;
|
|
484
|
-
$[11] = snapshot.groups;
|
|
485
|
-
$[12] = t5;
|
|
486
|
-
} else t5 = $[12];
|
|
487
|
-
let t6;
|
|
488
|
-
if ($[15] !== t4 || $[16] !== t5) {
|
|
489
|
-
t6 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t4, t5] });
|
|
490
|
-
$[15] = t4;
|
|
491
|
-
$[16] = t5;
|
|
492
|
-
$[17] = t6;
|
|
493
|
-
} else t6 = $[17];
|
|
494
|
-
return t6;
|
|
495
|
-
}
|
|
496
|
-
function _temp2(group_0) {
|
|
497
|
-
return group_0.properties.length;
|
|
498
|
-
}
|
|
499
|
-
function _temp(group) {
|
|
500
|
-
return {
|
|
501
|
-
name: group.name,
|
|
502
|
-
properties: group.properties.filter((property) => group.name !== "Layout" || ![
|
|
503
|
-
"Width",
|
|
504
|
-
"Height",
|
|
505
|
-
"Margin",
|
|
506
|
-
"Border width",
|
|
507
|
-
"Radius",
|
|
508
|
-
"Row gap",
|
|
509
|
-
"Column gap",
|
|
510
|
-
"Display"
|
|
511
|
-
].includes(property.label) && !/^(Padding |Margin |Border .* width$)/.test(property.label))
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
function BoxModel(t0) {
|
|
515
|
-
const $ = c(39);
|
|
516
|
-
const { snapshot, onSelect, onHighlight } = t0;
|
|
517
|
-
const box = snapshot.box;
|
|
518
|
-
const number = _temp4;
|
|
519
|
-
let t1;
|
|
520
|
-
let t2;
|
|
521
|
-
let t3;
|
|
522
|
-
let t4;
|
|
523
|
-
if ($[0] !== box.border || $[1] !== box.content.height || $[2] !== box.content.width || $[3] !== box.gap.column || $[4] !== box.gap.row || $[5] !== box.margin || $[6] !== box.padding || $[7] !== box.position || $[8] !== box.radius || $[9] !== onHighlight || $[10] !== onSelect || $[11] !== snapshot.groups) {
|
|
524
|
-
const properties = snapshot.groups.flatMap(_temp5);
|
|
525
|
-
const tokenFor = (label) => properties.find((property) => property.label === label)?.token;
|
|
526
|
-
const nonzero = _temp7;
|
|
527
|
-
let t5;
|
|
528
|
-
if ($[16] !== onHighlight || $[17] !== onSelect) {
|
|
529
|
-
t5 = (text, label_0, className, token, key) => /* @__PURE__ */ jsx("button", {
|
|
530
|
-
type: "button",
|
|
531
|
-
className,
|
|
532
|
-
title: token ? `Edit ${token}` : `${label_0}: ${text}`,
|
|
533
|
-
"aria-label": `${label_0}: ${text}`,
|
|
534
|
-
"data-token": token,
|
|
535
|
-
"data-box-highlight": key,
|
|
536
|
-
onPointerEnter: () => onHighlight(key ?? null),
|
|
537
|
-
onPointerLeave: () => onHighlight(null),
|
|
538
|
-
onFocus: () => onHighlight(key ?? null),
|
|
539
|
-
onBlur: () => onHighlight(null),
|
|
540
|
-
onClick: () => token ? onSelect(token) : onHighlight(key ?? null),
|
|
541
|
-
children: number(text)
|
|
542
|
-
});
|
|
543
|
-
$[16] = onHighlight;
|
|
544
|
-
$[17] = onSelect;
|
|
545
|
-
$[18] = t5;
|
|
546
|
-
} else t5 = $[18];
|
|
547
|
-
const value_1 = t5;
|
|
548
|
-
const layer = (name, values, children) => /* @__PURE__ */ jsxs("div", {
|
|
549
|
-
className: `studio-box-layer is-${name}`,
|
|
550
|
-
style: name === "border" ? { borderRadius: [
|
|
551
|
-
box.radius.topLeft,
|
|
552
|
-
box.radius.topRight,
|
|
553
|
-
box.radius.bottomRight,
|
|
554
|
-
box.radius.bottomLeft
|
|
555
|
-
].map((radius) => nonzero(radius) ? "12px" : "0px").join(" ") } : void 0,
|
|
556
|
-
children: [
|
|
557
|
-
/* @__PURE__ */ jsx("span", {
|
|
558
|
-
className: "studio-box-name",
|
|
559
|
-
children: name
|
|
560
|
-
}),
|
|
561
|
-
[
|
|
562
|
-
"top",
|
|
563
|
-
"right",
|
|
564
|
-
"bottom",
|
|
565
|
-
"left"
|
|
566
|
-
].map((side) => /* @__PURE__ */ jsx("span", { children: value_1(values[side], `${name} ${side}`, `studio-box-value is-${side}`, tokenFor(`${name[0].toUpperCase()}${name.slice(1)} ${side}`), `${name}.${side}`) }, side)),
|
|
567
|
-
name === "border" && Object.values(box.radius).some(nonzero) && Object.entries(box.radius).map((t6) => {
|
|
568
|
-
const [corner, radius_0] = t6;
|
|
569
|
-
return /* @__PURE__ */ jsx("span", { children: value_1(radius_0, `Radius ${corner}`, `studio-box-radius is-${corner}`, tokenFor("Radius"), `radius.${corner}`) }, corner);
|
|
570
|
-
}),
|
|
571
|
-
children
|
|
572
|
-
]
|
|
573
|
-
});
|
|
574
|
-
let t7;
|
|
575
|
-
if ($[19] !== box.gap.row) {
|
|
576
|
-
t7 = nonzero(box.gap.row);
|
|
577
|
-
$[19] = box.gap.row;
|
|
578
|
-
$[20] = t7;
|
|
579
|
-
} else t7 = $[20];
|
|
580
|
-
const hasRowGap = t7;
|
|
581
|
-
let t8;
|
|
582
|
-
if ($[21] !== box.gap.column) {
|
|
583
|
-
t8 = nonzero(box.gap.column);
|
|
584
|
-
$[21] = box.gap.column;
|
|
585
|
-
$[22] = t8;
|
|
586
|
-
} else t8 = $[22];
|
|
587
|
-
const hasColumnGap = t8;
|
|
588
|
-
const t9 = `${Math.round(box.content.width * 10) / 10}px`;
|
|
589
|
-
let t10;
|
|
590
|
-
if ($[23] !== t9 || $[24] !== value_1) {
|
|
591
|
-
t10 = value_1(t9, "Content width", "studio-box-dimension-value", void 0, "width");
|
|
592
|
-
$[23] = t9;
|
|
593
|
-
$[24] = value_1;
|
|
594
|
-
$[25] = t10;
|
|
595
|
-
} else t10 = $[25];
|
|
596
|
-
let t11;
|
|
597
|
-
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
598
|
-
t11 = /* @__PURE__ */ jsx("span", { children: "×" });
|
|
599
|
-
$[26] = t11;
|
|
600
|
-
} else t11 = $[26];
|
|
601
|
-
const t12 = `${Math.round(box.content.height * 10) / 10}px`;
|
|
602
|
-
let t13;
|
|
603
|
-
if ($[27] !== t12 || $[28] !== value_1) {
|
|
604
|
-
t13 = value_1(t12, "Content height", "studio-box-dimension-value", void 0, "height");
|
|
605
|
-
$[27] = t12;
|
|
606
|
-
$[28] = value_1;
|
|
607
|
-
$[29] = t13;
|
|
608
|
-
} else t13 = $[29];
|
|
609
|
-
let t14;
|
|
610
|
-
if ($[30] !== t10 || $[31] !== t13) {
|
|
611
|
-
t14 = /* @__PURE__ */ jsx("div", {
|
|
612
|
-
className: "studio-box-content",
|
|
613
|
-
title: "Content width × height",
|
|
614
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
615
|
-
className: "studio-box-dimensions",
|
|
616
|
-
children: [
|
|
617
|
-
t10,
|
|
618
|
-
t11,
|
|
619
|
-
t13
|
|
620
|
-
]
|
|
621
|
-
})
|
|
622
|
-
});
|
|
623
|
-
$[30] = t10;
|
|
624
|
-
$[31] = t13;
|
|
625
|
-
$[32] = t14;
|
|
626
|
-
} else t14 = $[32];
|
|
627
|
-
const content = t14;
|
|
628
|
-
const diagram = layer("margin", box.margin, layer("border", box.border, layer("padding", box.padding, content)));
|
|
629
|
-
t1 = "studio-box-model";
|
|
630
|
-
t2 = "Box model";
|
|
631
|
-
t3 = box.position ? layer("position", box.position, diagram) : diagram;
|
|
632
|
-
t4 = (hasRowGap || hasColumnGap) && /* @__PURE__ */ jsx("div", {
|
|
633
|
-
className: "studio-box-gaps",
|
|
634
|
-
"aria-label": "Layout gaps",
|
|
635
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
636
|
-
className: "studio-gap-grid",
|
|
637
|
-
style: {
|
|
638
|
-
gridTemplateColumns: `minmax(0,1fr) ${hasColumnGap ? 28 : 0}px minmax(0,1fr)`,
|
|
639
|
-
gridTemplateRows: `20px ${hasRowGap ? 22 : 0}px 20px`
|
|
640
|
-
},
|
|
641
|
-
children: [
|
|
642
|
-
/* @__PURE__ */ jsx("i", {}),
|
|
643
|
-
/* @__PURE__ */ jsx("i", {}),
|
|
644
|
-
/* @__PURE__ */ jsx("i", {}),
|
|
645
|
-
/* @__PURE__ */ jsx("i", {}),
|
|
646
|
-
hasColumnGap && value_1(box.gap.column, "Column gap", "studio-gap-number is-column", tokenFor("Column gap"), "gap.column"),
|
|
647
|
-
hasRowGap && value_1(box.gap.row, "Row gap", "studio-gap-number is-row", tokenFor("Row gap"), "gap.row")
|
|
648
|
-
]
|
|
649
|
-
})
|
|
650
|
-
});
|
|
651
|
-
$[0] = box.border;
|
|
652
|
-
$[1] = box.content.height;
|
|
653
|
-
$[2] = box.content.width;
|
|
654
|
-
$[3] = box.gap.column;
|
|
655
|
-
$[4] = box.gap.row;
|
|
656
|
-
$[5] = box.margin;
|
|
657
|
-
$[6] = box.padding;
|
|
658
|
-
$[7] = box.position;
|
|
659
|
-
$[8] = box.radius;
|
|
660
|
-
$[9] = onHighlight;
|
|
661
|
-
$[10] = onSelect;
|
|
662
|
-
$[11] = snapshot.groups;
|
|
663
|
-
$[12] = t1;
|
|
664
|
-
$[13] = t2;
|
|
665
|
-
$[14] = t3;
|
|
666
|
-
$[15] = t4;
|
|
667
|
-
} else {
|
|
668
|
-
t1 = $[12];
|
|
669
|
-
t2 = $[13];
|
|
670
|
-
t3 = $[14];
|
|
671
|
-
t4 = $[15];
|
|
672
|
-
}
|
|
673
|
-
let t5;
|
|
674
|
-
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
675
|
-
t5 = /* @__PURE__ */ jsx("figcaption", { children: "Box model · px" });
|
|
676
|
-
$[33] = t5;
|
|
677
|
-
} else t5 = $[33];
|
|
678
|
-
let t6;
|
|
679
|
-
if ($[34] !== t1 || $[35] !== t2 || $[36] !== t3 || $[37] !== t4) {
|
|
680
|
-
t6 = /* @__PURE__ */ jsxs("figure", {
|
|
681
|
-
className: t1,
|
|
682
|
-
"aria-label": t2,
|
|
683
|
-
children: [
|
|
684
|
-
t3,
|
|
685
|
-
t4,
|
|
686
|
-
t5
|
|
687
|
-
]
|
|
688
|
-
});
|
|
689
|
-
$[34] = t1;
|
|
690
|
-
$[35] = t2;
|
|
691
|
-
$[36] = t3;
|
|
692
|
-
$[37] = t4;
|
|
693
|
-
$[38] = t6;
|
|
694
|
-
} else t6 = $[38];
|
|
695
|
-
return t6;
|
|
696
|
-
}
|
|
697
|
-
function _temp7(value_0) {
|
|
698
|
-
return value_0 !== "normal" && value_0.split(/\s+/).some(_temp6);
|
|
699
|
-
}
|
|
700
|
-
function _temp6(part) {
|
|
701
|
-
return parseFloat(part) !== 0 && Number.isFinite(parseFloat(part));
|
|
702
|
-
}
|
|
703
|
-
function _temp5(group) {
|
|
704
|
-
return group.properties;
|
|
705
|
-
}
|
|
706
|
-
function _temp4(value) {
|
|
707
|
-
return value.replace(/(-?\d*\.?\d+)px/g, _temp3);
|
|
708
|
-
}
|
|
709
|
-
function _temp3(_, amount) {
|
|
710
|
-
return String(Math.round(Number(amount) * 10) / 10);
|
|
711
|
-
}
|
|
712
|
-
//#endregion
|
|
713
|
-
//#region src/configurator/inspector/HighlightOverlay.tsx
|
|
714
|
-
const arcs = {
|
|
715
|
-
topLeft: "M0 100 A100 100 0 0 1 100 0",
|
|
716
|
-
topRight: "M0 0 A100 100 0 0 1 100 100",
|
|
717
|
-
bottomRight: "M100 0 A100 100 0 0 1 0 100",
|
|
718
|
-
bottomLeft: "M100 100 A100 100 0 0 1 0 0"
|
|
719
|
-
};
|
|
720
|
-
function HighlightOverlay(t0) {
|
|
721
|
-
const $ = c(17);
|
|
722
|
-
const { highlight, width } = t0;
|
|
723
|
-
const first = highlight.regions[0];
|
|
724
|
-
let t1;
|
|
725
|
-
if ($[0] !== highlight.key) {
|
|
726
|
-
t1 = highlight.key.split(".");
|
|
727
|
-
$[0] = highlight.key;
|
|
728
|
-
$[1] = t1;
|
|
729
|
-
} else t1 = $[1];
|
|
730
|
-
const kind = t1[0];
|
|
731
|
-
const t2 = highlight.key;
|
|
732
|
-
let t3;
|
|
733
|
-
if ($[2] !== highlight.regions || $[3] !== kind) {
|
|
734
|
-
let t4;
|
|
735
|
-
if ($[5] !== kind) {
|
|
736
|
-
t4 = (region) => /* @__PURE__ */ jsx("div", {
|
|
737
|
-
className: `studio-measure-region is-${kind}${region.line ? ` is-${region.line}` : ""}${region.corner ? " is-corner" : ""}`,
|
|
738
|
-
style: {
|
|
739
|
-
left: region.left,
|
|
740
|
-
top: region.top,
|
|
741
|
-
width: region.width,
|
|
742
|
-
height: region.height
|
|
743
|
-
},
|
|
744
|
-
children: region.corner && /* @__PURE__ */ jsx("svg", {
|
|
745
|
-
viewBox: "0 0 100 100",
|
|
746
|
-
preserveAspectRatio: "none",
|
|
747
|
-
"aria-hidden": "true",
|
|
748
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
749
|
-
d: arcs[region.corner],
|
|
750
|
-
fill: "none",
|
|
751
|
-
stroke: "currentColor",
|
|
752
|
-
strokeWidth: "2",
|
|
753
|
-
vectorEffect: "non-scaling-stroke"
|
|
754
|
-
})
|
|
755
|
-
})
|
|
756
|
-
}, `${region.left}:${region.top}:${region.width}:${region.height}`);
|
|
757
|
-
$[5] = kind;
|
|
758
|
-
$[6] = t4;
|
|
759
|
-
} else t4 = $[6];
|
|
760
|
-
t3 = highlight.regions.map(t4);
|
|
761
|
-
$[2] = highlight.regions;
|
|
762
|
-
$[3] = kind;
|
|
763
|
-
$[4] = t3;
|
|
764
|
-
} else t3 = $[4];
|
|
765
|
-
const t4 = Math.max(4, Math.min(first?.left ?? 4, width - 220));
|
|
766
|
-
const t5 = Math.max(4, (first?.top ?? 26) - 22);
|
|
767
|
-
let t6;
|
|
768
|
-
if ($[7] !== t4 || $[8] !== t5) {
|
|
769
|
-
t6 = {
|
|
770
|
-
left: t4,
|
|
771
|
-
top: t5
|
|
772
|
-
};
|
|
773
|
-
$[7] = t4;
|
|
774
|
-
$[8] = t5;
|
|
775
|
-
$[9] = t6;
|
|
776
|
-
} else t6 = $[9];
|
|
777
|
-
let t7;
|
|
778
|
-
if ($[10] !== highlight.label || $[11] !== t6) {
|
|
779
|
-
t7 = /* @__PURE__ */ jsx("span", {
|
|
780
|
-
className: "studio-measure-label",
|
|
781
|
-
style: t6,
|
|
782
|
-
children: highlight.label
|
|
783
|
-
});
|
|
784
|
-
$[10] = highlight.label;
|
|
785
|
-
$[11] = t6;
|
|
786
|
-
$[12] = t7;
|
|
787
|
-
} else t7 = $[12];
|
|
788
|
-
let t8;
|
|
789
|
-
if ($[13] !== highlight.key || $[14] !== t3 || $[15] !== t7) {
|
|
790
|
-
t8 = /* @__PURE__ */ jsxs("div", {
|
|
791
|
-
className: "studio-measure-regions",
|
|
792
|
-
"data-property": t2,
|
|
793
|
-
children: [t3, t7]
|
|
794
|
-
});
|
|
795
|
-
$[13] = highlight.key;
|
|
796
|
-
$[14] = t3;
|
|
797
|
-
$[15] = t7;
|
|
798
|
-
$[16] = t8;
|
|
799
|
-
} else t8 = $[16];
|
|
800
|
-
return t8;
|
|
801
|
-
}
|
|
802
|
-
//#endregion
|
|
803
|
-
//#region src/configurator/inspector/box-highlights.ts
|
|
804
|
-
const sides = [
|
|
805
|
-
"top",
|
|
806
|
-
"right",
|
|
807
|
-
"bottom",
|
|
808
|
-
"left"
|
|
809
|
-
];
|
|
810
|
-
const corners = [
|
|
811
|
-
"topLeft",
|
|
812
|
-
"topRight",
|
|
813
|
-
"bottomRight",
|
|
814
|
-
"bottomLeft"
|
|
815
|
-
];
|
|
816
|
-
const numeric = (value) => Number.parseFloat(value) || 0;
|
|
817
|
-
const formatted = (value) => String(Math.round(value * 100) / 100);
|
|
818
|
-
/** Read-only geometry in the inspected element's viewport (including pop-out documents). */
|
|
819
|
-
function getBoxHighlights(element, key) {
|
|
820
|
-
const view = element.ownerDocument.defaultView;
|
|
821
|
-
if (!view) return {
|
|
822
|
-
regions: [],
|
|
823
|
-
label: ""
|
|
824
|
-
};
|
|
825
|
-
const style = view.getComputedStyle(element);
|
|
826
|
-
const rect = element.getBoundingClientRect();
|
|
827
|
-
const sx = element.offsetWidth ? rect.width / element.offsetWidth : 1;
|
|
828
|
-
const sy = element.offsetHeight ? rect.height / element.offsetHeight : 1;
|
|
829
|
-
const read = (name) => style.getPropertyValue(name);
|
|
830
|
-
const scale = (side) => side === "left" || side === "right" ? sx : sy;
|
|
831
|
-
const values = (prefix, suffix = "") => Object.fromEntries(sides.map((side) => [side, numeric(read(`${prefix}-${side}${suffix}`)) * scale(side)]));
|
|
832
|
-
const border = values("border", "-width");
|
|
833
|
-
const padding = values("padding");
|
|
834
|
-
const inner = {
|
|
835
|
-
left: rect.left + border.left,
|
|
836
|
-
top: rect.top + border.top,
|
|
837
|
-
width: Math.max(0, rect.width - border.left - border.right),
|
|
838
|
-
height: Math.max(0, rect.height - border.top - border.bottom)
|
|
839
|
-
};
|
|
840
|
-
const content = {
|
|
841
|
-
left: inner.left + padding.left,
|
|
842
|
-
top: inner.top + padding.top,
|
|
843
|
-
width: Math.max(0, inner.width - padding.left - padding.right),
|
|
844
|
-
height: Math.max(0, inner.height - padding.top - padding.bottom)
|
|
845
|
-
};
|
|
846
|
-
const [kind, part] = key.split(".");
|
|
847
|
-
let regions = [];
|
|
848
|
-
let value = "";
|
|
849
|
-
if (kind === "width" || kind === "height") {
|
|
850
|
-
value = formatted(content[kind] / (kind === "width" ? sx : sy));
|
|
851
|
-
regions = [{
|
|
852
|
-
left: content.left,
|
|
853
|
-
top: content.top,
|
|
854
|
-
width: kind === "width" ? content.width : 1,
|
|
855
|
-
height: kind === "height" ? content.height : 1,
|
|
856
|
-
line: kind === "width" ? "horizontal" : "vertical"
|
|
857
|
-
}];
|
|
858
|
-
} else if (kind === "radius") {
|
|
859
|
-
const radii = corners.map((corner) => {
|
|
860
|
-
const cssCorner = corner.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
861
|
-
const components = read(`border-${cssCorner}-radius`).trim().split(/\s+/);
|
|
862
|
-
const resolve = (raw, dimension, factor) => raw.endsWith("%") ? numeric(raw) / 100 * dimension : numeric(raw) * factor;
|
|
863
|
-
return [resolve(components[0] || "0", rect.width, sx), resolve(components[1] || components[0] || "0", rect.height, sy)];
|
|
864
|
-
});
|
|
865
|
-
const factor = Math.min(1, rect.width / (radii[0][0] + radii[1][0] || 1), rect.width / (radii[3][0] + radii[2][0] || 1), rect.height / (radii[0][1] + radii[3][1] || 1), rect.height / (radii[1][1] + radii[2][1] || 1));
|
|
866
|
-
const corner = part;
|
|
867
|
-
const radius = radii[corners.indexOf(corner)];
|
|
868
|
-
const width = Math.max(1, radius[0] * factor);
|
|
869
|
-
const height = Math.max(1, radius[1] * factor);
|
|
870
|
-
value = `${formatted(radius[0] * factor / sx)} × ${formatted(radius[1] * factor / sy)}`;
|
|
871
|
-
regions = [{
|
|
872
|
-
left: rect.left + (corner.endsWith("Right") ? rect.width - width : 0),
|
|
873
|
-
top: rect.top + (corner.startsWith("bottom") ? rect.height - height : 0),
|
|
874
|
-
width,
|
|
875
|
-
height,
|
|
876
|
-
corner
|
|
877
|
-
}];
|
|
878
|
-
} else if (kind === "gap") {
|
|
879
|
-
const row = part === "row";
|
|
880
|
-
const rawGap = read(`${part}-gap`);
|
|
881
|
-
const gap = rawGap.endsWith("%") ? numeric(rawGap) / 100 * (row ? content.height / sy : content.width / sx) : numeric(rawGap);
|
|
882
|
-
const size = gap * (row ? sy : sx);
|
|
883
|
-
value = formatted(gap);
|
|
884
|
-
if (size > 0 && /^(inline-)?(flex|grid)$/.test(read("display"))) {
|
|
885
|
-
const children = Array.from(element.children).slice(0, 80).flatMap((child) => {
|
|
886
|
-
const childStyle = view.getComputedStyle(child);
|
|
887
|
-
const box = child.getBoundingClientRect();
|
|
888
|
-
return childStyle.display === "none" || childStyle.visibility === "hidden" || /^(absolute|fixed)$/.test(childStyle.position) || !box.width || !box.height ? [] : [box];
|
|
889
|
-
}).sort((a, b) => row ? a.top - b.top : a.left - b.left);
|
|
890
|
-
const seen = /* @__PURE__ */ new Set();
|
|
891
|
-
for (let i = 0; i < children.length; i++) {
|
|
892
|
-
const a = children[i];
|
|
893
|
-
for (let j = i + 1; j < children.length; j++) {
|
|
894
|
-
const b = children[j];
|
|
895
|
-
const start = row ? a.bottom : a.right;
|
|
896
|
-
const end = row ? b.top : b.left;
|
|
897
|
-
const crossStart = Math.max(row ? a.left : a.top, row ? b.left : b.top, row ? content.left : content.top);
|
|
898
|
-
const crossEnd = Math.min(row ? a.right : a.bottom, row ? b.right : b.bottom, row ? content.left + content.width : content.top + content.height);
|
|
899
|
-
if (end - start < size - .5 || crossEnd <= crossStart) continue;
|
|
900
|
-
if (children.some((c, index) => index !== i && index !== j && (row ? c.top >= start && c.bottom <= end && c.right > crossStart && c.left < crossEnd : c.left >= start && c.right <= end && c.bottom > crossStart && c.top < crossEnd))) continue;
|
|
901
|
-
const axisStart = Math.max((start + end - size) / 2, row ? content.top : content.left);
|
|
902
|
-
const axisEnd = Math.min((start + end + size) / 2, row ? content.top + content.height : content.left + content.width);
|
|
903
|
-
if (axisEnd <= axisStart) continue;
|
|
904
|
-
const region = row ? {
|
|
905
|
-
left: crossStart,
|
|
906
|
-
top: axisStart,
|
|
907
|
-
width: crossEnd - crossStart,
|
|
908
|
-
height: axisEnd - axisStart
|
|
909
|
-
} : {
|
|
910
|
-
left: axisStart,
|
|
911
|
-
top: crossStart,
|
|
912
|
-
width: axisEnd - axisStart,
|
|
913
|
-
height: crossEnd - crossStart
|
|
914
|
-
};
|
|
915
|
-
const id = Object.values(region).map(formatted).join(",");
|
|
916
|
-
if (!seen.has(id)) {
|
|
917
|
-
seen.add(id);
|
|
918
|
-
regions.push(region);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
} else {
|
|
924
|
-
const side = part;
|
|
925
|
-
const horizontal = side === "top" || side === "bottom";
|
|
926
|
-
const raw = read(kind === "position" ? side : `${kind}-${side}${kind === "border" ? "-width" : ""}`);
|
|
927
|
-
const amount = numeric(raw) * scale(side);
|
|
928
|
-
value = formatted(numeric(raw));
|
|
929
|
-
const base = kind === "padding" ? inner : rect;
|
|
930
|
-
const outward = kind === "margin" || kind === "position";
|
|
931
|
-
const thickness = Math.max(1, Math.abs(amount));
|
|
932
|
-
const positiveEdge = side === "bottom" || side === "right";
|
|
933
|
-
const edge = horizontal ? base.top + (positiveEdge ? base.height : 0) : base.left + (positiveEdge ? base.width : 0);
|
|
934
|
-
const offset = outward ? positiveEdge ? amount < 0 ? -thickness : 0 : amount < 0 ? 0 : -thickness : positiveEdge ? -thickness : 0;
|
|
935
|
-
regions = [{
|
|
936
|
-
left: horizontal ? base.left : edge + offset,
|
|
937
|
-
top: horizontal ? edge + offset : base.top,
|
|
938
|
-
width: horizontal ? base.width : thickness,
|
|
939
|
-
height: horizontal ? thickness : base.height
|
|
940
|
-
}];
|
|
941
|
-
if (kind === "position") {
|
|
942
|
-
if (raw === "auto" || read("position") === "static") regions = [];
|
|
943
|
-
else if (read("position") === "absolute" || read("position") === "fixed") {
|
|
944
|
-
const parent = element.offsetParent;
|
|
945
|
-
const parentRect = parent?.getBoundingClientRect();
|
|
946
|
-
const parentStyle = parent ? view.getComputedStyle(parent) : null;
|
|
947
|
-
const parentScale = parent && "offsetWidth" in parent && parent.offsetWidth ? parentRect.width / Number(parent.offsetWidth) : 1;
|
|
948
|
-
const parentScaleY = parent && "offsetHeight" in parent && parent.offsetHeight ? parentRect.height / Number(parent.offsetHeight) : 1;
|
|
949
|
-
const referenceEdge = (parentRect ? {
|
|
950
|
-
left: parentRect.left + numeric(parentStyle.getPropertyValue("border-left-width")) * parentScale,
|
|
951
|
-
right: parentRect.right - numeric(parentStyle.getPropertyValue("border-right-width")) * parentScale,
|
|
952
|
-
top: parentRect.top + numeric(parentStyle.getPropertyValue("border-top-width")) * parentScaleY,
|
|
953
|
-
bottom: parentRect.bottom - numeric(parentStyle.getPropertyValue("border-bottom-width")) * parentScaleY
|
|
954
|
-
} : {
|
|
955
|
-
left: 0,
|
|
956
|
-
top: 0,
|
|
957
|
-
right: view.innerWidth,
|
|
958
|
-
bottom: view.innerHeight
|
|
959
|
-
})[side];
|
|
960
|
-
const targetEdge = edge + (positiveEdge ? 1 : -1) * numeric(read(`margin-${side}`)) * scale(side);
|
|
961
|
-
const start = Math.min(referenceEdge, targetEdge);
|
|
962
|
-
const length = Math.max(1, Math.abs(referenceEdge - targetEdge));
|
|
963
|
-
regions = [{
|
|
964
|
-
left: horizontal ? rect.left : start,
|
|
965
|
-
top: horizontal ? start : rect.top,
|
|
966
|
-
width: horizontal ? rect.width : length,
|
|
967
|
-
height: horizontal ? length : rect.height
|
|
968
|
-
}];
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
const name = key.replace(".", " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase();
|
|
973
|
-
return {
|
|
974
|
-
regions,
|
|
975
|
-
label: `${name}: ${value} px`
|
|
976
|
-
};
|
|
977
|
-
}
|
|
978
|
-
//#endregion
|
|
979
|
-
//#region src/configurator/inspector/token-classes.ts
|
|
980
|
-
/** Tailwind breakpoints from the Atlas base theme, in rem. */
|
|
981
|
-
const breakpoints = {
|
|
982
|
-
sm: 23.75,
|
|
983
|
-
md: 37.5,
|
|
984
|
-
lg: 80,
|
|
985
|
-
xl: 105
|
|
986
|
-
};
|
|
987
|
-
/** Utility prefix → the slots it sets, its specificity, and the theme namespace its value lives in. */
|
|
988
|
-
const utilities = [
|
|
989
|
-
[
|
|
990
|
-
"p",
|
|
991
|
-
[
|
|
992
|
-
"padding.top",
|
|
993
|
-
"padding.right",
|
|
994
|
-
"padding.bottom",
|
|
995
|
-
"padding.left"
|
|
996
|
-
],
|
|
997
|
-
0,
|
|
998
|
-
"spacing"
|
|
999
|
-
],
|
|
1000
|
-
[
|
|
1001
|
-
"px",
|
|
1002
|
-
["padding.left", "padding.right"],
|
|
1003
|
-
1,
|
|
1004
|
-
"spacing"
|
|
1005
|
-
],
|
|
1006
|
-
[
|
|
1007
|
-
"py",
|
|
1008
|
-
["padding.top", "padding.bottom"],
|
|
1009
|
-
1,
|
|
1010
|
-
"spacing"
|
|
1011
|
-
],
|
|
1012
|
-
[
|
|
1013
|
-
"pt",
|
|
1014
|
-
["padding.top"],
|
|
1015
|
-
2,
|
|
1016
|
-
"spacing"
|
|
1017
|
-
],
|
|
1018
|
-
[
|
|
1019
|
-
"pr",
|
|
1020
|
-
["padding.right"],
|
|
1021
|
-
2,
|
|
1022
|
-
"spacing"
|
|
1023
|
-
],
|
|
1024
|
-
[
|
|
1025
|
-
"pe",
|
|
1026
|
-
["padding.right"],
|
|
1027
|
-
2,
|
|
1028
|
-
"spacing"
|
|
1029
|
-
],
|
|
1030
|
-
[
|
|
1031
|
-
"pb",
|
|
1032
|
-
["padding.bottom"],
|
|
1033
|
-
2,
|
|
1034
|
-
"spacing"
|
|
1035
|
-
],
|
|
1036
|
-
[
|
|
1037
|
-
"pl",
|
|
1038
|
-
["padding.left"],
|
|
1039
|
-
2,
|
|
1040
|
-
"spacing"
|
|
1041
|
-
],
|
|
1042
|
-
[
|
|
1043
|
-
"ps",
|
|
1044
|
-
["padding.left"],
|
|
1045
|
-
2,
|
|
1046
|
-
"spacing"
|
|
1047
|
-
],
|
|
1048
|
-
[
|
|
1049
|
-
"gap",
|
|
1050
|
-
["gap.row", "gap.column"],
|
|
1051
|
-
0,
|
|
1052
|
-
"spacing"
|
|
1053
|
-
],
|
|
1054
|
-
[
|
|
1055
|
-
"gap-x",
|
|
1056
|
-
["gap.column"],
|
|
1057
|
-
1,
|
|
1058
|
-
"spacing"
|
|
1059
|
-
],
|
|
1060
|
-
[
|
|
1061
|
-
"gap-y",
|
|
1062
|
-
["gap.row"],
|
|
1063
|
-
1,
|
|
1064
|
-
"spacing"
|
|
1065
|
-
],
|
|
1066
|
-
[
|
|
1067
|
-
"rounded",
|
|
1068
|
-
["radius"],
|
|
1069
|
-
0,
|
|
1070
|
-
"radius"
|
|
1071
|
-
]
|
|
1072
|
-
];
|
|
1073
|
-
/** Splits `md:hover:px-4` into its variants and utility, ignoring colons inside `[...]` / `(...)`. */
|
|
1074
|
-
function splitVariants(className) {
|
|
1075
|
-
const parts = [];
|
|
1076
|
-
let depth = 0;
|
|
1077
|
-
let current = "";
|
|
1078
|
-
for (const char of className) {
|
|
1079
|
-
if (char === "[" || char === "(") depth++;
|
|
1080
|
-
if (char === "]" || char === ")") depth--;
|
|
1081
|
-
if (char === ":" && depth === 0) {
|
|
1082
|
-
parts.push(current);
|
|
1083
|
-
current = "";
|
|
1084
|
-
} else current += char;
|
|
1085
|
-
}
|
|
1086
|
-
return {
|
|
1087
|
-
variants: parts,
|
|
1088
|
-
utility: current
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
|
-
/** Breakpoint weight when every variant is an active breakpoint; `undefined` for state variants or inactive breakpoints. */
|
|
1092
|
-
function variantWeight(variants, viewportWidth, rootFontSize) {
|
|
1093
|
-
let weight = 0;
|
|
1094
|
-
for (const variant of variants) {
|
|
1095
|
-
const max = variant.startsWith("max-");
|
|
1096
|
-
const size = breakpoints[max ? variant.slice(4) : variant];
|
|
1097
|
-
if (size === void 0) return void 0;
|
|
1098
|
-
if (!(max ? viewportWidth < size * rootFontSize : viewportWidth >= size * rootFontSize)) return void 0;
|
|
1099
|
-
weight = Math.max(weight, size);
|
|
1100
|
-
}
|
|
1101
|
-
return weight;
|
|
1102
|
-
}
|
|
1103
|
-
function tokenFor(value, namespace, isKnown) {
|
|
1104
|
-
const referenced = value.match(/^\[.*?var\((--[\w-]+)/)?.[1] ?? value.match(/^\((--[\w-]+)\)$/)?.[1];
|
|
1105
|
-
if (referenced) return isKnown(referenced) ? referenced : void 0;
|
|
1106
|
-
const name = `--${namespace}-${value}`;
|
|
1107
|
-
return isKnown(name) ? name : void 0;
|
|
1108
|
-
}
|
|
1109
|
-
/**
|
|
1110
|
-
* Resolves which theme tokens drive an element's padding, gap and radius from its rendered Tailwind classes.
|
|
1111
|
-
* Only tokens accepted by `isKnown` are returned, so every result can be opened in the editor.
|
|
1112
|
-
*/
|
|
1113
|
-
function inspectTokens(className, isKnown, viewportWidth = Infinity, rootFontSize = 16) {
|
|
1114
|
-
const winners = /* @__PURE__ */ new Map();
|
|
1115
|
-
for (const raw of className.split(/\s+/).filter(Boolean)) {
|
|
1116
|
-
const { variants, utility } = splitVariants(raw);
|
|
1117
|
-
const weight = variantWeight(variants, viewportWidth, rootFontSize);
|
|
1118
|
-
if (weight === void 0) continue;
|
|
1119
|
-
const clean = utility.replace(/^!|!$/g, "");
|
|
1120
|
-
for (const [prefix, slots, specificity, namespace] of utilities) {
|
|
1121
|
-
if (!clean.startsWith(`${prefix}-`)) continue;
|
|
1122
|
-
const token = tokenFor(clean.slice(prefix.length + 1), namespace, isKnown);
|
|
1123
|
-
if (!token) continue;
|
|
1124
|
-
const rank = weight * 10 + specificity;
|
|
1125
|
-
for (const slot of slots) if ((winners.get(slot)?.rank ?? -1) <= rank) winners.set(slot, {
|
|
1126
|
-
token,
|
|
1127
|
-
rank
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
const result = {
|
|
1132
|
-
padding: {},
|
|
1133
|
-
gap: {}
|
|
1134
|
-
};
|
|
1135
|
-
for (const [slot, { token }] of winners) if (slot === "radius") result.radius = token;
|
|
1136
|
-
else if (slot.startsWith("gap.")) result.gap[slot.slice(4)] = token;
|
|
1137
|
-
else result.padding[slot.slice(8)] = token;
|
|
1138
|
-
return result;
|
|
1139
|
-
}
|
|
1140
|
-
//#endregion
|
|
1141
|
-
//#region src/configurator/inspector/inspection-model.ts
|
|
1142
|
-
function readableColor(value) {
|
|
1143
|
-
const rgb = value.trim().match(/^rgb\(\s*(\d+)\s*[, ]\s*(\d+)\s*[, ]\s*(\d+)\s*\)$/);
|
|
1144
|
-
if (!rgb) return value;
|
|
1145
|
-
return `#${rgb.slice(1).map((channel) => Number(channel).toString(16).padStart(2, "0")).join("")}`;
|
|
1146
|
-
}
|
|
1147
|
-
function resolveToken(style, name, seen = /* @__PURE__ */ new Set()) {
|
|
1148
|
-
if (seen.has(name)) return "";
|
|
1149
|
-
seen.add(name);
|
|
1150
|
-
const value = style.getPropertyValue(name).trim();
|
|
1151
|
-
const reference = value.match(/^var\((--[\w-]+)\)$/);
|
|
1152
|
-
return reference ? resolveToken(style, reference[1], seen) : value;
|
|
1153
|
-
}
|
|
1154
|
-
/** Read-only inspection; always use the element's window, including detached previews. */
|
|
1155
|
-
function inspectElement(element, isKnown) {
|
|
1156
|
-
const view = element.ownerDocument.defaultView;
|
|
1157
|
-
if (!view) throw new Error("The inspected element has no document window.");
|
|
1158
|
-
const style = view.getComputedStyle(element);
|
|
1159
|
-
const rootFontSize = Number.parseFloat(view.getComputedStyle(element.ownerDocument.documentElement).fontSize) || 16;
|
|
1160
|
-
const bounds = element.getBoundingClientRect();
|
|
1161
|
-
const sides = [
|
|
1162
|
-
"top",
|
|
1163
|
-
"right",
|
|
1164
|
-
"bottom",
|
|
1165
|
-
"left"
|
|
1166
|
-
];
|
|
1167
|
-
const readSides = (prefix, suffix = "") => Object.fromEntries(sides.map((side) => [side, style.getPropertyValue(`${prefix}${side}${suffix}`) || "0px"]));
|
|
1168
|
-
const padding = readSides("padding-");
|
|
1169
|
-
const border = readSides("border-", "-width");
|
|
1170
|
-
const margin = readSides("margin-");
|
|
1171
|
-
const contentDimension = (axis) => {
|
|
1172
|
-
const value = style.getPropertyValue(axis);
|
|
1173
|
-
const dimension = Number.parseFloat(value);
|
|
1174
|
-
const hasPixelDimension = /^\d+(?:\.\d+)?px$/.test(value);
|
|
1175
|
-
if (hasPixelDimension && style.getPropertyValue("box-sizing") !== "border-box") return dimension;
|
|
1176
|
-
const inset = (axis === "width" ? ["left", "right"] : ["top", "bottom"]).reduce((total, side) => total + (Number.parseFloat(padding[side]) || 0) + (Number.parseFloat(border[side]) || 0), 0);
|
|
1177
|
-
return Math.max(0, (hasPixelDimension ? dimension : bounds[axis]) - inset);
|
|
1178
|
-
};
|
|
1179
|
-
const box = {
|
|
1180
|
-
content: {
|
|
1181
|
-
width: contentDimension("width"),
|
|
1182
|
-
height: contentDimension("height")
|
|
1183
|
-
},
|
|
1184
|
-
padding,
|
|
1185
|
-
border,
|
|
1186
|
-
margin,
|
|
1187
|
-
radius: {
|
|
1188
|
-
topLeft: style.getPropertyValue("border-top-left-radius") || "0px",
|
|
1189
|
-
topRight: style.getPropertyValue("border-top-right-radius") || "0px",
|
|
1190
|
-
bottomRight: style.getPropertyValue("border-bottom-right-radius") || "0px",
|
|
1191
|
-
bottomLeft: style.getPropertyValue("border-bottom-left-radius") || "0px"
|
|
1192
|
-
},
|
|
1193
|
-
gap: {
|
|
1194
|
-
row: style.getPropertyValue("row-gap") || "normal",
|
|
1195
|
-
column: style.getPropertyValue("column-gap") || "normal"
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
const position = style.getPropertyValue("position");
|
|
1199
|
-
if (position && position !== "static") box.position = readSides("");
|
|
1200
|
-
const classes = Array.from(element.classList);
|
|
1201
|
-
const plainClasses = classes.filter((name) => !splitVariants(name).variants.length && !name.includes("["));
|
|
1202
|
-
const spacing = inspectTokens(plainClasses.join(" "), isKnown);
|
|
1203
|
-
const candidates = (prefix, namespaces) => plainClasses.flatMap((raw) => {
|
|
1204
|
-
const utility = raw.replace(/^!|!$/g, "");
|
|
1205
|
-
if (!utility.startsWith(`${prefix}-`)) return [];
|
|
1206
|
-
const suffix = utility.slice(prefix.length + 1);
|
|
1207
|
-
return namespaces.map((namespace) => `--${namespace}${suffix}`);
|
|
1208
|
-
});
|
|
1209
|
-
const variantsAffect = (prefixes) => classes.some((raw) => {
|
|
1210
|
-
const { variants, utility } = splitVariants(raw);
|
|
1211
|
-
return variants.length > 0 && prefixes.some((prefix) => utility.replace(/^!/, "").startsWith(`${prefix}-`));
|
|
1212
|
-
});
|
|
1213
|
-
const equivalent = (value, computed, property) => {
|
|
1214
|
-
if (!value) return false;
|
|
1215
|
-
if (property.includes("color")) {
|
|
1216
|
-
if (value.match(/^\d+(?:\.\d+)?\s+\d+(?:\.\d+)?\s+\d+(?:\.\d+)?$/)) value = `rgb(${value})`;
|
|
1217
|
-
return readableColor(value).toLowerCase() === readableColor(computed).toLowerCase();
|
|
1218
|
-
}
|
|
1219
|
-
const length = value.match(/^(-?\d+(?:\.\d+)?)(rem|px|em)$/);
|
|
1220
|
-
if (length && computed.endsWith("px")) {
|
|
1221
|
-
let factor = 1;
|
|
1222
|
-
if (length[2] === "rem") factor = rootFontSize;
|
|
1223
|
-
if (length[2] === "em") factor = Number.parseFloat(style.fontSize);
|
|
1224
|
-
return Math.abs(Number(length[1]) * factor - Number.parseFloat(computed)) < .02;
|
|
1225
|
-
}
|
|
1226
|
-
return value.replace(/["']/g, "").replace(/\s+/g, " ") === computed.replace(/["']/g, "").replace(/\s+/g, " ");
|
|
1227
|
-
};
|
|
1228
|
-
const property = (label, css, tokens = [], prefixes = []) => {
|
|
1229
|
-
const computed = style.getPropertyValue(css);
|
|
1230
|
-
const matching = variantsAffect(prefixes) ? [] : tokens.filter((token) => !!token && isKnown(token) && equivalent(resolveToken(style, token), computed, css));
|
|
1231
|
-
const token = [...new Set(matching)][0];
|
|
1232
|
-
const isColor = css.includes("color");
|
|
1233
|
-
return {
|
|
1234
|
-
label,
|
|
1235
|
-
value: isColor ? readableColor(computed) : computed,
|
|
1236
|
-
...token ? { token } : {},
|
|
1237
|
-
...isColor ? { color: computed } : {}
|
|
1238
|
-
};
|
|
1239
|
-
};
|
|
1240
|
-
const tag = element.tagName.toLowerCase();
|
|
1241
|
-
const role = element.getAttribute("role");
|
|
1242
|
-
const context = element.closest("[data-inspector-name]")?.getAttribute("data-inspector-name") || element.closest(".studio-gallery-card")?.querySelector(".studio-gallery-card-title")?.textContent?.trim();
|
|
1243
|
-
const description = (element.getAttribute("aria-label") || element.innerText || element.textContent || "").trim().replace(/\s+/g, " ").slice(0, 100);
|
|
1244
|
-
const name = context || role || tag;
|
|
1245
|
-
const paddingPrefixes = [
|
|
1246
|
-
"p",
|
|
1247
|
-
"px",
|
|
1248
|
-
"py",
|
|
1249
|
-
"pt",
|
|
1250
|
-
"pr",
|
|
1251
|
-
"pb",
|
|
1252
|
-
"pl",
|
|
1253
|
-
"ps",
|
|
1254
|
-
"pe"
|
|
1255
|
-
];
|
|
1256
|
-
const layout = [
|
|
1257
|
-
{
|
|
1258
|
-
label: "Width",
|
|
1259
|
-
value: style.getPropertyValue("width") || `${bounds.width}px`
|
|
1260
|
-
},
|
|
1261
|
-
{
|
|
1262
|
-
label: "Height",
|
|
1263
|
-
value: style.getPropertyValue("height") || `${bounds.height}px`
|
|
1264
|
-
},
|
|
1265
|
-
property("Display", "display"),
|
|
1266
|
-
property("Position", "position"),
|
|
1267
|
-
...sides.map((side) => property(`Padding ${side}`, `padding-${side}`, [spacing.padding[side]], paddingPrefixes)),
|
|
1268
|
-
...sides.map((side) => property(`Margin ${side}`, `margin-${side}`)),
|
|
1269
|
-
property("Row gap", "row-gap", [spacing.gap.row], ["gap"]),
|
|
1270
|
-
property("Column gap", "column-gap", [spacing.gap.column], ["gap"]),
|
|
1271
|
-
property("Radius", "border-radius", [spacing.radius], ["rounded"]),
|
|
1272
|
-
...sides.map((side) => property(`Border ${side} width`, `border-${side}-width`))
|
|
1273
|
-
];
|
|
1274
|
-
const typography = [
|
|
1275
|
-
property("Font", "font-family", candidates("font", ["font-"]), ["font"]),
|
|
1276
|
-
property("Size", "font-size", candidates("text", ["text-"]), ["text"]),
|
|
1277
|
-
property("Weight", "font-weight", candidates("font", ["font-weight-"]), ["font"]),
|
|
1278
|
-
property("Line height", "line-height"),
|
|
1279
|
-
property("Letter spacing", "letter-spacing"),
|
|
1280
|
-
property("Alignment", "text-align")
|
|
1281
|
-
];
|
|
1282
|
-
const appearance = [
|
|
1283
|
-
property("Text", "color", candidates("text", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["text"]),
|
|
1284
|
-
property("Fill", "background-color", candidates("bg", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["bg"]),
|
|
1285
|
-
property("Border", "border-top-color", candidates("border", ["color-", ""]).flatMap((token) => [token, `${token}-base`]), ["border"]),
|
|
1286
|
-
property("Opacity", "opacity"),
|
|
1287
|
-
property("Shadow", "box-shadow")
|
|
1288
|
-
];
|
|
1289
|
-
const isZero = (value) => value.split(/\s+/).every((part) => /^-?0(?:\.0+)?(?:px|rem|em|%)?$/.test(part));
|
|
1290
|
-
const visibleProperty = (row) => {
|
|
1291
|
-
if (row.label === "Width" || row.label === "Height" || row.token) return true;
|
|
1292
|
-
const value = row.value.trim();
|
|
1293
|
-
if (!value) return false;
|
|
1294
|
-
if (/^(Padding|Margin|Border .* width|Row gap|Column gap|Radius)/.test(row.label) && (isZero(value) || value === "normal")) return false;
|
|
1295
|
-
if (row.label === "Position" && value === "static") return false;
|
|
1296
|
-
if (row.label === "Display" && ["inline", "block"].includes(value)) return false;
|
|
1297
|
-
if (row.label === "Shadow" && value === "none") return false;
|
|
1298
|
-
if (row.label === "Opacity" && Number(value) === 1) return false;
|
|
1299
|
-
if (row.label === "Fill" && (value === "transparent" || /^rgba?\([^)]*[,/]\s*0(?:\.0+)?%?\s*\)$/.test(value))) return false;
|
|
1300
|
-
if (row.label === "Border" && !(Number.parseFloat(border.top) > 0)) return false;
|
|
1301
|
-
if (row.label === "Line height" && value === "normal") return false;
|
|
1302
|
-
if (row.label === "Letter spacing" && (value === "normal" || isZero(value))) return false;
|
|
1303
|
-
if (row.label === "Alignment" && [
|
|
1304
|
-
"normal",
|
|
1305
|
-
"start",
|
|
1306
|
-
"left"
|
|
1307
|
-
].includes(value)) return false;
|
|
1308
|
-
if (row.label === "Weight" && ["400", "normal"].includes(value)) return false;
|
|
1309
|
-
return true;
|
|
1310
|
-
};
|
|
1311
|
-
return {
|
|
1312
|
-
name,
|
|
1313
|
-
display: style.display,
|
|
1314
|
-
tag,
|
|
1315
|
-
description,
|
|
1316
|
-
width: bounds.width,
|
|
1317
|
-
height: bounds.height,
|
|
1318
|
-
box,
|
|
1319
|
-
groups: [
|
|
1320
|
-
{
|
|
1321
|
-
name: "Layout",
|
|
1322
|
-
properties: layout
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
name: "Typography",
|
|
1326
|
-
properties: typography
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
name: "Appearance",
|
|
1330
|
-
properties: appearance
|
|
1331
|
-
}
|
|
1332
|
-
].map((group) => ({
|
|
1333
|
-
name: group.name,
|
|
1334
|
-
properties: group.properties.filter(visibleProperty)
|
|
1335
|
-
})).filter((group) => group.properties.length > 0)
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
//#endregion
|
|
1339
|
-
export { InspectorDetails as a, useUIConfiguration as c, cvaDefinitions as d, Sun as f, HighlightOverlay as i, exportCvaEdits as l, Moon as m, inspectTokens as n, UIConfigurationProvider as o, Pin as p, getBoxHighlights as r, emptyConfiguration as s, inspectElement as t, resolveCvaDefinition as u };
|