@wealthx/shadcn 1.0.0 → 1.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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +34 -31
  2. package/CHANGELOG.md +12 -0
  3. package/README.md +128 -0
  4. package/dist/{chunk-2WZVSBAY.mjs → chunk-3NQGYJEZ.mjs} +1 -1
  5. package/dist/{chunk-ZN2QKLF6.mjs → chunk-46OFHMQA.mjs} +1 -1
  6. package/dist/{chunk-IAOOZCUY.mjs → chunk-4AJ5HWHD.mjs} +4 -1
  7. package/dist/{chunk-7LDIMXGM.mjs → chunk-DKZRJOMF.mjs} +1 -1
  8. package/dist/{chunk-AMJ23O53.mjs → chunk-FHNT55I5.mjs} +2 -2
  9. package/dist/{chunk-NGYG2EA6.mjs → chunk-I64K754C.mjs} +1 -1
  10. package/dist/chunk-K74JRTJR.mjs +105 -0
  11. package/dist/{chunk-MKFL5MNH.mjs → chunk-K76E2TQU.mjs} +1 -1
  12. package/dist/{chunk-NWZ46DJL.mjs → chunk-KQDD5MU3.mjs} +1 -1
  13. package/dist/components/ui/alert-dialog.js +4 -1
  14. package/dist/components/ui/alert-dialog.mjs +2 -2
  15. package/dist/components/ui/button.js +4 -1
  16. package/dist/components/ui/button.mjs +1 -1
  17. package/dist/components/ui/calendar.js +4 -1
  18. package/dist/components/ui/calendar.mjs +2 -2
  19. package/dist/components/ui/data-table.js +4 -1
  20. package/dist/components/ui/data-table.mjs +2 -2
  21. package/dist/components/ui/date-picker.js +4 -1
  22. package/dist/components/ui/date-picker.mjs +3 -3
  23. package/dist/components/ui/dialog.js +4 -1
  24. package/dist/components/ui/dialog.mjs +2 -2
  25. package/dist/components/ui/input-group.js +4 -1
  26. package/dist/components/ui/input-group.mjs +2 -2
  27. package/dist/components/ui/pagination.js +4 -1
  28. package/dist/components/ui/pagination.mjs +2 -2
  29. package/dist/components/ui/slider.js +166 -0
  30. package/dist/components/ui/slider.mjs +8 -0
  31. package/dist/index.js +140 -41
  32. package/dist/index.mjs +12 -8
  33. package/dist/styles.css +1 -1
  34. package/package.json +6 -1
  35. package/src/components/index.tsx +3 -0
  36. package/src/components/ui/button.tsx +2 -0
  37. package/src/components/ui/slider.tsx +107 -0
  38. package/src/styles/styles-css.ts +1 -1
  39. package/tsup.config.ts +1 -0
@@ -14,11 +14,11 @@ npm warn Unknown project config "auto-install-peers". This will stop working in
14
14
  npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
15
15
  ≈ tailwindcss v4.2.2
16
16
 
17
- Done in 491ms
17
+ Done in 521ms
18
18
  Built dist/styles.css and src/styles/styles-css.ts
19
19
  warning package.json: No license field
20
20
  $ tsup
