@shortwind/catalog 0.1.0-beta.13 → 0.1.0-beta.14
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/dist/registry/badge/CHANGELOG.md +1 -1
- package/dist/registry/badge.css +17 -7
- package/dist/registry/{badge@0.0.1.css → badge@0.0.2.css} +17 -7
- package/dist/registry/button/CHANGELOG.md +1 -1
- package/dist/registry/button.css +49 -6
- package/dist/registry/button@0.0.2.css +117 -0
- package/dist/registry/index.json +5 -0
- package/dist/registry/layout/CHANGELOG.md +1 -1
- package/dist/registry/layout.css +9 -5
- package/dist/registry/{layout@0.0.1.css → layout@0.0.2.css} +9 -5
- package/dist/registry/list/CHANGELOG.md +1 -1
- package/dist/registry/list.css +16 -3
- package/dist/registry/{list@0.0.1.css → list@0.0.2.css} +16 -3
- package/dist/registry/manifest.json +858 -153
- package/dist/registry/menu/CHANGELOG.md +5 -0
- package/dist/registry/menu.css +30 -0
- package/dist/registry/menu@0.0.1.css +30 -0
- package/dist/registry/navigation/CHANGELOG.md +1 -1
- package/dist/registry/navigation.css +18 -5
- package/dist/registry/{navigation@0.0.1.css → navigation@0.0.2.css} +18 -5
- package/dist/registry/presets.json +1 -1
- package/dist/registry/recipes/badge.css +17 -7
- package/dist/registry/recipes/button.css +49 -6
- package/dist/registry/recipes/layout.css +9 -5
- package/dist/registry/recipes/list.css +16 -3
- package/dist/registry/recipes/menu.css +30 -0
- package/dist/registry/recipes/navigation.css +18 -5
- package/dist/registry/recipes/segmented.css +19 -0
- package/dist/registry/recipes/sheet.css +38 -0
- package/dist/registry/recipes/stat.css +30 -0
- package/dist/registry/recipes/switch.css +19 -0
- package/dist/registry/segmented/CHANGELOG.md +5 -0
- package/dist/registry/segmented.css +19 -0
- package/dist/registry/segmented@0.0.1.css +19 -0
- package/dist/registry/sheet/CHANGELOG.md +5 -0
- package/dist/registry/sheet.css +38 -0
- package/dist/registry/sheet@0.0.1.css +38 -0
- package/dist/registry/stat/CHANGELOG.md +5 -0
- package/dist/registry/stat.css +30 -0
- package/dist/registry/stat@0.0.1.css +30 -0
- package/dist/registry/switch/CHANGELOG.md +5 -0
- package/dist/registry/switch.css +19 -0
- package/dist/registry/switch@0.0.1.css +19 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/registry/button@0.0.1.css +0 -74
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* shortwind: menu@0.0.1 sha:c95d3650d92a2fa6 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A dropdown/actions menu (the "…" button's popover). @menu is the panel,
|
|
5
|
+
@menu-item is a row, @menu-trigger is the control that opens it, and
|
|
6
|
+
@menu-separator divides groups. The highlighted/active row is data-driven —
|
|
7
|
+
set data-active on the item rather than swapping recipe names
|
|
8
|
+
(`<button class="@menu-item" data-active>`); data-disabled dims + disables a
|
|
9
|
+
row. @menu only styles the panel; pair it with your own positioning.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dropdown menu panel. */
|
|
13
|
+
@recipe menu {
|
|
14
|
+
min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* A single menu row. Highlight with data-active, dim with data-disabled. */
|
|
18
|
+
@recipe menu-item {
|
|
19
|
+
relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted data-[active]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The control that opens the menu. */
|
|
23
|
+
@recipe menu-trigger {
|
|
24
|
+
inline-flex items-center justify-center gap-1 outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Divider between menu groups. */
|
|
28
|
+
@recipe menu-separator {
|
|
29
|
+
-mx-1 my-1 h-px bg-border
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* shortwind: menu@0.0.1 sha:c95d3650d92a2fa6 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A dropdown/actions menu (the "…" button's popover). @menu is the panel,
|
|
5
|
+
@menu-item is a row, @menu-trigger is the control that opens it, and
|
|
6
|
+
@menu-separator divides groups. The highlighted/active row is data-driven —
|
|
7
|
+
set data-active on the item rather than swapping recipe names
|
|
8
|
+
(`<button class="@menu-item" data-active>`); data-disabled dims + disables a
|
|
9
|
+
row. @menu only styles the panel; pair it with your own positioning.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dropdown menu panel. */
|
|
13
|
+
@recipe menu {
|
|
14
|
+
min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* A single menu row. Highlight with data-active, dim with data-disabled. */
|
|
18
|
+
@recipe menu-item {
|
|
19
|
+
relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted data-[active]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The control that opens the menu. */
|
|
23
|
+
@recipe menu-trigger {
|
|
24
|
+
inline-flex items-center justify-center gap-1 outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Divider between menu groups. */
|
|
28
|
+
@recipe menu-separator {
|
|
29
|
+
-mx-1 my-1 h-px bg-border
|
|
30
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
/* shortwind: navigation@0.0.
|
|
1
|
+
/* shortwind: navigation@0.0.2 sha:2bb73370d69e0f65 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
|
-
@
|
|
5
|
-
current page. Tabs mirror that pair: @tab and
|
|
6
|
-
for trail navigation. Active and inactive are
|
|
7
|
-
whole class rather than combining them.
|
|
4
|
+
@navigation is the container; links are @navigation-link with
|
|
5
|
+
@navigation-link-active for the current page. Tabs mirror that pair: @tab and
|
|
6
|
+
@tab-active. Use @breadcrumb for trail navigation. Active and inactive are
|
|
7
|
+
separate recipes — swap the whole class rather than combining them. The short
|
|
8
|
+
@nav / @nav-link forms are aliases that expand identically; the full-word
|
|
9
|
+
@navigation-* names are canonical — prefer them.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
/* Top-level nav container. */
|
|
@@ -36,3 +38,14 @@
|
|
|
36
38
|
@recipe tab-active {
|
|
37
39
|
inline-flex items-center gap-2 border-b-2 border-primary px-3 py-2 text-sm font-medium text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
38
40
|
}
|
|
41
|
+
|
|
42
|
+
/* Full-word canonical aliases — expand identically to the @nav-* short forms. */
|
|
43
|
+
|
|
44
|
+
/* Top-level nav container (alias of @nav). */
|
|
45
|
+
@recipe navigation { @nav }
|
|
46
|
+
|
|
47
|
+
/* Inactive nav link (alias of @nav-link). */
|
|
48
|
+
@recipe navigation-link { @nav-link }
|
|
49
|
+
|
|
50
|
+
/* Active nav link (alias of @nav-link-active). */
|
|
51
|
+
@recipe navigation-link-active { @nav-link-active }
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
/* shortwind: navigation@0.0.
|
|
1
|
+
/* shortwind: navigation@0.0.2 sha:2bb73370d69e0f65 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
|
-
@
|
|
5
|
-
current page. Tabs mirror that pair: @tab and
|
|
6
|
-
for trail navigation. Active and inactive are
|
|
7
|
-
whole class rather than combining them.
|
|
4
|
+
@navigation is the container; links are @navigation-link with
|
|
5
|
+
@navigation-link-active for the current page. Tabs mirror that pair: @tab and
|
|
6
|
+
@tab-active. Use @breadcrumb for trail navigation. Active and inactive are
|
|
7
|
+
separate recipes — swap the whole class rather than combining them. The short
|
|
8
|
+
@nav / @nav-link forms are aliases that expand identically; the full-word
|
|
9
|
+
@navigation-* names are canonical — prefer them.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
/* Top-level nav container. */
|
|
@@ -36,3 +38,14 @@
|
|
|
36
38
|
@recipe tab-active {
|
|
37
39
|
inline-flex items-center gap-2 border-b-2 border-primary px-3 py-2 text-sm font-medium text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
38
40
|
}
|
|
41
|
+
|
|
42
|
+
/* Full-word canonical aliases — expand identically to the @nav-* short forms. */
|
|
43
|
+
|
|
44
|
+
/* Top-level nav container (alias of @nav). */
|
|
45
|
+
@recipe navigation { @nav }
|
|
46
|
+
|
|
47
|
+
/* Inactive nav link (alias of @nav-link). */
|
|
48
|
+
@recipe navigation-link { @nav-link }
|
|
49
|
+
|
|
50
|
+
/* Active nav link (alias of @nav-link-active). */
|
|
51
|
+
@recipe navigation-link-active { @nav-link-active }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"starter": ["card", "button", "layout", "text", "form"],
|
|
3
|
-
"app": ["card", "button", "layout", "text", "form", "badge", "table", "dialog", "list", "navigation", "feedback", "tooltip"],
|
|
3
|
+
"app": ["card", "button", "layout", "text", "form", "badge", "table", "dialog", "list", "navigation", "feedback", "tooltip", "menu", "sheet", "stat", "segmented", "switch"],
|
|
4
4
|
"content": ["card", "button", "layout", "text", "form", "badge", "code", "list", "media", "empty"],
|
|
5
5
|
"all": "*"
|
|
6
6
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
/* shortwind: badge@0.0.
|
|
1
|
+
/* shortwind: badge@0.0.2 sha:07c6ab5a8deb77e3 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
|
-
@badge is the
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
@badge is the default. Its color is DATA-DRIVEN: it reads the --tone-bg /
|
|
5
|
+
--tone-fg CSS variables, so set the tone from your data with a data-tone
|
|
6
|
+
attribute instead of picking a different recipe name —
|
|
7
|
+
`<span className="@badge" data-tone={severity}>`. Define your tones once in
|
|
8
|
+
CSS (init scaffolds neutral/success/warning/danger/info; add your own
|
|
9
|
+
`[data-tone="sev1"] { --tone-bg: …; --tone-fg: … }`). With no data-tone it
|
|
10
|
+
falls back to the neutral muted look, identical to before.
|
|
11
|
+
|
|
12
|
+
The static @badge-success/warning/danger/info variants still exist for when
|
|
13
|
+
the tone is known at author time; reach for data-tone when it's chosen from
|
|
14
|
+
data. @badge-outline is unfilled. @badge-base is a color-less shell for
|
|
15
|
+
building custom tones — not for direct use.
|
|
8
16
|
*/
|
|
9
17
|
|
|
10
18
|
/* Badge shell — shape, sizing, focus ring. No bg/text/border color so
|
|
@@ -13,9 +21,11 @@
|
|
|
13
21
|
inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
14
22
|
}
|
|
15
23
|
|
|
16
|
-
/* Default
|
|
24
|
+
/* Default badge — tone-aware. Reads --tone-bg/--tone-fg (set via data-tone),
|
|
25
|
+
falling back to the neutral muted tokens so it renders unchanged when no
|
|
26
|
+
tone is set. */
|
|
17
27
|
@recipe badge {
|
|
18
|
-
inline-flex items-center gap-1 rounded-full
|
|
28
|
+
inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium bg-[var(--tone-bg,var(--muted))] text-[var(--tone-fg,var(--muted-foreground))]
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
/* Success tone badge. */
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
/* shortwind: button@0.0.
|
|
1
|
+
/* shortwind: button@0.0.2 sha:b0b08652cd757b90 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
|
-
Name order is @
|
|
5
|
-
danger/outline), size second (sm/lg; omit for default). One intent per
|
|
6
|
-
button — never combine @
|
|
7
|
-
@
|
|
8
|
-
@
|
|
4
|
+
Name order is @button-<intent>[-<size>]: intent first (primary/secondary/
|
|
5
|
+
ghost/danger/outline), size second (sm/lg; omit for default). One intent per
|
|
6
|
+
button — never combine @button-primary with @button-danger. @button-ghost is
|
|
7
|
+
text-only, @button-outline is bordered with no fill, @button-icon is a square
|
|
8
|
+
icon button. @button-base is the shared shell; don't use it on its own.
|
|
9
|
+
The short @btn-<intent> forms are aliases that expand identically; the
|
|
10
|
+
full-word @button-* names are canonical — prefer them.
|
|
9
11
|
*/
|
|
10
12
|
|
|
11
13
|
/* Shared button base — sizing, focus ring, disabled state. */
|
|
@@ -72,3 +74,44 @@
|
|
|
72
74
|
@recipe btn-icon {
|
|
73
75
|
inline-flex h-9 w-9 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50
|
|
74
76
|
}
|
|
77
|
+
|
|
78
|
+
/* Full-word canonical aliases — expand identically to the @btn-* short forms. */
|
|
79
|
+
|
|
80
|
+
/* Shared button shell (alias of @btn-base). */
|
|
81
|
+
@recipe button-base { @btn-base }
|
|
82
|
+
|
|
83
|
+
/* Primary call-to-action button (alias of @btn-primary). */
|
|
84
|
+
@recipe button-primary { @btn-primary }
|
|
85
|
+
|
|
86
|
+
/* Small primary button (alias of @btn-primary-sm). */
|
|
87
|
+
@recipe button-primary-sm { @btn-primary-sm }
|
|
88
|
+
|
|
89
|
+
/* Large primary button (alias of @btn-primary-lg). */
|
|
90
|
+
@recipe button-primary-lg { @btn-primary-lg }
|
|
91
|
+
|
|
92
|
+
/* Secondary button (alias of @btn-secondary). */
|
|
93
|
+
@recipe button-secondary { @btn-secondary }
|
|
94
|
+
|
|
95
|
+
/* Small secondary button (alias of @btn-secondary-sm). */
|
|
96
|
+
@recipe button-secondary-sm { @btn-secondary-sm }
|
|
97
|
+
|
|
98
|
+
/* Large secondary button (alias of @btn-secondary-lg). */
|
|
99
|
+
@recipe button-secondary-lg { @btn-secondary-lg }
|
|
100
|
+
|
|
101
|
+
/* Ghost button (alias of @btn-ghost). */
|
|
102
|
+
@recipe button-ghost { @btn-ghost }
|
|
103
|
+
|
|
104
|
+
/* Small ghost button (alias of @btn-ghost-sm). */
|
|
105
|
+
@recipe button-ghost-sm { @btn-ghost-sm }
|
|
106
|
+
|
|
107
|
+
/* Large ghost button (alias of @btn-ghost-lg). */
|
|
108
|
+
@recipe button-ghost-lg { @btn-ghost-lg }
|
|
109
|
+
|
|
110
|
+
/* Destructive button (alias of @btn-danger). */
|
|
111
|
+
@recipe button-danger { @btn-danger }
|
|
112
|
+
|
|
113
|
+
/* Outline button (alias of @btn-outline). */
|
|
114
|
+
@recipe button-outline { @btn-outline }
|
|
115
|
+
|
|
116
|
+
/* Square icon-only button (alias of @btn-icon). */
|
|
117
|
+
@recipe button-icon { @btn-icon }
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
/* shortwind: layout@0.0.
|
|
1
|
+
/* shortwind: layout@0.0.2 sha:48025daeec83041a */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
4
|
Composition primitives. @stack-* stacks children vertically (flex-col);
|
|
5
5
|
@row* lays them out horizontally (flex-row). Choose the gap with the size
|
|
6
|
-
suffix (xs/sm/md/lg on stacks)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
suffix (xs/sm/md/lg on stacks); bare @stack is the default and equals
|
|
7
|
+
@stack-md. Use @grid-2/3/4 only for true multi-column grids, @center to
|
|
8
|
+
center on both axes, @full to fill the parent. Common slips: there is no
|
|
9
|
+
@flex-row (use @row) or @flex-col (use a @stack-*), and the grids are
|
|
10
|
+
@grid-3, not @grid-cols-3.
|
|
10
11
|
*/
|
|
11
12
|
|
|
13
|
+
/* Bare stack — default gap, alias for @stack-md. */
|
|
14
|
+
@recipe stack { @stack-md }
|
|
15
|
+
|
|
12
16
|
/* Vertical stack with extra-small gap. */
|
|
13
17
|
@recipe stack-xs {
|
|
14
18
|
flex flex-col gap-1
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
/* shortwind: list@0.0.
|
|
1
|
+
/* shortwind: list@0.0.2 sha:6a7f93aa95067c44 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
4
|
@list wraps a stack of @list-item rows; use @list-bordered for divided rows.
|
|
5
|
-
Definition lists are separate: @
|
|
6
|
-
|
|
5
|
+
Definition lists are separate: @description-list with @description-term and
|
|
6
|
+
@description-detail. The short @dl / @dt / @dd forms are aliases that expand
|
|
7
|
+
identically; the spelled-out names are canonical — prefer them. For site
|
|
8
|
+
navigation reach for the navigation family (@navigation), not @list.
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
11
|
/* Vertical list with default gap. */
|
|
@@ -35,3 +37,14 @@
|
|
|
35
37
|
@recipe dd {
|
|
36
38
|
text-sm text-foreground sm:col-span-2
|
|
37
39
|
}
|
|
40
|
+
|
|
41
|
+
/* Spelled-out canonical aliases — expand identically to @dl/@dt/@dd. */
|
|
42
|
+
|
|
43
|
+
/* Definition list container (alias of @dl). */
|
|
44
|
+
@recipe description-list { @dl }
|
|
45
|
+
|
|
46
|
+
/* Definition term (alias of @dt). */
|
|
47
|
+
@recipe description-term { @dt }
|
|
48
|
+
|
|
49
|
+
/* Definition description (alias of @dd). */
|
|
50
|
+
@recipe description-detail { @dd }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* shortwind: menu@0.0.1 sha:c95d3650d92a2fa6 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A dropdown/actions menu (the "…" button's popover). @menu is the panel,
|
|
5
|
+
@menu-item is a row, @menu-trigger is the control that opens it, and
|
|
6
|
+
@menu-separator divides groups. The highlighted/active row is data-driven —
|
|
7
|
+
set data-active on the item rather than swapping recipe names
|
|
8
|
+
(`<button class="@menu-item" data-active>`); data-disabled dims + disables a
|
|
9
|
+
row. @menu only styles the panel; pair it with your own positioning.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dropdown menu panel. */
|
|
13
|
+
@recipe menu {
|
|
14
|
+
min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* A single menu row. Highlight with data-active, dim with data-disabled. */
|
|
18
|
+
@recipe menu-item {
|
|
19
|
+
relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted data-[active]:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The control that opens the menu. */
|
|
23
|
+
@recipe menu-trigger {
|
|
24
|
+
inline-flex items-center justify-center gap-1 outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Divider between menu groups. */
|
|
28
|
+
@recipe menu-separator {
|
|
29
|
+
-mx-1 my-1 h-px bg-border
|
|
30
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
/* shortwind: navigation@0.0.
|
|
1
|
+
/* shortwind: navigation@0.0.2 sha:2bb73370d69e0f65 */
|
|
2
2
|
|
|
3
3
|
/* @guide
|
|
4
|
-
@
|
|
5
|
-
current page. Tabs mirror that pair: @tab and
|
|
6
|
-
for trail navigation. Active and inactive are
|
|
7
|
-
whole class rather than combining them.
|
|
4
|
+
@navigation is the container; links are @navigation-link with
|
|
5
|
+
@navigation-link-active for the current page. Tabs mirror that pair: @tab and
|
|
6
|
+
@tab-active. Use @breadcrumb for trail navigation. Active and inactive are
|
|
7
|
+
separate recipes — swap the whole class rather than combining them. The short
|
|
8
|
+
@nav / @nav-link forms are aliases that expand identically; the full-word
|
|
9
|
+
@navigation-* names are canonical — prefer them.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
/* Top-level nav container. */
|
|
@@ -36,3 +38,14 @@
|
|
|
36
38
|
@recipe tab-active {
|
|
37
39
|
inline-flex items-center gap-2 border-b-2 border-primary px-3 py-2 text-sm font-medium text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
38
40
|
}
|
|
41
|
+
|
|
42
|
+
/* Full-word canonical aliases — expand identically to the @nav-* short forms. */
|
|
43
|
+
|
|
44
|
+
/* Top-level nav container (alias of @nav). */
|
|
45
|
+
@recipe navigation { @nav }
|
|
46
|
+
|
|
47
|
+
/* Inactive nav link (alias of @nav-link). */
|
|
48
|
+
@recipe navigation-link { @nav-link }
|
|
49
|
+
|
|
50
|
+
/* Active nav link (alias of @nav-link-active). */
|
|
51
|
+
@recipe navigation-link-active { @nav-link-active }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* shortwind: segmented@0.0.1 sha:60bb982c1fc271f0 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A segmented control / filter bar (one choice highlighted). @segmented is the
|
|
5
|
+
track, @segmented-item is each segment. The selected segment is data-driven —
|
|
6
|
+
set data-active on the chosen item (`<button class="@segmented-item"
|
|
7
|
+
data-active>`) rather than swapping recipe names. Use @tab/@tab-active from
|
|
8
|
+
the navigation family for underlined tabs instead.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Segmented-control track. */
|
|
12
|
+
@recipe segmented {
|
|
13
|
+
inline-flex items-center gap-1 rounded-md bg-muted p-1
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* A segment. Mark the selected one with data-active. */
|
|
17
|
+
@recipe segmented-item {
|
|
18
|
+
inline-flex items-center justify-center gap-1.5 rounded-sm px-3 py-1 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground data-[active]:bg-background data-[active]:text-foreground data-[active]:shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* shortwind: sheet@0.0.1 sha:2dd5109c9e3865fa */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A slide-over panel (drawer). Three layers mirror the dialog family:
|
|
5
|
+
@sheet-overlay (dimmed backdrop), @sheet (the positioner that anchors the
|
|
6
|
+
panel to a side), and @sheet-content (the panel itself). Structure the panel
|
|
7
|
+
with @sheet-header and @sheet-footer. The edge is data-driven — set
|
|
8
|
+
data-side=left/right on @sheet (`<div class="@sheet" data-side="right">`)
|
|
9
|
+
rather than picking a different recipe. @drawer is an alias for @sheet.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dimmed backdrop behind the sheet. */
|
|
13
|
+
@recipe sheet-overlay {
|
|
14
|
+
fixed inset-0 z-40 bg-black/50
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Positioner — anchors the panel to a side via data-side. */
|
|
18
|
+
@recipe sheet {
|
|
19
|
+
fixed inset-0 z-50 flex data-[side=right]:justify-end data-[side=left]:justify-start
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The sliding panel. */
|
|
23
|
+
@recipe sheet-content {
|
|
24
|
+
flex h-full w-3/4 max-w-sm flex-col gap-4 border-border bg-popover p-6 text-popover-foreground shadow-xl
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Sheet header region. */
|
|
28
|
+
@recipe sheet-header {
|
|
29
|
+
flex flex-col gap-1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Sheet footer with bottom-pinned, right-aligned actions. */
|
|
33
|
+
@recipe sheet-footer {
|
|
34
|
+
mt-auto flex items-center justify-end gap-2
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Alias — @drawer reads as @sheet. */
|
|
38
|
+
@recipe drawer { @sheet }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* shortwind: stat@0.0.1 sha:445f1f7abfebc0b1 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A dashboard metric tile. @stat is the container; inside it @stat-label names
|
|
5
|
+
the metric, @stat-value is the big number, and @stat-trend is the delta.
|
|
6
|
+
Colour the trend with the tone system — set data-tone on @stat-trend
|
|
7
|
+
(success for up, danger for down): `<span class="@stat-trend"
|
|
8
|
+
data-tone="success">`. Same --tone-fg mechanism as @badge; define tones once
|
|
9
|
+
in CSS (init scaffolds them).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Metric tile container. */
|
|
13
|
+
@recipe stat {
|
|
14
|
+
flex flex-col gap-1 rounded-lg border border-border bg-card p-4 text-card-foreground
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Metric name. */
|
|
18
|
+
@recipe stat-label {
|
|
19
|
+
text-sm font-medium text-muted-foreground
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The metric's primary value. */
|
|
23
|
+
@recipe stat-value {
|
|
24
|
+
text-2xl font-semibold tracking-tight text-foreground tabular-nums
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Trend delta — tone-aware; set data-tone (success up / danger down). */
|
|
28
|
+
@recipe stat-trend {
|
|
29
|
+
inline-flex items-center gap-1 text-xs font-medium text-[var(--tone-fg,var(--muted-foreground))]
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* shortwind: switch@0.0.1 sha:54fa33bb72839799 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A toggle switch. @switch is the track, @switch-thumb is the sliding knob
|
|
5
|
+
inside it. The on/off state is data-driven — set data-checked on BOTH the
|
|
6
|
+
track and the thumb (`<button class="@switch" data-checked><span
|
|
7
|
+
class="@switch-thumb" data-checked /></button>`). For a checkbox/radio reach
|
|
8
|
+
for the form family instead.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Toggle track. Add data-checked when on. */
|
|
12
|
+
@recipe switch {
|
|
13
|
+
peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent bg-input transition-colors data-[checked]:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Sliding knob. Add data-checked to slide it on. */
|
|
17
|
+
@recipe switch-thumb {
|
|
18
|
+
pointer-events-none block h-4 w-4 translate-x-0 rounded-full bg-background shadow-sm transition-transform data-[checked]:translate-x-4
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* shortwind: segmented@0.0.1 sha:60bb982c1fc271f0 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A segmented control / filter bar (one choice highlighted). @segmented is the
|
|
5
|
+
track, @segmented-item is each segment. The selected segment is data-driven —
|
|
6
|
+
set data-active on the chosen item (`<button class="@segmented-item"
|
|
7
|
+
data-active>`) rather than swapping recipe names. Use @tab/@tab-active from
|
|
8
|
+
the navigation family for underlined tabs instead.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Segmented-control track. */
|
|
12
|
+
@recipe segmented {
|
|
13
|
+
inline-flex items-center gap-1 rounded-md bg-muted p-1
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* A segment. Mark the selected one with data-active. */
|
|
17
|
+
@recipe segmented-item {
|
|
18
|
+
inline-flex items-center justify-center gap-1.5 rounded-sm px-3 py-1 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground data-[active]:bg-background data-[active]:text-foreground data-[active]:shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* shortwind: segmented@0.0.1 sha:60bb982c1fc271f0 */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A segmented control / filter bar (one choice highlighted). @segmented is the
|
|
5
|
+
track, @segmented-item is each segment. The selected segment is data-driven —
|
|
6
|
+
set data-active on the chosen item (`<button class="@segmented-item"
|
|
7
|
+
data-active>`) rather than swapping recipe names. Use @tab/@tab-active from
|
|
8
|
+
the navigation family for underlined tabs instead.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Segmented-control track. */
|
|
12
|
+
@recipe segmented {
|
|
13
|
+
inline-flex items-center gap-1 rounded-md bg-muted p-1
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* A segment. Mark the selected one with data-active. */
|
|
17
|
+
@recipe segmented-item {
|
|
18
|
+
inline-flex items-center justify-center gap-1.5 rounded-sm px-3 py-1 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground data-[active]:bg-background data-[active]:text-foreground data-[active]:shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* shortwind: sheet@0.0.1 sha:2dd5109c9e3865fa */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A slide-over panel (drawer). Three layers mirror the dialog family:
|
|
5
|
+
@sheet-overlay (dimmed backdrop), @sheet (the positioner that anchors the
|
|
6
|
+
panel to a side), and @sheet-content (the panel itself). Structure the panel
|
|
7
|
+
with @sheet-header and @sheet-footer. The edge is data-driven — set
|
|
8
|
+
data-side=left/right on @sheet (`<div class="@sheet" data-side="right">`)
|
|
9
|
+
rather than picking a different recipe. @drawer is an alias for @sheet.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dimmed backdrop behind the sheet. */
|
|
13
|
+
@recipe sheet-overlay {
|
|
14
|
+
fixed inset-0 z-40 bg-black/50
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Positioner — anchors the panel to a side via data-side. */
|
|
18
|
+
@recipe sheet {
|
|
19
|
+
fixed inset-0 z-50 flex data-[side=right]:justify-end data-[side=left]:justify-start
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The sliding panel. */
|
|
23
|
+
@recipe sheet-content {
|
|
24
|
+
flex h-full w-3/4 max-w-sm flex-col gap-4 border-border bg-popover p-6 text-popover-foreground shadow-xl
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Sheet header region. */
|
|
28
|
+
@recipe sheet-header {
|
|
29
|
+
flex flex-col gap-1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Sheet footer with bottom-pinned, right-aligned actions. */
|
|
33
|
+
@recipe sheet-footer {
|
|
34
|
+
mt-auto flex items-center justify-end gap-2
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Alias — @drawer reads as @sheet. */
|
|
38
|
+
@recipe drawer { @sheet }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* shortwind: sheet@0.0.1 sha:2dd5109c9e3865fa */
|
|
2
|
+
|
|
3
|
+
/* @guide
|
|
4
|
+
A slide-over panel (drawer). Three layers mirror the dialog family:
|
|
5
|
+
@sheet-overlay (dimmed backdrop), @sheet (the positioner that anchors the
|
|
6
|
+
panel to a side), and @sheet-content (the panel itself). Structure the panel
|
|
7
|
+
with @sheet-header and @sheet-footer. The edge is data-driven — set
|
|
8
|
+
data-side=left/right on @sheet (`<div class="@sheet" data-side="right">`)
|
|
9
|
+
rather than picking a different recipe. @drawer is an alias for @sheet.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Dimmed backdrop behind the sheet. */
|
|
13
|
+
@recipe sheet-overlay {
|
|
14
|
+
fixed inset-0 z-40 bg-black/50
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Positioner — anchors the panel to a side via data-side. */
|
|
18
|
+
@recipe sheet {
|
|
19
|
+
fixed inset-0 z-50 flex data-[side=right]:justify-end data-[side=left]:justify-start
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* The sliding panel. */
|
|
23
|
+
@recipe sheet-content {
|
|
24
|
+
flex h-full w-3/4 max-w-sm flex-col gap-4 border-border bg-popover p-6 text-popover-foreground shadow-xl
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Sheet header region. */
|
|
28
|
+
@recipe sheet-header {
|
|
29
|
+
flex flex-col gap-1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Sheet footer with bottom-pinned, right-aligned actions. */
|
|
33
|
+
@recipe sheet-footer {
|
|
34
|
+
mt-auto flex items-center justify-end gap-2
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Alias — @drawer reads as @sheet. */
|
|
38
|
+
@recipe drawer { @sheet }
|