@mari-ui/components 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -2
- package/dist/accordion.d.ts +1 -0
- package/dist/accordion.js +245 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert.d.ts +1 -0
- package/dist/alert.js +114 -0
- package/dist/alert.js.map +1 -0
- package/dist/autocomplete.d.ts +1 -0
- package/dist/autocomplete.js +158 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/avatar.d.ts +1 -0
- package/dist/avatar.js +74 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.d.ts +1 -0
- package/dist/badge.js +11 -0
- package/dist/badge.js.map +1 -0
- package/dist/breadcrumb.d.ts +1 -0
- package/dist/breadcrumb.js +141 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/button.d.ts +1 -0
- package/dist/button.js +10 -0
- package/dist/button.js.map +1 -0
- package/dist/calendar.d.ts +1 -0
- package/dist/calendar.js +208 -0
- package/dist/calendar.js.map +1 -0
- package/dist/card.d.ts +1 -0
- package/dist/card.js +148 -0
- package/dist/card.js.map +1 -0
- package/dist/carousel.d.ts +1 -0
- package/dist/carousel.js +383 -0
- package/dist/carousel.js.map +1 -0
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +986 -0
- package/dist/chart.js.map +1 -0
- package/dist/checkbox.d.ts +1 -0
- package/dist/checkbox.js +10 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chunk-2IEXY3OZ.js +147 -0
- package/dist/chunk-2IEXY3OZ.js.map +1 -0
- package/dist/chunk-3ABWBQCS.js +49 -0
- package/dist/chunk-3ABWBQCS.js.map +1 -0
- package/dist/chunk-47FHUOLT.js +166 -0
- package/dist/chunk-47FHUOLT.js.map +1 -0
- package/dist/chunk-54HHEXXD.js +20 -0
- package/dist/chunk-54HHEXXD.js.map +1 -0
- package/dist/chunk-BDV4GOEN.js +53 -0
- package/dist/chunk-BDV4GOEN.js.map +1 -0
- package/dist/chunk-CYLXW66E.js +449 -0
- package/dist/chunk-CYLXW66E.js.map +1 -0
- package/dist/chunk-DKENCYHA.js +15 -0
- package/dist/chunk-DKENCYHA.js.map +1 -0
- package/dist/chunk-DUCIAQGR.js +67 -0
- package/dist/chunk-DUCIAQGR.js.map +1 -0
- package/dist/chunk-ELHESRRH.js +240 -0
- package/dist/chunk-ELHESRRH.js.map +1 -0
- package/dist/chunk-FFXRFQSU.js +51 -0
- package/dist/chunk-FFXRFQSU.js.map +1 -0
- package/dist/chunk-FNJHS5KQ.js +330 -0
- package/dist/chunk-FNJHS5KQ.js.map +1 -0
- package/dist/chunk-IO4346TF.js +392 -0
- package/dist/chunk-IO4346TF.js.map +1 -0
- package/dist/chunk-IP2J3BWY.js +185 -0
- package/dist/chunk-IP2J3BWY.js.map +1 -0
- package/dist/chunk-JNZODUXP.js +116 -0
- package/dist/chunk-JNZODUXP.js.map +1 -0
- package/dist/chunk-KCYM2JXP.js +202 -0
- package/dist/chunk-KCYM2JXP.js.map +1 -0
- package/dist/chunk-KG6A32KX.js +23 -0
- package/dist/chunk-KG6A32KX.js.map +1 -0
- package/dist/chunk-KSPM2Z3T.js +43 -0
- package/dist/chunk-KSPM2Z3T.js.map +1 -0
- package/dist/chunk-LBQMEHK6.js +54 -0
- package/dist/chunk-LBQMEHK6.js.map +1 -0
- package/dist/chunk-LBXIPDAB.js +50 -0
- package/dist/chunk-LBXIPDAB.js.map +1 -0
- package/dist/chunk-LEOIKO7C.js +144 -0
- package/dist/chunk-LEOIKO7C.js.map +1 -0
- package/dist/chunk-LZHERDNB.js +344 -0
- package/dist/chunk-LZHERDNB.js.map +1 -0
- package/dist/chunk-NPM7IDYV.js +145 -0
- package/dist/chunk-NPM7IDYV.js.map +1 -0
- package/dist/chunk-NS7FKOFI.js +56 -0
- package/dist/chunk-NS7FKOFI.js.map +1 -0
- package/dist/chunk-P7Z5BREP.js +935 -0
- package/dist/chunk-P7Z5BREP.js.map +1 -0
- package/dist/chunk-QDFDMWXD.js +236 -0
- package/dist/chunk-QDFDMWXD.js.map +1 -0
- package/dist/chunk-QNOHFHVL.js +555 -0
- package/dist/chunk-QNOHFHVL.js.map +1 -0
- package/dist/chunk-QZRBO7BE.js +684 -0
- package/dist/chunk-QZRBO7BE.js.map +1 -0
- package/dist/chunk-RAS77O7N.js +81 -0
- package/dist/chunk-RAS77O7N.js.map +1 -0
- package/dist/chunk-RIBB5OJV.js +152 -0
- package/dist/chunk-RIBB5OJV.js.map +1 -0
- package/dist/chunk-S66GKX2W.js +50 -0
- package/dist/chunk-S66GKX2W.js.map +1 -0
- package/dist/chunk-TCYDVNSU.js +13 -0
- package/dist/chunk-TCYDVNSU.js.map +1 -0
- package/dist/chunk-TXRQCHOR.js +401 -0
- package/dist/chunk-TXRQCHOR.js.map +1 -0
- package/dist/chunk-V7KDUUV6.js +101 -0
- package/dist/chunk-V7KDUUV6.js.map +1 -0
- package/dist/chunk-XUKVQO6M.js +31 -0
- package/dist/chunk-XUKVQO6M.js.map +1 -0
- package/dist/chunk-YZ7MDC6B.js +189 -0
- package/dist/chunk-YZ7MDC6B.js.map +1 -0
- package/dist/chunk-ZLPAXPDI.js +69 -0
- package/dist/chunk-ZLPAXPDI.js.map +1 -0
- package/dist/chunk-ZMA7BT2L.js +223 -0
- package/dist/chunk-ZMA7BT2L.js.map +1 -0
- package/dist/chunk-ZXYQ2ZPR.js +79 -0
- package/dist/chunk-ZXYQ2ZPR.js.map +1 -0
- package/dist/color-picker.d.ts +1 -0
- package/dist/color-picker.js +32 -0
- package/dist/color-picker.js.map +1 -0
- package/dist/date-picker.d.ts +1 -0
- package/dist/date-picker.js +826 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/divider.d.ts +1 -0
- package/dist/divider.js +106 -0
- package/dist/divider.js.map +1 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +14 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown.d.ts +1 -0
- package/dist/dropdown.js +23 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/empty.d.ts +1 -0
- package/dist/empty.js +11 -0
- package/dist/empty.js.map +1 -0
- package/dist/field.d.ts +1 -0
- package/dist/field.js +51 -0
- package/dist/field.js.map +1 -0
- package/dist/float-button.d.ts +1 -0
- package/dist/float-button.js +247 -0
- package/dist/float-button.js.map +1 -0
- package/dist/image.d.ts +1 -0
- package/dist/image.js +1727 -0
- package/dist/image.js.map +1 -0
- package/dist/input-number.d.ts +1 -0
- package/dist/input-number.js +12 -0
- package/dist/input-number.js.map +1 -0
- package/dist/input.d.ts +1 -0
- package/dist/input.js +21 -0
- package/dist/input.js.map +1 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +270 -0
- package/dist/list.js.map +1 -0
- package/dist/loading.d.ts +1 -0
- package/dist/loading.js +7 -0
- package/dist/loading.js.map +1 -0
- package/dist/logo.d.ts +1 -0
- package/dist/logo.js +38 -0
- package/dist/logo.js.map +1 -0
- package/dist/manifest.json +9006 -0
- package/dist/mari.css +145 -0
- package/dist/masonry.d.ts +1 -0
- package/dist/masonry.js +143 -0
- package/dist/masonry.js.map +1 -0
- package/dist/menu.d.ts +1 -0
- package/dist/menu.js +1682 -0
- package/dist/menu.js.map +1 -0
- package/dist/modal.d.ts +1 -0
- package/dist/modal.js +280 -0
- package/dist/modal.js.map +1 -0
- package/dist/pagination.d.ts +1 -0
- package/dist/pagination.js +11 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popconfirm.d.ts +1 -0
- package/dist/popconfirm.js +110 -0
- package/dist/popconfirm.js.map +1 -0
- package/dist/popover.d.ts +1 -0
- package/dist/popover.js +16 -0
- package/dist/popover.js.map +1 -0
- package/dist/progress.d.ts +1 -0
- package/dist/progress.js +135 -0
- package/dist/progress.js.map +1 -0
- package/dist/qrcode.d.ts +1 -0
- package/dist/qrcode.js +212 -0
- package/dist/qrcode.js.map +1 -0
- package/dist/radio.d.ts +1 -0
- package/dist/radio.js +221 -0
- package/dist/radio.js.map +1 -0
- package/dist/rate.d.ts +1 -0
- package/dist/rate.js +196 -0
- package/dist/rate.js.map +1 -0
- package/dist/segmented.d.ts +1 -0
- package/dist/segmented.js +10 -0
- package/dist/segmented.js.map +1 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +18 -0
- package/dist/select.js.map +1 -0
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.js +15 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.d.ts +1 -0
- package/dist/slider.js +401 -0
- package/dist/slider.js.map +1 -0
- package/dist/splitter.d.ts +1 -0
- package/dist/splitter.js +323 -0
- package/dist/splitter.js.map +1 -0
- package/dist/statistic.d.ts +1 -0
- package/dist/statistic.js +299 -0
- package/dist/statistic.js.map +1 -0
- package/dist/steps.d.ts +1 -0
- package/dist/steps.js +395 -0
- package/dist/steps.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/switch.d.ts +1 -0
- package/dist/switch.js +172 -0
- package/dist/switch.js.map +1 -0
- package/dist/table.d.ts +1 -0
- package/dist/table.js +471 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.d.ts +1 -0
- package/dist/tabs.js +446 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.d.ts +1 -0
- package/dist/tag.js +9 -0
- package/dist/tag.js.map +1 -0
- package/dist/tailwind.css +13 -0
- package/dist/theme-customizer.d.ts +1 -0
- package/dist/theme-customizer.js +271 -0
- package/dist/theme-customizer.js.map +1 -0
- package/dist/timeline.d.ts +1 -0
- package/dist/timeline.js +176 -0
- package/dist/timeline.js.map +1 -0
- package/dist/toast.d.ts +1 -0
- package/dist/toast.js +17 -0
- package/dist/toast.js.map +1 -0
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +10 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/tour.d.ts +1 -0
- package/dist/tour.js +253 -0
- package/dist/tour.js.map +1 -0
- package/dist/transfer.d.ts +1 -0
- package/dist/transfer.js +423 -0
- package/dist/transfer.js.map +1 -0
- package/dist/tree-select.d.ts +1 -0
- package/dist/tree-select.js +549 -0
- package/dist/tree-select.js.map +1 -0
- package/dist/tree.d.ts +1 -0
- package/dist/tree.js +23 -0
- package/dist/tree.js.map +1 -0
- package/dist/types/accordion/Accordion.d.ts +16 -0
- package/dist/types/accordion/Accordion.d.ts.map +1 -0
- package/dist/types/accordion/index.d.ts +3 -0
- package/dist/types/accordion/index.d.ts.map +1 -0
- package/dist/types/accordion/types.d.ts +57 -0
- package/dist/types/accordion/types.d.ts.map +1 -0
- package/dist/types/accordion/utils.d.ts +10 -0
- package/dist/types/accordion/utils.d.ts.map +1 -0
- package/dist/types/alert/Alert.d.ts +14 -0
- package/dist/types/alert/Alert.d.ts.map +1 -0
- package/dist/types/alert/index.d.ts +3 -0
- package/dist/types/alert/index.d.ts.map +1 -0
- package/dist/types/alert/types.d.ts +33 -0
- package/dist/types/alert/types.d.ts.map +1 -0
- package/dist/types/autocomplete/AutoComplete.d.ts +16 -0
- package/dist/types/autocomplete/AutoComplete.d.ts.map +1 -0
- package/dist/types/autocomplete/index.d.ts +3 -0
- package/dist/types/autocomplete/index.d.ts.map +1 -0
- package/dist/types/autocomplete/types.d.ts +28 -0
- package/dist/types/autocomplete/types.d.ts.map +1 -0
- package/dist/types/autocomplete/utils.d.ts +14 -0
- package/dist/types/autocomplete/utils.d.ts.map +1 -0
- package/dist/types/avatar/Avatar.d.ts +10 -0
- package/dist/types/avatar/Avatar.d.ts.map +1 -0
- package/dist/types/avatar/index.d.ts +3 -0
- package/dist/types/avatar/index.d.ts.map +1 -0
- package/dist/types/avatar/types.d.ts +29 -0
- package/dist/types/avatar/types.d.ts.map +1 -0
- package/dist/types/avatar/utils.d.ts +12 -0
- package/dist/types/avatar/utils.d.ts.map +1 -0
- package/dist/types/badge/Badge.d.ts +19 -0
- package/dist/types/badge/Badge.d.ts.map +1 -0
- package/dist/types/badge/index.d.ts +3 -0
- package/dist/types/badge/index.d.ts.map +1 -0
- package/dist/types/badge/types.d.ts +38 -0
- package/dist/types/badge/types.d.ts.map +1 -0
- package/dist/types/breadcrumb/Breadcrumb.d.ts +21 -0
- package/dist/types/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/types/breadcrumb/index.d.ts +3 -0
- package/dist/types/breadcrumb/index.d.ts.map +1 -0
- package/dist/types/breadcrumb/types.d.ts +47 -0
- package/dist/types/breadcrumb/types.d.ts.map +1 -0
- package/dist/types/breadcrumb/utils.d.ts +25 -0
- package/dist/types/breadcrumb/utils.d.ts.map +1 -0
- package/dist/types/button/Button.d.ts +12 -0
- package/dist/types/button/Button.d.ts.map +1 -0
- package/dist/types/button/index.d.ts +3 -0
- package/dist/types/button/index.d.ts.map +1 -0
- package/dist/types/button/types.d.ts +57 -0
- package/dist/types/button/types.d.ts.map +1 -0
- package/dist/types/button/utils.d.ts +10 -0
- package/dist/types/button/utils.d.ts.map +1 -0
- package/dist/types/calendar/Calendar.d.ts +11 -0
- package/dist/types/calendar/Calendar.d.ts.map +1 -0
- package/dist/types/calendar/_components/CalendarPanel.d.ts +36 -0
- package/dist/types/calendar/_components/CalendarPanel.d.ts.map +1 -0
- package/dist/types/calendar/_components/CellGrid.d.ts +32 -0
- package/dist/types/calendar/_components/CellGrid.d.ts.map +1 -0
- package/dist/types/calendar/_components/DayGrid.d.ts +47 -0
- package/dist/types/calendar/_components/DayGrid.d.ts.map +1 -0
- package/dist/types/calendar/index.d.ts +3 -0
- package/dist/types/calendar/index.d.ts.map +1 -0
- package/dist/types/calendar/types.d.ts +49 -0
- package/dist/types/calendar/types.d.ts.map +1 -0
- package/dist/types/card/Card.d.ts +21 -0
- package/dist/types/card/Card.d.ts.map +1 -0
- package/dist/types/card/index.d.ts +3 -0
- package/dist/types/card/index.d.ts.map +1 -0
- package/dist/types/card/types.d.ts +49 -0
- package/dist/types/card/types.d.ts.map +1 -0
- package/dist/types/card/utils.d.ts +17 -0
- package/dist/types/card/utils.d.ts.map +1 -0
- package/dist/types/carousel/Carousel.d.ts +62 -0
- package/dist/types/carousel/Carousel.d.ts.map +1 -0
- package/dist/types/carousel/index.d.ts +4 -0
- package/dist/types/carousel/index.d.ts.map +1 -0
- package/dist/types/carousel/types.d.ts +33 -0
- package/dist/types/carousel/types.d.ts.map +1 -0
- package/dist/types/carousel/utils.d.ts +14 -0
- package/dist/types/carousel/utils.d.ts.map +1 -0
- package/dist/types/chart/_shared/ChartFrame.d.ts +55 -0
- package/dist/types/chart/_shared/ChartFrame.d.ts.map +1 -0
- package/dist/types/chart/_shared/ChartSkeleton.d.ts +41 -0
- package/dist/types/chart/_shared/ChartSkeleton.d.ts.map +1 -0
- package/dist/types/chart/_shared/animation.d.ts +39 -0
- package/dist/types/chart/_shared/animation.d.ts.map +1 -0
- package/dist/types/chart/_shared/cartesian.d.ts +50 -0
- package/dist/types/chart/_shared/cartesian.d.ts.map +1 -0
- package/dist/types/chart/_shared/format.d.ts +10 -0
- package/dist/types/chart/_shared/format.d.ts.map +1 -0
- package/dist/types/chart/_shared/paths.d.ts +20 -0
- package/dist/types/chart/_shared/paths.d.ts.map +1 -0
- package/dist/types/chart/_shared/scale.d.ts +35 -0
- package/dist/types/chart/_shared/scale.d.ts.map +1 -0
- package/dist/types/chart/_shared/storyDocs.d.ts +3 -0
- package/dist/types/chart/_shared/storyDocs.d.ts.map +1 -0
- package/dist/types/chart/_shared/useChartSize.d.ts +17 -0
- package/dist/types/chart/_shared/useChartSize.d.ts.map +1 -0
- package/dist/types/chart/bar-chart/BarChart.d.ts +17 -0
- package/dist/types/chart/bar-chart/BarChart.d.ts.map +1 -0
- package/dist/types/chart/bar-chart/bars.d.ts +21 -0
- package/dist/types/chart/bar-chart/bars.d.ts.map +1 -0
- package/dist/types/chart/gauge/Gauge.d.ts +42 -0
- package/dist/types/chart/gauge/Gauge.d.ts.map +1 -0
- package/dist/types/chart/index.d.ts +12 -0
- package/dist/types/chart/index.d.ts.map +1 -0
- package/dist/types/chart/line-chart/LineChart.d.ts +22 -0
- package/dist/types/chart/line-chart/LineChart.d.ts.map +1 -0
- package/dist/types/chart/pie-chart/PieChart.d.ts +33 -0
- package/dist/types/chart/pie-chart/PieChart.d.ts.map +1 -0
- package/dist/types/chart/sparkline/Sparkline.d.ts +31 -0
- package/dist/types/chart/sparkline/Sparkline.d.ts.map +1 -0
- package/dist/types/chart/storyData.d.ts +36 -0
- package/dist/types/chart/storyData.d.ts.map +1 -0
- package/dist/types/chart/types.d.ts +50 -0
- package/dist/types/chart/types.d.ts.map +1 -0
- package/dist/types/checkbox/Checkbox.d.ts +5 -0
- package/dist/types/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/types/checkbox/index.d.ts +3 -0
- package/dist/types/checkbox/index.d.ts.map +1 -0
- package/dist/types/checkbox/types.d.ts +35 -0
- package/dist/types/checkbox/types.d.ts.map +1 -0
- package/dist/types/checkbox/utils.d.ts +15 -0
- package/dist/types/checkbox/utils.d.ts.map +1 -0
- package/dist/types/color-picker/ColorPicker.d.ts +17 -0
- package/dist/types/color-picker/ColorPicker.d.ts.map +1 -0
- package/dist/types/color-picker/_components/ColorArea.d.ts +19 -0
- package/dist/types/color-picker/_components/ColorArea.d.ts.map +1 -0
- package/dist/types/color-picker/_components/ColorInputs.d.ts +14 -0
- package/dist/types/color-picker/_components/ColorInputs.d.ts.map +1 -0
- package/dist/types/color-picker/_components/ColorPresets.d.ts +9 -0
- package/dist/types/color-picker/_components/ColorPresets.d.ts.map +1 -0
- package/dist/types/color-picker/_components/ColorSlider.d.ts +24 -0
- package/dist/types/color-picker/_components/ColorSlider.d.ts.map +1 -0
- package/dist/types/color-picker/_components/Swatch.d.ts +14 -0
- package/dist/types/color-picker/_components/Swatch.d.ts.map +1 -0
- package/dist/types/color-picker/_components/usePointerDrag.d.ts +18 -0
- package/dist/types/color-picker/_components/usePointerDrag.d.ts.map +1 -0
- package/dist/types/color-picker/index.d.ts +4 -0
- package/dist/types/color-picker/index.d.ts.map +1 -0
- package/dist/types/color-picker/types.d.ts +81 -0
- package/dist/types/color-picker/types.d.ts.map +1 -0
- package/dist/types/color-picker/utils.d.ts +50 -0
- package/dist/types/color-picker/utils.d.ts.map +1 -0
- package/dist/types/date-picker/DatePicker.d.ts +17 -0
- package/dist/types/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/types/date-picker/TimePicker.d.ts +8 -0
- package/dist/types/date-picker/TimePicker.d.ts.map +1 -0
- package/dist/types/date-picker/_components/PickerPanel.d.ts +21 -0
- package/dist/types/date-picker/_components/PickerPanel.d.ts.map +1 -0
- package/dist/types/date-picker/_components/TimePanel.d.ts +13 -0
- package/dist/types/date-picker/_components/TimePanel.d.ts.map +1 -0
- package/dist/types/date-picker/index.d.ts +4 -0
- package/dist/types/date-picker/index.d.ts.map +1 -0
- package/dist/types/date-picker/types.d.ts +89 -0
- package/dist/types/date-picker/types.d.ts.map +1 -0
- package/dist/types/date-picker/usePickerState.d.ts +37 -0
- package/dist/types/date-picker/usePickerState.d.ts.map +1 -0
- package/dist/types/date-picker/utils.d.ts +24 -0
- package/dist/types/date-picker/utils.d.ts.map +1 -0
- package/dist/types/divider/Divider.d.ts +8 -0
- package/dist/types/divider/Divider.d.ts.map +1 -0
- package/dist/types/divider/index.d.ts +3 -0
- package/dist/types/divider/index.d.ts.map +1 -0
- package/dist/types/divider/types.d.ts +25 -0
- package/dist/types/divider/types.d.ts.map +1 -0
- package/dist/types/divider/utils.d.ts +12 -0
- package/dist/types/divider/utils.d.ts.map +1 -0
- package/dist/types/drawer/Drawer.d.ts +27 -0
- package/dist/types/drawer/Drawer.d.ts.map +1 -0
- package/dist/types/drawer/index.d.ts +3 -0
- package/dist/types/drawer/index.d.ts.map +1 -0
- package/dist/types/drawer/types.d.ts +51 -0
- package/dist/types/drawer/types.d.ts.map +1 -0
- package/dist/types/drawer/utils.d.ts +5 -0
- package/dist/types/drawer/utils.d.ts.map +1 -0
- package/dist/types/dropdown/Dropdown.d.ts +6 -0
- package/dist/types/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/types/dropdown/_components/DropdownContent.d.ts +16 -0
- package/dist/types/dropdown/_components/DropdownContent.d.ts.map +1 -0
- package/dist/types/dropdown/_components/DropdownItem.d.ts +18 -0
- package/dist/types/dropdown/_components/DropdownItem.d.ts.map +1 -0
- package/dist/types/dropdown/_components/DropdownTrigger.d.ts +4 -0
- package/dist/types/dropdown/_components/DropdownTrigger.d.ts.map +1 -0
- package/dist/types/dropdown/index.d.ts +6 -0
- package/dist/types/dropdown/index.d.ts.map +1 -0
- package/dist/types/dropdown/types.d.ts +69 -0
- package/dist/types/dropdown/types.d.ts.map +1 -0
- package/dist/types/dropdown/useDropdown.d.ts +44 -0
- package/dist/types/dropdown/useDropdown.d.ts.map +1 -0
- package/dist/types/dropdown/utils.d.ts +13 -0
- package/dist/types/dropdown/utils.d.ts.map +1 -0
- package/dist/types/empty/Empty.d.ts +32 -0
- package/dist/types/empty/Empty.d.ts.map +1 -0
- package/dist/types/empty/index.d.ts +3 -0
- package/dist/types/empty/index.d.ts.map +1 -0
- package/dist/types/field/Field.d.ts +20 -0
- package/dist/types/field/Field.d.ts.map +1 -0
- package/dist/types/field/index.d.ts +3 -0
- package/dist/types/field/index.d.ts.map +1 -0
- package/dist/types/field/types.d.ts +26 -0
- package/dist/types/field/types.d.ts.map +1 -0
- package/dist/types/float-button/BackTop.d.ts +11 -0
- package/dist/types/float-button/BackTop.d.ts.map +1 -0
- package/dist/types/float-button/FloatButton.d.ts +28 -0
- package/dist/types/float-button/FloatButton.d.ts.map +1 -0
- package/dist/types/float-button/FloatButtonGroup.d.ts +11 -0
- package/dist/types/float-button/FloatButtonGroup.d.ts.map +1 -0
- package/dist/types/float-button/index.d.ts +5 -0
- package/dist/types/float-button/index.d.ts.map +1 -0
- package/dist/types/float-button/types.d.ts +73 -0
- package/dist/types/float-button/types.d.ts.map +1 -0
- package/dist/types/float-button/utils.d.ts +14 -0
- package/dist/types/float-button/utils.d.ts.map +1 -0
- package/dist/types/foundations/PersonaDocs.d.ts +11 -0
- package/dist/types/foundations/PersonaDocs.d.ts.map +1 -0
- package/dist/types/foundations/usePersonaTheme.d.ts +17 -0
- package/dist/types/foundations/usePersonaTheme.d.ts.map +1 -0
- package/dist/types/image/Image.d.ts +16 -0
- package/dist/types/image/Image.d.ts.map +1 -0
- package/dist/types/image/ImageGallery.d.ts +82 -0
- package/dist/types/image/ImageGallery.d.ts.map +1 -0
- package/dist/types/image/ImageViewer.d.ts +54 -0
- package/dist/types/image/ImageViewer.d.ts.map +1 -0
- package/dist/types/image/galleryUtils.d.ts +89 -0
- package/dist/types/image/galleryUtils.d.ts.map +1 -0
- package/dist/types/image/index.d.ts +7 -0
- package/dist/types/image/index.d.ts.map +1 -0
- package/dist/types/image/types.d.ts +78 -0
- package/dist/types/image/types.d.ts.map +1 -0
- package/dist/types/image/utils.d.ts +54 -0
- package/dist/types/image/utils.d.ts.map +1 -0
- package/dist/types/image/viewerUtils.d.ts +66 -0
- package/dist/types/image/viewerUtils.d.ts.map +1 -0
- package/dist/types/input/Input.d.ts +5 -0
- package/dist/types/input/Input.d.ts.map +1 -0
- package/dist/types/input/OtpInput.d.ts +41 -0
- package/dist/types/input/OtpInput.d.ts.map +1 -0
- package/dist/types/input/SearchInput.d.ts +25 -0
- package/dist/types/input/SearchInput.d.ts.map +1 -0
- package/dist/types/input/Textarea.d.ts +59 -0
- package/dist/types/input/Textarea.d.ts.map +1 -0
- package/dist/types/input/_components/FieldAdornments.d.ts +22 -0
- package/dist/types/input/_components/FieldAdornments.d.ts.map +1 -0
- package/dist/types/input/_components/OtpSingleField.d.ts +38 -0
- package/dist/types/input/_components/OtpSingleField.d.ts.map +1 -0
- package/dist/types/input/index.d.ts +10 -0
- package/dist/types/input/index.d.ts.map +1 -0
- package/dist/types/input/mention/caret.d.ts +12 -0
- package/dist/types/input/mention/caret.d.ts.map +1 -0
- package/dist/types/input/mention/types.d.ts +45 -0
- package/dist/types/input/mention/types.d.ts.map +1 -0
- package/dist/types/input/mention/useMention.d.ts +16 -0
- package/dist/types/input/mention/useMention.d.ts.map +1 -0
- package/dist/types/input/mention/utils.d.ts +22 -0
- package/dist/types/input/mention/utils.d.ts.map +1 -0
- package/dist/types/input/types.d.ts +97 -0
- package/dist/types/input/types.d.ts.map +1 -0
- package/dist/types/input/utils.d.ts +51 -0
- package/dist/types/input/utils.d.ts.map +1 -0
- package/dist/types/input-number/InputNumber.d.ts +17 -0
- package/dist/types/input-number/InputNumber.d.ts.map +1 -0
- package/dist/types/input-number/index.d.ts +3 -0
- package/dist/types/input-number/index.d.ts.map +1 -0
- package/dist/types/input-number/types.d.ts +53 -0
- package/dist/types/input-number/types.d.ts.map +1 -0
- package/dist/types/input-number/utils.d.ts +42 -0
- package/dist/types/input-number/utils.d.ts.map +1 -0
- package/dist/types/lib/AnimationDemo.d.ts +13 -0
- package/dist/types/lib/AnimationDemo.d.ts.map +1 -0
- package/dist/types/lib/ContentSkeleton.d.ts +21 -0
- package/dist/types/lib/ContentSkeleton.d.ts.map +1 -0
- package/dist/types/lib/FloatingArrow.d.ts +22 -0
- package/dist/types/lib/FloatingArrow.d.ts.map +1 -0
- package/dist/types/lib/SkeletonDemo.d.ts +14 -0
- package/dist/types/lib/SkeletonDemo.d.ts.map +1 -0
- package/dist/types/lib/SkeletonSlot.d.ts +22 -0
- package/dist/types/lib/SkeletonSlot.d.ts.map +1 -0
- package/dist/types/lib/colorClasses.d.ts +57 -0
- package/dist/types/lib/colorClasses.d.ts.map +1 -0
- package/dist/types/lib/date/index.d.ts +51 -0
- package/dist/types/lib/date/index.d.ts.map +1 -0
- package/dist/types/lib/elevationClass.d.ts +10 -0
- package/dist/types/lib/elevationClass.d.ts.map +1 -0
- package/dist/types/lib/fieldContext.d.ts +61 -0
- package/dist/types/lib/fieldContext.d.ts.map +1 -0
- package/dist/types/lib/floating.d.ts +46 -0
- package/dist/types/lib/floating.d.ts.map +1 -0
- package/dist/types/lib/infiniteScroll.d.ts +36 -0
- package/dist/types/lib/infiniteScroll.d.ts.map +1 -0
- package/dist/types/lib/linkBehavior.d.ts +38 -0
- package/dist/types/lib/linkBehavior.d.ts.map +1 -0
- package/dist/types/lib/overlay.d.ts +55 -0
- package/dist/types/lib/overlay.d.ts.map +1 -0
- package/dist/types/lib/sizeClasses.d.ts +49 -0
- package/dist/types/lib/sizeClasses.d.ts.map +1 -0
- package/dist/types/lib/skeleton.d.ts +31 -0
- package/dist/types/lib/skeleton.d.ts.map +1 -0
- package/dist/types/lib/storyMeta.d.ts +85 -0
- package/dist/types/lib/storyMeta.d.ts.map +1 -0
- package/dist/types/lib/storyPhotos.d.ts +31 -0
- package/dist/types/lib/storyPhotos.d.ts.map +1 -0
- package/dist/types/lib/storybookArgTypes.d.ts +20 -0
- package/dist/types/lib/storybookArgTypes.d.ts.map +1 -0
- package/dist/types/lib/useAnimatedValue.d.ts +38 -0
- package/dist/types/lib/useAnimatedValue.d.ts.map +1 -0
- package/dist/types/lib/useFloatingPosition.d.ts +32 -0
- package/dist/types/lib/useFloatingPosition.d.ts.map +1 -0
- package/dist/types/lib/useScrollable.d.ts +13 -0
- package/dist/types/lib/useScrollable.d.ts.map +1 -0
- package/dist/types/list/List.d.ts +23 -0
- package/dist/types/list/List.d.ts.map +1 -0
- package/dist/types/list/index.d.ts +3 -0
- package/dist/types/list/index.d.ts.map +1 -0
- package/dist/types/list/types.d.ts +95 -0
- package/dist/types/list/types.d.ts.map +1 -0
- package/dist/types/list/utils.d.ts +16 -0
- package/dist/types/list/utils.d.ts.map +1 -0
- package/dist/types/loading/Loading.d.ts +5 -0
- package/dist/types/loading/Loading.d.ts.map +1 -0
- package/dist/types/loading/index.d.ts +3 -0
- package/dist/types/loading/index.d.ts.map +1 -0
- package/dist/types/loading/types.d.ts +33 -0
- package/dist/types/loading/types.d.ts.map +1 -0
- package/dist/types/loading/utils.d.ts +15 -0
- package/dist/types/loading/utils.d.ts.map +1 -0
- package/dist/types/logo/Logo.d.ts +11 -0
- package/dist/types/logo/Logo.d.ts.map +1 -0
- package/dist/types/logo/index.d.ts +3 -0
- package/dist/types/logo/index.d.ts.map +1 -0
- package/dist/types/masonry/Masonry.d.ts +15 -0
- package/dist/types/masonry/Masonry.d.ts.map +1 -0
- package/dist/types/masonry/index.d.ts +3 -0
- package/dist/types/masonry/index.d.ts.map +1 -0
- package/dist/types/masonry/types.d.ts +35 -0
- package/dist/types/masonry/types.d.ts.map +1 -0
- package/dist/types/masonry/utils.d.ts +23 -0
- package/dist/types/masonry/utils.d.ts.map +1 -0
- package/dist/types/menu/_shared/MegaPanel.d.ts +20 -0
- package/dist/types/menu/_shared/MegaPanel.d.ts.map +1 -0
- package/dist/types/menu/_shared/MenuLink.d.ts +39 -0
- package/dist/types/menu/_shared/MenuLink.d.ts.map +1 -0
- package/dist/types/menu/_shared/MobileNav.d.ts +31 -0
- package/dist/types/menu/_shared/MobileNav.d.ts.map +1 -0
- package/dist/types/menu/_shared/NavBar.d.ts +49 -0
- package/dist/types/menu/_shared/NavBar.d.ts.map +1 -0
- package/dist/types/menu/_shared/NavDrawer.d.ts +40 -0
- package/dist/types/menu/_shared/NavDrawer.d.ts.map +1 -0
- package/dist/types/menu/_shared/_components/MegaPanelColumn.d.ts +19 -0
- package/dist/types/menu/_shared/_components/MegaPanelColumn.d.ts.map +1 -0
- package/dist/types/menu/_shared/_components/MegaPanelPromoGrid.d.ts +11 -0
- package/dist/types/menu/_shared/_components/MegaPanelPromoGrid.d.ts.map +1 -0
- package/dist/types/menu/_shared/_components/MegaPanelRail.d.ts +30 -0
- package/dist/types/menu/_shared/_components/MegaPanelRail.d.ts.map +1 -0
- package/dist/types/menu/_shared/_components/MobileNavLevel.d.ts +26 -0
- package/dist/types/menu/_shared/_components/MobileNavLevel.d.ts.map +1 -0
- package/dist/types/menu/_shared/index.d.ts +3 -0
- package/dist/types/menu/_shared/index.d.ts.map +1 -0
- package/dist/types/menu/_shared/responsive.d.ts +12 -0
- package/dist/types/menu/_shared/responsive.d.ts.map +1 -0
- package/dist/types/menu/_shared/types.d.ts +17 -0
- package/dist/types/menu/_shared/types.d.ts.map +1 -0
- package/dist/types/menu/_shared/useHoverIntent.d.ts +11 -0
- package/dist/types/menu/_shared/useHoverIntent.d.ts.map +1 -0
- package/dist/types/menu/basic-menu/BasicMenu.d.ts +35 -0
- package/dist/types/menu/basic-menu/BasicMenu.d.ts.map +1 -0
- package/dist/types/menu/basic-menu/_components/BasicMenuItem.d.ts +18 -0
- package/dist/types/menu/basic-menu/_components/BasicMenuItem.d.ts.map +1 -0
- package/dist/types/menu/basic-menu/_components/DropdownSubMenu.d.ts +43 -0
- package/dist/types/menu/basic-menu/_components/DropdownSubMenu.d.ts.map +1 -0
- package/dist/types/menu/basic-menu/_components/SubMenuRow.d.ts +20 -0
- package/dist/types/menu/basic-menu/_components/SubMenuRow.d.ts.map +1 -0
- package/dist/types/menu/basic-menu/index.d.ts +3 -0
- package/dist/types/menu/basic-menu/index.d.ts.map +1 -0
- package/dist/types/menu/index.d.ts +9 -0
- package/dist/types/menu/index.d.ts.map +1 -0
- package/dist/types/menu/mega-menu/MegaMenu.d.ts +20 -0
- package/dist/types/menu/mega-menu/MegaMenu.d.ts.map +1 -0
- package/dist/types/menu/mega-menu/_components/MegaMenuItem.d.ts +38 -0
- package/dist/types/menu/mega-menu/_components/MegaMenuItem.d.ts.map +1 -0
- package/dist/types/menu/mega-menu/index.d.ts +3 -0
- package/dist/types/menu/mega-menu/index.d.ts.map +1 -0
- package/dist/types/menu/sidebar/Sidebar.d.ts +66 -0
- package/dist/types/menu/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/types/menu/sidebar/_components/SidebarButton.d.ts +16 -0
- package/dist/types/menu/sidebar/_components/SidebarButton.d.ts.map +1 -0
- package/dist/types/menu/sidebar/_components/SidebarItem.d.ts +45 -0
- package/dist/types/menu/sidebar/_components/SidebarItem.d.ts.map +1 -0
- package/dist/types/menu/sidebar/_components/SidebarMegaPanel.d.ts +16 -0
- package/dist/types/menu/sidebar/_components/SidebarMegaPanel.d.ts.map +1 -0
- package/dist/types/menu/sidebar/_components/SidebarMenu.d.ts +17 -0
- package/dist/types/menu/sidebar/_components/SidebarMenu.d.ts.map +1 -0
- package/dist/types/menu/sidebar/index.d.ts +3 -0
- package/dist/types/menu/sidebar/index.d.ts.map +1 -0
- package/dist/types/menu/types.d.ts +66 -0
- package/dist/types/menu/types.d.ts.map +1 -0
- package/dist/types/menu/utils.d.ts +38 -0
- package/dist/types/menu/utils.d.ts.map +1 -0
- package/dist/types/modal/Modal.d.ts +22 -0
- package/dist/types/modal/Modal.d.ts.map +1 -0
- package/dist/types/modal/index.d.ts +3 -0
- package/dist/types/modal/index.d.ts.map +1 -0
- package/dist/types/modal/types.d.ts +64 -0
- package/dist/types/modal/types.d.ts.map +1 -0
- package/dist/types/modal/utils.d.ts +10 -0
- package/dist/types/modal/utils.d.ts.map +1 -0
- package/dist/types/pagination/Pagination.d.ts +18 -0
- package/dist/types/pagination/Pagination.d.ts.map +1 -0
- package/dist/types/pagination/index.d.ts +3 -0
- package/dist/types/pagination/index.d.ts.map +1 -0
- package/dist/types/pagination/types.d.ts +64 -0
- package/dist/types/pagination/types.d.ts.map +1 -0
- package/dist/types/pagination/utils.d.ts +41 -0
- package/dist/types/pagination/utils.d.ts.map +1 -0
- package/dist/types/popconfirm/Popconfirm.d.ts +16 -0
- package/dist/types/popconfirm/Popconfirm.d.ts.map +1 -0
- package/dist/types/popconfirm/index.d.ts +3 -0
- package/dist/types/popconfirm/index.d.ts.map +1 -0
- package/dist/types/popconfirm/types.d.ts +35 -0
- package/dist/types/popconfirm/types.d.ts.map +1 -0
- package/dist/types/popover/Popover.d.ts +16 -0
- package/dist/types/popover/Popover.d.ts.map +1 -0
- package/dist/types/popover/index.d.ts +3 -0
- package/dist/types/popover/index.d.ts.map +1 -0
- package/dist/types/popover/types.d.ts +42 -0
- package/dist/types/popover/types.d.ts.map +1 -0
- package/dist/types/progress/Progress.d.ts +15 -0
- package/dist/types/progress/Progress.d.ts.map +1 -0
- package/dist/types/progress/index.d.ts +3 -0
- package/dist/types/progress/index.d.ts.map +1 -0
- package/dist/types/progress/types.d.ts +34 -0
- package/dist/types/progress/types.d.ts.map +1 -0
- package/dist/types/qrcode/QRCode.d.ts +17 -0
- package/dist/types/qrcode/QRCode.d.ts.map +1 -0
- package/dist/types/qrcode/index.d.ts +3 -0
- package/dist/types/qrcode/index.d.ts.map +1 -0
- package/dist/types/qrcode/types.d.ts +49 -0
- package/dist/types/qrcode/types.d.ts.map +1 -0
- package/dist/types/qrcode/utils.d.ts +34 -0
- package/dist/types/qrcode/utils.d.ts.map +1 -0
- package/dist/types/radio/Radio.d.ts +5 -0
- package/dist/types/radio/Radio.d.ts.map +1 -0
- package/dist/types/radio/RadioGroup.d.ts +8 -0
- package/dist/types/radio/RadioGroup.d.ts.map +1 -0
- package/dist/types/radio/index.d.ts +4 -0
- package/dist/types/radio/index.d.ts.map +1 -0
- package/dist/types/radio/types.d.ts +53 -0
- package/dist/types/radio/types.d.ts.map +1 -0
- package/dist/types/radio/utils.d.ts +14 -0
- package/dist/types/radio/utils.d.ts.map +1 -0
- package/dist/types/rate/Rate.d.ts +5 -0
- package/dist/types/rate/Rate.d.ts.map +1 -0
- package/dist/types/rate/index.d.ts +3 -0
- package/dist/types/rate/index.d.ts.map +1 -0
- package/dist/types/rate/types.d.ts +37 -0
- package/dist/types/rate/types.d.ts.map +1 -0
- package/dist/types/rate/utils.d.ts +15 -0
- package/dist/types/rate/utils.d.ts.map +1 -0
- package/dist/types/segmented/Segmented.d.ts +15 -0
- package/dist/types/segmented/Segmented.d.ts.map +1 -0
- package/dist/types/segmented/index.d.ts +3 -0
- package/dist/types/segmented/index.d.ts.map +1 -0
- package/dist/types/segmented/types.d.ts +33 -0
- package/dist/types/segmented/types.d.ts.map +1 -0
- package/dist/types/select/Select.d.ts +17 -0
- package/dist/types/select/Select.d.ts.map +1 -0
- package/dist/types/select/_components/SelectPanel.d.ts +34 -0
- package/dist/types/select/_components/SelectPanel.d.ts.map +1 -0
- package/dist/types/select/index.d.ts +3 -0
- package/dist/types/select/index.d.ts.map +1 -0
- package/dist/types/select/types.d.ts +82 -0
- package/dist/types/select/types.d.ts.map +1 -0
- package/dist/types/select/useSelectState.d.ts +29 -0
- package/dist/types/select/useSelectState.d.ts.map +1 -0
- package/dist/types/select/utils.d.ts +39 -0
- package/dist/types/select/utils.d.ts.map +1 -0
- package/dist/types/skeleton/Skeleton.d.ts +10 -0
- package/dist/types/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/types/skeleton/SkeletonButton.d.ts +13 -0
- package/dist/types/skeleton/SkeletonButton.d.ts.map +1 -0
- package/dist/types/skeleton/SkeletonInput.d.ts +9 -0
- package/dist/types/skeleton/SkeletonInput.d.ts.map +1 -0
- package/dist/types/skeleton/index.d.ts +7 -0
- package/dist/types/skeleton/index.d.ts.map +1 -0
- package/dist/types/skeleton/types.d.ts +46 -0
- package/dist/types/skeleton/types.d.ts.map +1 -0
- package/dist/types/skeleton/utils.d.ts +12 -0
- package/dist/types/skeleton/utils.d.ts.map +1 -0
- package/dist/types/slider/Slider.d.ts +5 -0
- package/dist/types/slider/Slider.d.ts.map +1 -0
- package/dist/types/slider/index.d.ts +3 -0
- package/dist/types/slider/index.d.ts.map +1 -0
- package/dist/types/slider/types.d.ts +52 -0
- package/dist/types/slider/types.d.ts.map +1 -0
- package/dist/types/slider/utils.d.ts +15 -0
- package/dist/types/slider/utils.d.ts.map +1 -0
- package/dist/types/splitter/Splitter.d.ts +22 -0
- package/dist/types/splitter/Splitter.d.ts.map +1 -0
- package/dist/types/splitter/index.d.ts +3 -0
- package/dist/types/splitter/index.d.ts.map +1 -0
- package/dist/types/splitter/types.d.ts +50 -0
- package/dist/types/splitter/types.d.ts.map +1 -0
- package/dist/types/splitter/utils.d.ts +33 -0
- package/dist/types/splitter/utils.d.ts.map +1 -0
- package/dist/types/statistic/Statistic.d.ts +23 -0
- package/dist/types/statistic/Statistic.d.ts.map +1 -0
- package/dist/types/statistic/index.d.ts +3 -0
- package/dist/types/statistic/index.d.ts.map +1 -0
- package/dist/types/statistic/types.d.ts +72 -0
- package/dist/types/statistic/types.d.ts.map +1 -0
- package/dist/types/statistic/utils.d.ts +34 -0
- package/dist/types/statistic/utils.d.ts.map +1 -0
- package/dist/types/steps/Steps.d.ts +5 -0
- package/dist/types/steps/Steps.d.ts.map +1 -0
- package/dist/types/steps/_components/StepsContent.d.ts +19 -0
- package/dist/types/steps/_components/StepsContent.d.ts.map +1 -0
- package/dist/types/steps/index.d.ts +5 -0
- package/dist/types/steps/index.d.ts.map +1 -0
- package/dist/types/steps/types.d.ts +90 -0
- package/dist/types/steps/types.d.ts.map +1 -0
- package/dist/types/steps/utils.d.ts +25 -0
- package/dist/types/steps/utils.d.ts.map +1 -0
- package/dist/types/switch/Switch.d.ts +14 -0
- package/dist/types/switch/Switch.d.ts.map +1 -0
- package/dist/types/switch/index.d.ts +3 -0
- package/dist/types/switch/index.d.ts.map +1 -0
- package/dist/types/switch/types.d.ts +19 -0
- package/dist/types/switch/types.d.ts.map +1 -0
- package/dist/types/switch/utils.d.ts +11 -0
- package/dist/types/switch/utils.d.ts.map +1 -0
- package/dist/types/table/Table.d.ts +26 -0
- package/dist/types/table/Table.d.ts.map +1 -0
- package/dist/types/table/_components/TableAccordion.d.ts +16 -0
- package/dist/types/table/_components/TableAccordion.d.ts.map +1 -0
- package/dist/types/table/_components/TableBody.d.ts +16 -0
- package/dist/types/table/_components/TableBody.d.ts.map +1 -0
- package/dist/types/table/_components/TableCellSkeleton.d.ts +12 -0
- package/dist/types/table/_components/TableCellSkeleton.d.ts.map +1 -0
- package/dist/types/table/_components/TableEditDrawer.d.ts +18 -0
- package/dist/types/table/_components/TableEditDrawer.d.ts.map +1 -0
- package/dist/types/table/_components/TableHeader.d.ts +19 -0
- package/dist/types/table/_components/TableHeader.d.ts.map +1 -0
- package/dist/types/table/_components/TableInfoValue.d.ts +17 -0
- package/dist/types/table/_components/TableInfoValue.d.ts.map +1 -0
- package/dist/types/table/_components/TablePagination.d.ts +21 -0
- package/dist/types/table/_components/TablePagination.d.ts.map +1 -0
- package/dist/types/table/_components/TableRowActions.d.ts +22 -0
- package/dist/types/table/_components/TableRowActions.d.ts.map +1 -0
- package/dist/types/table/index.d.ts +3 -0
- package/dist/types/table/index.d.ts.map +1 -0
- package/dist/types/table/types.d.ts +101 -0
- package/dist/types/table/types.d.ts.map +1 -0
- package/dist/types/table/utils.d.ts +27 -0
- package/dist/types/table/utils.d.ts.map +1 -0
- package/dist/types/tabs/Tabs.d.ts +13 -0
- package/dist/types/tabs/Tabs.d.ts.map +1 -0
- package/dist/types/tabs/_components/TabsContent.d.ts +9 -0
- package/dist/types/tabs/_components/TabsContent.d.ts.map +1 -0
- package/dist/types/tabs/_components/TabsList.d.ts +16 -0
- package/dist/types/tabs/_components/TabsList.d.ts.map +1 -0
- package/dist/types/tabs/_components/TabsTrigger.d.ts +12 -0
- package/dist/types/tabs/_components/TabsTrigger.d.ts.map +1 -0
- package/dist/types/tabs/index.d.ts +6 -0
- package/dist/types/tabs/index.d.ts.map +1 -0
- package/dist/types/tabs/types.d.ts +91 -0
- package/dist/types/tabs/types.d.ts.map +1 -0
- package/dist/types/tabs/useTabs.d.ts +10 -0
- package/dist/types/tabs/useTabs.d.ts.map +1 -0
- package/dist/types/tabs/utils.d.ts +20 -0
- package/dist/types/tabs/utils.d.ts.map +1 -0
- package/dist/types/tag/Tag.d.ts +5 -0
- package/dist/types/tag/Tag.d.ts.map +1 -0
- package/dist/types/tag/index.d.ts +3 -0
- package/dist/types/tag/index.d.ts.map +1 -0
- package/dist/types/tag/types.d.ts +18 -0
- package/dist/types/tag/types.d.ts.map +1 -0
- package/dist/types/tag/utils.d.ts +13 -0
- package/dist/types/tag/utils.d.ts.map +1 -0
- package/dist/types/theme-customizer/ThemeCustomizer.d.ts +17 -0
- package/dist/types/theme-customizer/ThemeCustomizer.d.ts.map +1 -0
- package/dist/types/theme-customizer/applyTheme.d.ts +16 -0
- package/dist/types/theme-customizer/applyTheme.d.ts.map +1 -0
- package/dist/types/theme-customizer/index.d.ts +8 -0
- package/dist/types/theme-customizer/index.d.ts.map +1 -0
- package/dist/types/theme-customizer/types.d.ts +37 -0
- package/dist/types/theme-customizer/types.d.ts.map +1 -0
- package/dist/types/timeline/Timeline.d.ts +15 -0
- package/dist/types/timeline/Timeline.d.ts.map +1 -0
- package/dist/types/timeline/index.d.ts +3 -0
- package/dist/types/timeline/index.d.ts.map +1 -0
- package/dist/types/timeline/types.d.ts +53 -0
- package/dist/types/timeline/types.d.ts.map +1 -0
- package/dist/types/timeline/utils.d.ts +13 -0
- package/dist/types/timeline/utils.d.ts.map +1 -0
- package/dist/types/toast/Toast.d.ts +19 -0
- package/dist/types/toast/Toast.d.ts.map +1 -0
- package/dist/types/toast/index.d.ts +4 -0
- package/dist/types/toast/index.d.ts.map +1 -0
- package/dist/types/toast/types.d.ts +43 -0
- package/dist/types/toast/types.d.ts.map +1 -0
- package/dist/types/toast/useToast.d.ts +26 -0
- package/dist/types/toast/useToast.d.ts.map +1 -0
- package/dist/types/toast/utils.d.ts +12 -0
- package/dist/types/toast/utils.d.ts.map +1 -0
- package/dist/types/tooltip/Tooltip.d.ts +5 -0
- package/dist/types/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/types/tooltip/index.d.ts +3 -0
- package/dist/types/tooltip/index.d.ts.map +1 -0
- package/dist/types/tooltip/types.d.ts +32 -0
- package/dist/types/tooltip/types.d.ts.map +1 -0
- package/dist/types/tooltip/utils.d.ts +12 -0
- package/dist/types/tooltip/utils.d.ts.map +1 -0
- package/dist/types/tour/Tour.d.ts +18 -0
- package/dist/types/tour/Tour.d.ts.map +1 -0
- package/dist/types/tour/index.d.ts +3 -0
- package/dist/types/tour/index.d.ts.map +1 -0
- package/dist/types/tour/types.d.ts +46 -0
- package/dist/types/tour/types.d.ts.map +1 -0
- package/dist/types/tour/utils.d.ts +18 -0
- package/dist/types/tour/utils.d.ts.map +1 -0
- package/dist/types/transfer/Transfer.d.ts +16 -0
- package/dist/types/transfer/Transfer.d.ts.map +1 -0
- package/dist/types/transfer/_components/TransferList.d.ts +32 -0
- package/dist/types/transfer/_components/TransferList.d.ts.map +1 -0
- package/dist/types/transfer/index.d.ts +3 -0
- package/dist/types/transfer/index.d.ts.map +1 -0
- package/dist/types/transfer/types.d.ts +67 -0
- package/dist/types/transfer/types.d.ts.map +1 -0
- package/dist/types/transfer/utils.d.ts +34 -0
- package/dist/types/transfer/utils.d.ts.map +1 -0
- package/dist/types/tree/Tree.d.ts +59 -0
- package/dist/types/tree/Tree.d.ts.map +1 -0
- package/dist/types/tree/index.d.ts +5 -0
- package/dist/types/tree/index.d.ts.map +1 -0
- package/dist/types/tree/types.d.ts +92 -0
- package/dist/types/tree/types.d.ts.map +1 -0
- package/dist/types/tree/utils.d.ts +66 -0
- package/dist/types/tree/utils.d.ts.map +1 -0
- package/dist/types/tree-select/TreeSelect.d.ts +18 -0
- package/dist/types/tree-select/TreeSelect.d.ts.map +1 -0
- package/dist/types/tree-select/_components/TreeSelectPanel.d.ts +27 -0
- package/dist/types/tree-select/_components/TreeSelectPanel.d.ts.map +1 -0
- package/dist/types/tree-select/index.d.ts +3 -0
- package/dist/types/tree-select/index.d.ts.map +1 -0
- package/dist/types/tree-select/types.d.ts +87 -0
- package/dist/types/tree-select/types.d.ts.map +1 -0
- package/dist/types/tree-select/useTreeSelectState.d.ts +38 -0
- package/dist/types/tree-select/useTreeSelectState.d.ts.map +1 -0
- package/dist/types/tree-select/utils.d.ts +28 -0
- package/dist/types/tree-select/utils.d.ts.map +1 -0
- package/dist/types/typewriter/Typewriter.d.ts +16 -0
- package/dist/types/typewriter/Typewriter.d.ts.map +1 -0
- package/dist/types/typewriter/index.d.ts +3 -0
- package/dist/types/typewriter/index.d.ts.map +1 -0
- package/dist/types/typewriter/types.d.ts +33 -0
- package/dist/types/typewriter/types.d.ts.map +1 -0
- package/dist/types/typewriter/useTypewriter.d.ts +29 -0
- package/dist/types/typewriter/useTypewriter.d.ts.map +1 -0
- package/dist/types/typography/Typography.d.ts +6 -0
- package/dist/types/typography/Typography.d.ts.map +1 -0
- package/dist/types/typography/index.d.ts +3 -0
- package/dist/types/typography/index.d.ts.map +1 -0
- package/dist/types/typography/types.d.ts +38 -0
- package/dist/types/typography/types.d.ts.map +1 -0
- package/dist/types/typography/utils.d.ts +10 -0
- package/dist/types/typography/utils.d.ts.map +1 -0
- package/dist/types/upload/Upload.d.ts +5 -0
- package/dist/types/upload/Upload.d.ts.map +1 -0
- package/dist/types/upload/_components/List.d.ts +15 -0
- package/dist/types/upload/_components/List.d.ts.map +1 -0
- package/dist/types/upload/_components/ReviewList.d.ts +17 -0
- package/dist/types/upload/_components/ReviewList.d.ts.map +1 -0
- package/dist/types/upload/_components/UploadDragDropButton.d.ts +16 -0
- package/dist/types/upload/_components/UploadDragDropButton.d.ts.map +1 -0
- package/dist/types/upload/_components/UploadListButton.d.ts +7 -0
- package/dist/types/upload/_components/UploadListButton.d.ts.map +1 -0
- package/dist/types/upload/_components/UploadReviewButton.d.ts +14 -0
- package/dist/types/upload/_components/UploadReviewButton.d.ts.map +1 -0
- package/dist/types/upload/index.d.ts +3 -0
- package/dist/types/upload/index.d.ts.map +1 -0
- package/dist/types/upload/types.d.ts +30 -0
- package/dist/types/upload/types.d.ts.map +1 -0
- package/dist/types/upload/useUpload.d.ts +24 -0
- package/dist/types/upload/useUpload.d.ts.map +1 -0
- package/dist/types/upload/utils.d.ts +23 -0
- package/dist/types/upload/utils.d.ts.map +1 -0
- package/dist/typewriter.d.ts +1 -0
- package/dist/typewriter.js +139 -0
- package/dist/typewriter.js.map +1 -0
- package/dist/typography.d.ts +1 -0
- package/dist/typography.js +81 -0
- package/dist/typography.js.map +1 -0
- package/dist/upload.d.ts +1 -0
- package/dist/upload.js +370 -0
- package/dist/upload.js.map +1 -0
- package/package.json +325 -3
|
@@ -0,0 +1,935 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
SelectPanel,
|
|
5
|
+
foldForSearch,
|
|
6
|
+
optionDomId
|
|
7
|
+
} from "./chunk-YZ7MDC6B.js";
|
|
8
|
+
import {
|
|
9
|
+
ClearButton,
|
|
10
|
+
PasswordToggle,
|
|
11
|
+
clearIconOf
|
|
12
|
+
} from "./chunk-KSPM2Z3T.js";
|
|
13
|
+
import {
|
|
14
|
+
FIELD_BASE_CLASS,
|
|
15
|
+
FIELD_DISABLED_CLASS,
|
|
16
|
+
FIELD_MOBILE_TEXT_CLASS,
|
|
17
|
+
clearNativeValue,
|
|
18
|
+
getShapeClasses,
|
|
19
|
+
getSizeClasses,
|
|
20
|
+
getTextareaSizeClasses,
|
|
21
|
+
getVariantClasses,
|
|
22
|
+
isClearable
|
|
23
|
+
} from "./chunk-DUCIAQGR.js";
|
|
24
|
+
import {
|
|
25
|
+
FieldContext,
|
|
26
|
+
useFieldControl,
|
|
27
|
+
useFieldGroup,
|
|
28
|
+
useFieldSkeleton
|
|
29
|
+
} from "./chunk-LBQMEHK6.js";
|
|
30
|
+
import {
|
|
31
|
+
touchTargetClass
|
|
32
|
+
} from "./chunk-FFXRFQSU.js";
|
|
33
|
+
import {
|
|
34
|
+
skeletonBoxProps
|
|
35
|
+
} from "./chunk-54HHEXXD.js";
|
|
36
|
+
|
|
37
|
+
// src/input/Input.tsx
|
|
38
|
+
import React, { forwardRef, useState as useState2 } from "react";
|
|
39
|
+
import { InputMask } from "@react-input/mask";
|
|
40
|
+
import { cn, useControllableState } from "@mari-ui/core";
|
|
41
|
+
|
|
42
|
+
// src/input/mention/useMention.tsx
|
|
43
|
+
import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
44
|
+
|
|
45
|
+
// src/input/mention/caret.ts
|
|
46
|
+
var MIRROR_PROPS = [
|
|
47
|
+
"boxSizing",
|
|
48
|
+
"width",
|
|
49
|
+
"height",
|
|
50
|
+
"overflowX",
|
|
51
|
+
"overflowY",
|
|
52
|
+
"borderTopWidth",
|
|
53
|
+
"borderRightWidth",
|
|
54
|
+
"borderBottomWidth",
|
|
55
|
+
"borderLeftWidth",
|
|
56
|
+
"paddingTop",
|
|
57
|
+
"paddingRight",
|
|
58
|
+
"paddingBottom",
|
|
59
|
+
"paddingLeft",
|
|
60
|
+
"fontStyle",
|
|
61
|
+
"fontVariant",
|
|
62
|
+
"fontWeight",
|
|
63
|
+
"fontStretch",
|
|
64
|
+
"fontSize",
|
|
65
|
+
"lineHeight",
|
|
66
|
+
"fontFamily",
|
|
67
|
+
"textAlign",
|
|
68
|
+
"textTransform",
|
|
69
|
+
"textIndent",
|
|
70
|
+
"letterSpacing",
|
|
71
|
+
"wordSpacing",
|
|
72
|
+
"tabSize"
|
|
73
|
+
];
|
|
74
|
+
function getCaretRect(el, position) {
|
|
75
|
+
const style = getComputedStyle(el);
|
|
76
|
+
const mirror = document.createElement("div");
|
|
77
|
+
const isInput = el.nodeName === "INPUT";
|
|
78
|
+
for (const prop of MIRROR_PROPS) mirror.style[prop] = style[prop];
|
|
79
|
+
Object.assign(mirror.style, {
|
|
80
|
+
position: "absolute",
|
|
81
|
+
visibility: "hidden",
|
|
82
|
+
top: "0",
|
|
83
|
+
left: "-9999px",
|
|
84
|
+
whiteSpace: isInput ? "pre" : "pre-wrap",
|
|
85
|
+
overflowWrap: "break-word",
|
|
86
|
+
overflow: "hidden"
|
|
87
|
+
});
|
|
88
|
+
mirror.textContent = el.value.slice(0, position);
|
|
89
|
+
const marker = document.createElement("span");
|
|
90
|
+
marker.textContent = el.value.slice(position) || ".";
|
|
91
|
+
mirror.appendChild(marker);
|
|
92
|
+
document.body.appendChild(mirror);
|
|
93
|
+
const rect = el.getBoundingClientRect();
|
|
94
|
+
const lineHeight = Number.parseFloat(style.lineHeight) || Number.parseFloat(style.fontSize) * 1.25;
|
|
95
|
+
const top = rect.top + marker.offsetTop + Number.parseFloat(style.borderTopWidth) - el.scrollTop;
|
|
96
|
+
const left = rect.left + marker.offsetLeft + Number.parseFloat(style.borderLeftWidth) - el.scrollLeft;
|
|
97
|
+
mirror.remove();
|
|
98
|
+
return { top, left: Math.min(left, rect.right), height: lineHeight };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/input/mention/utils.ts
|
|
102
|
+
var isSpace = (ch) => ch !== void 0 && /\s/.test(ch);
|
|
103
|
+
function findMention(text, caret, prefixes) {
|
|
104
|
+
const before = text.slice(0, caret);
|
|
105
|
+
let best = null;
|
|
106
|
+
for (const prefix of prefixes) {
|
|
107
|
+
const start = before.lastIndexOf(prefix);
|
|
108
|
+
if (start === -1) continue;
|
|
109
|
+
if (start > 0 && !isSpace(before[start - 1])) continue;
|
|
110
|
+
const query = before.slice(start + prefix.length);
|
|
111
|
+
if (/\s/.test(query)) continue;
|
|
112
|
+
if (!best || start > best.start) best = { prefix, start, query };
|
|
113
|
+
}
|
|
114
|
+
return best;
|
|
115
|
+
}
|
|
116
|
+
function insertMention(text, match, caret, value, split) {
|
|
117
|
+
const head = text.slice(0, match.start) + match.prefix + value;
|
|
118
|
+
const tail = text.slice(caret);
|
|
119
|
+
const sep = split && !tail.startsWith(split) ? split : "";
|
|
120
|
+
return { text: head + sep + tail, caret: head.length + (split ? split.length : 0) };
|
|
121
|
+
}
|
|
122
|
+
function mentionText(option) {
|
|
123
|
+
if (option.searchText !== void 0) return option.searchText;
|
|
124
|
+
const label = typeof option.label === "string" ? option.label : "";
|
|
125
|
+
return `${option.value} ${label}`;
|
|
126
|
+
}
|
|
127
|
+
function filterMentionOptions(options, query, filterOption) {
|
|
128
|
+
if (filterOption === false) return [...options];
|
|
129
|
+
if (filterOption) return options.filter((o) => filterOption(query, o));
|
|
130
|
+
const q = foldForSearch(query);
|
|
131
|
+
return q ? options.filter((o) => foldForSearch(mentionText(o)).includes(q)) : [...options];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// src/input/mention/useMention.tsx
|
|
135
|
+
import { jsx } from "react/jsx-runtime";
|
|
136
|
+
var GAP_PX = 4;
|
|
137
|
+
var EDGE_PX = 8;
|
|
138
|
+
var PANEL_WIDTH_REM = 16;
|
|
139
|
+
var toSelectOption = (o) => ({ value: o.value, label: o.label ?? o.value, icon: o.icon, description: o.description, disabled: o.disabled });
|
|
140
|
+
function setNativeValue(el, text) {
|
|
141
|
+
const proto = el instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype;
|
|
142
|
+
Object.getOwnPropertyDescriptor(proto, "value")?.set?.call(el, text);
|
|
143
|
+
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
144
|
+
}
|
|
145
|
+
function nextEnabled(options, from, step) {
|
|
146
|
+
const n = options.length;
|
|
147
|
+
for (let i = 1; i <= n; i++) {
|
|
148
|
+
const idx = ((from + step * i) % n + n) % n;
|
|
149
|
+
if (!options[idx].disabled) return idx;
|
|
150
|
+
}
|
|
151
|
+
return -1;
|
|
152
|
+
}
|
|
153
|
+
function resolveOptions(config, match) {
|
|
154
|
+
if (!config || !match) return [];
|
|
155
|
+
const all = typeof config.options === "function" ? config.options(match.prefix) : config.options;
|
|
156
|
+
return filterMentionOptions(all, match.query, config.filterOption);
|
|
157
|
+
}
|
|
158
|
+
function useCaretPosition(open, elRef, panelRef, match, deps) {
|
|
159
|
+
const [coords, setCoords] = useState(null);
|
|
160
|
+
useLayoutEffect(() => {
|
|
161
|
+
if (!open || !match) {
|
|
162
|
+
setCoords(null);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const measure = () => {
|
|
166
|
+
const el = elRef.current;
|
|
167
|
+
const panel = panelRef.current;
|
|
168
|
+
if (!el) return;
|
|
169
|
+
const caret = getCaretRect(el, match.start);
|
|
170
|
+
const width = panel?.offsetWidth ?? 0;
|
|
171
|
+
const height = panel?.offsetHeight ?? 0;
|
|
172
|
+
let top = caret.top + caret.height + GAP_PX;
|
|
173
|
+
if (top + height > window.innerHeight - EDGE_PX && caret.top - GAP_PX - height > EDGE_PX) top = caret.top - GAP_PX - height;
|
|
174
|
+
const left = Math.max(EDGE_PX, Math.min(caret.left, window.innerWidth - width - EDGE_PX));
|
|
175
|
+
setCoords({ top, left, side: "bottom", arrowOffset: 0, anchorWidth: PANEL_WIDTH_REM * Number.parseFloat(getComputedStyle(document.documentElement).fontSize) });
|
|
176
|
+
};
|
|
177
|
+
measure();
|
|
178
|
+
const raf = requestAnimationFrame(measure);
|
|
179
|
+
window.addEventListener("scroll", measure, true);
|
|
180
|
+
window.addEventListener("resize", measure);
|
|
181
|
+
return () => {
|
|
182
|
+
cancelAnimationFrame(raf);
|
|
183
|
+
window.removeEventListener("scroll", measure, true);
|
|
184
|
+
window.removeEventListener("resize", measure);
|
|
185
|
+
};
|
|
186
|
+
}, [open, match?.start, match?.prefix, deps]);
|
|
187
|
+
return coords;
|
|
188
|
+
}
|
|
189
|
+
function useMention(config, elRef, value, kind) {
|
|
190
|
+
const enabled = config !== void 0;
|
|
191
|
+
const prefixes = useMemo(() => {
|
|
192
|
+
const p = config?.prefix ?? "@";
|
|
193
|
+
return Array.isArray(p) ? p : [p];
|
|
194
|
+
}, [config?.prefix]);
|
|
195
|
+
const split = config?.split ?? " ";
|
|
196
|
+
const [match, setMatch] = useState(null);
|
|
197
|
+
const [dismissedAt, setDismissedAt] = useState(null);
|
|
198
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
199
|
+
const panelRef = useRef(null);
|
|
200
|
+
const listboxId = useId();
|
|
201
|
+
const lastQuery = useRef(null);
|
|
202
|
+
const options = useMemo(() => resolveOptions(config, match), [config, match]);
|
|
203
|
+
const notFound = config?.notFoundContent === void 0 ? "Sonu\xE7 bulunamad\u0131" : config.notFoundContent;
|
|
204
|
+
const open = enabled && match !== null && dismissedAt !== match.start && (options.length > 0 || !!config?.loading || notFound !== null);
|
|
205
|
+
const selectOptions = useMemo(() => options.map(toSelectOption), [options]);
|
|
206
|
+
const coords = useCaretPosition(open, elRef, panelRef, match, options.length);
|
|
207
|
+
const sync = () => {
|
|
208
|
+
const el = elRef.current;
|
|
209
|
+
if (!enabled || !el) return;
|
|
210
|
+
const caret = el.selectionStart;
|
|
211
|
+
const next = caret !== null && caret === el.selectionEnd ? findMention(el.value, caret, prefixes) : null;
|
|
212
|
+
setMatch((prev) => prev?.start === next?.start && prev?.query === next?.query && prev?.prefix === next?.prefix ? prev : next);
|
|
213
|
+
if (!next) setDismissedAt(null);
|
|
214
|
+
};
|
|
215
|
+
useEffect(sync, [value, enabled]);
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
setActiveIndex(0);
|
|
218
|
+
const key = match ? `${match.prefix}${match.start}:${match.query}` : null;
|
|
219
|
+
if (match && key !== lastQuery.current) config?.onSearch?.(match.query, match.prefix);
|
|
220
|
+
lastQuery.current = key;
|
|
221
|
+
}, [match]);
|
|
222
|
+
const activeId = open && options[activeIndex] ? optionDomId(listboxId, selectOptions[activeIndex]) : void 0;
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
if (activeId) document.getElementById(activeId)?.scrollIntoView?.({ block: "nearest" });
|
|
225
|
+
}, [activeId]);
|
|
226
|
+
const choose = (option) => {
|
|
227
|
+
const el = elRef.current;
|
|
228
|
+
if (!el || !match || option.disabled) return;
|
|
229
|
+
const caret = el.selectionStart ?? el.value.length;
|
|
230
|
+
const result = insertMention(el.value, match, caret, option.value, split);
|
|
231
|
+
setNativeValue(el, result.text);
|
|
232
|
+
el.setSelectionRange(result.caret, result.caret);
|
|
233
|
+
requestAnimationFrame(() => el.setSelectionRange(result.caret, result.caret));
|
|
234
|
+
setMatch(null);
|
|
235
|
+
config?.onSelect?.(option, match.prefix);
|
|
236
|
+
};
|
|
237
|
+
const handleKeyDown = (e) => {
|
|
238
|
+
if (!open || !match) return false;
|
|
239
|
+
const active = options[activeIndex];
|
|
240
|
+
switch (e.key) {
|
|
241
|
+
case "ArrowDown":
|
|
242
|
+
case "ArrowUp": {
|
|
243
|
+
e.preventDefault();
|
|
244
|
+
if (options.length) setActiveIndex((i) => Math.max(0, nextEnabled(options, i, e.key === "ArrowDown" ? 1 : -1)));
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
case "Enter":
|
|
248
|
+
case "Tab":
|
|
249
|
+
if (!active || active.disabled) return false;
|
|
250
|
+
e.preventDefault();
|
|
251
|
+
choose(active);
|
|
252
|
+
return true;
|
|
253
|
+
case "Escape":
|
|
254
|
+
e.preventDefault();
|
|
255
|
+
e.stopPropagation();
|
|
256
|
+
setDismissedAt(match.start);
|
|
257
|
+
return true;
|
|
258
|
+
default:
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const controlProps = enabled ? {
|
|
263
|
+
...kind === "input" ? { role: "combobox", "aria-expanded": open } : {},
|
|
264
|
+
"aria-autocomplete": "list",
|
|
265
|
+
"aria-controls": open ? listboxId : void 0,
|
|
266
|
+
"aria-activedescendant": activeId,
|
|
267
|
+
onKeyUp: (e) => {
|
|
268
|
+
if (["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) sync();
|
|
269
|
+
},
|
|
270
|
+
onClick: sync
|
|
271
|
+
} : {};
|
|
272
|
+
const panel = open ? /* @__PURE__ */ jsx(
|
|
273
|
+
SelectPanel,
|
|
274
|
+
{
|
|
275
|
+
ref: panelRef,
|
|
276
|
+
listboxId,
|
|
277
|
+
coords,
|
|
278
|
+
sections: [{ key: "mentions", options: selectOptions }],
|
|
279
|
+
flatOptions: selectOptions,
|
|
280
|
+
activeIndex,
|
|
281
|
+
isSelected: () => false,
|
|
282
|
+
multiple: false,
|
|
283
|
+
loading: !!config?.loading,
|
|
284
|
+
notFoundContent: notFound,
|
|
285
|
+
listHeight: config?.listHeight ?? "14rem",
|
|
286
|
+
label: config?.listLabel ?? "\xD6neriler",
|
|
287
|
+
onPick: (o) => {
|
|
288
|
+
const option = options.find((m) => m.value === o.value);
|
|
289
|
+
if (option) choose(option);
|
|
290
|
+
},
|
|
291
|
+
onHover: setActiveIndex
|
|
292
|
+
}
|
|
293
|
+
) : null;
|
|
294
|
+
return { controlProps, panel, handleKeyDown, close: () => setMatch(null) };
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// src/input/Input.tsx
|
|
298
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
299
|
+
var Input = forwardRef((outerProps, ref) => {
|
|
300
|
+
return /* @__PURE__ */ jsx2(InputInner, { ...useFieldControl(outerProps), forwardedRef: ref });
|
|
301
|
+
});
|
|
302
|
+
Input.displayName = "Input";
|
|
303
|
+
var InputInner = ({
|
|
304
|
+
forwardedRef: ref,
|
|
305
|
+
placeholder,
|
|
306
|
+
allowClear = false,
|
|
307
|
+
clearLabel = "Temizle",
|
|
308
|
+
skeleton = false,
|
|
309
|
+
classNames = {},
|
|
310
|
+
className = "",
|
|
311
|
+
style,
|
|
312
|
+
count,
|
|
313
|
+
defaultValue = "",
|
|
314
|
+
disabled = false,
|
|
315
|
+
id,
|
|
316
|
+
maxLength,
|
|
317
|
+
icon,
|
|
318
|
+
iconPosition = "start",
|
|
319
|
+
showCount,
|
|
320
|
+
color,
|
|
321
|
+
size = "md",
|
|
322
|
+
shape = "default",
|
|
323
|
+
type = "text",
|
|
324
|
+
value,
|
|
325
|
+
variant = "outline",
|
|
326
|
+
onChange,
|
|
327
|
+
onPressEnter,
|
|
328
|
+
onClear,
|
|
329
|
+
onFocus,
|
|
330
|
+
onBlur,
|
|
331
|
+
onKeyDown,
|
|
332
|
+
onInput,
|
|
333
|
+
onPaste,
|
|
334
|
+
mask,
|
|
335
|
+
replacement = { _: /\d/ },
|
|
336
|
+
visibilityToggle,
|
|
337
|
+
visibilityIconRender,
|
|
338
|
+
max,
|
|
339
|
+
min,
|
|
340
|
+
mentions,
|
|
341
|
+
...nativeProps
|
|
342
|
+
}) => {
|
|
343
|
+
const innerRef = React.useRef(null);
|
|
344
|
+
const setRefs = (el) => {
|
|
345
|
+
innerRef.current = el;
|
|
346
|
+
if (typeof ref === "function") ref(el);
|
|
347
|
+
else if (ref) ref.current = el;
|
|
348
|
+
};
|
|
349
|
+
const ariaInvalid = nativeProps["aria-invalid"] ?? (color === "error" || void 0);
|
|
350
|
+
const [currentValue, setCurrentValue] = useControllableState({ value, defaultValue });
|
|
351
|
+
const [passwordVisible, setPasswordVisible] = useState2(false);
|
|
352
|
+
const showPasswordToggle = type === "password" && visibilityToggle !== false;
|
|
353
|
+
let inputType = type;
|
|
354
|
+
if (showPasswordToggle) inputType = passwordVisible ? "text" : "password";
|
|
355
|
+
const charCount = currentValue.length;
|
|
356
|
+
const countLabel = maxLength ? `${charCount} / ${maxLength}` : `${charCount}`;
|
|
357
|
+
const showClear = isClearable(allowClear) && Boolean(currentValue) && !disabled;
|
|
358
|
+
const handleChange = (e) => {
|
|
359
|
+
setCurrentValue(e.target.value);
|
|
360
|
+
onChange?.(e);
|
|
361
|
+
};
|
|
362
|
+
const mention = useMention(mask ? void 0 : mentions, innerRef, currentValue, "input");
|
|
363
|
+
const handleKeyDown = (e) => {
|
|
364
|
+
const handledByMention = mention.handleKeyDown(e);
|
|
365
|
+
if (e.key === "Enter" && !handledByMention) onPressEnter?.(e);
|
|
366
|
+
onKeyDown?.(e);
|
|
367
|
+
};
|
|
368
|
+
const handleClear = () => {
|
|
369
|
+
clearNativeValue(innerRef.current);
|
|
370
|
+
onClear?.();
|
|
371
|
+
innerRef.current?.focus();
|
|
372
|
+
};
|
|
373
|
+
const geometryClass = cn("flex w-full items-center gap-2", getSizeClasses(size), getShapeClasses(shape, variant));
|
|
374
|
+
if (skeleton) {
|
|
375
|
+
return /* @__PURE__ */ jsx2("div", { ...skeletonBoxProps(cn(geometryClass, classNames.wrapper, className)), style });
|
|
376
|
+
}
|
|
377
|
+
const wrapperClass = cn(
|
|
378
|
+
geometryClass,
|
|
379
|
+
"group relative cursor-text",
|
|
380
|
+
touchTargetClass[size],
|
|
381
|
+
FIELD_BASE_CLASS,
|
|
382
|
+
getVariantClasses(variant, color),
|
|
383
|
+
disabled && FIELD_DISABLED_CLASS,
|
|
384
|
+
classNames.wrapper,
|
|
385
|
+
className
|
|
386
|
+
);
|
|
387
|
+
const adornmentClass = "flex shrink-0 items-center text-mari-muted";
|
|
388
|
+
const handleWrapperMouseDown = (e) => {
|
|
389
|
+
const target = e.target;
|
|
390
|
+
if (disabled || innerRef.current?.contains(target) || target.closest("button")) return;
|
|
391
|
+
e.preventDefault();
|
|
392
|
+
innerRef.current?.focus();
|
|
393
|
+
};
|
|
394
|
+
const inputClass = cn("w-full min-w-0 flex-grow bg-transparent placeholder:text-mari-muted focus:outline-none disabled:cursor-not-allowed", FIELD_MOBILE_TEXT_CLASS, classNames.input);
|
|
395
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
396
|
+
/* @__PURE__ */ jsxs("div", { className: wrapperClass, style, onMouseDown: handleWrapperMouseDown, children: [
|
|
397
|
+
icon && iconPosition === "start" && /* @__PURE__ */ jsx2("span", { className: cn(adornmentClass, classNames.icon), children: icon }),
|
|
398
|
+
mask ? /* @__PURE__ */ jsx2(
|
|
399
|
+
InputMask,
|
|
400
|
+
{
|
|
401
|
+
ref: setRefs,
|
|
402
|
+
id,
|
|
403
|
+
mask,
|
|
404
|
+
replacement,
|
|
405
|
+
disabled,
|
|
406
|
+
type: inputType,
|
|
407
|
+
maxLength,
|
|
408
|
+
placeholder,
|
|
409
|
+
value: currentValue,
|
|
410
|
+
onChange: handleChange,
|
|
411
|
+
onKeyDown: handleKeyDown,
|
|
412
|
+
onFocus,
|
|
413
|
+
onBlur,
|
|
414
|
+
onInput,
|
|
415
|
+
onPaste,
|
|
416
|
+
className: inputClass,
|
|
417
|
+
...nativeProps,
|
|
418
|
+
"aria-invalid": ariaInvalid
|
|
419
|
+
}
|
|
420
|
+
) : /* @__PURE__ */ jsx2(
|
|
421
|
+
"input",
|
|
422
|
+
{
|
|
423
|
+
ref: setRefs,
|
|
424
|
+
id,
|
|
425
|
+
disabled,
|
|
426
|
+
type: inputType,
|
|
427
|
+
maxLength,
|
|
428
|
+
placeholder,
|
|
429
|
+
value: currentValue,
|
|
430
|
+
...mention.controlProps,
|
|
431
|
+
onChange: handleChange,
|
|
432
|
+
onKeyDown: handleKeyDown,
|
|
433
|
+
onFocus,
|
|
434
|
+
onBlur: (e) => {
|
|
435
|
+
mention.close();
|
|
436
|
+
onBlur?.(e);
|
|
437
|
+
},
|
|
438
|
+
onInput,
|
|
439
|
+
onPaste,
|
|
440
|
+
className: inputClass,
|
|
441
|
+
max,
|
|
442
|
+
min,
|
|
443
|
+
...nativeProps,
|
|
444
|
+
"aria-invalid": ariaInvalid
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
allowClear && /* @__PURE__ */ jsx2(ClearButton, { visible: showClear, label: clearLabel, icon: clearIconOf(allowClear), onClear: handleClear, className: classNames.clear }),
|
|
448
|
+
(showCount || count?.formatter) && /* @__PURE__ */ jsx2("span", { className: cn("flex flex-none items-center text-xs tabular-nums text-mari-muted", classNames.count), children: count?.formatter ? count.formatter({ value: currentValue, count: charCount, maxLength }) : countLabel }),
|
|
449
|
+
icon && iconPosition === "end" && /* @__PURE__ */ jsx2("span", { className: cn(adornmentClass, classNames.icon), children: icon }),
|
|
450
|
+
showPasswordToggle && /* @__PURE__ */ jsx2(PasswordToggle, { visible: passwordVisible, disabled, onToggle: () => setPasswordVisible((prev) => !prev), iconRender: visibilityIconRender })
|
|
451
|
+
] }),
|
|
452
|
+
mention.panel
|
|
453
|
+
] });
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
// src/input/Textarea.tsx
|
|
457
|
+
import { forwardRef as forwardRef2, useEffect as useEffect2, useImperativeHandle, useRef as useRef2 } from "react";
|
|
458
|
+
import { cn as cn2, useControllableState as useControllableState2 } from "@mari-ui/core";
|
|
459
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
460
|
+
function fitHeight(el, autoSize) {
|
|
461
|
+
const style = window.getComputedStyle(el);
|
|
462
|
+
const lineHeight = Number.parseFloat(style.lineHeight) || 20;
|
|
463
|
+
const padding = Number.parseFloat(style.paddingTop) + Number.parseFloat(style.paddingBottom);
|
|
464
|
+
const { minRows, maxRows } = typeof autoSize === "object" ? autoSize : {};
|
|
465
|
+
el.style.height = "auto";
|
|
466
|
+
let height = el.scrollHeight;
|
|
467
|
+
if (minRows) height = Math.max(height, minRows * lineHeight + padding);
|
|
468
|
+
if (maxRows) height = Math.min(height, maxRows * lineHeight + padding);
|
|
469
|
+
el.style.height = `${height}px`;
|
|
470
|
+
el.style.overflowY = maxRows && el.scrollHeight > height ? "auto" : "hidden";
|
|
471
|
+
}
|
|
472
|
+
var Textarea = forwardRef2((outerProps, ref) => {
|
|
473
|
+
return /* @__PURE__ */ jsx3(TextareaInner, { ...useFieldControl(outerProps), forwardedRef: ref });
|
|
474
|
+
});
|
|
475
|
+
Textarea.displayName = "Textarea";
|
|
476
|
+
var TextareaInner = ({
|
|
477
|
+
forwardedRef: ref,
|
|
478
|
+
placeholder,
|
|
479
|
+
allowClear = false,
|
|
480
|
+
clearLabel = "Temizle",
|
|
481
|
+
skeleton = false,
|
|
482
|
+
rows = 3,
|
|
483
|
+
readOnly,
|
|
484
|
+
onKeyDown,
|
|
485
|
+
classNames = {},
|
|
486
|
+
className = "",
|
|
487
|
+
count,
|
|
488
|
+
defaultValue = "",
|
|
489
|
+
disabled = false,
|
|
490
|
+
id,
|
|
491
|
+
maxLength,
|
|
492
|
+
showCount,
|
|
493
|
+
color,
|
|
494
|
+
size = "md",
|
|
495
|
+
shape = "default",
|
|
496
|
+
variant = "outline",
|
|
497
|
+
value,
|
|
498
|
+
onChange,
|
|
499
|
+
onClear,
|
|
500
|
+
onFocus,
|
|
501
|
+
onBlur,
|
|
502
|
+
autoSize = false,
|
|
503
|
+
name,
|
|
504
|
+
required,
|
|
505
|
+
"aria-label": ariaLabel,
|
|
506
|
+
"aria-labelledby": ariaLabelledBy,
|
|
507
|
+
"aria-describedby": ariaDescribedBy,
|
|
508
|
+
"aria-invalid": ariaInvalidProp,
|
|
509
|
+
mentions
|
|
510
|
+
}) => {
|
|
511
|
+
const ariaInvalid = ariaInvalidProp ?? (color === "error" || void 0);
|
|
512
|
+
const innerRef = useRef2(null);
|
|
513
|
+
useImperativeHandle(ref, () => innerRef.current);
|
|
514
|
+
const [currentValue, setCurrentValue] = useControllableState2({ value, defaultValue });
|
|
515
|
+
const charCount = currentValue.length;
|
|
516
|
+
const countLabel = maxLength ? `${charCount} / ${maxLength}` : `${charCount}`;
|
|
517
|
+
const showClear = isClearable(allowClear) && Boolean(currentValue) && !disabled;
|
|
518
|
+
const mention = useMention(mentions, innerRef, currentValue, "textarea");
|
|
519
|
+
const handleChange = (e) => {
|
|
520
|
+
setCurrentValue(e.target.value);
|
|
521
|
+
onChange?.(e);
|
|
522
|
+
};
|
|
523
|
+
const handleClear = () => {
|
|
524
|
+
clearNativeValue(innerRef.current);
|
|
525
|
+
onClear?.();
|
|
526
|
+
innerRef.current?.focus();
|
|
527
|
+
};
|
|
528
|
+
const initialRows = typeof autoSize === "object" && autoSize.minRows ? autoSize.minRows : rows;
|
|
529
|
+
const autoSizeKey = typeof autoSize === "object" ? `${autoSize.minRows}-${autoSize.maxRows}` : String(autoSize);
|
|
530
|
+
useEffect2(() => {
|
|
531
|
+
if (autoSize && innerRef.current) fitHeight(innerRef.current, autoSize);
|
|
532
|
+
}, [currentValue, autoSizeKey]);
|
|
533
|
+
const geometryClass = cn2("flex w-full items-start gap-2", getTextareaSizeClasses(size), getShapeClasses(shape, variant));
|
|
534
|
+
const textareaClass = cn2(
|
|
535
|
+
"w-full bg-transparent placeholder:text-mari-muted focus:outline-none disabled:cursor-not-allowed",
|
|
536
|
+
autoSize ? "resize-none" : "resize-y",
|
|
537
|
+
FIELD_MOBILE_TEXT_CLASS,
|
|
538
|
+
classNames.input
|
|
539
|
+
);
|
|
540
|
+
if (skeleton) {
|
|
541
|
+
return /* @__PURE__ */ jsx3("div", { ...skeletonBoxProps(cn2(geometryClass, classNames.wrapper, className)), children: /* @__PURE__ */ jsx3("textarea", { tabIndex: -1, rows: initialRows, className: cn2(textareaClass, "invisible resize-none") }) });
|
|
542
|
+
}
|
|
543
|
+
const wrapperClass = cn2(
|
|
544
|
+
geometryClass,
|
|
545
|
+
FIELD_BASE_CLASS,
|
|
546
|
+
getVariantClasses(variant, color),
|
|
547
|
+
disabled && FIELD_DISABLED_CLASS,
|
|
548
|
+
classNames.wrapper,
|
|
549
|
+
className
|
|
550
|
+
);
|
|
551
|
+
return (
|
|
552
|
+
// `w-full`: Input gibi kapsayıcısını doldurur — `items-start`lı bir flex sütununda (Field) büzülüyordu.
|
|
553
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-col gap-2", children: [
|
|
554
|
+
/* @__PURE__ */ jsxs2("div", { className: wrapperClass, children: [
|
|
555
|
+
/* @__PURE__ */ jsx3(
|
|
556
|
+
"textarea",
|
|
557
|
+
{
|
|
558
|
+
id,
|
|
559
|
+
ref: innerRef,
|
|
560
|
+
value: currentValue,
|
|
561
|
+
onChange: handleChange,
|
|
562
|
+
...mention.controlProps,
|
|
563
|
+
onFocus,
|
|
564
|
+
onBlur: (e) => {
|
|
565
|
+
mention.close();
|
|
566
|
+
onBlur?.(e);
|
|
567
|
+
},
|
|
568
|
+
onKeyDown: (e) => {
|
|
569
|
+
mention.handleKeyDown(e);
|
|
570
|
+
onKeyDown?.(e);
|
|
571
|
+
},
|
|
572
|
+
readOnly,
|
|
573
|
+
rows: initialRows,
|
|
574
|
+
placeholder,
|
|
575
|
+
maxLength,
|
|
576
|
+
disabled,
|
|
577
|
+
name,
|
|
578
|
+
required,
|
|
579
|
+
"aria-label": ariaLabel,
|
|
580
|
+
"aria-labelledby": ariaLabelledBy,
|
|
581
|
+
"aria-describedby": ariaDescribedBy,
|
|
582
|
+
"aria-invalid": ariaInvalid,
|
|
583
|
+
className: textareaClass
|
|
584
|
+
}
|
|
585
|
+
),
|
|
586
|
+
allowClear && /* @__PURE__ */ jsx3(ClearButton, { visible: showClear, label: clearLabel, icon: clearIconOf(allowClear), onClear: handleClear, className: classNames.clear })
|
|
587
|
+
] }),
|
|
588
|
+
(showCount || count?.formatter) && /* @__PURE__ */ jsx3("span", { className: cn2("flex flex-none items-center justify-end text-xs tabular-nums", maxLength && charCount >= maxLength ? "text-mari-error" : "text-mari-muted", classNames.count), children: count?.formatter ? count.formatter({ value: currentValue, count: charCount, maxLength }) : countLabel }),
|
|
589
|
+
mention.panel
|
|
590
|
+
] })
|
|
591
|
+
);
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
// src/input/OtpInput.tsx
|
|
595
|
+
import React4, { useContext, useEffect as useEffect3, useRef as useRef4, useState as useState4 } from "react";
|
|
596
|
+
import { cn as cn4 } from "@mari-ui/core";
|
|
597
|
+
|
|
598
|
+
// src/input/_components/OtpSingleField.tsx
|
|
599
|
+
import React3, { useRef as useRef3, useState as useState3 } from "react";
|
|
600
|
+
import { cn as cn3, useControllableState as useControllableState3 } from "@mari-ui/core";
|
|
601
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
602
|
+
var BOX_CLASS = { sm: "h-8 px-2.5 gap-1", md: "h-10 px-3 gap-1.5", lg: "h-12 px-4 gap-2" };
|
|
603
|
+
var SLOT_CLASS = { sm: "w-4 text-sm", md: "w-5 text-base", lg: "w-6 text-xl" };
|
|
604
|
+
function OtpSingleField({
|
|
605
|
+
length,
|
|
606
|
+
value,
|
|
607
|
+
defaultValue,
|
|
608
|
+
disabled,
|
|
609
|
+
size,
|
|
610
|
+
shape,
|
|
611
|
+
variant,
|
|
612
|
+
color,
|
|
613
|
+
onChange,
|
|
614
|
+
onInput,
|
|
615
|
+
display,
|
|
616
|
+
separator,
|
|
617
|
+
className,
|
|
618
|
+
ariaLabel,
|
|
619
|
+
id,
|
|
620
|
+
describedBy,
|
|
621
|
+
required,
|
|
622
|
+
inputMode,
|
|
623
|
+
skeleton,
|
|
624
|
+
linePosition
|
|
625
|
+
}) {
|
|
626
|
+
const [code, setCode] = useControllableState3({ value, defaultValue: defaultValue.slice(0, length) });
|
|
627
|
+
const [focused, setFocused] = useState3(false);
|
|
628
|
+
const inputRef = useRef3(null);
|
|
629
|
+
const boxClass = cn3("relative inline-flex w-fit max-w-full items-center", BOX_CLASS[size], getShapeClasses(shape, variant));
|
|
630
|
+
if (skeleton) {
|
|
631
|
+
return /* @__PURE__ */ jsx4("div", { ...skeletonBoxProps(cn3(boxClass, className)), children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsx4("span", { className: SLOT_CLASS[size] }, i)) });
|
|
632
|
+
}
|
|
633
|
+
const handleChange = (e) => {
|
|
634
|
+
let next = e.target.value.replace(/\s/g, "");
|
|
635
|
+
if (inputMode === "numeric") next = next.replace(/\D/g, "");
|
|
636
|
+
next = next.slice(0, length);
|
|
637
|
+
setCode(next);
|
|
638
|
+
onInput?.(Array.from({ length }, (_, i) => next[i] ?? ""));
|
|
639
|
+
if (next.length === length) onChange?.(next);
|
|
640
|
+
};
|
|
641
|
+
const keepCaretAtEnd = (e) => {
|
|
642
|
+
const el = e.currentTarget;
|
|
643
|
+
const end = el.value.length;
|
|
644
|
+
if (el.selectionStart !== end || el.selectionEnd !== end) el.setSelectionRange(end, end);
|
|
645
|
+
};
|
|
646
|
+
const activeIndex = Math.min(code.length, length - 1);
|
|
647
|
+
return /* @__PURE__ */ jsxs3(
|
|
648
|
+
"div",
|
|
649
|
+
{
|
|
650
|
+
className: cn3(
|
|
651
|
+
boxClass,
|
|
652
|
+
FIELD_BASE_CLASS,
|
|
653
|
+
getVariantClasses(variant, color),
|
|
654
|
+
touchTargetClass[size],
|
|
655
|
+
disabled && FIELD_DISABLED_CLASS,
|
|
656
|
+
className
|
|
657
|
+
),
|
|
658
|
+
children: [
|
|
659
|
+
Array.from({ length }, (_, i) => {
|
|
660
|
+
const char = code[i];
|
|
661
|
+
const isActive = focused && i === activeIndex;
|
|
662
|
+
const showLine = linePosition === "bottom" || !char && !isActive;
|
|
663
|
+
return /* @__PURE__ */ jsxs3(React3.Fragment, { children: [
|
|
664
|
+
/* @__PURE__ */ jsxs3(
|
|
665
|
+
"span",
|
|
666
|
+
{
|
|
667
|
+
"aria-hidden": true,
|
|
668
|
+
className: cn3(
|
|
669
|
+
"relative flex h-full items-center justify-center font-medium tabular-nums text-mari-foreground",
|
|
670
|
+
SLOT_CLASS[size],
|
|
671
|
+
showLine && "after:absolute after:inset-x-0.5 after:h-px after:bg-mari-input",
|
|
672
|
+
showLine && (linePosition === "bottom" ? "after:bottom-[18%]" : "after:top-1/2 after:-translate-y-1/2"),
|
|
673
|
+
showLine && isActive && "after:bg-mari-primary"
|
|
674
|
+
),
|
|
675
|
+
children: [
|
|
676
|
+
char ? display(char) : null,
|
|
677
|
+
isActive && code.length < length && // `key`: her yazışta animasyon baştan başlar — yazarken imleç
|
|
678
|
+
// hep görünür, durunca yanıp söner (gerçek imleç davranışı).
|
|
679
|
+
/* @__PURE__ */ jsx4(
|
|
680
|
+
"span",
|
|
681
|
+
{
|
|
682
|
+
className: "absolute h-[45%] w-px bg-mari-foreground animate-[mari-caret-blink_1.06s_step-end_infinite] motion-reduce:animate-none"
|
|
683
|
+
},
|
|
684
|
+
code.length
|
|
685
|
+
)
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
),
|
|
689
|
+
separator && i < length - 1 && /* @__PURE__ */ jsx4("span", { "aria-hidden": true, className: "px-0.5 text-mari-muted", children: typeof separator === "function" ? separator(i) : separator })
|
|
690
|
+
] }, i);
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ jsx4(
|
|
693
|
+
"input",
|
|
694
|
+
{
|
|
695
|
+
ref: inputRef,
|
|
696
|
+
value: code,
|
|
697
|
+
onChange: handleChange,
|
|
698
|
+
onFocus: (e) => {
|
|
699
|
+
setFocused(true);
|
|
700
|
+
keepCaretAtEnd(e);
|
|
701
|
+
},
|
|
702
|
+
onBlur: () => setFocused(false),
|
|
703
|
+
onSelect: keepCaretAtEnd,
|
|
704
|
+
disabled,
|
|
705
|
+
id,
|
|
706
|
+
required,
|
|
707
|
+
"aria-label": ariaLabel,
|
|
708
|
+
"aria-describedby": describedBy,
|
|
709
|
+
"aria-invalid": color === "error" || void 0,
|
|
710
|
+
inputMode,
|
|
711
|
+
autoComplete: "one-time-code",
|
|
712
|
+
spellCheck: false,
|
|
713
|
+
className: "absolute inset-0 h-full w-full cursor-text bg-transparent text-base text-transparent caret-transparent outline-none selection:bg-transparent disabled:cursor-not-allowed"
|
|
714
|
+
}
|
|
715
|
+
)
|
|
716
|
+
]
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// src/input/OtpInput.tsx
|
|
722
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
723
|
+
var WIDTH_CLASS = { sm: "w-6 p-0", md: "w-8 p-0", lg: "w-10 p-0" };
|
|
724
|
+
function resolveDisplayValue(rawValue, formatter, mask) {
|
|
725
|
+
if (formatter) return formatter(rawValue);
|
|
726
|
+
if (mask && rawValue) return "\u2022";
|
|
727
|
+
return rawValue;
|
|
728
|
+
}
|
|
729
|
+
function OtpInput({
|
|
730
|
+
length = 6,
|
|
731
|
+
value,
|
|
732
|
+
defaultValue = "",
|
|
733
|
+
disabled = false,
|
|
734
|
+
size = "md",
|
|
735
|
+
shape = "default",
|
|
736
|
+
variant = "outline",
|
|
737
|
+
color,
|
|
738
|
+
onChange,
|
|
739
|
+
onInput,
|
|
740
|
+
mask = false,
|
|
741
|
+
formatter,
|
|
742
|
+
separator,
|
|
743
|
+
className,
|
|
744
|
+
"aria-label": ariaLabelProp,
|
|
745
|
+
inputMode = "numeric",
|
|
746
|
+
skeleton: ownSkeleton,
|
|
747
|
+
layout = "separated",
|
|
748
|
+
linePosition = "center"
|
|
749
|
+
}) {
|
|
750
|
+
const inField = useContext(FieldContext) !== null;
|
|
751
|
+
const group = useFieldGroup({ "aria-label": ariaLabelProp, disabled }, layout === "separated");
|
|
752
|
+
const skeleton = useFieldSkeleton(ownSkeleton);
|
|
753
|
+
const control = useFieldControl({ disabled, color });
|
|
754
|
+
const ariaLabel = ariaLabelProp ?? (inField ? void 0 : "Do\u011Frulama kodu");
|
|
755
|
+
const [otpValues, setOtpValues] = useState4(Array.from({ length }, (_, i) => value?.[i] ?? defaultValue[i] ?? ""));
|
|
756
|
+
const inputsRef = useRef4([]);
|
|
757
|
+
const focusInput = (index) => {
|
|
758
|
+
const input = inputsRef.current[index];
|
|
759
|
+
if (input) {
|
|
760
|
+
input.focus();
|
|
761
|
+
input.select();
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
const handleInput = (i, rawValue) => {
|
|
765
|
+
const shown = resolveDisplayValue(otpValues[i] ?? "", formatter, mask);
|
|
766
|
+
let text = rawValue.replace(/\s/g, "");
|
|
767
|
+
if (shown && text.length === shown.length + 1) text = text.startsWith(shown) ? text.slice(shown.length) : text.slice(0, 1);
|
|
768
|
+
const chars = text.split("");
|
|
769
|
+
const updated = [...otpValues];
|
|
770
|
+
for (let j = 0; j < chars.length; j++) {
|
|
771
|
+
if (i + j < length) updated[i + j] = chars[j] ?? "";
|
|
772
|
+
}
|
|
773
|
+
setOtpValues(updated);
|
|
774
|
+
onInput?.(updated);
|
|
775
|
+
if (!updated.includes("")) onChange?.(updated.join(""));
|
|
776
|
+
focusInput(Math.min(i + chars.length, length - 1));
|
|
777
|
+
};
|
|
778
|
+
const handleKeyDown = (e, i) => {
|
|
779
|
+
const input = e.currentTarget;
|
|
780
|
+
const cursorAtStart = input.selectionStart === 0;
|
|
781
|
+
const cursorAtEnd = input.selectionStart === input.value.length;
|
|
782
|
+
if (e.key === "Backspace") {
|
|
783
|
+
e.preventDefault();
|
|
784
|
+
const updated = [...otpValues];
|
|
785
|
+
if (otpValues[i]) {
|
|
786
|
+
updated[i] = "";
|
|
787
|
+
setOtpValues(updated);
|
|
788
|
+
onInput?.(updated);
|
|
789
|
+
focusInput(i);
|
|
790
|
+
} else if (i > 0) {
|
|
791
|
+
updated[i - 1] = "";
|
|
792
|
+
setOtpValues(updated);
|
|
793
|
+
onInput?.(updated);
|
|
794
|
+
focusInput(i - 1);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
if (e.key === "ArrowLeft" && cursorAtStart && i > 0) {
|
|
798
|
+
e.preventDefault();
|
|
799
|
+
focusInput(i - 1);
|
|
800
|
+
}
|
|
801
|
+
if (e.key === "ArrowRight" && cursorAtEnd && i < length - 1) {
|
|
802
|
+
e.preventDefault();
|
|
803
|
+
focusInput(i + 1);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
useEffect3(() => {
|
|
807
|
+
if (value !== void 0) {
|
|
808
|
+
const split = value.split("").slice(0, length);
|
|
809
|
+
setOtpValues((prev) => Array.from({ length }, (_, i) => split[i] ?? prev[i] ?? ""));
|
|
810
|
+
}
|
|
811
|
+
}, [value, length]);
|
|
812
|
+
const resolvedVariant = variant === "ghost" ? "underlined" : variant;
|
|
813
|
+
if (layout === "single") {
|
|
814
|
+
return /* @__PURE__ */ jsx5(
|
|
815
|
+
OtpSingleField,
|
|
816
|
+
{
|
|
817
|
+
length,
|
|
818
|
+
value,
|
|
819
|
+
defaultValue,
|
|
820
|
+
disabled: !!control.disabled,
|
|
821
|
+
size,
|
|
822
|
+
shape,
|
|
823
|
+
variant: resolvedVariant,
|
|
824
|
+
color: control.color,
|
|
825
|
+
id: control.id,
|
|
826
|
+
describedBy: control["aria-describedby"],
|
|
827
|
+
required: control.required,
|
|
828
|
+
onChange,
|
|
829
|
+
onInput,
|
|
830
|
+
display: (raw) => resolveDisplayValue(raw, formatter, mask),
|
|
831
|
+
separator,
|
|
832
|
+
className,
|
|
833
|
+
ariaLabel,
|
|
834
|
+
inputMode,
|
|
835
|
+
skeleton,
|
|
836
|
+
linePosition
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
const handlePaste = (e, i) => {
|
|
841
|
+
e.preventDefault();
|
|
842
|
+
handleInput(i, e.clipboardData.getData("text"));
|
|
843
|
+
};
|
|
844
|
+
if (skeleton) {
|
|
845
|
+
return /* @__PURE__ */ jsx5("div", { "aria-hidden": true, className: "flex items-center gap-2", children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsx5(Input, { skeleton: true, size, shape, className: cn4(WIDTH_CLASS[size], className) }, i)) });
|
|
846
|
+
}
|
|
847
|
+
return /* @__PURE__ */ jsx5(
|
|
848
|
+
"div",
|
|
849
|
+
{
|
|
850
|
+
role: "group",
|
|
851
|
+
"aria-label": group["aria-labelledby"] ? void 0 : ariaLabel ?? "Do\u011Frulama kodu",
|
|
852
|
+
"aria-labelledby": group["aria-labelledby"],
|
|
853
|
+
"aria-describedby": group["aria-describedby"],
|
|
854
|
+
className: "flex items-center gap-2",
|
|
855
|
+
children: /* @__PURE__ */ jsx5(FieldContext.Provider, { value: null, children: Array.from({ length }).map((_, i) => {
|
|
856
|
+
const rawValue = otpValues[i] ?? "";
|
|
857
|
+
const displayValue = resolveDisplayValue(rawValue, formatter, mask);
|
|
858
|
+
return /* @__PURE__ */ jsxs4(React4.Fragment, { children: [
|
|
859
|
+
/* @__PURE__ */ jsx5(
|
|
860
|
+
Input,
|
|
861
|
+
{
|
|
862
|
+
ref: (el) => {
|
|
863
|
+
inputsRef.current[i] = el;
|
|
864
|
+
},
|
|
865
|
+
value: displayValue,
|
|
866
|
+
onInput: (e) => handleInput(i, e.target.value),
|
|
867
|
+
onKeyDown: (e) => handleKeyDown(e, i),
|
|
868
|
+
onPaste: (e) => handlePaste(e, i),
|
|
869
|
+
onFocus: (e) => e.currentTarget.select(),
|
|
870
|
+
"aria-label": `Hane ${i + 1} / ${length}`,
|
|
871
|
+
inputMode,
|
|
872
|
+
autoComplete: i === 0 ? "one-time-code" : "off",
|
|
873
|
+
disabled: !!group.disabled,
|
|
874
|
+
size,
|
|
875
|
+
shape,
|
|
876
|
+
variant: resolvedVariant,
|
|
877
|
+
color: group["aria-invalid"] ? color ?? "error" : color,
|
|
878
|
+
className: cn4(WIDTH_CLASS[size], className),
|
|
879
|
+
classNames: { input: "w-full text-center font-medium" }
|
|
880
|
+
}
|
|
881
|
+
),
|
|
882
|
+
separator && i < length - 1 && /* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: "text-mari-muted", children: typeof separator === "function" ? separator(i) : separator })
|
|
883
|
+
] }, `otp-${i}`);
|
|
884
|
+
}) })
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// src/input/SearchInput.tsx
|
|
890
|
+
import { forwardRef as forwardRef3, useImperativeHandle as useImperativeHandle2, useRef as useRef5 } from "react";
|
|
891
|
+
import { Loader2Icon, SearchIcon } from "lucide-react";
|
|
892
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
893
|
+
var SearchInput = forwardRef3(
|
|
894
|
+
({ icon, iconPosition = "end", onSearch, onPressEnter, loading = false, searchLabel = "Ara", ...rest }, ref) => {
|
|
895
|
+
const inputRef = useRef5(null);
|
|
896
|
+
useImperativeHandle2(ref, () => inputRef.current, []);
|
|
897
|
+
const search = () => onSearch?.(inputRef.current?.value ?? "");
|
|
898
|
+
const handlePressEnter = (e) => {
|
|
899
|
+
search();
|
|
900
|
+
onPressEnter?.(e);
|
|
901
|
+
};
|
|
902
|
+
const searchButton = /* @__PURE__ */ jsx6(
|
|
903
|
+
"button",
|
|
904
|
+
{
|
|
905
|
+
type: "button",
|
|
906
|
+
"aria-label": searchLabel,
|
|
907
|
+
onClick: search,
|
|
908
|
+
disabled: rest.disabled,
|
|
909
|
+
className: "flex size-6 cursor-pointer select-none items-center justify-center rounded-sm hover:text-mari-foreground focus-visible:outline-2 focus-visible:outline-mari-ring",
|
|
910
|
+
children: loading ? /* @__PURE__ */ jsx6(Loader2Icon, { size: 16, className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ jsx6(SearchIcon, { size: 16, "aria-hidden": true })
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
return /* @__PURE__ */ jsx6(
|
|
914
|
+
Input,
|
|
915
|
+
{
|
|
916
|
+
ref: inputRef,
|
|
917
|
+
icon: icon ?? searchButton,
|
|
918
|
+
iconPosition,
|
|
919
|
+
onPressEnter: handlePressEnter,
|
|
920
|
+
enterKeyHint: "search",
|
|
921
|
+
"aria-busy": loading || void 0,
|
|
922
|
+
...rest
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
);
|
|
927
|
+
SearchInput.displayName = "SearchInput";
|
|
928
|
+
|
|
929
|
+
export {
|
|
930
|
+
Input,
|
|
931
|
+
Textarea,
|
|
932
|
+
OtpInput,
|
|
933
|
+
SearchInput
|
|
934
|
+
};
|
|
935
|
+
//# sourceMappingURL=chunk-P7Z5BREP.js.map
|