@zazz-ui/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/sri.json +75 -0
- package/dist/zazz.css +1 -0
- package/dist/zazz.js +1 -0
- package/examples/about.html +590 -0
- package/examples/components.html +1040 -0
- package/examples/forms.html +511 -0
- package/examples/index.html +268 -0
- package/examples/layout.html +320 -0
- package/examples/products.html +846 -0
- package/examples/responsive.html +339 -0
- package/package.json +85 -0
- package/src/base/_layers.css +12 -0
- package/src/base/_layout.css +568 -0
- package/src/base/_reset.css +515 -0
- package/src/base/_typography.css +495 -0
- package/src/base/_utilities.css +6628 -0
- package/src/base/_variables.css +682 -0
- package/src/base/_view-transitions.css +103 -0
- package/src/base/command-score.d.ts +12 -0
- package/src/base/command-score.d.ts.map +1 -0
- package/src/base/command-score.js +151 -0
- package/src/base/command-score.ts +192 -0
- package/src/base/dialog-lifecycle.d.ts +11 -0
- package/src/base/dialog-lifecycle.d.ts.map +1 -0
- package/src/base/dialog-lifecycle.js +65 -0
- package/src/base/dialog-lifecycle.ts +80 -0
- package/src/base/embla.d.ts +90 -0
- package/src/base/embla.d.ts.map +1 -0
- package/src/base/embla.js +643 -0
- package/src/base/embla.ts +791 -0
- package/src/base/hotkeys.d.ts +82 -0
- package/src/base/hotkeys.d.ts.map +1 -0
- package/src/base/hotkeys.js +141 -0
- package/src/base/hotkeys.ts +195 -0
- package/src/base/navigation.d.ts +2 -0
- package/src/base/navigation.d.ts.map +1 -0
- package/src/base/navigation.js +136 -0
- package/src/base/navigation.ts +151 -0
- package/src/base/reveal.d.ts +80 -0
- package/src/base/reveal.d.ts.map +1 -0
- package/src/base/reveal.js +305 -0
- package/src/base/reveal.ts +379 -0
- package/src/base/signals.d.ts +89 -0
- package/src/base/signals.d.ts.map +1 -0
- package/src/base/signals.js +134 -0
- package/src/base/signals.ts +164 -0
- package/src/base/typeahead.d.ts +105 -0
- package/src/base/typeahead.d.ts.map +1 -0
- package/src/base/typeahead.js +411 -0
- package/src/base/typeahead.ts +500 -0
- package/src/base/utils.d.ts +56 -0
- package/src/base/utils.d.ts.map +1 -0
- package/src/base/utils.js +88 -0
- package/src/base/utils.ts +98 -0
- package/src/base/zazz-element.d.ts +44 -0
- package/src/base/zazz-element.d.ts.map +1 -0
- package/src/base/zazz-element.js +59 -0
- package/src/base/zazz-element.ts +73 -0
- package/src/globals.d.ts +148 -0
- package/src/head.d.ts +95 -0
- package/src/head.d.ts.map +1 -0
- package/src/head.js +311 -0
- package/src/head.ts +433 -0
- package/src/index.css +71 -0
- package/src/index.d.ts +36 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +35 -0
- package/src/index.ts +36 -0
- package/src/manifest.d.ts +90 -0
- package/src/manifest.d.ts.map +1 -0
- package/src/manifest.js +614 -0
- package/src/manifest.ts +667 -0
- package/src/primitives/accordion/accordion.css +104 -0
- package/src/primitives/accordion/accordion.html +69 -0
- package/src/primitives/alert-dialog/alert-dialog.css +38 -0
- package/src/primitives/alert-dialog/alert-dialog.html +53 -0
- package/src/primitives/autocomplete/autocomplete-groups.html +77 -0
- package/src/primitives/autocomplete/autocomplete.css +114 -0
- package/src/primitives/autocomplete/autocomplete.d.ts +30 -0
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -0
- package/src/primitives/autocomplete/autocomplete.html +66 -0
- package/src/primitives/autocomplete/autocomplete.js +41 -0
- package/src/primitives/autocomplete/autocomplete.ts +46 -0
- package/src/primitives/avatar/avatar.html +44 -0
- package/src/primitives/badge/badge-icon.html +36 -0
- package/src/primitives/badge/badge.css +251 -0
- package/src/primitives/badge/badge.html +7 -0
- package/src/primitives/breadcrumbs/breadcrumbs.html +9 -0
- package/src/primitives/button/button-icon-only.html +84 -0
- package/src/primitives/button/button-icon.html +82 -0
- package/src/primitives/button/button.css +319 -0
- package/src/primitives/button/button.html +8 -0
- package/src/primitives/button-group/button-group-vertical.html +6 -0
- package/src/primitives/button-group/button-group.css +94 -0
- package/src/primitives/button-group/button-group.html +64 -0
- package/src/primitives/card/card-subgrid.html +118 -0
- package/src/primitives/card/card.html +53 -0
- package/src/primitives/carousel/carousel.css +61 -0
- package/src/primitives/carousel/carousel.d.ts +16 -0
- package/src/primitives/carousel/carousel.d.ts.map +1 -0
- package/src/primitives/carousel/carousel.html +315 -0
- package/src/primitives/carousel/carousel.js +73 -0
- package/src/primitives/carousel/carousel.ts +84 -0
- package/src/primitives/checkbox/checkbox-tasklist.html +71 -0
- package/src/primitives/checkbox/checkbox.css +82 -0
- package/src/primitives/checkbox/checkbox.d.ts +21 -0
- package/src/primitives/checkbox/checkbox.d.ts.map +1 -0
- package/src/primitives/checkbox/checkbox.html +17 -0
- package/src/primitives/checkbox/checkbox.js +190 -0
- package/src/primitives/checkbox/checkbox.ts +219 -0
- package/src/primitives/combobox/combobox-multiselect.html +91 -0
- package/src/primitives/combobox/combobox.css +307 -0
- package/src/primitives/combobox/combobox.d.ts +100 -0
- package/src/primitives/combobox/combobox.d.ts.map +1 -0
- package/src/primitives/combobox/combobox.html +73 -0
- package/src/primitives/combobox/combobox.js +503 -0
- package/src/primitives/combobox/combobox.ts +559 -0
- package/src/primitives/command/command-actions.d.ts +31 -0
- package/src/primitives/command/command-actions.d.ts.map +1 -0
- package/src/primitives/command/command-actions.html +89 -0
- package/src/primitives/command/command-actions.js +70 -0
- package/src/primitives/command/command-actions.ts +77 -0
- package/src/primitives/command/command-dialog.html +77 -0
- package/src/primitives/command/command.css +151 -0
- package/src/primitives/command/command.d.ts +52 -0
- package/src/primitives/command/command.d.ts.map +1 -0
- package/src/primitives/command/command.html +119 -0
- package/src/primitives/command/command.js +146 -0
- package/src/primitives/command/command.ts +157 -0
- package/src/primitives/dialog/dialog-with-form.html +200 -0
- package/src/primitives/dialog/dialog.css +229 -0
- package/src/primitives/dialog/dialog.html +90 -0
- package/src/primitives/fields/fields.css +278 -0
- package/src/primitives/input/input-icon-leading.html +19 -0
- package/src/primitives/input/input-icon-trailing.html +18 -0
- package/src/primitives/input/input.css +114 -0
- package/src/primitives/input/input.html +61 -0
- package/src/primitives/input-group/input-group-password-group.html +108 -0
- package/src/primitives/input-group/input-group.css +215 -0
- package/src/primitives/input-group/input-group.html +132 -0
- package/src/primitives/kbd/kbd-group.html +18 -0
- package/src/primitives/kbd/kbd.css +87 -0
- package/src/primitives/kbd/kbd.html +7 -0
- package/src/primitives/lightbox/lightbox.css +459 -0
- package/src/primitives/lightbox/lightbox.d.ts +7 -0
- package/src/primitives/lightbox/lightbox.d.ts.map +1 -0
- package/src/primitives/lightbox/lightbox.html +665 -0
- package/src/primitives/lightbox/lightbox.js +96 -0
- package/src/primitives/lightbox/lightbox.ts +113 -0
- package/src/primitives/menu/menu-interest.html +52 -0
- package/src/primitives/menu/menu.css +55 -0
- package/src/primitives/menu/menu.d.ts +38 -0
- package/src/primitives/menu/menu.d.ts.map +1 -0
- package/src/primitives/menu/menu.html +70 -0
- package/src/primitives/menu/menu.js +117 -0
- package/src/primitives/menu/menu.ts +131 -0
- package/src/primitives/menubar/menubar-help-search.html +103 -0
- package/src/primitives/menubar/menubar.html +166 -0
- package/src/primitives/meter/meter.css +178 -0
- package/src/primitives/meter/meter.html +38 -0
- package/src/primitives/mobile-menu/mobile-menu.css +145 -0
- package/src/primitives/mobile-menu/mobile-menu.html +614 -0
- package/src/primitives/navigation-menu/navigation-menu-featured.html +76 -0
- package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +158 -0
- package/src/primitives/navigation-menu/navigation-menu-interest.html +103 -0
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +141 -0
- package/src/primitives/navigation-menu/navigation-menu-simple.html +96 -0
- package/src/primitives/navigation-menu/navigation-menu.css +295 -0
- package/src/primitives/navigation-menu/navigation-menu.html +576 -0
- package/src/primitives/otp/otp.css +126 -0
- package/src/primitives/otp/otp.d.ts +89 -0
- package/src/primitives/otp/otp.d.ts.map +1 -0
- package/src/primitives/otp/otp.html +22 -0
- package/src/primitives/otp/otp.js +226 -0
- package/src/primitives/otp/otp.ts +279 -0
- package/src/primitives/password-group/password-group.css +238 -0
- package/src/primitives/password-group/password-group.d.ts +25 -0
- package/src/primitives/password-group/password-group.d.ts.map +1 -0
- package/src/primitives/password-group/password-group.html +109 -0
- package/src/primitives/password-group/password-group.js +76 -0
- package/src/primitives/password-group/password-group.ts +95 -0
- package/src/primitives/popover/popover.css +233 -0
- package/src/primitives/progress/progress-indeterminate.html +1 -0
- package/src/primitives/progress/progress.css +105 -0
- package/src/primitives/progress/progress.html +7 -0
- package/src/primitives/prose/prose.html +65 -0
- package/src/primitives/radio/radio.css +84 -0
- package/src/primitives/radio/radio.html +17 -0
- package/src/primitives/reveal/reveal.css +167 -0
- package/src/primitives/select/multiselect.d.ts +43 -0
- package/src/primitives/select/multiselect.d.ts.map +1 -0
- package/src/primitives/select/multiselect.js +147 -0
- package/src/primitives/select/multiselect.ts +188 -0
- package/src/primitives/select/select-align.html +49 -0
- package/src/primitives/select/select-multiple.html +12 -0
- package/src/primitives/select/select-sides.html +65 -0
- package/src/primitives/select/select.css +481 -0
- package/src/primitives/select/select.html +16 -0
- package/src/primitives/separator/separator.css +49 -0
- package/src/primitives/separator/separator.html +16 -0
- package/src/primitives/slider/slider.css +122 -0
- package/src/primitives/slider/slider.html +1 -0
- package/src/primitives/switch/switch.css +126 -0
- package/src/primitives/switch/switch.html +13 -0
- package/src/primitives/table/table-alternating.html +36 -0
- package/src/primitives/table/table-grid.html +30 -0
- package/src/primitives/table/table-size-sm.html +26 -0
- package/src/primitives/table/table.css +158 -0
- package/src/primitives/table/table.html +45 -0
- package/src/primitives/tabs/tabs.css +328 -0
- package/src/primitives/tabs/tabs.d.ts +35 -0
- package/src/primitives/tabs/tabs.d.ts.map +1 -0
- package/src/primitives/tabs/tabs.html +75 -0
- package/src/primitives/tabs/tabs.js +84 -0
- package/src/primitives/tabs/tabs.ts +93 -0
- package/src/primitives/textarea/textarea.css +78 -0
- package/src/primitives/textarea/textarea.html +10 -0
- package/src/primitives/toaster/toaster.css +309 -0
- package/src/primitives/toaster/toaster.d.ts +138 -0
- package/src/primitives/toaster/toaster.d.ts.map +1 -0
- package/src/primitives/toaster/toaster.html +77 -0
- package/src/primitives/toaster/toaster.js +736 -0
- package/src/primitives/toaster/toaster.ts +823 -0
- package/src/primitives/toggle/toggle.css +295 -0
- package/src/primitives/toggle/toggle.html +68 -0
- package/src/primitives/toggle-group/toggle-group-multiple.html +14 -0
- package/src/primitives/toggle-group/toggle-group-vertical.html +14 -0
- package/src/primitives/toggle-group/toggle-group.css +73 -0
- package/src/primitives/toggle-group/toggle-group.html +53 -0
- package/src/primitives/toolbar/toolbar.html +45 -0
- package/src/primitives/tooltip/tooltip-disabled.html +19 -0
- package/src/primitives/tooltip/tooltip-sides.html +57 -0
- package/src/primitives/tooltip/tooltip-with-kbd.html +31 -0
- package/src/primitives/tooltip/tooltip.css +235 -0
- package/src/primitives/tooltip/tooltip.html +12 -0
- package/src/primitives/utilities/aspect-ratio.html +17 -0
- package/src/primitives/utilities/basis.html +27 -0
- package/src/primitives/utilities/col-span.html +23 -0
- package/src/primitives/utilities/compose.html +19 -0
- package/src/primitives/utilities/flex-align.html +26 -0
- package/src/primitives/utilities/flex-direction.html +36 -0
- package/src/primitives/utilities/flex-grow.html +17 -0
- package/src/primitives/utilities/gap.html +62 -0
- package/src/primitives/utilities/grid-cols.html +20 -0
- package/src/primitives/utilities/grid-pile.html +5 -0
- package/src/primitives/utilities/grid-responsive.html +31 -0
- package/src/primitives/utilities/margin-auto.html +13 -0
- package/src/primitives/utilities/object-fit.html +41 -0
- package/src/primitives/utilities/order.html +17 -0
- package/src/primitives/utilities/overflow.html +26 -0
- package/src/primitives/utilities/padding-compose.html +23 -0
- package/src/primitives/utilities/padding.html +30 -0
- package/src/primitives/utilities/position.html +13 -0
- package/src/primitives/utilities/responsive-flex.html +22 -0
- package/src/primitives/utilities/responsive-grid.html +31 -0
- package/src/primitives/utilities/size.html +22 -0
- package/src/primitives/utilities/width.html +22 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* button.css — Button (.ui-button)
|
|
3
|
+
*
|
|
4
|
+
* @layer variables, components
|
|
5
|
+
* @requires layers.css, _variables.css, _reset.css, kbd.css (--ui-kbd-*)
|
|
6
|
+
* @uses color-mix(), oklch(from …) — variant hover/active tints
|
|
7
|
+
* @uses text-box — vertical trim (patchy browser support)
|
|
8
|
+
* @tokens --ui-button-* (@layer variables)
|
|
9
|
+
* @consumedby toggle.css (reads the --ui-button-* token family)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer variables {
|
|
13
|
+
:root {
|
|
14
|
+
--ui-button-ring-color: var(--ring-color);
|
|
15
|
+
|
|
16
|
+
--ui-button-font-family: var(--font-family-body);
|
|
17
|
+
--ui-button-font-size: var(--font-size-sm);
|
|
18
|
+
--ui-button-font-weight: var(--font-weight-strong);
|
|
19
|
+
--ui-button-line-height: 1;
|
|
20
|
+
|
|
21
|
+
--ui-button-background: var(--card);
|
|
22
|
+
--ui-button-background--hover: var(--muted);
|
|
23
|
+
--ui-button-background--active: oklch(from var(--muted) l c h / calc(alpha - 0.02));
|
|
24
|
+
|
|
25
|
+
--ui-button-foreground: var(--foreground);
|
|
26
|
+
--ui-button-foreground--hover: var(--foreground);
|
|
27
|
+
--ui-button-foreground--active: var(--foreground);
|
|
28
|
+
|
|
29
|
+
--ui-button-border: 1px solid var(--border);
|
|
30
|
+
--ui-button-border--hover: 1px solid var(--border);
|
|
31
|
+
--ui-button-border--active: 1px solid var(--border);
|
|
32
|
+
|
|
33
|
+
--ui-button-gap: var(--step-1);
|
|
34
|
+
--ui-button-padding: var(--step-2_5);
|
|
35
|
+
--ui-button-height: var(--step-8);
|
|
36
|
+
--ui-button-radius: var(--radius-md);
|
|
37
|
+
|
|
38
|
+
--ui-button-icon-size: var(--step-4);
|
|
39
|
+
|
|
40
|
+
/* composes into the button's box-shadow list — use a transparent shadow,
|
|
41
|
+
never `none`, so the focus ring layers stay valid */
|
|
42
|
+
--ui-button-shadow: 0 0 transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@layer zazz.components {
|
|
47
|
+
/* ===========================================================================
|
|
48
|
+
BUTTON
|
|
49
|
+
=========================================================================== */
|
|
50
|
+
|
|
51
|
+
.ui-button {
|
|
52
|
+
font-family: var(--ui-button-font-family);
|
|
53
|
+
font-size: var(--ui-button-font-size);
|
|
54
|
+
font-weight: var(--ui-button-font-weight);
|
|
55
|
+
line-height: var(--ui-button-line-height);
|
|
56
|
+
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
column-gap: var(--ui-button-gap);
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
|
|
63
|
+
min-block-size: var(--ui-button-height);
|
|
64
|
+
min-inline-size: max-content;
|
|
65
|
+
padding-inline: var(--ui-button-padding);
|
|
66
|
+
|
|
67
|
+
border: var(--ui-button-border);
|
|
68
|
+
border-radius: var(--ui-button-radius);
|
|
69
|
+
|
|
70
|
+
color: var(--ui-button-foreground);
|
|
71
|
+
background-color: var(--ui-button-background);
|
|
72
|
+
background-clip: padding-box;
|
|
73
|
+
|
|
74
|
+
/* ring renders as box-shadow so it composes with --ui-button-shadow; the
|
|
75
|
+
ring widths animate from 0 so the ring grows in smoothly on focus */
|
|
76
|
+
--_ring-offset-width: 0px;
|
|
77
|
+
--_ring-width: 0px;
|
|
78
|
+
--_ring: color-mix(in oklch, var(--ui-button-ring-color) var(--ring-opacity), transparent);
|
|
79
|
+
box-shadow:
|
|
80
|
+
0 0 0 var(--_ring-offset-width) var(--ring-offset-color),
|
|
81
|
+
0 0 0 calc(var(--_ring-offset-width) + var(--_ring-width)) var(--_ring, var(--ring)),
|
|
82
|
+
var(--ui-button-shadow);
|
|
83
|
+
|
|
84
|
+
cursor: default;
|
|
85
|
+
text-decoration: none;
|
|
86
|
+
|
|
87
|
+
/* transparent twin of the ring for forced-colors / high-contrast modes */
|
|
88
|
+
outline: var(--outline-width) var(--outline-style) transparent;
|
|
89
|
+
outline-offset: var(--outline-offset);
|
|
90
|
+
|
|
91
|
+
transition: var(--default-transition);
|
|
92
|
+
|
|
93
|
+
user-select: none;
|
|
94
|
+
text-box: trim-both ex alphabetic;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
a[href] .ui-button:not(:disabled, [aria-disabled="true"]),
|
|
98
|
+
a[href].ui-button:not(:disabled, [aria-disabled="true"]) {
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ===========================================================================
|
|
103
|
+
BUTTON STATES
|
|
104
|
+
=========================================================================== */
|
|
105
|
+
|
|
106
|
+
.ui-button:hover:not(:disabled, [aria-disabled="true"]) {
|
|
107
|
+
color: var(--ui-button-foreground--hover);
|
|
108
|
+
background-color: var(--ui-button-background--hover);
|
|
109
|
+
border: var(--ui-button-border--hover);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ui-button:active:not(:disabled, [aria-disabled="true"]) {
|
|
113
|
+
color: var(--ui-button-foreground--active);
|
|
114
|
+
background-color: var(--ui-button-background--active);
|
|
115
|
+
border: var(--ui-button-border--active);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ui-button:focus-visible:not(:disabled, [aria-disabled="true"]) {
|
|
119
|
+
--_ring-offset-width: var(--ring-offset-width);
|
|
120
|
+
--_ring-width: var(--ring-width);
|
|
121
|
+
|
|
122
|
+
outline-color: transparent;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:is(.ui-button:disabled, .ui-button[aria-disabled="true"]) {
|
|
126
|
+
--ui-button-foreground: var(--muted-foreground);
|
|
127
|
+
--ui-button-background: var(--muted);
|
|
128
|
+
--ui-button-shadow: 0 0 transparent;
|
|
129
|
+
--decoration-line: none;
|
|
130
|
+
|
|
131
|
+
cursor: default;
|
|
132
|
+
opacity: 0.5;
|
|
133
|
+
outline: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ui-button[aria-busy="true"] {
|
|
137
|
+
cursor: progress;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ===========================================================================
|
|
141
|
+
BUTTON ICONS
|
|
142
|
+
=========================================================================== */
|
|
143
|
+
|
|
144
|
+
.ui-button > svg {
|
|
145
|
+
inline-size: var(--ui-button-icon-size);
|
|
146
|
+
block-size: var(--ui-button-icon-size);
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
align-items: center;
|
|
150
|
+
display: flex;
|
|
151
|
+
padding: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* ===========================================================================
|
|
155
|
+
BUTTON VARIANTS
|
|
156
|
+
=========================================================================== */
|
|
157
|
+
|
|
158
|
+
.ui-button[data-variant="primary"] {
|
|
159
|
+
--ui-button-background: var(--primary);
|
|
160
|
+
--ui-button-background--hover: oklch(from var(--primary) l c h / 0.9);
|
|
161
|
+
--ui-button-background--active: oklch(from var(--primary) l c h / 0.8);
|
|
162
|
+
|
|
163
|
+
--ui-button-foreground: var(--primary-foreground);
|
|
164
|
+
--ui-button-foreground--hover: var(--primary-foreground);
|
|
165
|
+
--ui-button-foreground--active: var(--primary-foreground);
|
|
166
|
+
|
|
167
|
+
--ui-button-border: 1px solid transparent;
|
|
168
|
+
--ui-button-border--hover: 1px solid transparent;
|
|
169
|
+
--ui-button-border--active: 1px solid transparent;
|
|
170
|
+
|
|
171
|
+
--ui-button-shadow: 0 0 transparent;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ui-button[data-variant="muted"] {
|
|
175
|
+
--ui-button-background: var(--muted);
|
|
176
|
+
--ui-button-background--hover: oklch(from var(--muted) l c h / calc(alpha - 0.02));
|
|
177
|
+
--ui-button-background--active: var(--muted);
|
|
178
|
+
|
|
179
|
+
--ui-button-foreground: var(--foreground);
|
|
180
|
+
--ui-button-foreground--hover: var(--foreground);
|
|
181
|
+
--ui-button-foreground--active: var(--foreground);
|
|
182
|
+
|
|
183
|
+
--ui-button-border: 1px solid transparent;
|
|
184
|
+
--ui-button-border--hover: 1px solid transparent;
|
|
185
|
+
--ui-button-border--active: 1px solid transparent;
|
|
186
|
+
|
|
187
|
+
--ui-button-shadow: 0 0 transparent;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ui-button[data-variant="ghost"] {
|
|
191
|
+
--ui-button-background: transparent;
|
|
192
|
+
--ui-button-background--hover: var(--muted);
|
|
193
|
+
--ui-button-background--active: oklch(from var(--muted) l c h / calc(alpha - 0.02));
|
|
194
|
+
|
|
195
|
+
--ui-button-foreground: var(--foreground);
|
|
196
|
+
--ui-button-foreground--hover: var(--foreground);
|
|
197
|
+
--ui-button-foreground--active: var(--foreground);
|
|
198
|
+
|
|
199
|
+
--ui-button-border: 1px solid transparent;
|
|
200
|
+
--ui-button-border--hover: 1px solid transparent;
|
|
201
|
+
--ui-button-border--active: 1px solid transparent;
|
|
202
|
+
|
|
203
|
+
--ui-button-shadow: 0 0 transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.ui-button[data-variant="destructive"] {
|
|
207
|
+
--ui-button-ring-color: var(--destructive);
|
|
208
|
+
|
|
209
|
+
--ui-button-background: var(--destructive);
|
|
210
|
+
--ui-button-background--hover: oklch(from var(--destructive) l c h / 0.9);
|
|
211
|
+
--ui-button-background--active: oklch(from var(--destructive) l c h / 0.8);
|
|
212
|
+
|
|
213
|
+
--ui-button-foreground: var(--destructive-foreground);
|
|
214
|
+
--ui-button-foreground--hover: var(--destructive-foreground);
|
|
215
|
+
--ui-button-foreground--active: var(--destructive-foreground);
|
|
216
|
+
|
|
217
|
+
--ui-button-border: 1px solid var(--destructive);
|
|
218
|
+
--ui-button-border--hover: 1px solid var(--destructive);
|
|
219
|
+
--ui-button-border--active: 1px solid var(--destructive);
|
|
220
|
+
|
|
221
|
+
--ui-button-shadow: 0 0 transparent;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ui-button[data-variant="link"] {
|
|
225
|
+
--ui-button-background: transparent;
|
|
226
|
+
--ui-button-background--hover: transparent;
|
|
227
|
+
--ui-button-background--active: transparent;
|
|
228
|
+
|
|
229
|
+
--ui-button-foreground: var(--foreground);
|
|
230
|
+
--ui-button-foreground--hover: var(--primary);
|
|
231
|
+
--ui-button-foreground--active: oklch(from var(--primary) l c h / 0.8);
|
|
232
|
+
|
|
233
|
+
--ui-button-border: none;
|
|
234
|
+
--ui-button-border--hover: none;
|
|
235
|
+
--ui-button-border--active: none;
|
|
236
|
+
|
|
237
|
+
--ui-button-height: fit-content;
|
|
238
|
+
--ui-button-padding: 0;
|
|
239
|
+
--ui-button-radius: 0;
|
|
240
|
+
|
|
241
|
+
--ui-button-shadow: 0 0 transparent;
|
|
242
|
+
|
|
243
|
+
text-decoration-line: var(--decoration-line);
|
|
244
|
+
text-decoration-style: var(--decoration-style);
|
|
245
|
+
text-decoration-color: var(--decoration-color);
|
|
246
|
+
text-underline-offset: var(--decoration-offset);
|
|
247
|
+
text-decoration-thickness: var(--decoration-thickness);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.ui-button[data-variant="link"]:hover:not(:disabled, [aria-disabled="true"]) {
|
|
251
|
+
text-decoration-color: var(--decoration-color--hover);
|
|
252
|
+
text-underline-offset: var(--decoration-offset--hover);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.ui-button[data-variant="link"]:active:not(:disabled, [aria-disabled="true"]) {
|
|
256
|
+
text-decoration-color: var(--decoration-color--active);
|
|
257
|
+
text-underline-offset: var(--decoration-offset--active);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* ===========================================================================
|
|
261
|
+
BUTTON SIZES
|
|
262
|
+
=========================================================================== */
|
|
263
|
+
|
|
264
|
+
.ui-button[data-size="sm"] {
|
|
265
|
+
--ui-button-height: var(--step-6);
|
|
266
|
+
--ui-button-padding: var(--step-2);
|
|
267
|
+
--ui-button-radius: var(--radius-sm);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ui-button[data-size="icon"] {
|
|
271
|
+
block-size: var(--ui-button-height);
|
|
272
|
+
inline-size: var(--ui-button-height);
|
|
273
|
+
padding: 0;
|
|
274
|
+
aspect-ratio: 1 / 1;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ui-button[data-size="icon-sm"] {
|
|
278
|
+
--ui-button-height: var(--step-6);
|
|
279
|
+
--ui-button-padding: var(--step-2);
|
|
280
|
+
--ui-button-radius: var(--radius-sm);
|
|
281
|
+
--ui-button-icon-size: var(--step-3_5);
|
|
282
|
+
|
|
283
|
+
block-size: var(--ui-button-height);
|
|
284
|
+
inline-size: var(--ui-button-height);
|
|
285
|
+
padding: 0;
|
|
286
|
+
aspect-ratio: 1 / 1;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* ===========================================================================
|
|
290
|
+
BUTTON KBD
|
|
291
|
+
=========================================================================== */
|
|
292
|
+
|
|
293
|
+
/* Descendant (not child) so keys wrapped in a ui-kbd-group still resize */
|
|
294
|
+
.ui-button :where(kbd) {
|
|
295
|
+
--ui-kbd-min-inline-size: var(--step-4_5);
|
|
296
|
+
--ui-kbd-min-block-size: var(--step-4_5);
|
|
297
|
+
--ui-kbd-icon-size: var(--step-3);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.ui-button:has(> :where(kbd, ui-kbd-group, .ui-kbd-group):last-child:not(:only-child)) {
|
|
301
|
+
padding-inline-end: var(--step-1_5);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ui-button:has(> :where(kbd, ui-kbd-group, .ui-kbd-group):first-child:not(:only-child)) {
|
|
305
|
+
padding-inline-start: var(--step-1_5);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ui-button[data-size="sm"]:has(
|
|
309
|
+
> :where(kbd, ui-kbd-group, .ui-kbd-group):last-child:not(:only-child)
|
|
310
|
+
) {
|
|
311
|
+
padding-inline-end: var(--step-0_5);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.ui-button[data-size="sm"]:has(
|
|
315
|
+
> :where(kbd, ui-kbd-group, .ui-kbd-group):first-child:not(:only-child)
|
|
316
|
+
) {
|
|
317
|
+
padding-inline-start: var(--step-0_5);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<div class="flex items-center gap-sm">
|
|
2
|
+
<button class="ui-button" type="button">Default</button>
|
|
3
|
+
<button class="ui-button" data-variant="primary" type="button">Primary</button>
|
|
4
|
+
<button class="ui-button" data-variant="muted" type="button">Muted</button>
|
|
5
|
+
<button class="ui-button" data-variant="ghost" type="button">Ghost</button>
|
|
6
|
+
<button class="ui-button" data-variant="destructive" type="button">Destructive</button>
|
|
7
|
+
<button class="ui-button" data-variant="link" type="button">Link</button>
|
|
8
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<ui-button-group data-orientation="vertical" role="group" aria-label="View options">
|
|
2
|
+
<button class="ui-button" type="button">List</button>
|
|
3
|
+
<button class="ui-button" type="button">Board</button>
|
|
4
|
+
<button class="ui-button" type="button">Calendar</button>
|
|
5
|
+
<button class="ui-button" type="button">Timeline</button>
|
|
6
|
+
</ui-button-group>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* button-group.css: Button group (ui-button-group | .ui-button-group)
|
|
3
|
+
*
|
|
4
|
+
* @layer components
|
|
5
|
+
* @requires layers.css, _variables.css, button.css
|
|
6
|
+
* @uses :not(): first/last edge selection for shared-border collapse
|
|
7
|
+
* @uses logical border-radius longhands: RTL-safe corner rounding per orientation
|
|
8
|
+
* @uses flex-item z-index: raise the active control so its border/ring isn't clipped
|
|
9
|
+
* @see https://ui.shadcn.com/docs/components/base/button-group
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer variables {
|
|
13
|
+
:root {
|
|
14
|
+
--ui-button-group-radius: var(--ui-button-radius);
|
|
15
|
+
--ui-button-group-background: var(--card);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@layer zazz.components {
|
|
20
|
+
/* ===========================================================================
|
|
21
|
+
BUTTON GROUP
|
|
22
|
+
|
|
23
|
+
Joins adjacent controls (.ui-button, and any child it wraps) into a single
|
|
24
|
+
segmented unit. Children keep their own --ui-button-radius, so the outer corners
|
|
25
|
+
follow the buttons' size variant automatically; only the *inner* corners are
|
|
26
|
+
squared off and the doubled border is collapsed with a -1px overlap.
|
|
27
|
+
=========================================================================== */
|
|
28
|
+
|
|
29
|
+
:where(ui-button-group, .ui-button-group) {
|
|
30
|
+
display: flex;
|
|
31
|
+
inline-size: fit-content;
|
|
32
|
+
/* stretch so mixed-height children share one edge */
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
border-radius: var(--ui-button-group-radius);
|
|
35
|
+
overflow: clip;
|
|
36
|
+
background-color: var(--ui-button-group-background);
|
|
37
|
+
position: relative;
|
|
38
|
+
isolation: isolate;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* flex items honour z-index without positioning, but relative keeps the
|
|
42
|
+
stacking context robust across child types (inputs, selects, …) */
|
|
43
|
+
:where(ui-button-group, .ui-button-group) > * {
|
|
44
|
+
position: relative;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* the focused/hovered/pressed control floats above its neighbours so its
|
|
48
|
+
border and box-shadow ring paint over the overlapped edge */
|
|
49
|
+
:where(ui-button-group, .ui-button-group) > *:hover:not(:disabled, [aria-disabled="true"]),
|
|
50
|
+
:where(ui-button-group, .ui-button-group) > *:focus-visible,
|
|
51
|
+
:where(ui-button-group, .ui-button-group) > *:active:not(:disabled, [aria-disabled="true"]) {
|
|
52
|
+
z-index: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ===========================================================================
|
|
56
|
+
BUTTON GROUP: HORIZONTAL (default)
|
|
57
|
+
=========================================================================== */
|
|
58
|
+
|
|
59
|
+
:where(ui-button-group, .ui-button-group):not([data-orientation="vertical"]) {
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(ui-button-group, .ui-button-group):not([data-orientation="vertical"]) > :not(:last-child) {
|
|
64
|
+
border-start-end-radius: 0;
|
|
65
|
+
border-end-end-radius: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(ui-button-group, .ui-button-group):not([data-orientation="vertical"])
|
|
69
|
+
> :not(:first-child) {
|
|
70
|
+
/* pull onto the previous control's border so the seam is one line, not two */
|
|
71
|
+
margin-inline-start: -1px;
|
|
72
|
+
border-start-start-radius: 0;
|
|
73
|
+
border-end-start-radius: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ===========================================================================
|
|
77
|
+
BUTTON GROUP: VERTICAL
|
|
78
|
+
=========================================================================== */
|
|
79
|
+
|
|
80
|
+
:where(ui-button-group, .ui-button-group)[data-orientation="vertical"] {
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(ui-button-group, .ui-button-group)[data-orientation="vertical"] > :not(:last-child) {
|
|
85
|
+
border-end-start-radius: 0;
|
|
86
|
+
border-end-end-radius: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:where(ui-button-group, .ui-button-group)[data-orientation="vertical"] > :not(:first-child) {
|
|
90
|
+
margin-block-start: -1px;
|
|
91
|
+
border-start-start-radius: 0;
|
|
92
|
+
border-start-end-radius: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<div class="flex flex-col items-start gap-md">
|
|
2
|
+
<ui-button-group role="group" aria-label="Text alignment">
|
|
3
|
+
<button class="ui-button" type="button">Left</button>
|
|
4
|
+
<button class="ui-button" type="button">Center</button>
|
|
5
|
+
<button class="ui-button" type="button">Right</button>
|
|
6
|
+
</ui-button-group>
|
|
7
|
+
|
|
8
|
+
<ui-button-group role="group" aria-label="Pagination">
|
|
9
|
+
<button class="ui-button" data-variant="muted" type="button">Previous</button>
|
|
10
|
+
<button class="ui-button" data-variant="muted" type="button">1</button>
|
|
11
|
+
<button class="ui-button" data-variant="muted" type="button">2</button>
|
|
12
|
+
<button class="ui-button" data-variant="muted" type="button">3</button>
|
|
13
|
+
<button class="ui-button" data-variant="muted" type="button">Next</button>
|
|
14
|
+
</ui-button-group>
|
|
15
|
+
|
|
16
|
+
<ui-button-group role="group" aria-label="Formatting">
|
|
17
|
+
<button class="ui-button" data-size="icon" type="button" aria-label="Bold">
|
|
18
|
+
<svg
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
fill="none"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
stroke-width="2"
|
|
24
|
+
stroke-linecap="round"
|
|
25
|
+
stroke-linejoin="round"
|
|
26
|
+
aria-hidden="true"
|
|
27
|
+
>
|
|
28
|
+
<path d="M6 4h8a4 4 0 0 1 0 8H6z" />
|
|
29
|
+
<path d="M6 12h9a4 4 0 0 1 0 8H6z" />
|
|
30
|
+
</svg>
|
|
31
|
+
</button>
|
|
32
|
+
<button class="ui-button" data-size="icon" type="button" aria-label="Italic">
|
|
33
|
+
<svg
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
viewBox="0 0 24 24"
|
|
36
|
+
fill="none"
|
|
37
|
+
stroke="currentColor"
|
|
38
|
+
stroke-width="2"
|
|
39
|
+
stroke-linecap="round"
|
|
40
|
+
stroke-linejoin="round"
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
>
|
|
43
|
+
<line x1="19" y1="4" x2="10" y2="4" />
|
|
44
|
+
<line x1="14" y1="20" x2="5" y2="20" />
|
|
45
|
+
<line x1="15" y1="4" x2="9" y2="20" />
|
|
46
|
+
</svg>
|
|
47
|
+
</button>
|
|
48
|
+
<button class="ui-button" data-size="icon" type="button" aria-label="Underline">
|
|
49
|
+
<svg
|
|
50
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
51
|
+
viewBox="0 0 24 24"
|
|
52
|
+
fill="none"
|
|
53
|
+
stroke="currentColor"
|
|
54
|
+
stroke-width="2"
|
|
55
|
+
stroke-linecap="round"
|
|
56
|
+
stroke-linejoin="round"
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
>
|
|
59
|
+
<path d="M6 4v6a6 6 0 0 0 12 0V4" />
|
|
60
|
+
<line x1="4" y1="20" x2="20" y2="20" />
|
|
61
|
+
</svg>
|
|
62
|
+
</button>
|
|
63
|
+
</ui-button-group>
|
|
64
|
+
</div>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<div class="grid grid-rows-3 grid-cols-2 gap-md">
|
|
2
|
+
<a class="grid grid-rows-subgrid row-span-3 cursor-pointer" href="#">
|
|
3
|
+
<div
|
|
4
|
+
class="grid grid-rows-subgrid row-span-3 gap-sm bg-card text-card-foreground rounded-md shadow-sm overflow-clip"
|
|
5
|
+
>
|
|
6
|
+
<figure class="grid grid-rows-subgrid row-span-1 aspect-landscape rounded-t-md overflow-clip">
|
|
7
|
+
<img
|
|
8
|
+
class="size-full object-cover hover:scale-102 hover:opacity-75 transition"
|
|
9
|
+
width="300"
|
|
10
|
+
height="200"
|
|
11
|
+
loading="lazy"
|
|
12
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=300&h=200&q=60"
|
|
13
|
+
alt="Elephants crossing a dusty riverbed"
|
|
14
|
+
/>
|
|
15
|
+
</figure>
|
|
16
|
+
<div class="grid grid-rows-subgrid row-span-2 gap-sm px-sm pb-sm">
|
|
17
|
+
<header class="grid gap-xs">
|
|
18
|
+
<div class="flex items-center gap-xs">
|
|
19
|
+
<span class="ui-badge" data-variant="muted">Research</span>
|
|
20
|
+
</div>
|
|
21
|
+
<hgroup class="grid gap-xs">
|
|
22
|
+
<h3 class="text-lg font-heading">Migration patterns</h3>
|
|
23
|
+
<p class="text-sm text-muted-foreground line-clamp-2">
|
|
24
|
+
Satellite collars reveal ancient routes herds still follow each dry season across the
|
|
25
|
+
floodplain.
|
|
26
|
+
</p>
|
|
27
|
+
</hgroup>
|
|
28
|
+
</header>
|
|
29
|
+
<footer class="grid justify-start gap-sm pt-sm border-t">
|
|
30
|
+
<div class="flex items-center gap-xs">
|
|
31
|
+
<figure
|
|
32
|
+
class="grid grid-area-pile border size-lg rounded-full overflow-clip"
|
|
33
|
+
role="img"
|
|
34
|
+
>
|
|
35
|
+
<img
|
|
36
|
+
class="size-full object-cover order-last bg-transparent"
|
|
37
|
+
width="64"
|
|
38
|
+
height="64"
|
|
39
|
+
loading="lazy"
|
|
40
|
+
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=facearea&facepad=2&w=64&h=64&q=90"
|
|
41
|
+
alt="John Doe"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
/>
|
|
44
|
+
<figcaption
|
|
45
|
+
class="order-first size-full bg-primary text-primary-foreground flex items-center justify-center text-center text-md font-strong"
|
|
46
|
+
>
|
|
47
|
+
<span class="sr-only">John Doe</span>
|
|
48
|
+
<span aria-hidden="true">JD</span>
|
|
49
|
+
</figcaption>
|
|
50
|
+
</figure>
|
|
51
|
+
<div class="flex flex-col">
|
|
52
|
+
<span class="text-sm font-strong leading-none">John Doe</span>
|
|
53
|
+
<span class="text-xs text-muted-foreground">Founder, ACME Inc.</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</footer>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</a>
|
|
60
|
+
|
|
61
|
+
<a class="grid grid-rows-subgrid row-span-3 cursor-pointer" href="#">
|
|
62
|
+
<div
|
|
63
|
+
class="grid grid-rows-subgrid row-span-3 gap-sm bg-card text-card-foreground rounded-md shadow-sm overflow-clip"
|
|
64
|
+
>
|
|
65
|
+
<figure class="grid grid-rows-subgrid row-span-1 aspect-landscape rounded-t-md overflow-clip">
|
|
66
|
+
<img
|
|
67
|
+
class="size-full object-cover hover:scale-102 hover:opacity-75 transition"
|
|
68
|
+
width="300"
|
|
69
|
+
height="200"
|
|
70
|
+
loading="lazy"
|
|
71
|
+
src="https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=300&h=200&q=60"
|
|
72
|
+
alt="Zebras grazing at dawn on the savanna"
|
|
73
|
+
/>
|
|
74
|
+
</figure>
|
|
75
|
+
<div class="grid grid-rows-subgrid row-span-2 gap-sm px-sm pb-sm">
|
|
76
|
+
<header class="grid gap-xs">
|
|
77
|
+
<div class="flex items-center gap-xs">
|
|
78
|
+
<span class="ui-badge" data-variant="muted">Field notes</span>
|
|
79
|
+
</div>
|
|
80
|
+
<hgroup class="grid gap-xs">
|
|
81
|
+
<h3 class="text-lg font-heading">How quickly zebras jump</h3>
|
|
82
|
+
<p class="text-sm text-muted-foreground line-clamp-2">
|
|
83
|
+
Striped coats and sudden bursts of speed help herds evade predators when the
|
|
84
|
+
grasslands go quiet at dusk.
|
|
85
|
+
</p>
|
|
86
|
+
</hgroup>
|
|
87
|
+
</header>
|
|
88
|
+
<footer class="grid justify-end gap-sm pb-xs pt-sm border-t">
|
|
89
|
+
<div class="ui-button" data-variant="link">
|
|
90
|
+
Read article
|
|
91
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
|
92
|
+
<rect width="256" height="256" fill="none" />
|
|
93
|
+
<line
|
|
94
|
+
x1="40"
|
|
95
|
+
y1="128"
|
|
96
|
+
x2="216"
|
|
97
|
+
y2="128"
|
|
98
|
+
fill="none"
|
|
99
|
+
stroke="currentColor"
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round"
|
|
102
|
+
stroke-width="16"
|
|
103
|
+
/>
|
|
104
|
+
<polyline
|
|
105
|
+
points="144 56 216 128 144 200"
|
|
106
|
+
fill="none"
|
|
107
|
+
stroke="currentColor"
|
|
108
|
+
stroke-linecap="round"
|
|
109
|
+
stroke-linejoin="round"
|
|
110
|
+
stroke-width="16"
|
|
111
|
+
/>
|
|
112
|
+
</svg>
|
|
113
|
+
</div>
|
|
114
|
+
</footer>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</a>
|
|
118
|
+
</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<a class="grid cursor-pointer" href="#">
|
|
2
|
+
<div class="grid gap-sm bg-card text-card-foreground rounded-md shadow-sm overflow-clip">
|
|
3
|
+
<figure class="grid aspect-landscape rounded-t-md overflow-clip">
|
|
4
|
+
<img
|
|
5
|
+
class="size-full object-cover hover:scale-102 hover:opacity-75 transition"
|
|
6
|
+
width="300"
|
|
7
|
+
height="200"
|
|
8
|
+
loading="lazy"
|
|
9
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=300&h=200&q=60"
|
|
10
|
+
alt="Elephants crossing a dusty riverbed"
|
|
11
|
+
/>
|
|
12
|
+
</figure>
|
|
13
|
+
<div class="grid gap-sm px-sm pb-sm">
|
|
14
|
+
<header class="grid gap-xs">
|
|
15
|
+
<div class="flex items-center gap-xs">
|
|
16
|
+
<span class="ui-badge" data-variant="muted">Research</span>
|
|
17
|
+
</div>
|
|
18
|
+
<hgroup class="grid gap-xs">
|
|
19
|
+
<h3 class="text-lg font-heading">Migration patterns</h3>
|
|
20
|
+
<p class="text-sm text-muted-foreground line-clamp-2">
|
|
21
|
+
Satellite collars reveal ancient routes herds still follow each dry season across the
|
|
22
|
+
floodplain.
|
|
23
|
+
</p>
|
|
24
|
+
</hgroup>
|
|
25
|
+
</header>
|
|
26
|
+
<footer class="grid justify-start gap-sm pt-sm border-t">
|
|
27
|
+
<div class="flex items-center gap-xs">
|
|
28
|
+
<figure class="grid grid-area-pile border size-lg rounded-full overflow-clip" role="img">
|
|
29
|
+
<img
|
|
30
|
+
class="size-full object-cover order-last bg-transparent"
|
|
31
|
+
width="64"
|
|
32
|
+
height="64"
|
|
33
|
+
loading="lazy"
|
|
34
|
+
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=facearea&facepad=2&w=64&h=64&q=90"
|
|
35
|
+
alt="John Doe"
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
/>
|
|
38
|
+
<figcaption
|
|
39
|
+
class="order-first size-full bg-primary text-primary-foreground flex items-center justify-center text-center text-md font-strong"
|
|
40
|
+
>
|
|
41
|
+
<span class="sr-only">John Doe</span>
|
|
42
|
+
<span aria-hidden="true">JD</span>
|
|
43
|
+
</figcaption>
|
|
44
|
+
</figure>
|
|
45
|
+
<div class="flex flex-col">
|
|
46
|
+
<span class="text-sm font-strong leading-none">John Doe</span>
|
|
47
|
+
<span class="text-xs text-muted-foreground">Founder, ACME Inc.</span>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</footer>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</a>
|