@nipsys/shadcn-lsd 0.2.2 → 0.2.4
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 +52 -35
- package/dist/{Button-L-du0fyx.js → Button-DoTpV6G1.js} +31 -26
- package/dist/{Typography-D8OaaVSH.js → Typography-BW4Kc9SY.js} +18 -14
- package/dist/assets/style.css +1 -1
- package/dist/components/ui/alert-dialog/AlertDialogAction.js +1 -1
- package/dist/components/ui/alert-dialog/AlertDialogCancel.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-action.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-cancel.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-content.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-description.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-footer.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-header.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-overlay.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-title.test.js +1 -1
- package/dist/components/ui/alert-dialog/__tests__/alert-dialog-trigger.test.js +1 -1
- package/dist/components/ui/button/Button.js +1 -1
- package/dist/components/ui/button/button.test.js +159 -123
- package/dist/components/ui/button/types.d.ts +3 -3
- package/dist/components/ui/sidebar/SidebarContent.js +15 -15
- package/dist/components/ui/sidebar/__tests__/sidebar-group.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar-menu.test.js +1 -1
- package/dist/components/ui/sidebar/__tests__/sidebar.test.js +1 -1
- 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 +25 -25
- package/dist/components/ui/tabs/__tests__/tabs-trigger.test.js +1 -3
- package/dist/components/ui/tabs/__tests__/tabs.test.js +23 -23
- package/dist/components/ui/typography/Typography.js +1 -1
- package/dist/components/ui/typography/types.d.ts +1 -1
- package/dist/components/ui/typography/typography.test.js +143 -111
- package/dist/lib/types.d.ts +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +219 -215
- package/dist/{types-B0wccExf.js → types-ClTXXuXM.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @nipsys/shadcn-lsd
|
|
2
2
|
|
|
3
|
+
[](https://github.com/nipsysdev/shadcn-lsd/blob/main/LICENSE)
|
|
4
|
+
[](https://react.dev)
|
|
5
|
+
|
|
3
6
|
A React component library implementing the Logos Design System (LSD). Built with Radix UI primitives and Tailwind CSS, following the shadcn/ui patterns.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
@@ -10,21 +13,25 @@ pnpm add @nipsys/shadcn-lsd
|
|
|
10
13
|
|
|
11
14
|
## Usage
|
|
12
15
|
|
|
13
|
-
### Import
|
|
16
|
+
### Import Components
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
```tsx
|
|
19
|
+
import { Dialog, DialogTrigger, DialogContent, Button } from "@nipsys/shadcn-lsd";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### CSS Import
|
|
16
23
|
|
|
17
24
|
```tsx
|
|
18
25
|
import '@nipsys/shadcn-lsd/css';
|
|
19
26
|
```
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
Or in a CSS stylesheet:
|
|
22
29
|
|
|
23
30
|
```css
|
|
24
31
|
@import "@nipsys/shadcn-lsd/css";
|
|
25
32
|
```
|
|
26
33
|
|
|
27
|
-
###
|
|
34
|
+
### Example
|
|
28
35
|
|
|
29
36
|
```tsx
|
|
30
37
|
import { Dialog, DialogTrigger, DialogContent, Button } from "@nipsys/shadcn-lsd";
|
|
@@ -32,7 +39,7 @@ import { Dialog, DialogTrigger, DialogContent, Button } from "@nipsys/shadcn-lsd
|
|
|
32
39
|
function App() {
|
|
33
40
|
return (
|
|
34
41
|
<Dialog>
|
|
35
|
-
<DialogTrigger>
|
|
42
|
+
<DialogTrigger asChild>
|
|
36
43
|
<Button>Open</Button>
|
|
37
44
|
</DialogTrigger>
|
|
38
45
|
<DialogContent>
|
|
@@ -75,50 +82,60 @@ The design system uses CSS custom properties that you can override:
|
|
|
75
82
|
|
|
76
83
|
```css
|
|
77
84
|
:root {
|
|
85
|
+
/* Core colors */
|
|
78
86
|
--lsd-primary: #000000;
|
|
87
|
+
--lsd-primary-foreground: #ffffff;
|
|
79
88
|
--lsd-text-primary: #000000;
|
|
80
89
|
--lsd-text-secondary: #808080;
|
|
81
90
|
--lsd-border: #000000;
|
|
82
91
|
--lsd-surface: #ffffff;
|
|
92
|
+
|
|
93
|
+
/* Icon colors */
|
|
94
|
+
--lsd-icon-primary: #000000;
|
|
95
|
+
--lsd-icon-secondary: #ffffff;
|
|
96
|
+
|
|
97
|
+
/* Semantic colors */
|
|
83
98
|
--lsd-destructive: #b91c1c;
|
|
99
|
+
--lsd-destructive-text: #cb3939;
|
|
84
100
|
--lsd-success: #15803d;
|
|
101
|
+
--lsd-success-text: #168440;
|
|
85
102
|
--lsd-warning: #f59e0b;
|
|
103
|
+
--lsd-warning-text: #d68b09;
|
|
86
104
|
--lsd-info: #2563eb;
|
|
105
|
+
--lsd-info-text: #2563eb;
|
|
87
106
|
}
|
|
88
107
|
```
|
|
89
108
|
|
|
90
109
|
## Components
|
|
91
110
|
|
|
92
|
-
| Component | Description |
|
|
93
|
-
|
|
94
|
-
| Accordion | Vertically stacked collapsible sections |
|
|
95
|
-
| AlertDialog | Modal dialog for critical confirmations |
|
|
96
|
-
| Autocomplete | Input with async suggestion fetching |
|
|
97
|
-
| Badge | Small label for status or categorization |
|
|
98
|
-
| Button | Interactive button with multiple variants |
|
|
99
|
-
| ButtonGroup | Grouped buttons with optional separators |
|
|
100
|
-
| Card | Container for related content |
|
|
101
|
-
| Checkbox | Boolean input control |
|
|
102
|
-
| Command | Command palette for keyboard navigation |
|
|
103
|
-
| Dialog | Modal overlay for focused content |
|
|
104
|
-
| Input | Text input field |
|
|
105
|
-
| Label | Form field label |
|
|
106
|
-
| Menubar | Horizontal menu bar with dropdown menus |
|
|
107
|
-
| Popover | Floating content anchored to trigger |
|
|
108
|
-
| Progress | Visual indicator of completion |
|
|
109
|
-
| ScrollArea | Custom scrollbar container |
|
|
110
|
-
| Select | Dropdown selection input |
|
|
111
|
-
| Separator | Visual divider between sections |
|
|
112
|
-
| Sheet | Slide-out panel overlay |
|
|
113
|
-
| Sidebar | Navigation sidebar component |
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
| Tooltip | Hover information popup |
|
|
121
|
-
| Typography | Text styling components |
|
|
111
|
+
| Component | Description | Playground |
|
|
112
|
+
|-----------|-------------|------------|
|
|
113
|
+
| [Accordion](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAccordion.fixture.tsx%22%7D) | Vertically stacked collapsible sections | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAccordion.fixture.tsx%22%7D) |
|
|
114
|
+
| [AlertDialog](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAlertDialog.fixture.tsx%22%7D) | Modal dialog for critical confirmations | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAlertDialog.fixture.tsx%22%7D) |
|
|
115
|
+
| [Autocomplete](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAutocomplete.fixture.tsx%22%7D) | Input with async suggestion fetching | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FAutocomplete.fixture.tsx%22%7D) |
|
|
116
|
+
| [Badge](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FBadge.fixture.tsx%22%7D) | Small label for status or categorization | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FBadge.fixture.tsx%22%7D) |
|
|
117
|
+
| [Button](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FButton.fixture.tsx%22%7D) | Interactive button with multiple variants | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FButton.fixture.tsx%22%7D) |
|
|
118
|
+
| [ButtonGroup](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FButtonGroup.fixture.tsx%22%7D) | Grouped buttons with optional separators | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FButtonGroup.fixture.tsx%22%7D) |
|
|
119
|
+
| [Card](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCard.fixture.tsx%22%7D) | Container for related content | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCard.fixture.tsx%22%7D) |
|
|
120
|
+
| [Checkbox](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCheckbox.fixture.tsx%22%7D) | Boolean input control | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCheckbox.fixture.tsx%22%7D) |
|
|
121
|
+
| [Command](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCommand.fixture.tsx%22%7D) | Command palette for keyboard navigation | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FCommand.fixture.tsx%22%7D) |
|
|
122
|
+
| [Dialog](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FDialog.fixture.tsx%22%7D) | Modal overlay for focused content | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FDialog.fixture.tsx%22%7D) |
|
|
123
|
+
| [Input](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FInput.fixture.tsx%22%7D) | Text input field | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FInput.fixture.tsx%22%7D) |
|
|
124
|
+
| [Label](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FLabel.fixture.tsx%22%7D) | Form field label | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FLabel.fixture.tsx%22%7D) |
|
|
125
|
+
| [Menubar](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FMenubar.fixture.tsx%22%7D) | Horizontal menu bar with dropdown menus | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FMenubar.fixture.tsx%22%7D) |
|
|
126
|
+
| [Popover](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FPopover.fixture.tsx%22%7D) | Floating content anchored to trigger | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FPopover.fixture.tsx%22%7D) |
|
|
127
|
+
| [Progress](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FProgress.fixture.tsx%22%7D) | Visual indicator of completion | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FProgress.fixture.tsx%22%7D) |
|
|
128
|
+
| [ScrollArea](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FScrollArea.fixture.tsx%22%7D) | Custom scrollbar container | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FScrollArea.fixture.tsx%22%7D) |
|
|
129
|
+
| [Select](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSelect.fixture.tsx%22%7D) | Dropdown selection input | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSelect.fixture.tsx%22%7D) |
|
|
130
|
+
| [Separator](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSeparator.fixture.tsx%22%7D) | Visual divider between sections | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSeparator.fixture.tsx%22%7D) |
|
|
131
|
+
| [Sheet](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSheet.fixture.tsx%22%7D) | Slide-out panel overlay | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSheet.fixture.tsx%22%7D) |
|
|
132
|
+
| [Sidebar](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSidebar.fixture.tsx%22%7D) | Navigation sidebar component | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSidebar.fixture.tsx%22%7D) |
|
|
133
|
+
| [Sonner](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSonner.fixture.tsx%22%7D) | Toast notifications | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSonner.fixture.tsx%22%7D) |
|
|
134
|
+
| [Switch](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSwitch.fixture.tsx%22%7D) | Toggle switch input | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FSwitch.fixture.tsx%22%7D) |
|
|
135
|
+
| [Tabs](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FTabs.fixture.tsx%22%7D) | Tabbed content navigation | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FTabs.fixture.tsx%22%7D) |
|
|
136
|
+
| [Toggle](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FToggle.fixture.tsx%22%7D) | Two-state button | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FToggle.fixture.tsx%22%7D) |
|
|
137
|
+
| [ToggleGroup](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FToggleGroup.fixture.tsx%22%7D) | Group of toggle buttons | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FToggleGroup.fixture.tsx%22%7D) |
|
|
138
|
+
| [Typography](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FTypography.fixture.tsx%22%7D) | Text styling components | [View →](https://lsd.nipsys.dev/?fixtureId=%7B%22path%22%3A%22src%2F__cosmos__%2Ffixtures%2FTypography.fixture.tsx%22%7D) |
|
|
122
139
|
|
|
123
140
|
## Development
|
|
124
141
|
M
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { c as
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as d, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { c as n } from "./utils-DtaLkIY8.js";
|
|
4
|
+
import { c as p } from "./index-D69Iqk5J.js";
|
|
5
|
+
const b = p(
|
|
6
6
|
"lsd:inline-flex lsd:items-center lsd:justify-center lsd:border lsd:transition-colors lsd:cursor-pointer",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
@@ -12,6 +12,8 @@ const h = m(
|
|
|
12
12
|
"filled-icon": "lsd:bg-primary lsd:text-primary-foreground lsd:rounded-full",
|
|
13
13
|
"outlined-icon": "lsd:bg-transparent lsd:text-foreground lsd:rounded-full",
|
|
14
14
|
link: "lsd:bg-transparent lsd:border-0 lsd:text-foreground lsd:hover:underline",
|
|
15
|
+
ghost: "lsd:bg-transparent lsd:text-foreground lsd:border-0 lsd:hover:bg-accent lsd:hover:text-accent-foreground",
|
|
16
|
+
"ghost-icon": "lsd:bg-transparent lsd:text-foreground lsd:border-0 lsd:rounded-full lsd:hover:bg-accent lsd:hover:text-accent-foreground",
|
|
15
17
|
destructive: "lsd:bg-lsd-destructive lsd:text-white lsd:border-lsd-destructive lsd:hover:bg-lsd-destructive/90",
|
|
16
18
|
"destructive-icon": "lsd:bg-lsd-destructive lsd:text-white lsd:border-lsd-destructive lsd:rounded-full lsd:hover:bg-lsd-destructive/90",
|
|
17
19
|
success: "lsd:bg-lsd-success lsd:text-white lsd:border-lsd-success lsd:hover:bg-lsd-success/90",
|
|
@@ -23,6 +25,7 @@ const h = m(
|
|
|
23
25
|
md: "lsd:h-[34px] lsd:px-6 lsd:py-2 lsd:text-base",
|
|
24
26
|
lg: "lsd:h-12 lsd:px-8 lsd:py-[10px] lsd:text-lg",
|
|
25
27
|
xl: "lsd:h-14 lsd:px-10 lsd:py-3 lsd:text-xl",
|
|
28
|
+
"icon-xs": "lsd:w-6 lsd:h-6",
|
|
26
29
|
"icon-sm": "lsd:w-8 lsd:h-8",
|
|
27
30
|
"icon-md": "lsd:w-10 lsd:h-10",
|
|
28
31
|
"icon-lg": "lsd:w-12 lsd:h-12",
|
|
@@ -34,12 +37,14 @@ const h = m(
|
|
|
34
37
|
size: "md"
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
|
-
), f = ({ size: l }) => /* @__PURE__ */
|
|
40
|
+
), f = ({ size: l }) => /* @__PURE__ */ o(
|
|
38
41
|
"svg",
|
|
39
42
|
{
|
|
40
|
-
className:
|
|
43
|
+
className: n("animate-spin", (() => {
|
|
41
44
|
switch (l) {
|
|
42
45
|
case "xs":
|
|
46
|
+
case "icon-xs":
|
|
47
|
+
return "lsd:w-3 lsd:h-3";
|
|
43
48
|
case "icon-sm":
|
|
44
49
|
return "lsd:w-3 lsd:h-3";
|
|
45
50
|
case "sm":
|
|
@@ -62,7 +67,7 @@ const h = m(
|
|
|
62
67
|
viewBox: "0 0 24 24",
|
|
63
68
|
"aria-hidden": "true",
|
|
64
69
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ d(
|
|
66
71
|
"circle",
|
|
67
72
|
{
|
|
68
73
|
className: "lsd:opacity-25",
|
|
@@ -73,7 +78,7 @@ const h = m(
|
|
|
73
78
|
strokeWidth: "4"
|
|
74
79
|
}
|
|
75
80
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ d(
|
|
77
82
|
"path",
|
|
78
83
|
{
|
|
79
84
|
className: "lsd:opacity-75",
|
|
@@ -83,41 +88,41 @@ const h = m(
|
|
|
83
88
|
)
|
|
84
89
|
]
|
|
85
90
|
}
|
|
86
|
-
),
|
|
91
|
+
), m = g.forwardRef(
|
|
87
92
|
({
|
|
88
93
|
className: l,
|
|
89
|
-
variant:
|
|
94
|
+
variant: s,
|
|
90
95
|
size: r,
|
|
91
96
|
loading: t = !1,
|
|
92
|
-
fullWidth:
|
|
97
|
+
fullWidth: c = !1,
|
|
93
98
|
children: e,
|
|
94
|
-
disabled:
|
|
99
|
+
disabled: i,
|
|
95
100
|
...a
|
|
96
101
|
}, u) => {
|
|
97
|
-
const
|
|
98
|
-
return /* @__PURE__ */
|
|
102
|
+
const x = s === "link", h = s === "ghost" || s === "ghost-icon";
|
|
103
|
+
return /* @__PURE__ */ d(
|
|
99
104
|
"button",
|
|
100
105
|
{
|
|
101
|
-
className:
|
|
106
|
+
className: n(
|
|
102
107
|
"lsd:text-foreground lsd:border lsd:hover:underline lsd:disabled:opacity-34 lsd:disabled:cursor-not-allowed lsd:disabled:no-underline",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
b({ variant: s, size: r }),
|
|
109
|
+
c && "lsd:w-full",
|
|
110
|
+
(x || h) && "lsd:border-0",
|
|
106
111
|
l
|
|
107
112
|
),
|
|
108
113
|
ref: u,
|
|
109
|
-
disabled:
|
|
114
|
+
disabled: i || t,
|
|
110
115
|
...a,
|
|
111
|
-
children: t ? /* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
e && /* @__PURE__ */
|
|
116
|
+
children: t ? /* @__PURE__ */ o("span", { className: "lsd:flex lsd:items-center lsd:justify-center lsd:gap-2", children: [
|
|
117
|
+
/* @__PURE__ */ d(f, { size: r }),
|
|
118
|
+
e && /* @__PURE__ */ d("span", { className: "lsd:opacity-50", children: e })
|
|
114
119
|
] }) : e
|
|
115
120
|
}
|
|
116
121
|
);
|
|
117
122
|
}
|
|
118
123
|
);
|
|
119
|
-
|
|
124
|
+
m.displayName = "Button";
|
|
120
125
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
m as B,
|
|
127
|
+
b
|
|
123
128
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import * as m from "react";
|
|
3
3
|
import { c as o } from "./utils-DtaLkIY8.js";
|
|
4
4
|
import { c as i } from "./index-D69Iqk5J.js";
|
|
5
|
-
const
|
|
5
|
+
const c = i("", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
// Display variants
|
|
@@ -32,7 +32,11 @@ const f = i("", {
|
|
|
32
32
|
},
|
|
33
33
|
color: {
|
|
34
34
|
primary: "lsd:text-lsd-text-primary",
|
|
35
|
-
secondary: "lsd:text-lsd-text-secondary"
|
|
35
|
+
secondary: "lsd:text-lsd-text-secondary",
|
|
36
|
+
destructive: "lsd:text-lsd-destructive-text",
|
|
37
|
+
success: "lsd:text-lsd-success-text",
|
|
38
|
+
warning: "lsd:text-lsd-warning-text",
|
|
39
|
+
info: "lsd:text-lsd-info-text"
|
|
36
40
|
}
|
|
37
41
|
},
|
|
38
42
|
defaultVariants: {
|
|
@@ -40,8 +44,8 @@ const f = i("", {
|
|
|
40
44
|
color: "primary"
|
|
41
45
|
}
|
|
42
46
|
});
|
|
43
|
-
function
|
|
44
|
-
switch (
|
|
47
|
+
function x(e) {
|
|
48
|
+
switch (e) {
|
|
45
49
|
// Display variants don't have default components
|
|
46
50
|
case "display1":
|
|
47
51
|
case "display2":
|
|
@@ -70,22 +74,22 @@ function c(l) {
|
|
|
70
74
|
return "span";
|
|
71
75
|
}
|
|
72
76
|
}
|
|
73
|
-
const
|
|
74
|
-
({ className:
|
|
75
|
-
const a =
|
|
77
|
+
const f = m.forwardRef(
|
|
78
|
+
({ className: e, variant: l, color: t, as: s, ...d }, r) => {
|
|
79
|
+
const a = s || x(l);
|
|
76
80
|
return /* @__PURE__ */ n(
|
|
77
81
|
a,
|
|
78
82
|
{
|
|
79
|
-
className: o(
|
|
80
|
-
ref:
|
|
81
|
-
...
|
|
83
|
+
className: o(c({ variant: l, color: t }), e),
|
|
84
|
+
ref: r,
|
|
85
|
+
...d
|
|
82
86
|
}
|
|
83
87
|
);
|
|
84
88
|
}
|
|
85
89
|
);
|
|
86
|
-
|
|
90
|
+
f.displayName = "Typography";
|
|
87
91
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
f as T,
|
|
93
|
+
x as g,
|
|
94
|
+
c as t
|
|
91
95
|
};
|