@trackunit/react-drawer 0.0.1 → 0.1.1

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/index.cjs.js CHANGED
@@ -115,10 +115,10 @@ const cvaDrawer = cssClassVarianceUtilities.cvaMerge([
115
115
  ], {
116
116
  variants: {
117
117
  position: {
118
- left: "left-0 top-0 h-full w-fit",
119
- right: "right-0 top-0 h-full w-fit",
120
- top: "left-0 top-0 h-fit w-full pb-2",
121
- bottom: "bottom-0 left-0 right-0 max-h-screen w-full pt-3",
118
+ left: ["left-0", "top-0", "h-full", "w-fit"],
119
+ right: ["right-0", "top-0", "h-full", "w-fit"],
120
+ top: ["left-0", "top-0", "h-fit", "w-full", "pb-2"],
121
+ bottom: ["bottom-0", "left-0", "right-0", "max-h-screen", "w-full", "pt-3"],
122
122
  },
123
123
  mode: {
124
124
  open: "", // No additional classes needed; position determines translation
@@ -175,10 +175,10 @@ const cvaDrawer = cssClassVarianceUtilities.cvaMerge([
175
175
  const cvaDrawerContent = cssClassVarianceUtilities.cvaMerge(["flex", "h-full", "shadow-lg", "bg-white"], {
176
176
  variants: {
177
177
  position: {
178
- left: " rounded-r-lg",
179
- right: " rounded-l-lg",
180
- top: " flex-col rounded-b-lg",
181
- bottom: " max-h-[calc(100vh-10px)] flex-col rounded-t-lg sm:max-h-none",
178
+ left: "rounded-r-lg",
179
+ right: "rounded-l-lg",
180
+ top: ["flex-col", "rounded-b-lg"],
181
+ bottom: ["max-h-[calc(100vh-10px)]", "flex-col", "rounded-t-lg", "sm:max-h-none"],
182
182
  },
183
183
  },
184
184
  });
@@ -372,7 +372,7 @@ const DrawerPuller = react.forwardRef(({ className, ...props }, ref) => {
372
372
  return (jsxRuntime.jsx("div", { className: cvaPuller({ className }), "data-testid": "drawer-puller", ...props, ref: ref, children: jsxRuntime.jsx("div", { className: cvaPullerIcon() }) }));
373
373
  });
374
374
  DrawerPuller.displayName = "DrawerPuller";
375
- const cvaPuller = cssClassVarianceUtilities.cvaMerge(["pt-2", "pb-4", "flex", "items-center", "justify-center"]);
375
+ const cvaPuller = cssClassVarianceUtilities.cvaMerge(["pt-1", "pb-4", "flex", "items-center", "justify-center"]);
376
376
  const cvaPullerIcon = cssClassVarianceUtilities.cvaMerge(["block", "h-1", "w-8", "rounded-full", "bg-gray-400"]);
377
377
 
378
378
  const CLOSING_THRESHOLD = 0.15;
package/index.esm.js CHANGED
@@ -113,10 +113,10 @@ const cvaDrawer = cvaMerge([
113
113
  ], {
114
114
  variants: {
115
115
  position: {
116
- left: "left-0 top-0 h-full w-fit",
117
- right: "right-0 top-0 h-full w-fit",
118
- top: "left-0 top-0 h-fit w-full pb-2",
119
- bottom: "bottom-0 left-0 right-0 max-h-screen w-full pt-3",
116
+ left: ["left-0", "top-0", "h-full", "w-fit"],
117
+ right: ["right-0", "top-0", "h-full", "w-fit"],
118
+ top: ["left-0", "top-0", "h-fit", "w-full", "pb-2"],
119
+ bottom: ["bottom-0", "left-0", "right-0", "max-h-screen", "w-full", "pt-3"],
120
120
  },
121
121
  mode: {
122
122
  open: "", // No additional classes needed; position determines translation
@@ -173,10 +173,10 @@ const cvaDrawer = cvaMerge([
173
173
  const cvaDrawerContent = cvaMerge(["flex", "h-full", "shadow-lg", "bg-white"], {
174
174
  variants: {
175
175
  position: {
176
- left: " rounded-r-lg",
177
- right: " rounded-l-lg",
178
- top: " flex-col rounded-b-lg",
179
- bottom: " max-h-[calc(100vh-10px)] flex-col rounded-t-lg sm:max-h-none",
176
+ left: "rounded-r-lg",
177
+ right: "rounded-l-lg",
178
+ top: ["flex-col", "rounded-b-lg"],
179
+ bottom: ["max-h-[calc(100vh-10px)]", "flex-col", "rounded-t-lg", "sm:max-h-none"],
180
180
  },
181
181
  },
182
182
  });
@@ -370,7 +370,7 @@ const DrawerPuller = forwardRef(({ className, ...props }, ref) => {
370
370
  return (jsx("div", { className: cvaPuller({ className }), "data-testid": "drawer-puller", ...props, ref: ref, children: jsx("div", { className: cvaPullerIcon() }) }));
371
371
  });
372
372
  DrawerPuller.displayName = "DrawerPuller";
373
- const cvaPuller = cvaMerge(["pt-2", "pb-4", "flex", "items-center", "justify-center"]);
373
+ const cvaPuller = cvaMerge(["pt-1", "pb-4", "flex", "items-center", "justify-center"]);
374
374
  const cvaPullerIcon = cvaMerge(["block", "h-1", "w-8", "rounded-full", "bg-gray-400"]);
375
375
 
376
376
  const CLOSING_THRESHOLD = 0.15;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-drawer",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {