@auvyx/ui 0.0.0-stage → 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.
Files changed (143) hide show
  1. package/LICENSE +48 -0
  2. package/README.md +43 -2
  3. package/dist/auvyx.bundle.css +5941 -0
  4. package/dist/auvyx.chart.min.js +2 -0
  5. package/dist/auvyx.corners.min.js +2 -0
  6. package/dist/auvyx.css +10880 -0
  7. package/dist/auvyx.js +3222 -0
  8. package/dist/auvyx.min.css +2 -0
  9. package/dist/auvyx.min.js +19 -0
  10. package/dist/custom-elements.json +948 -0
  11. package/dist/elements/calendar.min.js +2 -0
  12. package/dist/elements/context-menu.min.js +2 -0
  13. package/dist/elements/data-table.min.js +2 -0
  14. package/dist/elements/date-picker.min.js +2 -0
  15. package/dist/elements/index.min.js +2 -0
  16. package/dist/elements/menu.min.js +2 -0
  17. package/dist/elements/resizable.min.js +2 -0
  18. package/dist/js/accordion.min.js +2 -0
  19. package/dist/js/calendar.min.js +2 -0
  20. package/dist/js/combobox.min.js +2 -0
  21. package/dist/js/command.min.js +2 -0
  22. package/dist/js/context-menu.min.js +2 -0
  23. package/dist/js/copy.min.js +2 -0
  24. package/dist/js/data-table.min.js +2 -0
  25. package/dist/js/date-picker.min.js +2 -0
  26. package/dist/js/drawer.min.js +2 -0
  27. package/dist/js/dropdown-menu.min.js +2 -0
  28. package/dist/js/manifest.json +114 -0
  29. package/dist/js/menu.min.js +2 -0
  30. package/dist/js/popover.min.js +2 -0
  31. package/dist/js/resizable.min.js +2 -0
  32. package/dist/js/select.min.js +2 -0
  33. package/dist/js/sidebar.min.js +2 -0
  34. package/dist/js/slider.min.js +2 -0
  35. package/dist/js/tabs.min.js +2 -0
  36. package/dist/js/toast.min.js +19 -0
  37. package/dist/styles/auvyx-luma.min.css +3 -0
  38. package/dist/styles/auvyx-lyra.min.css +3 -0
  39. package/dist/styles/auvyx-maia.min.css +3 -0
  40. package/dist/styles/auvyx-mira.min.css +3 -0
  41. package/dist/styles/auvyx-nova.min.css +3 -0
  42. package/dist/styles/auvyx-rhea.min.css +3 -0
  43. package/dist/styles/auvyx-sera.min.css +3 -0
  44. package/dist/styles/auvyx-vega.min.css +3 -0
  45. package/dist/types/elements.d.ts +262 -0
  46. package/dist/types/react.d.ts +181 -0
  47. package/dist/types/vue.d.ts +155 -0
  48. package/dist/ui/accordion.css +91 -0
  49. package/dist/ui/accordion.js +249 -0
  50. package/dist/ui/accordion.native.css +24 -0
  51. package/dist/ui/alert.css +119 -0
  52. package/dist/ui/aspect-ratio.css +38 -0
  53. package/dist/ui/attachment.css +211 -0
  54. package/dist/ui/avatar.css +204 -0
  55. package/dist/ui/badge.css +183 -0
  56. package/dist/ui/base.css +1200 -0
  57. package/dist/ui/breadcrumb.css +90 -0
  58. package/dist/ui/bubble.css +171 -0
  59. package/dist/ui/button-group.css +110 -0
  60. package/dist/ui/button.css +328 -0
  61. package/dist/ui/calendar.css +260 -0
  62. package/dist/ui/calendar.js +317 -0
  63. package/dist/ui/card.css +126 -0
  64. package/dist/ui/carousel.css +172 -0
  65. package/dist/ui/chart.css +130 -0
  66. package/dist/ui/checkbox.css +119 -0
  67. package/dist/ui/code-block.css +235 -0
  68. package/dist/ui/combobox.css +500 -0
  69. package/dist/ui/combobox.js +757 -0
  70. package/dist/ui/command.css +366 -0
  71. package/dist/ui/command.js +382 -0
  72. package/dist/ui/context-menu.css +17 -0
  73. package/dist/ui/context-menu.js +52 -0
  74. package/dist/ui/copy.js +56 -0
  75. package/dist/ui/data-table.css +114 -0
  76. package/dist/ui/data-table.js +140 -0
  77. package/dist/ui/date-picker.css +14 -0
  78. package/dist/ui/date-picker.js +101 -0
  79. package/dist/ui/dialog.css +363 -0
  80. package/dist/ui/dialog.native.css +6 -0
  81. package/dist/ui/drawer.css +238 -0
  82. package/dist/ui/drawer.js +265 -0
  83. package/dist/ui/dropdown-menu.css +193 -0
  84. package/dist/ui/dropdown-menu.js +388 -0
  85. package/dist/ui/empty.css +111 -0
  86. package/dist/ui/field.css +293 -0
  87. package/dist/ui/hover-card.css +85 -0
  88. package/dist/ui/input-group.css +269 -0
  89. package/dist/ui/input-otp.css +101 -0
  90. package/dist/ui/input.css +117 -0
  91. package/dist/ui/item.css +223 -0
  92. package/dist/ui/kbd.css +50 -0
  93. package/dist/ui/label.css +48 -0
  94. package/dist/ui/manifest.json +667 -0
  95. package/dist/ui/marker.css +66 -0
  96. package/dist/ui/menu.js +161 -0
  97. package/dist/ui/menubar.css +55 -0
  98. package/dist/ui/message-scroller.css +83 -0
  99. package/dist/ui/message.css +69 -0
  100. package/dist/ui/native-select.css +130 -0
  101. package/dist/ui/navigation-menu.css +166 -0
  102. package/dist/ui/popover.css +154 -0
  103. package/dist/ui/popover.js +268 -0
  104. package/dist/ui/popover.native.css +84 -0
  105. package/dist/ui/progress.css +29 -0
  106. package/dist/ui/questionnaire.css +188 -0
  107. package/dist/ui/radio-group.css +115 -0
  108. package/dist/ui/resizable.css +94 -0
  109. package/dist/ui/resizable.js +95 -0
  110. package/dist/ui/scroll-area.css +43 -0
  111. package/dist/ui/select.css +289 -0
  112. package/dist/ui/select.js +646 -0
  113. package/dist/ui/sheet.css +219 -0
  114. package/dist/ui/sidebar.css +716 -0
  115. package/dist/ui/sidebar.js +287 -0
  116. package/dist/ui/skeleton.css +13 -0
  117. package/dist/ui/slider.css +184 -0
  118. package/dist/ui/slider.js +206 -0
  119. package/dist/ui/switch.css +156 -0
  120. package/dist/ui/table.css +157 -0
  121. package/dist/ui/tabs.css +240 -0
  122. package/dist/ui/tabs.js +288 -0
  123. package/dist/ui/textarea.css +91 -0
  124. package/dist/ui/toast.css +110 -0
  125. package/dist/ui/toast.js +378 -0
  126. package/dist/ui/toggle-group.css +42 -0
  127. package/dist/ui/toggle.css +150 -0
  128. package/dist/ui/tooltip.css +319 -0
  129. package/dist/ui/trace.css +142 -0
  130. package/dist/ui/typography.css +184 -0
  131. package/dist/wc/accordion.min.js +2 -0
  132. package/dist/wc/combobox.min.js +2 -0
  133. package/dist/wc/command.min.js +2 -0
  134. package/dist/wc/drawer.min.js +2 -0
  135. package/dist/wc/dropdown-menu.min.js +2 -0
  136. package/dist/wc/manifest.json +154 -0
  137. package/dist/wc/popover.min.js +2 -0
  138. package/dist/wc/select.min.js +2 -0
  139. package/dist/wc/sidebar.min.js +2 -0
  140. package/dist/wc/slider.min.js +2 -0
  141. package/dist/wc/tabs.min.js +2 -0
  142. package/dist/wc/toast.min.js +19 -0
  143. package/package.json +62 -4
