@sth87/shadcn-design-system 0.1.7 → 0.1.8
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/cjs/components/Table/TableFilter/data-table-date-filter.cjs.map +1 -1
- package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs.map +1 -1
- package/dist/cjs/components/Table/TableFilter/data-table-slider-filter.cjs.map +1 -1
- package/dist/cjs/components/Table/data-table-column-header.cjs.map +1 -1
- package/dist/cjs/components/Table/data-table-toolbar.cjs +2 -0
- package/dist/cjs/components/Table/data-table-toolbar.cjs.map +1 -0
- package/dist/cjs/components/Table/data-table-view-options.cjs +2 -0
- package/dist/cjs/components/Table/data-table-view-options.cjs.map +1 -0
- package/dist/cjs/components/Table/select-column.cjs +2 -0
- package/dist/cjs/components/Table/select-column.cjs.map +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs +2 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@dnd-kit/core/dist/core.esm.cjs +6 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@dnd-kit/core/dist/core.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs +2 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs +2 -0
- package/dist/cjs/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.cjs.map +1 -0
- package/dist/esm/components/Table/TableFilter/data-table-date-filter.js.map +1 -1
- package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js.map +1 -1
- package/dist/esm/components/Table/TableFilter/data-table-slider-filter.js.map +1 -1
- package/dist/esm/components/Table/data-table-column-header.js.map +1 -1
- package/dist/esm/components/Table/data-table-toolbar.js +116 -0
- package/dist/esm/components/Table/data-table-toolbar.js.map +1 -0
- package/dist/esm/components/Table/data-table-view-options.js +258 -0
- package/dist/esm/components/Table/data-table-view-options.js.map +1 -0
- package/dist/esm/components/Table/select-column.js +33 -0
- package/dist/esm/components/Table/select-column.js.map +1 -0
- package/dist/esm/index.js +211 -197
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +57 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@dnd-kit/core/dist/core.esm.js +2345 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +440 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.1_react@19.1.1__react@19.1.1__react@19.1.1/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +236 -0
- package/dist/esm/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
- package/dist/types/components/Table/TableFilter/data-table-date-filter.d.ts +1 -2
- package/dist/types/components/Table/TableFilter/data-table-date-filter.d.ts.map +1 -1
- package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts +1 -2
- package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts.map +1 -1
- package/dist/types/components/Table/TableFilter/data-table-slider-filter.d.ts +1 -2
- package/dist/types/components/Table/TableFilter/data-table-slider-filter.d.ts.map +1 -1
- package/dist/types/components/Table/data-table-column-header.d.ts +1 -2
- package/dist/types/components/Table/data-table-column-header.d.ts.map +1 -1
- package/dist/types/components/Table/data-table-toolbar.d.ts +1 -2
- package/dist/types/components/Table/data-table-toolbar.d.ts.map +1 -1
- package/dist/types/components/Table/index.d.ts +7 -0
- package/dist/types/components/Table/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-view-options.js","sources":["../../../../src/components/Table/data-table-view-options.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport type {\n Column,\n ColumnOrderState,\n ColumnPinningState,\n Table,\n} from \"@tanstack/react-table\";\nimport { Check, GripVertical, Settings2 } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Button } from \"../Button\";\nimport { Checkbox } from \"../Checkbox\";\nimport Command, { type CommandItemType } from \"../Command/Command\";\nimport { Popover } from \"../Popover\";\nimport { cn } from \"@dsui/ui\";\n\nexport type DataTableViewOptionsVariant = \"command\" | \"draggable\";\n\nexport interface DataTableViewOptionsLabels {\n trigger?: React.ReactNode;\n searchPlaceholder?: string;\n selectAll?: React.ReactNode;\n reset?: React.ReactNode;\n}\n\nexport interface DataTableViewOptionsProps<TData> extends React.ComponentProps<\n typeof Popover\n> {\n table: Table<TData>;\n variant?: DataTableViewOptionsVariant;\n labels?: DataTableViewOptionsLabels;\n triggerIcon?: React.ReactNode;\n}\n\nexport function DataTableViewOptions<TData>({\n table,\n variant = \"command\",\n labels,\n triggerIcon = <Settings2 className=\"ds:text-muted-foreground\" />,\n trigger,\n content,\n contentClassName,\n ...props\n}: DataTableViewOptionsProps<TData>) {\n const columnOrder = table.getState().columnOrder;\n const columnPinning = table.getState().columnPinning;\n\n const columns = React.useMemo(\n () =>\n getOrderedTableColumns(table, columnOrder, columnPinning).filter(\n (column) =>\n typeof column.accessorFn !== \"undefined\" && column.getCanHide()\n ),\n [table, columnOrder, columnPinning]\n );\n\n const getColumnLabel = React.useCallback(\n (column: (typeof columns)[number]) =>\n column.columnDef.meta?.label ??\n (typeof column.columnDef.header === \"string\"\n ? column.columnDef.header\n : column.id),\n []\n );\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n })\n );\n\n const columnIds = React.useMemo(\n () => columns.map((column) => column.id),\n [columns]\n );\n\n const allColumnsVisible = columns.every((column) => column.getIsVisible());\n const someColumnsVisible = columns.some((column) => column.getIsVisible());\n\n const onToggleAll = React.useCallback(\n (checked: boolean) => {\n columns.forEach((column) => column.toggleVisibility(checked));\n },\n [columns]\n );\n\n const onDragEnd = React.useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (!over || active.id === over.id) return;\n\n const oldIndex = columnIds.indexOf(String(active.id));\n const newIndex = columnIds.indexOf(String(over.id));\n\n if (oldIndex === -1 || newIndex === -1) return;\n\n const orderedOptionIds = arrayMove(columnIds, oldIndex, newIndex);\n const optionIdSet = new Set(columnIds);\n const pendingOptionIds = [...orderedOptionIds];\n const nextColumnOrder = getOrderedTableColumns(table).map((column) =>\n optionIdSet.has(column.id)\n ? (pendingOptionIds.shift() ?? column.id)\n : column.id\n );\n const currentColumnPinning = table.getState().columnPinning;\n const nextColumnPinning = {\n ...currentColumnPinning,\n left: currentColumnPinning?.left?.filter((id) => !optionIdSet.has(id)),\n right: currentColumnPinning?.right?.filter(\n (id) => !optionIdSet.has(id)\n ),\n };\n\n table.setColumnOrder(nextColumnOrder);\n table.setColumnPinning(nextColumnPinning);\n },\n [columnIds, table]\n );\n\n const items: CommandItemType[] = [\n {\n type: \"group\",\n heading: \"\",\n items: columns.map((column) => ({\n type: \"item\" as const,\n onClick: () => column.toggleVisibility(!column.getIsVisible()),\n children: (\n <>\n <span className=\"ds:truncate\">{getColumnLabel(column)}</span>\n <Check\n className={cn(\n \"ds:ml-auto ds:size-4 ds:shrink-0\",\n column.getIsVisible() ? \"ds:opacity-100\" : \"ds:opacity-0\"\n )}\n />\n </>\n ),\n })),\n },\n ];\n\n const resolvedLabels = {\n trigger: labels?.trigger ?? \"View\",\n searchPlaceholder: labels?.searchPlaceholder ?? \"Search columns...\",\n selectAll: labels?.selectAll ?? \"Chọn tất cả\",\n reset: labels?.reset ?? \"Đặt lại\",\n };\n\n const defaultDraggableContent = (\n <div className=\"ds:flex ds:w-full ds:flex-col\">\n <div className=\"ds:flex ds:items-center ds:gap-3 ds:px-3 ds:py-3\">\n <Checkbox\n aria-label=\"Toggle all columns\"\n checked={\n allColumnsVisible\n ? true\n : someColumnsVisible\n ? \"indeterminate\"\n : false\n }\n onCheckedChange={(checked) => onToggleAll(checked === true)}\n />\n <span className=\"ds:text-sm ds:font-medium ds:text-foreground\">\n {resolvedLabels.selectAll}\n </span>\n </div>\n <div className=\"ds:mx-3 ds:h-px ds:bg-border\" />\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={onDragEnd}\n >\n <SortableContext\n items={columnIds}\n strategy={verticalListSortingStrategy}\n >\n <div className=\"ds:flex ds:max-h-80 ds:flex-col ds:overflow-y-auto ds:py-2\">\n {columns.map((column) => (\n <DataTableDraggableColumnOption\n key={column.id}\n id={column.id}\n label={getColumnLabel(column)}\n checked={column.getIsVisible()}\n onCheckedChange={(checked) =>\n column.toggleVisibility(checked === true)\n }\n />\n ))}\n </div>\n </SortableContext>\n </DndContext>\n <div className=\"ds:mx-3 ds:h-px ds:bg-border\" />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"ds:mx-3 ds:my-2 ds:text-primary hover:ds:text-primary\"\n onClick={() => {\n table.resetColumnVisibility();\n table.resetColumnOrder();\n table.resetColumnPinning();\n }}\n >\n {resolvedLabels.reset}\n </Button>\n </div>\n );\n\n return (\n <Popover\n trigger={\n trigger ?? (\n <Button\n aria-label=\"Toggle columns\"\n role=\"combobox\"\n variant=\"outline\"\n size=\"sm\"\n className=\"ds:ml-auto ds:h-8 ds:font-normal ds:lg:flex\"\n >\n {triggerIcon}\n {resolvedLabels.trigger}\n </Button>\n )\n }\n content={\n content ??\n (variant === \"draggable\" ? (\n defaultDraggableContent\n ) : (\n <Command items={items} search={resolvedLabels.searchPlaceholder} />\n ))\n }\n contentClassName={cn(\n \"ds:p-0\",\n variant === \"draggable\" ? \"ds:w-72\" : \"ds:w-44\",\n contentClassName\n )}\n {...props}\n />\n );\n}\n\nfunction getOrderedTableColumns<TData>(\n table: Table<TData>,\n columnOrder: ColumnOrderState = table.getState().columnOrder,\n columnPinning: ColumnPinningState = table.getState().columnPinning\n) {\n const allColumns = table.getAllLeafColumns();\n const columnById = new Map(allColumns.map((column) => [column.id, column]));\n const columnIds = allColumns.map((column) => column.id);\n const order = columnOrder ?? [];\n const orderedIds = [\n ...order.filter((id) => columnById.has(id)),\n ...columnIds.filter((id) => !order.includes(id)),\n ];\n const pinning = columnPinning ?? {};\n const leftIds = (pinning.left ?? []).filter((id) => columnById.has(id));\n const rightIds = (pinning.right ?? []).filter((id) => columnById.has(id));\n const pinnedIds = new Set([...leftIds, ...rightIds]);\n const centerIds = orderedIds.filter((id) => !pinnedIds.has(id));\n\n return [...leftIds, ...centerIds, ...rightIds]\n .map((id) => columnById.get(id))\n .filter((column): column is Column<TData, unknown> => Boolean(column));\n}\n\ninterface DataTableDraggableColumnOptionProps {\n id: string;\n label: React.ReactNode;\n checked: boolean;\n onCheckedChange: React.ComponentProps<typeof Checkbox>[\"onCheckedChange\"];\n}\n\nfunction DataTableDraggableColumnOption({\n id,\n label,\n checked,\n onCheckedChange,\n}: DataTableDraggableColumnOptionProps) {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id });\n\n return (\n <div\n ref={setNodeRef}\n className={cn(\n \"ds:flex ds:min-h-11 ds:items-center ds:gap-3 ds:px-3 ds:text-sm ds:text-foreground\",\n isDragging && \"ds:bg-accent\"\n )}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n >\n <button\n type=\"button\"\n className=\"ds:flex ds:size-5 ds:shrink-0 ds:cursor-grab ds:items-center ds:justify-center ds:text-muted-foreground active:ds:cursor-grabbing\"\n aria-label={`Reorder ${label}`}\n {...attributes}\n {...listeners}\n >\n <GripVertical className=\"ds:size-4\" />\n </button>\n <Checkbox\n aria-label={`Toggle ${label}`}\n checked={checked}\n onCheckedChange={onCheckedChange}\n />\n <span className=\"ds:min-w-0 ds:flex-1 ds:truncate ds:font-medium\">\n {label}\n </span>\n </div>\n );\n}\n"],"names":["DataTableViewOptions","table","variant","labels","triggerIcon","jsx","Settings2","trigger","content","contentClassName","props","columnOrder","columnPinning","columns","React","getOrderedTableColumns","column","getColumnLabel","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","columnIds","allColumnsVisible","someColumnsVisible","onToggleAll","checked","onDragEnd","event","active","over","oldIndex","newIndex","orderedOptionIds","arrayMove","optionIdSet","pendingOptionIds","nextColumnOrder","currentColumnPinning","nextColumnPinning","id","items","jsxs","Fragment","Check","cn","resolvedLabels","defaultDraggableContent","Checkbox","DndContext","closestCenter","SortableContext","verticalListSortingStrategy","DataTableDraggableColumnOption","Button","Popover","Command","allColumns","columnById","order","orderedIds","pinning","leftIds","rightIds","pinnedIds","centerIds","label","onCheckedChange","attributes","listeners","setNodeRef","transform","transition","isDragging","useSortable","CSS","GripVertical"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,SAASA,GAA4B;AAAA,EAC1C,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,QAAAC;AAAA,EACA,aAAAC,IAAc,gBAAAC,EAACC,IAAA,EAAU,WAAU,2BAAA,CAA2B;AAAA,EAC9D,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,GAAGC;AACL,GAAqC;AACnC,QAAMC,IAAcV,EAAM,SAAA,EAAW,aAC/BW,IAAgBX,EAAM,SAAA,EAAW,eAEjCY,IAAUC,EAAM;AAAA,IACpB,MACEC,EAAuBd,GAAOU,GAAaC,CAAa,EAAE;AAAA,MACxD,CAACI,MACC,OAAOA,EAAO,aAAe,OAAeA,EAAO,WAAA;AAAA,IAAW;AAAA,IAEpE,CAACf,GAAOU,GAAaC,CAAa;AAAA,EAAA,GAG9BK,IAAiBH,EAAM;AAAA,IAC3B,CAACE,MACCA,EAAO,UAAU,MAAM,UACtB,OAAOA,EAAO,UAAU,UAAW,WAChCA,EAAO,UAAU,SACjBA,EAAO;AAAA,IACb,CAAA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
|
3
|
+
function n(s) {
|
|
4
|
+
return {
|
|
5
|
+
id: "select",
|
|
6
|
+
header: ({ table: e }) => /* @__PURE__ */ l("div", { className: "ds:flex ds:items-center ds:justify-center", children: /* @__PURE__ */ l(
|
|
7
|
+
c,
|
|
8
|
+
{
|
|
9
|
+
checked: e.getIsAllPageRowsSelected() || e.getIsSomePageRowsSelected() && "indeterminate",
|
|
10
|
+
onCheckedChange: (t) => e.toggleAllPageRowsSelected(!!t),
|
|
11
|
+
"aria-label": "Select all"
|
|
12
|
+
}
|
|
13
|
+
) }),
|
|
14
|
+
cell: ({ row: e }) => /* @__PURE__ */ l("div", { className: "ds:flex ds:items-center ds:justify-center", children: /* @__PURE__ */ l(
|
|
15
|
+
c,
|
|
16
|
+
{
|
|
17
|
+
checked: e.getIsSelected(),
|
|
18
|
+
onCheckedChange: (t) => e.toggleSelected(!!t),
|
|
19
|
+
"aria-label": "Select row"
|
|
20
|
+
}
|
|
21
|
+
) }),
|
|
22
|
+
size: 36,
|
|
23
|
+
enableSorting: !1,
|
|
24
|
+
enableHiding: !1,
|
|
25
|
+
enableColumnFilter: !1,
|
|
26
|
+
...s
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const i = n;
|
|
30
|
+
export {
|
|
31
|
+
i as selectColumn
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=select-column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-column.js","sources":["../../../../src/components/Table/select-column.tsx"],"sourcesContent":["import type {\n CellContext,\n ColumnDef,\n HeaderContext,\n} from \"@tanstack/react-table\";\nimport { Checkbox } from \"@/components/Checkbox\";\n\nfunction createSelectColumn<TData>(\n props?: Partial<ColumnDef<TData>>\n): ColumnDef<TData> {\n return {\n id: \"select\",\n header: ({ table }: HeaderContext<TData, unknown>) => (\n <div className=\"ds:flex ds:items-center ds:justify-center\">\n <Checkbox\n checked={\n table.getIsAllPageRowsSelected() ||\n (table.getIsSomePageRowsSelected() && \"indeterminate\")\n }\n onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}\n aria-label=\"Select all\"\n />\n </div>\n ),\n cell: ({ row }: CellContext<TData, unknown>) => (\n <div className=\"ds:flex ds:items-center ds:justify-center\">\n <Checkbox\n checked={row.getIsSelected()}\n onCheckedChange={(value) => row.toggleSelected(!!value)}\n aria-label=\"Select row\"\n />\n </div>\n ),\n size: 36,\n enableSorting: false,\n enableHiding: false,\n enableColumnFilter: false,\n ...props,\n };\n}\n\nexport const selectColumn = createSelectColumn;\n"],"names":["createSelectColumn","props","table","jsx","Checkbox","value","row","selectColumn"],"mappings":";;AAOA,SAASA,EACPC,GACkB;AAClB,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,QAAQ,CAAC,EAAE,OAAAC,EAAA,MACT,gBAAAC,EAAC,OAAA,EAAI,WAAU,6CACb,UAAA,gBAAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SACEF,EAAM,yBAAA,KACLA,EAAM,+BAA+B;AAAA,QAExC,iBAAiB,CAACG,MAAUH,EAAM,0BAA0B,CAAC,CAACG,CAAK;AAAA,QACnE,cAAW;AAAA,MAAA;AAAA,IAAA,GAEf;AAAA,IAEF,MAAM,CAAC,EAAE,KAAAC,EAAA,MACP,gBAAAH,EAAC,OAAA,EAAI,WAAU,6CACb,UAAA,gBAAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAASE,EAAI,cAAA;AAAA,QACb,iBAAiB,CAACD,MAAUC,EAAI,eAAe,CAAC,CAACD,CAAK;AAAA,QACtD,cAAW;AAAA,MAAA;AAAA,IAAA,GAEf;AAAA,IAEF,MAAM;AAAA,IACN,eAAe;AAAA,IACf,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,GAAGJ;AAAA,EAAA;AAEP;AAEO,MAAMM,IAAeP;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Command as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { Tour as
|
|
4
|
-
import { QRCode as
|
|
5
|
-
import { Stepper as
|
|
1
|
+
import { Command as V } from "./components/Command/index.js";
|
|
2
|
+
import { Popover as y } from "./components/Popover/index.js";
|
|
3
|
+
import { Tour as z } from "./components/Tour/index.js";
|
|
4
|
+
import { QRCode as E, QRCode as H } from "./components/QrCode/index.js";
|
|
5
|
+
import { Stepper as Q } from "./components/Stepper/index.js";
|
|
6
6
|
import { Pagination as N } from "./components/Pagination/index.js";
|
|
7
7
|
import { DropdownMenu as U } from "./components/DropdownMenu/index.js";
|
|
8
8
|
import { ContextMenu as j } from "./components/ContextMenu/index.js";
|
|
9
9
|
import { FloatingLabel as K } from "./components/FloatLabel.js";
|
|
10
10
|
import { TimeGridView as Y } from "./components/TimeGridView.js";
|
|
11
11
|
import { TimeColumnwheel as $ } from "./components/WheelColumn.js";
|
|
12
|
-
import { Marquee as
|
|
12
|
+
import { Marquee as re } from "./components/Marquee/index.js";
|
|
13
13
|
import "@radix-ui/react-slot";
|
|
14
14
|
import "./packages/ui/src/components/button.js";
|
|
15
|
-
import { ButtonGroupSeparator as
|
|
15
|
+
import { ButtonGroupSeparator as te, ButtonGroupText as ae } from "./packages/ui/src/components/button-group.js";
|
|
16
16
|
import "./packages/ui/src/components/input.js";
|
|
17
17
|
import "./packages/ui/src/components/textarea.js";
|
|
18
|
-
import { Label as
|
|
18
|
+
import { Label as me } from "./packages/ui/src/components/label.js";
|
|
19
19
|
import "./packages/ui/src/components/select.js";
|
|
20
20
|
import "./packages/ui/src/components/combobox.js";
|
|
21
21
|
import "react/jsx-runtime";
|
|
22
22
|
import "@radix-ui/react-tooltip";
|
|
23
|
-
import { cn as
|
|
23
|
+
import { cn as ie } from "./packages/ui/src/lib/utils.js";
|
|
24
24
|
import "react";
|
|
25
25
|
import "lucide-react";
|
|
26
26
|
import "react-day-picker";
|
|
@@ -40,162 +40,175 @@ import "@radix-ui/react-dialog";
|
|
|
40
40
|
import "@radix-ui/react-dropdown-menu";
|
|
41
41
|
import "./packages/ui/src/components/input-otp.js";
|
|
42
42
|
import "./packages/ui/src/components/radio-group.js";
|
|
43
|
-
import { useSidebar as
|
|
43
|
+
import { useSidebar as le } from "./packages/ui/src/components/sidebar.js";
|
|
44
44
|
import "@radix-ui/react-slider";
|
|
45
45
|
import "./packages/ui/src/components/tabs.js";
|
|
46
46
|
import "./packages/ui/src/components/toggle.js";
|
|
47
|
-
import { useCallbackRef as
|
|
48
|
-
import { useDebouncedCallback as
|
|
49
|
-
import { useDebounceValue as
|
|
50
|
-
import { useIntersectionObserver as
|
|
51
|
-
import { useScript as
|
|
52
|
-
import { useScrollLock as
|
|
53
|
-
import { useOnClickOutside as
|
|
54
|
-
import { useEventListener as
|
|
55
|
-
import { useMediaQuery as
|
|
56
|
-
import { useDataTable as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { ScrollArea as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { Handle as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { Avatar as
|
|
86
|
-
import { Calendar as
|
|
87
|
-
import { DatePicker as
|
|
88
|
-
import { RangePicker as
|
|
89
|
-
import { TimePicker as
|
|
90
|
-
import { Sidebar as
|
|
47
|
+
import { useCallbackRef as de } from "./hooks/use-callback-ref.js";
|
|
48
|
+
import { useDebouncedCallback as ne } from "./hooks/use-debounced-callback.js";
|
|
49
|
+
import { useDebounceValue as Se } from "./hooks/use-debounced-value.js";
|
|
50
|
+
import { useIntersectionObserver as Ce } from "./hooks/use-intersection-observer.js";
|
|
51
|
+
import { useScript as ge } from "./hooks/use-script.js";
|
|
52
|
+
import { useScrollLock as Re } from "./hooks/use-scroll-lock.js";
|
|
53
|
+
import { useOnClickOutside as De } from "./hooks/use-on-click-outside.js";
|
|
54
|
+
import { useEventListener as Ge } from "./hooks/use-event-listener.js";
|
|
55
|
+
import { useMediaQuery as Be } from "./hooks/use-media-query.js";
|
|
56
|
+
import { useDataTable as ke } from "./hooks/use-data-table.js";
|
|
57
|
+
import { default as Ve } from "./components/Badge/Badge.js";
|
|
58
|
+
import { default as ye } from "./components/Breadcrumb/Breadcrumb.js";
|
|
59
|
+
import { default as ze } from "./components/Button/Button.js";
|
|
60
|
+
import { default as Ee } from "./components/Button/ButtonGroup.js";
|
|
61
|
+
import { default as Le } from "./components/Checkbox/Checkbox.js";
|
|
62
|
+
import { default as We } from "./components/Collapsible/Collapsible.js";
|
|
63
|
+
import { default as qe } from "./components/Dialog/Dialog.js";
|
|
64
|
+
import { default as _e } from "./components/Glass/Glass.js";
|
|
65
|
+
import { default as Je } from "./components/Input/Input.js";
|
|
66
|
+
import { default as Xe } from "./components/InputOTP/InputOTP.js";
|
|
67
|
+
import { default as Ze } from "./components/Radio/Radio.js";
|
|
68
|
+
import { ScrollArea as er } from "./components/ScrollArea/ScrollArea.js";
|
|
69
|
+
import { default as or } from "./components/Select/Select.js";
|
|
70
|
+
import { default as ar } from "./components/Separator/Separator.js";
|
|
71
|
+
import { default as mr } from "./components/Sheet/Sheet.js";
|
|
72
|
+
import { default as ir } from "./components/Skeleton/Skeleton.js";
|
|
73
|
+
import { default as lr } from "./components/Slider/Slider.js";
|
|
74
|
+
import { default as dr } from "./components/Switch/Switch.js";
|
|
75
|
+
import { default as nr } from "./components/Tabs/Tabs.js";
|
|
76
|
+
import { default as Sr } from "./components/Textarea/Textarea.js";
|
|
77
|
+
import { default as Cr } from "./components/Toggle/Toggle.js";
|
|
78
|
+
import { default as gr } from "./components/Rate/Rate.js";
|
|
79
|
+
import { Handle as Rr, Panel as Mr, default as Dr, ResizableWrapper as Pr } from "./components/Resizable/Resizable.js";
|
|
80
|
+
import { default as wr } from "./components/Accordion/Accordion.js";
|
|
81
|
+
import { default as Ar } from "./lib/TextAnimation/BlurText.js";
|
|
82
|
+
import { default as Fr } from "./lib/TextAnimation/CircularText.js";
|
|
83
|
+
import { default as vr } from "./lib/TextAnimation/TextPressureEffect.js";
|
|
84
|
+
import { default as hr } from "./lib/TextAnimation/TypingText.js";
|
|
85
|
+
import { Avatar as Or } from "./components/Avatar/Avatar.js";
|
|
86
|
+
import { Calendar as Hr, CalendarDayButton as Lr } from "./components/Calendar/Calendar.js";
|
|
87
|
+
import { DatePicker as Wr } from "./components/DatePicker/DatePicker.js";
|
|
88
|
+
import { RangePicker as qr } from "./components/DatePicker/RangePicker.js";
|
|
89
|
+
import { TimePicker as _r } from "./components/DatePicker/TimePicker.js";
|
|
90
|
+
import { Sidebar as Jr, SidebarContent as Kr, SidebarFooter as Xr, SidebarGroup as Yr, SidebarGroupAction as Zr, SidebarGroupContent as $r, SidebarGroupLabel as eo, SidebarHeader as ro, SidebarInput as oo, SidebarInset as to, SidebarMenu as ao, SidebarMenuAction as po, SidebarMenuBadge as mo, SidebarMenuButton as fo, SidebarMenuItem as io, SidebarMenuSkeleton as xo, SidebarMenuSub as lo, SidebarMenuSubButton as uo, SidebarMenuSubItem as so, SidebarProvider as no, SidebarRail as bo, SidebarSeparator as So, SidebarTrigger as To } from "./components/Sidebar/Sidebar.js";
|
|
91
91
|
import { toast as co, Toaster as go, toast as Io } from "./components/Toast/Toast.js";
|
|
92
92
|
import { Tooltip as Mo } from "./components/Tooltip/Tooltip.js";
|
|
93
|
-
import { Upload as
|
|
93
|
+
import { Upload as Po } from "./components/Upload/Upload.js";
|
|
94
94
|
import { useQRCode as wo } from "./components/QrCode/QrCode.js";
|
|
95
|
-
import { useStepper as
|
|
96
|
-
import { DataTable as
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
95
|
+
import { useStepper as Ao } from "./components/Stepper/Stepper.js";
|
|
96
|
+
import { DataTable as Fo } from "./components/Table/data-table.js";
|
|
97
|
+
import { DataTableColumnHeader as vo } from "./components/Table/data-table-column-header.js";
|
|
98
|
+
import { DataTablePagination as ho } from "./components/Table/data-table-pagination.js";
|
|
99
|
+
import { DataTableToolbar as Oo } from "./components/Table/data-table-toolbar.js";
|
|
100
|
+
import { DataTableViewOptions as Ho } from "./components/Table/data-table-view-options.js";
|
|
101
|
+
import { selectColumn as Qo } from "./components/Table/select-column.js";
|
|
102
|
+
import { DataTableDateFilter as No } from "./components/Table/TableFilter/data-table-date-filter.js";
|
|
103
|
+
import { DataTableFilterPopover as Uo } from "./components/Table/TableFilter/data-table-filter-popover.js";
|
|
104
|
+
import { DataTableSliderFilter as jo } from "./components/Table/TableFilter/data-table-slider-filter.js";
|
|
105
|
+
import { TreeSelect as Ko, TreeView as Xo } from "./components/TreeSelect/TreeSelect.js";
|
|
106
|
+
import { ResizableHandle as Zo, ResizablePanel as $o, ResizablePanelGroup as et } from "./packages/ui/src/components/resizable.js";
|
|
107
|
+
import { AccordionContent as ot, AccordionItem as tt, AccordionTrigger as at } from "./packages/ui/src/components/accordion.js";
|
|
108
|
+
import { ImageViewer as mt, ImageViewerGroup as ft, ImageViewerImage as it } from "./components/ImageViewer/ImageViewer.js";
|
|
109
|
+
import { Carousel as lt, CarouselSlide as ut } from "./components/Carousel/Carousel.js";
|
|
110
|
+
import { Root as st, Area as nt, Image as bt, Video as St, useCropper as Tt } from "./components/Cropper/Cropper.js";
|
|
111
|
+
import { CropperTool as ct, useCropperTool as gt } from "./components/Cropper/CropperTool.js";
|
|
112
|
+
import { base64ToBlob as Rt, base64ToFile as Mt, downloadImage as Dt, getCroppedImg as Pt, rotateSize as Gt } from "./components/Cropper/utils.js";
|
|
113
|
+
import { Cursor as Bt, CursorFollow as At, CursorProvider as kt, TRANSITION_PRESETS as Ft, useCursor as Vt, useCursorFollow as vt } from "./components/Interactive/CursorFollow.js";
|
|
114
|
+
import { Item as ht, MasonryItem as zt, MasonryRoot as Ot, Root as Et } from "./components/Masonry/Masonry.js";
|
|
115
|
+
import { Masonry as Lt, MasonryComponent as Qt } from "./components/Masonry/MasonryWrapper.js";
|
|
116
|
+
import { RotatingText as Nt } from "./lib/TextAnimation/RotatingText.js";
|
|
117
|
+
import { FlipWords as Ut } from "./lib/TextAnimation/FlipWords.js";
|
|
118
|
+
import { GradientText as jt } from "./lib/TextAnimation/GradientText.js";
|
|
119
|
+
import { RollingText as Kt } from "./lib/TextAnimation/RollingText.js";
|
|
120
|
+
import { ShimmeringText as Yt } from "./lib/TextAnimation/ShimmeringText.js";
|
|
121
|
+
import { SplittingText as $t } from "./lib/TextAnimation/SplittingText.js";
|
|
122
|
+
import { TextGenerateEffect as ra } from "./lib/TextAnimation/TextGenerateEffect.js";
|
|
123
|
+
import { TextHoverEffect as ta } from "./lib/TextAnimation/TextHoverEffect.js";
|
|
124
|
+
import { WritingText as pa } from "./lib/TextAnimation/WritingText.js";
|
|
118
125
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
wr as Accordion,
|
|
127
|
+
ot as AccordionContent,
|
|
128
|
+
tt as AccordionItem,
|
|
129
|
+
at as AccordionTrigger,
|
|
130
|
+
Or as Avatar,
|
|
131
|
+
Ve as Badge,
|
|
132
|
+
Ar as BlurText,
|
|
133
|
+
ye as Breadcrumb,
|
|
134
|
+
ze as Button,
|
|
135
|
+
Ee as ButtonGroup,
|
|
136
|
+
te as ButtonGroupSeparator,
|
|
137
|
+
ae as ButtonGroupText,
|
|
138
|
+
Hr as Calendar,
|
|
139
|
+
Lr as CalendarDayButton,
|
|
140
|
+
lt as Carousel,
|
|
141
|
+
ut as CarouselSlide,
|
|
142
|
+
Le as Checkbox,
|
|
143
|
+
Fr as CircularText,
|
|
144
|
+
We as Collapsible,
|
|
145
|
+
V as Command,
|
|
139
146
|
j as ContextMenu,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
st as Cropper,
|
|
148
|
+
nt as CropperArea,
|
|
149
|
+
bt as CropperImage,
|
|
150
|
+
ct as CropperTool,
|
|
151
|
+
St as CropperVideo,
|
|
152
|
+
Bt as Cursor,
|
|
153
|
+
At as CursorFollow,
|
|
154
|
+
kt as CursorProvider,
|
|
155
|
+
Fo as DataTable,
|
|
156
|
+
vo as DataTableColumnHeader,
|
|
157
|
+
No as DataTableDateFilter,
|
|
158
|
+
Uo as DataTableFilterPopover,
|
|
159
|
+
ho as DataTablePagination,
|
|
160
|
+
jo as DataTableSliderFilter,
|
|
161
|
+
Oo as DataTableToolbar,
|
|
162
|
+
Ho as DataTableViewOptions,
|
|
163
|
+
Wr as DatePicker,
|
|
164
|
+
qe as Dialog,
|
|
152
165
|
U as DropdownMenu,
|
|
153
|
-
|
|
166
|
+
Ut as FlipWords,
|
|
154
167
|
K as FloatingLabel,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
_e as Glass,
|
|
169
|
+
jt as GradientText,
|
|
170
|
+
Rr as Handle,
|
|
171
|
+
mt as ImageViewer,
|
|
172
|
+
ft as ImageViewerGroup,
|
|
173
|
+
it as ImageViewerImage,
|
|
174
|
+
Je as Input,
|
|
175
|
+
Xe as InputOTP,
|
|
176
|
+
ht as Item,
|
|
177
|
+
me as Label,
|
|
178
|
+
re as Marquee,
|
|
179
|
+
Lt as Masonry,
|
|
180
|
+
Qt as MasonryComponent,
|
|
181
|
+
zt as MasonryItem,
|
|
182
|
+
Ot as MasonryRoot,
|
|
170
183
|
N as Pagination,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
$
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
Mr as Panel,
|
|
185
|
+
y as Popover,
|
|
186
|
+
E as QRCode,
|
|
187
|
+
H as QrCode,
|
|
188
|
+
Ze as Radio,
|
|
189
|
+
qr as RangePicker,
|
|
190
|
+
gr as Rate,
|
|
191
|
+
Dr as Resizable,
|
|
192
|
+
Zo as ResizableHandle,
|
|
193
|
+
$o as ResizablePanel,
|
|
194
|
+
et as ResizablePanelGroup,
|
|
195
|
+
Pr as ResizableWrapper,
|
|
196
|
+
Kt as RollingText,
|
|
197
|
+
Et as Root,
|
|
198
|
+
Nt as RotatingText,
|
|
199
|
+
er as ScrollArea,
|
|
200
|
+
or as Select,
|
|
201
|
+
ar as Separator,
|
|
202
|
+
mr as Sheet,
|
|
203
|
+
Yt as ShimmeringText,
|
|
204
|
+
Jr as Sidebar,
|
|
205
|
+
Kr as SidebarContent,
|
|
206
|
+
Xr as SidebarFooter,
|
|
207
|
+
Yr as SidebarGroup,
|
|
208
|
+
Zr as SidebarGroupAction,
|
|
209
|
+
$r as SidebarGroupContent,
|
|
210
|
+
eo as SidebarGroupLabel,
|
|
211
|
+
ro as SidebarHeader,
|
|
199
212
|
oo as SidebarInput,
|
|
200
213
|
to as SidebarInset,
|
|
201
214
|
ao as SidebarMenu,
|
|
@@ -204,60 +217,61 @@ export {
|
|
|
204
217
|
fo as SidebarMenuButton,
|
|
205
218
|
io as SidebarMenuItem,
|
|
206
219
|
xo as SidebarMenuSkeleton,
|
|
207
|
-
|
|
208
|
-
|
|
220
|
+
lo as SidebarMenuSub,
|
|
221
|
+
uo as SidebarMenuSubButton,
|
|
209
222
|
so as SidebarMenuSubItem,
|
|
210
223
|
no as SidebarProvider,
|
|
211
224
|
bo as SidebarRail,
|
|
212
225
|
So as SidebarSeparator,
|
|
213
226
|
To as SidebarTrigger,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
ir as Skeleton,
|
|
228
|
+
lr as Slider,
|
|
229
|
+
$t as SplittingText,
|
|
230
|
+
Q as Stepper,
|
|
231
|
+
dr as Switch,
|
|
232
|
+
Ft as TRANSITION_PRESETS,
|
|
233
|
+
nr as Tabs,
|
|
234
|
+
ra as TextGenerateEffect,
|
|
235
|
+
ta as TextHoverEffect,
|
|
236
|
+
vr as TextPressure,
|
|
237
|
+
Sr as Textarea,
|
|
225
238
|
Y as TimeGridView,
|
|
226
|
-
|
|
239
|
+
_r as TimePicker,
|
|
227
240
|
co as Toast,
|
|
228
241
|
go as Toaster,
|
|
229
|
-
|
|
242
|
+
Cr as Toggle,
|
|
230
243
|
Mo as Tooltip,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
244
|
+
z as Tour,
|
|
245
|
+
Ko as TreeSelect,
|
|
246
|
+
Xo as TreeView,
|
|
247
|
+
hr as TypingText,
|
|
248
|
+
Po as Upload,
|
|
236
249
|
$ as WheelColumn,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
250
|
+
pa as WritingText,
|
|
251
|
+
Rt as base64ToBlob,
|
|
252
|
+
Mt as base64ToFile,
|
|
253
|
+
ie as cn,
|
|
254
|
+
Dt as downloadImage,
|
|
255
|
+
Pt as getCroppedImg,
|
|
256
|
+
Gt as rotateSize,
|
|
257
|
+
Qo as selectColumn,
|
|
244
258
|
Io as toast,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
259
|
+
de as useCallbackRef,
|
|
260
|
+
Tt as useCropper,
|
|
261
|
+
gt as useCropperTool,
|
|
262
|
+
Vt as useCursor,
|
|
263
|
+
vt as useCursorFollow,
|
|
264
|
+
ke as useDataTable,
|
|
265
|
+
Se as useDebounceValue,
|
|
266
|
+
ne as useDebouncedCallback,
|
|
267
|
+
Ge as useEventListener,
|
|
268
|
+
Ce as useIntersectionObserver,
|
|
269
|
+
Be as useMediaQuery,
|
|
270
|
+
De as useOnClickOutside,
|
|
257
271
|
wo as useQRCode,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
272
|
+
ge as useScript,
|
|
273
|
+
Re as useScrollLock,
|
|
274
|
+
le as useSidebar,
|
|
275
|
+
Ao as useStepper
|
|
262
276
|
};
|
|
263
277
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import a, { useState as r, useCallback as c } from "react";
|
|
2
|
+
const d = {
|
|
3
|
+
display: "none"
|
|
4
|
+
};
|
|
5
|
+
function u(e) {
|
|
6
|
+
let {
|
|
7
|
+
id: n,
|
|
8
|
+
value: t
|
|
9
|
+
} = e;
|
|
10
|
+
return a.createElement("div", {
|
|
11
|
+
id: n,
|
|
12
|
+
style: d
|
|
13
|
+
}, t);
|
|
14
|
+
}
|
|
15
|
+
function s(e) {
|
|
16
|
+
let {
|
|
17
|
+
id: n,
|
|
18
|
+
announcement: t,
|
|
19
|
+
ariaLiveType: i = "assertive"
|
|
20
|
+
} = e;
|
|
21
|
+
const o = {
|
|
22
|
+
position: "fixed",
|
|
23
|
+
top: 0,
|
|
24
|
+
left: 0,
|
|
25
|
+
width: 1,
|
|
26
|
+
height: 1,
|
|
27
|
+
margin: -1,
|
|
28
|
+
border: 0,
|
|
29
|
+
padding: 0,
|
|
30
|
+
overflow: "hidden",
|
|
31
|
+
clip: "rect(0 0 0 0)",
|
|
32
|
+
clipPath: "inset(100%)",
|
|
33
|
+
whiteSpace: "nowrap"
|
|
34
|
+
};
|
|
35
|
+
return a.createElement("div", {
|
|
36
|
+
id: n,
|
|
37
|
+
style: o,
|
|
38
|
+
role: "status",
|
|
39
|
+
"aria-live": i,
|
|
40
|
+
"aria-atomic": !0
|
|
41
|
+
}, t);
|
|
42
|
+
}
|
|
43
|
+
function p() {
|
|
44
|
+
const [e, n] = r("");
|
|
45
|
+
return {
|
|
46
|
+
announce: c((i) => {
|
|
47
|
+
i != null && n(i);
|
|
48
|
+
}, []),
|
|
49
|
+
announcement: e
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
u as HiddenText,
|
|
54
|
+
s as LiveRegion,
|
|
55
|
+
p as useAnnouncement
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=accessibility.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.esm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@19.1.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js"],"sourcesContent":["import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n"],"names":["hiddenStyles","HiddenText","_ref","id","value","React","LiveRegion","announcement","ariaLiveType","visuallyHidden","useAnnouncement","setAnnouncement","useState","useCallback"],"mappings":";AAEA,MAAMA,IAAe;AAAA,EACnB,SAAS;AACX;AACA,SAASC,EAAWC,GAAM;AACxB,MAAI;AAAA,IACF,IAAAC;AAAA,IACA,OAAAC;AAAA,EACJ,IAAMF;AACJ,SAAOG,EAAM,cAAc,OAAO;AAAA,IAChC,IAAIF;AAAA,IACJ,OAAOH;AAAA,EACX,GAAKI,CAAK;AACV;AAEA,SAASE,EAAWJ,GAAM;AACxB,MAAI;AAAA,IACF,IAAAC;AAAA,IACA,cAAAI;AAAA,IACA,cAAAC,IAAe;AAAA,EACnB,IAAMN;AAEJ,QAAMO,IAAiB;AAAA,IACrB,UAAU;AAAA,IACV,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,EAChB;AACE,SAAOJ,EAAM,cAAc,OAAO;AAAA,IAChC,IAAIF;AAAA,IACJ,OAAOM;AAAA,IACP,MAAM;AAAA,IACN,aAAaD;AAAA,IACb,eAAe;AAAA,EACnB,GAAKD,CAAY;AACjB;AAEA,SAASG,IAAkB;AACzB,QAAM,CAACH,GAAcI,CAAe,IAAIC,EAAS,EAAE;AAMnD,SAAO;AAAA,IACL,UANeC,EAAY,CAAAT,MAAS;AACpC,MAAIA,KAAS,QACXO,EAAgBP,CAAK;AAAA,IAEzB,GAAG,CAAA,CAAE;AAAA,IAGH,cAAAG;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
|