21
- CLI Building entry: src/index.ts, src/lib/colors.ts, src/lib/theme-provider.tsx, src/lib/typography.ts, src/lib/utils.ts, src/components/ui/accordion.tsx, src/components/ui/alert-dialog.tsx, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/calendar.tsx, src/components/ui/card.tsx, src/components/ui/checkbox.tsx, src/components/ui/chip.tsx, src/components/ui/data-table.tsx, src/components/ui/date-picker.tsx, src/components/ui/dialog.tsx, src/components/ui/drawer.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/empty.tsx, src/components/ui/field.tsx, src/components/ui/input-group.tsx, src/components/ui/input-otp.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/pagination.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/radio-group.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/skeleton.tsx, src/components/ui/sonner.tsx, src/components/ui/spinner.tsx, src/components/ui/switch.tsx, src/components/ui/table.tsx, src/components/ui/tabs.tsx, src/components/ui/textarea.tsx, src/components/ui/toggle-group.tsx, src/components/ui/toggle.tsx, src/components/ui/tooltip.tsx
21
+ CLI Building entry: src/index.ts, src/lib/colors.ts, src/lib/theme-provider.tsx, src/lib/typography.ts, src/lib/utils.ts, src/components/ui/accordion.tsx, src/components/ui/alert-dialog.tsx, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/calendar.tsx, src/components/ui/card.tsx, src/components/ui/checkbox.tsx, src/components/ui/chip.tsx, src/components/ui/data-table.tsx, src/components/ui/date-picker.tsx, src/components/ui/dialog.tsx, src/components/ui/drawer.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/empty.tsx, src/components/ui/field.tsx, src/components/ui/input-group.tsx, src/components/ui/input-otp.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/pagination.tsx, src/components/ui/popover.tsx, src/components/ui/progress.tsx, src/components/ui/radio-group.tsx, src/components/ui/select.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/skeleton.tsx, src/components/ui/slider.tsx, src/components/ui/sonner.tsx, src/components/ui/spinner.tsx, src/components/ui/switch.tsx, src/components/ui/table.tsx, src/components/ui/tabs.tsx, src/components/ui/textarea.tsx, src/components/ui/toggle-group.tsx, src/components/ui/toggle.tsx, src/components/ui/tooltip.tsx
22
22
  CLI Using tsconfig: tsconfig.json
23
23
  CLI tsup v8.5.1
24
24
  CLI Using tsup config: /home/runner/work/wealthx-ui/wealthx-ui/packages/shadcn/tsup.config.ts
@@ -26,34 +26,36 @@ $ tsup
26
26
  CJS Build start
27
27
  ESM Build start
28
28
  ESM dist/lib/colors.mjs 205.00 B
29
- ESM dist/index.mjs 7.84 KB
29
+ ESM dist/index.mjs 7.89 KB
30
30
  ESM dist/chunk-DDPA2XXS.mjs 2.45 KB
31
31
  ESM dist/chunk-3U7SD3MS.mjs 1.74 KB
32
32
  ESM dist/chunk-CGOKTPXU.mjs 2.24 KB
33
33
  ESM dist/chunk-PMKODV6M.mjs 4.88 KB
34
+ ESM dist/chunk-K74JRTJR.mjs 2.75 KB
34
35
  ESM dist/chunk-2Y7YJKPE.mjs 1.24 KB
35
36
  ESM dist/chunk-BMFN37JH.mjs 865.00 B
36
37
  ESM dist/chunk-VYMHBV6D.mjs 3.78 KB
37
38
  ESM dist/chunk-RL772EH7.mjs 4.04 KB
39
+ ESM dist/chunk-I64K754C.mjs 3.51 KB
38
40
  ESM dist/chunk-BBJBJSXQ.mjs 995.00 B
39
41
  ESM dist/chunk-JU2RUWHF.mjs 3.88 KB
40
- ESM dist/chunk-AMJ23O53.mjs 3.58 KB
42
+ ESM dist/chunk-FHNT55I5.mjs 3.58 KB
41
43
  ESM dist/chunk-MQ72DIBH.mjs 3.01 KB
42
- ESM dist/chunk-7LDIMXGM.mjs 5.28 KB
44
+ ESM dist/chunk-DKZRJOMF.mjs 5.28 KB
43
45
  ESM dist/chunk-6AFMNC42.mjs 4.84 KB
44
46
  ESM dist/chunk-YN5SYTOO.mjs 2.81 KB
45
47
  ESM dist/chunk-HUVTPUV2.mjs 6.89 KB
46
- ESM dist/chunk-ZZV5JVNW.mjs 835.00 B
47
48
  ESM dist/chunk-55CEW76V.mjs 840.00 B
48
- ESM dist/chunk-ZN2QKLF6.mjs 5.71 KB
49
+ ESM dist/chunk-ZZV5JVNW.mjs 835.00 B
50
+ ESM dist/chunk-46OFHMQA.mjs 5.71 KB
49
51
  ESM dist/chunk-GPRJQ24C.mjs 1005.00 B
50
52
  ESM dist/chunk-Z3MK2KKZ.mjs 2.66 KB
51
53
  ESM dist/chunk-6OJF6XRN.mjs 3.27 KB
