@g4rcez/components 5.0.1 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnimatePresence-j36AYeOQ.js +181 -0
- package/dist/AnimatePresence-j36AYeOQ.js.map +1 -0
- package/dist/Calendar.es-xICmgvjq.js +23 -0
- package/dist/Calendar.es-xICmgvjq.js.map +1 -0
- package/dist/Funnel.es-DjKVl8Nj.js +23 -0
- package/dist/Funnel.es-DjKVl8Nj.js.map +1 -0
- package/dist/{MotionConfig-DKKYqBH2.js → MotionConfig-CXHoPGbK.js} +2 -2
- package/dist/{MotionConfig-DKKYqBH2.js.map → MotionConfig-CXHoPGbK.js.map} +1 -1
- package/dist/Plus.es-DbyRkEE2.js +23 -0
- package/dist/Plus.es-DbyRkEE2.js.map +1 -0
- package/dist/Trash.es-BFAc8PMf.js +23 -0
- package/dist/Trash.es-BFAc8PMf.js.map +1 -0
- package/dist/{calendar-PCCZDUIL.js → calendar-DEPkz8sw.js} +364 -502
- package/dist/calendar-DEPkz8sw.js.map +1 -0
- package/dist/calendar-header-Dfr-CwkY.js +174 -0
- package/dist/calendar-header-Dfr-CwkY.js.map +1 -0
- package/dist/chunk-jwUa06l-.js +23 -0
- package/dist/components/core/button.d.ts +77 -0
- package/dist/components/core/button.d.ts.map +1 -0
- package/dist/components/core/button.js +1 -1
- package/dist/components/core/button.jsx +79 -0
- package/dist/components/core/heading.d.ts +3 -0
- package/dist/components/core/heading.d.ts.map +1 -0
- package/dist/components/core/heading.js +11 -0
- package/dist/components/core/heading.js.map +1 -0
- package/dist/components/core/heading.jsx +4 -0
- package/dist/components/core/polymorph.d.ts +10 -0
- package/dist/components/core/polymorph.d.ts.map +1 -0
- package/dist/{polymorph-BLXhrn9n.js → components/core/polymorph.js} +2 -2
- package/dist/components/core/polymorph.js.map +1 -0
- package/dist/components/core/polymorph.jsx +5 -0
- package/dist/components/core/render-on-view.d.ts +7 -0
- package/dist/components/core/render-on-view.d.ts.map +1 -0
- package/dist/components/core/render-on-view.js +29 -0
- package/dist/components/core/render-on-view.js.map +1 -0
- package/dist/components/core/render-on-view.jsx +31 -0
- package/dist/components/core/resizable.d.ts +9 -0
- package/dist/components/core/resizable.d.ts.map +1 -0
- package/dist/components/core/resizable.js +60 -0
- package/dist/components/core/resizable.js.map +1 -0
- package/dist/components/core/resizable.jsx +57 -0
- package/dist/components/core/slot.d.ts +16 -0
- package/dist/components/core/slot.d.ts.map +1 -0
- package/dist/{slot-pC8kH9De.js → components/core/slot.js} +2 -2
- package/dist/components/core/slot.js.map +1 -0
- package/dist/components/core/slot.jsx +156 -0
- package/dist/components/core/tag.d.ts +35 -0
- package/dist/components/core/tag.d.ts.map +1 -0
- package/dist/components/core/tag.js +1 -1
- package/dist/components/core/tag.jsx +53 -0
- package/dist/components/core/typography.d.ts +25 -0
- package/dist/components/core/typography.d.ts.map +1 -0
- package/dist/components/core/typography.js +40 -0
- package/dist/components/core/typography.js.map +1 -0
- package/dist/components/core/typography.jsx +20 -0
- package/dist/components/display/alert.d.ts +28 -0
- package/dist/components/display/alert.d.ts.map +1 -0
- package/dist/components/display/alert.js +83 -102
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/alert.jsx +58 -0
- package/dist/components/display/calendar.d.ts +42 -0
- package/dist/components/display/calendar.d.ts.map +1 -0
- package/dist/components/display/calendar.js +1 -1
- package/dist/components/display/calendar.jsx +323 -0
- package/dist/components/display/card.d.ts +29 -0
- package/dist/components/display/card.d.ts.map +1 -0
- package/dist/components/display/card.js +2 -2
- package/dist/components/display/card.jsx +43 -0
- package/dist/components/display/empty.d.ts +8 -0
- package/dist/components/display/empty.d.ts.map +1 -0
- package/dist/components/display/empty.js +25 -0
- package/dist/components/display/empty.js.map +1 -0
- package/dist/components/display/empty.jsx +13 -0
- package/dist/components/display/list.d.ts +16 -0
- package/dist/components/display/list.d.ts.map +1 -0
- package/dist/components/display/list.js +132 -122
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/list.jsx +90 -0
- package/dist/components/display/notifications.d.ts +27 -0
- package/dist/components/display/notifications.d.ts.map +1 -0
- package/dist/components/display/notifications.js +1 -1
- package/dist/components/display/notifications.jsx +132 -0
- package/dist/components/display/progress.d.ts +16 -0
- package/dist/components/display/progress.d.ts.map +1 -0
- package/dist/components/display/progress.js +3 -0
- package/dist/components/display/progress.jsx +19 -0
- package/dist/components/display/shortcut.d.ts +4 -0
- package/dist/components/display/shortcut.d.ts.map +1 -0
- package/dist/components/display/shortcut.js +2 -0
- package/dist/components/display/shortcut.jsx +23 -0
- package/dist/components/display/skeleton.d.ts +12 -0
- package/dist/components/display/skeleton.d.ts.map +1 -0
- package/dist/components/display/skeleton.js +41 -0
- package/dist/components/display/skeleton.js.map +1 -0
- package/dist/components/display/skeleton.jsx +19 -0
- package/dist/components/display/spinner.d.ts +5 -0
- package/dist/components/display/spinner.d.ts.map +1 -0
- package/dist/components/display/spinner.js +17 -0
- package/dist/components/display/spinner.js.map +1 -0
- package/dist/components/display/spinner.jsx +11 -0
- package/dist/components/display/stats.d.ts +12 -0
- package/dist/components/display/stats.d.ts.map +1 -0
- package/dist/components/display/stats.jsx +16 -0
- package/dist/components/display/step.d.ts +24 -0
- package/dist/components/display/step.d.ts.map +1 -0
- package/dist/components/display/step.js +3 -0
- package/dist/components/display/step.jsx +145 -0
- package/dist/components/display/tabs.d.ts +24 -0
- package/dist/components/display/tabs.d.ts.map +1 -0
- package/dist/components/display/tabs.js +1 -1
- package/dist/components/display/tabs.jsx +125 -0
- package/dist/components/display/timeline.d.ts +10 -0
- package/dist/components/display/timeline.d.ts.map +1 -0
- package/dist/components/display/timeline.js +1 -1
- package/dist/components/display/timeline.jsx +25 -0
- package/dist/components/floating/command-palette.d.ts +49 -0
- package/dist/components/floating/command-palette.d.ts.map +1 -0
- package/dist/components/floating/command-palette.js +255 -0
- package/dist/components/floating/command-palette.js.map +1 -0
- package/dist/components/floating/command-palette.jsx +232 -0
- package/dist/components/floating/dropdown.d.ts +15 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -0
- package/dist/components/floating/dropdown.js +1 -1
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/dropdown.jsx +56 -0
- package/dist/components/floating/expand.d.ts +11 -0
- package/dist/components/floating/expand.d.ts.map +1 -0
- package/dist/components/floating/expand.js +15 -14
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/expand.jsx +44 -0
- package/dist/components/floating/menu.d.ts +52 -0
- package/dist/components/floating/menu.d.ts.map +1 -0
- package/dist/components/floating/menu.js +1 -1
- package/dist/components/floating/menu.jsx +165 -0
- package/dist/components/floating/modal.d.ts +63 -0
- package/dist/components/floating/modal.d.ts.map +1 -0
- package/dist/components/floating/modal.js +1 -1
- package/dist/components/floating/modal.jsx +375 -0
- package/dist/components/floating/toolbar.d.ts +6 -0
- package/dist/components/floating/toolbar.d.ts.map +1 -0
- package/dist/components/floating/toolbar.js +20 -0
- package/dist/components/floating/toolbar.js.map +1 -0
- package/dist/components/floating/toolbar.jsx +9 -0
- package/dist/components/floating/tooltip.d.ts +17 -0
- package/dist/components/floating/tooltip.d.ts.map +1 -0
- package/dist/components/floating/tooltip.js +2 -2
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/floating/tooltip.jsx +67 -0
- package/dist/components/floating/wizard.d.ts +26 -0
- package/dist/components/floating/wizard.d.ts.map +1 -0
- package/dist/components/floating/wizard.js +3 -0
- package/dist/components/floating/wizard.jsx +165 -0
- package/dist/components/form/autocomplete.d.ts +16 -0
- package/dist/components/form/autocomplete.d.ts.map +1 -0
- package/dist/components/form/autocomplete.js +344 -2
- package/dist/components/form/autocomplete.js.map +1 -0
- package/dist/components/form/autocomplete.jsx +299 -0
- package/dist/components/form/checkbox.d.ts +12 -0
- package/dist/components/form/checkbox.d.ts.map +1 -0
- package/dist/components/form/checkbox.js +29 -27
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/checkbox.jsx +27 -0
- package/dist/components/form/date-picker.d.ts +10 -0
- package/dist/components/form/date-picker.d.ts.map +1 -0
- package/dist/components/form/date-picker.js +1 -1
- package/dist/components/form/date-picker.jsx +115 -0
- package/dist/components/form/file-upload.d.ts +20 -0
- package/dist/components/form/file-upload.d.ts.map +1 -0
- package/dist/components/form/file-upload.js +1 -1
- package/dist/components/form/file-upload.jsx +160 -0
- package/dist/components/form/form.d.ts +3 -0
- package/dist/components/form/form.d.ts.map +1 -0
- package/dist/components/form/form.jsx +10 -0
- package/dist/components/form/formReset.d.ts +2 -0
- package/dist/components/form/formReset.d.ts.map +1 -0
- package/dist/components/form/formReset.js +10 -0
- package/dist/components/form/formReset.js.map +1 -0
- package/dist/components/form/formReset.jsx +17 -0
- package/dist/components/form/free-text.d.ts +11 -0
- package/dist/components/form/free-text.d.ts.map +1 -0
- package/dist/components/form/free-text.js +70 -0
- package/dist/components/form/free-text.js.map +1 -0
- package/dist/components/form/free-text.jsx +41 -0
- package/dist/components/form/input-field.d.ts +34 -0
- package/dist/components/form/input-field.d.ts.map +1 -0
- package/dist/components/form/input-field.js +3 -0
- package/dist/components/form/input-field.jsx +64 -0
- package/dist/components/form/input.d.ts +52 -0
- package/dist/components/form/input.d.ts.map +1 -0
- package/dist/components/form/input.js +1 -1
- package/dist/components/form/input.jsx +36 -0
- package/dist/components/form/multi-select.d.ts +19 -0
- package/dist/components/form/multi-select.d.ts.map +1 -0
- package/dist/components/form/multi-select.js +420 -0
- package/dist/components/form/multi-select.js.map +1 -0
- package/dist/components/form/multi-select.jsx +352 -0
- package/dist/components/form/radiobox.d.ts +7 -0
- package/dist/components/form/radiobox.d.ts.map +1 -0
- package/dist/components/form/radiobox.jsx +6 -0
- package/dist/components/form/select.d.ts +13 -0
- package/dist/components/form/select.d.ts.map +1 -0
- package/dist/components/form/select.js +55 -51
- package/dist/components/form/select.js.map +1 -1
- package/dist/components/form/select.jsx +47 -0
- package/dist/components/form/slider.d.ts +7 -0
- package/dist/components/form/slider.d.ts.map +1 -0
- package/dist/components/form/slider.js +3 -0
- package/dist/components/form/slider.jsx +45 -0
- package/dist/components/form/switch.d.ts +10 -0
- package/dist/components/form/switch.d.ts.map +1 -0
- package/dist/components/form/switch.js +32 -26
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/form/switch.jsx +59 -0
- package/dist/components/form/task-list.d.ts +3 -0
- package/dist/components/form/task-list.d.ts.map +1 -0
- package/dist/components/form/task-list.jsx +26 -0
- package/dist/components/form/textarea.d.ts +5 -0
- package/dist/components/form/textarea.d.ts.map +1 -0
- package/dist/components/form/textarea.js +19 -0
- package/dist/components/form/textarea.js.map +1 -0
- package/dist/components/form/textarea.jsx +26 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +44 -0
- package/dist/components/page-calendar/calendar-header.d.ts +16 -0
- package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
- package/dist/components/page-calendar/calendar-header.js +2 -0
- package/dist/components/page-calendar/calendar-header.jsx +85 -0
- package/dist/components/page-calendar/day-view.d.ts +12 -0
- package/dist/components/page-calendar/day-view.d.ts.map +1 -0
- package/dist/components/page-calendar/day-view.js +124 -0
- package/dist/components/page-calendar/day-view.js.map +1 -0
- package/dist/components/page-calendar/day-view.jsx +89 -0
- package/dist/components/page-calendar/event-pill.d.ts +9 -0
- package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
- package/dist/components/page-calendar/event-pill.js +44 -0
- package/dist/components/page-calendar/event-pill.js.map +1 -0
- package/dist/components/page-calendar/event-pill.jsx +25 -0
- package/dist/components/page-calendar/index.d.ts +4 -0
- package/dist/components/page-calendar/index.d.ts.map +1 -0
- package/dist/components/page-calendar/index.js +2 -0
- package/dist/components/page-calendar/month-view.d.ts +11 -0
- package/dist/components/page-calendar/month-view.d.ts.map +1 -0
- package/dist/components/page-calendar/month-view.js +109 -0
- package/dist/components/page-calendar/month-view.js.map +1 -0
- package/dist/components/page-calendar/month-view.jsx +93 -0
- package/dist/components/page-calendar/page-calendar.d.ts +18 -0
- package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.js +75 -0
- package/dist/components/page-calendar/page-calendar.js.map +1 -0
- package/dist/components/page-calendar/page-calendar.jsx +41 -0
- package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.types.js +1 -0
- package/dist/components/page-calendar/page-calendar.utils.d.ts +24 -0
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
- package/dist/components/page-calendar/page-calendar.utils.js +93 -0
- package/dist/components/page-calendar/week-view.d.ts +11 -0
- package/dist/components/page-calendar/week-view.d.ts.map +1 -0
- package/dist/components/page-calendar/week-view.js +88 -0
- package/dist/components/page-calendar/week-view.js.map +1 -0
- package/dist/components/page-calendar/week-view.jsx +66 -0
- package/dist/components/table/filter.d.ts +42 -0
- package/dist/components/table/filter.d.ts.map +1 -0
- package/dist/components/table/filter.js +239 -0
- package/dist/components/table/filter.js.map +1 -0
- package/dist/components/table/filter.jsx +174 -0
- package/dist/components/table/group.d.ts +17 -0
- package/dist/components/table/group.d.ts.map +1 -0
- package/dist/components/table/group.js +3 -0
- package/dist/components/table/group.jsx +77 -0
- package/dist/components/table/index.d.ts +19 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +102 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/index.jsx +63 -0
- package/dist/components/table/inner-table.d.ts +29 -0
- package/dist/components/table/inner-table.d.ts.map +1 -0
- package/dist/components/table/inner-table.js +2 -0
- package/dist/components/table/inner-table.jsx +102 -0
- package/dist/components/table/metadata.d.ts +4 -0
- package/dist/components/table/metadata.d.ts.map +1 -0
- package/dist/components/table/metadata.js +73 -0
- package/dist/components/table/metadata.js.map +1 -0
- package/dist/components/table/metadata.jsx +36 -0
- package/dist/components/table/pagination.d.ts +5 -0
- package/dist/components/table/pagination.d.ts.map +1 -0
- package/dist/components/table/pagination.js +70 -0
- package/dist/components/table/pagination.js.map +1 -0
- package/dist/components/table/pagination.jsx +74 -0
- package/dist/components/table/row.d.ts +11 -0
- package/dist/components/table/row.d.ts.map +1 -0
- package/dist/components/table/row.js +58 -0
- package/dist/components/table/row.js.map +1 -0
- package/dist/components/table/row.jsx +49 -0
- package/dist/components/table/sort.d.ts +28 -0
- package/dist/components/table/sort.d.ts.map +1 -0
- package/dist/components/table/sort.js +3 -0
- package/dist/components/table/sort.jsx +111 -0
- package/dist/components/table/table-lib.d.ts +135 -0
- package/dist/components/table/table-lib.d.ts.map +1 -0
- package/dist/components/table/table-lib.js +83 -0
- package/dist/components/table/table.context.d.ts +10 -0
- package/dist/components/table/table.context.d.ts.map +1 -0
- package/dist/components/table/table.context.jsx +5 -0
- package/dist/components/table/thead.d.ts +9 -0
- package/dist/components/table/thead.d.ts.map +1 -0
- package/dist/components/table/thead.js +3 -0
- package/dist/components/table/thead.jsx +103 -0
- package/dist/config/context.d.ts +21 -0
- package/dist/config/context.d.ts.map +1 -0
- package/dist/config/context.js +12 -0
- package/dist/config/default-translations.d.ts +112 -0
- package/dist/config/default-translations.d.ts.map +1 -0
- package/dist/config/default-translations.jsx +105 -0
- package/dist/config/default-tweaks.d.ts +13 -0
- package/dist/config/default-tweaks.d.ts.map +1 -0
- package/dist/config/default-tweaks.js +4 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/{use-translations-DTLfPE3_.js → context-CsnUsfeP.js} +55 -40
- package/dist/context-CsnUsfeP.js.map +1 -0
- package/dist/{date-picker-BhKEFZew.js → date-picker-DNzupG8R.js} +301 -317
- package/dist/date-picker-DNzupG8R.js.map +1 -0
- package/dist/dict-CisoYSMO.js +28 -0
- package/dist/dict-CisoYSMO.js.map +1 -0
- package/dist/dist-ChfJ5LO9.js +498 -0
- package/dist/dist-ChfJ5LO9.js.map +1 -0
- package/dist/{dist-BrGpYRaj.js → dist-DIjUECx9.js} +56 -56
- package/dist/{dist-BrGpYRaj.js.map → dist-DIjUECx9.js.map} +1 -1
- package/dist/dom-Bn4wY_Zx.js.map +1 -1
- package/dist/{file-upload-DWbZfeG5.js → file-upload-C2zNnv9n.js} +501 -481
- package/dist/{file-upload-DWbZfeG5.js.map → file-upload-C2zNnv9n.js.map} +1 -1
- package/dist/fzf-CPGDDCoU.js +64 -0
- package/dist/fzf-CPGDDCoU.js.map +1 -0
- package/dist/getISOWeek-EcB4Ebqp.js +72 -0
- package/dist/getISOWeek-EcB4Ebqp.js.map +1 -0
- package/dist/group-Dl14TJXO.js +222 -0
- package/dist/group-Dl14TJXO.js.map +1 -0
- package/dist/hooks/use-click-outside.d.ts +3 -0
- package/dist/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/hooks/use-click-outside.js +17 -0
- package/dist/hooks/use-color-parser.d.ts +2 -0
- package/dist/hooks/use-color-parser.d.ts.map +1 -0
- package/dist/hooks/use-color-parser.js +9 -0
- package/dist/hooks/use-components-provider.d.ts +15 -0
- package/dist/hooks/use-components-provider.d.ts.map +1 -0
- package/dist/hooks/use-components-provider.jsx +22 -0
- package/dist/hooks/use-debounce.d.ts +5 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-debounce.js +12 -0
- package/dist/hooks/use-floating-ref.d.ts +2 -0
- package/dist/hooks/use-floating-ref.d.ts.map +1 -0
- package/dist/hooks/use-floating-ref.js +6 -0
- package/dist/hooks/use-form.d.ts +394 -0
- package/dist/hooks/use-form.d.ts.map +1 -0
- package/dist/hooks/use-form.js +563 -0
- package/dist/hooks/use-hover.d.ts +3 -0
- package/dist/hooks/use-hover.d.ts.map +1 -0
- package/dist/hooks/use-hover.js +18 -0
- package/dist/hooks/use-input-id.d.ts +4 -0
- package/dist/hooks/use-input-id.d.ts.map +1 -0
- package/dist/hooks/use-input-id.js +5 -0
- package/dist/hooks/use-is-coarse-device.d.ts +2 -0
- package/dist/hooks/use-is-coarse-device.d.ts.map +1 -0
- package/dist/hooks/use-is-coarse-device.js +12 -0
- package/dist/hooks/use-locale.d.ts +3 -0
- package/dist/hooks/use-locale.d.ts.map +1 -0
- package/dist/hooks/use-locale.js +10 -0
- package/dist/hooks/use-media-query.d.ts +2 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +25 -0
- package/dist/hooks/use-on-event.d.ts +4 -0
- package/dist/hooks/use-on-event.d.ts.map +1 -0
- package/dist/hooks/use-on-event.js +10 -0
- package/dist/hooks/use-parent.d.ts +3 -0
- package/dist/hooks/use-parent.d.ts.map +1 -0
- package/dist/hooks/use-parent.js +21 -0
- package/dist/hooks/use-preferences.d.ts +2 -0
- package/dist/hooks/use-preferences.d.ts.map +1 -0
- package/dist/hooks/use-preferences.js +23 -0
- package/dist/hooks/use-previous.d.ts +2 -0
- package/dist/hooks/use-previous.d.ts.map +1 -0
- package/dist/hooks/use-previous.js +9 -0
- package/dist/hooks/use-reactive.d.ts +2 -0
- package/dist/hooks/use-reactive.d.ts.map +1 -0
- package/dist/hooks/use-reactive.js +9 -0
- package/dist/hooks/use-remove-scroll.d.ts +4 -0
- package/dist/hooks/use-remove-scroll.d.ts.map +1 -0
- package/dist/hooks/use-remove-scroll.js +48 -0
- package/dist/hooks/use-resize-observer.d.ts +2 -0
- package/dist/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/hooks/use-resize-observer.js +17 -0
- package/dist/hooks/use-stable-ref.d.ts +2 -0
- package/dist/hooks/use-stable-ref.d.ts.map +1 -0
- package/dist/hooks/use-stable-ref.js +9 -0
- package/dist/hooks/use-swipe.d.ts +8 -0
- package/dist/hooks/use-swipe.d.ts.map +1 -0
- package/dist/hooks/use-swipe.js +17 -0
- package/dist/hooks/use-translations.d.ts +110 -0
- package/dist/hooks/use-translations.d.ts.map +1 -0
- package/dist/hooks/use-translations.js +9 -0
- package/dist/hooks/use-tweaks.d.ts +3 -0
- package/dist/hooks/use-tweaks.d.ts.map +1 -0
- package/dist/hooks/use-tweaks.js +9 -0
- package/dist/hooks/use-window-size.d.ts +5 -0
- package/dist/hooks/use-window-size.d.ts.map +1 -0
- package/dist/hooks/use-window-size.js +14 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -7932
- package/dist/index.js.map +1 -1
- package/dist/inner-table-CeDX60cL.js +151 -0
- package/dist/inner-table-CeDX60cL.js.map +1 -0
- package/dist/input-Cmyuea4Y.js +412 -0
- package/dist/input-Cmyuea4Y.js.map +1 -0
- package/dist/{input-field-B_whI66Q.js → input-field-ffx1MbHo.js} +29 -16
- package/dist/input-field-ffx1MbHo.js.map +1 -0
- package/dist/isSameMonth-C3lsSwcg.js +10 -0
- package/dist/isSameMonth-C3lsSwcg.js.map +1 -0
- package/dist/isToday-COXfxFui.js +32 -0
- package/dist/isToday-COXfxFui.js.map +1 -0
- package/dist/lib/combi-keys.d.ts +15 -0
- package/dist/lib/combi-keys.d.ts.map +1 -0
- package/dist/lib/combi-keys.js +60 -0
- package/dist/lib/dict.d.ts +9 -0
- package/dist/lib/dict.d.ts.map +1 -0
- package/dist/lib/dict.js +28 -0
- package/dist/lib/dom.d.ts +20 -0
- package/dist/lib/dom.d.ts.map +1 -0
- package/dist/lib/dom.js +185 -0
- package/dist/lib/fns.d.ts +11 -0
- package/dist/lib/fns.d.ts.map +1 -0
- package/dist/lib/fns.js +46 -0
- package/dist/lib/fzf.d.ts +16 -0
- package/dist/lib/fzf.d.ts.map +1 -0
- package/dist/lib/fzf.js +115 -0
- package/dist/lib/keyboard-area.d.ts +16 -0
- package/dist/lib/keyboard-area.d.ts.map +1 -0
- package/dist/lib/keyboard-area.js +14 -0
- package/dist/modal-Df8-6i-o.js +408 -0
- package/dist/modal-Df8-6i-o.js.map +1 -0
- package/dist/notifications-NhCESJUV.js +1697 -0
- package/dist/notifications-NhCESJUV.js.map +1 -0
- package/dist/page-calendar.utils-Bd0PHktL.js +102 -0
- package/dist/page-calendar.utils-Bd0PHktL.js.map +1 -0
- package/dist/preset/preset.tailwind.d.ts.map +1 -1
- package/dist/preset/preset.tailwind.js +6 -7
- package/dist/preset/src/styles/dark.js +1 -1
- package/dist/progress-8LO5gWLp.js +104 -0
- package/dist/progress-8LO5gWLp.js.map +1 -0
- package/dist/{proxy-BcJ_5Dwq.js → proxy-fP2NxmhM.js} +658 -844
- package/dist/proxy-fP2NxmhM.js.map +1 -0
- package/dist/shim-Czv-YhKR.js +93 -0
- package/dist/shim-Czv-YhKR.js.map +1 -0
- package/dist/shortcut-CQCmgmlU.js +100 -0
- package/dist/shortcut-CQCmgmlU.js.map +1 -0
- package/dist/slider-TX9hiHO-.js +1196 -0
- package/dist/slider-TX9hiHO-.js.map +1 -0
- package/dist/sort-DGmiselV.js +195 -0
- package/dist/sort-DGmiselV.js.map +1 -0
- package/dist/step-DFpJ7zCG.js +185 -0
- package/dist/step-DFpJ7zCG.js.map +1 -0
- package/dist/styles/dark.js +1 -1
- package/dist/subMonths-QcCnE3Yh.js +43 -0
- package/dist/subMonths-QcCnE3Yh.js.map +1 -0
- package/dist/table-lib-1bkYSklk.js +174 -0
- package/dist/table-lib-1bkYSklk.js.map +1 -0
- package/dist/{tabs-Ciy0l9OF.js → tabs-Brc963EW.js} +2 -2
- package/dist/{tabs-Ciy0l9OF.js.map → tabs-Brc963EW.js.map} +1 -1
- package/dist/thead-B6WELJZ-.js +211 -0
- package/dist/thead-B6WELJZ-.js.map +1 -0
- package/dist/types.d.ts +26 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/use-locale-DPM_sg4s.js +12 -0
- package/dist/use-locale-DPM_sg4s.js.map +1 -0
- package/dist/use-remove-scroll-pAgC09Sq.js +38 -0
- package/dist/use-remove-scroll-pAgC09Sq.js.map +1 -0
- package/dist/use-translations-BE4PuhLm.js +11 -0
- package/dist/use-translations-BE4PuhLm.js.map +1 -0
- package/dist/useAnimationFrame-DnKbaXfi.js +223 -0
- package/dist/useAnimationFrame-DnKbaXfi.js.map +1 -0
- package/dist/valueToPercent-DZc_m1tm.js +43 -0
- package/dist/valueToPercent-DZc_m1tm.js.map +1 -0
- package/dist/visuallyHidden-B7wI86yi.js +303 -0
- package/dist/visuallyHidden-B7wI86yi.js.map +1 -0
- package/dist/with-selector-BFW5n-pb.js +102 -0
- package/dist/with-selector-BFW5n-pb.js.map +1 -0
- package/dist/wizard-7u_qZ-78.js +218 -0
- package/dist/wizard-7u_qZ-78.js.map +1 -0
- package/package.json +19 -11
- package/dist/autocomplete-D3VOTihi.js +0 -415
- package/dist/autocomplete-D3VOTihi.js.map +0 -1
- package/dist/calendar-PCCZDUIL.js.map +0 -1
- package/dist/components/table/table.js +0 -3
- package/dist/date-picker-BhKEFZew.js.map +0 -1
- package/dist/input-B7jqwPG4.js +0 -473
- package/dist/input-B7jqwPG4.js.map +0 -1
- package/dist/input-field-B_whI66Q.js.map +0 -1
- package/dist/modal-Bz-61ays.js +0 -373
- package/dist/modal-Bz-61ays.js.map +0 -1
- package/dist/notifications-MT4XkLov.js +0 -2203
- package/dist/notifications-MT4XkLov.js.map +0 -1
- package/dist/polymorph-BLXhrn9n.js.map +0 -1
- package/dist/proxy-BcJ_5Dwq.js.map +0 -1
- package/dist/skeleton-CBYEq3lM.js +0 -26
- package/dist/skeleton-CBYEq3lM.js.map +0 -1
- package/dist/slot-pC8kH9De.js.map +0 -1
- package/dist/table-CUFbAI2k.js +0 -1914
- package/dist/table-CUFbAI2k.js.map +0 -1
- package/dist/use-translations-DTLfPE3_.js.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { p as e } from "./dom-Bn4wY_Zx.js";
|
|
2
|
+
import { r as t } from "./sort-DGmiselV.js";
|
|
3
|
+
import { t as n } from "./thead-B6WELJZ-.js";
|
|
4
|
+
import { t as r } from "./use-stable-ref-D5LFCx0u.js";
|
|
5
|
+
import { n as i } from "./dist-ChfJ5LO9.js";
|
|
6
|
+
import { t as a } from "./AnimatePresence-j36AYeOQ.js";
|
|
7
|
+
import { n as o } from "./dist-BHFtgf5x.js";
|
|
8
|
+
import { Empty as s } from "./components/display/empty.js";
|
|
9
|
+
import { SkeletonCell as c } from "./components/display/skeleton.js";
|
|
10
|
+
import { Pagination as l } from "./components/table/pagination.js";
|
|
11
|
+
import { Row as u } from "./components/table/row.js";
|
|
12
|
+
import d, { Fragment as f, createContext as p, useContext as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
13
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
14
|
+
//#region src/components/table/table.context.tsx
|
|
15
|
+
var x = p({}), S = x.Provider, C = () => m(x), w = d.forwardRef(({ context: e, className: t = "", ...n }, r) => /* @__PURE__ */ y("tbody", {
|
|
16
|
+
...n,
|
|
17
|
+
role: "rowgroup",
|
|
18
|
+
className: `divide-y divide-table-border ${t}`,
|
|
19
|
+
ref: r,
|
|
20
|
+
children: /* @__PURE__ */ y(a, { children: n.children })
|
|
21
|
+
})), T = d.forwardRef(({ context: e, className: t = "", ...n }, r) => /* @__PURE__ */ y("table", {
|
|
22
|
+
...n,
|
|
23
|
+
role: "table",
|
|
24
|
+
ref: r,
|
|
25
|
+
style: {
|
|
26
|
+
...n.style,
|
|
27
|
+
"--table-cell-padding": "0.75rem"
|
|
28
|
+
},
|
|
29
|
+
className: `table w-full table-fixed border-separate border-spacing-0 text-left ${t ?? ""}`
|
|
30
|
+
})), E = d.forwardRef(({ context: t, ...n }, r) => {
|
|
31
|
+
let i = C(), a = {
|
|
32
|
+
...n.style,
|
|
33
|
+
top: e.number(i.sticky) ? `${i.sticky}px` : void 0
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ y("thead", {
|
|
36
|
+
...n,
|
|
37
|
+
ref: r,
|
|
38
|
+
style: a,
|
|
39
|
+
role: "rowgroup",
|
|
40
|
+
className: "group:sticky top-0 hidden bg-transparent md:table-header-group"
|
|
41
|
+
});
|
|
42
|
+
}), D = {
|
|
43
|
+
TableRow: d.forwardRef(({ context: e, item: t, className: n, ...r }, i) => {
|
|
44
|
+
let a = t ? e?.getRowProps?.(t) : void 0;
|
|
45
|
+
return /* @__PURE__ */ y("tr", {
|
|
46
|
+
...r,
|
|
47
|
+
...a,
|
|
48
|
+
role: "row",
|
|
49
|
+
ref: i,
|
|
50
|
+
className: `group-table-row flex h-fit flex-col flex-wrap justify-center gap-table-row-gap pb-table-row-pb md:table-row ${[n, a?.className].filter(Boolean).join(" ")}`
|
|
51
|
+
});
|
|
52
|
+
}),
|
|
53
|
+
TableFoot: d.forwardRef(({ context: e, ...t }, n) => e?.loadingMore ? /* @__PURE__ */ y("tfoot", {
|
|
54
|
+
...t,
|
|
55
|
+
ref: n,
|
|
56
|
+
className: "bg-card-background",
|
|
57
|
+
children: /* @__PURE__ */ y("tr", {
|
|
58
|
+
role: "row",
|
|
59
|
+
className: "bg-card-background",
|
|
60
|
+
children: /* @__PURE__ */ y("td", {
|
|
61
|
+
colSpan: 999,
|
|
62
|
+
className: "h-table-loading-h bg-card-background px-table-cell-px",
|
|
63
|
+
children: /* @__PURE__ */ y("span", { className: "block h-table-loading-bar-h w-full animate-pulse rounded-table-loading-bar-radius bg-foreground opacity-60" })
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
}) : null),
|
|
67
|
+
TableHead: E,
|
|
68
|
+
Table: T,
|
|
69
|
+
TableBody: w
|
|
70
|
+
}, O = [
|
|
71
|
+
0,
|
|
72
|
+
0,
|
|
73
|
+
0,
|
|
74
|
+
0,
|
|
75
|
+
0,
|
|
76
|
+
0,
|
|
77
|
+
0,
|
|
78
|
+
0,
|
|
79
|
+
0,
|
|
80
|
+
0
|
|
81
|
+
], k = (e) => /* @__PURE__ */ y("div", {
|
|
82
|
+
className: "flex h-table-empty-h w-full items-center justify-center px-table-cell-px",
|
|
83
|
+
children: e.loading ? c : /* @__PURE__ */ y(s, {})
|
|
84
|
+
}), A = () => /* @__PURE__ */ y(f, {}), j = [], M = ({ cols: e, filters: a, setCols: s, sorters: c, setFilters: d, setSorters: f, onScrollEnd: p, getScrollRef: m, pagination: x = null, useControl: S = !1, ...C }) => {
|
|
85
|
+
let w = _(null), [, T] = v(!1), E = r(p), M = r(C.loadingMore), N = g(() => {
|
|
86
|
+
if (C.loading) return O;
|
|
87
|
+
if (S) return C.rows;
|
|
88
|
+
let e = new i(C.rows);
|
|
89
|
+
return a.length > 0 && a.forEach((t) => t.value === "" || Number.isNaN(t.value) ? void 0 : e.Where(t.name, t.operation.symbol, t.value)), c.length === 0 ? e.Select() : t(e.Select(), c);
|
|
90
|
+
}, [
|
|
91
|
+
C.loading,
|
|
92
|
+
C.rows,
|
|
93
|
+
S,
|
|
94
|
+
a,
|
|
95
|
+
c
|
|
96
|
+
]);
|
|
97
|
+
h(() => {
|
|
98
|
+
if (w.current === null) return () => {};
|
|
99
|
+
let e = w.current, t = new IntersectionObserver((e) => {
|
|
100
|
+
if (e[e.length - 1].isIntersecting && M.current) {
|
|
101
|
+
E.current?.(), T(!0);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
return T(!1);
|
|
105
|
+
});
|
|
106
|
+
return t.observe(e), () => t.disconnect();
|
|
107
|
+
}, [M, E]);
|
|
108
|
+
let P = N.length === 0;
|
|
109
|
+
return /* @__PURE__ */ b("div", {
|
|
110
|
+
className: "group relative flex w-full flex-col whitespace-nowrap rounded-table-radius bg-table-background",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ y(o, {
|
|
113
|
+
components: D,
|
|
114
|
+
context: {
|
|
115
|
+
cols: e,
|
|
116
|
+
Aside: C.Aside,
|
|
117
|
+
loading: C.loading,
|
|
118
|
+
getRowProps: C.getRowProps,
|
|
119
|
+
loadingMore: C.loadingMore
|
|
120
|
+
},
|
|
121
|
+
totalCount: N.length,
|
|
122
|
+
itemContent: P ? A : u,
|
|
123
|
+
data: P ? j : N,
|
|
124
|
+
useWindowScroll: !m,
|
|
125
|
+
customScrollParent: m ? m() : void 0,
|
|
126
|
+
fixedHeaderContent: () => /* @__PURE__ */ y(n, {
|
|
127
|
+
headers: e,
|
|
128
|
+
filters: a,
|
|
129
|
+
setCols: s,
|
|
130
|
+
sorters: c,
|
|
131
|
+
setFilters: d,
|
|
132
|
+
setSorters: f,
|
|
133
|
+
loading: !!C.loading,
|
|
134
|
+
inlineFilter: C.inlineFilter,
|
|
135
|
+
inlineSorter: C.inlineSorter
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
P ? /* @__PURE__ */ y(k, { loading: C.loading }) : null,
|
|
139
|
+
/* @__PURE__ */ y("div", {
|
|
140
|
+
"aria-hidden": "true",
|
|
141
|
+
ref: w,
|
|
142
|
+
className: "h-0.5 w-full"
|
|
143
|
+
}),
|
|
144
|
+
x === null ? null : /* @__PURE__ */ y(l, { ...x })
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { S as n, M as t };
|
|
150
|
+
|
|
151
|
+
//# sourceMappingURL=inner-table-CeDX60cL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inner-table-CeDX60cL.js","names":[],"sources":["../src/components/table/table.context.tsx","../src/components/table/inner-table.tsx"],"sourcesContent":["\"use client\";\nimport { createContext, useContext } from \"react\";\n\nexport type TableContextProps = Partial<{ sticky: number }>;\n\nconst TableContext = createContext<TableContextProps>({});\n\nexport const TableProvider = TableContext.Provider;\n\nexport const useTable = () => useContext(TableContext);\n","import Linq from \"linq-arrays\";\nimport { Symbols } from \"linq-arrays\";\nimport { AnimatePresence } from \"motion/react\";\nimport React, { ComponentProps, CSSProperties, Fragment, HTMLAttributes, useEffect, useMemo, useRef, useState } from \"react\";\nimport { ContextProp, ItemProps, TableBodyProps, TableComponents, TableVirtuoso } from \"react-virtuoso\";\nimport { Is } from \"sidekicker\";\nimport { useStableRef } from \"../../hooks/use-stable-ref\";\nimport { Empty } from \"../display/empty\";\nimport { SkeletonCell } from \"../display/skeleton\";\nimport { OptionProps } from \"../form/select\";\nimport { FilterConfig } from \"./filter\";\nimport { GroupItem } from \"./group\";\nimport { Pagination } from \"./pagination\";\nimport { Row } from \"./row\";\nimport { multiSort, Sorter } from \"./sort\";\nimport { CellAsideElement, Col, TableOperationProps } from \"./table-lib\";\nimport { useTable } from \"./table.context\";\nimport { TableHeader } from \"./thead\";\nimport { Any } from \"../../types\";\n\ntype VirtuosoCtx = {\n cols: Col<Record<string, unknown>>[];\n loading?: boolean;\n loadingMore?: boolean;\n Aside?: React.FC<CellAsideElement<Record<string, unknown>>>;\n getRowProps?: (_: Record<string, unknown>) => ComponentProps<\"tr\">;\n};\n\ntype VirtuosoData = Record<string, unknown>;\n\nexport type InnerTableProps<T extends Any> = HTMLAttributes<HTMLTableElement> &\n TableOperationProps<T> & {\n rows: T[];\n index: number;\n cols: Col<T>[];\n border?: boolean;\n loading?: boolean;\n group?: GroupItem<T>;\n useControl?: boolean;\n loadingMore?: boolean;\n sorters?: Sorter<T>[];\n showMetadata?: boolean;\n groups?: GroupItem<T>[];\n onScrollEnd?: () => void;\n optionCols: OptionProps[];\n filters?: FilterConfig<T>[];\n Aside?: React.FC<CellAsideElement<T>>;\n getScrollRef?: () => HTMLElement | undefined;\n getRowProps?: (_: T) => ComponentProps<\"tr\">;\n setGroups: React.Dispatch<React.SetStateAction<GroupItem<T>[]>>;\n };\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps & ContextProp<unknown>>(\n ({ context: _context, className = \"\", ...props }, ref) => (\n <tbody {...props} role=\"rowgroup\" className={`divide-y divide-table-border ${className}`} ref={ref}>\n <AnimatePresence>{props.children}</AnimatePresence>\n </tbody>\n )\n);\n\ntype VirtualTableProps = Pick<React.ComponentProps<\"table\">, \"children\" | \"style\" | \"className\"> & ContextProp<unknown>;\n\nconst VirtualTable = React.forwardRef<HTMLTableElement, VirtualTableProps>(({ context: _context, className = \"\", ...props }, ref) => (\n <table\n {...props}\n role=\"table\"\n ref={ref}\n style={{ ...props.style, \"--table-cell-padding\": \"0.75rem\" } as CSSProperties}\n className={`table w-full table-fixed border-separate border-spacing-0 text-left ${className ?? \"\"}`}\n />\n));\n\ntype TheadProps = Pick<React.ComponentProps<\"thead\">, \"children\" | \"style\"> & ContextProp<unknown>;\n\nconst Thead = React.forwardRef<HTMLTableSectionElement, TheadProps>(({ context: _context, ...props }, ref) => {\n const ctx = useTable();\n const style = {\n ...props.style,\n top: Is.number(ctx.sticky) ? `${ctx.sticky}px` : undefined,\n };\n return <thead {...props} ref={ref} style={style} role=\"rowgroup\" className=\"group:sticky top-0 hidden bg-transparent md:table-header-group\" />;\n});\n\ntype TRowProps = ItemProps<VirtuosoData> & ContextProp<VirtuosoCtx> & { className?: string };\n\nconst TRow = React.forwardRef<HTMLTableRowElement, TRowProps>(({ context, item, className, ...props }, ref) => {\n const contextProps = item ? context?.getRowProps?.(item) : undefined;\n const innerProps = { ...props, ...contextProps };\n return (\n <tr\n {...(innerProps as React.HTMLAttributes<HTMLTableRowElement>)}\n role=\"row\"\n ref={ref}\n className={`group-table-row flex h-fit flex-col flex-wrap justify-center gap-table-row-gap pb-table-row-pb md:table-row ${[className, contextProps?.className].filter(Boolean).join(\" \")}`}\n />\n );\n});\n\ntype TFootProps = Pick<React.ComponentProps<\"tfoot\">, \"children\" | \"style\"> & ContextProp<VirtuosoCtx>;\n\nconst TFoot = React.forwardRef<HTMLTableSectionElement, TFootProps>(({ context, ...props }, ref) => {\n if (context?.loadingMore) {\n return (\n <tfoot {...props} ref={ref} className=\"bg-card-background\">\n <tr role=\"row\" className=\"bg-card-background\">\n <td colSpan={999} className=\"h-table-loading-h bg-card-background px-table-cell-px\">\n <span className=\"block h-table-loading-bar-h w-full animate-pulse rounded-table-loading-bar-radius bg-foreground opacity-60\" />\n </td>\n </tr>\n </tfoot>\n );\n }\n return null;\n});\n\nconst components: TableComponents<VirtuosoData, VirtuosoCtx> = {\n TableRow: TRow,\n TableFoot: TFoot,\n TableHead: Thead,\n Table: VirtualTable,\n TableBody: TableBody,\n};\n\nconst loadingArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\nconst EmptyContent = (props: { loading?: boolean }) => (\n <div className=\"flex h-table-empty-h w-full items-center justify-center px-table-cell-px\">{props.loading ? SkeletonCell : <Empty />}</div>\n);\n\nconst EmptyCell = () => <Fragment />;\n\nconst emptyRows: never[] = [];\n\nexport const InnerTable = <T extends Record<string, unknown>>({\n cols,\n filters,\n setCols,\n sorters,\n setFilters,\n setSorters,\n onScrollEnd,\n getScrollRef,\n pagination = null,\n useControl = false,\n ...props\n}: InnerTableProps<T>) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [, setShowLoadingFooter] = useState(false);\n const onScrollEndRef = useStableRef(onScrollEnd);\n const loadingMoreRef = useStableRef(props.loadingMore);\n\n const rows = useMemo(() => {\n if (props.loading) return loadingArray as unknown as T[];\n if (useControl) return props.rows;\n const linq = new Linq(props.rows);\n if (filters.length > 0) {\n filters.forEach((x) =>\n x.value === \"\" || Number.isNaN(x.value) ? undefined : linq.Where(x.name as keyof T, x.operation.symbol as Symbols, x.value)\n );\n }\n if (sorters.length === 0) return linq.Select();\n return multiSort(linq.Select(), sorters);\n }, [props.loading, props.rows, useControl, filters, sorters]);\n\n useEffect(() => {\n if (ref.current === null) return () => {};\n const div = ref.current;\n const observer = new IntersectionObserver((entries) => {\n const endOfPage = entries[entries.length - 1];\n const condition = endOfPage.isIntersecting && loadingMoreRef.current;\n if (condition) {\n onScrollEndRef.current?.();\n return void setShowLoadingFooter(true);\n }\n return setShowLoadingFooter(false);\n });\n observer.observe(div);\n return () => observer.disconnect();\n }, [loadingMoreRef, onScrollEndRef]);\n\n const empty = rows.length === 0;\n\n const context = {\n cols: cols,\n Aside: props.Aside,\n loading: props.loading,\n getRowProps: props.getRowProps,\n loadingMore: props.loadingMore,\n };\n\n return (\n <div className=\"group relative flex w-full flex-col whitespace-nowrap rounded-table-radius bg-table-background\">\n <TableVirtuoso\n components={components}\n context={context as VirtuosoCtx}\n totalCount={rows.length}\n itemContent={empty ? EmptyCell : Row}\n data={empty ? emptyRows : rows}\n useWindowScroll={getScrollRef ? false : true}\n customScrollParent={getScrollRef ? getScrollRef() : undefined}\n fixedHeaderContent={() => (\n <TableHeader<T>\n headers={cols}\n filters={filters}\n setCols={setCols}\n sorters={sorters}\n setFilters={setFilters}\n setSorters={setSorters}\n loading={!!props.loading}\n inlineFilter={props.inlineFilter}\n inlineSorter={props.inlineSorter}\n />\n )}\n />\n {empty ? <EmptyContent loading={props.loading} /> : null}\n <div aria-hidden=\"true\" ref={ref} className=\"h-0.5 w-full\" />\n {pagination !== null ? <Pagination {...pagination} /> : null}\n </div>\n );\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { createFreeText as e } from "./components/form/free-text.js";
|
|
2
|
+
import t, { forwardRef as n, useCallback as r, useEffect as i, useImperativeHandle as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
3
|
+
//#region ../../node_modules/.pnpm/the-mask-input@3.3.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/the-mask-input/dist/index.es.js
|
|
4
|
+
var l = function() {
|
|
5
|
+
return l = Object.assign || function(e) {
|
|
6
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
7
|
+
return e;
|
|
8
|
+
}, l.apply(this, arguments);
|
|
9
|
+
};
|
|
10
|
+
function u(e, t) {
|
|
11
|
+
var n = {};
|
|
12
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
13
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
function d(e, t) {
|
|
17
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
18
|
+
if (!n) return e;
|
|
19
|
+
var r = n.call(e), i, a = [], o;
|
|
20
|
+
try {
|
|
21
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
o = { error: e };
|
|
24
|
+
} finally {
|
|
25
|
+
try {
|
|
26
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
27
|
+
} finally {
|
|
28
|
+
if (o) throw o.error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return a;
|
|
32
|
+
}
|
|
33
|
+
var f = /\u00a0/g, p = function(e) {
|
|
34
|
+
return e.replace(f, " ");
|
|
35
|
+
}, m = function(e, t) {
|
|
36
|
+
var n = e.length, r = t + 1;
|
|
37
|
+
return n >= r ? e : `${"0".repeat(r - n)}${e}`;
|
|
38
|
+
}, h = function(e) {
|
|
39
|
+
return e.replace(/^0+([0-9]+)/, "$1");
|
|
40
|
+
}, g = function(e, t, n) {
|
|
41
|
+
var r = e.length - 2, i = h(e.substring(0, r)), a = e.substring(r);
|
|
42
|
+
return i.split(/(?=(?:\d{3})*$)/).join(t) + n + a;
|
|
43
|
+
}, _ = function(e) {
|
|
44
|
+
return e === void 0 && (e = ""), e.replace(/(-(?!\d))|[^0-9|-]/g, "") || "";
|
|
45
|
+
}, v = function(e) {
|
|
46
|
+
return Number.parseFloat(e.replace(/,/g, ".").replace(/(.*)\./, function(e) {
|
|
47
|
+
return `${e.replace(/\./g, "")}.`;
|
|
48
|
+
}).replace(/[^0-9.]/g, ""));
|
|
49
|
+
}, y = function(e, t) {
|
|
50
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
51
|
+
}, b = function(e) {
|
|
52
|
+
var t = s(e);
|
|
53
|
+
return i(function() {
|
|
54
|
+
t.current = e;
|
|
55
|
+
}, [e]), t;
|
|
56
|
+
}, x = function(e) {
|
|
57
|
+
return e === "money" || e === "currency";
|
|
58
|
+
}, S = function(e, t, n) {
|
|
59
|
+
return new Intl.NumberFormat(e, {
|
|
60
|
+
style: "currency",
|
|
61
|
+
currency: t,
|
|
62
|
+
currencyDisplay: n
|
|
63
|
+
}).formatToParts(1e3).reduce(function(e, t) {
|
|
64
|
+
var n;
|
|
65
|
+
return l(l({}, e), (n = {}, n[t.type] = t.value, n));
|
|
66
|
+
}, {
|
|
67
|
+
currency: "",
|
|
68
|
+
currencyDisplay: "",
|
|
69
|
+
decimal: ",",
|
|
70
|
+
fraction: "",
|
|
71
|
+
group: "",
|
|
72
|
+
integer: "",
|
|
73
|
+
literal: ""
|
|
74
|
+
});
|
|
75
|
+
}, C = function(e, t) {
|
|
76
|
+
var n = m(_(e), t.fraction.length);
|
|
77
|
+
return p(`${t.currency}${g(n, t.group, t.decimal)}`);
|
|
78
|
+
}, w = n(function(e, n) {
|
|
79
|
+
var r = e.locale, c = r === void 0 ? "pt-BR" : r, d = e.currency, f = d === void 0 ? "BRL" : d, m = e.currencyDisplay, h = m === void 0 ? "symbol" : m;
|
|
80
|
+
e.mask;
|
|
81
|
+
var g = e.onChange, _ = u(e, [
|
|
82
|
+
"locale",
|
|
83
|
+
"currency",
|
|
84
|
+
"currencyDisplay",
|
|
85
|
+
"mask",
|
|
86
|
+
"onChange"
|
|
87
|
+
]), y = s(null);
|
|
88
|
+
a(n, function() {
|
|
89
|
+
return y.current;
|
|
90
|
+
});
|
|
91
|
+
var b = o(function() {
|
|
92
|
+
var e = S(c, f, h);
|
|
93
|
+
return e.currency = p(`${e.currency.trim()} `), e.literal = p(e.literal.trim()), e;
|
|
94
|
+
}, [c, f]), x = function(e) {
|
|
95
|
+
var t = C(e.target.value, b), n = v(t);
|
|
96
|
+
e.target.value = t, e.target.setAttribute("data-number", n.toString()), g?.(e), n !== 0 && (y.current.selectionEnd = t.length);
|
|
97
|
+
};
|
|
98
|
+
i(function() {
|
|
99
|
+
if (y.current !== null) {
|
|
100
|
+
var e = y.current.value;
|
|
101
|
+
if (e !== "") {
|
|
102
|
+
var t = C(e, b), n = v(t);
|
|
103
|
+
y.current.value = t, y.current.setAttribute("data-number", n.toString());
|
|
104
|
+
var r = new InputEvent("change", {});
|
|
105
|
+
g?.(l(l({}, r), {
|
|
106
|
+
target: y.current,
|
|
107
|
+
currentTarget: y.current
|
|
108
|
+
})), n !== 0 && (y.current.selectionEnd = t.length);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, [b]);
|
|
112
|
+
var w = _.defaultValue ? C(_.defaultValue, b) : void 0;
|
|
113
|
+
return t.createElement("input", l({}, _, {
|
|
114
|
+
value: typeof _.value == "string" ? C(_.value, b) : _.value,
|
|
115
|
+
defaultValue: w,
|
|
116
|
+
type: "text",
|
|
117
|
+
ref: y,
|
|
118
|
+
onChange: x,
|
|
119
|
+
inputMode: "decimal"
|
|
120
|
+
}));
|
|
121
|
+
}), T = 1, E = function(e) {
|
|
122
|
+
return e === "percentage" || e === "percent" || e === "percentual";
|
|
123
|
+
}, D = function(e) {
|
|
124
|
+
return new Intl.NumberFormat(e, {
|
|
125
|
+
style: "percent",
|
|
126
|
+
minimumFractionDigits: 2
|
|
127
|
+
}).formatToParts(1e3).reduce(function(e, t) {
|
|
128
|
+
var n;
|
|
129
|
+
return l(l({}, e), (n = {}, n[t.type] = t.value, n));
|
|
130
|
+
}, {
|
|
131
|
+
decimal: "",
|
|
132
|
+
fraction: "",
|
|
133
|
+
group: "",
|
|
134
|
+
integer: "",
|
|
135
|
+
percentSign: "",
|
|
136
|
+
type: "",
|
|
137
|
+
value: ""
|
|
138
|
+
});
|
|
139
|
+
}, O = function(e, t) {
|
|
140
|
+
return p(`${g(m(_(e), t.fraction.length), t.group, t.decimal)} ${t.percentSign}`);
|
|
141
|
+
}, k = n(function(e, n) {
|
|
142
|
+
var r = e.locale, f = r === void 0 ? "pt-BR" : r;
|
|
143
|
+
e.mask;
|
|
144
|
+
var m = e.onChange, h = e.onKeyUp, g = u(e, [
|
|
145
|
+
"locale",
|
|
146
|
+
"mask",
|
|
147
|
+
"onChange",
|
|
148
|
+
"onKeyUp"
|
|
149
|
+
]), _ = s(null), y = d(c(function() {
|
|
150
|
+
return g.value?.toString() ?? "";
|
|
151
|
+
}), 2), b = y[0], x = y[1];
|
|
152
|
+
a(n, function() {
|
|
153
|
+
return _.current;
|
|
154
|
+
}), i(function() {
|
|
155
|
+
x(O(Number.parseFloat(`${g.value ?? "0"}`).toFixed(S.fraction.length), S));
|
|
156
|
+
}, [g.value]);
|
|
157
|
+
var S = o(function() {
|
|
158
|
+
var e = D(f);
|
|
159
|
+
return e.percentSign = p(`${e.percentSign}`), e;
|
|
160
|
+
}, [f]), C = b.length - S.percentSign.length - T, w = function(e) {
|
|
161
|
+
var t, n = _.current;
|
|
162
|
+
n && (n.setSelectionRange(C, C), e && ((t = g.onFocus) == null || t.call(g, e)));
|
|
163
|
+
}, E = function(e) {
|
|
164
|
+
var t = e.currentTarget;
|
|
165
|
+
if (t.selectionStart !== null) {
|
|
166
|
+
var n = t.selectionStart;
|
|
167
|
+
n === t.selectionEnd && C < n && w();
|
|
168
|
+
}
|
|
169
|
+
h?.(e);
|
|
170
|
+
}, k = function(e) {
|
|
171
|
+
var t = O(e.target.value, S), n = v(t);
|
|
172
|
+
if (x(t), e.target.value = t, e.target.setAttribute("data-number", n.toString()), m?.(e), _.current) {
|
|
173
|
+
var r = t.length - S.percentSign.length - T;
|
|
174
|
+
_.current.setSelectionRange(r, r);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
i(function() {
|
|
178
|
+
if (_.current !== null) {
|
|
179
|
+
var e = _.current.value;
|
|
180
|
+
if (e !== "") {
|
|
181
|
+
var t = O(e, S), n = v(t);
|
|
182
|
+
x(t), _.current.value = t, _.current.setAttribute("data-number", n.toString());
|
|
183
|
+
var r = new InputEvent("change", {});
|
|
184
|
+
m?.(l(l({}, r), {
|
|
185
|
+
target: _.current,
|
|
186
|
+
currentTarget: _.current
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}, []);
|
|
191
|
+
var A = g.defaultValue ? O(g.defaultValue, S) : void 0;
|
|
192
|
+
return t.createElement("input", l({}, g, {
|
|
193
|
+
defaultValue: A,
|
|
194
|
+
inputMode: "decimal",
|
|
195
|
+
onChange: k,
|
|
196
|
+
onFocus: w,
|
|
197
|
+
onKeyUp: E,
|
|
198
|
+
ref: _,
|
|
199
|
+
type: "text"
|
|
200
|
+
}));
|
|
201
|
+
}), A = {
|
|
202
|
+
leadingBars: /\\\\/g,
|
|
203
|
+
escape: /[.*+?^${}()|[\]\\]/g
|
|
204
|
+
}, j = {
|
|
205
|
+
".": "\\.",
|
|
206
|
+
"(": "\\(",
|
|
207
|
+
")": "\\)"
|
|
208
|
+
}, M = function(e) {
|
|
209
|
+
for (var t = e.length, n = [], r = 0; r < t; r++) {
|
|
210
|
+
var i = e[r], a = I[i];
|
|
211
|
+
n.push(a === void 0 ? j[i] ?? i : a.regex?.source);
|
|
212
|
+
}
|
|
213
|
+
return n.join("").replace(A.leadingBars, "\\");
|
|
214
|
+
}, N = function(e, t, n) {
|
|
215
|
+
var r = typeof e == "function", i = r ? "" : e;
|
|
216
|
+
if (r && (i = e(t)), Array.isArray(i)) return F(i, n);
|
|
217
|
+
var a = M(i);
|
|
218
|
+
return n ? `^${a}\$` : a;
|
|
219
|
+
}, P = function(e) {
|
|
220
|
+
return e.replace(A.escape, "\\$&");
|
|
221
|
+
}, F = function(e, t) {
|
|
222
|
+
var n = e.map(function(e) {
|
|
223
|
+
return typeof e == "string" ? P(e) : e.source;
|
|
224
|
+
}).join("");
|
|
225
|
+
return new RegExp(t ? `^${n}\$` : n).source;
|
|
226
|
+
}, I = {
|
|
227
|
+
A: {
|
|
228
|
+
regex: /[a-zA-Z]/,
|
|
229
|
+
parse: function(e) {
|
|
230
|
+
return e.toLocaleUpperCase();
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
H: { regex: /[a-fA-F0-9]/ },
|
|
234
|
+
X: { regex: /[0-9a-zA-Z]/ },
|
|
235
|
+
a: {
|
|
236
|
+
regex: /[a-zA-Z]/,
|
|
237
|
+
parse: function(e) {
|
|
238
|
+
return e.toLocaleLowerCase();
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
d: {
|
|
242
|
+
regex: /\d/,
|
|
243
|
+
escape: !0
|
|
244
|
+
},
|
|
245
|
+
x: { regex: /[a-zA-Z]/ }
|
|
246
|
+
}, L = /\d/, R = "(dd) 9dddd-dddd", z = "(dd) dddd-dddd", B = "ddd.ddd.ddd-dd", V = "dd.ddd.ddd/dddd-dd", H = function(e) {
|
|
247
|
+
return e.replace(/\D/g, "");
|
|
248
|
+
}, U = [
|
|
249
|
+
"2",
|
|
250
|
+
/[0-3]/,
|
|
251
|
+
":",
|
|
252
|
+
/[0-5]/,
|
|
253
|
+
/\d/
|
|
254
|
+
], W = [
|
|
255
|
+
/[012]/,
|
|
256
|
+
/\d/,
|
|
257
|
+
":",
|
|
258
|
+
/[0-5]/,
|
|
259
|
+
/[0-9]/
|
|
260
|
+
], G = {
|
|
261
|
+
cep: "ddddd-ddd",
|
|
262
|
+
date: "dd/dd/dddd",
|
|
263
|
+
cpf: B,
|
|
264
|
+
isoDate: "dddd-dd-dd",
|
|
265
|
+
cnpj: V,
|
|
266
|
+
telephone: z,
|
|
267
|
+
cellphone: R,
|
|
268
|
+
creditCard: "dddd dddd dddd dddd",
|
|
269
|
+
uuid: "HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",
|
|
270
|
+
color: function(e) {
|
|
271
|
+
return e.length > 4 ? "#HHHHHH" : "#HHH";
|
|
272
|
+
},
|
|
273
|
+
cpfCnpj: function(e) {
|
|
274
|
+
return H(e).length <= 11 ? B : V;
|
|
275
|
+
},
|
|
276
|
+
int: function(e) {
|
|
277
|
+
return e === void 0 && (e = ""), L.test(e.toString().slice(-1)) ? "d".repeat(Math.max(e.length, 0)) : "d".repeat(Math.max(e.length - 1, 0));
|
|
278
|
+
},
|
|
279
|
+
cellTelephone: function(e) {
|
|
280
|
+
return H(e).length < 11 ? z : R;
|
|
281
|
+
},
|
|
282
|
+
time: function(e) {
|
|
283
|
+
return H(e)[0] === "2" ? U : W;
|
|
284
|
+
}
|
|
285
|
+
}, K = function(e, t, n) {
|
|
286
|
+
return n === void 0 && (n = {}), l({
|
|
287
|
+
mask: e,
|
|
288
|
+
inputMode: t,
|
|
289
|
+
strict: !0,
|
|
290
|
+
pattern: n.pattern ?? typeof e == "function" ? void 0 : N(e, "", !0),
|
|
291
|
+
infinity: n.infinity
|
|
292
|
+
}, n);
|
|
293
|
+
}, q = {
|
|
294
|
+
cellTelephone: K(G.cellTelephone, "tel"),
|
|
295
|
+
cellphone: K(G.cellphone, "tel"),
|
|
296
|
+
cep: K(G.cep, "decimal"),
|
|
297
|
+
cnpj: K(G.cnpj, "decimal"),
|
|
298
|
+
color: K(G.color, "decimal", { pattern: "#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?" }),
|
|
299
|
+
cpf: K(G.cpf, "decimal"),
|
|
300
|
+
cpfCnpj: K(G.cpfCnpj, "decimal", { transform: H }),
|
|
301
|
+
creditCard: K(G.creditCard, "decimal", { pattern: "[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}" }),
|
|
302
|
+
date: K(G.date, "decimal"),
|
|
303
|
+
int: K(G.int, "decimal", { pattern: "[0-9]+" }),
|
|
304
|
+
isoDate: K(G.isoDate, "decimal"),
|
|
305
|
+
telephone: K(G.telephone, "tel"),
|
|
306
|
+
time: K(G.time, "decimal", { pattern: "[0-9]{2}:[0-9]{2}" }),
|
|
307
|
+
uuid: K(G.uuid, "decimal", { pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" })
|
|
308
|
+
};
|
|
309
|
+
function J(e, t, n, r) {
|
|
310
|
+
r === void 0 && (r = I);
|
|
311
|
+
for (var i = n(e), a = "", o = 0, s = 0; o < t.length && s < i.length;) {
|
|
312
|
+
var c = t[o], l = c instanceof RegExp ? c : r[c], u = i[s];
|
|
313
|
+
if (l === void 0) {
|
|
314
|
+
a += c, u === c && (s += 1), o += 1;
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
l instanceof RegExp ? l.test(u) && (a += u) : l.regex.test(u) && (a += l.parse?.call(l, u) ?? u), s += 1, o += 1;
|
|
318
|
+
}
|
|
319
|
+
return a;
|
|
320
|
+
}
|
|
321
|
+
var Y = function(e) {
|
|
322
|
+
return e;
|
|
323
|
+
}, X = function(e, t, n) {
|
|
324
|
+
return !e || !n ? !1 : new RegExp(N(e, n, t)).test(n);
|
|
325
|
+
}, Z = n(function(e, n) {
|
|
326
|
+
var f = e.infinity, p = f === void 0 ? !1 : f, m = e.strict, h = m === void 0 ? !0 : m, g = e.transform, _ = e.onChange, v = e.pattern, y = e.tokens, x = e.mask, S = e.onChangeText, C = e.as, w = u(e, [
|
|
327
|
+
"infinity",
|
|
328
|
+
"strict",
|
|
329
|
+
"transform",
|
|
330
|
+
"onChange",
|
|
331
|
+
"pattern",
|
|
332
|
+
"tokens",
|
|
333
|
+
"mask",
|
|
334
|
+
"onChangeText",
|
|
335
|
+
"as"
|
|
336
|
+
]), T = s(null);
|
|
337
|
+
a(n, function() {
|
|
338
|
+
return T.current;
|
|
339
|
+
});
|
|
340
|
+
var E = b(_), D = b(S), O = b(x), k = s(X(x, h, w.value || w.defaultValue)), A = C ?? "input", j = r(function(e, t) {
|
|
341
|
+
var n = e ?? t ?? "";
|
|
342
|
+
if (x === void 0) return n;
|
|
343
|
+
var r = n?.toString() ?? "";
|
|
344
|
+
return J(r, typeof x == "function" ? x(r) : x, g ?? Y, y ?? I);
|
|
345
|
+
}, [
|
|
346
|
+
g,
|
|
347
|
+
x,
|
|
348
|
+
y
|
|
349
|
+
]), M = d(c(function() {
|
|
350
|
+
return j(w.value, w.defaultValue);
|
|
351
|
+
}), 2), P = M[0], L = M[1], R = j(w.defaultValue, w.defaultValue), z = o(function() {
|
|
352
|
+
if (v || x === void 0) return v;
|
|
353
|
+
if (typeof x == "function") {
|
|
354
|
+
var e = x(P);
|
|
355
|
+
return Array.isArray(e) ? F(e, h) : N(x, P, h);
|
|
356
|
+
}
|
|
357
|
+
return typeof x == "string" ? N(x, P, h) : F(x, h);
|
|
358
|
+
}, [
|
|
359
|
+
v,
|
|
360
|
+
P,
|
|
361
|
+
h,
|
|
362
|
+
x
|
|
363
|
+
]);
|
|
364
|
+
return i(function() {
|
|
365
|
+
if (w.value !== void 0) {
|
|
366
|
+
var e = j(w.value, w.defaultValue);
|
|
367
|
+
L(e), T.current !== null && (T.current.value = e);
|
|
368
|
+
}
|
|
369
|
+
}, [
|
|
370
|
+
w.value,
|
|
371
|
+
x,
|
|
372
|
+
g,
|
|
373
|
+
w.defaultValue
|
|
374
|
+
]), t.createElement(A, l({}, w, {
|
|
375
|
+
ref: T,
|
|
376
|
+
pattern: z,
|
|
377
|
+
onChange: function(e) {
|
|
378
|
+
var t, n, r, i, a = e.currentTarget, o = e.target.value;
|
|
379
|
+
if (O.current === void 0) return L(o), (t = D.current) == null || t.call(D, o), (n = E.current) == null || n.call(E, e), S?.(o);
|
|
380
|
+
var s = new RegExp(N(O.current, o, h)), c = a.selectionEnd ?? 0, l = function(e, t, n) {
|
|
381
|
+
if (e.type !== "number") return e.setSelectionRange(t, n);
|
|
382
|
+
};
|
|
383
|
+
if (p && k.current && o.length >= P.length) return a.value = P, l(a, c - 1, c - 1);
|
|
384
|
+
var u = !1;
|
|
385
|
+
o.length < P.length && (k.current = !1, u = !0), s.test(o) && (k.current = !0);
|
|
386
|
+
var d = c, f = o[d - 1], m = J(o, typeof O.current == "function" ? O.current(o) : O.current, g ?? Y, y ?? I);
|
|
387
|
+
for (a.value = m, L(m); d < m.length && m.charAt(d - 1) !== f;) d += 1;
|
|
388
|
+
u ? l(a, c, c) : l(a, d, d), e.target.value = m, (r = D.current) == null || r.call(D, m), (i = E.current) == null || i.call(E, e);
|
|
389
|
+
},
|
|
390
|
+
defaultValue: Q(w.defaultValue) ? R : void 0,
|
|
391
|
+
value: Q(w.value) ? j(w.value, w.value) : w.value
|
|
392
|
+
}));
|
|
393
|
+
}), Q = function(e) {
|
|
394
|
+
return typeof e == "string";
|
|
395
|
+
};
|
|
396
|
+
q.cellTelephone, q.cellphone, q.cep, q.cnpj, q.color, q.cpf, q.cpfCnpj, q.creditCard, q.date, q.int, q.isoDate, q.telephone, q.time, q.uuid;
|
|
397
|
+
var $ = t.forwardRef(function(e, n) {
|
|
398
|
+
var r = o(function() {
|
|
399
|
+
if (e.mask) return typeof e.mask == "string" && y(q, e.mask) ? q[e.mask] : { mask: e.mask };
|
|
400
|
+
}, [e.mask]), i = l(l({}, e), r);
|
|
401
|
+
return x(i.mask) ? t.createElement(w, l({}, i, {
|
|
402
|
+
mask: void 0,
|
|
403
|
+
ref: n
|
|
404
|
+
})) : E(i.mask) ? t.createElement(k, l({}, i, {
|
|
405
|
+
mask: void 0,
|
|
406
|
+
ref: n
|
|
407
|
+
})) : t.createElement(Z, l({}, i, { ref: n }));
|
|
408
|
+
}), ee = e($, "input", { type: "text" });
|
|
409
|
+
//#endregion
|
|
410
|
+
export { $ as n, ee as t };
|
|
411
|
+
|
|
412
|
+
//# sourceMappingURL=input-Cmyuea4Y.js.map
|