@cmdniels/uikit 2.0.2 → 2.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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/data-variants.css +61 -0
  3. package/out/components/dialog/DialogContent.js +1 -1
  4. package/out/components/dialog/DialogContent.js.map +1 -1
  5. package/out/index.d.ts +0 -5
  6. package/out/index.d.ts.map +1 -1
  7. package/out/index.js +0 -6
  8. package/out/index.js.map +1 -1
  9. package/package.json +6 -7
  10. package/superellipse.css +1194 -0
  11. package/tailwind.css +4 -198
  12. package/out/components/sortable/Sortable.d.ts +0 -55
  13. package/out/components/sortable/Sortable.d.ts.map +0 -1
  14. package/out/components/sortable/Sortable.js +0 -149
  15. package/out/components/sortable/Sortable.js.map +0 -1
  16. package/out/components/sortable/SortableContent.d.ts +0 -9
  17. package/out/components/sortable/SortableContent.d.ts.map +0 -1
  18. package/out/components/sortable/SortableContent.js +0 -17
  19. package/out/components/sortable/SortableContent.js.map +0 -1
  20. package/out/components/sortable/SortableContentContext.d.ts +0 -3
  21. package/out/components/sortable/SortableContentContext.d.ts.map +0 -1
  22. package/out/components/sortable/SortableContentContext.js +0 -4
  23. package/out/components/sortable/SortableContentContext.js.map +0 -1
  24. package/out/components/sortable/SortableItem.d.ts +0 -18
  25. package/out/components/sortable/SortableItem.d.ts.map +0 -1
  26. package/out/components/sortable/SortableItem.js +0 -71
  27. package/out/components/sortable/SortableItem.js.map +0 -1
  28. package/out/components/sortable/SortableItemHandle.d.ts +0 -5
  29. package/out/components/sortable/SortableItemHandle.d.ts.map +0 -1
  30. package/out/components/sortable/SortableItemHandle.js +0 -33
  31. package/out/components/sortable/SortableItemHandle.js.map +0 -1
  32. package/out/components/sortable/SortableOverlay.d.ts +0 -9
  33. package/out/components/sortable/SortableOverlay.d.ts.map +0 -1
  34. package/out/components/sortable/SortableOverlay.js +0 -32
  35. package/out/components/sortable/SortableOverlay.js.map +0 -1
  36. package/out/components/sortable/SortableOverlayContext.d.ts +0 -3
  37. package/out/components/sortable/SortableOverlayContext.d.ts.map +0 -1
  38. package/out/components/sortable/SortableOverlayContext.js +0 -4
  39. package/out/components/sortable/SortableOverlayContext.js.map +0 -1
  40. package/out/components/sortable/SortableRootContext.d.ts +0 -4
  41. package/out/components/sortable/SortableRootContext.d.ts.map +0 -1
  42. package/out/components/sortable/SortableRootContext.js +0 -4
  43. package/out/components/sortable/SortableRootContext.js.map +0 -1
  44. package/out/components/sortable/useSortableContext.d.ts +0 -2
  45. package/out/components/sortable/useSortableContext.d.ts.map +0 -1
  46. package/out/components/sortable/useSortableContext.js +0 -10
  47. package/out/components/sortable/useSortableContext.js.map +0 -1
  48. package/out/components/sortable/useSortableItemContext.d.ts +0 -2
  49. package/out/components/sortable/useSortableItemContext.d.ts.map +0 -1
  50. package/out/components/sortable/useSortableItemContext.js +0 -10
  51. package/out/components/sortable/useSortableItemContext.js.map +0 -1
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useComposedRefs } from "motion/react";
3
- import { cloneElement } from "react";
4
- import cn from "../../cn";
5
- import useSortableContext from "./useSortableContext";
6
- import useSortableItemContext from "./useSortableItemContext";
7
- export default function SortableItemHandle(props) {
8
- const { render, disabled, className, ...itemHandleProps } = props;
9
- const context = useSortableContext();
10
- const itemContext = useSortableItemContext();
11
- const isDisabled = disabled ?? itemContext.disabled;
12
- const composedRef = useComposedRefs(itemHandleProps.ref, (node) => {
13
- if (isDisabled) {
14
- return;
15
- }
16
- itemContext.setActivatorNodeRef(node);
17
- });
18
- const mergedProps = {
19
- type: "button",
20
- "aria-controls": itemContext.id,
21
- "data-disabled": isDisabled,
22
- "data-dragging": itemContext.isDragging ? "" : undefined,
23
- "data-slot": "sortable-item-handle",
24
- ...itemHandleProps,
25
- ...(isDisabled ? {} : itemContext.attributes),
26
- ...(isDisabled ? {} : itemContext.listeners),
27
- ref: composedRef,
28
- className: cn("select-none disabled:pointer-events-none", context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing", className),
29
- disabled: isDisabled,
30
- };
31
- return render ? cloneElement(render, mergedProps) : _jsx("button", { ...mergedProps });
32
- }
33
- //# sourceMappingURL=SortableItemHandle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableItemHandle.js","sourceRoot":"","sources":["../../../components/sortable/SortableItemHandle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAmE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEtG,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACzC,KAE4B;IAE5B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,GAAG,KAAK,CAAC;IAElE,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;IAE7C,MAAM,UAAU,GAAG,QAAQ,IAAI,WAAW,CAAC,QAAQ,CAAC;IAEpD,MAAM,WAAW,GAAG,eAAe,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,IAAwB,EAAE,EAAE;QACrF,IAAI,UAAU,EAAE,CAAC;YAChB,OAAO;QACR,CAAC;QACD,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG;QACnB,IAAI,EAAE,QAAiB;QACvB,eAAe,EAAE,WAAW,CAAC,EAAE;QAC/B,eAAe,EAAE,UAAU;QAC3B,eAAe,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QACxD,WAAW,EAAE,sBAAsB;QACnC,GAAG,eAAe;QAClB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC;QAC7C,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;QAC5C,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,EAAE,CACZ,0CAA0C,EAC1C,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,2CAA2C,EACnF,SAAS,CACT;QACD,QAAQ,EAAE,UAAU;KACpB,CAAC;IAEF,OAAO,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,oBAAY,WAAW,GAAI,CAAC;AACjF,CAAC","sourcesContent":["import { useComposedRefs } from \"motion/react\";\nimport { type ComponentPropsWithRef, type ElementType, type ReactElement, cloneElement } from \"react\";\n\nimport cn from \"@/cn\";\n\nimport useSortableContext from \"./useSortableContext\";\nimport useSortableItemContext from \"./useSortableItemContext\";\n\nexport default function SortableItemHandle<T extends ElementType = \"button\">(\n\tprops: {\n\t\trender?: ReactElement<T>;\n\t} & ComponentPropsWithRef<T>\n) {\n\tconst { render, disabled, className, ...itemHandleProps } = props;\n\n\tconst context = useSortableContext();\n\tconst itemContext = useSortableItemContext();\n\n\tconst isDisabled = disabled ?? itemContext.disabled;\n\n\tconst composedRef = useComposedRefs(itemHandleProps.ref, (node: HTMLElement | null) => {\n\t\tif (isDisabled) {\n\t\t\treturn;\n\t\t}\n\t\titemContext.setActivatorNodeRef(node);\n\t});\n\n\tconst mergedProps = {\n\t\ttype: \"button\" as const,\n\t\t\"aria-controls\": itemContext.id,\n\t\t\"data-disabled\": isDisabled,\n\t\t\"data-dragging\": itemContext.isDragging ? \"\" : undefined,\n\t\t\"data-slot\": \"sortable-item-handle\",\n\t\t...itemHandleProps,\n\t\t...(isDisabled ? {} : itemContext.attributes),\n\t\t...(isDisabled ? {} : itemContext.listeners),\n\t\tref: composedRef,\n\t\tclassName: cn(\n\t\t\t\"select-none disabled:pointer-events-none\",\n\t\t\tcontext.flatCursor ? \"cursor-default\" : \"cursor-grab data-dragging:cursor-grabbing\",\n\t\t\tclassName\n\t\t),\n\t\tdisabled: isDisabled,\n\t};\n\n\treturn render ? cloneElement(render, mergedProps) : <button {...mergedProps} />;\n}\n"]}
@@ -1,9 +0,0 @@
1
- import { type UniqueIdentifier, DragOverlay } from "@dnd-kit/core";
2
- import { type ComponentProps, type ReactNode } from "react";
3
- export default function SortableOverlay(props: {
4
- container?: Element | DocumentFragment | null;
5
- children?: ((params: {
6
- value: UniqueIdentifier;
7
- }) => ReactNode) | ReactNode;
8
- } & Omit<ComponentProps<typeof DragOverlay>, "children">): import("react").ReactPortal | null;
9
- //# sourceMappingURL=SortableOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableOverlay.d.ts","sourceRoot":"","sources":["../../../components/sortable/SortableOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAuD,MAAM,eAAe,CAAC;AACxH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAkBvF,MAAM,CAAC,OAAO,UAAU,eAAe,CACtC,KAAK,EAAE;IACN,SAAS,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAA;KAAE,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;CAC5E,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,EAAE,UAAU,CAAC,sCAiCxD"}
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { DragOverlay, defaultDropAnimationSideEffects } from "@dnd-kit/core";
3
- import { useLayoutEffect, useState } from "react";
4
- import * as ReactDOM from "react-dom";
5
- import cn from "../../cn";
6
- import SortableOverlayContext from "./SortableOverlayContext";
7
- import useSortableContext from "./useSortableContext";
8
- const dropAnimation = {
9
- sideEffects: defaultDropAnimationSideEffects({
10
- styles: {
11
- active: {
12
- opacity: "0.4",
13
- },
14
- },
15
- }),
16
- };
17
- export default function SortableOverlay(props) {
18
- const { container: containerProp, children, ...overlayProps } = props;
19
- const context = useSortableContext();
20
- const [mounted, setMounted] = useState(false);
21
- useLayoutEffect(() => setMounted(true), []);
22
- const container = containerProp ?? (mounted ? globalThis.document?.body : null);
23
- if (!container) {
24
- return null;
25
- }
26
- return ReactDOM.createPortal(_jsx(DragOverlay, { dropAnimation: dropAnimation, modifiers: context.modifiers, className: cn(!context.flatCursor && "cursor-grabbing"), ...overlayProps, children: _jsx(SortableOverlayContext.Provider, { value: true, children: context.activeId
27
- ? typeof children === "function"
28
- ? children({ value: context.activeId })
29
- : children
30
- : null }) }), container);
31
- }
32
- //# sourceMappingURL=SortableOverlay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableOverlay.js","sourceRoot":"","sources":["../../../components/sortable/SortableOverlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyB,WAAW,EAAE,+BAA+B,EAAsB,MAAM,eAAe,CAAC;AACxH,OAAO,EAAuC,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvF,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,MAAM,aAAa,GAAkB;IACpC,WAAW,EAAE,+BAA+B,CAAC;QAC5C,MAAM,EAAE;YACP,MAAM,EAAE;gBACP,OAAO,EAAE,KAAK;aACd;SACD;KACD,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACtC,KAGwD;IAExD,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,eAAe,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,aAAa,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEhF,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,QAAQ,CAAC,YAAY,CAC3B,KAAC,WAAW,IACX,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,OAAO,CAAC,SAAS,EAC5B,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,iBAAiB,CAAC,KACnD,YAAY,YAEhB,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAC1C,OAAO,CAAC,QAAQ;gBAChB,CAAC,CAAC,OAAO,QAAQ,KAAK,UAAU;oBAC/B,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;oBACvC,CAAC,CAAC,QAAQ;gBACX,CAAC,CAAC,IAAI,GAC0B,GACrB,EACd,SAAS,CACT,CAAC;AACH,CAAC","sourcesContent":["import { type UniqueIdentifier, DragOverlay, defaultDropAnimationSideEffects, type DropAnimation } from \"@dnd-kit/core\";\nimport { type ComponentProps, type ReactNode, useLayoutEffect, useState } from \"react\";\nimport * as ReactDOM from \"react-dom\";\n\nimport cn from \"@/cn\";\n\nimport SortableOverlayContext from \"./SortableOverlayContext\";\nimport useSortableContext from \"./useSortableContext\";\n\nconst dropAnimation: DropAnimation = {\n\tsideEffects: defaultDropAnimationSideEffects({\n\t\tstyles: {\n\t\t\tactive: {\n\t\t\t\topacity: \"0.4\",\n\t\t\t},\n\t\t},\n\t}),\n};\n\nexport default function SortableOverlay(\n\tprops: {\n\t\tcontainer?: Element | DocumentFragment | null;\n\t\tchildren?: ((params: { value: UniqueIdentifier }) => ReactNode) | ReactNode;\n\t} & Omit<ComponentProps<typeof DragOverlay>, \"children\">\n) {\n\tconst { container: containerProp, children, ...overlayProps } = props;\n\n\tconst context = useSortableContext();\n\n\tconst [mounted, setMounted] = useState(false);\n\n\tuseLayoutEffect(() => setMounted(true), []);\n\n\tconst container = containerProp ?? (mounted ? globalThis.document?.body : null);\n\n\tif (!container) {\n\t\treturn null;\n\t}\n\n\treturn ReactDOM.createPortal(\n\t\t<DragOverlay\n\t\t\tdropAnimation={dropAnimation}\n\t\t\tmodifiers={context.modifiers}\n\t\t\tclassName={cn(!context.flatCursor && \"cursor-grabbing\")}\n\t\t\t{...overlayProps}\n\t\t>\n\t\t\t<SortableOverlayContext.Provider value={true}>\n\t\t\t\t{context.activeId\n\t\t\t\t\t? typeof children === \"function\"\n\t\t\t\t\t\t? children({ value: context.activeId })\n\t\t\t\t\t\t: children\n\t\t\t\t\t: null}\n\t\t\t</SortableOverlayContext.Provider>\n\t\t</DragOverlay>,\n\t\tcontainer\n\t);\n}\n"]}
@@ -1,3 +0,0 @@
1
- declare const SortableOverlayContext: import("react").Context<boolean>;
2
- export default SortableOverlayContext;
3
- //# sourceMappingURL=SortableOverlayContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableOverlayContext.d.ts","sourceRoot":"","sources":["../../../components/sortable/SortableOverlayContext.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,sBAAsB,kCAAuB,CAAC;AAEpD,eAAe,sBAAsB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { createContext } from "react";
2
- const SortableOverlayContext = createContext(false);
3
- export default SortableOverlayContext;
4
- //# sourceMappingURL=SortableOverlayContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableOverlayContext.js","sourceRoot":"","sources":["../../../components/sortable/SortableOverlayContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,sBAAsB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAEpD,eAAe,sBAAsB,CAAC","sourcesContent":["import { createContext } from \"react\";\n\nconst SortableOverlayContext = createContext(false);\n\nexport default SortableOverlayContext;\n"]}
@@ -1,4 +0,0 @@
1
- import { type SortableRootContextValue } from "./Sortable";
2
- declare const SortableRootContext: import("react").Context<SortableRootContextValue<unknown> | null>;
3
- export default SortableRootContext;
4
- //# sourceMappingURL=SortableRootContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableRootContext.d.ts","sourceRoot":"","sources":["../../../components/sortable/SortableRootContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,QAAA,MAAM,mBAAmB,mEAAgE,CAAC;AAE1F,eAAe,mBAAmB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { createContext } from "react";
2
- const SortableRootContext = createContext(null);
3
- export default SortableRootContext;
4
- //# sourceMappingURL=SortableRootContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SortableRootContext.js","sourceRoot":"","sources":["../../../components/sortable/SortableRootContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,MAAM,mBAAmB,GAAG,aAAa,CAA2C,IAAI,CAAC,CAAC;AAE1F,eAAe,mBAAmB,CAAC","sourcesContent":["import { createContext } from \"react\";\n\nimport { type SortableRootContextValue } from \"./Sortable\";\n\nconst SortableRootContext = createContext<SortableRootContextValue<unknown> | null>(null);\n\nexport default SortableRootContext;\n"]}
@@ -1,2 +0,0 @@
1
- export default function useSortableContext(): import("./Sortable").SortableRootContextValue<unknown>;
2
- //# sourceMappingURL=useSortableContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSortableContext.d.ts","sourceRoot":"","sources":["../../../components/sortable/useSortableContext.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,kBAAkB,2DAMzC"}
@@ -1,10 +0,0 @@
1
- import { useContext } from "react";
2
- import SortableRootContext from "./SortableRootContext";
3
- export default function useSortableContext() {
4
- const context = useContext(SortableRootContext);
5
- if (!context) {
6
- throw new Error("`useSortableContext` must be used within `Sortable`");
7
- }
8
- return context;
9
- }
10
- //# sourceMappingURL=useSortableContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSortableContext.js","sourceRoot":"","sources":["../../../components/sortable/useSortableContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,kBAAkB;IACzC,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["import { useContext } from \"react\";\n\nimport SortableRootContext from \"./SortableRootContext\";\n\nexport default function useSortableContext() {\n\tconst context = useContext(SortableRootContext);\n\tif (!context) {\n\t\tthrow new Error(\"`useSortableContext` must be used within `Sortable`\");\n\t}\n\treturn context;\n}\n"]}
@@ -1,2 +0,0 @@
1
- export default function useSortableItemContext(): import("./SortableItem").SortableItemContextValue;
2
- //# sourceMappingURL=useSortableItemContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSortableItemContext.d.ts","sourceRoot":"","sources":["../../../components/sortable/useSortableItemContext.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,sBAAsB,sDAM7C"}
@@ -1,10 +0,0 @@
1
- import { useContext } from "react";
2
- import { SortableItemContext } from "./SortableItem";
3
- export default function useSortableItemContext() {
4
- const context = useContext(SortableItemContext);
5
- if (!context) {
6
- throw new Error("`useSortableItemContext` must be used within `SortableItem`");
7
- }
8
- return context;
9
- }
10
- //# sourceMappingURL=useSortableItemContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSortableItemContext.js","sourceRoot":"","sources":["../../../components/sortable/useSortableItemContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,sBAAsB;IAC7C,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["import { useContext } from \"react\";\n\nimport { SortableItemContext } from \"./SortableItem\";\n\nexport default function useSortableItemContext() {\n\tconst context = useContext(SortableItemContext);\n\tif (!context) {\n\t\tthrow new Error(\"`useSortableItemContext` must be used within `SortableItem`\");\n\t}\n\treturn context;\n}\n"]}