@vritti/quantum-ui 0.2.10 → 0.3.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/dist/Alert.js +4 -32
- package/dist/Alert.js.map +1 -1
- package/dist/AppSelector.js +37 -0
- package/dist/AppSelector.js.map +1 -0
- package/dist/Avatar.js +6 -6
- package/dist/Avatar.js.map +1 -1
- package/dist/Badge2.js +3 -3
- package/dist/Breadcrumb.js +125 -0
- package/dist/Breadcrumb.js.map +1 -0
- package/dist/Button.js +9 -5
- package/dist/Button.js.map +1 -1
- package/dist/Button2.js +4 -4
- package/dist/Button2.js.map +1 -1
- package/dist/Card.js +1 -1
- package/dist/CardSkeleton.js +17 -0
- package/dist/CardSkeleton.js.map +1 -0
- package/dist/Chart.js +6196 -6402
- package/dist/Chart.js.map +1 -1
- package/dist/Checkbox2.js +7 -6
- package/dist/Checkbox2.js.map +1 -1
- package/dist/CheckboxGroup.js +74 -0
- package/dist/CheckboxGroup.js.map +1 -0
- package/dist/CloudProviderSelector.js +37 -0
- package/dist/CloudProviderSelector.js.map +1 -0
- package/dist/Collapsible.js +8 -0
- package/dist/Collapsible.js.map +1 -0
- package/dist/Combination.js +10 -2509
- package/dist/Combination.js.map +1 -1
- package/dist/ConfirmContext.js +75 -0
- package/dist/ConfirmContext.js.map +1 -0
- package/dist/CurrencySelector.js +194 -0
- package/dist/CurrencySelector.js.map +1 -0
- package/dist/DangerZoneSkeleton.js +52 -0
- package/dist/DangerZoneSkeleton.js.map +1 -0
- package/dist/DatePicker.js +36 -18
- package/dist/DatePicker.js.map +1 -1
- package/dist/DeploymentSelector.js +37 -0
- package/dist/DeploymentSelector.js.map +1 -0
- package/dist/Dialog.js +159 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/DropdownMenu.js +66 -1493
- package/dist/DropdownMenu.js.map +1 -1
- package/dist/Empty.js +49 -0
- package/dist/Empty.js.map +1 -0
- package/dist/ErrorBoundary.js +255 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/FeatureSelector.js +37 -0
- package/dist/FeatureSelector.js.map +1 -0
- package/dist/FilePreview.js +194 -0
- package/dist/FilePreview.js.map +1 -0
- package/dist/Form.js +1922 -20
- package/dist/Form.js.map +1 -1
- package/dist/HierarchyGraph.js +10729 -0
- package/dist/HierarchyGraph.js.map +1 -0
- package/dist/IndustrySelector.js +37 -0
- package/dist/IndustrySelector.js.map +1 -0
- package/dist/Input.js +22 -0
- package/dist/Input.js.map +1 -0
- package/dist/Label.js +2 -22
- package/dist/Label.js.map +1 -1
- package/dist/LocaleSelector.js +111 -0
- package/dist/LocaleSelector.js.map +1 -0
- package/dist/MicrofrontendSelector.js +19 -0
- package/dist/MicrofrontendSelector.js.map +1 -0
- package/dist/OTPField.js +29 -27
- package/dist/OTPField.js.map +1 -1
- package/dist/PageHeaderSkeleton.js +35 -0
- package/dist/PageHeaderSkeleton.js.map +1 -0
- package/dist/PasswordField.js +2 -50
- package/dist/PasswordField.js.map +1 -1
- package/dist/PhoneField.js +9 -14
- package/dist/PhoneField.js.map +1 -1
- package/dist/PlanSelector.js +37 -0
- package/dist/PlanSelector.js.map +1 -0
- package/dist/Progress.js +5 -4
- package/dist/Progress.js.map +1 -1
- package/dist/RadioGroup.js +392 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/RegionSelector.js +37 -0
- package/dist/RegionSelector.js.map +1 -0
- package/dist/Select.js +780 -0
- package/dist/Select.js.map +1 -0
- package/dist/SelectFilter.js +387 -0
- package/dist/SelectFilter.js.map +1 -0
- package/dist/Sidebar.js +616 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/SingleSelect.js +429 -0
- package/dist/SingleSelect.js.map +1 -0
- package/dist/Skeleton.js +1 -1
- package/dist/Sonner.js +2 -1134
- package/dist/Sonner.js.map +1 -1
- package/dist/Sortable.js +4517 -0
- package/dist/Sortable.js.map +1 -0
- package/dist/Spinner.js +1 -1
- package/dist/StepProgressIndicator.js +42 -0
- package/dist/StepProgressIndicator.js.map +1 -0
- package/dist/Switch.js +16 -16
- package/dist/Switch.js.map +1 -1
- package/dist/TabsSkeleton.js +188 -0
- package/dist/TabsSkeleton.js.map +1 -0
- package/dist/TextArea.js +17 -20
- package/dist/TextArea.js.map +1 -1
- package/dist/TextField.js +3 -19
- package/dist/TextField.js.map +1 -1
- package/dist/TimezoneSelector.js +144 -0
- package/dist/TimezoneSelector.js.map +1 -0
- package/dist/Toggle.js +3 -33
- package/dist/Toggle.js.map +1 -1
- package/dist/Typography.js +1 -1
- package/dist/UploadFile.js +232 -0
- package/dist/UploadFile.js.map +1 -0
- package/dist/ValueFilter.js +123 -0
- package/dist/ValueFilter.js.map +1 -0
- package/dist/ViewTabs.js +218 -0
- package/dist/ViewTabs.js.map +1 -0
- package/dist/_commonjsHelpers.js +3 -1
- package/dist/_commonjsHelpers.js.map +1 -1
- package/dist/assets/quantum-ui.css +808 -38
- package/dist/axios.js +4575 -0
- package/dist/axios.js.map +1 -0
- package/dist/circle-alert.js +19 -0
- package/dist/circle-alert.js.map +1 -0
- package/dist/circle-check.js +18 -0
- package/dist/circle-check.js.map +1 -0
- package/dist/collapsible2.js +154 -0
- package/dist/collapsible2.js.map +1 -0
- package/dist/components/Breadcrumb.js +2 -0
- package/dist/components/Breadcrumb.js.map +1 -0
- package/dist/components/Card.js +1 -0
- package/dist/components/Card.js.map +1 -1
- package/dist/components/CheckboxGroup.js +2 -0
- package/dist/components/CheckboxGroup.js.map +1 -0
- package/dist/components/Collapsible.js +2 -0
- package/dist/components/Collapsible.js.map +1 -0
- package/dist/components/DangerZone.js +2 -0
- package/dist/components/DangerZone.js.map +1 -0
- package/dist/components/DataTable.js +1 -1
- package/dist/components/Dialog.js +2 -0
- package/dist/components/Dialog.js.map +1 -0
- package/dist/components/DropdownMenu.js +1 -1
- package/dist/components/Empty.js +2 -0
- package/dist/components/Empty.js.map +1 -0
- package/dist/components/ErrorBoundary.js +2 -0
- package/dist/components/ErrorBoundary.js.map +1 -0
- package/dist/components/FilePreview.js +2 -0
- package/dist/components/FilePreview.js.map +1 -0
- package/dist/components/HierarchyGraph.js +2 -0
- package/dist/components/HierarchyGraph.js.map +1 -0
- package/dist/components/PageHeader.js +2 -0
- package/dist/components/PageHeader.js.map +1 -0
- package/dist/components/RadioGroup.js +2 -0
- package/dist/components/RadioGroup.js.map +1 -0
- package/dist/components/RichTextEditor.js +4 -0
- package/dist/components/RichTextEditor.js.map +1 -0
- package/dist/components/Select.js +6 -1356
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Sidebar.js +2 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/Sortable.js +2 -0
- package/dist/components/Sortable.js.map +1 -0
- package/dist/components/StepProgressIndicator.js +2 -0
- package/dist/components/StepProgressIndicator.js.map +1 -0
- package/dist/components/Tabs.js +2 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/UploadFile.js +2 -0
- package/dist/components/UploadFile.js.map +1 -0
- package/dist/components/ValueFilter.js +2 -0
- package/dist/components/ValueFilter.js.map +1 -0
- package/dist/components/ViewTabs.js +2 -0
- package/dist/components/ViewTabs.js.map +1 -0
- package/dist/context/index.js +1 -0
- package/dist/context/index.js.map +1 -1
- package/dist/dropdown-menu.js +1209 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/ellipsis.js +19 -0
- package/dist/ellipsis.js.map +1 -0
- package/dist/eye.js +52 -0
- package/dist/eye.js.map +1 -0
- package/dist/field.js +2 -2
- package/dist/file-text.js +27 -0
- package/dist/file-text.js.map +1 -0
- package/dist/grip-vertical.js +22 -0
- package/dist/grip-vertical.js.map +1 -0
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/image-component.js +614 -0
- package/dist/image-component.js.map +1 -0
- package/dist/index.js +48 -12
- package/dist/index.js.map +1 -1
- package/dist/index10.js +181 -11
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +177 -4
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +17 -38
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +204 -188
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +124 -192
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +79 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.js +16 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.js +1137 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.js +41 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.js +314 -0
- package/dist/index19.js.map +1 -0
- package/dist/index2.js +54030 -59
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +488 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.js +2540 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.js +36 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.js +13 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.js +8 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.js +35 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.js +65 -0
- package/dist/index26.js.map +1 -0
- package/dist/index27.js +16 -0
- package/dist/index27.js.map +1 -0
- package/dist/index28.js +41 -0
- package/dist/index28.js.map +1 -0
- package/dist/index29.js +84 -0
- package/dist/index29.js.map +1 -0
- package/dist/index3.js +41 -61
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +199 -0
- package/dist/index30.js.map +1 -0
- package/dist/index4.js +290 -92
- package/dist/index4.js.map +1 -1
- package/dist/index5.js +102 -42
- package/dist/index5.js.map +1 -1
- package/dist/index6.js +35 -8
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +1141 -110
- package/dist/index7.js.map +1 -1
- package/dist/index8.js +19 -34
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +27 -4
- package/dist/index9.js.map +1 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts +17 -0
- package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/lib/components/Breadcrumb/index.d.ts +4 -0
- package/dist/lib/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/lib/components/Button/Button.d.ts +3 -1
- package/dist/lib/components/Button/Button.d.ts.map +1 -1
- package/dist/lib/components/Card/CardSkeleton.d.ts +9 -0
- package/dist/lib/components/Card/CardSkeleton.d.ts.map +1 -0
- package/dist/lib/components/Card/index.d.ts +1 -0
- package/dist/lib/components/Card/index.d.ts.map +1 -1
- package/dist/lib/components/Chart/Chart.d.ts +1 -1
- package/dist/lib/components/Chart/Chart.d.ts.map +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts +24 -0
- package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/lib/components/CheckboxGroup/index.d.ts +3 -0
- package/dist/lib/components/CheckboxGroup/index.d.ts.map +1 -0
- package/dist/lib/components/Collapsible/Collapsible.d.ts +5 -0
- package/dist/lib/components/Collapsible/Collapsible.d.ts.map +1 -0
- package/dist/lib/components/Collapsible/index.d.ts +2 -0
- package/dist/lib/components/Collapsible/index.d.ts.map +1 -0
- package/dist/lib/components/DangerZone/DangerZone.d.ts +13 -0
- package/dist/lib/components/DangerZone/DangerZone.d.ts.map +1 -0
- package/dist/lib/components/DangerZone/DangerZoneSkeleton.d.ts +9 -0
- package/dist/lib/components/DangerZone/DangerZoneSkeleton.d.ts.map +1 -0
- package/dist/lib/components/DangerZone/index.d.ts +4 -0
- package/dist/lib/components/DangerZone/index.d.ts.map +1 -0
- package/dist/lib/components/DataTable/DataTable.d.ts +2 -11
- package/dist/lib/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableEmpty.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableFilters.d.ts +11 -0
- package/dist/lib/components/DataTable/components/DataTableFilters.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableImportDialog.d.ts +16 -0
- package/dist/lib/components/DataTable/components/DataTableImportDialog.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTablePagination.d.ts +1 -2
- package/dist/lib/components/DataTable/components/DataTablePagination.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableRowDensity.d.ts +11 -0
- package/dist/lib/components/DataTable/components/DataTableRowDensity.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableSearch.d.ts +14 -0
- package/dist/lib/components/DataTable/components/DataTableSearch.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableSelectionBar.d.ts +14 -0
- package/dist/lib/components/DataTable/components/DataTableSelectionBar.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableViewOptions.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableViewTabs.d.ts +7 -0
- package/dist/lib/components/DataTable/components/DataTableViewTabs.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableViewsMenu.d.ts +14 -0
- package/dist/lib/components/DataTable/components/DataTableViewsMenu.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/FilterWrapper.d.ts +21 -0
- package/dist/lib/components/DataTable/components/FilterWrapper.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/RowActions.d.ts +20 -0
- package/dist/lib/components/DataTable/components/RowActions.d.ts.map +1 -0
- package/dist/lib/components/DataTable/hooks/useAutoUpsert.d.ts +3 -0
- package/dist/lib/components/DataTable/hooks/useAutoUpsert.d.ts.map +1 -0
- package/dist/lib/components/DataTable/hooks/useDataTable.d.ts +24 -2
- package/dist/lib/components/DataTable/hooks/useDataTable.d.ts.map +1 -1
- package/dist/lib/components/DataTable/index.d.ts +11 -3
- package/dist/lib/components/DataTable/index.d.ts.map +1 -1
- package/dist/lib/components/DataTable/store/store.d.ts +28 -0
- package/dist/lib/components/DataTable/store/store.d.ts.map +1 -0
- package/dist/lib/components/DataTable/store/useTableSlice.d.ts +18 -0
- package/dist/lib/components/DataTable/store/useTableSlice.d.ts.map +1 -0
- package/dist/lib/components/DataTable/types.d.ts +55 -56
- package/dist/lib/components/DataTable/types.d.ts.map +1 -1
- package/dist/lib/components/DataTable/utils.d.ts +8 -1
- package/dist/lib/components/DataTable/utils.d.ts.map +1 -1
- package/dist/lib/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/lib/components/Dialog/Dialog.d.ts +31 -0
- package/dist/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/lib/components/Dialog/index.d.ts +3 -0
- package/dist/lib/components/Dialog/index.d.ts.map +1 -0
- package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/lib/components/DropdownMenu/types.d.ts +10 -1
- package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -1
- package/dist/lib/components/Editor/context/editor-config-context.d.ts +9 -0
- package/dist/lib/components/Editor/context/editor-config-context.d.ts.map +1 -0
- package/dist/lib/components/Editor/context/toolbar-context.d.ts +18 -0
- package/dist/lib/components/Editor/context/toolbar-context.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-hooks/use-debounce.d.ts +2 -0
- package/dist/lib/components/Editor/editor-hooks/use-debounce.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-hooks/use-modal.d.ts +6 -0
- package/dist/lib/components/Editor/editor-hooks/use-modal.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-hooks/use-report.d.ts +2 -0
- package/dist/lib/components/Editor/editor-hooks/use-report.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-hooks/use-update-toolbar.d.ts +3 -0
- package/dist/lib/components/Editor/editor-hooks/use-update-toolbar.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/button-group.d.ts +12 -0
- package/dist/lib/components/Editor/editor-ui/button-group.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/button.d.ts +11 -0
- package/dist/lib/components/Editor/editor-ui/button.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/code-button.d.ts +8 -0
- package/dist/lib/components/Editor/editor-ui/code-button.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/color-picker.d.ts +92 -0
- package/dist/lib/components/Editor/editor-ui/color-picker.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/command.d.ts +19 -0
- package/dist/lib/components/Editor/editor-ui/command.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/content-editable.d.ts +9 -0
- package/dist/lib/components/Editor/editor-ui/content-editable.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/dialog.d.ts +16 -0
- package/dist/lib/components/Editor/editor-ui/dialog.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/image-component.d.ts +16 -0
- package/dist/lib/components/Editor/editor-ui/image-component.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/image-resizer.d.ts +18 -0
- package/dist/lib/components/Editor/editor-ui/image-resizer.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/input.d.ts +4 -0
- package/dist/lib/components/Editor/editor-ui/input.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/label.d.ts +5 -0
- package/dist/lib/components/Editor/editor-ui/label.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/popover.d.ts +8 -0
- package/dist/lib/components/Editor/editor-ui/popover.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/scroll-area.d.ts +6 -0
- package/dist/lib/components/Editor/editor-ui/scroll-area.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/select.d.ts +16 -0
- package/dist/lib/components/Editor/editor-ui/select.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/separator.d.ts +5 -0
- package/dist/lib/components/Editor/editor-ui/separator.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/tabs.d.ts +8 -0
- package/dist/lib/components/Editor/editor-ui/tabs.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/toggle-group.d.ts +8 -0
- package/dist/lib/components/Editor/editor-ui/toggle-group.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/toggle.d.ts +10 -0
- package/dist/lib/components/Editor/editor-ui/toggle.d.ts.map +1 -0
- package/dist/lib/components/Editor/editor-ui/tooltip.d.ts +8 -0
- package/dist/lib/components/Editor/editor-ui/tooltip.d.ts.map +1 -0
- package/dist/lib/components/Editor/index.d.ts +4 -0
- package/dist/lib/components/Editor/index.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/autocomplete-node.d.ts +19 -0
- package/dist/lib/components/Editor/nodes/autocomplete-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/embeds/tweet-node.d.ts +22 -0
- package/dist/lib/components/Editor/nodes/embeds/tweet-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/embeds/youtube-node.d.ts +23 -0
- package/dist/lib/components/Editor/nodes/embeds/youtube-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/emoji-node.d.ts +18 -0
- package/dist/lib/components/Editor/nodes/emoji-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/image-node.d.ts +49 -0
- package/dist/lib/components/Editor/nodes/image-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/keyword-node.d.ts +15 -0
- package/dist/lib/components/Editor/nodes/keyword-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/layout-container-node.d.ts +23 -0
- package/dist/lib/components/Editor/nodes/layout-container-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/layout-item-node.d.ts +15 -0
- package/dist/lib/components/Editor/nodes/layout-item-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/mention-node.d.ts +21 -0
- package/dist/lib/components/Editor/nodes/mention-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes/nodes.d.ts +3 -0
- package/dist/lib/components/Editor/nodes/nodes.d.ts.map +1 -0
- package/dist/lib/components/Editor/nodes.d.ts +2 -0
- package/dist/lib/components/Editor/nodes.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/actions-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/actions/actions-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/character-limit-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/actions/character-limit-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/clear-editor-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/actions/clear-editor-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/counter-character-plugin.d.ts +6 -0
- package/dist/lib/components/Editor/plugins/actions/counter-character-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/edit-mode-toggle-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/actions/edit-mode-toggle-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/import-export-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/actions/import-export-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/markdown-toggle-plugin.d.ts +6 -0
- package/dist/lib/components/Editor/plugins/actions/markdown-toggle-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/max-length-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/actions/max-length-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/share-content-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/actions/share-content-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/speech-to-text-plugin.d.ts +7 -0
- package/dist/lib/components/Editor/plugins/actions/speech-to-text-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/actions/tree-view-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/actions/tree-view-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/auto-link-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/auto-link-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/autocomplete-plugin.d.ts +11 -0
- package/dist/lib/components/Editor/plugins/autocomplete-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/code-action-menu-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/code-action-menu-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/code-highlight-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/code-highlight-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/component-picker-menu-plugin.d.ts +9 -0
- package/dist/lib/components/Editor/plugins/component-picker-menu-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/context-menu-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/context-menu-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/drag-drop-paste-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/drag-drop-paste-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/draggable-block-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/draggable-block-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/embeds/auto-embed-plugin.d.ts +18 -0
- package/dist/lib/components/Editor/plugins/embeds/auto-embed-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/embeds/twitter-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/embeds/twitter-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/embeds/youtube-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/embeds/youtube-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/emoji-picker-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/emoji-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/emojis-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/emojis-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/floating-link-editor-plugin.d.ts +7 -0
- package/dist/lib/components/Editor/plugins/floating-link-editor-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/floating-text-format-plugin.d.ts +7 -0
- package/dist/lib/components/Editor/plugins/floating-text-format-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/images-plugin.d.ts +25 -0
- package/dist/lib/components/Editor/plugins/images-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/keywords-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/keywords-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/layout-plugin.d.ts +13 -0
- package/dist/lib/components/Editor/plugins/layout-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/link-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/link-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/list-max-indent-level-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/list-max-indent-level-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/mentions-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/mentions-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/alignment-picker-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/picker/alignment-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/bulleted-list-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/bulleted-list-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/check-list-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/check-list-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/code-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/code-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/columns-layout-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/columns-layout-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/component-picker-menu-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/picker/component-picker-menu-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/component-picker-option.d.ts +17 -0
- package/dist/lib/components/Editor/plugins/picker/component-picker-option.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/divider-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/divider-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/embeds-picker-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/picker/embeds-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/heading-picker-plugin.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/picker/heading-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/image-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/image-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/numbered-list-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/numbered-list-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/paragraph-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/paragraph-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/quote-picker-plugin.d.ts +3 -0
- package/dist/lib/components/Editor/plugins/picker/quote-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/picker/table-picker-plugin.d.ts +6 -0
- package/dist/lib/components/Editor/plugins/picker/table-picker-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/plugins.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/plugins.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/tab-focus-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/tab-focus-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/table-plugin.d.ts +34 -0
- package/dist/lib/components/Editor/plugins/table-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/block-format-data.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/block-format-data.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-bulleted-list.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-bulleted-list.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-check-list.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-check-list.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-code-block.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-code-block.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-heading.d.ts +5 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-heading.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-numbered-list.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-numbered-list.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-paragraph.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-paragraph.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-quote.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format/format-quote.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format-toolbar-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-format-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-columns-layout.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-columns-layout.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-embeds.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-embeds.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-horizontal-rule.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-horizontal-rule.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-image.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-image.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-table.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-table.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/toolbar/block-insert-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/clear-formatting-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/clear-formatting-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/code-language-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/code-language-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/element-format-toolbar-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/toolbar/element-format-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-background-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-background-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-color-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-color-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-family-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-family-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-format-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-format-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-size-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/font-size-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/history-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/history-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/horizontal-rule-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/horizontal-rule-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/image-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/image-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/link-toolbar-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/toolbar/link-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/subsuper-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/subsuper-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/table-toolbar-plugin.d.ts +2 -0
- package/dist/lib/components/Editor/plugins/toolbar/table-toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/toolbar/toolbar-plugin.d.ts +6 -0
- package/dist/lib/components/Editor/plugins/toolbar/toolbar-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins/typing-pref-plugin.d.ts +4 -0
- package/dist/lib/components/Editor/plugins/typing-pref-plugin.d.ts.map +1 -0
- package/dist/lib/components/Editor/plugins.d.ts +2 -0
- package/dist/lib/components/Editor/plugins.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/can-use-dom.d.ts +2 -0
- package/dist/lib/components/Editor/shared/can-use-dom.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/caret-from-point.d.ts +5 -0
- package/dist/lib/components/Editor/shared/caret-from-point.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/environment.d.ts +18 -0
- package/dist/lib/components/Editor/shared/environment.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/invariant.d.ts +2 -0
- package/dist/lib/components/Editor/shared/invariant.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/normalize-class-names.d.ts +2 -0
- package/dist/lib/components/Editor/shared/normalize-class-names.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/react-patches.d.ts +2 -0
- package/dist/lib/components/Editor/shared/react-patches.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/react-test-utils.d.ts +3 -0
- package/dist/lib/components/Editor/shared/react-test-utils.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/simple-diff-with-cursor.d.ts +6 -0
- package/dist/lib/components/Editor/shared/simple-diff-with-cursor.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/use-layout-effect.d.ts +4 -0
- package/dist/lib/components/Editor/shared/use-layout-effect.d.ts.map +1 -0
- package/dist/lib/components/Editor/shared/warn-only-once.d.ts +2 -0
- package/dist/lib/components/Editor/shared/warn-only-once.d.ts.map +1 -0
- package/dist/lib/components/Editor/themes/editor-theme.d.ts +3 -0
- package/dist/lib/components/Editor/themes/editor-theme.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/index.d.ts +16 -0
- package/dist/lib/components/Editor/transformers/index.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/markdown-emoji-transformer.d.ts +3 -0
- package/dist/lib/components/Editor/transformers/markdown-emoji-transformer.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/markdown-hr-transformer.d.ts +3 -0
- package/dist/lib/components/Editor/transformers/markdown-hr-transformer.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/markdown-image-transformer.d.ts +3 -0
- package/dist/lib/components/Editor/transformers/markdown-image-transformer.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/markdown-table-transformer.d.ts +3 -0
- package/dist/lib/components/Editor/transformers/markdown-table-transformer.d.ts.map +1 -0
- package/dist/lib/components/Editor/transformers/markdown-tweet-transformer.d.ts +3 -0
- package/dist/lib/components/Editor/transformers/markdown-tweet-transformer.d.ts.map +1 -0
- package/dist/lib/components/Editor/types.d.ts +23 -0
- package/dist/lib/components/Editor/types.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/can-use-dom.d.ts +2 -0
- package/dist/lib/components/Editor/utils/can-use-dom.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/collapsible.d.ts +3 -0
- package/dist/lib/components/Editor/utils/collapsible.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/doc-serialization.d.ts +4 -0
- package/dist/lib/components/Editor/utils/doc-serialization.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/emoji-list.d.ts +21 -0
- package/dist/lib/components/Editor/utils/emoji-list.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/get-dom-range-rect.d.ts +2 -0
- package/dist/lib/components/Editor/utils/get-dom-range-rect.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/get-selected-node.d.ts +3 -0
- package/dist/lib/components/Editor/utils/get-selected-node.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/guard.d.ts +2 -0
- package/dist/lib/components/Editor/utils/guard.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/is-mobile-width.d.ts +2 -0
- package/dist/lib/components/Editor/utils/is-mobile-width.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/set-floating-elem-position-for-link-editor.d.ts +2 -0
- package/dist/lib/components/Editor/utils/set-floating-elem-position-for-link-editor.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/set-floating-elem-position.d.ts +2 -0
- package/dist/lib/components/Editor/utils/set-floating-elem-position.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/swipe.d.ts +5 -0
- package/dist/lib/components/Editor/utils/swipe.d.ts.map +1 -0
- package/dist/lib/components/Editor/utils/url.d.ts +3 -0
- package/dist/lib/components/Editor/utils/url.d.ts.map +1 -0
- package/dist/lib/components/Empty/Empty.d.ts +12 -0
- package/dist/lib/components/Empty/Empty.d.ts.map +1 -0
- package/dist/lib/components/Empty/index.d.ts +3 -0
- package/dist/lib/components/Empty/index.d.ts.map +1 -0
- package/dist/lib/components/ErrorBoundary/ErrorBoundary.d.ts +7 -0
- package/dist/lib/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/dist/lib/components/ErrorBoundary/ErrorPage.d.ts +38 -0
- package/dist/lib/components/ErrorBoundary/ErrorPage.d.ts.map +1 -0
- package/dist/lib/components/ErrorBoundary/index.d.ts +3 -0
- package/dist/lib/components/ErrorBoundary/index.d.ts.map +1 -0
- package/dist/lib/components/FilePreview/FilePreview.d.ts +8 -0
- package/dist/lib/components/FilePreview/FilePreview.d.ts.map +1 -0
- package/dist/lib/components/FilePreview/index.d.ts +2 -0
- package/dist/lib/components/FilePreview/index.d.ts.map +1 -0
- package/dist/lib/components/Form/Form.d.ts +5 -3
- package/dist/lib/components/Form/Form.d.ts.map +1 -1
- package/dist/lib/components/HierarchyGraph/HierarchyGraph.d.ts +24 -0
- package/dist/lib/components/HierarchyGraph/HierarchyGraph.d.ts.map +1 -0
- package/dist/lib/components/HierarchyGraph/index.d.ts +5 -0
- package/dist/lib/components/HierarchyGraph/index.d.ts.map +1 -0
- package/dist/lib/components/PageHeader/PageHeader.d.ts +8 -0
- package/dist/lib/components/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/lib/components/PageHeader/PageHeaderSkeleton.d.ts +10 -0
- package/dist/lib/components/PageHeader/PageHeaderSkeleton.d.ts.map +1 -0
- package/dist/lib/components/PageHeader/index.d.ts +3 -0
- package/dist/lib/components/PageHeader/index.d.ts.map +1 -0
- package/dist/lib/components/PhoneField/PhoneField.d.ts.map +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.d.ts +23 -0
- package/dist/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/lib/components/RadioGroup/index.d.ts +3 -0
- package/dist/lib/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/lib/components/Select/Select.d.ts +8 -10
- package/dist/lib/components/Select/Select.d.ts.map +1 -1
- package/dist/lib/components/Select/SelectFilter.d.ts +20 -0
- package/dist/lib/components/Select/SelectFilter.d.ts.map +1 -0
- package/dist/lib/components/Select/components/MultiSelect/MultiSelect.d.ts +3 -1
- package/dist/lib/components/Select/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/lib/components/Select/components/MultiSelect/MultiSelectFilter.d.ts +13 -6
- package/dist/lib/components/Select/components/MultiSelect/MultiSelectFilter.d.ts.map +1 -1
- package/dist/lib/components/Select/components/SingleSelect/SingleSelect.d.ts +17 -1
- package/dist/lib/components/Select/components/SingleSelect/SingleSelect.d.ts.map +1 -1
- package/dist/lib/components/Select/components/SingleSelect/SingleSelectFilter.d.ts +9 -2
- package/dist/lib/components/Select/components/SingleSelect/SingleSelectFilter.d.ts.map +1 -1
- package/dist/lib/components/Select/hooks/useMultiSelect.d.ts +2 -1
- package/dist/lib/components/Select/hooks/useMultiSelect.d.ts.map +1 -1
- package/dist/lib/components/Select/hooks/useSelect.d.ts +3 -1
- package/dist/lib/components/Select/hooks/useSelect.d.ts.map +1 -1
- package/dist/lib/components/Select/hooks/useSingleSelect.d.ts +2 -1
- package/dist/lib/components/Select/hooks/useSingleSelect.d.ts.map +1 -1
- package/dist/lib/components/Select/index.d.ts +4 -2
- package/dist/lib/components/Select/index.d.ts.map +1 -1
- package/dist/lib/components/Select/types.d.ts +8 -1
- package/dist/lib/components/Select/types.d.ts.map +1 -1
- package/dist/lib/components/Sidebar/Sidebar.d.ts +24 -0
- package/dist/lib/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/lib/components/Sidebar/index.d.ts +2 -0
- package/dist/lib/components/Sidebar/index.d.ts.map +1 -0
- package/dist/lib/components/Sortable/Sortable.d.ts +39 -0
- package/dist/lib/components/Sortable/Sortable.d.ts.map +1 -0
- package/dist/lib/components/Sortable/index.d.ts +3 -0
- package/dist/lib/components/Sortable/index.d.ts.map +1 -0
- package/dist/lib/components/StepProgressIndicator/StepProgressIndicator.d.ts +12 -0
- package/dist/lib/components/StepProgressIndicator/StepProgressIndicator.d.ts.map +1 -0
- package/dist/lib/components/StepProgressIndicator/index.d.ts +3 -0
- package/dist/lib/components/StepProgressIndicator/index.d.ts.map +1 -0
- package/dist/lib/components/Switch/Switch.d.ts.map +1 -1
- package/dist/lib/components/Tabs/Tabs.d.ts +27 -0
- package/dist/lib/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/lib/components/Tabs/TabsSkeleton.d.ts +11 -0
- package/dist/lib/components/Tabs/TabsSkeleton.d.ts.map +1 -0
- package/dist/lib/components/Tabs/index.d.ts +3 -0
- package/dist/lib/components/Tabs/index.d.ts.map +1 -0
- package/dist/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/lib/components/UploadFile/UploadFile.d.ts +26 -0
- package/dist/lib/components/UploadFile/UploadFile.d.ts.map +1 -0
- package/dist/lib/components/UploadFile/index.d.ts +2 -0
- package/dist/lib/components/UploadFile/index.d.ts.map +1 -0
- package/dist/lib/components/ValueFilter/ValueFilter.d.ts +11 -0
- package/dist/lib/components/ValueFilter/ValueFilter.d.ts.map +1 -0
- package/dist/lib/components/ValueFilter/index.d.ts +3 -0
- package/dist/lib/components/ValueFilter/index.d.ts.map +1 -0
- package/dist/lib/components/ViewTabs/ViewTabs.d.ts +23 -0
- package/dist/lib/components/ViewTabs/ViewTabs.d.ts.map +1 -0
- package/dist/lib/components/ViewTabs/index.d.ts +3 -0
- package/dist/lib/components/ViewTabs/index.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +19 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/config/index.d.ts +6 -0
- package/dist/lib/config/index.d.ts.map +1 -1
- package/dist/lib/context/ConfirmContext.d.ts +21 -0
- package/dist/lib/context/ConfirmContext.d.ts.map +1 -0
- package/dist/lib/context/index.d.ts +1 -0
- package/dist/lib/context/index.d.ts.map +1 -1
- package/dist/lib/hooks/index.d.ts +5 -0
- package/dist/lib/hooks/index.d.ts.map +1 -1
- package/dist/lib/hooks/useConfirm.d.ts +4 -0
- package/dist/lib/hooks/useConfirm.d.ts.map +1 -0
- package/dist/lib/hooks/useDialog.d.ts +11 -0
- package/dist/lib/hooks/useDialog.d.ts.map +1 -0
- package/dist/lib/hooks/useIsMobile.d.ts +2 -0
- package/dist/lib/hooks/useIsMobile.d.ts.map +1 -0
- package/dist/lib/hooks/useSlugParams.d.ts +12 -0
- package/dist/lib/hooks/useSlugParams.d.ts.map +1 -0
- package/dist/lib/hooks/useTimer.d.ts +6 -0
- package/dist/lib/hooks/useTimer.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/selects/app/AppFilter.d.ts +11 -0
- package/dist/lib/selects/app/AppFilter.d.ts.map +1 -0
- package/dist/lib/selects/app/AppSelector.d.ts +4 -0
- package/dist/lib/selects/app/AppSelector.d.ts.map +1 -0
- package/dist/lib/selects/app/index.d.ts +3 -0
- package/dist/lib/selects/app/index.d.ts.map +1 -0
- package/dist/lib/selects/app-code/AppCodeFilter.d.ts +11 -0
- package/dist/lib/selects/app-code/AppCodeFilter.d.ts.map +1 -0
- package/dist/lib/selects/app-code/AppCodeSelector.d.ts +4 -0
- package/dist/lib/selects/app-code/AppCodeSelector.d.ts.map +1 -0
- package/dist/lib/selects/app-code/index.d.ts +3 -0
- package/dist/lib/selects/app-code/index.d.ts.map +1 -0
- package/dist/lib/selects/cloud-provider/CloudProviderFilter.d.ts +11 -0
- package/dist/lib/selects/cloud-provider/CloudProviderFilter.d.ts.map +1 -0
- package/dist/lib/selects/cloud-provider/CloudProviderSelector.d.ts +4 -0
- package/dist/lib/selects/cloud-provider/CloudProviderSelector.d.ts.map +1 -0
- package/dist/lib/selects/cloud-provider/index.d.ts +3 -0
- package/dist/lib/selects/cloud-provider/index.d.ts.map +1 -0
- package/dist/lib/selects/currency/CurrencyFilter.d.ts +11 -0
- package/dist/lib/selects/currency/CurrencyFilter.d.ts.map +1 -0
- package/dist/lib/selects/currency/CurrencySelector.d.ts +4 -0
- package/dist/lib/selects/currency/CurrencySelector.d.ts.map +1 -0
- package/dist/lib/selects/currency/currencies.d.ts +3 -0
- package/dist/lib/selects/currency/currencies.d.ts.map +1 -0
- package/dist/lib/selects/currency/index.d.ts +3 -0
- package/dist/lib/selects/currency/index.d.ts.map +1 -0
- package/dist/lib/selects/deployment/DeploymentFilter.d.ts +11 -0
- package/dist/lib/selects/deployment/DeploymentFilter.d.ts.map +1 -0
- package/dist/lib/selects/deployment/DeploymentSelector.d.ts +4 -0
- package/dist/lib/selects/deployment/DeploymentSelector.d.ts.map +1 -0
- package/dist/lib/selects/deployment/index.d.ts +3 -0
- package/dist/lib/selects/deployment/index.d.ts.map +1 -0
- package/dist/lib/selects/feature/FeatureFilter.d.ts +11 -0
- package/dist/lib/selects/feature/FeatureFilter.d.ts.map +1 -0
- package/dist/lib/selects/feature/FeatureSelector.d.ts +4 -0
- package/dist/lib/selects/feature/FeatureSelector.d.ts.map +1 -0
- package/dist/lib/selects/feature/index.d.ts +3 -0
- package/dist/lib/selects/feature/index.d.ts.map +1 -0
- package/dist/lib/selects/index.d.ts +12 -0
- package/dist/lib/selects/index.d.ts.map +1 -0
- package/dist/lib/selects/industry/IndustryFilter.d.ts +11 -0
- package/dist/lib/selects/industry/IndustryFilter.d.ts.map +1 -0
- package/dist/lib/selects/industry/IndustrySelector.d.ts +4 -0
- package/dist/lib/selects/industry/IndustrySelector.d.ts.map +1 -0
- package/dist/lib/selects/industry/index.d.ts +3 -0
- package/dist/lib/selects/industry/index.d.ts.map +1 -0
- package/dist/lib/selects/locale/LocaleFilter.d.ts +11 -0
- package/dist/lib/selects/locale/LocaleFilter.d.ts.map +1 -0
- package/dist/lib/selects/locale/LocaleSelector.d.ts +4 -0
- package/dist/lib/selects/locale/LocaleSelector.d.ts.map +1 -0
- package/dist/lib/selects/locale/index.d.ts +3 -0
- package/dist/lib/selects/locale/index.d.ts.map +1 -0
- package/dist/lib/selects/locale/locales.d.ts +3 -0
- package/dist/lib/selects/locale/locales.d.ts.map +1 -0
- package/dist/lib/selects/microfrontend/MicrofrontendSelector.d.ts +4 -0
- package/dist/lib/selects/microfrontend/MicrofrontendSelector.d.ts.map +1 -0
- package/dist/lib/selects/microfrontend/index.d.ts +2 -0
- package/dist/lib/selects/microfrontend/index.d.ts.map +1 -0
- package/dist/lib/selects/plan/PlanFilter.d.ts +11 -0
- package/dist/lib/selects/plan/PlanFilter.d.ts.map +1 -0
- package/dist/lib/selects/plan/PlanSelector.d.ts +4 -0
- package/dist/lib/selects/plan/PlanSelector.d.ts.map +1 -0
- package/dist/lib/selects/plan/index.d.ts +3 -0
- package/dist/lib/selects/plan/index.d.ts.map +1 -0
- package/dist/lib/selects/region/RegionFilter.d.ts +11 -0
- package/dist/lib/selects/region/RegionFilter.d.ts.map +1 -0
- package/dist/lib/selects/region/RegionSelector.d.ts +4 -0
- package/dist/lib/selects/region/RegionSelector.d.ts.map +1 -0
- package/dist/lib/selects/region/index.d.ts +3 -0
- package/dist/lib/selects/region/index.d.ts.map +1 -0
- package/dist/lib/selects/timezone/TimezoneFilter.d.ts +11 -0
- package/dist/lib/selects/timezone/TimezoneFilter.d.ts.map +1 -0
- package/dist/lib/selects/timezone/TimezoneSelector.d.ts +4 -0
- package/dist/lib/selects/timezone/TimezoneSelector.d.ts.map +1 -0
- package/dist/lib/selects/timezone/index.d.ts +3 -0
- package/dist/lib/selects/timezone/index.d.ts.map +1 -0
- package/dist/lib/selects/timezone/timezones.d.ts +3 -0
- package/dist/lib/selects/timezone/timezones.d.ts.map +1 -0
- package/dist/lib/services/table-views.service.d.ts +25 -0
- package/dist/lib/services/table-views.service.d.ts.map +1 -0
- package/dist/lib/types/api-response.d.ts +21 -0
- package/dist/lib/types/api-response.d.ts.map +1 -0
- package/dist/lib/types/table-filter.d.ts +41 -0
- package/dist/lib/types/table-filter.d.ts.map +1 -0
- package/dist/lib/utils/axios.d.ts.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/motion.d.ts +2 -0
- package/dist/lib/utils/motion.d.ts.map +1 -0
- package/dist/lib/utils/slug.d.ts +7 -0
- package/dist/lib/utils/slug.d.ts.map +1 -0
- package/dist/plus.js +18 -0
- package/dist/plus.js.map +1 -0
- package/dist/popover.js +3 -299
- package/dist/popover.js.map +1 -1
- package/dist/proxy.js +11392 -0
- package/dist/proxy.js.map +1 -0
- package/dist/react-error-boundary.js +67 -0
- package/dist/react-error-boundary.js.map +1 -0
- package/dist/select2.js +116 -0
- package/dist/select2.js.map +1 -0
- package/dist/selects/app-code.js +37 -0
- package/dist/selects/app-code.js.map +1 -0
- package/dist/selects/app.js +2 -0
- package/dist/selects/app.js.map +1 -0
- package/dist/selects/cloud-provider.js +2 -0
- package/dist/selects/cloud-provider.js.map +1 -0
- package/dist/selects/currency.js +2 -0
- package/dist/selects/currency.js.map +1 -0
- package/dist/selects/deployment.js +2 -0
- package/dist/selects/deployment.js.map +1 -0
- package/dist/selects/feature.js +2 -0
- package/dist/selects/feature.js.map +1 -0
- package/dist/selects/industry.js +2 -0
- package/dist/selects/industry.js.map +1 -0
- package/dist/selects/locale.js +2 -0
- package/dist/selects/locale.js.map +1 -0
- package/dist/selects/microfrontend.js +2 -0
- package/dist/selects/microfrontend.js.map +1 -0
- package/dist/selects/plan.js +2 -0
- package/dist/selects/plan.js.map +1 -0
- package/dist/selects/region.js +2 -0
- package/dist/selects/region.js.map +1 -0
- package/dist/selects/timezone.js +2 -0
- package/dist/selects/timezone.js.map +1 -0
- package/dist/separator2.js +2 -28
- package/dist/separator2.js.map +1 -1
- package/dist/shadcn/index.d.ts +2 -0
- package/dist/shadcn/index.d.ts.map +1 -1
- package/dist/shadcn/shadcnBreadcrumb/breadcrumb.d.ts +18 -0
- package/dist/shadcn/shadcnBreadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/shadcn/shadcnBreadcrumb/index.d.ts +2 -0
- package/dist/shadcn/shadcnBreadcrumb/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnCalendar/calendar.d.ts +1 -1
- package/dist/shadcn/shadcnCalendar/calendar.d.ts.map +1 -1
- package/dist/shadcn/shadcnChart/Chart.d.ts +2 -2
- package/dist/shadcn/shadcnChart/Chart.d.ts.map +1 -1
- package/dist/shadcn/shadcnCollapsible/collapsible.d.ts +7 -0
- package/dist/shadcn/shadcnCollapsible/collapsible.d.ts.map +1 -0
- package/dist/shadcn/shadcnCollapsible/index.d.ts +2 -0
- package/dist/shadcn/shadcnCollapsible/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnDialog/dialog.d.ts +20 -0
- package/dist/shadcn/shadcnDialog/dialog.d.ts.map +1 -0
- package/dist/shadcn/shadcnDialog/index.d.ts +2 -0
- package/dist/shadcn/shadcnDialog/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnDropdownMenu/dropdown-menu.d.ts +1 -1
- package/dist/shadcn/shadcnDropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/shadcn/shadcnForm/form.d.ts +1 -1
- package/dist/shadcn/shadcnForm/form.d.ts.map +1 -1
- package/dist/shadcn/shadcnInputOTP/InputOTP.d.ts +1 -1
- package/dist/shadcn/shadcnInputOTP/InputOTP.d.ts.map +1 -1
- package/dist/shadcn/shadcnMultiSelect/multi-select.d.ts +1 -1
- package/dist/shadcn/shadcnMultiSelect/multi-select.d.ts.map +1 -1
- package/dist/shadcn/shadcnProgress/Progress.d.ts +1 -1
- package/dist/shadcn/shadcnProgress/Progress.d.ts.map +1 -1
- package/dist/shadcn/shadcnRadioGroup/RadioGroup.d.ts +6 -0
- package/dist/shadcn/shadcnRadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/shadcn/shadcnRadioGroup/index.d.ts +2 -0
- package/dist/shadcn/shadcnRadioGroup/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnSheet/sheet.d.ts +1 -1
- package/dist/shadcn/shadcnSheet/sheet.d.ts.map +1 -1
- package/dist/shadcn/shadcnSidebar/index.d.ts +2 -0
- package/dist/shadcn/shadcnSidebar/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnSidebar/sidebar.d.ts +86 -0
- package/dist/shadcn/shadcnSidebar/sidebar.d.ts.map +1 -0
- package/dist/shadcn/shadcnSingleSelect/single-select.d.ts +2 -1
- package/dist/shadcn/shadcnSingleSelect/single-select.d.ts.map +1 -1
- package/dist/shadcn/shadcnSwitch/Switch.d.ts.map +1 -1
- package/dist/shadcn/shadcnTable/table.d.ts +1 -1
- package/dist/shadcn/shadcnTable/table.d.ts.map +1 -1
- package/dist/shadcn/shadcnTabs/index.d.ts +2 -0
- package/dist/shadcn/shadcnTabs/index.d.ts.map +1 -0
- package/dist/shadcn/shadcnTabs/tabs.d.ts +8 -0
- package/dist/shadcn/shadcnTabs/tabs.d.ts.map +1 -0
- package/dist/shadcn/shadcnTooltip/tooltip.d.ts +1 -1
- package/dist/shadcn/shadcnTooltip/tooltip.d.ts.map +1 -1
- package/dist/share-2.js +42 -0
- package/dist/share-2.js.map +1 -0
- package/dist/text-align-justify.js +34 -0
- package/dist/text-align-justify.js.map +1 -0
- package/dist/trash-2.js +55 -0
- package/dist/trash-2.js.map +1 -0
- package/dist/types/api-response.js +2 -0
- package/dist/types/api-response.js.map +1 -0
- package/dist/types/table-filter.js +17 -0
- package/dist/types/table-filter.js.map +1 -0
- package/dist/upload.js +19 -0
- package/dist/upload.js.map +1 -0
- package/dist/useConfirm.js +37 -0
- package/dist/useConfirm.js.map +1 -0
- package/dist/useDataTable.js +26545 -0
- package/dist/useDataTable.js.map +1 -0
- package/dist/useIsMobile.js +19 -0
- package/dist/useIsMobile.js.map +1 -0
- package/dist/{useSSE.js → useTimer.js} +33 -3
- package/dist/useTimer.js.map +1 -0
- package/dist/utils/axios.js +2 -4167
- package/dist/utils/axios.js.map +1 -1
- package/dist/utils/motion.js +4425 -0
- package/dist/utils/motion.js.map +1 -0
- package/dist/utils/slug.js +15 -0
- package/dist/utils/slug.js.map +1 -0
- package/dist/utils.js +3137 -3750
- package/dist/utils.js.map +1 -1
- package/dist/value.js +820 -0
- package/dist/value.js.map +1 -0
- package/package.json +186 -3
- package/dist/lib/components/DataTable/components/DataTableToolbar.d.ts +0 -15
- package/dist/lib/components/DataTable/components/DataTableToolbar.d.ts.map +0 -1
- package/dist/useSSE.js.map +0 -1
- package/dist/utils2.js +0 -3042
- package/dist/utils2.js.map +0 -1
package/dist/Select.js
ADDED
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { memo, forwardRef, useState, useMemo, useRef, useId, useCallback, useEffect } from 'react';
|
|
4
|
+
import { F as Field, e as FieldLabel, b as FieldDescription, c as FieldError } from './field.js';
|
|
5
|
+
import { c as cn } from './utils.js';
|
|
6
|
+
import { b as PopoverContent, P as Popover, a as PopoverTrigger } from './popover.js';
|
|
7
|
+
import { C as Checkbox } from './Checkbox2.js';
|
|
8
|
+
import { k as Search, S as SingleSelect } from './SingleSelect.js';
|
|
9
|
+
import { C as ChevronDown } from './index4.js';
|
|
10
|
+
import { L as LoaderCircle } from './loader-circle.js';
|
|
11
|
+
import { B as Badge } from './Badge2.js';
|
|
12
|
+
import { X } from './x.js';
|
|
13
|
+
import { useQuery, keepPreviousData, useInfiniteQuery } from '@tanstack/react-query';
|
|
14
|
+
import { a as axios } from './axios.js';
|
|
15
|
+
|
|
16
|
+
function MultiSelectRoot({ open, onOpenChange, disabled, children }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Popover, { "data-slot": "multi-select", open: disabled ? false : open, onOpenChange: disabled ? void 0 : onOpenChange, children });
|
|
18
|
+
}
|
|
19
|
+
const MultiSelectTrigger = forwardRef(
|
|
20
|
+
({ className, children, disabled, open, listboxId, ...props }, ref) => {
|
|
21
|
+
return /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
type: "button",
|
|
26
|
+
"data-slot": "multi-select-trigger",
|
|
27
|
+
role: "combobox",
|
|
28
|
+
"aria-expanded": open ?? false,
|
|
29
|
+
"aria-haspopup": "listbox",
|
|
30
|
+
"aria-controls": listboxId,
|
|
31
|
+
disabled,
|
|
32
|
+
className: cn(
|
|
33
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
34
|
+
"min-h-9",
|
|
35
|
+
className
|
|
36
|
+
),
|
|
37
|
+
...props,
|
|
38
|
+
children: [
|
|
39
|
+
children,
|
|
40
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 opacity-50" })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
) });
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
MultiSelectTrigger.displayName = "MultiSelectTrigger";
|
|
47
|
+
function MultiSelectContent({ className, children, align = "start", ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
PopoverContent,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "multi-select-content",
|
|
52
|
+
align,
|
|
53
|
+
className: cn("w-[var(--radix-popover-trigger-width)] p-0", className),
|
|
54
|
+
...props,
|
|
55
|
+
children
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function MultiSelectSearch({ value, onValueChange, placeholder = "Search...", className }) {
|
|
60
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "multi-select-search", className: cn("flex items-center gap-2 border-b px-3", className), children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"input",
|
|
64
|
+
{
|
|
65
|
+
type: "text",
|
|
66
|
+
"aria-label": "Search options",
|
|
67
|
+
value,
|
|
68
|
+
onChange: (e) => onValueChange(e.target.value),
|
|
69
|
+
placeholder,
|
|
70
|
+
className: "flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
function MultiSelectActions({ onSelectAll, onClear, disabled, className }) {
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "multi-select-actions",
|
|
80
|
+
className: cn("flex items-center justify-between border-t px-3 py-1.5", className),
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
disabled,
|
|
87
|
+
className: "text-xs font-medium text-primary hover:text-primary/80 disabled:pointer-events-none disabled:opacity-50",
|
|
88
|
+
onClick: onSelectAll,
|
|
89
|
+
children: "Select All"
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
disabled,
|
|
97
|
+
className: "text-xs font-medium text-muted-foreground hover:text-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
98
|
+
onClick: onClear,
|
|
99
|
+
children: "Clear"
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function MultiSelectList({ className, children, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "multi-select-list",
|
|
111
|
+
role: "listbox",
|
|
112
|
+
"aria-multiselectable": "true",
|
|
113
|
+
className: cn("max-h-60 overflow-y-auto p-1", className),
|
|
114
|
+
...props,
|
|
115
|
+
children
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
const MultiSelectRow = memo(function MultiSelectRow2({
|
|
120
|
+
name,
|
|
121
|
+
checked,
|
|
122
|
+
onToggle,
|
|
123
|
+
disabled,
|
|
124
|
+
className
|
|
125
|
+
}) {
|
|
126
|
+
function handleClick() {
|
|
127
|
+
if (!disabled) {
|
|
128
|
+
onToggle();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function handleKeyDown(e) {
|
|
132
|
+
if (disabled) return;
|
|
133
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
onToggle();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return /* @__PURE__ */ jsxs(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "multi-select-row",
|
|
142
|
+
role: "option",
|
|
143
|
+
"aria-selected": checked,
|
|
144
|
+
"aria-disabled": disabled,
|
|
145
|
+
tabIndex: disabled ? void 0 : 0,
|
|
146
|
+
className: cn(
|
|
147
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none",
|
|
148
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
149
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
"data-disabled": disabled ? "" : void 0,
|
|
153
|
+
onClick: handleClick,
|
|
154
|
+
onKeyDown: handleKeyDown,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ jsx(
|
|
157
|
+
Checkbox,
|
|
158
|
+
{
|
|
159
|
+
checked,
|
|
160
|
+
onCheckedChange: () => onToggle(),
|
|
161
|
+
disabled,
|
|
162
|
+
tabIndex: -1,
|
|
163
|
+
"aria-hidden": "true"
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: name })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
function MultiSelectGroup({ className, children, ...props }) {
|
|
172
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "multi-select-group", role: "group", className: cn(className), ...props, children });
|
|
173
|
+
}
|
|
174
|
+
function MultiSelectGroupLabel({ className, children, ...props }) {
|
|
175
|
+
return /* @__PURE__ */ jsx(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
"data-slot": "multi-select-group-label",
|
|
179
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
180
|
+
...props,
|
|
181
|
+
children
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
function MultiSelectEmpty({ children, className }) {
|
|
186
|
+
return /* @__PURE__ */ jsx(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
"data-slot": "multi-select-empty",
|
|
190
|
+
className: cn("flex items-center justify-center py-6 text-sm text-muted-foreground", className),
|
|
191
|
+
children: children ?? "No options found."
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function useMultiSelect({
|
|
197
|
+
options,
|
|
198
|
+
groups,
|
|
199
|
+
value: controlledValue,
|
|
200
|
+
onChange,
|
|
201
|
+
onOptionsSelect,
|
|
202
|
+
defaultValue,
|
|
203
|
+
remoteSearch
|
|
204
|
+
}) {
|
|
205
|
+
const isControlled = controlledValue !== void 0;
|
|
206
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? []);
|
|
207
|
+
const selectedValues = isControlled ? controlledValue : internalValue;
|
|
208
|
+
const selectedSet = useMemo(() => new Set(selectedValues), [selectedValues]);
|
|
209
|
+
const selectedValuesRef = useRef(selectedValues);
|
|
210
|
+
selectedValuesRef.current = selectedValues;
|
|
211
|
+
const [open, setOpen] = useState(false);
|
|
212
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
213
|
+
const listboxId = useId();
|
|
214
|
+
const optionMap = useMemo(() => {
|
|
215
|
+
const map = /* @__PURE__ */ new Map();
|
|
216
|
+
for (const option of options) {
|
|
217
|
+
map.set(option.value, option);
|
|
218
|
+
}
|
|
219
|
+
return map;
|
|
220
|
+
}, [options]);
|
|
221
|
+
const filteredOptions = useMemo(() => {
|
|
222
|
+
if (remoteSearch || !searchQuery) return options;
|
|
223
|
+
const lower = searchQuery.toLowerCase();
|
|
224
|
+
return options.filter((option) => option.label.toLowerCase().includes(lower));
|
|
225
|
+
}, [options, searchQuery, remoteSearch]);
|
|
226
|
+
const updateSelection = useCallback(
|
|
227
|
+
(nextValues) => {
|
|
228
|
+
if (!isControlled) {
|
|
229
|
+
setInternalValue(nextValues);
|
|
230
|
+
}
|
|
231
|
+
onChange?.(nextValues);
|
|
232
|
+
},
|
|
233
|
+
[isControlled, onChange]
|
|
234
|
+
);
|
|
235
|
+
const toggleOption = useCallback(
|
|
236
|
+
(optionValue) => {
|
|
237
|
+
const option = optionMap.get(optionValue);
|
|
238
|
+
if (option?.disabled) return;
|
|
239
|
+
const current = selectedValuesRef.current;
|
|
240
|
+
const nextValues = current.includes(optionValue) ? current.filter((v) => v !== optionValue) : [...current, optionValue];
|
|
241
|
+
const nextOptions = nextValues.map((v) => optionMap.get(v)).filter(Boolean);
|
|
242
|
+
onOptionsSelect?.(nextOptions);
|
|
243
|
+
updateSelection(nextValues);
|
|
244
|
+
},
|
|
245
|
+
[optionMap, updateSelection, onOptionsSelect]
|
|
246
|
+
);
|
|
247
|
+
const selectAll = useCallback(() => {
|
|
248
|
+
const enabledValues = options.filter((o) => !o.disabled).map((o) => o.value);
|
|
249
|
+
const currentDisabledValues = selectedValuesRef.current.filter((v) => optionMap.get(v)?.disabled);
|
|
250
|
+
const nextValues = [.../* @__PURE__ */ new Set([...currentDisabledValues, ...enabledValues])];
|
|
251
|
+
const nextOptions = nextValues.map((v) => optionMap.get(v)).filter(Boolean);
|
|
252
|
+
onOptionsSelect?.(nextOptions);
|
|
253
|
+
updateSelection(nextValues);
|
|
254
|
+
}, [options, optionMap, updateSelection, onOptionsSelect]);
|
|
255
|
+
const clearAll = useCallback(() => {
|
|
256
|
+
const currentDisabledValues = selectedValuesRef.current.filter((v) => optionMap.get(v)?.disabled);
|
|
257
|
+
const remainingOptions = currentDisabledValues.map((v) => optionMap.get(v)).filter(Boolean);
|
|
258
|
+
onOptionsSelect?.(remainingOptions);
|
|
259
|
+
updateSelection(currentDisabledValues);
|
|
260
|
+
}, [optionMap, updateSelection, onOptionsSelect]);
|
|
261
|
+
useEffect(() => {
|
|
262
|
+
if (!open) {
|
|
263
|
+
setSearchQuery("");
|
|
264
|
+
}
|
|
265
|
+
}, [open]);
|
|
266
|
+
const selectedOptions = useMemo(
|
|
267
|
+
() => selectedValues.map((v) => optionMap.get(v)).filter(Boolean),
|
|
268
|
+
[selectedValues, optionMap]
|
|
269
|
+
);
|
|
270
|
+
const grouped = useMemo(() => {
|
|
271
|
+
if (!groups || groups.length === 0) return null;
|
|
272
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
273
|
+
for (const g of groups) {
|
|
274
|
+
buckets.set(g.id, []);
|
|
275
|
+
}
|
|
276
|
+
const ungrouped = [];
|
|
277
|
+
for (const option of filteredOptions) {
|
|
278
|
+
const bucket = option.groupId != null ? buckets.get(option.groupId) : void 0;
|
|
279
|
+
if (bucket) {
|
|
280
|
+
bucket.push(option);
|
|
281
|
+
} else {
|
|
282
|
+
ungrouped.push(option);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const entries = [];
|
|
286
|
+
for (const g of groups) {
|
|
287
|
+
const bucket = buckets.get(g.id);
|
|
288
|
+
if (!bucket || bucket.length === 0) continue;
|
|
289
|
+
entries.push({ name: g.name, options: bucket });
|
|
290
|
+
}
|
|
291
|
+
return { ungrouped, entries };
|
|
292
|
+
}, [filteredOptions, groups]);
|
|
293
|
+
return {
|
|
294
|
+
selectedValues,
|
|
295
|
+
selectedSet,
|
|
296
|
+
selectedOptions,
|
|
297
|
+
open,
|
|
298
|
+
setOpen,
|
|
299
|
+
searchQuery,
|
|
300
|
+
setSearchQuery,
|
|
301
|
+
listboxId,
|
|
302
|
+
filteredOptions,
|
|
303
|
+
grouped,
|
|
304
|
+
toggleOption,
|
|
305
|
+
selectAll,
|
|
306
|
+
clearAll
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const MultiSelect = forwardRef(
|
|
311
|
+
({
|
|
312
|
+
label,
|
|
313
|
+
description,
|
|
314
|
+
error,
|
|
315
|
+
placeholder = "Select options",
|
|
316
|
+
options,
|
|
317
|
+
groups,
|
|
318
|
+
value: controlledValue,
|
|
319
|
+
onChange,
|
|
320
|
+
onOptionsSelect,
|
|
321
|
+
onBlur,
|
|
322
|
+
name,
|
|
323
|
+
disabled = false,
|
|
324
|
+
required,
|
|
325
|
+
className,
|
|
326
|
+
id,
|
|
327
|
+
defaultValue,
|
|
328
|
+
maxDisplayedItems = 3,
|
|
329
|
+
searchable = false,
|
|
330
|
+
searchPlaceholder = "Search...",
|
|
331
|
+
asyncState,
|
|
332
|
+
onOpenChange
|
|
333
|
+
}, ref) => {
|
|
334
|
+
const state = useMultiSelect({
|
|
335
|
+
options: options ?? [],
|
|
336
|
+
groups,
|
|
337
|
+
value: controlledValue,
|
|
338
|
+
onChange,
|
|
339
|
+
onOptionsSelect,
|
|
340
|
+
defaultValue,
|
|
341
|
+
remoteSearch: !!asyncState
|
|
342
|
+
});
|
|
343
|
+
function handleOpenChange(o) {
|
|
344
|
+
state.setOpen(o);
|
|
345
|
+
onOpenChange?.(o);
|
|
346
|
+
if (!o) asyncState?.setSearchQuery("");
|
|
347
|
+
}
|
|
348
|
+
const searchValue = asyncState ? asyncState.searchQuery : state.searchQuery;
|
|
349
|
+
const setSearchValue = asyncState ? asyncState.setSearchQuery : state.setSearchQuery;
|
|
350
|
+
const showSearch = !!asyncState || searchable;
|
|
351
|
+
function renderRow(option) {
|
|
352
|
+
return /* @__PURE__ */ jsx(
|
|
353
|
+
MultiSelectRow,
|
|
354
|
+
{
|
|
355
|
+
name: option.label,
|
|
356
|
+
checked: state.selectedSet.has(option.value),
|
|
357
|
+
onToggle: () => {
|
|
358
|
+
state.toggleOption(option.value);
|
|
359
|
+
},
|
|
360
|
+
disabled: option.disabled
|
|
361
|
+
},
|
|
362
|
+
String(option.value)
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
function renderOptions() {
|
|
366
|
+
if (asyncState?.loading) {
|
|
367
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-6", children: [
|
|
368
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "size-4 animate-spin text-muted-foreground" }),
|
|
369
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
370
|
+
] });
|
|
371
|
+
}
|
|
372
|
+
if (state.filteredOptions.length === 0) {
|
|
373
|
+
return /* @__PURE__ */ jsx(MultiSelectEmpty, {});
|
|
374
|
+
}
|
|
375
|
+
if (!state.grouped) {
|
|
376
|
+
return state.filteredOptions.map(renderRow);
|
|
377
|
+
}
|
|
378
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
379
|
+
state.grouped.ungrouped.map(renderRow),
|
|
380
|
+
state.grouped.entries.map((entry) => /* @__PURE__ */ jsxs(MultiSelectGroup, { children: [
|
|
381
|
+
/* @__PURE__ */ jsx(MultiSelectGroupLabel, { children: entry.name }),
|
|
382
|
+
entry.options.map(renderRow)
|
|
383
|
+
] }, entry.name))
|
|
384
|
+
] });
|
|
385
|
+
}
|
|
386
|
+
function renderTriggerContent() {
|
|
387
|
+
if (state.selectedOptions.length === 0) {
|
|
388
|
+
return /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder });
|
|
389
|
+
}
|
|
390
|
+
if (state.selectedOptions.length > maxDisplayedItems) {
|
|
391
|
+
return /* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
|
|
392
|
+
state.selectedOptions.length,
|
|
393
|
+
" items selected"
|
|
394
|
+
] });
|
|
395
|
+
}
|
|
396
|
+
return /* @__PURE__ */ jsx("span", { className: "flex flex-wrap items-center gap-1", children: state.selectedOptions.map((option) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "gap-1 pr-1", children: [
|
|
397
|
+
option.label,
|
|
398
|
+
/* @__PURE__ */ jsx(
|
|
399
|
+
"button",
|
|
400
|
+
{
|
|
401
|
+
type: "button",
|
|
402
|
+
"aria-label": `Remove ${option.label}`,
|
|
403
|
+
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
404
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
405
|
+
onClick: (e) => {
|
|
406
|
+
e.stopPropagation();
|
|
407
|
+
state.toggleOption(option.value);
|
|
408
|
+
},
|
|
409
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3 text-muted-foreground hover:text-foreground" })
|
|
410
|
+
}
|
|
411
|
+
)
|
|
412
|
+
] }, String(option.value))) });
|
|
413
|
+
}
|
|
414
|
+
return /* @__PURE__ */ jsxs(Field, { children: [
|
|
415
|
+
label && /* @__PURE__ */ jsx(FieldLabel, { children: label }),
|
|
416
|
+
/* @__PURE__ */ jsxs(MultiSelectRoot, { open: state.open, onOpenChange: handleOpenChange, disabled, children: [
|
|
417
|
+
/* @__PURE__ */ jsx(
|
|
418
|
+
MultiSelectTrigger,
|
|
419
|
+
{
|
|
420
|
+
ref,
|
|
421
|
+
id,
|
|
422
|
+
open: state.open,
|
|
423
|
+
listboxId: state.listboxId,
|
|
424
|
+
"aria-invalid": !!error,
|
|
425
|
+
"aria-required": required,
|
|
426
|
+
disabled,
|
|
427
|
+
onBlur,
|
|
428
|
+
className,
|
|
429
|
+
children: /* @__PURE__ */ jsx("span", { className: "flex flex-1 flex-wrap items-center gap-1 overflow-hidden", children: renderTriggerContent() })
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
/* @__PURE__ */ jsxs(MultiSelectContent, { children: [
|
|
433
|
+
showSearch && /* @__PURE__ */ jsx(MultiSelectSearch, { value: searchValue, onValueChange: setSearchValue, placeholder: searchPlaceholder }),
|
|
434
|
+
/* @__PURE__ */ jsxs(MultiSelectList, { id: state.listboxId, children: [
|
|
435
|
+
renderOptions(),
|
|
436
|
+
asyncState?.hasMore && /* @__PURE__ */ jsx("div", { ref: asyncState.sentinelRef, className: "h-1" }),
|
|
437
|
+
asyncState?.loadingMore && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 py-2", children: [
|
|
438
|
+
/* @__PURE__ */ jsx(LoaderCircle, { className: "size-3 animate-spin text-muted-foreground" }),
|
|
439
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Loading more..." })
|
|
440
|
+
] })
|
|
441
|
+
] }),
|
|
442
|
+
/* @__PURE__ */ jsx(MultiSelectActions, { onSelectAll: state.selectAll, onClear: state.clearAll, disabled })
|
|
443
|
+
] })
|
|
444
|
+
] }),
|
|
445
|
+
name && state.selectedValues.map((v) => /* @__PURE__ */ jsx("input", { type: "hidden", name, value: String(v) }, String(v))),
|
|
446
|
+
description && !error && /* @__PURE__ */ jsx(FieldDescription, { children: description }),
|
|
447
|
+
error && /* @__PURE__ */ jsx(FieldError, { children: error })
|
|
448
|
+
] });
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
MultiSelect.displayName = "MultiSelect";
|
|
452
|
+
|
|
453
|
+
// src/observe.ts
|
|
454
|
+
var observerMap = /* @__PURE__ */ new Map();
|
|
455
|
+
var RootIds = /* @__PURE__ */ new WeakMap();
|
|
456
|
+
var rootId = 0;
|
|
457
|
+
var unsupportedValue;
|
|
458
|
+
function getRootId(root) {
|
|
459
|
+
if (!root) return "0";
|
|
460
|
+
if (RootIds.has(root)) return RootIds.get(root);
|
|
461
|
+
rootId += 1;
|
|
462
|
+
RootIds.set(root, rootId.toString());
|
|
463
|
+
return RootIds.get(root);
|
|
464
|
+
}
|
|
465
|
+
function optionsToId(options) {
|
|
466
|
+
return Object.keys(options).sort().filter(
|
|
467
|
+
(key) => options[key] !== void 0
|
|
468
|
+
).map((key) => {
|
|
469
|
+
return `${key}_${key === "root" ? getRootId(options.root) : options[key]}`;
|
|
470
|
+
}).toString();
|
|
471
|
+
}
|
|
472
|
+
function createObserver(options) {
|
|
473
|
+
const id = optionsToId(options);
|
|
474
|
+
let instance = observerMap.get(id);
|
|
475
|
+
if (!instance) {
|
|
476
|
+
const elements = /* @__PURE__ */ new Map();
|
|
477
|
+
let thresholds;
|
|
478
|
+
const observer = new IntersectionObserver((entries) => {
|
|
479
|
+
entries.forEach((entry) => {
|
|
480
|
+
var _a2;
|
|
481
|
+
const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);
|
|
482
|
+
if (options.trackVisibility && typeof entry.isVisible === "undefined") {
|
|
483
|
+
entry.isVisible = inView;
|
|
484
|
+
}
|
|
485
|
+
[...(_a2 = elements.get(entry.target)) != null ? _a2 : []].forEach((callback) => {
|
|
486
|
+
callback(inView, entry);
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
}, options);
|
|
490
|
+
thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);
|
|
491
|
+
instance = {
|
|
492
|
+
id,
|
|
493
|
+
observer,
|
|
494
|
+
elements
|
|
495
|
+
};
|
|
496
|
+
observerMap.set(id, instance);
|
|
497
|
+
}
|
|
498
|
+
return instance;
|
|
499
|
+
}
|
|
500
|
+
function observe(element, callback, options = {}, fallbackInView = unsupportedValue) {
|
|
501
|
+
if (typeof window.IntersectionObserver === "undefined" && fallbackInView !== void 0) {
|
|
502
|
+
const bounds = element.getBoundingClientRect();
|
|
503
|
+
callback(fallbackInView, {
|
|
504
|
+
isIntersecting: fallbackInView,
|
|
505
|
+
target: element,
|
|
506
|
+
intersectionRatio: typeof options.threshold === "number" ? options.threshold : 0,
|
|
507
|
+
time: 0,
|
|
508
|
+
boundingClientRect: bounds,
|
|
509
|
+
intersectionRect: bounds,
|
|
510
|
+
rootBounds: bounds
|
|
511
|
+
});
|
|
512
|
+
return () => {
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
const { id, observer, elements } = createObserver(options);
|
|
516
|
+
const callbacks = elements.get(element) || [];
|
|
517
|
+
if (!elements.has(element)) {
|
|
518
|
+
elements.set(element, callbacks);
|
|
519
|
+
}
|
|
520
|
+
callbacks.push(callback);
|
|
521
|
+
observer.observe(element);
|
|
522
|
+
return function unobserve() {
|
|
523
|
+
callbacks.splice(callbacks.indexOf(callback), 1);
|
|
524
|
+
if (callbacks.length === 0) {
|
|
525
|
+
elements.delete(element);
|
|
526
|
+
observer.unobserve(element);
|
|
527
|
+
}
|
|
528
|
+
if (elements.size === 0) {
|
|
529
|
+
observer.disconnect();
|
|
530
|
+
observerMap.delete(id);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function useInView({
|
|
535
|
+
threshold,
|
|
536
|
+
delay,
|
|
537
|
+
trackVisibility,
|
|
538
|
+
rootMargin,
|
|
539
|
+
root,
|
|
540
|
+
triggerOnce,
|
|
541
|
+
skip,
|
|
542
|
+
initialInView,
|
|
543
|
+
fallbackInView,
|
|
544
|
+
onChange
|
|
545
|
+
} = {}) {
|
|
546
|
+
var _a2;
|
|
547
|
+
const [ref, setRef] = React.useState(null);
|
|
548
|
+
const callback = React.useRef(onChange);
|
|
549
|
+
const lastInViewRef = React.useRef(initialInView);
|
|
550
|
+
const [state, setState] = React.useState({
|
|
551
|
+
inView: !!initialInView,
|
|
552
|
+
entry: void 0
|
|
553
|
+
});
|
|
554
|
+
callback.current = onChange;
|
|
555
|
+
React.useEffect(
|
|
556
|
+
() => {
|
|
557
|
+
if (lastInViewRef.current === void 0) {
|
|
558
|
+
lastInViewRef.current = initialInView;
|
|
559
|
+
}
|
|
560
|
+
if (skip || !ref) return;
|
|
561
|
+
let unobserve;
|
|
562
|
+
unobserve = observe(
|
|
563
|
+
ref,
|
|
564
|
+
(inView, entry) => {
|
|
565
|
+
const previousInView = lastInViewRef.current;
|
|
566
|
+
lastInViewRef.current = inView;
|
|
567
|
+
if (previousInView === void 0 && !inView) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
setState({
|
|
571
|
+
inView,
|
|
572
|
+
entry
|
|
573
|
+
});
|
|
574
|
+
if (callback.current) callback.current(inView, entry);
|
|
575
|
+
if (entry.isIntersecting && triggerOnce && unobserve) {
|
|
576
|
+
unobserve();
|
|
577
|
+
unobserve = void 0;
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
root,
|
|
582
|
+
rootMargin,
|
|
583
|
+
threshold,
|
|
584
|
+
// @ts-expect-error
|
|
585
|
+
trackVisibility,
|
|
586
|
+
delay
|
|
587
|
+
},
|
|
588
|
+
fallbackInView
|
|
589
|
+
);
|
|
590
|
+
return () => {
|
|
591
|
+
if (unobserve) {
|
|
592
|
+
unobserve();
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
// We break the rule here, because we aren't including the actual `threshold` variable
|
|
597
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
598
|
+
[
|
|
599
|
+
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
|
600
|
+
Array.isArray(threshold) ? threshold.toString() : threshold,
|
|
601
|
+
ref,
|
|
602
|
+
root,
|
|
603
|
+
rootMargin,
|
|
604
|
+
triggerOnce,
|
|
605
|
+
skip,
|
|
606
|
+
trackVisibility,
|
|
607
|
+
fallbackInView,
|
|
608
|
+
delay
|
|
609
|
+
]
|
|
610
|
+
);
|
|
611
|
+
const entryTarget = (_a2 = state.entry) == null ? void 0 : _a2.target;
|
|
612
|
+
const previousEntryTarget = React.useRef(void 0);
|
|
613
|
+
if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {
|
|
614
|
+
previousEntryTarget.current = entryTarget;
|
|
615
|
+
setState({
|
|
616
|
+
inView: !!initialInView,
|
|
617
|
+
entry: void 0
|
|
618
|
+
});
|
|
619
|
+
lastInViewRef.current = initialInView;
|
|
620
|
+
}
|
|
621
|
+
const result = [setRef, state.inView, state.entry];
|
|
622
|
+
result.ref = result[0];
|
|
623
|
+
result.inView = result[1];
|
|
624
|
+
result.entry = result[2];
|
|
625
|
+
return result;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
const NOOP_REF = () => {
|
|
629
|
+
};
|
|
630
|
+
function stableStringify(obj) {
|
|
631
|
+
if (!obj) return "";
|
|
632
|
+
return JSON.stringify(obj, Object.keys(obj).sort());
|
|
633
|
+
}
|
|
634
|
+
function useSelect({
|
|
635
|
+
options: staticOptions,
|
|
636
|
+
groups: staticGroups,
|
|
637
|
+
optionsEndpoint,
|
|
638
|
+
searchDebounceMs = 300,
|
|
639
|
+
limit = 20,
|
|
640
|
+
fieldKeys,
|
|
641
|
+
params,
|
|
642
|
+
selectedValues,
|
|
643
|
+
enabled
|
|
644
|
+
}) {
|
|
645
|
+
const isAsync = !!optionsEndpoint;
|
|
646
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
647
|
+
const [debouncedSearch, setDebouncedSearch] = useState("");
|
|
648
|
+
const debounceRef = useRef(null);
|
|
649
|
+
useEffect(() => {
|
|
650
|
+
if (!isAsync) return;
|
|
651
|
+
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
652
|
+
debounceRef.current = setTimeout(() => {
|
|
653
|
+
setDebouncedSearch(searchQuery);
|
|
654
|
+
}, searchDebounceMs);
|
|
655
|
+
return () => {
|
|
656
|
+
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
657
|
+
};
|
|
658
|
+
}, [searchQuery, searchDebounceMs, isAsync]);
|
|
659
|
+
const serializedValues = useMemo(
|
|
660
|
+
() => selectedValues && selectedValues.length > 0 ? selectedValues.filter((v) => typeof v !== "boolean").join(",") : void 0,
|
|
661
|
+
[selectedValues]
|
|
662
|
+
);
|
|
663
|
+
const { data: resolvedSelected } = useQuery({
|
|
664
|
+
queryKey: [
|
|
665
|
+
"select-resolve",
|
|
666
|
+
optionsEndpoint,
|
|
667
|
+
stableStringify(fieldKeys),
|
|
668
|
+
stableStringify(params),
|
|
669
|
+
JSON.stringify(selectedValues)
|
|
670
|
+
],
|
|
671
|
+
queryFn: () => axios.get(optionsEndpoint ?? "", {
|
|
672
|
+
params: { values: serializedValues, ...fieldKeys, ...params },
|
|
673
|
+
showSuccessToast: false,
|
|
674
|
+
showErrorToast: false
|
|
675
|
+
}).then((r) => r.data),
|
|
676
|
+
enabled: isAsync && (selectedValues?.length ?? 0) > 0,
|
|
677
|
+
staleTime: 5 * 6e4,
|
|
678
|
+
placeholderData: keepPreviousData
|
|
679
|
+
});
|
|
680
|
+
const { data, isFetching, isFetchingNextPage, fetchNextPage, hasNextPage } = useInfiniteQuery({
|
|
681
|
+
queryKey: ["select-search", optionsEndpoint, debouncedSearch, stableStringify(fieldKeys), stableStringify(params)],
|
|
682
|
+
queryFn: ({ pageParam = 0 }) => axios.get(optionsEndpoint ?? "", {
|
|
683
|
+
params: {
|
|
684
|
+
search: debouncedSearch || void 0,
|
|
685
|
+
limit,
|
|
686
|
+
offset: pageParam,
|
|
687
|
+
excludeIds: serializedValues,
|
|
688
|
+
...fieldKeys,
|
|
689
|
+
...params
|
|
690
|
+
},
|
|
691
|
+
showSuccessToast: false,
|
|
692
|
+
showErrorToast: false
|
|
693
|
+
}).then((r) => r.data),
|
|
694
|
+
getNextPageParam: (lastPage, _allPages, lastPageParam) => lastPage.hasMore ? lastPageParam + limit : void 0,
|
|
695
|
+
initialPageParam: 0,
|
|
696
|
+
enabled: isAsync && enabled !== false,
|
|
697
|
+
placeholderData: keepPreviousData
|
|
698
|
+
});
|
|
699
|
+
const fetchedOptions = useMemo(() => {
|
|
700
|
+
const searchResults = data?.pages.flatMap((p) => p.options) ?? [];
|
|
701
|
+
const selected = resolvedSelected?.options ?? [];
|
|
702
|
+
if (selected.length === 0) return searchResults;
|
|
703
|
+
const selectedIdSet = new Set(selected.map((o) => o.value));
|
|
704
|
+
const dedupedSearch = searchResults.filter((o) => !selectedIdSet.has(o.value));
|
|
705
|
+
return [...selected, ...dedupedSearch];
|
|
706
|
+
}, [resolvedSelected, data]);
|
|
707
|
+
const fetchedGroups = data?.pages[0]?.groups ?? staticGroups ?? [];
|
|
708
|
+
const { ref: sentinelRef, inView } = useInView();
|
|
709
|
+
useEffect(() => {
|
|
710
|
+
if (inView && hasNextPage && !isFetchingNextPage) {
|
|
711
|
+
fetchNextPage();
|
|
712
|
+
}
|
|
713
|
+
}, [inView, hasNextPage, isFetchingNextPage, fetchNextPage]);
|
|
714
|
+
if (!isAsync) {
|
|
715
|
+
return {
|
|
716
|
+
options: staticOptions ?? [],
|
|
717
|
+
groups: staticGroups ?? [],
|
|
718
|
+
loading: false,
|
|
719
|
+
loadingMore: false,
|
|
720
|
+
hasMore: false,
|
|
721
|
+
searchQuery,
|
|
722
|
+
setSearchQuery,
|
|
723
|
+
sentinelRef: NOOP_REF
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
return {
|
|
727
|
+
options: fetchedOptions,
|
|
728
|
+
groups: fetchedGroups,
|
|
729
|
+
loading: isFetching && !isFetchingNextPage,
|
|
730
|
+
loadingMore: isFetchingNextPage,
|
|
731
|
+
hasMore: hasNextPage ?? false,
|
|
732
|
+
searchQuery,
|
|
733
|
+
setSearchQuery,
|
|
734
|
+
sentinelRef
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
const Select = forwardRef((props, ref) => {
|
|
739
|
+
const { multiple, optionsEndpoint, searchDebounceMs, limit, fieldKeys, params, ...rest } = props;
|
|
740
|
+
const [openedForParams, setOpenedForParams] = useState(null);
|
|
741
|
+
const currentParamsKey = stableStringify(params);
|
|
742
|
+
const enabled = openedForParams === currentParamsKey;
|
|
743
|
+
const selectData = useSelect({
|
|
744
|
+
options: rest.options,
|
|
745
|
+
groups: rest.groups,
|
|
746
|
+
optionsEndpoint,
|
|
747
|
+
searchDebounceMs,
|
|
748
|
+
limit,
|
|
749
|
+
fieldKeys,
|
|
750
|
+
params,
|
|
751
|
+
selectedValues: rest.value != null ? Array.isArray(rest.value) ? rest.value : [rest.value] : void 0,
|
|
752
|
+
enabled
|
|
753
|
+
});
|
|
754
|
+
const isAsync = !!optionsEndpoint;
|
|
755
|
+
const asyncState = isAsync ? {
|
|
756
|
+
loading: selectData.loading,
|
|
757
|
+
loadingMore: selectData.loadingMore,
|
|
758
|
+
hasMore: selectData.hasMore,
|
|
759
|
+
searchQuery: selectData.searchQuery,
|
|
760
|
+
setSearchQuery: selectData.setSearchQuery,
|
|
761
|
+
sentinelRef: selectData.sentinelRef
|
|
762
|
+
} : void 0;
|
|
763
|
+
const childProps = {
|
|
764
|
+
...rest,
|
|
765
|
+
options: selectData.options,
|
|
766
|
+
groups: selectData.groups,
|
|
767
|
+
asyncState
|
|
768
|
+
};
|
|
769
|
+
const handleOpenChange = (o) => {
|
|
770
|
+
if (o && openedForParams !== currentParamsKey) setOpenedForParams(currentParamsKey);
|
|
771
|
+
};
|
|
772
|
+
if (multiple) {
|
|
773
|
+
return /* @__PURE__ */ jsx(MultiSelect, { ref, ...childProps, onOpenChange: handleOpenChange });
|
|
774
|
+
}
|
|
775
|
+
return /* @__PURE__ */ jsx(SingleSelect, { ref, ...childProps, onOpenChange: handleOpenChange });
|
|
776
|
+
});
|
|
777
|
+
Select.displayName = "Select";
|
|
778
|
+
|
|
779
|
+
export { MultiSelect as M, Select as S, MultiSelectActions as a, MultiSelectContent as b, MultiSelectEmpty as c, MultiSelectGroup as d, MultiSelectGroupLabel as e, MultiSelectList as f, MultiSelectRoot as g, MultiSelectRow as h, MultiSelectSearch as i, MultiSelectTrigger as j, useMultiSelect as k, useSelect as u };
|
|
780
|
+
//# sourceMappingURL=Select.js.map
|