@@ -0,0 +1,91 @@
1
+ /* @auvyx/ui accordion | order 1 */
2
+ @layer components {
3
+ .accordion {
4
+ display: flex;
5
+ width: 100%;
6
+ flex-direction: column;
7
+ }
8
+ .accordion > details > summary {
9
+ position: relative;
10
+ display: flex;
11
+ width: 100%;
12
+ flex: 1;
13
+ cursor: pointer;
14
+ list-style-type: none;
15
+ align-items: flex-start;
16
+ justify-content: space-between;
17
+ border-style: var(--tw-border-style);
18
+ border-width: 1px;
19
+ border-color: transparent;
20
+ transition-property: all;
21
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
22
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
23
+ --tw-outline-style: none;
24
+ outline-style: none;
25
+ }
26
+ .accordion > details > summary > svg:last-child {
27
+ pointer-events: none;
28
+ flex-shrink: 0;
29
+ transition-property: transform, translate, scale, rotate;
30
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
31
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
32
+ }
33
+ .accordion > details[open] > summary > svg:last-child {
34
+ rotate: 180deg;
35
+ }
36
+ .accordion > details[aria-disabled='true'] > summary, .accordion > details > summary[aria-disabled='true'] {
37
+ pointer-events: none;
38
+ opacity: 50%;
39
+ }
40
+ .accordion > details > :not(summary) {
41
+ overflow: hidden;
42
+ }
43
+ }
44
+
45
+ @layer components {
46
+ .accordion > details {
47
+ &:not(*:last-child) {
48
+ border-bottom-style: var(--tw-border-style);
49
+ border-bottom-width: 1px;
50
+ }
51
+ }
52
+ .accordion > details > summary {
53
+ border-radius: var(--radius-md);
54
+ padding-block: calc(var(--spacing) * 4);
55
+ text-align: left;
56
+ font-size: var(--text-sm);
57
+ line-height: var(--tw-leading, var(--text-sm--line-height));
58
+ --tw-font-weight: var(--font-weight-medium);
59
+ font-weight: var(--font-weight-medium);
60
+ &:hover {
61
+ @media (hover: hover) {
62
+ text-decoration-line: underline;
63
+ }
64
+ }
65
+ &:focus-visible {
66
+ border-color: var(--color-ring);
67
+ }
68
+ &:focus-visible {
69
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
70
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
71
+ }
72
+ &:focus-visible {
73
+ --tw-ring-color: var(--color-ring);
74
+ @supports (color: color-mix(in lab, red, red)) {
75
+ --tw-ring-color: color-mix(in oklab, var(--color-ring) 50%, transparent);
76
+ }
77
+ }
78
+ }
79
+ .accordion > details > summary > svg:last-child {
80
+ margin-inline-start: auto;
81
+ width: calc(var(--spacing) * 4);
82
+ height: calc(var(--spacing) * 4);
83
+ color: var(--color-muted-foreground);
84
+ }
85
+ .accordion > details > :not(summary) {
86
+ padding-top: 0;
87
+ padding-bottom: calc(var(--spacing) * 4);
88
+ font-size: var(--text-sm);
89
+ line-height: var(--tw-leading, var(--text-sm--line-height));
90
+ }
91
+ }
@@ -0,0 +1,249 @@
1
+ /* @auvyx/ui v0.1.0 | MIT | based on Basecoat (MIT) */
2
+ // Basecoat core, once per page.
3
+ if (!window.basecoat) (() => {
4
+ const componentRegistry = {};
5
+ let observer = null;
6
+
7
+ const registerComponent = (name, selectorOrOptions, initFunction) => {
8
+ const options = typeof selectorOrOptions === 'object'
9
+ ? selectorOrOptions
10
+ : { selector: selectorOrOptions, init: initFunction };
11
+
12
+ componentRegistry[name] = {
13
+ selector: options.selector,
14
+ init: options.init,
15
+ refresh: options.refresh,
16
+ };
17
+ };
18
+
19
+ const initComponent = (element, componentName) => {
20
+ const component = componentRegistry[componentName];
21
+ if (!component) return;
22
+
23
+ try {
24
+ component.init(element);
25
+ if (element.hasAttribute(`data-${componentName}-initialized`)) {
26
+ element.dataset.basecoatComponent = componentName;
27
+ }
28
+ } catch (error) {
29
+ console.error(`Failed to initialize ${componentName}:`, error);
30
+ if (typeof element._destroy === 'function') {
31
+ try {
32
+ element._destroy();
33
+ } catch (destroyError) {
34
+ console.error(`Failed to clean up ${componentName} after initialization error:`, destroyError);
35
+ }
36
+ }
37
+ delete element._destroy;
38
+ element.removeAttribute(`data-${componentName}-initialized`);
39
+ delete element.dataset.basecoatComponent;
40
+ }
41
+ };
42
+
43
+ const destroyComponent = (element) => {
44
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) return;
45
+ const componentName = element.dataset?.basecoatComponent;
46
+
47
+ if (typeof element._destroy === 'function') {
48
+ try {
49
+ element._destroy();
50
+ } catch (error) {
51
+ console.error('Failed to destroy Basecoat component:', error);
52
+ }
53
+ }
54
+
55
+ delete element._destroy;
56
+ if (componentName) element.removeAttribute(`data-${componentName}-initialized`);
57
+ delete element.dataset.basecoatComponent;
58
+ };
59
+
60
+ const destroyRemovedComponents = (node) => {
61
+ if (node.nodeType !== Node.ELEMENT_NODE) return;
62
+ if (node.isConnected) return;
63
+
64
+ if (node.dataset?.basecoatComponent) destroyComponent(node);
65
+ node.querySelectorAll('[data-basecoat-component]').forEach(destroyComponent);
66
+ };
67
+
68
+ const uniqueElements = (elements) => Array.from(new Set(elements));
69
+
70
+ const getComponentElements = (componentName, selector, force = false) => {
71
+ const elements = Array.from(document.querySelectorAll(selector));
72
+ if (force) {
73
+ elements.push(...document.querySelectorAll(`[data-basecoat-component="${componentName}"]`));
74
+ }
75
+ return uniqueElements(elements);
76
+ };
77
+
78
+ const initAllComponents = (options = {}) => {
79
+ const force = options.force === true;
80
+ Object.entries(componentRegistry).forEach(([name, { selector }]) => {
81
+ getComponentElements(name, selector, force).forEach((element) => {
82
+ const wasComponent = element.dataset?.basecoatComponent === name;
83
+ if (force) destroyComponent(element);
84
+ if (wasComponent || element.matches(selector)) initComponent(element, name);
85
+ });
86
+ });
87
+ };
88
+
89
+ const initNewComponents = (node) => {
90
+ if (node.nodeType !== Node.ELEMENT_NODE) return;
91
+
92
+ Object.entries(componentRegistry).forEach(([name, { selector }]) => {
93
+ if (node.matches(selector)) initComponent(node, name);
94
+ node.querySelectorAll(selector).forEach(element => initComponent(element, name));
95
+ });
96
+ };
97
+
98
+ const refreshComponent = (element) => {
99
+ if (!element) return;
100
+ if (typeof element.refresh === 'function') {
101
+ element.refresh();
102
+ return;
103
+ }
104
+
105
+ const componentName = element.dataset?.basecoatComponent;
106
+ const component = componentName ? componentRegistry[componentName] : null;
107
+ if (component?.refresh) {
108
+ component.refresh(element);
109
+ }
110
+ };
111
+
112
+ const startObserver = () => {
113
+ if (observer) return;
114
+
115
+ observer = new MutationObserver((mutations) => {
116
+ mutations.forEach((mutation) => {
117
+ mutation.addedNodes.forEach(initNewComponents);
118
+ mutation.removedNodes.forEach(destroyRemovedComponents);
119
+ });
120
+ });
121
+
122
+ observer.observe(document.body, { childList: true, subtree: true });
123
+ };
124
+
125
+ const stopObserver = () => {
126
+ if (!observer) return;
127
+ observer.disconnect();
128
+ observer = null;
129
+ };
130
+
131
+ const initRegisteredComponent = (componentName, options = {}) => {
132
+ const component = componentRegistry[componentName];
133
+ if (!component) {
134
+ console.warn(`Component '${componentName}' not found in registry`);
135
+ return;
136
+ }
137
+
138
+ const force = options.force === true;
139
+ getComponentElements(componentName, component.selector, force).forEach((element) => {
140
+ const wasComponent = element.dataset?.basecoatComponent === componentName;
141
+ if (force) destroyComponent(element);
142
+ if (wasComponent || element.matches(component.selector)) initComponent(element, componentName);
143
+ });
144
+ };
145
+
146
+ const initAllRegisteredComponents = (options = {}) => {
147
+ initAllComponents(options);
148
+ };
149
+
150
+ const setTheme = (mode) => {
151
+ const dark = mode === 'dark';
152
+ document.documentElement.classList.toggle('dark', dark);
153
+ try { localStorage.setItem('themeMode', dark ? 'dark' : 'light'); } catch (_) {}
154
+ document.dispatchEvent(new CustomEvent('basecoat:themechange', { detail: { mode: dark ? 'dark' : 'light' } }));
155
+ };
156
+
157
+ const getTheme = () => document.documentElement.classList.contains('dark') ? 'dark' : 'light';
158
+
159
+ window.basecoat = {
160
+ register: registerComponent,
161
+ init: initRegisteredComponent,
162
+ initAll: initAllRegisteredComponents,
163
+ refresh: refreshComponent,
164
+ start: startObserver,
165
+ stop: stopObserver,
166
+ theme: {
167
+ get: getTheme,
168
+ set: setTheme,
169
+ toggle: () => setTheme(getTheme() === 'dark' ? 'light' : 'dark'),
170
+ },
171
+ };
172
+
173
+ document.addEventListener('DOMContentLoaded', () => {
174
+ initAllComponents();
175
+ startObserver();
176
+ });
177
+ })();
178
+
179
+ (() => {
180
+ const states = new WeakMap();
181
+
182
+ const isDisabled = (details) => {
183
+ const summary = details.querySelector(':scope > summary');
184
+ return details.getAttribute('aria-disabled') === 'true'
185
+ || details.dataset.disabled === 'true'
186
+ || summary?.getAttribute('aria-disabled') === 'true';
187
+ };
188
+
189
+ const isMultiple = (root) => root.hasAttribute('data-multiple');
190
+
191
+ const closeSiblings = (root, activeDetails) => {
192
+ if (isMultiple(root) || !activeDetails.open) return;
193
+ root.querySelectorAll(':scope > details[open]').forEach((details) => {
194
+ if (details !== activeDetails) details.open = false;
195
+ });
196
+ };
197
+
198
+ const initAccordion = (root) => {
199
+ if (root.dataset.accordionInitialized) return;
200
+
201
+ const handleClick = (event) => {
202
+ const summary = event.target.closest('summary');
203
+ const details = summary?.closest('details');
204
+ if (!details || details.parentElement !== root || !isDisabled(details)) return;
205
+ event.preventDefault();
206
+ };
207
+
208
+ const handleKeydown = (event) => {
209
+ if (event.key !== 'Enter' && event.key !== ' ') return;
210
+ const summary = event.target.closest('summary');
211
+ const details = summary?.closest('details');
212
+ if (!details || details.parentElement !== root || !isDisabled(details)) return;
213
+ event.preventDefault();
214
+ };
215
+
216
+ const handleToggle = (event) => {
217
+ const details = event.target;
218
+ if (details.parentElement !== root) return;
219
+ if (isDisabled(details)) {
220
+ details.open = false;
221
+ return;
222
+ }
223
+ closeSiblings(root, details);
224
+ };
225
+
226
+ root.addEventListener('click', handleClick);
227
+ root.addEventListener('keydown', handleKeydown);
228
+ root.addEventListener('toggle', handleToggle, true);
229
+ root.querySelectorAll(':scope > details[open]').forEach((details) => closeSiblings(root, details));
230
+
231
+ states.set(root, { handleClick, handleToggle });
232
+ root._destroy = () => {
233
+ root.removeEventListener('click', handleClick);
234
+ root.removeEventListener('keydown', handleKeydown);
235
+ root.removeEventListener('toggle', handleToggle, true);
236
+ states.delete(root);
237
+ };
238
+
239
+ root.dataset.accordionInitialized = 'true';
240
+ root.dispatchEvent(new CustomEvent('basecoat:initialized'));
241
+ };
242
+
243
+ if (window.basecoat) {
244
+ window.basecoat.register('accordion', '.accordion:not([data-accordion-initialized])', initAccordion);
245
+ }
246
+ })();
247
+
248
+ // Loaded after the DOM is ready: initialize now.
249
+ if (document.readyState !== 'loading') { window.basecoat.initAll(); window.basecoat.start(); }
@@ -0,0 +1,24 @@
1
+ /* @auvyx/ui accordion.native | order 62 */
2
+ @layer components {
3
+ .accordion > details[inert] > summary {
4
+ opacity: 0.5;
5
+ }
6
+ @supports selector(::details-content) {
7
+ .accordion {
8
+ interpolate-size: allow-keywords;
9
+ }
10
+ .accordion > details::details-content {
11
+ block-size: 0;
12
+ overflow: hidden;
13
+ transition: block-size 200ms ease, content-visibility 200ms allow-discrete;
14
+ }
15
+ .accordion > details[open]::details-content {
16
+ block-size: auto;
17
+ }
18
+ }
19
+ @media (prefers-reduced-motion: reduce) {
20
+ .accordion > details::details-content {
21
+ transition: none;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,119 @@
1
+ /* @auvyx/ui alert | order 2 */
2
+ @layer components {
3
+ .alert {
4
+ position: relative;
5
+ width: 100%;
6
+ }
7
+ .alert:has(> footer) {
8
+ padding-inline-end: 4.5rem;
9
+ }
10
+ .alert > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
11
+ min-height: calc(var(--spacing) * 4);
12
+ }
13
+ .alert > section {
14
+ display: grid;
15
+ justify-items: start;
16
+ gap: var(--spacing);
17
+ :where(p, ul, ol) {
18
+ margin: 0;
19
+ }
20
+ :where(p, ul, ol):not(:last-child) {
21
+ margin-bottom: calc(var(--spacing) * 4);
22
+ }
23
+ ul {
24
+ list-style-position: inside;
25
+ list-style-type: disc;
26
+ }
27
+ ol {
28
+ list-style-position: inside;
29
+ list-style-type: decimal;
30
+ }
31
+ }
32
+ .alert > footer {
33
+ position: absolute;
34
+ }
35
+ }
36
+
37
+ @layer components {
38
+ .alert {
39
+ display: grid;
40
+ gap: calc(var(--spacing) * 0.5);
41
+ border-radius: var(--radius-lg);
42
+ border-style: var(--tw-border-style);
43
+ border-width: 1px;
44
+ padding-inline: calc(var(--spacing) * 4);
45
+ padding-block: calc(var(--spacing) * 3);
46
+ text-align: start;
47
+ font-size: var(--text-sm);
48
+ line-height: var(--tw-leading, var(--text-sm--line-height));
49
+ &:has(>svg) {
50
+ grid-template-columns: auto 1fr;
51
+ }
52
+ &:has(>svg) {
53
+ column-gap: calc(var(--spacing) * 2.5);
54
+ }
55
+ &>svg {
56
+ grid-row: span 2 / span 2;
57
+ }
58
+ &>svg {
59
+ --tw-translate-y: calc(var(--spacing) * 0.5);
60
+ translate: var(--tw-translate-x) var(--tw-translate-y);
61
+ }
62
+ &>svg {
63
+ color: currentcolor;
64
+ }
65
+ &>svg:not([class*='size-']) {
66
+ width: calc(var(--spacing) * 4);
67
+ height: calc(var(--spacing) * 4);
68
+ }
69
+ }
70
+ .alert {
71
+ background-color: var(--color-card);
72
+ color: var(--color-card-foreground);
73
+ }
74
+ .alert[data-variant='destructive'] {
75
+ background-color: var(--color-card);
76
+ color: var(--color-destructive);
77
+ &>svg {
78
+ color: currentcolor;
79
+ }
80
+ }
81
+ .alert > :is(h2, h3, h4, h5, h6, strong, [data-title]), .alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
82
+ --tw-font-weight: var(--font-weight-medium);
83
+ font-weight: var(--font-weight-medium);
84
+ }
85
+ .alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
86
+ grid-column-start: 2;
87
+ }
88
+ .alert > section {
89
+ font-size: var(--text-sm);
90
+ line-height: var(--tw-leading, var(--text-sm--line-height));
91
+ text-wrap: balance;
92
+ color: var(--color-muted-foreground);
93
+ @media (width >= 48rem) {
94
+ text-wrap: pretty;
95
+ }
96
+ & p:not(:last-child) {
97
+ margin-bottom: calc(var(--spacing) * 4);
98
+ }
99
+ }
100
+ .alert[data-variant='destructive'] > section {
101
+ font-size: var(--text-sm);
102
+ line-height: var(--tw-leading, var(--text-sm--line-height));
103
+ text-wrap: balance;
104
+ color: var(--color-destructive);
105
+ @supports (color: color-mix(in lab, red, red)) {
106
+ color: color-mix(in oklab, var(--color-destructive) 90%, transparent);
107
+ }
108
+ @media (width >= 48rem) {
109
+ text-wrap: pretty;
110
+ }
111
+ & p:not(:last-child) {
112
+ margin-bottom: calc(var(--spacing) * 4);
113
+ }
114
+ }
115
+ .alert > footer, .alert[data-variant='destructive'] > footer {
116
+ inset-inline-end: calc(var(--spacing) * 3);
117
+ top: calc(var(--spacing) * 2.5);
118
+ }
119
+ }
@@ -0,0 +1,38 @@
1
+ /* @auvyx/ui aspect-ratio | order 38 */
2
+ @layer components {
3
+ .aspect-ratio {
4
+ position: relative;
5
+ width: 100%;
6
+ overflow: hidden;
7
+ --ratio: 16 / 9;
8
+ aspect-ratio: var(--ratio);
9
+ &[data-ratio='1/1'] {
10
+ --ratio: 1 / 1;
11
+ }
12
+ &[data-ratio='4/3'] {
13
+ --ratio: 4 / 3;
14
+ }
15
+ &[data-ratio='3/2'] {
16
+ --ratio: 3 / 2;
17
+ }
18
+ &[data-ratio='16/9'] {
19
+ --ratio: 16 / 9;
20
+ }
21
+ &[data-ratio='21/9'] {
22
+ --ratio: 21 / 9;
23
+ }
24
+ &[data-ratio='3/4'] {
25
+ --ratio: 3 / 4;
26
+ }
27
+ &[data-ratio='9/16'] {
28
+ --ratio: 9 / 16;
29
+ }
30
+ > :is(img, video, iframe, picture, canvas, svg) {
31
+ position: absolute;
32
+ inset: 0;
33
+ width: 100%;
34
+ height: 100%;
35
+ object-fit: cover;
36
+ }
37
+ }
38
+ }