liquidcn 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -17,7 +17,7 @@ A collection of reusable, accessible React UI components built with TypeScript,
17
17
  **liquidcn** is a comprehensive component library featuring:
18
18
 
19
19
  - **UI Components**: Button, Card, Alert, Badge, Input, Textarea, Footer, PrettyAmount
20
- - **Client Components**: Dialog, Select, Switch, Tabs, Sonner (Toast), PrettyDate, ResizableNavbar
20
+ - **Client Components**: Dialog, Select, Switch, Tabs, Sonner (Toast), PrettyDate, ResizableNavbar, Slider
21
21
  - **Hooks**: Custom React hooks including `useCookieWithFallback`
22
22
  - **Utilities**: `cn()` utility for className merging using clsx and tailwind-merge
23
23
 
@@ -18,6 +18,7 @@ __exportStar(require("./dialog"), exports);
18
18
  __exportStar(require("./pretty-date"), exports);
19
19
  __exportStar(require("./resizable-navbar"), exports);
20
20
  __exportStar(require("./select"), exports);
21
+ __exportStar(require("./slider"), exports);
21
22
  __exportStar(require("./sonner"), exports);
22
23
  __exportStar(require("./switch"), exports);
23
24
  __exportStar(require("./tabs"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,gDAA6B;AAC7B,qDAAkC;AAClC,2CAAwB;AACxB,2CAAwB;AACxB,2CAAwB;AACxB,yCAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,gDAA6B;AAC7B,qDAAkC;AAClC,2CAAwB;AACxB,2CAAwB;AACxB,2CAAwB;AACxB,2CAAwB;AACxB,yCAAsB"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Slider = Slider;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const SliderPrimitive = require("@radix-ui/react-slider");
7
+ const React = require("react");
8
+ const utils_1 = require("../../../utils");
9
+ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
10
+ const _values = React.useMemo(() => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]), [value, defaultValue, min, max]);
11
+ return ((0, jsx_runtime_1.jsxs)(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: (0, utils_1.cn)('relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col', className), ...props, children: [(0, jsx_runtime_1.jsxs)(SliderPrimitive.Track, { "data-slot": "slider-track", className: (0, utils_1.cn)('glass glass-sm relative grow rounded-full bg-white/20 border border-white/30 data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2'), children: [(0, jsx_runtime_1.jsx)("span", { className: "glass-layers glass-refraction glass-tint-none", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)(SliderPrimitive.Range, { "data-slot": "slider-range", className: (0, utils_1.cn)('bg-primary absolute rounded-full data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full') })] }), Array.from({ length: _values.length }, (_, index) => ((0, jsx_runtime_1.jsx)(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "glass glass-sm relative block size-5 shrink-0 rounded-full border border-white/50 bg-white/80 shadow-lg transition-[color,box-shadow] ring-primary/30 hover:ring-4 hover:bg-white focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
12
+ }
13
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/slider.tsx"],"names":[],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,CACH,CAAC,IACmB,CACxB,CAAA;AACH,CAAC"}
@@ -2,6 +2,7 @@ export * from "./dialog.js";
2
2
  export * from "./pretty-date.js";
3
3
  export * from "./resizable-navbar.js";
4
4
  export * from "./select.js";
5
+ export * from "./slider.js";
5
6
  export * from "./sonner.js";
6
7
  export * from "./switch.js";
7
8
  export * from "./tabs.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as SliderPrimitive from "@radix-ui/react-slider";
4
+ import * as React from "react";
5
+ import { cn } from "../../../utils.js";
6
+ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
7
+ const _values = React.useMemo(() => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]), [value, defaultValue, min, max]);
8
+ return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className), ...props, children: [_jsxs(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn("glass glass-sm relative grow rounded-full bg-white/20 border border-white/30 data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2"), children: [_jsx("span", { className: "glass-layers glass-refraction glass-tint-none", "aria-hidden": "true" }), _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn("bg-primary absolute rounded-full data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full") })] }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "glass glass-sm relative block size-5 shrink-0 rounded-full border border-white/50 bg-white/80 shadow-lg transition-[color,box-shadow] ring-primary/30 hover:ring-4 hover:bg-white focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
9
+ }
10
+ export { Slider };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../../src/client/components/ui/slider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAEnC,SAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,GAAG,KAAK,EAC0C;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAC9F,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,CAAC,CAChC,CAAA;IAED,OAAO,CACL,MAAC,eAAe,CAAC,IAAI,iBACT,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,qOAAqO,EACrO,SAAS,CACV,KACG,KAAK,aAET,MAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,wNAAwN,CACzN,aAED,eAAM,SAAS,EAAC,+CAA+C,iBAAa,MAAM,GAAG,EACrF,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,0GAA0G,CAC3G,GACD,IACoB,EACvB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EAExB,SAAS,EAAC,sRAAsR,IAD3R,KAAK,CAEV,CACH,CAAC,IACmB,CACxB,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -2,6 +2,7 @@ export * from './dialog';
2
2
  export * from './pretty-date';
3
3
  export * from './resizable-navbar';
4
4
  export * from './select';
5
+ export * from './slider';
5
6
  export * from './sonner';
6
7
  export * from './switch';
7
8
  export * from './tabs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,5 @@
1
+ import * as SliderPrimitive from '@radix-ui/react-slider';
2
+ import * as React from 'react';
3
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Slider };
5
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/ui/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAO,EACP,GAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CA0CnD;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "liquidcn",
3
3
  "description": "Liquid Glass CN with secret sauce",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -88,6 +88,7 @@
88
88
  "peerDependencies": {
89
89
  "@radix-ui/react-dialog": "^1.1.15",
90
90
  "@radix-ui/react-select": "^2.2.6",
91
+ "@radix-ui/react-slider": "^1.3.6",
91
92
  "@radix-ui/react-slot": "^1.2.4",
92
93
  "@radix-ui/react-switch": "^1.2.6",
93
94
  "@radix-ui/react-tabs": "^1.1.13",