52
- ESM dist/chunk-2WZVSBAY.mjs 7.72 KB
54
+ ESM dist/chunk-3NQGYJEZ.mjs 7.72 KB
53
55
  ESM dist/chunk-SLWCCURD.mjs 2.45 KB
54
56
  ESM dist/chunk-VG6UF6UT.mjs 1.63 KB
55
57
  ESM dist/chunk-E3K6O4FZ.mjs 1.87 KB
56
- ESM dist/chunk-MKFL5MNH.mjs 12.35 KB
58
+ ESM dist/chunk-K76E2TQU.mjs 12.35 KB
57
59
  ESM dist/chunk-HS7TFG7V.mjs 483.00 B
58
60
  ESM dist/chunk-BGP2N52Z.mjs 3.07 KB
59
61
  ESM dist/chunk-VZ2NR7L3.mjs 6.68 KB
@@ -63,28 +65,28 @@ $ tsup
63
65
  ESM dist/lib/theme-provider.mjs 237.00 B
64
66
  ESM dist/lib/typography.mjs 527.00 B
65
67
  ESM dist/chunk-3VQNJ235.mjs 3.52 KB
66
- ESM dist/chunk-KKHTJNMM.mjs 2.51 KB
67
68
  ESM dist/lib/utils.mjs 95.00 B
68
- ESM dist/chunk-NWZ46DJL.mjs 6.31 KB
69
- ESM dist/chunk-IAOOZCUY.mjs 3.47 KB
69
+ ESM dist/chunk-KKHTJNMM.mjs 2.51 KB
70
+ ESM dist/chunk-KQDD5MU3.mjs 6.31 KB
71
+ ESM dist/chunk-4AJ5HWHD.mjs 3.52 KB
70
72
  ESM dist/chunk-DBHJ5KC3.mjs 1.56 KB
71
73
  ESM dist/chunk-OXQQNQZI.mjs 2.93 KB
72
74
  ESM dist/chunk-QOJ2DQD6.mjs 2.06 KB
73
- ESM dist/chunk-CZ3BW5GL.mjs 2.25 KB
74
75
  ESM dist/chunk-V7CNWJT3.mjs 168.00 B
76
+ ESM dist/chunk-CZ3BW5GL.mjs 2.25 KB
75
77
  ESM dist/chunk-FWCSY2DS.mjs 1.30 KB
78
+ ESM dist/components/ui/textarea.mjs 148.00 B
76
79
  ESM dist/components/ui/toggle-group.mjs 241.00 B
77
- ESM dist/chunk-NGYG2EA6.mjs 3.51 KB
78
80
  ESM dist/components/ui/toggle.mjs 194.00 B
81
+ ESM dist/components/ui/sheet.mjs 462.00 B
79
82
  ESM dist/components/ui/tooltip.mjs 326.00 B
80
83
  ESM dist/components/ui/skeleton.mjs 148.00 B
81
- ESM dist/components/ui/sheet.mjs 462.00 B
84
+ ESM dist/components/ui/slider.mjs 144.00 B
82
85
  ESM dist/components/ui/sonner.mjs 111.00 B
83
86
  ESM dist/components/ui/spinner.mjs 184.00 B
84
87
  ESM dist/components/ui/switch.mjs 186.00 B
85
88
  ESM dist/components/ui/table.mjs 336.00 B
86
89
  ESM dist/components/ui/tabs.mjs 264.00 B
87
- ESM dist/components/ui/textarea.mjs 148.00 B
88
90
  ESM dist/components/ui/input.mjs 142.00 B
89
91
  ESM dist/components/ui/label.mjs 142.00 B
90
92
  ESM dist/components/ui/pagination.mjs 460.00 B
@@ -100,8 +102,8 @@ $ tsup
100
102
  ESM dist/components/ui/empty.mjs 300.00 B
101
103
  ESM dist/components/ui/field.mjs 486.00 B
102
104
  ESM dist/components/ui/input-group.mjs 488.00 B
103
- ESM dist/components/ui/avatar.mjs 310.00 B
104
105
  ESM dist/components/ui/input-otp.mjs 256.00 B
