@skutally/ui-library 0.1.2 → 0.1.3
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/bin/cli.js +15 -15
- package/components/accordion.html +30 -0
- package/components/alert.html +22 -0
- package/components/avatar.html +50 -0
- package/components/badge.html +18 -0
- package/components/breadcrumb.html +56 -0
- package/components/button.html +40 -0
- package/components/card.html +68 -0
- package/components/checkbox.html +32 -0
- package/components/dropdown.html +32 -0
- package/components/input.html +42 -0
- package/components/modal.html +47 -0
- package/components/popover.html +28 -0
- package/components/progress.html +46 -0
- package/components/radio.html +37 -0
- package/components/separator.html +27 -0
- package/components/sheet.html +73 -0
- package/components/skeleton.html +46 -0
- package/components/slider.html +56 -0
- package/components/table.html +75 -0
- package/components/tabs.html +59 -0
- package/components/toast.html +14 -0
- package/components/toggle.html +33 -0
- package/components/tooltip.html +32 -0
- package/package.json +2 -1
package/bin/cli.js
CHANGED
|
@@ -35,7 +35,7 @@ function loadRegistry() {
|
|
|
35
35
|
function loadConfig() {
|
|
36
36
|
const configPath = resolve(process.cwd(), "components.json")
|
|
37
37
|
if (!existsSync(configPath)) {
|
|
38
|
-
error("components.json not found. Run `ui-library init` first.")
|
|
38
|
+
error("components.json not found. Run `npx @skutally/ui-library init` first.")
|
|
39
39
|
}
|
|
40
40
|
return JSON.parse(readFileSync(configPath, "utf-8"))
|
|
41
41
|
}
|
|
@@ -75,14 +75,14 @@ function cmdInit() {
|
|
|
75
75
|
console.log(` ${c.dim}Build CSS:${c.reset} npx @tailwindcss/cli -i src/base.css -o dist/output.css --watch`)
|
|
76
76
|
console.log()
|
|
77
77
|
console.log(` ${c.dim}Add components:${c.reset}`)
|
|
78
|
-
console.log(` ${c.bold}npx ui-library add button${c.reset}`)
|
|
79
|
-
console.log(` ${c.bold}npx ui-library add modal accordion${c.reset}`)
|
|
78
|
+
console.log(` ${c.bold}npx @skutally/ui-library add button${c.reset}`)
|
|
79
|
+
console.log(` ${c.bold}npx @skutally/ui-library add modal accordion${c.reset}`)
|
|
80
80
|
console.log()
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
function cmdAdd(componentNames) {
|
|
84
84
|
if (componentNames.length === 0) {
|
|
85
|
-
error("Please specify at least one component. Example: ui-library add button")
|
|
85
|
+
error("Please specify at least one component. Example: npx @skutally/ui-library add button")
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
const registry = loadRegistry()
|
|
@@ -187,13 +187,13 @@ function cmdList() {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
console.log()
|
|
190
|
-
console.log(`${c.dim}Usage: ui-library add <component> [component...]${c.reset}`)
|
|
190
|
+
console.log(`${c.dim}Usage: npx @skutally/ui-library add <component> [component...]${c.reset}`)
|
|
191
191
|
console.log()
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
function cmdDiff(componentNames) {
|
|
195
195
|
if (componentNames.length === 0) {
|
|
196
|
-
error("Please specify at least one component. Example: ui-library diff button")
|
|
196
|
+
error("Please specify at least one component. Example: npx @skutally/ui-library diff button")
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
const registry = loadRegistry()
|
|
@@ -253,20 +253,20 @@ switch (command) {
|
|
|
253
253
|
case "-h":
|
|
254
254
|
case undefined:
|
|
255
255
|
console.log(`
|
|
256
|
-
${c.bold}ui-library${c.reset} — UI components for Stimulus + Tailwind
|
|
256
|
+
${c.bold}@skutally/ui-library${c.reset} — UI components for Stimulus + Tailwind
|
|
257
257
|
|
|
258
258
|
${c.bold}Usage:${c.reset}
|
|
259
|
-
ui-library init Initialize project (creates components.json, base CSS, tailwind config)
|
|
260
|
-
ui-library add <name> [name...] Add component(s) to your project
|
|
261
|
-
ui-library list List all available components
|
|
262
|
-
ui-library diff <name> Check if a local component differs from the registry
|
|
259
|
+
npx @skutally/ui-library init Initialize project (creates components.json, base CSS, tailwind config)
|
|
260
|
+
npx @skutally/ui-library add <name> [name...] Add component(s) to your project
|
|
261
|
+
npx @skutally/ui-library list List all available components
|
|
262
|
+
npx @skutally/ui-library diff <name> Check if a local component differs from the registry
|
|
263
263
|
|
|
264
264
|
${c.bold}Examples:${c.reset}
|
|
265
|
-
ui-library init
|
|
266
|
-
ui-library add button modal accordion
|
|
267
|
-
ui-library list
|
|
265
|
+
npx @skutally/ui-library init
|
|
266
|
+
npx @skutally/ui-library add button modal accordion
|
|
267
|
+
npx @skutally/ui-library list
|
|
268
268
|
`)
|
|
269
269
|
break
|
|
270
270
|
default:
|
|
271
|
-
error(`Unknown command: "${command}". Run ui-library --help for usage.`)
|
|
271
|
+
error(`Unknown command: "${command}". Run npx @skutally/ui-library --help for usage.`)
|
|
272
272
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Accordion — each item has data-accordion-item for scoping -->
|
|
2
|
+
<div class="rounded-lg border border-border divide-y divide-border" data-controller="accordion">
|
|
3
|
+
<div data-accordion-item>
|
|
4
|
+
<button data-action="click->accordion#toggle" class="flex w-full items-center justify-between px-4 py-4 text-sm font-medium text-left hover:underline transition-all">
|
|
5
|
+
<span>Is it accessible?</span>
|
|
6
|
+
<svg data-accordion-target="icon" class="w-4 h-4 text-muted-foreground shrink-0 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
|
7
|
+
</button>
|
|
8
|
+
<div data-accordion-target="body" class="hidden px-4 pb-4 text-sm text-muted-foreground">
|
|
9
|
+
Yes. It adheres to the WAI-ARIA design pattern and supports keyboard navigation.
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div data-accordion-item>
|
|
13
|
+
<button data-action="click->accordion#toggle" class="flex w-full items-center justify-between px-4 py-4 text-sm font-medium text-left hover:underline transition-all">
|
|
14
|
+
<span>Is it styled?</span>
|
|
15
|
+
<svg data-accordion-target="icon" class="w-4 h-4 text-muted-foreground shrink-0 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
|
16
|
+
</button>
|
|
17
|
+
<div data-accordion-target="body" class="hidden px-4 pb-4 text-sm text-muted-foreground">
|
|
18
|
+
Yes. It comes with default styles that match the other components' aesthetic using Tailwind CSS utility classes.
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div data-accordion-item>
|
|
22
|
+
<button data-action="click->accordion#toggle" class="flex w-full items-center justify-between px-4 py-4 text-sm font-medium text-left hover:underline transition-all">
|
|
23
|
+
<span>Is it animated?</span>
|
|
24
|
+
<svg data-accordion-target="icon" class="w-4 h-4 text-muted-foreground shrink-0 transition-transform duration-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
|
25
|
+
</button>
|
|
26
|
+
<div data-accordion-target="body" class="hidden px-4 pb-4 text-sm text-muted-foreground">
|
|
27
|
+
Yes. It uses CSS transitions for smooth open/close animations with rotate transforms on the chevron icon.
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Alert variants -->
|
|
2
|
+
<div class="space-y-3">
|
|
3
|
+
<div data-controller="alert" data-alert-variant-value="info">
|
|
4
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
5
|
+
<div><strong class="font-semibold">Heads up!</strong> You can add components to your app using the CLI.</div>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div data-controller="alert" data-alert-variant-value="success">
|
|
9
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
10
|
+
<div><strong class="font-semibold">Success!</strong> Your changes have been saved.</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div data-controller="alert" data-alert-variant-value="warning">
|
|
14
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>
|
|
15
|
+
<div><strong class="font-semibold">Warning!</strong> Your storage is almost full.</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div data-controller="alert" data-alert-variant-value="danger">
|
|
19
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
20
|
+
<div><strong class="font-semibold">Error!</strong> Something went wrong. Please try again.</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- Avatar examples -->
|
|
2
|
+
<div class="flex flex-wrap items-center gap-4">
|
|
3
|
+
<!-- With image -->
|
|
4
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full">
|
|
5
|
+
<img class="aspect-square h-full w-full" src="https://api.dicebear.com/7.x/avataaars/svg?seed=Jane" alt="@jane" />
|
|
6
|
+
</span>
|
|
7
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full">
|
|
8
|
+
<img class="aspect-square h-full w-full" src="https://api.dicebear.com/7.x/avataaars/svg?seed=John" alt="@john" />
|
|
9
|
+
</span>
|
|
10
|
+
|
|
11
|
+
<!-- Fallback with initials -->
|
|
12
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
13
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-sm font-medium">CN</span>
|
|
14
|
+
</span>
|
|
15
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
16
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-sm font-medium">AB</span>
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Sizes -->
|
|
21
|
+
<div class="flex flex-wrap items-center gap-4">
|
|
22
|
+
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
23
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-xs font-medium">SM</span>
|
|
24
|
+
</span>
|
|
25
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
26
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-sm font-medium">MD</span>
|
|
27
|
+
</span>
|
|
28
|
+
<span class="relative flex h-12 w-12 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
29
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-base font-medium">LG</span>
|
|
30
|
+
</span>
|
|
31
|
+
<span class="relative flex h-16 w-16 shrink-0 overflow-hidden rounded-full bg-muted">
|
|
32
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-lg font-medium">XL</span>
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Avatar group -->
|
|
37
|
+
<div class="flex -space-x-3">
|
|
38
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-muted">
|
|
39
|
+
<img class="aspect-square h-full w-full" src="https://api.dicebear.com/7.x/avataaars/svg?seed=Alice" alt="Alice" />
|
|
40
|
+
</span>
|
|
41
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-muted">
|
|
42
|
+
<img class="aspect-square h-full w-full" src="https://api.dicebear.com/7.x/avataaars/svg?seed=Bob" alt="Bob" />
|
|
43
|
+
</span>
|
|
44
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-muted">
|
|
45
|
+
<img class="aspect-square h-full w-full" src="https://api.dicebear.com/7.x/avataaars/svg?seed=Charlie" alt="Charlie" />
|
|
46
|
+
</span>
|
|
47
|
+
<span class="relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-background bg-muted">
|
|
48
|
+
<span class="flex h-full w-full items-center justify-center rounded-full text-xs font-medium">+3</span>
|
|
49
|
+
</span>
|
|
50
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Variants -->
|
|
2
|
+
<div class="flex flex-wrap gap-2">
|
|
3
|
+
<span data-controller="badge" data-badge-variant-value="default">Default</span>
|
|
4
|
+
<span data-controller="badge" data-badge-variant-value="secondary">Secondary</span>
|
|
5
|
+
<span data-controller="badge" data-badge-variant-value="success">Success</span>
|
|
6
|
+
<span data-controller="badge" data-badge-variant-value="warning">Warning</span>
|
|
7
|
+
<span data-controller="badge" data-badge-variant-value="danger">Danger</span>
|
|
8
|
+
<span data-controller="badge" data-badge-variant-value="info">Info</span>
|
|
9
|
+
<span data-controller="badge" data-badge-variant-value="outline">Outline</span>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<!-- With status dot -->
|
|
13
|
+
<div class="flex flex-wrap gap-2">
|
|
14
|
+
<span data-controller="badge" data-badge-variant-value="success" data-badge-dot-value="true">Active</span>
|
|
15
|
+
<span data-controller="badge" data-badge-variant-value="warning" data-badge-dot-value="true">Pending</span>
|
|
16
|
+
<span data-controller="badge" data-badge-variant-value="danger" data-badge-dot-value="true">Offline</span>
|
|
17
|
+
<span data-controller="badge" data-badge-variant-value="outline" data-badge-dot-value="true">Archived</span>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Breadcrumb navigation -->
|
|
2
|
+
<div class="space-y-6">
|
|
3
|
+
<!-- Simple breadcrumb -->
|
|
4
|
+
<nav aria-label="Breadcrumb">
|
|
5
|
+
<ol class="flex items-center gap-1.5 text-sm text-muted-foreground">
|
|
6
|
+
<li><a href="#" class="hover:text-foreground transition-colors">Home</a></li>
|
|
7
|
+
<li>
|
|
8
|
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
|
|
9
|
+
</li>
|
|
10
|
+
<li><a href="#" class="hover:text-foreground transition-colors">Components</a></li>
|
|
11
|
+
<li>
|
|
12
|
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="text-foreground font-medium">Breadcrumb</li>
|
|
15
|
+
</ol>
|
|
16
|
+
</nav>
|
|
17
|
+
|
|
18
|
+
<!-- With icons -->
|
|
19
|
+
<nav aria-label="Breadcrumb">
|
|
20
|
+
<ol class="flex items-center gap-1.5 text-sm text-muted-foreground">
|
|
21
|
+
<li>
|
|
22
|
+
<a href="#" class="flex items-center gap-1.5 hover:text-foreground transition-colors">
|
|
23
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/></svg>
|
|
24
|
+
Home
|
|
25
|
+
</a>
|
|
26
|
+
</li>
|
|
27
|
+
<li><span class="text-muted-foreground/50">/</span></li>
|
|
28
|
+
<li><a href="#" class="hover:text-foreground transition-colors">Settings</a></li>
|
|
29
|
+
<li><span class="text-muted-foreground/50">/</span></li>
|
|
30
|
+
<li class="text-foreground font-medium">Profile</li>
|
|
31
|
+
</ol>
|
|
32
|
+
</nav>
|
|
33
|
+
|
|
34
|
+
<!-- With ellipsis for deep paths -->
|
|
35
|
+
<nav aria-label="Breadcrumb">
|
|
36
|
+
<ol class="flex items-center gap-1.5 text-sm text-muted-foreground">
|
|
37
|
+
<li><a href="#" class="hover:text-foreground transition-colors">Home</a></li>
|
|
38
|
+
<li>
|
|
39
|
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
|
|
40
|
+
</li>
|
|
41
|
+
<li>
|
|
42
|
+
<span class="flex h-9 w-9 items-center justify-center">
|
|
43
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01"/></svg>
|
|
44
|
+
</span>
|
|
45
|
+
</li>
|
|
46
|
+
<li>
|
|
47
|
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
|
|
48
|
+
</li>
|
|
49
|
+
<li><a href="#" class="hover:text-foreground transition-colors">Components</a></li>
|
|
50
|
+
<li>
|
|
51
|
+
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/></svg>
|
|
52
|
+
</li>
|
|
53
|
+
<li class="text-foreground font-medium">Breadcrumb</li>
|
|
54
|
+
</ol>
|
|
55
|
+
</nav>
|
|
56
|
+
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- Button — Variants -->
|
|
2
|
+
<div class="flex flex-wrap gap-2">
|
|
3
|
+
<button data-controller="button" data-button-variant-value="default">Primary</button>
|
|
4
|
+
<button data-controller="button" data-button-variant-value="secondary">Secondary</button>
|
|
5
|
+
<button data-controller="button" data-button-variant-value="destructive">Destructive</button>
|
|
6
|
+
<button data-controller="button" data-button-variant-value="outline">Outline</button>
|
|
7
|
+
<button data-controller="button" data-button-variant-value="ghost">Ghost</button>
|
|
8
|
+
<button data-controller="button" data-button-variant-value="link">Link</button>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Sizes -->
|
|
12
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
13
|
+
<button data-controller="button" data-button-size-value="xs">Extra Small</button>
|
|
14
|
+
<button data-controller="button" data-button-size-value="sm">Small</button>
|
|
15
|
+
<button data-controller="button">Default</button>
|
|
16
|
+
<button data-controller="button" data-button-size-value="lg">Large</button>
|
|
17
|
+
<button data-controller="button" data-button-size-value="xl">Extra Large</button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- With Icons -->
|
|
21
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
22
|
+
<button data-controller="button" data-button-variant-value="default">
|
|
23
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/></svg>
|
|
24
|
+
Upload
|
|
25
|
+
</button>
|
|
26
|
+
<button data-controller="button" data-button-variant-value="outline">
|
|
27
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
|
|
28
|
+
Login with Email
|
|
29
|
+
</button>
|
|
30
|
+
<button data-controller="button" data-button-size-value="icon" data-button-variant-value="outline">
|
|
31
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/></svg>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Loading & Disabled -->
|
|
36
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
37
|
+
<button data-controller="button" data-button-loading-value="true" data-button-loading-text-value="Please wait...">Submit</button>
|
|
38
|
+
<button data-controller="button" data-button-clickable-value="true" data-button-loading-text-value="Saving...">Click me</button>
|
|
39
|
+
<button disabled data-controller="button">Disabled</button>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!-- Card examples -->
|
|
2
|
+
<div class="grid md:grid-cols-2 gap-4">
|
|
3
|
+
<!-- Basic Card -->
|
|
4
|
+
<div data-controller="card">
|
|
5
|
+
<div class="flex flex-col space-y-1.5 p-6">
|
|
6
|
+
<h3 class="text-2xl font-semibold leading-none tracking-tight">Create project</h3>
|
|
7
|
+
<p class="text-sm text-muted-foreground">Deploy your new project in one-click.</p>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="p-6 pt-0 space-y-4">
|
|
10
|
+
<div>
|
|
11
|
+
<label class="text-sm font-medium mb-1.5 block">Name</label>
|
|
12
|
+
<input data-controller="input" type="text" placeholder="Name of your project"/>
|
|
13
|
+
</div>
|
|
14
|
+
<div>
|
|
15
|
+
<label class="text-sm font-medium mb-1.5 block">Framework</label>
|
|
16
|
+
<select data-controller="input">
|
|
17
|
+
<option>Next.js</option>
|
|
18
|
+
<option>SvelteKit</option>
|
|
19
|
+
<option>Astro</option>
|
|
20
|
+
<option>Nuxt.js</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="flex items-center p-6 pt-0 gap-2">
|
|
25
|
+
<button data-controller="button" data-button-variant-value="outline">Cancel</button>
|
|
26
|
+
<button data-controller="button">Deploy</button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- Notification Card -->
|
|
31
|
+
<div data-controller="card">
|
|
32
|
+
<div class="flex flex-col space-y-1.5 p-6">
|
|
33
|
+
<h3 class="text-2xl font-semibold leading-none tracking-tight">Notifications</h3>
|
|
34
|
+
<p class="text-sm text-muted-foreground">You have 3 unread messages.</p>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="p-6 pt-0">
|
|
37
|
+
<div class="space-y-4">
|
|
38
|
+
<div class="flex items-start gap-4">
|
|
39
|
+
<span class="w-2 h-2 rounded-full bg-blue-500 mt-2 shrink-0"></span>
|
|
40
|
+
<div class="space-y-1">
|
|
41
|
+
<p class="text-sm font-medium leading-none">Your call has been confirmed.</p>
|
|
42
|
+
<p class="text-sm text-muted-foreground">1 hour ago</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="flex items-start gap-4">
|
|
46
|
+
<span class="w-2 h-2 rounded-full bg-blue-500 mt-2 shrink-0"></span>
|
|
47
|
+
<div class="space-y-1">
|
|
48
|
+
<p class="text-sm font-medium leading-none">You have a new message!</p>
|
|
49
|
+
<p class="text-sm text-muted-foreground">2 hours ago</p>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="flex items-start gap-4">
|
|
53
|
+
<span class="w-2 h-2 rounded-full bg-muted-foreground mt-2 shrink-0"></span>
|
|
54
|
+
<div class="space-y-1">
|
|
55
|
+
<p class="text-sm font-medium leading-none">Your subscription is expiring soon!</p>
|
|
56
|
+
<p class="text-sm text-muted-foreground">5 hours ago</p>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="p-6 pt-0">
|
|
62
|
+
<button data-controller="button" class="w-full">
|
|
63
|
+
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
|
|
64
|
+
Mark all as read
|
|
65
|
+
</button>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- Checkbox examples -->
|
|
2
|
+
<div class="space-y-4">
|
|
3
|
+
<!-- Default unchecked -->
|
|
4
|
+
<div class="flex items-center gap-3" data-controller="checkbox">
|
|
5
|
+
<button role="checkbox" aria-checked="false" data-action="click->checkbox#toggle"
|
|
6
|
+
class="h-4 w-4 shrink-0 rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 flex items-center justify-center transition-colors">
|
|
7
|
+
<svg data-checkbox-target="icon" class="hidden h-3 w-3" fill="none" stroke="currentColor" stroke-width="3" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
|
|
8
|
+
</button>
|
|
9
|
+
<label class="text-sm font-medium leading-none cursor-pointer" data-action="click->checkbox#toggle">Accept terms and conditions</label>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<!-- Pre-checked -->
|
|
13
|
+
<div class="flex items-center gap-3" data-controller="checkbox" data-checkbox-checked-value="true">
|
|
14
|
+
<button role="checkbox" aria-checked="true" data-action="click->checkbox#toggle"
|
|
15
|
+
class="h-4 w-4 shrink-0 rounded-sm border border-primary bg-primary text-primary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 flex items-center justify-center transition-colors">
|
|
16
|
+
<svg data-checkbox-target="icon" class="h-3 w-3" fill="none" stroke="currentColor" stroke-width="3" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
|
|
17
|
+
</button>
|
|
18
|
+
<label class="text-sm font-medium leading-none cursor-pointer" data-action="click->checkbox#toggle">Send me marketing emails</label>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- With description -->
|
|
22
|
+
<div class="flex items-start gap-3" data-controller="checkbox">
|
|
23
|
+
<button role="checkbox" aria-checked="false" data-action="click->checkbox#toggle"
|
|
24
|
+
class="mt-0.5 h-4 w-4 shrink-0 rounded-sm border border-border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 flex items-center justify-center transition-colors">
|
|
25
|
+
<svg data-checkbox-target="icon" class="hidden h-3 w-3" fill="none" stroke="currentColor" stroke-width="3" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>
|
|
26
|
+
</button>
|
|
27
|
+
<div>
|
|
28
|
+
<label class="text-sm font-medium leading-none cursor-pointer" data-action="click->checkbox#toggle">Use different settings for mobile</label>
|
|
29
|
+
<p class="text-sm text-muted-foreground mt-1">You can manage your mobile notifications in the settings page.</p>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- Dropdown Menu -->
|
|
2
|
+
<div class="relative inline-block" data-controller="dropdown">
|
|
3
|
+
<button data-action="click->dropdown#toggle" data-controller="button" data-button-variant-value="outline">
|
|
4
|
+
Open Menu
|
|
5
|
+
<svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
|
6
|
+
</button>
|
|
7
|
+
<div data-dropdown-target="menu" class="hidden opacity-0 scale-95 absolute left-0 top-full mt-2 w-56 rounded-md border border-border bg-background shadow-md z-50 p-1 transition-all duration-100">
|
|
8
|
+
<div class="px-2 py-1.5 text-sm font-semibold">My Account</div>
|
|
9
|
+
<div class="h-px bg-border my-1 -mx-1"></div>
|
|
10
|
+
<a href="#" class="relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground transition-colors">
|
|
11
|
+
<svg class="w-4 h-4 mr-2 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
|
|
12
|
+
Profile
|
|
13
|
+
<span class="ml-auto text-xs text-muted-foreground">⇧⌘P</span>
|
|
14
|
+
</a>
|
|
15
|
+
<a href="#" class="relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground transition-colors">
|
|
16
|
+
<svg class="w-4 h-4 mr-2 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
|
|
17
|
+
Settings
|
|
18
|
+
<span class="ml-auto text-xs text-muted-foreground">⌘S</span>
|
|
19
|
+
</a>
|
|
20
|
+
<a href="#" class="relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground transition-colors">
|
|
21
|
+
<svg class="w-4 h-4 mr-2 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/></svg>
|
|
22
|
+
Billing
|
|
23
|
+
<span class="ml-auto text-xs text-muted-foreground">⌘B</span>
|
|
24
|
+
</a>
|
|
25
|
+
<div class="h-px bg-border my-1 -mx-1"></div>
|
|
26
|
+
<a href="#" class="relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none text-red-600 hover:bg-red-50 dark:hover:bg-red-950 transition-colors">
|
|
27
|
+
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"/></svg>
|
|
28
|
+
Log out
|
|
29
|
+
<span class="ml-auto text-xs text-muted-foreground">⇧⌘Q</span>
|
|
30
|
+
</a>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!-- Default -->
|
|
2
|
+
<div class="grid gap-4 max-w-sm">
|
|
3
|
+
<div>
|
|
4
|
+
<label class="text-sm font-medium leading-none mb-2 block">Email</label>
|
|
5
|
+
<input data-controller="input" type="email" placeholder="name@example.com"/>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<!-- With icon -->
|
|
9
|
+
<div>
|
|
10
|
+
<label class="text-sm font-medium leading-none mb-2 block">Search</label>
|
|
11
|
+
<div class="relative">
|
|
12
|
+
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
|
|
13
|
+
<input data-controller="input" data-input-icon-value="true" type="text" placeholder="Search..."/>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Error state -->
|
|
18
|
+
<div>
|
|
19
|
+
<label class="text-sm font-medium leading-none mb-2 block">Email</label>
|
|
20
|
+
<input data-controller="input" data-input-variant-value="error" type="email" value="invalid-email"/>
|
|
21
|
+
<p class="text-sm text-red-500 mt-1.5">Please enter a valid email address.</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<!-- Success state -->
|
|
25
|
+
<div>
|
|
26
|
+
<label class="text-sm font-medium leading-none mb-2 block">Username</label>
|
|
27
|
+
<input data-controller="input" data-input-variant-value="success" type="text" value="johndoe"/>
|
|
28
|
+
<p class="text-sm text-emerald-600 mt-1.5">Username is available!</p>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- Disabled -->
|
|
32
|
+
<div>
|
|
33
|
+
<label class="text-sm font-medium leading-none mb-2 block text-muted-foreground">Disabled</label>
|
|
34
|
+
<input data-controller="input" disabled value="Cannot edit"/>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- Textarea -->
|
|
38
|
+
<div>
|
|
39
|
+
<label class="text-sm font-medium leading-none mb-2 block">Message</label>
|
|
40
|
+
<textarea data-controller="input" rows="3" placeholder="Type your message here..."></textarea>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- Edit Profile Dialog -->
|
|
2
|
+
<div class="flex flex-wrap gap-3" >
|
|
3
|
+
<div data-controller="modal">
|
|
4
|
+
<button data-action="click->modal#open" data-controller="button" data-button-variant-value="outline">Edit Profile</button>
|
|
5
|
+
<div data-modal-target="overlay" class="hidden opacity-0 fixed inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-200" data-action="click->modal#backdrop">
|
|
6
|
+
<div class="absolute inset-0 bg-black/80"></div>
|
|
7
|
+
<div data-modal-target="box" class="relative bg-background border border-border rounded-lg shadow-lg w-full max-w-lg scale-95 opacity-0 transition-all duration-200">
|
|
8
|
+
<div class="flex flex-col space-y-1.5 px-6 pt-6">
|
|
9
|
+
<h3 class="text-lg font-semibold leading-none tracking-tight">Edit profile</h3>
|
|
10
|
+
<p class="text-sm text-muted-foreground">Make changes to your profile here. Click save when you're done.</p>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="px-6 py-4 space-y-4">
|
|
13
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
|
14
|
+
<label class="text-sm font-medium text-right">Name</label>
|
|
15
|
+
<input data-controller="input" type="text" value="Pedro Duarte" class="col-span-3"/>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="grid grid-cols-4 items-center gap-4">
|
|
18
|
+
<label class="text-sm font-medium text-right">Username</label>
|
|
19
|
+
<input data-controller="input" type="text" value="@peduarte" class="col-span-3"/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="flex justify-end gap-2 px-6 pb-6">
|
|
23
|
+
<button data-action="click->modal#close" data-controller="button" data-button-variant-value="outline" data-button-size-value="sm">Cancel</button>
|
|
24
|
+
<button data-action="click->modal#close" data-controller="button" data-button-size-value="sm">Save changes</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- Delete Confirmation Dialog -->
|
|
31
|
+
<div data-controller="modal">
|
|
32
|
+
<button data-action="click->modal#open" data-controller="button" data-button-variant-value="destructive">Delete Account</button>
|
|
33
|
+
<div data-modal-target="overlay" class="hidden opacity-0 fixed inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-200" data-action="click->modal#backdrop">
|
|
34
|
+
<div class="absolute inset-0 bg-black/80"></div>
|
|
35
|
+
<div data-modal-target="box" class="relative bg-background border border-border rounded-lg shadow-lg w-full max-w-md scale-95 opacity-0 transition-all duration-200">
|
|
36
|
+
<div class="px-6 pt-6">
|
|
37
|
+
<h3 class="text-lg font-semibold leading-none tracking-tight">Are you absolutely sure?</h3>
|
|
38
|
+
<p class="text-sm text-muted-foreground mt-2">This action cannot be undone. This will permanently delete your account and remove your data from our servers.</p>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="flex justify-end gap-2 px-6 py-6">
|
|
41
|
+
<button data-action="click->modal#close" data-controller="button" data-button-variant-value="outline" data-button-size-value="sm">Cancel</button>
|
|
42
|
+
<button data-action="click->modal#close" data-controller="button" data-button-variant-value="destructive" data-button-size-value="sm">Delete account</button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Popover -->
|
|
2
|
+
<div class="flex flex-wrap gap-6">
|
|
3
|
+
<div class="relative inline-block" data-controller="popover">
|
|
4
|
+
<button data-action="click->popover#toggle" data-controller="button" data-button-variant-value="outline">Open Popover</button>
|
|
5
|
+
<div data-popover-target="content" class="hidden opacity-0 scale-95 absolute left-0 top-full mt-2 w-80 rounded-md border border-border bg-background shadow-md z-50 transition-all duration-100">
|
|
6
|
+
<div class="p-4 space-y-4">
|
|
7
|
+
<div class="space-y-2">
|
|
8
|
+
<h4 class="font-medium leading-none">Dimensions</h4>
|
|
9
|
+
<p class="text-sm text-muted-foreground">Set the dimensions for the layer.</p>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="grid gap-3">
|
|
12
|
+
<div class="grid grid-cols-3 items-center gap-4">
|
|
13
|
+
<label class="text-sm font-medium">Width</label>
|
|
14
|
+
<input data-controller="input" type="text" value="100%" class="col-span-2"/>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="grid grid-cols-3 items-center gap-4">
|
|
17
|
+
<label class="text-sm font-medium">Height</label>
|
|
18
|
+
<input data-controller="input" type="text" value="25px" class="col-span-2"/>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="grid grid-cols-3 items-center gap-4">
|
|
21
|
+
<label class="text-sm font-medium">Max. width</label>
|
|
22
|
+
<input data-controller="input" type="text" value="300px" class="col-span-2"/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- Progress bars -->
|
|
2
|
+
<div class="space-y-6 max-w-md">
|
|
3
|
+
<!-- Default -->
|
|
4
|
+
<div>
|
|
5
|
+
<div class="flex items-center justify-between mb-2">
|
|
6
|
+
<span class="text-sm font-medium">Progress</span>
|
|
7
|
+
<span class="text-sm text-muted-foreground">60%</span>
|
|
8
|
+
</div>
|
|
9
|
+
<div data-controller="progress" data-progress-value-value="60" class="relative h-4 w-full overflow-hidden rounded-full bg-muted" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
10
|
+
<div data-progress-target="bar" class="h-full rounded-full bg-primary transition-all duration-500" style="width: 0%"></div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<!-- Small -->
|
|
15
|
+
<div>
|
|
16
|
+
<div class="flex items-center justify-between mb-2">
|
|
17
|
+
<span class="text-sm font-medium">Upload</span>
|
|
18
|
+
<span class="text-sm text-muted-foreground">33%</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div data-controller="progress" data-progress-value-value="33" class="relative h-2 w-full overflow-hidden rounded-full bg-muted" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
21
|
+
<div data-progress-target="bar" class="h-full rounded-full bg-blue-500 transition-all duration-500" style="width: 0%"></div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- Success -->
|
|
26
|
+
<div>
|
|
27
|
+
<div class="flex items-center justify-between mb-2">
|
|
28
|
+
<span class="text-sm font-medium">Complete</span>
|
|
29
|
+
<span class="text-sm text-muted-foreground">100%</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div data-controller="progress" data-progress-value-value="100" class="relative h-2 w-full overflow-hidden rounded-full bg-muted" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
32
|
+
<div data-progress-target="bar" class="h-full rounded-full bg-emerald-500 transition-all duration-500" style="width: 0%"></div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Warning -->
|
|
37
|
+
<div>
|
|
38
|
+
<div class="flex items-center justify-between mb-2">
|
|
39
|
+
<span class="text-sm font-medium">Storage</span>
|
|
40
|
+
<span class="text-sm text-muted-foreground">85%</span>
|
|
41
|
+
</div>
|
|
42
|
+
<div data-controller="progress" data-progress-value-value="85" class="relative h-2 w-full overflow-hidden rounded-full bg-muted" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
43
|
+
<div data-progress-target="bar" class="h-full rounded-full bg-amber-500 transition-all duration-500" style="width: 0%"></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- Radio Group -->
|
|
2
|
+
<div data-controller="radio" data-radio-selected-value="0" class="space-y-3">
|
|
3
|
+
<label class="text-sm font-medium">Choose a plan</label>
|
|
4
|
+
|
|
5
|
+
<div data-action="click->radio#select" data-radio-target="option"
|
|
6
|
+
class="flex items-center gap-3 cursor-pointer">
|
|
7
|
+
<span data-radio-target="dot" class="h-4 w-4 rounded-full border-2 border-primary flex items-center justify-center shrink-0 transition-colors">
|
|
8
|
+
<span class="h-2 w-2 rounded-full bg-primary"></span>
|
|
9
|
+
</span>
|
|
10
|
+
<div>
|
|
11
|
+
<p class="text-sm font-medium">Free</p>
|
|
12
|
+
<p class="text-sm text-muted-foreground">Up to 3 projects, basic features.</p>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div data-action="click->radio#select" data-radio-target="option"
|
|
17
|
+
class="flex items-center gap-3 cursor-pointer">
|
|
18
|
+
<span data-radio-target="dot" class="h-4 w-4 rounded-full border-2 border-border flex items-center justify-center shrink-0 transition-colors">
|
|
19
|
+
<span class="hidden h-2 w-2 rounded-full bg-primary"></span>
|
|
20
|
+
</span>
|
|
21
|
+
<div>
|
|
22
|
+
<p class="text-sm font-medium">Pro</p>
|
|
23
|
+
<p class="text-sm text-muted-foreground">Unlimited projects, priority support.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div data-action="click->radio#select" data-radio-target="option"
|
|
28
|
+
class="flex items-center gap-3 cursor-pointer">
|
|
29
|
+
<span data-radio-target="dot" class="h-4 w-4 rounded-full border-2 border-border flex items-center justify-center shrink-0 transition-colors">
|
|
30
|
+
<span class="hidden h-2 w-2 rounded-full bg-primary"></span>
|
|
31
|
+
</span>
|
|
32
|
+
<div>
|
|
33
|
+
<p class="text-sm font-medium">Enterprise</p>
|
|
34
|
+
<p class="text-sm text-muted-foreground">Custom solutions, dedicated account manager.</p>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Separator / Divider -->
|
|
2
|
+
<div class="space-y-6">
|
|
3
|
+
<div>
|
|
4
|
+
<h4 class="text-sm font-medium mb-1">Ui library</h4>
|
|
5
|
+
<p class="text-sm text-muted-foreground">An open-source UI component library.</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<!-- Horizontal separator -->
|
|
9
|
+
<div class="shrink-0 bg-border h-[1px] w-full" role="separator"></div>
|
|
10
|
+
|
|
11
|
+
<div class="flex items-center gap-4 h-5">
|
|
12
|
+
<a href="#" class="text-sm font-medium hover:underline">Blog</a>
|
|
13
|
+
<!-- Vertical separator -->
|
|
14
|
+
<div class="shrink-0 bg-border w-[1px] h-full" role="separator" aria-orientation="vertical"></div>
|
|
15
|
+
<a href="#" class="text-sm font-medium hover:underline">Docs</a>
|
|
16
|
+
<div class="shrink-0 bg-border w-[1px] h-full" role="separator" aria-orientation="vertical"></div>
|
|
17
|
+
<a href="#" class="text-sm font-medium hover:underline">Source</a>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- Separator with label -->
|
|
21
|
+
<div class="relative">
|
|
22
|
+
<div class="absolute inset-0 flex items-center"><div class="w-full border-t border-border"></div></div>
|
|
23
|
+
<div class="relative flex justify-center text-xs uppercase">
|
|
24
|
+
<span class="bg-background px-2 text-muted-foreground">Or continue with</span>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!-- Sheet / Drawer -->
|
|
2
|
+
<div class="flex flex-wrap gap-3">
|
|
3
|
+
<!-- Right sheet -->
|
|
4
|
+
<div data-controller="sheet" data-sheet-side-value="right">
|
|
5
|
+
<button data-action="click->sheet#open" data-controller="button" data-button-variant-value="outline">Open Sheet</button>
|
|
6
|
+
<div data-sheet-target="overlay" class="hidden opacity-0 fixed inset-0 z-50 transition-opacity duration-300" data-action="click->sheet#backdrop">
|
|
7
|
+
<div class="absolute inset-0 bg-black/80"></div>
|
|
8
|
+
<div data-sheet-target="panel" class="fixed inset-y-0 right-0 w-full max-w-sm bg-background border-l border-border shadow-lg translate-x-full transition-transform duration-300 ease-in-out">
|
|
9
|
+
<div class="flex flex-col h-full">
|
|
10
|
+
<div class="flex items-center justify-between px-6 py-4 border-b border-border">
|
|
11
|
+
<div>
|
|
12
|
+
<h3 class="text-lg font-semibold">Edit profile</h3>
|
|
13
|
+
<p class="text-sm text-muted-foreground">Make changes to your profile here.</p>
|
|
14
|
+
</div>
|
|
15
|
+
<button data-action="click->sheet#close" class="rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none">
|
|
16
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="flex-1 overflow-y-auto px-6 py-4 space-y-4">
|
|
20
|
+
<div>
|
|
21
|
+
<label class="text-sm font-medium mb-1.5 block">Name</label>
|
|
22
|
+
<input data-controller="input" type="text" value="Pedro Duarte"/>
|
|
23
|
+
</div>
|
|
24
|
+
<div>
|
|
25
|
+
<label class="text-sm font-medium mb-1.5 block">Username</label>
|
|
26
|
+
<input data-controller="input" type="text" value="@peduarte"/>
|
|
27
|
+
</div>
|
|
28
|
+
<div>
|
|
29
|
+
<label class="text-sm font-medium mb-1.5 block">Bio</label>
|
|
30
|
+
<textarea data-controller="input" rows="3" placeholder="Tell us about yourself"></textarea>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="flex justify-end gap-2 px-6 py-4 border-t border-border">
|
|
34
|
+
<button data-action="click->sheet#close" data-controller="button" data-button-variant-value="outline">Cancel</button>
|
|
35
|
+
<button data-action="click->sheet#close" data-controller="button">Save changes</button>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- Left sheet -->
|
|
43
|
+
<div data-controller="sheet" data-sheet-side-value="left">
|
|
44
|
+
<button data-action="click->sheet#open" data-controller="button" data-button-variant-value="outline">Open Left Sheet</button>
|
|
45
|
+
<div data-sheet-target="overlay" class="hidden opacity-0 fixed inset-0 z-50 transition-opacity duration-300" data-action="click->sheet#backdrop">
|
|
46
|
+
<div class="absolute inset-0 bg-black/80"></div>
|
|
47
|
+
<div data-sheet-target="panel" class="fixed inset-y-0 left-0 w-full max-w-sm bg-background border-r border-border shadow-lg -translate-x-full transition-transform duration-300 ease-in-out">
|
|
48
|
+
<div class="flex flex-col h-full">
|
|
49
|
+
<div class="flex items-center justify-between px-6 py-4 border-b border-border">
|
|
50
|
+
<h3 class="text-lg font-semibold">Navigation</h3>
|
|
51
|
+
<button data-action="click->sheet#close" class="rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none">
|
|
52
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
|
|
53
|
+
</button>
|
|
54
|
+
</div>
|
|
55
|
+
<nav class="flex-1 px-4 py-4 space-y-1">
|
|
56
|
+
<a href="#" class="flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium bg-accent text-accent-foreground">
|
|
57
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/></svg>
|
|
58
|
+
Dashboard
|
|
59
|
+
</a>
|
|
60
|
+
<a href="#" class="flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors">
|
|
61
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7"/></svg>
|
|
62
|
+
Projects
|
|
63
|
+
</a>
|
|
64
|
+
<a href="#" class="flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors">
|
|
65
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
|
|
66
|
+
Settings
|
|
67
|
+
</a>
|
|
68
|
+
</nav>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- Skeleton loading states -->
|
|
2
|
+
<div class="space-y-8">
|
|
3
|
+
<!-- Card skeleton -->
|
|
4
|
+
<div class="rounded-lg border border-border p-6 space-y-4">
|
|
5
|
+
<div class="flex items-center gap-4">
|
|
6
|
+
<div class="h-12 w-12 rounded-full bg-muted animate-pulse"></div>
|
|
7
|
+
<div class="space-y-2 flex-1">
|
|
8
|
+
<div class="h-4 w-1/3 rounded-md bg-muted animate-pulse"></div>
|
|
9
|
+
<div class="h-3 w-1/4 rounded-md bg-muted animate-pulse"></div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="space-y-2">
|
|
13
|
+
<div class="h-3 w-full rounded-md bg-muted animate-pulse"></div>
|
|
14
|
+
<div class="h-3 w-full rounded-md bg-muted animate-pulse"></div>
|
|
15
|
+
<div class="h-3 w-2/3 rounded-md bg-muted animate-pulse"></div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<!-- List skeleton -->
|
|
20
|
+
<div class="rounded-lg border border-border divide-y divide-border">
|
|
21
|
+
<div class="flex items-center gap-4 p-4">
|
|
22
|
+
<div class="h-10 w-10 rounded-full bg-muted animate-pulse"></div>
|
|
23
|
+
<div class="space-y-2 flex-1">
|
|
24
|
+
<div class="h-4 w-1/4 rounded-md bg-muted animate-pulse"></div>
|
|
25
|
+
<div class="h-3 w-1/2 rounded-md bg-muted animate-pulse"></div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="h-8 w-16 rounded-md bg-muted animate-pulse"></div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex items-center gap-4 p-4">
|
|
30
|
+
<div class="h-10 w-10 rounded-full bg-muted animate-pulse"></div>
|
|
31
|
+
<div class="space-y-2 flex-1">
|
|
32
|
+
<div class="h-4 w-1/3 rounded-md bg-muted animate-pulse"></div>
|
|
33
|
+
<div class="h-3 w-2/5 rounded-md bg-muted animate-pulse"></div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="h-8 w-16 rounded-md bg-muted animate-pulse"></div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="flex items-center gap-4 p-4">
|
|
38
|
+
<div class="h-10 w-10 rounded-full bg-muted animate-pulse"></div>
|
|
39
|
+
<div class="space-y-2 flex-1">
|
|
40
|
+
<div class="h-4 w-1/5 rounded-md bg-muted animate-pulse"></div>
|
|
41
|
+
<div class="h-3 w-1/3 rounded-md bg-muted animate-pulse"></div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="h-8 w-16 rounded-md bg-muted animate-pulse"></div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Slider / Range Input -->
|
|
2
|
+
<div class="space-y-8 max-w-md">
|
|
3
|
+
<!-- Default slider -->
|
|
4
|
+
<div>
|
|
5
|
+
<div class="flex items-center justify-between mb-3">
|
|
6
|
+
<label class="text-sm font-medium">Volume</label>
|
|
7
|
+
<span data-slider-target="output" class="text-sm text-muted-foreground tabular-nums">50</span>
|
|
8
|
+
</div>
|
|
9
|
+
<div data-controller="slider" data-slider-min-value="0" data-slider-max-value="100" data-slider-val-value="50">
|
|
10
|
+
<div data-slider-target="track" data-action="mousedown->slider#startDrag touchstart->slider#startDrag"
|
|
11
|
+
class="relative w-full h-2 rounded-full bg-muted cursor-pointer">
|
|
12
|
+
<div data-slider-target="fill" class="absolute h-full rounded-full bg-primary" style="width: 50%"></div>
|
|
13
|
+
<div data-slider-target="thumb"
|
|
14
|
+
class="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab active:cursor-grabbing shadow"
|
|
15
|
+
style="left: 50%"
|
|
16
|
+
data-action="mousedown->slider#startDrag touchstart->slider#startDrag"></div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- Price range -->
|
|
22
|
+
<div>
|
|
23
|
+
<div class="flex items-center justify-between mb-3">
|
|
24
|
+
<label class="text-sm font-medium">Price</label>
|
|
25
|
+
<span class="text-sm text-muted-foreground">$<span data-slider-target="output" class="tabular-nums">25</span></span>
|
|
26
|
+
</div>
|
|
27
|
+
<div data-controller="slider" data-slider-min-value="0" data-slider-max-value="100" data-slider-val-value="25" data-slider-step-value="5">
|
|
28
|
+
<div data-slider-target="track" data-action="mousedown->slider#startDrag touchstart->slider#startDrag"
|
|
29
|
+
class="relative w-full h-2 rounded-full bg-muted cursor-pointer">
|
|
30
|
+
<div data-slider-target="fill" class="absolute h-full rounded-full bg-emerald-500" style="width: 25%"></div>
|
|
31
|
+
<div data-slider-target="thumb"
|
|
32
|
+
class="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 h-5 w-5 rounded-full border-2 border-emerald-500 bg-background ring-offset-background transition-colors focus-visible:outline-none cursor-grab active:cursor-grabbing shadow"
|
|
33
|
+
style="left: 25%"
|
|
34
|
+
data-action="mousedown->slider#startDrag touchstart->slider#startDrag"></div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<!-- Temperature -->
|
|
40
|
+
<div>
|
|
41
|
+
<div class="flex items-center justify-between mb-3">
|
|
42
|
+
<label class="text-sm font-medium">Temperature</label>
|
|
43
|
+
<span class="text-sm text-muted-foreground"><span data-slider-target="output" class="tabular-nums">0.7</span></span>
|
|
44
|
+
</div>
|
|
45
|
+
<div data-controller="slider" data-slider-min-value="0" data-slider-max-value="2" data-slider-val-value="0.7" data-slider-step-value="0.1">
|
|
46
|
+
<div data-slider-target="track" data-action="mousedown->slider#startDrag touchstart->slider#startDrag"
|
|
47
|
+
class="relative w-full h-2 rounded-full bg-muted cursor-pointer">
|
|
48
|
+
<div data-slider-target="fill" class="absolute h-full rounded-full bg-amber-500" style="width: 35%"></div>
|
|
49
|
+
<div data-slider-target="thumb"
|
|
50
|
+
class="absolute top-1/2 -translate-y-1/2 -translate-x-1/2 h-5 w-5 rounded-full border-2 border-amber-500 bg-background ring-offset-background transition-colors focus-visible:outline-none cursor-grab active:cursor-grabbing shadow"
|
|
51
|
+
style="left: 35%"
|
|
52
|
+
data-action="mousedown->slider#startDrag touchstart->slider#startDrag"></div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!-- Table with sortable headers -->
|
|
2
|
+
<div class="rounded-lg border border-border overflow-hidden" data-controller="table">
|
|
3
|
+
<table class="w-full caption-bottom text-sm">
|
|
4
|
+
<thead class="border-b border-border">
|
|
5
|
+
<tr class="border-b border-border transition-colors hover:bg-muted/50">
|
|
6
|
+
<th data-col="0" data-action="click->table#sort" data-table-target="header"
|
|
7
|
+
class="h-12 px-4 text-left align-middle font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none">
|
|
8
|
+
<div class="flex items-center gap-1">
|
|
9
|
+
Invoice
|
|
10
|
+
<svg data-sort-icon class="w-4 h-4 opacity-0 transition-all" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"/></svg>
|
|
11
|
+
</div>
|
|
12
|
+
</th>
|
|
13
|
+
<th data-col="1" data-action="click->table#sort" data-table-target="header"
|
|
14
|
+
class="h-12 px-4 text-left align-middle font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none">
|
|
15
|
+
<div class="flex items-center gap-1">
|
|
16
|
+
Status
|
|
17
|
+
<svg data-sort-icon class="w-4 h-4 opacity-0 transition-all" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"/></svg>
|
|
18
|
+
</div>
|
|
19
|
+
</th>
|
|
20
|
+
<th data-col="2" data-action="click->table#sort" data-table-target="header"
|
|
21
|
+
class="h-12 px-4 text-left align-middle font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none">
|
|
22
|
+
<div class="flex items-center gap-1">
|
|
23
|
+
Method
|
|
24
|
+
<svg data-sort-icon class="w-4 h-4 opacity-0 transition-all" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"/></svg>
|
|
25
|
+
</div>
|
|
26
|
+
</th>
|
|
27
|
+
<th data-col="3" data-action="click->table#sort" data-table-target="header"
|
|
28
|
+
class="h-12 px-4 text-right align-middle font-medium text-muted-foreground cursor-pointer hover:text-foreground select-none">
|
|
29
|
+
<div class="flex items-center justify-end gap-1">
|
|
30
|
+
Amount
|
|
31
|
+
<svg data-sort-icon class="w-4 h-4 opacity-0 transition-all" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"/></svg>
|
|
32
|
+
</div>
|
|
33
|
+
</th>
|
|
34
|
+
</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody data-table-target="body" class="[&_tr:last-child]:border-0">
|
|
37
|
+
<tr class="border-b border-border transition-colors hover:bg-muted/50">
|
|
38
|
+
<td class="p-4 align-middle font-medium">INV001</td>
|
|
39
|
+
<td class="p-4 align-middle"><span data-controller="badge" data-badge-variant-value="success">Paid</span></td>
|
|
40
|
+
<td class="p-4 align-middle text-muted-foreground">Credit Card</td>
|
|
41
|
+
<td class="p-4 align-middle text-right font-medium">$250.00</td>
|
|
42
|
+
</tr>
|
|
43
|
+
<tr class="border-b border-border transition-colors hover:bg-muted/50">
|
|
44
|
+
<td class="p-4 align-middle font-medium">INV002</td>
|
|
45
|
+
<td class="p-4 align-middle"><span data-controller="badge" data-badge-variant-value="warning">Pending</span></td>
|
|
46
|
+
<td class="p-4 align-middle text-muted-foreground">PayPal</td>
|
|
47
|
+
<td class="p-4 align-middle text-right font-medium">$150.00</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr class="border-b border-border transition-colors hover:bg-muted/50">
|
|
50
|
+
<td class="p-4 align-middle font-medium">INV003</td>
|
|
51
|
+
<td class="p-4 align-middle"><span data-controller="badge" data-badge-variant-value="danger">Overdue</span></td>
|
|
52
|
+
<td class="p-4 align-middle text-muted-foreground">Bank Transfer</td>
|
|
53
|
+
<td class="p-4 align-middle text-right font-medium">$350.00</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="border-b border-border transition-colors hover:bg-muted/50">
|
|
56
|
+
<td class="p-4 align-middle font-medium">INV004</td>
|
|
57
|
+
<td class="p-4 align-middle"><span data-controller="badge" data-badge-variant-value="success">Paid</span></td>
|
|
58
|
+
<td class="p-4 align-middle text-muted-foreground">Credit Card</td>
|
|
59
|
+
<td class="p-4 align-middle text-right font-medium">$450.00</td>
|
|
60
|
+
</tr>
|
|
61
|
+
<tr class="transition-colors hover:bg-muted/50">
|
|
62
|
+
<td class="p-4 align-middle font-medium">INV005</td>
|
|
63
|
+
<td class="p-4 align-middle"><span data-controller="badge" data-badge-variant-value="success">Paid</span></td>
|
|
64
|
+
<td class="p-4 align-middle text-muted-foreground">PayPal</td>
|
|
65
|
+
<td class="p-4 align-middle text-right font-medium">$550.00</td>
|
|
66
|
+
</tr>
|
|
67
|
+
</tbody>
|
|
68
|
+
<tfoot class="border-t border-border bg-muted/50">
|
|
69
|
+
<tr>
|
|
70
|
+
<td colspan="3" class="p-4 align-middle font-medium">Total</td>
|
|
71
|
+
<td class="p-4 align-middle text-right font-bold">$1,750.00</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</tfoot>
|
|
74
|
+
</table>
|
|
75
|
+
</div>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- Tabs -->
|
|
2
|
+
<div data-controller="tabs">
|
|
3
|
+
<div class="inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground" role="tablist">
|
|
4
|
+
<button data-action="click->tabs#switch" data-tabs-target="tab" role="tab"
|
|
5
|
+
class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-semibold ring-offset-background transition-all focus-visible:outline-none border-b-2 border-foreground text-foreground bg-background">Account</button>
|
|
6
|
+
<button data-action="click->tabs#switch" data-tabs-target="tab" role="tab"
|
|
7
|
+
class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none border-b-2 border-transparent text-muted-foreground">Password</button>
|
|
8
|
+
<button data-action="click->tabs#switch" data-tabs-target="tab" role="tab"
|
|
9
|
+
class="inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none border-b-2 border-transparent text-muted-foreground">Notifications</button>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="mt-4">
|
|
12
|
+
<div data-tabs-target="panel" role="tabpanel" class="rounded-lg border border-border p-6">
|
|
13
|
+
<h3 class="text-lg font-semibold mb-1">Account</h3>
|
|
14
|
+
<p class="text-sm text-muted-foreground mb-4">Make changes to your account here. Click save when you're done.</p>
|
|
15
|
+
<div class="grid gap-3 max-w-sm">
|
|
16
|
+
<div>
|
|
17
|
+
<label class="text-sm font-medium mb-1.5 block">Name</label>
|
|
18
|
+
<input data-controller="input" type="text" value="Pedro Duarte"/>
|
|
19
|
+
</div>
|
|
20
|
+
<div>
|
|
21
|
+
<label class="text-sm font-medium mb-1.5 block">Username</label>
|
|
22
|
+
<input data-controller="input" type="text" value="@peduarte"/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<button data-controller="button" class="mt-4">Save changes</button>
|
|
26
|
+
</div>
|
|
27
|
+
<div data-tabs-target="panel" role="tabpanel" class="hidden rounded-lg border border-border p-6">
|
|
28
|
+
<h3 class="text-lg font-semibold mb-1">Password</h3>
|
|
29
|
+
<p class="text-sm text-muted-foreground mb-4">Change your password here. After saving, you'll be logged out.</p>
|
|
30
|
+
<div class="grid gap-3 max-w-sm">
|
|
31
|
+
<div>
|
|
32
|
+
<label class="text-sm font-medium mb-1.5 block">Current password</label>
|
|
33
|
+
<input data-controller="input" type="password" placeholder="••••••••"/>
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
<label class="text-sm font-medium mb-1.5 block">New password</label>
|
|
37
|
+
<input data-controller="input" type="password" placeholder="••••••••"/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<button data-controller="button" class="mt-4">Save password</button>
|
|
41
|
+
</div>
|
|
42
|
+
<div data-tabs-target="panel" role="tabpanel" class="hidden rounded-lg border border-border p-6">
|
|
43
|
+
<h3 class="text-lg font-semibold mb-1">Notifications</h3>
|
|
44
|
+
<p class="text-sm text-muted-foreground mb-4">Configure how you receive notifications.</p>
|
|
45
|
+
<div class="space-y-4">
|
|
46
|
+
<div class="flex items-center justify-between" data-controller="toggle">
|
|
47
|
+
<div>
|
|
48
|
+
<p class="text-sm font-medium">Email notifications</p>
|
|
49
|
+
<p class="text-xs text-muted-foreground">Receive emails about your account activity.</p>
|
|
50
|
+
</div>
|
|
51
|
+
<button data-action="click->toggle#flip" class="relative w-11 h-6 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" role="switch" aria-checked="false">
|
|
52
|
+
<div data-toggle-target="track" class="absolute inset-0 rounded-full bg-muted transition-colors duration-200"></div>
|
|
53
|
+
<div data-toggle-target="thumb" class="absolute top-0.5 left-0.5 w-5 h-5 bg-background rounded-full shadow transition-transform duration-200 border border-border/50"></div>
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Toast notifications -->
|
|
2
|
+
<div data-controller="toast">
|
|
3
|
+
<div data-toast-target="container" class="fixed top-4 right-4 z-[60] flex flex-col gap-2 w-80" aria-live="polite"></div>
|
|
4
|
+
<div class="flex flex-wrap gap-2">
|
|
5
|
+
<button data-action="click->toast#show" data-toast-type-param="info" data-toast-msg-param="Here is some useful info."
|
|
6
|
+
data-controller="button" data-button-variant-value="outline">Info</button>
|
|
7
|
+
<button data-action="click->toast#show" data-toast-type-param="success" data-toast-msg-param="Changes saved successfully!"
|
|
8
|
+
data-controller="button" data-button-variant-value="outline">Success</button>
|
|
9
|
+
<button data-action="click->toast#show" data-toast-type-param="warning" data-toast-msg-param="You have unsaved changes."
|
|
10
|
+
data-controller="button" data-button-variant-value="outline">Warning</button>
|
|
11
|
+
<button data-action="click->toast#show" data-toast-type-param="danger" data-toast-msg-param="Something went wrong."
|
|
12
|
+
data-controller="button" data-button-variant-value="outline">Error</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!-- Switch / Toggle -->
|
|
2
|
+
<div class="rounded-lg border border-border divide-y divide-border">
|
|
3
|
+
<div class="flex items-center justify-between p-4" data-controller="toggle">
|
|
4
|
+
<div class="space-y-0.5">
|
|
5
|
+
<label class="text-sm font-medium leading-none">Airplane Mode</label>
|
|
6
|
+
<p class="text-xs text-muted-foreground">Disable all wireless connections.</p>
|
|
7
|
+
</div>
|
|
8
|
+
<button data-action="click->toggle#flip" class="relative w-11 h-6 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" role="switch" aria-checked="false">
|
|
9
|
+
<div data-toggle-target="track" class="absolute inset-0 rounded-full bg-muted transition-colors duration-200"></div>
|
|
10
|
+
<div data-toggle-target="thumb" class="absolute top-0.5 left-0.5 w-5 h-5 bg-background rounded-full shadow transition-transform duration-200 border border-border/50"></div>
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="flex items-center justify-between p-4" data-controller="toggle" data-toggle-checked-value="true">
|
|
14
|
+
<div class="space-y-0.5">
|
|
15
|
+
<label class="text-sm font-medium leading-none">Notifications</label>
|
|
16
|
+
<p class="text-xs text-muted-foreground">Receive push notifications.</p>
|
|
17
|
+
</div>
|
|
18
|
+
<button data-action="click->toggle#flip" class="relative w-11 h-6 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" role="switch" aria-checked="true">
|
|
19
|
+
<div data-toggle-target="track" class="absolute inset-0 rounded-full bg-primary transition-colors duration-200"></div>
|
|
20
|
+
<div data-toggle-target="thumb" class="absolute top-0.5 left-0.5 w-5 h-5 bg-background rounded-full shadow transition-transform duration-200 border border-border/50" style="transform:translateX(20px)"></div>
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="flex items-center justify-between p-4" data-controller="toggle">
|
|
24
|
+
<div class="space-y-0.5">
|
|
25
|
+
<label class="text-sm font-medium leading-none">Marketing emails</label>
|
|
26
|
+
<p class="text-xs text-muted-foreground">Receive emails about new products.</p>
|
|
27
|
+
</div>
|
|
28
|
+
<button data-action="click->toggle#flip" class="relative w-11 h-6 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" role="switch" aria-checked="false">
|
|
29
|
+
<div data-toggle-target="track" class="absolute inset-0 rounded-full bg-muted transition-colors duration-200"></div>
|
|
30
|
+
<div data-toggle-target="thumb" class="absolute top-0.5 left-0.5 w-5 h-5 bg-background rounded-full shadow transition-transform duration-200 border border-border/50"></div>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<!-- Tooltip examples -->
|
|
2
|
+
<div class="flex flex-wrap items-center gap-6">
|
|
3
|
+
<div class="relative inline-block" data-controller="tooltip">
|
|
4
|
+
<button data-action="mouseenter->tooltip#show mouseleave->tooltip#hide focus->tooltip#show blur->tooltip#hide"
|
|
5
|
+
data-controller="button" data-button-variant-value="outline">
|
|
6
|
+
Hover me
|
|
7
|
+
</button>
|
|
8
|
+
<div data-tooltip-target="content" class="hidden opacity-0 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 overflow-hidden rounded-md border border-border bg-foreground px-3 py-1.5 text-sm text-background shadow-md transition-opacity duration-150">
|
|
9
|
+
<p>Add to library</p>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="relative inline-block" data-controller="tooltip">
|
|
14
|
+
<button data-action="mouseenter->tooltip#show mouseleave->tooltip#hide focus->tooltip#show blur->tooltip#hide"
|
|
15
|
+
data-controller="button" data-button-variant-value="ghost" data-button-size-value="icon">
|
|
16
|
+
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/></svg>
|
|
17
|
+
</button>
|
|
18
|
+
<div data-tooltip-target="content" class="hidden opacity-0 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 overflow-hidden rounded-md border border-border bg-foreground px-3 py-1.5 text-sm text-background shadow-md transition-opacity duration-150">
|
|
19
|
+
<p>Create new item</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="relative inline-block" data-controller="tooltip">
|
|
24
|
+
<button data-action="mouseenter->tooltip#show mouseleave->tooltip#hide focus->tooltip#show blur->tooltip#hide"
|
|
25
|
+
data-controller="button" data-button-variant-value="secondary">
|
|
26
|
+
Settings
|
|
27
|
+
</button>
|
|
28
|
+
<div data-tooltip-target="content" class="hidden opacity-0 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 z-50 overflow-hidden rounded-md border border-border bg-foreground px-3 py-1.5 text-sm text-background shadow-md transition-opacity duration-150 whitespace-nowrap">
|
|
29
|
+
<p>Manage your preferences</p>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skutally/ui-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A modern UI component library for HTML, Tailwind CSS & Stimulus.js. Copy-paste components into your project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
|
14
14
|
"src",
|
|
15
|
+
"components",
|
|
15
16
|
"registry",
|
|
16
17
|
"templates"
|
|
17
18
|
],
|