@nipsys/shadcn-lsd 0.1.0 → 0.2.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.
- package/README.md +136 -78
- package/dist/{Autocomplete-Cuui1Aca.js → Autocomplete-3wLa9P4X.js} +23 -23
- package/dist/{Badge-DgWf6s7v.js → Badge-DHID7w-D.js} +18 -18
- package/dist/{Input-CNaDUPU7.js → Input-W8QqFI1v.js} +16 -16
- package/dist/{Label-Bz0dz1Kz.js → Label-BEM-ZJXI.js} +1 -1
- package/dist/{SidebarContext-7jKqX7F3.js → SidebarContext-CRh-DPz_.js} +7 -7
- package/dist/{Toggle-B7BF2ro7.js → Toggle-DOc92BjI.js} +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/components/ui/accordion/AccordionContent.js +1 -1
- package/dist/components/ui/accordion/AccordionItem.js +7 -7
- package/dist/components/ui/accordion/AccordionTrigger.js +1 -1
- package/dist/components/ui/accordion/__tests__/accordion-item.test.js +9 -9
- package/dist/components/ui/alert-dialog/AlertDialogContent.js +3 -3
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-content.test.js +1 -1
- package/dist/components/ui/autocomplete/Autocomplete.js +1 -1
- package/dist/components/ui/autocomplete/AutocompleteList.js +6 -6
- package/dist/components/ui/autocomplete/__tests__/autocomplete.test.js +5 -5
- package/dist/components/ui/badge/Badge.js +1 -1
- package/dist/components/ui/badge/badge.test.js +3 -3
- package/dist/components/ui/card/Card.js +1 -1
- package/dist/components/ui/card/CardFooter.js +1 -1
- package/dist/components/ui/card/CardHeader.js +1 -1
- package/dist/components/ui/card/__tests__/card-footer.test.js +1 -1
- package/dist/components/ui/card/__tests__/card-header.test.js +1 -1
- package/dist/components/ui/card/__tests__/card.test.js +7 -7
- package/dist/components/ui/checkbox/Checkbox.js +10 -10
- package/dist/components/ui/checkbox/checkbox.test.js +4 -6
- package/dist/components/ui/command/Command.js +1 -1
- package/dist/components/ui/command/CommandDialog.js +9 -9
- package/dist/components/ui/command/CommandGroup.js +5 -5
- package/dist/components/ui/command/CommandItem.js +3 -3
- package/dist/components/ui/command/CommandShortcut.js +3 -3
- package/dist/components/ui/command/__tests__/command-group.test.js +12 -12
- package/dist/components/ui/command/__tests__/command-item.test.js +19 -21
- package/dist/components/ui/command/__tests__/command-shortcut.test.js +1 -1
- package/dist/components/ui/command/__tests__/command.test.js +1 -1
- package/dist/components/ui/dialog/DialogContent.js +6 -6
- package/dist/components/ui/dialog/DialogDescription.js +6 -6
- package/dist/components/ui/dialog/__tests__/dialog-content.test.js +1 -1
- package/dist/components/ui/dialog/__tests__/dialog-description.test.js +1 -1
- package/dist/components/ui/input/Input.js +1 -1
- package/dist/components/ui/input/input.test.js +3 -3
- package/dist/components/ui/label/Label.js +1 -1
- package/dist/components/ui/label/label.test.js +1 -1
- package/dist/components/ui/popover/PopoverContent.js +1 -1
- package/dist/components/ui/popover/__tests__/popover-content.test.js +1 -1
- package/dist/components/ui/progress/Progress.js +24 -24
- package/dist/components/ui/progress/progress.test.js +5 -5
- package/dist/components/ui/select/SelectContent.js +1 -1
- package/dist/components/ui/select/SelectItem.js +7 -7
- package/dist/components/ui/select/SelectTrigger.js +13 -13
- package/dist/components/ui/select/__tests__/select-content.test.js +1 -1
- package/dist/components/ui/sidebar/Sidebar.js +1 -1
- package/dist/components/ui/sidebar/SidebarContent.js +2 -2
- package/dist/components/ui/sidebar/SidebarContext.js +1 -1
- package/dist/components/ui/sidebar/SidebarMenu.js +5 -5
- package/dist/components/ui/sidebar/__tests__/sidebar-content.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar-group.test.js +2 -2
- package/dist/components/ui/sidebar/__tests__/sidebar-menu.test.js +2 -2
- package/dist/components/ui/sidebar/__tests__/sidebar.test.js +1 -1
- package/dist/components/ui/sonner/Toaster.js +60 -60
- package/dist/components/ui/sonner/sonner.test.js +14 -14
- package/dist/components/ui/switch/Switch.js +14 -14
- package/dist/components/ui/switch/switch.test.js +2 -2
- package/dist/components/ui/tabs/Tabs.js +1 -1
- package/dist/components/ui/tabs/TabsList.js +1 -1
- package/dist/components/ui/tabs/TabsTrigger.js +1 -1
- package/dist/components/ui/tabs/__tests__/tabs-list.test.js +1 -1
- package/dist/components/ui/tabs/__tests__/tabs-trigger.test.js +4 -4
- package/dist/components/ui/tabs/__tests__/tabs.test.js +2 -2
- package/dist/components/ui/toggle/Toggle.js +1 -1
- package/dist/components/ui/toggle/toggle.test.js +4 -4
- package/dist/components/ui/toggle-group/ToggleGroupItem.js +1 -1
- package/dist/main.js +6 -6
- package/dist/{types-B02xH7lg.js → types-B0wccExf.js} +2 -2
- package/dist/{types-BKY1Yguv.js → types-Um3fwb1D.js} +2 -2
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -1,108 +1,116 @@
|
|
|
1
1
|
# @nipsys/shadcn-lsd
|
|
2
2
|
|
|
3
|
-
A React component library implementing the Logos Design System (LSD)
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
@nipsys/shadcn-lsd follows a minimalist design system. The library offers a comprehensive set of UI components with built-in light and dark theme support.
|
|
3
|
+
A React component library implementing the Logos Design System (LSD). Built with Radix UI primitives and Tailwind CSS, following the shadcn/ui patterns.
|
|
8
4
|
|
|
9
5
|
## Installation
|
|
10
6
|
|
|
11
7
|
```bash
|
|
12
|
-
npm install @nipsys/shadcn-lsd
|
|
13
|
-
# or
|
|
14
8
|
pnpm add @nipsys/shadcn-lsd
|
|
15
9
|
```
|
|
16
10
|
|
|
17
|
-
##
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Import the CSS
|
|
14
|
+
|
|
15
|
+
First, import the stylesheet in your application entry point:
|
|
18
16
|
|
|
19
17
|
```tsx
|
|
20
|
-
import { Button, Input, Card } from '@nipsys/shadcn-lsd';
|
|
21
18
|
import '@nipsys/shadcn-lsd/css';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Import Components
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import { Button, Dialog, DialogTrigger, DialogContent } from '@nipsys/shadcn-lsd';
|
|
22
25
|
|
|
23
26
|
function App() {
|
|
24
27
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
28
|
+
<Dialog>
|
|
29
|
+
<DialogTrigger>Open</DialogTrigger>
|
|
30
|
+
<DialogContent>
|
|
31
|
+
<p>Dialog content here</p>
|
|
32
|
+
</DialogContent>
|
|
33
|
+
</Dialog>
|
|
32
34
|
);
|
|
33
35
|
}
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
### Theming
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
The library supports light and dark themes out of the box. Add the `dark` class to your root element to enable dark mode:
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
```html
|
|
43
|
+
<html class="dark">
|
|
44
|
+
<!-- your app -->
|
|
45
|
+
</html>
|
|
46
|
+
```
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
### Theme Variants
|
|
49
|
+
|
|
50
|
+
A teal theme variant is also available:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<html class="theme-teal">
|
|
54
|
+
<!-- light teal theme -->
|
|
55
|
+
</html>
|
|
56
|
+
|
|
57
|
+
<html class="dark theme-teal">
|
|
58
|
+
<!-- dark teal theme -->
|
|
59
|
+
</html>
|
|
49
60
|
```
|
|
50
61
|
|
|
51
|
-
###
|
|
62
|
+
### CSS Variables
|
|
63
|
+
|
|
64
|
+
The design system uses CSS custom properties that you can override:
|
|
52
65
|
|
|
53
66
|
```css
|
|
54
|
-
|
|
55
|
-
--lsd-
|
|
56
|
-
--lsd-
|
|
57
|
-
--lsd-
|
|
58
|
-
--lsd-
|
|
67
|
+
:root {
|
|
68
|
+
--lsd-primary: #000000;
|
|
69
|
+
--lsd-text-primary: #000000;
|
|
70
|
+
--lsd-text-secondary: #808080;
|
|
71
|
+
--lsd-border: #000000;
|
|
72
|
+
--lsd-surface: #ffffff;
|
|
73
|
+
--lsd-destructive: #b91c1c;
|
|
74
|
+
--lsd-success: #15803d;
|
|
75
|
+
--lsd-warning: #f59e0b;
|
|
76
|
+
--lsd-info: #2563eb;
|
|
59
77
|
}
|
|
60
78
|
```
|
|
61
79
|
|
|
62
80
|
## Components
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- **AlertDialog**: Confirmation dialog
|
|
94
|
-
- **Popover**: Popup content component
|
|
95
|
-
- **Tooltip**: Hover tooltip
|
|
96
|
-
- **Sonner**: Toast notifications
|
|
97
|
-
|
|
98
|
-
### Input Components
|
|
99
|
-
- **Button**: Versatile button with variants and sizes
|
|
100
|
-
- **ButtonGroup**: Grouped buttons
|
|
101
|
-
- **Toggle**: Toggle button component
|
|
102
|
-
- **ToggleGroup**: Grouped toggle buttons
|
|
82
|
+
| Component | Description |
|
|
83
|
+
|-----------|-------------|
|
|
84
|
+
| Accordion | Vertically stacked collapsible sections |
|
|
85
|
+
| AlertDialog | Modal dialog for critical confirmations |
|
|
86
|
+
| Autocomplete | Input with async suggestion fetching |
|
|
87
|
+
| Badge | Small label for status or categorization |
|
|
88
|
+
| Button | Interactive button with multiple variants |
|
|
89
|
+
| ButtonGroup | Grouped buttons with optional separators |
|
|
90
|
+
| Card | Container for related content |
|
|
91
|
+
| Checkbox | Boolean input control |
|
|
92
|
+
| Command | Command palette for keyboard navigation |
|
|
93
|
+
| Dialog | Modal overlay for focused content |
|
|
94
|
+
| Input | Text input field |
|
|
95
|
+
| Label | Form field label |
|
|
96
|
+
| Popover | Floating content anchored to trigger |
|
|
97
|
+
| Progress | Visual indicator of completion |
|
|
98
|
+
| ScrollArea | Custom scrollbar container |
|
|
99
|
+
| Select | Dropdown selection input |
|
|
100
|
+
| Separator | Visual divider between sections |
|
|
101
|
+
| Sheet | Slide-out panel overlay |
|
|
102
|
+
| Sidebar | Navigation sidebar component |
|
|
103
|
+
| Skeleton | Loading placeholder |
|
|
104
|
+
| Sonner | Toast notifications |
|
|
105
|
+
| Switch | Toggle switch input |
|
|
106
|
+
| Tabs | Tabbed content navigation |
|
|
107
|
+
| Toggle | Two-state button |
|
|
108
|
+
| ToggleGroup | Group of toggle buttons |
|
|
109
|
+
| Tooltip | Hover information popup |
|
|
110
|
+
| Typography | Text styling components |
|
|
103
111
|
|
|
104
112
|
## Development
|
|
105
|
-
|
|
113
|
+
M
|
|
106
114
|
### Prerequisites
|
|
107
115
|
|
|
108
116
|
- Node.js >= 24.0.0
|
|
@@ -111,20 +119,70 @@ LSD React provides a comprehensive set of UI components:
|
|
|
111
119
|
### Setup
|
|
112
120
|
|
|
113
121
|
```bash
|
|
122
|
+
# Clone the repository
|
|
114
123
|
git clone https://github.com/nipsysdev/shadcn-lsd.git
|
|
115
124
|
cd shadcn-lsd
|
|
125
|
+
|
|
126
|
+
# Install dependencies
|
|
116
127
|
pnpm install
|
|
117
128
|
```
|
|
118
129
|
|
|
119
130
|
### Scripts
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- `pnpm cosmos:export` - Export Cosmos site
|
|
125
|
-
- `pnpm lint` - Run linting
|
|
132
|
+
```bash
|
|
133
|
+
# Start component playground
|
|
134
|
+
pnpm cosmos
|
|
126
135
|
|
|
136
|
+
# Build the library
|
|
137
|
+
pnpm build
|
|
138
|
+
|
|
139
|
+
# Run tests
|
|
140
|
+
pnpm test
|
|
141
|
+
|
|
142
|
+
# Run tests in watch mode
|
|
143
|
+
pnpm test:watch
|
|
144
|
+
|
|
145
|
+
# Run tests with coverage
|
|
146
|
+
pnpm test:coverage
|
|
147
|
+
|
|
148
|
+
# Lint code
|
|
149
|
+
pnpm lint
|
|
150
|
+
|
|
151
|
+
# Format code
|
|
152
|
+
pnpm format
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Component Playground
|
|
156
|
+
|
|
157
|
+
The project uses React Cosmos for component development. Run `pnpm cosmos` to start the playground at `http://localhost:5000`.
|
|
158
|
+
|
|
159
|
+
To export a static build for deployment:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
pnpm cosmos-export
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Tech Stack
|
|
166
|
+
|
|
167
|
+
- **React 19** - UI library
|
|
168
|
+
- **TypeScript** - Type safety
|
|
169
|
+
- **Tailwind CSS 4** - Utility-first styling
|
|
170
|
+
- **Radix UI** - Accessible primitives
|
|
171
|
+
- **Vite** - Build tooling
|
|
172
|
+
- **Vitest** - Testing framework
|
|
173
|
+
- **React Cosmos** - Component playground
|
|
174
|
+
|
|
175
|
+
## Peer Dependencies
|
|
176
|
+
|
|
177
|
+
Make sure your project has these installed:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"react": "^19.2.4",
|
|
182
|
+
"react-dom": "^19.2.4"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
127
185
|
|
|
128
186
|
## License
|
|
129
187
|
|
|
130
|
-
|
|
188
|
+
[GPL-3.0-or-later](LICENSE)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { Popover as B } from "./components/ui/popover/Popover.js";
|
|
4
4
|
import { c as n } from "./utils-DtaLkIY8.js";
|
|
@@ -56,10 +56,10 @@ function q({
|
|
|
56
56
|
f(!0);
|
|
57
57
|
const y = async () => {
|
|
58
58
|
try {
|
|
59
|
-
const
|
|
60
|
-
m(
|
|
61
|
-
} catch (
|
|
62
|
-
console.error("Error fetching options:",
|
|
59
|
+
const a = await l(d);
|
|
60
|
+
m(a);
|
|
61
|
+
} catch (a) {
|
|
62
|
+
console.error("Error fetching options:", a), m([]);
|
|
63
63
|
} finally {
|
|
64
64
|
f(!1);
|
|
65
65
|
}
|
|
@@ -83,7 +83,7 @@ const G = s.forwardRef(
|
|
|
83
83
|
disabled: e = !1,
|
|
84
84
|
label: y,
|
|
85
85
|
size: v = "md",
|
|
86
|
-
icon:
|
|
86
|
+
icon: a,
|
|
87
87
|
error: T = !1,
|
|
88
88
|
variant: I = "outlined",
|
|
89
89
|
clearable: P = !1,
|
|
@@ -93,7 +93,7 @@ const G = s.forwardRef(
|
|
|
93
93
|
}, _) => {
|
|
94
94
|
const [E, A] = s.useState(!1), [j, N] = s.useState(""), b = x !== void 0 ? x : j, [u, h] = s.useState(""), O = s.useRef(null);
|
|
95
95
|
s.useImperativeHandle(_, () => O.current);
|
|
96
|
-
const { asyncOptions:
|
|
96
|
+
const { asyncOptions: w, isLoading: k } = q({
|
|
97
97
|
onOptionsFetch: d,
|
|
98
98
|
searchText: u,
|
|
99
99
|
open: E,
|
|
@@ -105,14 +105,14 @@ const G = s.forwardRef(
|
|
|
105
105
|
[c, x]
|
|
106
106
|
), U = () => {
|
|
107
107
|
x === void 0 && N(""), h(""), c?.(""), f?.();
|
|
108
|
-
}, D = s.useMemo(() => d ?
|
|
108
|
+
}, D = s.useMemo(() => d ? w : l ? u ? l.filter(
|
|
109
109
|
(t) => t.label.toLowerCase().startsWith(u.toLowerCase())
|
|
110
|
-
) : l : [], [l,
|
|
111
|
-
return /* @__PURE__ */
|
|
110
|
+
) : l : [], [l, w, u, d]), L = g.id || "autocomplete-input", p = Y[v], z = b && (l?.find((t) => t.value === b)?.label || w?.find((t) => t.value === b)?.label) || "";
|
|
111
|
+
return /* @__PURE__ */ S(
|
|
112
112
|
"div",
|
|
113
113
|
{
|
|
114
114
|
...g,
|
|
115
|
-
className: n("lsd:box-border",
|
|
115
|
+
className: n("lsd:box-border", p.container, m),
|
|
116
116
|
children: [
|
|
117
117
|
y && /* @__PURE__ */ r(
|
|
118
118
|
"label",
|
|
@@ -120,20 +120,20 @@ const G = s.forwardRef(
|
|
|
120
120
|
htmlFor: L,
|
|
121
121
|
className: n(
|
|
122
122
|
"lsd:block lsd:text-sm",
|
|
123
|
-
|
|
123
|
+
p.label,
|
|
124
124
|
e ? "lsd:text-lsd-text-secondary" : "lsd:text-lsd-text-primary"
|
|
125
125
|
),
|
|
126
126
|
children: y
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ S(B, { open: E, onOpenChange: A, children: [
|
|
130
|
+
/* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ S(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
133
|
className: n(
|
|
134
134
|
"lsd:flex lsd:justify-between",
|
|
135
|
-
|
|
136
|
-
I === "outlined" ? e ? "lsd:border lsd:border-lsd-text-secondary" : "lsd:border lsd:border-lsd-border
|
|
135
|
+
p.inputContainer,
|
|
136
|
+
I === "outlined" ? e ? "lsd:border lsd:border-lsd-text-secondary" : "lsd:border lsd:border-lsd-border" : e ? "lsd:border lsd:border-transparent lsd:border-b-lsd-text-secondary" : "lsd:border lsd:border-transparent lsd:border-b-lsd-border",
|
|
137
137
|
e ? "lsd:cursor-not-allowed" : "lsd:cursor-pointer"
|
|
138
138
|
),
|
|
139
139
|
children: [
|
|
@@ -149,18 +149,18 @@ const G = s.forwardRef(
|
|
|
149
149
|
readOnly: !0,
|
|
150
150
|
className: n(
|
|
151
151
|
"lsd:border-none lsd:outline-none lsd:bg-none lsd:w-full lsd:text-[14px]",
|
|
152
|
-
|
|
153
|
-
e ? "lsd:text-lsd-text-secondary" : "lsd:text-lsd-text-primary",
|
|
152
|
+
p.input,
|
|
153
|
+
e ? "lsd:text-lsd-text-secondary lsd:cursor-not-allowed" : "lsd:text-lsd-text-primary",
|
|
154
154
|
T && "lsd:line-through",
|
|
155
|
-
"lsd:
|
|
155
|
+
"lsd:placeholder:text-lsd-text-primary lsd:placeholder:opacity-30"
|
|
156
156
|
)
|
|
157
157
|
}
|
|
158
158
|
),
|
|
159
|
-
|
|
159
|
+
a && /* @__PURE__ */ r(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
|
-
className: n("lsd:flex lsd:items-center",
|
|
163
|
-
children:
|
|
162
|
+
className: n("lsd:flex lsd:items-center", p.icon),
|
|
163
|
+
children: a
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
166
|
b && P && /* @__PURE__ */ r(
|
|
@@ -171,7 +171,7 @@ const G = s.forwardRef(
|
|
|
171
171
|
disabled: e,
|
|
172
172
|
className: n(
|
|
173
173
|
"lsd:flex lsd:items-center",
|
|
174
|
-
|
|
174
|
+
p.icon,
|
|
175
175
|
e ? "lsd:cursor-not-allowed" : "lsd:cursor-pointer"
|
|
176
176
|
),
|
|
177
177
|
children: /* @__PURE__ */ r(
|
|
@@ -3,11 +3,11 @@ import { S as y } from "./index-BvoZGpli.js";
|
|
|
3
3
|
import { c as k } from "./utils-DtaLkIY8.js";
|
|
4
4
|
import { c as z } from "./index-D69Iqk5J.js";
|
|
5
5
|
const j = z(
|
|
6
|
-
"lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:border-lsd-
|
|
6
|
+
"lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:border-lsd-border lsd:rounded-[20px] lsd:w-fit lsd:whitespace-nowrap lsd:shrink-0 lsd:[&>svg]:size-3 lsd:[&>svg]:pointer-events-none lsd:hover:underline lsd:focus:underline lsd:cursor-pointer lsd:transition-colors lsd:overflow-hidden",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
filled: "lsd:bg-lsd-primary lsd:text-lsd-surface
|
|
10
|
+
filled: "lsd:bg-lsd-primary lsd:text-lsd-surface",
|
|
11
11
|
outlined: "lsd:bg-transparent lsd:text-lsd-text-primary",
|
|
12
12
|
destructive: "lsd:bg-lsd-destructive lsd:text-white lsd:border-lsd-destructive",
|
|
13
13
|
success: "lsd:bg-lsd-success lsd:text-white lsd:border-lsd-success",
|
|
@@ -50,9 +50,9 @@ const j = z(
|
|
|
50
50
|
function I({
|
|
51
51
|
className: c,
|
|
52
52
|
variant: n,
|
|
53
|
-
size:
|
|
53
|
+
size: o,
|
|
54
54
|
asChild: u = !1,
|
|
55
|
-
onDismiss:
|
|
55
|
+
onDismiss: i,
|
|
56
56
|
onClick: t,
|
|
57
57
|
icon: e,
|
|
58
58
|
iconPosition: p = "left",
|
|
@@ -60,12 +60,12 @@ function I({
|
|
|
60
60
|
children: a,
|
|
61
61
|
...g
|
|
62
62
|
}) {
|
|
63
|
-
const f = u ? y : "span",
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
switch (
|
|
63
|
+
const f = u ? y : "span", d = !!t, r = h || n === "dot", m = (l) => {
|
|
64
|
+
d && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), t?.());
|
|
65
|
+
}, b = (l) => {
|
|
66
|
+
l.stopPropagation(), i?.();
|
|
67
|
+
}, w = r ? (() => {
|
|
68
|
+
switch (o) {
|
|
69
69
|
case "xs":
|
|
70
70
|
return "lsd:w-[8px] lsd:h-[8px]";
|
|
71
71
|
case "sm":
|
|
@@ -85,27 +85,27 @@ function I({
|
|
|
85
85
|
{
|
|
86
86
|
"data-slot": "badge",
|
|
87
87
|
className: k(
|
|
88
|
-
j({ variant: n, size:
|
|
89
|
-
|
|
88
|
+
j({ variant: n, size: o }),
|
|
89
|
+
d && "lsd:cursor-pointer",
|
|
90
90
|
r && "lsd:rounded-full lsd:p-0 lsd:border-0",
|
|
91
|
-
|
|
91
|
+
w,
|
|
92
92
|
c
|
|
93
93
|
),
|
|
94
|
-
role:
|
|
95
|
-
tabIndex:
|
|
94
|
+
role: d ? "button" : void 0,
|
|
95
|
+
tabIndex: d ? 0 : void 0,
|
|
96
96
|
onKeyDown: m,
|
|
97
|
-
onClick:
|
|
97
|
+
onClick: d ? t : void 0,
|
|
98
98
|
...g,
|
|
99
99
|
children: !r && /* @__PURE__ */ x(v, { children: [
|
|
100
100
|
e && p === "left" && /* @__PURE__ */ s("span", { className: "lsd:flex lsd:items-center lsd:justify-center", children: e }),
|
|
101
101
|
a && /* @__PURE__ */ s("span", { children: a }),
|
|
102
102
|
e && p === "right" && /* @__PURE__ */ s("span", { className: "lsd:flex lsd:items-center lsd:justify-center", children: e }),
|
|
103
|
-
|
|
103
|
+
i && /* @__PURE__ */ s(
|
|
104
104
|
"button",
|
|
105
105
|
{
|
|
106
106
|
type: "button",
|
|
107
107
|
className: "lsd:flex lsd:items-center lsd:justify-center lsd:rounded-full lsd:hover:bg-black/10 lsd:dark:hover:bg-white/10 lsd:transition-colors lsd:cursor-pointer lsd:border-0 lsd:p-0 lsd:bg-transparent",
|
|
108
|
-
onClick:
|
|
108
|
+
onClick: b,
|
|
109
109
|
"aria-label": "Dismiss",
|
|
110
110
|
children: /* @__PURE__ */ s(D, {})
|
|
111
111
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { c as l } from "./utils-DtaLkIY8.js";
|
|
4
|
-
function
|
|
4
|
+
function p(e) {
|
|
5
5
|
switch (e) {
|
|
6
6
|
case "xs":
|
|
7
7
|
return "lsd:text-xs file:lsd:text-xs";
|
|
@@ -17,7 +17,7 @@ function b(e) {
|
|
|
17
17
|
return "lsd:text-base file:lsd:text-base";
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function g(e) {
|
|
21
21
|
switch (e) {
|
|
22
22
|
case "xs":
|
|
23
23
|
return "lsd:py-1";
|
|
@@ -33,7 +33,7 @@ function y(e) {
|
|
|
33
33
|
return "lsd:py-3";
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function y(e) {
|
|
37
37
|
switch (e) {
|
|
38
38
|
case "xs":
|
|
39
39
|
return "lsd:text-xs";
|
|
@@ -60,14 +60,14 @@ const h = i.forwardRef(
|
|
|
60
60
|
id: x,
|
|
61
61
|
type: o,
|
|
62
62
|
...u
|
|
63
|
-
},
|
|
64
|
-
const
|
|
65
|
-
return /* @__PURE__ */
|
|
63
|
+
}, f) => {
|
|
64
|
+
const m = i.useId(), n = x || m;
|
|
65
|
+
return /* @__PURE__ */ b("div", { className: l("lsd:flex lsd:flex-col lsd:box-border", e), children: [
|
|
66
66
|
d && /* @__PURE__ */ s(
|
|
67
67
|
"label",
|
|
68
68
|
{
|
|
69
69
|
htmlFor: n,
|
|
70
|
-
className: l("lsd:font-medium",
|
|
70
|
+
className: l("lsd:font-medium", y(t)),
|
|
71
71
|
children: d
|
|
72
72
|
}
|
|
73
73
|
),
|
|
@@ -76,20 +76,20 @@ const h = i.forwardRef(
|
|
|
76
76
|
{
|
|
77
77
|
className: l(
|
|
78
78
|
"lsd:flex lsd:items-center lsd:justify-between",
|
|
79
|
-
c === "outlined" ? "lsd:border lsd:border-lsd-border
|
|
79
|
+
c === "outlined" ? "lsd:border lsd:border-lsd-border" : "lsd:border lsd:border-transparent lsd:border-b-lsd-border",
|
|
80
80
|
a && "lsd:border-lsd-destructive"
|
|
81
81
|
),
|
|
82
82
|
children: /* @__PURE__ */ s(
|
|
83
83
|
"input",
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: f,
|
|
86
86
|
type: o,
|
|
87
87
|
id: n,
|
|
88
88
|
className: l(
|
|
89
|
-
"file:lsd:text-lsd-text placeholder:lsd:text-lsd-text-primary placeholder:lsd:opacity-30 selection:lsd:bg-lsd-primary selection:lsd:text-lsd-surface
|
|
89
|
+
"file:lsd:text-lsd-text-primary placeholder:lsd:text-lsd-text-primary placeholder:lsd:opacity-30 selection:lsd:bg-lsd-primary selection:lsd:text-lsd-surface lsd:border-none lsd:outline-none lsd:bg-transparent lsd:text-lsd-text-primary lsd:w-full lsd:h-full file:lsd:inline-flex file:lsd:h-7 file:lsd:border-0 file:lsd:bg-transparent file:lsd:font-medium lsd:disabled:pointer-events-none lsd:disabled:cursor-not-allowed lsd:disabled:opacity-34",
|
|
90
90
|
"focus-visible:lsd:outline-none lsd:px-4",
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
p(t),
|
|
92
|
+
g(t)
|
|
93
93
|
),
|
|
94
94
|
...u
|
|
95
95
|
}
|
|
@@ -113,7 +113,7 @@ const h = i.forwardRef(
|
|
|
113
113
|
h.displayName = "Input";
|
|
114
114
|
export {
|
|
115
115
|
h as I,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
g
|
|
116
|
+
p as a,
|
|
117
|
+
g as b,
|
|
118
|
+
y as g
|
|
119
119
|
};
|
|
@@ -16,7 +16,7 @@ var m = "Label", s = d.forwardRef((t, a) => /* @__PURE__ */ l(
|
|
|
16
16
|
s.displayName = m;
|
|
17
17
|
var c = s;
|
|
18
18
|
const u = n(
|
|
19
|
-
"lsd:flex lsd:items-center lsd:gap-2 lsd:select-none lsd:group-data-[disabled=true]:pointer-events-none lsd:group-data-[disabled=true]:opacity-50 peer-
|
|
19
|
+
"lsd:flex lsd:items-center lsd:gap-2 lsd:select-none lsd:group-data-[disabled=true]:pointer-events-none lsd:group-data-[disabled=true]:opacity-50 lsd:peer-disabled:cursor-not-allowed lsd:peer-disabled:opacity-50",
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
@@ -16,7 +16,7 @@ function D() {
|
|
|
16
16
|
}, []), !!a;
|
|
17
17
|
}
|
|
18
18
|
const k = "16rem", T = "18rem", A = "3rem", M = "b", L = y(
|
|
19
|
-
"peer/menu-button lsd:flex lsd:w-full lsd:items-center lsd:gap-2 lsd:overflow-hidden lsd:rounded-md lsd:p-2 lsd:text-left lsd:text-sm lsd:outline-hidden ring-sidebar-ring lsd:transition-[width,height,padding] lsd:hover:bg-sidebar-accent lsd:hover:text-sidebar-accent-foreground lsd:focus-visible:ring-2 lsd:active:bg-sidebar-accent lsd:active:text-sidebar-accent-foreground lsd:disabled:pointer-events-none lsd:disabled:opacity-50 lsd:group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-lsd:disabled:pointer-events-none aria-lsd:disabled:opacity-50 lsd:data-[active=true]:bg-sidebar-accent lsd:data-[active=true]:font-medium lsd:data-[active=true]:text-sidebar-accent-foreground lsd:data-[state=open]:hover:bg-sidebar-accent lsd:data-[state=open]:hover:text-sidebar-accent-foreground lsd:group-data-[collapsible=icon]:size-8! lsd:group-data-[collapsible=icon]:p-2! lsd:[&>span:last-child]:truncate lsd:[&>svg]:size-4 lsd:[&>svg]:shrink-0",
|
|
19
|
+
"peer/menu-button lsd:flex lsd:w-full lsd:items-center lsd:gap-2 lsd:overflow-hidden lsd:rounded-md lsd:p-2 lsd:text-left lsd:text-sm lsd:outline-hidden ring-sidebar-ring lsd:transition-[width,height,padding] lsd:hover:bg-sidebar-accent lsd:hover:text-sidebar-accent-foreground lsd:focus-visible:ring-2 lsd:active:bg-sidebar-accent lsd:active:text-sidebar-accent-foreground lsd:disabled:pointer-events-none lsd:disabled:opacity-50 lsd:group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-lsd:disabled:pointer-events-none aria-lsd:disabled:opacity-50 lsd:data-[active=true]:bg-sidebar-accent lsd:data-[active=true]:font-medium lsd:data-[active=true]:text-sidebar-accent-foreground lsd:data-[state=open]:hover:bg-sidebar-accent lsd:data-[state=open]:hover:text-sidebar-accent-foreground lsd:group-data-[collapsible=icon]:size-8! lsd:group-data-[collapsible=icon]:p-2! lsd:[&>span:last-child]:truncate lsd:[&>svg]:size-4 lsd:[&>svg]:shrink-0 lsd:hover:underline lsd:focus:underline",
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
@@ -34,11 +34,11 @@ const k = "16rem", T = "18rem", A = "3rem", M = "b", L = y(
|
|
|
34
34
|
size: "default"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
),
|
|
37
|
+
), v = t.createContext(
|
|
38
38
|
null
|
|
39
39
|
);
|
|
40
40
|
function K() {
|
|
41
|
-
const a = t.useContext(
|
|
41
|
+
const a = t.useContext(v);
|
|
42
42
|
if (!a)
|
|
43
43
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
44
44
|
return a;
|
|
@@ -48,7 +48,7 @@ function W({
|
|
|
48
48
|
open: r,
|
|
49
49
|
onOpenChange: d,
|
|
50
50
|
className: o,
|
|
51
|
-
style:
|
|
51
|
+
style: m,
|
|
52
52
|
children: g,
|
|
53
53
|
...w
|
|
54
54
|
}) {
|
|
@@ -77,14 +77,14 @@ function W({
|
|
|
77
77
|
}),
|
|
78
78
|
[f, n, l, i, p, c]
|
|
79
79
|
);
|
|
80
|
-
return /* @__PURE__ */ u(
|
|
80
|
+
return /* @__PURE__ */ u(v.Provider, { value: S, children: /* @__PURE__ */ u(I, { delayDuration: 0, children: /* @__PURE__ */ u(
|
|
81
81
|
"div",
|
|
82
82
|
{
|
|
83
83
|
"data-slot": "sidebar-wrapper",
|
|
84
84
|
style: {
|
|
85
85
|
"--sidebar-width": "16rem",
|
|
86
86
|
"--sidebar-width-icon": "3rem",
|
|
87
|
-
...
|
|
87
|
+
...m
|
|
88
88
|
},
|
|
89
89
|
className: E(
|
|
90
90
|
"lsd:group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar lsd:flex lsd:min-h-svh lsd:w-full",
|
|
@@ -101,7 +101,7 @@ export {
|
|
|
101
101
|
A as b,
|
|
102
102
|
T as c,
|
|
103
103
|
W as d,
|
|
104
|
-
|
|
104
|
+
v as e,
|
|
105
105
|
L as s,
|
|
106
106
|
K as u
|
|
107
107
|
};
|
|
@@ -4,7 +4,7 @@ import * as a from "react";
|
|
|
4
4
|
import { c as o } from "./utils-DtaLkIY8.js";
|
|
5
5
|
import { c as i } from "./index-D69Iqk5J.js";
|
|
6
6
|
const n = i(
|
|
7
|
-
"lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:transition-colors lsd:bg-transparent lsd:text-lsd-text lsd:border-lsd-border lsd:hover:underline lsd:cursor-pointer lsd:disabled:opacity-34 lsd:disabled:cursor-not-allowed lsd:disabled:no-underline lsd:data-[state=on]:bg-lsd-primary lsd:data-[state=on]:text-lsd-surface
|
|
7
|
+
"lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:transition-colors lsd:bg-transparent lsd:text-lsd-text-primary lsd:border-lsd-border lsd:hover:underline lsd:cursor-pointer lsd:disabled:opacity-34 lsd:disabled:cursor-not-allowed lsd:disabled:no-underline lsd:data-[state=on]:bg-lsd-primary lsd:data-[state=on]:text-lsd-surface",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
size: {
|