106
+ ESM dist/components/ui/avatar.mjs 310.00 B
105
107
  ESM dist/components/ui/badge.mjs 211.00 B
106
108
  ESM dist/components/ui/button.mjs 215.00 B
107
109
  ESM dist/components/ui/calendar.mjs 260.00 B
@@ -112,34 +114,34 @@ $ tsup
112
114
  ESM dist/components/ui/accordion.mjs 264.00 B
113
115
  ESM dist/components/ui/alert-dialog.mjs 768.00 B
114
116
  ESM dist/components/ui/alert.mjs 210.00 B
115
- ESM ⚡️ Build success in 328ms
116
- CJS dist/index.js 154.63 KB
117
- CJS dist/lib/theme-provider.js 6.09 KB
117
+ ESM ⚡️ Build success in 317ms
118
+ CJS dist/index.js 157.47 KB
118
119
  CJS dist/lib/colors.js 3.15 KB
120
+ CJS dist/lib/theme-provider.js 6.09 KB
119
121
  CJS dist/lib/typography.js 5.49 KB
120
122
  CJS dist/lib/utils.js 1.20 KB
121
123
  CJS dist/components/ui/accordion.js 5.11 KB
122
- CJS dist/components/ui/alert-dialog.js 15.26 KB
124
+ CJS dist/components/ui/alert-dialog.js 15.30 KB
123
125
  CJS dist/components/ui/alert.js 4.57 KB
124
126
  CJS dist/components/ui/avatar.js 5.71 KB
125
127
  CJS dist/components/ui/badge.js 6.12 KB
126
- CJS dist/components/ui/button.js 7.98 KB
127
- CJS dist/components/ui/calendar.js 15.83 KB
128
+ CJS dist/components/ui/button.js 8.02 KB
129
+ CJS dist/components/ui/calendar.js 15.88 KB
128
130
  CJS dist/components/ui/card.js 4.91 KB
129
131
  CJS dist/components/ui/checkbox.js 6.51 KB
130
132
  CJS dist/components/ui/chip.js 7.36 KB
131
- CJS dist/components/ui/data-table.js 37.83 KB
132
- CJS dist/components/ui/date-picker.js 21.43 KB
133
- CJS dist/components/ui/dialog.js 14.05 KB
133
+ CJS dist/components/ui/date-picker.js 21.48 KB
134
+ CJS dist/components/ui/data-table.js 37.88 KB
134
135
  CJS dist/components/ui/drawer.js 7.96 KB
136
+ CJS dist/components/ui/dialog.js 14.09 KB
135
137
  CJS dist/components/ui/dropdown-menu.js 12.97 KB
136
138
  CJS dist/components/ui/empty.js 5.30 KB
137
139
  CJS dist/components/ui/field.js 11.19 KB
138
- CJS dist/components/ui/input-group.js 15.80 KB
140
+ CJS dist/components/ui/input-group.js 15.85 KB
139
141
  CJS dist/components/ui/input-otp.js 5.86 KB
140
142
  CJS dist/components/ui/input.js 3.26 KB
141
143
  CJS dist/components/ui/label.js 2.92 KB
142
- CJS dist/components/ui/pagination.js 11.88 KB
144
+ CJS dist/components/ui/pagination.js 11.93 KB
143
145
  CJS dist/components/ui/popover.js 5.81 KB
144
146
  CJS dist/components/ui/progress.js 3.32 KB
145
147
  CJS dist/components/ui/radio-group.js 6.54 KB
@@ -147,8 +149,9 @@ $ tsup
147
149
  CJS dist/components/ui/separator.js 2.97 KB
148
150
  CJS dist/components/ui/sheet.js 8.05 KB
149
151
  CJS dist/components/ui/skeleton.js 2.62 KB
150
- CJS dist/components/ui/spinner.js 3.12 KB
152
+ CJS dist/components/ui/slider.js 5.56 KB
151
153
  CJS dist/components/ui/sonner.js 3.35 KB
154
+ CJS dist/components/ui/spinner.js 3.12 KB
152
155
  CJS dist/components/ui/switch.js 6.34 KB
153
156
  CJS dist/components/ui/table.js 5.60 KB
154
157
  CJS dist/components/ui/tabs.js 6.44 KB
