@px-ui/ui 1.0.11 → 1.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/dist/{avatar-cLlUF5Lz.d.ts → avatar-DTxH_yTY.d.ts} +6 -6
- package/dist/{avatar-cLlUF5Lz.d.ts.map → avatar-DTxH_yTY.d.ts.map} +1 -1
- package/dist/{avatar-a40DzPi3.js → avatar-DnDnGmSj.js} +4 -4
- package/dist/{avatar-a40DzPi3.js.map → avatar-DnDnGmSj.js.map} +1 -1
- package/dist/{button-BJ727apo.d.ts → button-Cfd9X6pX.d.ts} +6 -6
- package/dist/{button-BJ727apo.d.ts.map → button-Cfd9X6pX.d.ts.map} +1 -1
- package/dist/{button-Cp2S1spE.js → button-DnHwqwy0.js} +2 -2
- package/dist/{button-Cp2S1spE.js.map → button-DnHwqwy0.js.map} +1 -1
- package/dist/checkbox-CwkX29tL.js +22 -0
- package/dist/checkbox-CwkX29tL.js.map +1 -0
- package/dist/collapsible-DsrYXIW5.js +28 -0
- package/dist/collapsible-DsrYXIW5.js.map +1 -0
- package/dist/{combobox-Di5naqIR.js → combobox-5IAivvXw.js} +9 -9
- package/dist/{combobox-Di5naqIR.js.map → combobox-5IAivvXw.js.map} +1 -1
- package/dist/{combobox-B73nb6Tq.d.ts → combobox-BBMYGrI2.d.ts} +19 -19
- package/dist/{combobox-B73nb6Tq.d.ts.map → combobox-BBMYGrI2.d.ts.map} +1 -1
- package/dist/components/accordion.d.ts +5 -5
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert-dialog.d.ts +14 -14
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +3 -3
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +2 -2
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio.js +1 -1
- package/dist/components/attachment.d.ts +14 -14
- package/dist/components/attachment.js +3 -3
- package/dist/components/avatar-group.d.ts +4 -4
- package/dist/components/avatar-group.js +5 -5
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.d.ts +4 -4
- package/dist/components/badge.js +1 -1
- package/dist/components/breadcrumb.d.ts +7 -7
- package/dist/components/breadcrumb.js +2 -2
- package/dist/components/bubble.d.ts +7 -7
- package/dist/components/bubble.js +2 -2
- package/dist/components/button-group.d.ts +9 -9
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/calendar.d.ts +4 -4
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +2 -2
- package/dist/components/carousel.d.ts +7 -7
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +3 -3
- package/dist/components/chart.d.ts +5 -5
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +3 -21
- package/dist/components/collapsible.d.ts +4 -4
- package/dist/components/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible.js +3 -27
- package/dist/components/combobox.d.ts +2 -2
- package/dist/components/combobox.js +11 -11
- package/dist/components/command.d.ts +11 -11
- package/dist/components/command.js +7 -7
- package/dist/components/context-menu.d.ts +16 -16
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/components/currency-select-field.d.ts +4 -4
- package/dist/components/currency-select-field.d.ts.map +1 -1
- package/dist/components/currency-select-field.js +12 -12
- package/dist/components/dialog.d.ts +11 -11
- package/dist/components/dialog.js +3 -3
- package/dist/components/direction.js +1 -1
- package/dist/components/drawer.d.ts +11 -11
- package/dist/components/drawer.js +2 -2
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/editor-output.d.ts +87 -0
- package/dist/components/editor-output.d.ts.map +1 -0
- package/dist/components/editor-output.js +158 -0
- package/dist/components/editor-output.js.map +1 -0
- package/dist/components/empty.d.ts +7 -7
- package/dist/components/empty.js +3 -61
- package/dist/components/field.d.ts +16 -16
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +4 -4
- package/dist/components/file-upload-field.d.ts +3 -3
- package/dist/components/file-upload-field.js +6 -6
- package/dist/components/file-upload.d.ts +3 -3
- package/dist/components/file-upload.js +4 -4
- package/dist/components/hover-card.d.ts +4 -4
- package/dist/components/hover-card.js +1 -1
- package/dist/components/icon.d.ts +83 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +188 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/input-group.d.ts +11 -11
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-group.js +5 -5
- package/dist/components/input-otp.d.ts +5 -5
- package/dist/components/input-otp.js +2 -2
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +2 -2
- package/dist/components/item.d.ts +15 -15
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/item.js +3 -3
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +1 -1
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +2 -2
- package/dist/components/marker.d.ts +5 -5
- package/dist/components/marker.js +2 -2
- package/dist/components/menubar.d.ts +18 -18
- package/dist/components/menubar.d.ts.map +1 -1
- package/dist/components/menubar.js +8 -8
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/message-scroller.d.ts +8 -8
- package/dist/components/message-scroller.js +3 -3
- package/dist/components/message.d.ts +7 -7
- package/dist/components/message.js +2 -2
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.d.ts +11 -11
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/pagination.js +3 -3
- package/dist/components/phone-input.d.ts +2 -2
- package/dist/components/phone-input.js +2 -2
- package/dist/components/popover.d.ts +7 -7
- package/dist/components/popover.js +2 -2
- package/dist/components/progress.d.ts +6 -6
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +3 -3
- package/dist/components/radio-group.js +1 -1
- package/dist/components/resizable.d.ts +4 -4
- package/dist/components/resizable.js +1 -1
- package/dist/components/rich-text-editor.d.ts +204 -0
- package/dist/components/rich-text-editor.d.ts.map +1 -0
- package/dist/components/rich-text-editor.js +359 -0
- package/dist/components/rich-text-editor.js.map +1 -0
- package/dist/components/scroll-area.d.ts +13 -3
- package/dist/components/scroll-area.d.ts.map +1 -1
- package/dist/components/scroll-area.js +3 -38
- package/dist/components/select.d.ts +10 -10
- package/dist/components/select.js +2 -2
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +2 -2
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +3 -3
- package/dist/components/sidebar.d.ts +26 -26
- package/dist/components/sidebar.js +9 -9
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +2 -2
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/sortable-list.d.ts +153 -0
- package/dist/components/sortable-list.d.ts.map +1 -0
- package/dist/components/sortable-list.js +191 -0
- package/dist/components/sortable-list.js.map +1 -0
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +2 -2
- package/dist/components/stepper.d.ts +171 -0
- package/dist/components/stepper.d.ts.map +1 -0
- package/dist/components/stepper.js +281 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +2 -2
- package/dist/components/tabs.d.ts +7 -7
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +2 -2
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +3 -3
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +2 -2
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tree-select.d.ts +192 -0
- package/dist/components/tree-select.d.ts.map +1 -0
- package/dist/components/tree-select.js +421 -0
- package/dist/components/tree-select.js.map +1 -0
- package/dist/{dialog-B3HhbIdv.js → dialog-DuGJUPQl.js} +4 -4
- package/dist/{dialog-B3HhbIdv.js.map → dialog-DuGJUPQl.js.map} +1 -1
- package/dist/{dropdown-menu-vwX--mgm.js → dropdown-menu-BWEfcvmP.js} +20 -20
- package/dist/{dropdown-menu-vwX--mgm.js.map → dropdown-menu-BWEfcvmP.js.map} +1 -1
- package/dist/{dropdown-menu-C6n_oYre.d.ts → dropdown-menu-DGgfWYrK.d.ts} +17 -17
- package/dist/{dropdown-menu-C6n_oYre.d.ts.map → dropdown-menu-DGgfWYrK.d.ts.map} +1 -1
- package/dist/empty-U4zrLmFU.js +62 -0
- package/dist/empty-U4zrLmFU.js.map +1 -0
- package/dist/{file-upload-CGfXHKPZ.d.ts → file-upload-BvAtAxLc.d.ts} +13 -13
- package/dist/{file-upload-CGfXHKPZ.d.ts.map → file-upload-BvAtAxLc.d.ts.map} +1 -1
- package/dist/{file-upload-B0fHdUBL.js → file-upload-DU5FAkHm.js} +5 -5
- package/dist/{file-upload-B0fHdUBL.js.map → file-upload-DU5FAkHm.js.map} +1 -1
- package/dist/hooks/use-async-options.d.ts +1 -1
- package/dist/hooks/use-async-options.js +1 -1
- package/dist/hooks/use-debounce.js +1 -1
- package/dist/hooks/use-file-upload.d.ts +1 -1
- package/dist/hooks/use-file-upload.js +1 -1
- package/dist/hooks/use-infinite-scroll.d.ts +1 -1
- package/dist/hooks/use-infinite-scroll.js +2 -2
- package/dist/hooks/use-intersection-observer.d.ts +1 -1
- package/dist/hooks/use-intersection-observer.js +1 -1
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/{input-BtI3FvrB.d.ts → input-BExbcSu4.d.ts} +3 -3
- package/dist/input-BExbcSu4.d.ts.map +1 -0
- package/dist/{input-group-C78_1dEy.js → input-group-B5PMRYld.js} +6 -6
- package/dist/{input-group-C78_1dEy.js.map → input-group-B5PMRYld.js.map} +1 -1
- package/dist/{input-B-RCmrtR.js → input-jIoNIdLQ.js} +3 -3
- package/dist/{input-B-RCmrtR.js.map → input-jIoNIdLQ.js.map} +1 -1
- package/dist/label-BFg2hxuL.d.ts +11 -0
- package/dist/label-BFg2hxuL.d.ts.map +1 -0
- package/dist/{label-Cmlhz-uF.js → label-DsRhOKY_.js} +3 -3
- package/dist/{label-Cmlhz-uF.js.map → label-DsRhOKY_.js.map} +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/{popover-CsTnnBvx.js → popover-BGkU46G7.js} +3 -3
- package/dist/{popover-CsTnnBvx.js.map → popover-BGkU46G7.js.map} +1 -1
- package/dist/providers/px-ui-provider.d.ts +4 -4
- package/dist/providers/px-ui-provider.d.ts.map +1 -1
- package/dist/providers/px-ui-provider.js +4 -4
- package/dist/scroll-area-mNVMQ0Of.js +40 -0
- package/dist/scroll-area-mNVMQ0Of.js.map +1 -0
- package/dist/{separator-BQBOLUMc.js → separator-D0bew2D_.js} +2 -2
- package/dist/{separator-BQBOLUMc.js.map → separator-D0bew2D_.js.map} +1 -1
- package/dist/{separator-pyhTqgkN.d.ts → separator-Df76guaT.d.ts} +3 -3
- package/dist/{separator-pyhTqgkN.d.ts.map → separator-Df76guaT.d.ts.map} +1 -1
- package/dist/{sheet-Chg_afex.js → sheet-BB23q6wd.js} +4 -4
- package/dist/{sheet-Chg_afex.js.map → sheet-BB23q6wd.js.map} +1 -1
- package/dist/{skeleton-J879XBBA.js → skeleton-knxLhbA5.js} +2 -2
- package/dist/{skeleton-J879XBBA.js.map → skeleton-knxLhbA5.js.map} +1 -1
- package/dist/{spinner-C7yzrK_s.js → spinner-9MdgLDTZ.js} +2 -2
- package/dist/{spinner-C7yzrK_s.js.map → spinner-9MdgLDTZ.js.map} +1 -1
- package/dist/{textarea-CaHmr0re.js → textarea-hZg0gA8u.js} +3 -3
- package/dist/{textarea-CaHmr0re.js.map → textarea-hZg0gA8u.js.map} +1 -1
- package/dist/{toast-BrPEQywl.js → toast-BdxoP8vz.js} +4 -4
- package/dist/{toast-BrPEQywl.js.map → toast-BdxoP8vz.js.map} +1 -1
- package/dist/{toast-CSU7vJkV.d.ts → toast-C5FRpq1P.d.ts} +5 -5
- package/dist/{toast-CSU7vJkV.d.ts.map → toast-C5FRpq1P.d.ts.map} +1 -1
- package/dist/{toggle-CA4KsgWs.js → toggle-BZXrLBLK.js} +2 -2
- package/dist/{toggle-CA4KsgWs.js.map → toggle-BZXrLBLK.js.map} +1 -1
- package/dist/{toggle-gjMAPmkg.d.ts → toggle-CyTngkhT.d.ts} +6 -6
- package/dist/{toggle-gjMAPmkg.d.ts.map → toggle-CyTngkhT.d.ts.map} +1 -1
- package/dist/{tooltip-7bptiThf.d.ts → tooltip-CkX3CD71.d.ts} +6 -6
- package/dist/{tooltip-7bptiThf.d.ts.map → tooltip-CkX3CD71.d.ts.map} +1 -1
- package/dist/{tooltip-BhxGE3Gb.js → tooltip-Dsfn_zZD.js} +2 -2
- package/dist/{tooltip-BhxGE3Gb.js.map → tooltip-Dsfn_zZD.js.map} +1 -1
- package/dist/{use-async-options-rNdyxIrQ.d.ts → use-async-options-DdyHJxHh.d.ts} +1 -1
- package/dist/{use-async-options-rNdyxIrQ.d.ts.map → use-async-options-DdyHJxHh.d.ts.map} +1 -1
- package/dist/{use-async-options-CtB4wZrr.js → use-async-options-tueAuVs_.js} +1 -1
- package/dist/{use-async-options-CtB4wZrr.js.map → use-async-options-tueAuVs_.js.map} +1 -1
- package/dist/{use-debounce--Lv1ABSa.js → use-debounce-7gIeOwla.js} +1 -1
- package/dist/{use-debounce--Lv1ABSa.js.map → use-debounce-7gIeOwla.js.map} +1 -1
- package/dist/{use-file-upload-Cbb_9kTw.d.ts → use-file-upload-Bc7CyQ7O.d.ts} +1 -1
- package/dist/{use-file-upload-Cbb_9kTw.d.ts.map → use-file-upload-Bc7CyQ7O.d.ts.map} +1 -1
- package/dist/{use-file-upload-BbERd3Nw.js → use-file-upload-DQD1vY_Z.js} +1 -1
- package/dist/{use-file-upload-BbERd3Nw.js.map → use-file-upload-DQD1vY_Z.js.map} +1 -1
- package/dist/{use-infinite-scroll-CC_Guyvn.js → use-infinite-scroll-HpeMA2MK.js} +2 -2
- package/dist/{use-infinite-scroll-CC_Guyvn.js.map → use-infinite-scroll-HpeMA2MK.js.map} +1 -1
- package/dist/{use-intersection-observer-CgAaXczI.d.ts → use-intersection-observer-DNPextJs.d.ts} +1 -1
- package/dist/{use-intersection-observer-CgAaXczI.d.ts.map → use-intersection-observer-DNPextJs.d.ts.map} +1 -1
- package/dist/{use-intersection-observer-S0wsPmhF.js → use-intersection-observer-rlKEjyL1.js} +1 -1
- package/dist/{use-intersection-observer-S0wsPmhF.js.map → use-intersection-observer-rlKEjyL1.js.map} +1 -1
- package/dist/{use-mobile--NaMWuCj.js → use-mobile-DUqQzj2D.js} +1 -1
- package/dist/{use-mobile--NaMWuCj.js.map → use-mobile-DUqQzj2D.js.map} +1 -1
- package/dist/{utils-DeIaBj75.js → utils-DUlptRpf.js} +1 -1
- package/dist/{utils-DeIaBj75.js.map → utils-DUlptRpf.js.map} +1 -1
- package/package.json +60 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/collapsible.js.map +0 -1
- package/dist/components/empty.js.map +0 -1
- package/dist/components/scroll-area.js.map +0 -1
- package/dist/input-BtI3FvrB.d.ts.map +0 -1
- package/dist/label-BnSHwOyi.d.ts +0 -11
- package/dist/label-BnSHwOyi.d.ts.map +0 -1
- /package/dist/{direction-ZS2Hta3v.js → direction-DFPbwDSF.js} +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { t as Button } from "../button-Cfd9X6pX.js";
|
|
2
|
+
import * as react_jsx_runtime228 from "react/jsx-runtime";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { DndContextProps, UniqueIdentifier } from "@dnd-kit/core";
|
|
5
|
+
import { SortingStrategy } from "@dnd-kit/sortable";
|
|
6
|
+
|
|
7
|
+
//#region src/components/sortable-list.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Minimal shape every sortable item must satisfy: a stable, unique `id`.
|
|
11
|
+
* Items may carry any additional fields — `SortableList` only reads `id`.
|
|
12
|
+
*/
|
|
13
|
+
interface SortableListItem {
|
|
14
|
+
/** Stable unique identifier used for drag tracking and reordering. */
|
|
15
|
+
id: UniqueIdentifier;
|
|
16
|
+
}
|
|
17
|
+
interface SortableListProps<TItem extends SortableListItem> {
|
|
18
|
+
/**
|
|
19
|
+
* The ordered list of items to render. The order of this array is the
|
|
20
|
+
* source of truth for the rendered order.
|
|
21
|
+
*/
|
|
22
|
+
items: ReadonlyArray<TItem>;
|
|
23
|
+
/**
|
|
24
|
+
* Called when the user finishes a drag (or keyboard reorder) that changes
|
|
25
|
+
* the order. Receives the full re-ordered array — wire this to your state.
|
|
26
|
+
*/
|
|
27
|
+
onReorder: (newOrder: TItem[]) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Render a single item. The returned node is expected to render a
|
|
30
|
+
* {@link SortableItem} (directly or nested) keyed/identified by `item.id`.
|
|
31
|
+
*/
|
|
32
|
+
renderItem: (item: TItem, index: number) => React$1.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Sorting strategy passed to the underlying `SortableContext`.
|
|
35
|
+
* @default verticalListSortingStrategy
|
|
36
|
+
*/
|
|
37
|
+
strategy?: SortingStrategy;
|
|
38
|
+
/**
|
|
39
|
+
* Disable all dragging for the whole list.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Additional props forwarded to the underlying dnd-kit `DndContext`
|
|
45
|
+
* (e.g. accessibility announcements). Providing `modifiers` *replaces* the
|
|
46
|
+
* default vertical-axis restriction — pass your own (e.g.
|
|
47
|
+
* `restrictToHorizontalAxis`, alongside a matching `strategy`) for
|
|
48
|
+
* non-vertical layouts, or `[]` to remove axis locking entirely.
|
|
49
|
+
*/
|
|
50
|
+
dndContextProps?: Omit<DndContextProps, "sensors" | "collisionDetection" | "onDragEnd">;
|
|
51
|
+
/** Additional className for the list container. */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** Props forwarded to the list container element. */
|
|
54
|
+
containerProps?: React$1.ComponentProps<"div">;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Drag-and-drop sortable list. Wraps dnd-kit's `DndContext` +
|
|
58
|
+
* `SortableContext`, wires pointer and keyboard sensors, and restricts
|
|
59
|
+
* movement to the vertical axis. Fully keyboard-operable.
|
|
60
|
+
*
|
|
61
|
+
* This is a generic foundation primitive: it owns ordering/DnD plumbing and
|
|
62
|
+
* delegates the visual rendering of each row to `renderItem`, which should
|
|
63
|
+
* render a {@link SortableItem} (with an optional {@link SortableDragHandle}).
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* const [items, setItems] = React.useState([
|
|
68
|
+
* { id: "1", label: "First" },
|
|
69
|
+
* { id: "2", label: "Second" },
|
|
70
|
+
* { id: "3", label: "Third" },
|
|
71
|
+
* ]);
|
|
72
|
+
*
|
|
73
|
+
* <SortableList
|
|
74
|
+
* items={items}
|
|
75
|
+
* onReorder={setItems}
|
|
76
|
+
* renderItem={(item) => (
|
|
77
|
+
* <SortableItem id={item.id} className="rounded-md border p-3">
|
|
78
|
+
* <SortableDragHandle />
|
|
79
|
+
* <span>{item.label}</span>
|
|
80
|
+
* </SortableItem>
|
|
81
|
+
* )}
|
|
82
|
+
* />
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
declare function SortableList<TItem extends SortableListItem>({
|
|
86
|
+
items,
|
|
87
|
+
onReorder,
|
|
88
|
+
renderItem,
|
|
89
|
+
strategy,
|
|
90
|
+
disabled,
|
|
91
|
+
dndContextProps,
|
|
92
|
+
className,
|
|
93
|
+
containerProps
|
|
94
|
+
}: SortableListProps<TItem>): react_jsx_runtime228.JSX.Element;
|
|
95
|
+
interface SortableItemProps extends Omit<React$1.ComponentProps<"div">, "id"> {
|
|
96
|
+
/** Must match the `id` of the corresponding entry in `SortableList.items`. */
|
|
97
|
+
id: UniqueIdentifier;
|
|
98
|
+
/**
|
|
99
|
+
* When `true`, the entire item becomes the drag activator (the whole row is
|
|
100
|
+
* draggable). When `false` (the default), provide a {@link SortableDragHandle}
|
|
101
|
+
* inside to control dragging — better for items with interactive content.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
dragOnItem?: boolean;
|
|
105
|
+
/** Disable dragging for just this item. */
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* A single sortable row. Wraps `useSortable`, applies the live transform /
|
|
110
|
+
* transition, and exposes the drag attributes + listeners to a nested
|
|
111
|
+
* {@link SortableDragHandle} via context.
|
|
112
|
+
*
|
|
113
|
+
* Render exactly one `SortableItem` per `renderItem` call, with an `id`
|
|
114
|
+
* matching the data item.
|
|
115
|
+
*/
|
|
116
|
+
declare function SortableItem({
|
|
117
|
+
id,
|
|
118
|
+
dragOnItem,
|
|
119
|
+
disabled,
|
|
120
|
+
className,
|
|
121
|
+
style,
|
|
122
|
+
children,
|
|
123
|
+
...props
|
|
124
|
+
}: SortableItemProps): react_jsx_runtime228.JSX.Element;
|
|
125
|
+
interface SortableDragHandleProps extends React$1.ComponentProps<typeof Button> {
|
|
126
|
+
/** Accessible label for the handle. @default "Drag to reorder" */
|
|
127
|
+
label?: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A grip button wired to its parent {@link SortableItem}'s drag listeners and
|
|
131
|
+
* activator ref. Use this when item content is interactive and you want only
|
|
132
|
+
* the handle to initiate a drag. Keyboard-operable: focus the handle and use
|
|
133
|
+
* Space/Enter then arrow keys to reorder.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* <SortableItem id={item.id}>
|
|
138
|
+
* <SortableDragHandle />
|
|
139
|
+
* <span>{item.label}</span>
|
|
140
|
+
* </SortableItem>
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
declare function SortableDragHandle({
|
|
144
|
+
label,
|
|
145
|
+
variant,
|
|
146
|
+
size,
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
...props
|
|
150
|
+
}: SortableDragHandleProps): react_jsx_runtime228.JSX.Element;
|
|
151
|
+
//#endregion
|
|
152
|
+
export { SortableDragHandle, SortableDragHandleProps, SortableItem, SortableItemProps, SortableList, SortableListItem, SortableListProps };
|
|
153
|
+
//# sourceMappingURL=sortable-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-list.d.ts","names":[],"sources":["../../src/components/sortable-list.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAoCA;AAKiB,UALA,gBAAA,CAKiB;EAAe;EAK1B,EAAA,EARjB,gBAQiB;;AAMC,UAXP,iBAWO,CAAA,cAXyB,gBAWzB,CAAA,CAAA;EAMH;;;;EAqBD,KAAA,EAjCX,aAiCW,CAjCG,KAiCH,CAAA;EASD;;AA8EnB;;EACE,SAAA,EAAA,CAAA,QAAA,EAnHsB,KAmHtB,EAAA,EAAA,GAAA,IAAA;EACA;;;;EAIA,UAAA,EAAA,CAAA,IAAA,EAlHmB,KAkHnB,EAAA,KAAA,EAAA,MAAA,EAAA,GAlH4C,OAAA,CAAM,SAkHlD;EACA;;;;EAEyB,QAAA,CAAA,EA/Gd,eA+Gc;EAAA;AA+E3B;;;EACU,QAAA,CAAA,EAAA,OAAA;EAAI;AAwBd;;;;;;EAME,eAAA,CAAA,EA9MkB,IA8MlB,CA7ME,eA6MF,EAAA,SAAA,GAAA,oBAAA,GAAA,WAAA,CAAA;EAEC;EAAiB,SAAA,CAAA,EAAA,MAAA;EAAA;EA6EH,cAAA,CAAA,EApRE,OAAA,CAAM,cAqRvB,CAAA,KAAoC,CAAA;AAmBtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1NgB,2BAA2B;;;;;;;;;GASxC,kBAAkB,SAAM,oBAAA,CAAA,GAAA,CAAA;UA+EV,iBAAA,SACP,KAAK,OAAA,CAAM;;MAEf;;;;;;;;;;;;;;;;;;;iBAsBU,YAAA;;;;;;;;GAQb,oBAAiB,oBAAA,CAAA,GAAA,CAAA;UA6EH,uBAAA,SACP,OAAA,CAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBAmBtB,kBAAA;;;;;;;GAOb,0BAAuB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { t as cn } from "../utils-DUlptRpf.js";
|
|
4
|
+
import { t as Button } from "../button-DnHwqwy0.js";
|
|
5
|
+
import { GripVertical } from "lucide-react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import * as React$1 from "react";
|
|
8
|
+
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
9
|
+
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
10
|
+
import { SortableContext, arrayMove, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
11
|
+
|
|
12
|
+
//#region src/components/sortable-list.tsx
|
|
13
|
+
const SortableItemContext = React$1.createContext(null);
|
|
14
|
+
function useSortableItemContext(component) {
|
|
15
|
+
const ctx = React$1.useContext(SortableItemContext);
|
|
16
|
+
if (!ctx) throw new Error(`<${component}> must be rendered inside a <SortableItem>.`);
|
|
17
|
+
return ctx;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Merge multiple refs (callback or object) into a single callback ref so the
|
|
21
|
+
* same node can be handed to several consumers. Used to apply both dnd-kit's
|
|
22
|
+
* sortable node ref and the activator node ref to one element.
|
|
23
|
+
*/
|
|
24
|
+
function mergeRefs(...refs) {
|
|
25
|
+
return (node) => {
|
|
26
|
+
for (const ref of refs) if (typeof ref === "function") ref(node);
|
|
27
|
+
else if (ref != null) ref.current = node;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Drag-and-drop sortable list. Wraps dnd-kit's `DndContext` +
|
|
32
|
+
* `SortableContext`, wires pointer and keyboard sensors, and restricts
|
|
33
|
+
* movement to the vertical axis. Fully keyboard-operable.
|
|
34
|
+
*
|
|
35
|
+
* This is a generic foundation primitive: it owns ordering/DnD plumbing and
|
|
36
|
+
* delegates the visual rendering of each row to `renderItem`, which should
|
|
37
|
+
* render a {@link SortableItem} (with an optional {@link SortableDragHandle}).
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const [items, setItems] = React.useState([
|
|
42
|
+
* { id: "1", label: "First" },
|
|
43
|
+
* { id: "2", label: "Second" },
|
|
44
|
+
* { id: "3", label: "Third" },
|
|
45
|
+
* ]);
|
|
46
|
+
*
|
|
47
|
+
* <SortableList
|
|
48
|
+
* items={items}
|
|
49
|
+
* onReorder={setItems}
|
|
50
|
+
* renderItem={(item) => (
|
|
51
|
+
* <SortableItem id={item.id} className="rounded-md border p-3">
|
|
52
|
+
* <SortableDragHandle />
|
|
53
|
+
* <span>{item.label}</span>
|
|
54
|
+
* </SortableItem>
|
|
55
|
+
* )}
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
function SortableList({ items, onReorder, renderItem, strategy = verticalListSortingStrategy, disabled = false, dndContextProps, className, containerProps }) {
|
|
60
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 8 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
61
|
+
const itemIds = React$1.useMemo(() => items.map((item) => item.id), [items]);
|
|
62
|
+
const handleDragEnd = React$1.useCallback((event) => {
|
|
63
|
+
const { active, over } = event;
|
|
64
|
+
if (!over || active.id === over.id) return;
|
|
65
|
+
const oldIndex = items.findIndex((item) => item.id === active.id);
|
|
66
|
+
const newIndex = items.findIndex((item) => item.id === over.id);
|
|
67
|
+
if (oldIndex === -1 || newIndex === -1) return;
|
|
68
|
+
onReorder(arrayMove(items.slice(), oldIndex, newIndex));
|
|
69
|
+
}, [items, onReorder]);
|
|
70
|
+
const { modifiers: customModifiers, ...restDndProps } = dndContextProps ?? {};
|
|
71
|
+
return /* @__PURE__ */ jsx(DndContext, {
|
|
72
|
+
sensors,
|
|
73
|
+
collisionDetection: closestCenter,
|
|
74
|
+
modifiers: customModifiers ?? [restrictToVerticalAxis],
|
|
75
|
+
onDragEnd: handleDragEnd,
|
|
76
|
+
...restDndProps,
|
|
77
|
+
children: /* @__PURE__ */ jsx(SortableContext, {
|
|
78
|
+
items: itemIds,
|
|
79
|
+
strategy,
|
|
80
|
+
disabled,
|
|
81
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
82
|
+
"data-slot": "sortable-list",
|
|
83
|
+
className: cn("flex w-full flex-col gap-2", className),
|
|
84
|
+
...containerProps,
|
|
85
|
+
children: /* @__PURE__ */ jsx(DisabledProvider, {
|
|
86
|
+
value: disabled,
|
|
87
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(React$1.Fragment, { children: renderItem(item, index) }, item.id))
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const ListDisabledContext = React$1.createContext(false);
|
|
94
|
+
function DisabledProvider({ value, children }) {
|
|
95
|
+
return /* @__PURE__ */ jsx(ListDisabledContext.Provider, {
|
|
96
|
+
value,
|
|
97
|
+
children
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A single sortable row. Wraps `useSortable`, applies the live transform /
|
|
102
|
+
* transition, and exposes the drag attributes + listeners to a nested
|
|
103
|
+
* {@link SortableDragHandle} via context.
|
|
104
|
+
*
|
|
105
|
+
* Render exactly one `SortableItem` per `renderItem` call, with an `id`
|
|
106
|
+
* matching the data item.
|
|
107
|
+
*/
|
|
108
|
+
function SortableItem({ id, dragOnItem = false, disabled, className, style, children, ...props }) {
|
|
109
|
+
const listDisabled = React$1.useContext(ListDisabledContext);
|
|
110
|
+
const isDisabled = disabled ?? listDisabled;
|
|
111
|
+
const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({
|
|
112
|
+
id,
|
|
113
|
+
disabled: isDisabled
|
|
114
|
+
});
|
|
115
|
+
const itemStyle = {
|
|
116
|
+
transform: transform ? `translate3d(${Math.round(transform.x)}px, ${Math.round(transform.y)}px, 0) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})` : void 0,
|
|
117
|
+
transition,
|
|
118
|
+
...style
|
|
119
|
+
};
|
|
120
|
+
const contextValue = React$1.useMemo(() => ({
|
|
121
|
+
attributes,
|
|
122
|
+
listeners,
|
|
123
|
+
setActivatorNodeRef,
|
|
124
|
+
isDragging,
|
|
125
|
+
disabled: isDisabled
|
|
126
|
+
}), [
|
|
127
|
+
attributes,
|
|
128
|
+
listeners,
|
|
129
|
+
setActivatorNodeRef,
|
|
130
|
+
isDragging,
|
|
131
|
+
isDisabled
|
|
132
|
+
]);
|
|
133
|
+
const itemRef = React$1.useMemo(() => dragOnItem ? mergeRefs(setNodeRef, setActivatorNodeRef) : setNodeRef, [
|
|
134
|
+
dragOnItem,
|
|
135
|
+
setNodeRef,
|
|
136
|
+
setActivatorNodeRef
|
|
137
|
+
]);
|
|
138
|
+
const activatorProps = dragOnItem ? {
|
|
139
|
+
...attributes,
|
|
140
|
+
...listeners
|
|
141
|
+
} : {};
|
|
142
|
+
return /* @__PURE__ */ jsx(SortableItemContext.Provider, {
|
|
143
|
+
value: contextValue,
|
|
144
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
145
|
+
ref: itemRef,
|
|
146
|
+
"data-slot": "sortable-item",
|
|
147
|
+
"data-dragging": isDragging || void 0,
|
|
148
|
+
"data-disabled": isDisabled || void 0,
|
|
149
|
+
style: itemStyle,
|
|
150
|
+
className: cn("flex items-center gap-2 bg-background outline-none", isDragging && "z-10 opacity-80 shadow-md", dragOnItem && !isDisabled && "cursor-grab touch-none active:cursor-grabbing", className),
|
|
151
|
+
...activatorProps,
|
|
152
|
+
...props,
|
|
153
|
+
children
|
|
154
|
+
})
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* A grip button wired to its parent {@link SortableItem}'s drag listeners and
|
|
159
|
+
* activator ref. Use this when item content is interactive and you want only
|
|
160
|
+
* the handle to initiate a drag. Keyboard-operable: focus the handle and use
|
|
161
|
+
* Space/Enter then arrow keys to reorder.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```tsx
|
|
165
|
+
* <SortableItem id={item.id}>
|
|
166
|
+
* <SortableDragHandle />
|
|
167
|
+
* <span>{item.label}</span>
|
|
168
|
+
* </SortableItem>
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
function SortableDragHandle({ label = "Drag to reorder", variant = "ghost", size = "icon-sm", className, children, ...props }) {
|
|
172
|
+
const { attributes, listeners, setActivatorNodeRef, disabled } = useSortableItemContext("SortableDragHandle");
|
|
173
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
174
|
+
ref: setActivatorNodeRef,
|
|
175
|
+
type: "button",
|
|
176
|
+
variant,
|
|
177
|
+
size,
|
|
178
|
+
"data-slot": "sortable-drag-handle",
|
|
179
|
+
"aria-label": label,
|
|
180
|
+
disabled,
|
|
181
|
+
className: cn("shrink-0 cursor-grab touch-none text-muted-foreground active:cursor-grabbing", className),
|
|
182
|
+
...attributes,
|
|
183
|
+
...listeners,
|
|
184
|
+
...props,
|
|
185
|
+
children: children ?? /* @__PURE__ */ jsx(GripVertical, { "aria-hidden": "true" })
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
export { SortableDragHandle, SortableItem, SortableList };
|
|
191
|
+
//# sourceMappingURL=sortable-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-list.js","names":["React","itemStyle: React.CSSProperties"],"sources":["../../src/components/sortable-list.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n DndContext,\n KeyboardSensor,\n PointerSensor,\n closestCenter,\n useSensor,\n useSensors,\n type DndContextProps,\n type DragEndEvent,\n type UniqueIdentifier,\n} from \"@dnd-kit/core\";\nimport { restrictToVerticalAxis } from \"@dnd-kit/modifiers\";\nimport {\n SortableContext,\n arrayMove,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n type SortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { GripVertical } from \"lucide-react\";\n\nimport { cn } from \"@px-ui/ui/lib/utils\";\nimport { Button } from \"@px-ui/ui/components/button\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Minimal shape every sortable item must satisfy: a stable, unique `id`.\n * Items may carry any additional fields — `SortableList` only reads `id`.\n */\nexport interface SortableListItem {\n /** Stable unique identifier used for drag tracking and reordering. */\n id: UniqueIdentifier;\n}\n\nexport interface SortableListProps<TItem extends SortableListItem> {\n /**\n * The ordered list of items to render. The order of this array is the\n * source of truth for the rendered order.\n */\n items: ReadonlyArray<TItem>;\n\n /**\n * Called when the user finishes a drag (or keyboard reorder) that changes\n * the order. Receives the full re-ordered array — wire this to your state.\n */\n onReorder: (newOrder: TItem[]) => void;\n\n /**\n * Render a single item. The returned node is expected to render a\n * {@link SortableItem} (directly or nested) keyed/identified by `item.id`.\n */\n renderItem: (item: TItem, index: number) => React.ReactNode;\n\n /**\n * Sorting strategy passed to the underlying `SortableContext`.\n * @default verticalListSortingStrategy\n */\n strategy?: SortingStrategy;\n\n /**\n * Disable all dragging for the whole list.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Additional props forwarded to the underlying dnd-kit `DndContext`\n * (e.g. accessibility announcements). Providing `modifiers` *replaces* the\n * default vertical-axis restriction — pass your own (e.g.\n * `restrictToHorizontalAxis`, alongside a matching `strategy`) for\n * non-vertical layouts, or `[]` to remove axis locking entirely.\n */\n dndContextProps?: Omit<\n DndContextProps,\n \"sensors\" | \"collisionDetection\" | \"onDragEnd\"\n >;\n\n /** Additional className for the list container. */\n className?: string;\n\n /** Props forwarded to the list container element. */\n containerProps?: React.ComponentProps<\"div\">;\n}\n\n// ============================================================================\n// Per-item context\n// ============================================================================\n\ntype SortableItemContextValue = {\n attributes: ReturnType<typeof useSortable>[\"attributes\"];\n listeners: ReturnType<typeof useSortable>[\"listeners\"];\n setActivatorNodeRef: ReturnType<typeof useSortable>[\"setActivatorNodeRef\"];\n isDragging: boolean;\n disabled: boolean;\n};\n\nconst SortableItemContext =\n React.createContext<SortableItemContextValue | null>(null);\n\nfunction useSortableItemContext(component: string): SortableItemContextValue {\n const ctx = React.useContext(SortableItemContext);\n if (!ctx) {\n throw new Error(`<${component}> must be rendered inside a <SortableItem>.`);\n }\n return ctx;\n}\n\n/**\n * Merge multiple refs (callback or object) into a single callback ref so the\n * same node can be handed to several consumers. Used to apply both dnd-kit's\n * sortable node ref and the activator node ref to one element.\n */\nfunction mergeRefs<T>(\n ...refs: Array<React.Ref<T> | undefined>\n): React.RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n\n// ============================================================================\n// SortableList\n// ============================================================================\n\n/**\n * Drag-and-drop sortable list. Wraps dnd-kit's `DndContext` +\n * `SortableContext`, wires pointer and keyboard sensors, and restricts\n * movement to the vertical axis. Fully keyboard-operable.\n *\n * This is a generic foundation primitive: it owns ordering/DnD plumbing and\n * delegates the visual rendering of each row to `renderItem`, which should\n * render a {@link SortableItem} (with an optional {@link SortableDragHandle}).\n *\n * @example\n * ```tsx\n * const [items, setItems] = React.useState([\n * { id: \"1\", label: \"First\" },\n * { id: \"2\", label: \"Second\" },\n * { id: \"3\", label: \"Third\" },\n * ]);\n *\n * <SortableList\n * items={items}\n * onReorder={setItems}\n * renderItem={(item) => (\n * <SortableItem id={item.id} className=\"rounded-md border p-3\">\n * <SortableDragHandle />\n * <span>{item.label}</span>\n * </SortableItem>\n * )}\n * />\n * ```\n */\nexport function SortableList<TItem extends SortableListItem>({\n items,\n onReorder,\n renderItem,\n strategy = verticalListSortingStrategy,\n disabled = false,\n dndContextProps,\n className,\n containerProps,\n}: SortableListProps<TItem>) {\n const sensors = useSensors(\n useSensor(PointerSensor, {\n // Require a small drag distance before activating so clicks on\n // interactive content (and taps on `dragOnItem` rows) aren't swallowed.\n activationConstraint: { distance: 8 },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const itemIds = React.useMemo(() => items.map((item) => item.id), [items]);\n\n const handleDragEnd = React.useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n if (!over || active.id === over.id) return;\n\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n if (oldIndex === -1 || newIndex === -1) return;\n\n onReorder(arrayMove(items.slice(), oldIndex, newIndex));\n },\n [items, onReorder],\n );\n\n const { modifiers: customModifiers, ...restDndProps } = dndContextProps ?? {};\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n modifiers={customModifiers ?? [restrictToVerticalAxis]}\n onDragEnd={handleDragEnd}\n {...restDndProps}\n >\n <SortableContext items={itemIds} strategy={strategy} disabled={disabled}>\n <div\n data-slot=\"sortable-list\"\n className={cn(\"flex w-full flex-col gap-2\", className)}\n {...containerProps}\n >\n <DisabledProvider value={disabled}>\n {items.map((item, index) => (\n <React.Fragment key={item.id}>\n {renderItem(item, index)}\n </React.Fragment>\n ))}\n </DisabledProvider>\n </div>\n </SortableContext>\n </DndContext>\n );\n}\n\n// Propagates the list-level `disabled` to each SortableItem without forcing\n// the consumer to thread it through `renderItem`.\nconst ListDisabledContext = React.createContext<boolean>(false);\n\nfunction DisabledProvider({\n value,\n children,\n}: {\n value: boolean;\n children: React.ReactNode;\n}) {\n return (\n <ListDisabledContext.Provider value={value}>\n {children}\n </ListDisabledContext.Provider>\n );\n}\n\n// ============================================================================\n// SortableItem\n// ============================================================================\n\nexport interface SortableItemProps\n extends Omit<React.ComponentProps<\"div\">, \"id\"> {\n /** Must match the `id` of the corresponding entry in `SortableList.items`. */\n id: UniqueIdentifier;\n\n /**\n * When `true`, the entire item becomes the drag activator (the whole row is\n * draggable). When `false` (the default), provide a {@link SortableDragHandle}\n * inside to control dragging — better for items with interactive content.\n * @default false\n */\n dragOnItem?: boolean;\n\n /** Disable dragging for just this item. */\n disabled?: boolean;\n}\n\n/**\n * A single sortable row. Wraps `useSortable`, applies the live transform /\n * transition, and exposes the drag attributes + listeners to a nested\n * {@link SortableDragHandle} via context.\n *\n * Render exactly one `SortableItem` per `renderItem` call, with an `id`\n * matching the data item.\n */\nexport function SortableItem({\n id,\n dragOnItem = false,\n disabled,\n className,\n style,\n children,\n ...props\n}: SortableItemProps) {\n const listDisabled = React.useContext(ListDisabledContext);\n const isDisabled = disabled ?? listDisabled;\n\n const {\n attributes,\n listeners,\n setNodeRef,\n setActivatorNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id, disabled: isDisabled });\n\n // Build the transform string locally (mirrors `CSS.Transform.toString` from\n // `@dnd-kit/utilities`) so we don't depend on that transitive package.\n const itemStyle: React.CSSProperties = {\n transform: transform\n ? `translate3d(${Math.round(transform.x)}px, ${Math.round(\n transform.y,\n )}px, 0) scaleX(${transform.scaleX}) scaleY(${transform.scaleY})`\n : undefined,\n transition,\n ...style,\n };\n\n const contextValue = React.useMemo<SortableItemContextValue>(\n () => ({\n attributes,\n listeners,\n setActivatorNodeRef,\n isDragging,\n disabled: isDisabled,\n }),\n [attributes, listeners, setActivatorNodeRef, isDragging, isDisabled],\n );\n\n // The sortable node ref must always be applied. When the whole item is the\n // activator, also wire the activator node ref (merged with the sortable ref)\n // plus the drag listeners/attributes onto the root element. Memoize the\n // merged ref so we don't detach/reattach the dnd-kit node on every render.\n const itemRef = React.useMemo(\n () =>\n dragOnItem ? mergeRefs(setNodeRef, setActivatorNodeRef) : setNodeRef,\n [dragOnItem, setNodeRef, setActivatorNodeRef],\n );\n const activatorProps = dragOnItem ? { ...attributes, ...listeners } : {};\n\n return (\n <SortableItemContext.Provider value={contextValue}>\n <div\n ref={itemRef}\n data-slot=\"sortable-item\"\n data-dragging={isDragging || undefined}\n data-disabled={isDisabled || undefined}\n style={itemStyle}\n className={cn(\n \"flex items-center gap-2 bg-background outline-none\",\n isDragging && \"z-10 opacity-80 shadow-md\",\n dragOnItem &&\n !isDisabled &&\n \"cursor-grab touch-none active:cursor-grabbing\",\n className,\n )}\n {...activatorProps}\n {...props}\n >\n {children}\n </div>\n </SortableItemContext.Provider>\n );\n}\n\n// ============================================================================\n// SortableDragHandle\n// ============================================================================\n\nexport interface SortableDragHandleProps\n extends React.ComponentProps<typeof Button> {\n /** Accessible label for the handle. @default \"Drag to reorder\" */\n label?: string;\n}\n\n/**\n * A grip button wired to its parent {@link SortableItem}'s drag listeners and\n * activator ref. Use this when item content is interactive and you want only\n * the handle to initiate a drag. Keyboard-operable: focus the handle and use\n * Space/Enter then arrow keys to reorder.\n *\n * @example\n * ```tsx\n * <SortableItem id={item.id}>\n * <SortableDragHandle />\n * <span>{item.label}</span>\n * </SortableItem>\n * ```\n */\nexport function SortableDragHandle({\n label = \"Drag to reorder\",\n variant = \"ghost\",\n size = \"icon-sm\",\n className,\n children,\n ...props\n}: SortableDragHandleProps) {\n const { attributes, listeners, setActivatorNodeRef, disabled } =\n useSortableItemContext(\"SortableDragHandle\");\n\n return (\n <Button\n ref={setActivatorNodeRef}\n type=\"button\"\n variant={variant}\n size={size}\n data-slot=\"sortable-drag-handle\"\n aria-label={label}\n disabled={disabled}\n className={cn(\n \"shrink-0 cursor-grab touch-none text-muted-foreground active:cursor-grabbing\",\n className,\n )}\n {...attributes}\n {...listeners}\n {...props}\n >\n {children ?? <GripVertical aria-hidden=\"true\" />}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAuGA,MAAM,sBACJA,QAAM,cAA+C,KAAK;AAE5D,SAAS,uBAAuB,WAA6C;CAC3E,MAAM,MAAMA,QAAM,WAAW,oBAAoB;AACjD,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,IAAI,UAAU,6CAA6C;AAE7E,QAAO;;;;;;;AAQT,SAAS,UACP,GAAG,MACmB;AACtB,SAAQ,SAAmB;AACzB,OAAK,MAAM,OAAO,KAChB,KAAI,OAAO,QAAQ,WACjB,KAAI,KAAK;WACA,OAAO,KAChB,CAAC,IAAyC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuC5D,SAAgB,aAA6C,EAC3D,OACA,WACA,YACA,WAAW,6BACX,WAAW,OACX,iBACA,WACA,kBAC2B;CAC3B,MAAM,UAAU,WACd,UAAU,eAAe,EAGvB,sBAAsB,EAAE,UAAU,GAAG,EACtC,CAAC,EACF,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;CAED,MAAM,UAAUA,QAAM,cAAc,MAAM,KAAK,SAAS,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC;CAE1E,MAAM,gBAAgBA,QAAM,aACzB,UAAwB;EACvB,MAAM,EAAE,QAAQ,SAAS;AACzB,MAAI,CAAC,QAAQ,OAAO,OAAO,KAAK,GAAI;EAEpC,MAAM,WAAW,MAAM,WAAW,SAAS,KAAK,OAAO,OAAO,GAAG;EACjE,MAAM,WAAW,MAAM,WAAW,SAAS,KAAK,OAAO,KAAK,GAAG;AAC/D,MAAI,aAAa,MAAM,aAAa,GAAI;AAExC,YAAU,UAAU,MAAM,OAAO,EAAE,UAAU,SAAS,CAAC;IAEzD,CAAC,OAAO,UAAU,CACnB;CAED,MAAM,EAAE,WAAW,iBAAiB,GAAG,iBAAiB,mBAAmB,EAAE;AAE7E,QACE,oBAAC;EACU;EACT,oBAAoB;EACpB,WAAW,mBAAmB,CAAC,uBAAuB;EACtD,WAAW;EACX,GAAI;YAEJ,oBAAC;GAAgB,OAAO;GAAmB;GAAoB;aAC7D,oBAAC;IACC,aAAU;IACV,WAAW,GAAG,8BAA8B,UAAU;IACtD,GAAI;cAEJ,oBAAC;KAAiB,OAAO;eACtB,MAAM,KAAK,MAAM,UAChB,oBAACA,QAAM,sBACJ,WAAW,MAAM,MAAM,IADL,KAAK,GAET,CACjB;MACe;KACf;IACU;GACP;;AAMjB,MAAM,sBAAsBA,QAAM,cAAuB,MAAM;AAE/D,SAAS,iBAAiB,EACxB,OACA,YAIC;AACD,QACE,oBAAC,oBAAoB;EAAgB;EAClC;GAC4B;;;;;;;;;;AAiCnC,SAAgB,aAAa,EAC3B,IACA,aAAa,OACb,UACA,WACA,OACA,UACA,GAAG,SACiB;CACpB,MAAM,eAAeA,QAAM,WAAW,oBAAoB;CAC1D,MAAM,aAAa,YAAY;CAE/B,MAAM,EACJ,YACA,WACA,YACA,qBACA,WACA,YACA,eACE,YAAY;EAAE;EAAI,UAAU;EAAY,CAAC;CAI7C,MAAMC,YAAiC;EACrC,WAAW,YACP,eAAe,KAAK,MAAM,UAAU,EAAE,CAAC,MAAM,KAAK,MAChD,UAAU,EACX,CAAC,gBAAgB,UAAU,OAAO,WAAW,UAAU,OAAO,KAC/D;EACJ;EACA,GAAG;EACJ;CAED,MAAM,eAAeD,QAAM,eAClB;EACL;EACA;EACA;EACA;EACA,UAAU;EACX,GACD;EAAC;EAAY;EAAW;EAAqB;EAAY;EAAW,CACrE;CAMD,MAAM,UAAUA,QAAM,cAElB,aAAa,UAAU,YAAY,oBAAoB,GAAG,YAC5D;EAAC;EAAY;EAAY;EAAoB,CAC9C;CACD,MAAM,iBAAiB,aAAa;EAAE,GAAG;EAAY,GAAG;EAAW,GAAG,EAAE;AAExE,QACE,oBAAC,oBAAoB;EAAS,OAAO;YACnC,oBAAC;GACC,KAAK;GACL,aAAU;GACV,iBAAe,cAAc;GAC7B,iBAAe,cAAc;GAC7B,OAAO;GACP,WAAW,GACT,sDACA,cAAc,6BACd,cACE,CAAC,cACD,iDACF,UACD;GACD,GAAI;GACJ,GAAI;GAEH;IACG;GACuB;;;;;;;;;;;;;;;;AA4BnC,SAAgB,mBAAmB,EACjC,QAAQ,mBACR,UAAU,SACV,OAAO,WACP,WACA,UACA,GAAG,SACuB;CAC1B,MAAM,EAAE,YAAY,WAAW,qBAAqB,aAClD,uBAAuB,qBAAqB;AAE9C,QACE,oBAAC;EACC,KAAK;EACL,MAAK;EACI;EACH;EACN,aAAU;EACV,cAAY;EACF;EACV,WAAW,GACT,gFACA,UACD;EACD,GAAI;EACJ,GAAI;EACJ,GAAI;YAEH,YAAY,oBAAC,gBAAa,eAAY,SAAS;GACzC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Loader2Icon } from "lucide-react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime271 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/spinner.d.ts
|
|
5
5
|
declare function Spinner({
|
|
6
6
|
className,
|
|
7
7
|
...props
|
|
8
|
-
}: React.ComponentProps<typeof Loader2Icon>):
|
|
8
|
+
}: React.ComponentProps<typeof Loader2Icon>): react_jsx_runtime271.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Spinner };
|
|
11
11
|
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as react_jsx_runtime272 from "react/jsx-runtime";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as class_variance_authority_types16 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region src/components/stepper.d.ts
|
|
6
|
+
type StepStatus = "completed" | "active" | "upcoming";
|
|
7
|
+
type StepperOrientation = "horizontal" | "vertical";
|
|
8
|
+
/**
|
|
9
|
+
* A single step descriptor consumed by {@link Stepper}'s convenience `steps`
|
|
10
|
+
* prop. For full control, compose `StepperItem` children directly instead.
|
|
11
|
+
*/
|
|
12
|
+
interface StepperStep {
|
|
13
|
+
/** Primary label shown next to the step indicator. */
|
|
14
|
+
label: React$1.ReactNode;
|
|
15
|
+
/** Optional secondary line rendered beneath the label. */
|
|
16
|
+
description?: React$1.ReactNode;
|
|
17
|
+
/** Disable navigation to this step (interactive mode only). */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const stepperVariants: (props?: ({
|
|
21
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
22
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
23
|
+
declare const stepperItemVariants: (props?: ({
|
|
24
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
25
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
26
|
+
declare const stepperTriggerVariants: (props?: ({
|
|
27
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
28
|
+
interactive?: boolean | null | undefined;
|
|
29
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
30
|
+
declare const stepperIndicatorVariants: (props?: ({
|
|
31
|
+
status?: "active" | "completed" | "upcoming" | null | undefined;
|
|
32
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
33
|
+
declare const stepperSeparatorVariants: (props?: ({
|
|
34
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
35
|
+
active?: boolean | null | undefined;
|
|
36
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
37
|
+
declare const stepperLabelVariants: (props?: ({
|
|
38
|
+
status?: "active" | "completed" | "upcoming" | null | undefined;
|
|
39
|
+
} & class_variance_authority_types16.ClassProp) | undefined) => string;
|
|
40
|
+
interface StepperProps extends Omit<React$1.ComponentProps<"ol">, "onClick"> {
|
|
41
|
+
/**
|
|
42
|
+
* Zero-based index of the currently active step. Steps before this index are
|
|
43
|
+
* treated as completed; the step at this index is emphasized; later steps are
|
|
44
|
+
* upcoming.
|
|
45
|
+
*/
|
|
46
|
+
value: number;
|
|
47
|
+
/**
|
|
48
|
+
* Called with the step index when a step is activated. Providing this handler
|
|
49
|
+
* makes every step keyboard- and pointer-operable; omit it for a purely
|
|
50
|
+
* presentational indicator.
|
|
51
|
+
*/
|
|
52
|
+
onValueChange?: (value: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Layout direction.
|
|
55
|
+
* @default "horizontal"
|
|
56
|
+
*/
|
|
57
|
+
orientation?: StepperOrientation;
|
|
58
|
+
/**
|
|
59
|
+
* Convenience: render steps from a data array instead of composing
|
|
60
|
+
* `StepperItem` children. Ignored when `children` are provided.
|
|
61
|
+
*/
|
|
62
|
+
steps?: StepperStep[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A step indicator that visualizes progress through a multi-step flow.
|
|
66
|
+
*
|
|
67
|
+
* Compose `StepperItem` children for full control, or pass a `steps` array for
|
|
68
|
+
* the common case. Steps before `value` render as completed (checked), the step
|
|
69
|
+
* at `value` is emphasized, and later steps are upcoming. Supply `onValueChange`
|
|
70
|
+
* to make steps interactive (clickable + keyboard-operable); without it the
|
|
71
|
+
* stepper is purely presentational.
|
|
72
|
+
*
|
|
73
|
+
* @example Compound
|
|
74
|
+
* ```tsx
|
|
75
|
+
* <Stepper value={step} onValueChange={setStep}>
|
|
76
|
+
* <StepperItem step={0}>
|
|
77
|
+
* <StepperTrigger>
|
|
78
|
+
* <StepperIndicator />
|
|
79
|
+
* <div className="flex flex-col items-start">
|
|
80
|
+
* <StepperTitle>Details</StepperTitle>
|
|
81
|
+
* <StepperDescription>Basic info</StepperDescription>
|
|
82
|
+
* </div>
|
|
83
|
+
* </StepperTrigger>
|
|
84
|
+
* <StepperSeparator />
|
|
85
|
+
* </StepperItem>
|
|
86
|
+
* <StepperItem step={1}>
|
|
87
|
+
* <StepperTrigger>
|
|
88
|
+
* <StepperIndicator />
|
|
89
|
+
* <StepperTitle>Review</StepperTitle>
|
|
90
|
+
* </StepperTrigger>
|
|
91
|
+
* </StepperItem>
|
|
92
|
+
* </Stepper>
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @example Convenience (data-driven)
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <Stepper
|
|
98
|
+
* value={step}
|
|
99
|
+
* onValueChange={setStep}
|
|
100
|
+
* steps={[{ label: "Details", description: "Basic info" }, { label: "Review" }]}
|
|
101
|
+
* />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
declare function Stepper({
|
|
105
|
+
value,
|
|
106
|
+
onValueChange,
|
|
107
|
+
orientation,
|
|
108
|
+
steps,
|
|
109
|
+
className,
|
|
110
|
+
children,
|
|
111
|
+
...props
|
|
112
|
+
}: StepperProps): react_jsx_runtime272.JSX.Element;
|
|
113
|
+
interface StepperItemProps extends React$1.ComponentProps<"li"> {
|
|
114
|
+
/** Zero-based index of this step. The item is active when it equals `value`. */
|
|
115
|
+
step: number;
|
|
116
|
+
/** Disable navigation to this step (interactive mode only). */
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A single step. Derives its status (completed / active / upcoming) by comparing
|
|
121
|
+
* `step` to the stepper's `value` and exposes it to descendants via context and
|
|
122
|
+
* a `data-status` attribute.
|
|
123
|
+
*/
|
|
124
|
+
declare function StepperItem({
|
|
125
|
+
step,
|
|
126
|
+
disabled,
|
|
127
|
+
className,
|
|
128
|
+
...props
|
|
129
|
+
}: StepperItemProps): react_jsx_runtime272.JSX.Element;
|
|
130
|
+
/**
|
|
131
|
+
* The clickable (or static) region grouping a step's indicator and label.
|
|
132
|
+
* Renders a `<button>` when the stepper is interactive, a `<span>` otherwise.
|
|
133
|
+
* Prepends a visually hidden status word so the step's state is announced.
|
|
134
|
+
*/
|
|
135
|
+
declare function StepperTrigger({
|
|
136
|
+
className,
|
|
137
|
+
children,
|
|
138
|
+
onClick,
|
|
139
|
+
...props
|
|
140
|
+
}: React$1.ComponentProps<"button">): react_jsx_runtime272.JSX.Element;
|
|
141
|
+
/**
|
|
142
|
+
* The numbered / checked circle for a step. Defaults to the one-based step
|
|
143
|
+
* number, or a check when completed; pass `children` to override (e.g. a custom
|
|
144
|
+
* icon for an error state).
|
|
145
|
+
*/
|
|
146
|
+
declare function StepperIndicator({
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
...props
|
|
150
|
+
}: React$1.ComponentProps<"span">): react_jsx_runtime272.JSX.Element;
|
|
151
|
+
/** The primary label for a step. Colored by status. */
|
|
152
|
+
declare function StepperTitle({
|
|
153
|
+
className,
|
|
154
|
+
...props
|
|
155
|
+
}: React$1.ComponentProps<"span">): react_jsx_runtime272.JSX.Element;
|
|
156
|
+
/** Optional secondary line beneath a step's label. */
|
|
157
|
+
declare function StepperDescription({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}: React$1.ComponentProps<"span">): react_jsx_runtime272.JSX.Element;
|
|
161
|
+
/**
|
|
162
|
+
* The line drawn from a step toward the next one. Fills with the primary color
|
|
163
|
+
* once the step it trails is completed.
|
|
164
|
+
*/
|
|
165
|
+
declare function StepperSeparator({
|
|
166
|
+
className,
|
|
167
|
+
...props
|
|
168
|
+
}: React$1.ComponentProps<"span">): react_jsx_runtime272.JSX.Element;
|
|
169
|
+
//#endregion
|
|
170
|
+
export { StepStatus, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperItemProps, StepperOrientation, StepperProps, StepperSeparator, StepperStep, StepperTitle, StepperTrigger, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, stepperSeparatorVariants, stepperTriggerVariants, stepperVariants };
|
|
171
|
+
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","names":[],"sources":["../../src/components/stepper.tsx"],"sourcesContent":[],"mappings":"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"}
|