@auronui/styles 1.0.19 → 1.0.21
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/components/button-group.css +2 -2
- package/components/button.css +1 -1
- package/components/chip.css +1 -1
- package/components/drawer.css +123 -0
- package/package.json +1 -1
- package/src/components/button/__tests__/button.styles.test.ts +14 -14
- package/src/components/button/button.styles.ts +1 -1
- package/src/components/chip/chip.styles.ts +2 -2
- package/src/components/drawer/drawer.styles.ts +16 -0
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
Outline variant — group owns the single outer border
|
|
48
48
|
========================================================================== */
|
|
49
49
|
|
|
50
|
-
.button-group:has(.button--
|
|
50
|
+
.button-group:has(.button--bordered) {
|
|
51
51
|
@apply border border-border;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.button-group .button--
|
|
54
|
+
.button-group .button--bordered {
|
|
55
55
|
@apply border-0;
|
|
56
56
|
}
|
|
57
57
|
|
package/components/button.css
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/* outline: same press logic as ghost */
|
|
138
|
-
.button--
|
|
138
|
+
.button--bordered {
|
|
139
139
|
--button-bg: transparent;
|
|
140
140
|
--button-bg-hover: var(--btn-tint-bg, var(--color-default));
|
|
141
141
|
--button-bg-pressed: var(--btn-tint-bg-hover, var(--color-default-hover));
|
package/components/chip.css
CHANGED
package/components/drawer.css
CHANGED
|
@@ -159,6 +159,129 @@
|
|
|
159
159
|
&[data-state="closed"] { animation: drawer-slide-out-bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1) forwards; }
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Modifier: dialog--inline
|
|
164
|
+
* Overrides fixed positioning to absolute so the panel is scoped to the nearest
|
|
165
|
+
* positioned ancestor instead of the viewport. The container must have
|
|
166
|
+
* position:relative and overflow:hidden set by the consumer.
|
|
167
|
+
*/
|
|
168
|
+
.drawer__dialog--inline {
|
|
169
|
+
position: absolute;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* -------------------------------------------------------------------------------------------------
|
|
173
|
+
* Dock mode — panel shifts content in the DOM rather than overlaying it
|
|
174
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Container: dock-container
|
|
178
|
+
* The Drawer root element in dock mode. Wrap both DrawerMain and DrawerContent.
|
|
179
|
+
*/
|
|
180
|
+
.drawer__dock-container {
|
|
181
|
+
display: flex;
|
|
182
|
+
width: 100%;
|
|
183
|
+
height: 100%;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.drawer__dock-container--right,
|
|
188
|
+
.drawer__dock-container--left {
|
|
189
|
+
flex-direction: row;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.drawer__dock-container--top,
|
|
193
|
+
.drawer__dock-container--bottom {
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Element: main
|
|
199
|
+
* The main content area inside a dock Drawer. Fills remaining flex space.
|
|
200
|
+
*/
|
|
201
|
+
.drawer__main {
|
|
202
|
+
flex: 1;
|
|
203
|
+
min-width: 0;
|
|
204
|
+
min-height: 0;
|
|
205
|
+
overflow: auto;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Modifier: dialog--dock
|
|
210
|
+
* The drawer panel in dock mode. Renders as a flex item alongside DrawerMain.
|
|
211
|
+
* Overrides the fixed/absolute positioning from the base dialog class.
|
|
212
|
+
*/
|
|
213
|
+
.drawer__dialog--dock {
|
|
214
|
+
position: relative;
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Reset viewport-anchored positioning from placement modifiers */
|
|
219
|
+
.drawer__dialog--dock.drawer__dialog--right,
|
|
220
|
+
.drawer__dialog--dock.drawer__dialog--left {
|
|
221
|
+
top: auto;
|
|
222
|
+
right: auto;
|
|
223
|
+
bottom: auto;
|
|
224
|
+
left: auto;
|
|
225
|
+
max-width: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.drawer__dialog--dock.drawer__dialog--right {
|
|
229
|
+
order: 1; /* appears after main content */
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.drawer__dialog--dock.drawer__dialog--left {
|
|
233
|
+
order: -1; /* appears before main content */
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.drawer__dialog--dock.drawer__dialog--top,
|
|
237
|
+
.drawer__dialog--dock.drawer__dialog--bottom {
|
|
238
|
+
top: auto;
|
|
239
|
+
right: auto;
|
|
240
|
+
bottom: auto;
|
|
241
|
+
left: auto;
|
|
242
|
+
width: 100%;
|
|
243
|
+
max-height: none;
|
|
244
|
+
border-radius: 0;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.drawer__dialog--dock.drawer__dialog--top {
|
|
248
|
+
order: -1; /* appears above main content */
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.drawer__dialog--dock.drawer__dialog--bottom {
|
|
252
|
+
order: 1; /* appears below main content */
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Vue Transition: drawer-dock-h — horizontal slide (left / right placement)
|
|
257
|
+
*/
|
|
258
|
+
.drawer-dock-h-enter-active,
|
|
259
|
+
.drawer-dock-h-leave-active {
|
|
260
|
+
transition: width 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
|
261
|
+
overflow: hidden !important;
|
|
262
|
+
@apply motion-reduce:transition-none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.drawer-dock-h-enter-from,
|
|
266
|
+
.drawer-dock-h-leave-to {
|
|
267
|
+
width: 0 !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Vue Transition: drawer-dock-v — vertical slide (top / bottom placement)
|
|
272
|
+
*/
|
|
273
|
+
.drawer-dock-v-enter-active,
|
|
274
|
+
.drawer-dock-v-leave-active {
|
|
275
|
+
transition: height 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
|
276
|
+
overflow: hidden !important;
|
|
277
|
+
@apply motion-reduce:transition-none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.drawer-dock-v-enter-from,
|
|
281
|
+
.drawer-dock-v-leave-to {
|
|
282
|
+
height: 0 !important;
|
|
283
|
+
}
|
|
284
|
+
|
|
162
285
|
/**
|
|
163
286
|
* Element: header
|
|
164
287
|
*/
|
package/package.json
CHANGED
|
@@ -15,32 +15,32 @@ describe('buttonVariants (slots)', () => {
|
|
|
15
15
|
expect(buttonVariants({}).base()).toContain('button')
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
it('primary variant (
|
|
19
|
-
expect(buttonVariants({ variant: 'primary' }).base()).toContain('button--
|
|
18
|
+
it('primary variant (legacy alias → solid)', () => {
|
|
19
|
+
expect(buttonVariants({ variant: 'primary' }).base()).toContain('button--solid')
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
-
it('success variant', () => {
|
|
23
|
-
expect(buttonVariants({ variant: 'success' }).base()).toContain('button--
|
|
22
|
+
it('success variant (legacy alias → solid)', () => {
|
|
23
|
+
expect(buttonVariants({ variant: 'success' }).base()).toContain('button--solid')
|
|
24
24
|
})
|
|
25
25
|
|
|
26
|
-
it('success-soft variant', () => {
|
|
27
|
-
expect(buttonVariants({ variant: 'success-soft' }).base()).toContain('button--
|
|
26
|
+
it('success-soft variant (legacy alias → soft)', () => {
|
|
27
|
+
expect(buttonVariants({ variant: 'success-soft' }).base()).toContain('button--soft')
|
|
28
28
|
})
|
|
29
29
|
|
|
30
|
-
it('warning variant', () => {
|
|
31
|
-
expect(buttonVariants({ variant: 'warning' }).base()).toContain('button--
|
|
30
|
+
it('warning variant (legacy alias → solid)', () => {
|
|
31
|
+
expect(buttonVariants({ variant: 'warning' }).base()).toContain('button--solid')
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
-
it('warning-soft variant', () => {
|
|
35
|
-
expect(buttonVariants({ variant: 'warning-soft' }).base()).toContain('button--
|
|
34
|
+
it('warning-soft variant (legacy alias → soft)', () => {
|
|
35
|
+
expect(buttonVariants({ variant: 'warning-soft' }).base()).toContain('button--soft')
|
|
36
36
|
})
|
|
37
37
|
|
|
38
|
-
it('danger variant', () => {
|
|
39
|
-
expect(buttonVariants({ variant: 'danger' }).base()).toContain('button--
|
|
38
|
+
it('danger variant (legacy alias → solid)', () => {
|
|
39
|
+
expect(buttonVariants({ variant: 'danger' }).base()).toContain('button--solid')
|
|
40
40
|
})
|
|
41
41
|
|
|
42
|
-
it('danger-soft variant', () => {
|
|
43
|
-
expect(buttonVariants({ variant: 'danger-soft' }).base()).toContain('button--
|
|
42
|
+
it('danger-soft variant (legacy alias → soft)', () => {
|
|
43
|
+
expect(buttonVariants({ variant: 'danger-soft' }).base()).toContain('button--soft')
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
it('isLoading=true adds button--loading to base', () => {
|
|
@@ -51,7 +51,7 @@ export const buttonVariants = tv({
|
|
|
51
51
|
// Current API
|
|
52
52
|
solid: { base: "button--solid" },
|
|
53
53
|
default: { base: "button--default" },
|
|
54
|
-
|
|
54
|
+
bordered: { base: "button--bordered" },
|
|
55
55
|
ghost: { base: "button--ghost" },
|
|
56
56
|
soft: { base: "button--soft" },
|
|
57
57
|
// Legacy aliases — resolved to new variant+color in Button.vue
|
|
@@ -18,24 +18,40 @@ export const drawerVariants = tv({
|
|
|
18
18
|
header: "drawer__header",
|
|
19
19
|
heading: "drawer__heading",
|
|
20
20
|
trigger: "drawer__trigger",
|
|
21
|
+
dockContainer: "drawer__dock-container",
|
|
22
|
+
main: "drawer__main",
|
|
21
23
|
},
|
|
22
24
|
variants: {
|
|
25
|
+
inline: {
|
|
26
|
+
true: {
|
|
27
|
+
dialog: "drawer__dialog--inline",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
dock: {
|
|
31
|
+
true: {
|
|
32
|
+
dialog: "drawer__dialog--dock",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
23
35
|
placement: {
|
|
24
36
|
bottom: {
|
|
25
37
|
content: "drawer__content--bottom",
|
|
26
38
|
dialog: "drawer__dialog--bottom",
|
|
39
|
+
dockContainer: "drawer__dock-container--bottom",
|
|
27
40
|
},
|
|
28
41
|
left: {
|
|
29
42
|
content: "drawer__content--left",
|
|
30
43
|
dialog: "drawer__dialog--left",
|
|
44
|
+
dockContainer: "drawer__dock-container--left",
|
|
31
45
|
},
|
|
32
46
|
right: {
|
|
33
47
|
content: "drawer__content--right",
|
|
34
48
|
dialog: "drawer__dialog--right",
|
|
49
|
+
dockContainer: "drawer__dock-container--right",
|
|
35
50
|
},
|
|
36
51
|
top: {
|
|
37
52
|
content: "drawer__content--top",
|
|
38
53
|
dialog: "drawer__dialog--top",
|
|
54
|
+
dockContainer: "drawer__dock-container--top",
|
|
39
55
|
},
|
|
40
56
|
},
|
|
41
57
|
variant: {
|