@@ -156,5 +159,5 @@ $ tsup
156
159
  CJS dist/components/ui/toggle-group.js 6.71 KB
157
160
  CJS dist/components/ui/toggle.js 3.99 KB
158
161
  CJS dist/components/ui/tooltip.js 5.03 KB
159
- CJS ⚡️ Build success in 332ms
160
- Done in 6.74s.
162
+ CJS ⚡️ Build success in 329ms
163
+ Done in 6.77s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @wealthx/shadcn
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 2697480: Add slider component & update default html type for button
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 026db62: Add README.md
14
+
3
15
  ## 1.0.0
4
16
 
5
17
  ### Major Changes
package/README.md ADDED
@@ -0,0 +1,128 @@
1
+ # @wealthx/shadcn
2
+
3
+ WealthX component library built on [shadcn/ui](https://ui.shadcn.com), Tailwind CSS v4, and Radix primitives.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ yarn add @wealthx/shadcn
9
+ ```
10
+
11
+ **Peer dependencies:** `react` and `react-dom` (^18.3.1)
12
+
13
+ ## Setup
14
+
15
+ Import the global stylesheet in your app entry point:
16
+
17
+ ```tsx
18
+ import "@wealthx/shadcn/styles.css";
19
+ ```
20
+
21
+ Wrap your app with the `ThemeProvider` for runtime theming:
22
+
23
+ ```tsx
24
+ import { ThemeProvider } from "@wealthx/shadcn/theme";
25
+
26
+ <ThemeProvider primaryColor="#33FF99" secondaryColor="#162029">
27
+ <App />
28
+ </ThemeProvider>
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ Import components from the package root or individual entry points:
34
+
35
+ ```tsx
36
+ // Barrel import
37
+ import { Button, Card, Input } from "@wealthx/shadcn";
38
+
39
+ // Individual entry points (better tree-shaking)
40
+ import { Button } from "@wealthx/shadcn/button";
41
+ import { Card } from "@wealthx/shadcn/card";
42
+ ```
43
+
44
+ ## Components
45
+
46
+ | Component | Import path | Description |
47
+ |-----------|------------|-------------|
48
+ | Accordion | `./accordion` | Collapsible content sections |
49
+ | Alert | `./alert` | Status messages |
50
+ | AlertDialog | `./alert-dialog` | Confirmation modals |
51
+ | Avatar | `./avatar` | User images with fallback, group, and badge |
52
+ | Badge | `./badge` | Labels and tags |
53
+ | Button | `./button` | Primary action element |
54
+ | Calendar | `./calendar` | Date picker calendar |
55
+ | Card | `./card` | Container with header, content, and footer |
56
+ | Checkbox | `./checkbox` | Single or multiple selection |
57
+ | Chip | `./chip` | Small labeled element |
58
+ | DataTable | `./data-table` | Table powered by TanStack Table |
59
+ | DatePicker | `./date-picker` | Calendar with popover |
60
+ | Dialog | `./dialog` | Modal dialog |
61
+ | Drawer | `./drawer` | Slide-out side panel |
62
+ | DropdownMenu | `./dropdown-menu` | Contextual menu |
63
+ | Empty | `./empty` | Empty state placeholder |
64
+ | Field | `./field` | Form field wrapper with label and error |
65
+ | Input | `./input` | Text input |
66
+ | InputGroup | `./input-group` | Input with addons and buttons |
67
+ | InputOTP | `./input-otp` | Multi-slot OTP entry |
68
+ | Label | `./label` | Form label |
69
+ | Pagination | `./pagination` | Page navigation |
70
+ | Popover | `./popover` | Floating content |
71
+ | Progress | `./progress` | Progress bar |
72
+ | RadioGroup | `./radio-group` | Single selection group |
73
+ | Select | `./select` | Dropdown select |
74
+ | Separator | `./separator` | Visual divider |
75
+ | Sheet | `./sheet` | Off-canvas panel |
76
+ | Skeleton | `./skeleton` | Loading placeholder |
77
+ | Sonner | `./sonner` | Toast notifications |
78
+ | Spinner | `./spinner` | Loading indicator |
79
+ | Switch | `./switch` | Toggle switch |
80
+ | Table | `./table` | Basic HTML table |
81
+ | Tabs | `./tabs` | Tabbed interface |
82
+ | Textarea | `./textarea` | Multi-line text input |
83
+ | Toggle | `./toggle` | Button toggle |
84
+ | ToggleGroup | `./toggle-group` | Grouped toggles |
85
+ | Tooltip | `./tooltip` | Hover hint |
86
+
87
+ ## Utilities
88
+
89
+ | Export | Import path | Description |
90
+ |--------|------------|-------------|
91
+ | `cn()` | `@wealthx/shadcn/lib/utils` | Merge class names (clsx + tailwind-merge) |
92
+ | Color utils | `@wealthx/shadcn/lib/colors` | `hexToRgb`, `hexToOklch`, `getContrastText`, `getLuminance` |
93
+ | Typography | `@wealthx/shadcn/typography` | Rem-based type scale with CSS variable generators |
94
+ | ThemeProvider | `@wealthx/shadcn/theme` | Runtime theme provider for tenant colors |
95
+
96
+ ## Design tokens
97
+
98
+ All tokens are defined as CSS custom properties in `src/styles/globals.css`:
99
+
100
+ - **Colors** — OKLch format. Core tokens: `--background`, `--foreground`, `--primary`, `--secondary`, `--muted`, `--accent`, `--destructive`. Status tokens: `--warning`, `--success`, `--info`. Chart series: `--chart-1` through `--chart-5`.
101
+ - **Typography** — Figtree font family. 13 styles from Display down to Code, each with `--font-size-*`, `--line-height-*`, `--letter-spacing-*`, and `--font-weight-*` variables.
102
+ - **Border radius** — All radii set to `0px` (sharp corners by design).
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ # Install dependencies
108
+ yarn
109
+
110
+ # Build the package (CSS + JS)
111
+ yarn workspace @wealthx/shadcn build
112
+
113
+ # Watch mode
114
+ yarn workspace @wealthx/shadcn dev
115
+
116
+ # Lint
117
+ yarn workspace @wealthx/shadcn lint
118
+ ```
119
+
120
+ ## Tech stack
121
+
122
+ - [shadcn/ui](https://ui.shadcn.com) — Component primitives
123
+ - [Tailwind CSS v4](https://tailwindcss.com) — Utility-first styles
124
+ - [Radix Primitives](https://www.radix-ui.com) via `@base-ui/react` — Accessible headless components
125
+ - [TanStack Table](https://tanstack.com/table) — DataTable
126
+ - [Lucide](https://lucide.dev) — Icons
127
+ - [tsup](https://tsup.egoist.dev) — Build tooling (CJS + ESM)
128
+ - [class-variance-authority](https://cva.style) — Variant management
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button,
3
3
  buttonVariants
4
- } from "./chunk-IAOOZCUY.mjs";
4
+ } from "./chunk-4AJ5HWHD.mjs";
5
5
  import {
6
6
  cn
7
7
  } from "./chunk-V7CNWJT3.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-DS2AMHN2.mjs";
7
7
  import {
8
8
  Button
9
- } from "./chunk-IAOOZCUY.mjs";
9
+ } from "./chunk-4AJ5HWHD.mjs";
10
10
  import {
11
11
  cn
12
12
  } from "./chunk-V7CNWJT3.mjs";
@@ -54,6 +54,7 @@ var Button = forwardRef(function Button2(_a, ref) {
54
54
  asChild = false,
55
55
  loading = false,
56
56
  disabled,
57
+ type = "button",
57
58
  children
58
59
  } = _b, props = __objRest(_b, [
59
60
  "className",
@@ -62,6 +63,7 @@ var Button = forwardRef(function Button2(_a, ref) {
62
63
  "asChild",
63
64
  "loading",
64
65
  "disabled",
66
+ "type",
65
67
  "children"
66
68
  ]);
67
69
  const Comp = asChild ? Slot : "button";
@@ -74,7 +76,8 @@ var Button = forwardRef(function Button2(_a, ref) {
74
76
  "data-slot": "button",
75
77
  "data-variant": variant,
76
78
  disabled: loading || disabled,
77
- ref
79
+ ref,
80
+ type
78
81
  }, props), {
79
82
  children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
80
83
  /* @__PURE__ */ jsx(Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buttonVariants
3
- } from "./chunk-IAOOZCUY.mjs";
3
+ } from "./chunk-4AJ5HWHD.mjs";
4
4
  import {
5
5
  useThemeVars
6
6
  } from "./chunk-OXQQNQZI.mjs";
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-MQ72DIBH.mjs";
6
6
  import {
7
7
  Calendar
8
- } from "./chunk-2WZVSBAY.mjs";
8
+ } from "./chunk-3NQGYJEZ.mjs";
9
9
  import {
10
10
  Button
11
- } from "./chunk-IAOOZCUY.mjs";
11
+ } from "./chunk-4AJ5HWHD.mjs";
12
12
  import {
13
13
  cn
14
14
  } from "./chunk-V7CNWJT3.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buttonVariants
3
- } from "./chunk-IAOOZCUY.mjs";
3
+ } from "./chunk-4AJ5HWHD.mjs";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-V7CNWJT3.mjs";
@@ -0,0 +1,105 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-V7CNWJT3.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadValues
7
+ } from "./chunk-FWCSY2DS.mjs";
8
+
9
+ // src/components/ui/slider.tsx
10
+ import * as React from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Slider = React.forwardRef(
13
+ (_a, ref) => {
14
+ var _b = _a, {
15
+ className,
16
+ value,
17
+ defaultValue = 0,
18
+ min = 0,
19
+ max = 100,
20
+ step = 1,
21
+ disabled = false,
22
+ onValueChange
23
+ } = _b, props = __objRest(_b, [
24
+ "className",
25
+ "value",
26
+ "defaultValue",
27
+ "min",
28
+ "max",
29
+ "step",
30
+ "disabled",
31
+ "onValueChange"
32
+ ]);
33
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
34
+ const currentValue = value !== void 0 ? value : internalValue;
35
+ const percentage = (currentValue - min) / (max - min) * 100;
36
+ const handleChange = (e) => {
37
+ const newValue = Number(e.target.value);
38
+ if (value === void 0) {
39
+ setInternalValue(newValue);
40
+ }
41
+ onValueChange == null ? void 0 : onValueChange(newValue);
42
+ };
43
+ return /* @__PURE__ */ jsxs(
44
+ "div",
45
+ {
46
+ "data-slot": "slider",
47
+ className: cn(
48
+ "relative flex w-full touch-none items-center select-none",
49
+ disabled && "opacity-50",
50
+ className
51
+ ),
52
+ children: [
53
+ /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ "data-slot": "slider-track",
57
+ className: "relative h-2 w-full overflow-hidden rounded-full bg-muted",
58
+ children: /* @__PURE__ */ jsx(
59
+ "div",
60
+ {
61
+ "data-slot": "slider-range",
62
+ className: "absolute h-full rounded-full bg-primary",
63
+ style: { width: `${percentage}%` }
64
+ }
65
+ )
66
+ }
67
+ ),
68
+ /* @__PURE__ */ jsx(
69
+ "input",
70
+ __spreadValues({
71
+ ref,
72
+ type: "range",
73
+ min,
74
+ max,
75
+ step,
76
+ value: currentValue,
77
+ disabled,
78
+ onChange: handleChange,
79
+ className: cn(
80
+ "absolute inset-0 h-full w-full cursor-pointer opacity-0",
81
+ disabled && "cursor-not-allowed"
82
+ )
83
+ }, props)
84
+ ),
85
+ /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ "data-slot": "slider-thumb",
89
+ className: cn(
90
+ "pointer-events-none absolute top-1/2 -translate-x-1/2 -translate-y-1/2",
91
+ "block size-5 rounded-full border-2 border-primary bg-background shadow-sm"
92
+ ),
93
+ style: { left: `${percentage}%` }
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }
100
+ );
101
+ Slider.displayName = "Slider";
102
+
103
+ export {
104
+ Slider
105
+ };
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-JF4PHPD5.mjs";
34
34
  import {
35
35
  Button
36
- } from "./chunk-IAOOZCUY.mjs";
36
+ } from "./chunk-4AJ5HWHD.mjs";
37
37
  import {
38
38
  cn
39
39
  } from "./chunk-V7CNWJT3.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buttonVariants
3
- } from "./chunk-IAOOZCUY.mjs";
3
+ } from "./chunk-4AJ5HWHD.mjs";
4
4
  import {
5
5
  useThemeVars
6
6
  } from "./chunk-OXQQNQZI.mjs";
@@ -183,6 +183,7 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
183
183
  asChild = false,
184
184
  loading = false,
185
185
  disabled,
186
+ type = "button",
186
187
  children
187
188
  } = _b, props = __objRest(_b, [
188
189
  "className",
@@ -191,6 +192,7 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
191
192
  "asChild",
192
193
  "loading",
193
194
  "disabled",
195
+ "type",
194
196
  "children"
195
197
  ]);
196
198
  const Comp = asChild ? Slot : "button";
@@ -203,7 +205,8 @@ var Button = (0, import_react2.forwardRef)(function Button2(_a, ref) {
203
205
  "data-slot": "button",
204
206
  "data-variant": variant,
205
207
  disabled: loading || disabled,
206
- ref
208
+ ref,
209
+ type
207
210
  }, props), {
208
211
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
209
212
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -11,8 +11,8 @@ import {
11
11
  AlertDialogPortal,
12
12
  AlertDialogTitle,
13
13
  AlertDialogTrigger
14
- } from "../../chunk-NWZ46DJL.mjs";
15
- import "../../chunk-IAOOZCUY.mjs";
14
+ } from "../../chunk-KQDD5MU3.mjs";
15
+ import "../../chunk-4AJ5HWHD.mjs";
16
16
  import "../../chunk-DBHJ5KC3.mjs";
17
17
  import "../../chunk-OXQQNQZI.mjs";
18
18
  import "../../chunk-QOJ2DQD6.mjs";
@@ -162,6 +162,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
162
162
  asChild = false,
163
163
  loading = false,
164
164
  disabled,
165
+ type = "button",
165
166
  children
166
167
  } = _b, props = __objRest(_b, [
167
168
  "className",
@@ -170,6 +171,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
170
171
  "asChild",
171
172
  "loading",
172
173
  "disabled",
174
+ "type",
173
175
  "children"
174
176
  ]);
175
177
  const Comp = asChild ? Slot : "button";
@@ -182,7 +184,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
182
184
  "data-slot": "button",
183
185
  "data-variant": variant,
184
186
  disabled: loading || disabled,
185
- ref
187
+ ref,
188
+ type
186
189
  }, props), {
187
190
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
188
191
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button,
3
3
  buttonVariants
4
- } from "../../chunk-IAOOZCUY.mjs";
4
+ } from "../../chunk-4AJ5HWHD.mjs";
5
5
  import "../../chunk-DBHJ5KC3.mjs";
6
6
  import "../../chunk-V7CNWJT3.mjs";
7
7
  import "../../chunk-FWCSY2DS.mjs";
@@ -167,6 +167,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
167
167
  asChild = false,
168
168
  loading = false,
169
169
  disabled,
170
+ type = "button",
170
171
  children
171
172
  } = _b, props = __objRest(_b, [
172
173
  "className",
@@ -175,6 +176,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
175
176
  "asChild",
176
177
  "loading",
177
178
  "disabled",
179
+ "type",
178
180
  "children"
179
181
  ]);
180
182
  const Comp = asChild ? Slot : "button";
@@ -187,7 +189,8 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
187
189
  "data-slot": "button",
188
190
  "data-variant": variant,
189
191
  disabled: loading || disabled,
190
- ref
192
+ ref,
193
+ type
191
194
  }, props), {
192
195
  children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
193
196
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Calendar,
3
3
  CalendarDayButton
4
- } from "../../chunk-2WZVSBAY.mjs";
5
- import "../../chunk-IAOOZCUY.mjs";
4
+ } from "../../chunk-3NQGYJEZ.mjs";
5
+ import "../../chunk-4AJ5HWHD.mjs";
6
6
  import "../../chunk-DBHJ5KC3.mjs";
7
7
  import "../../chunk-V7CNWJT3.mjs";
8
8
  import "../../chunk-FWCSY2DS.mjs";