unocss-preset-quasar 0.1.3 → 0.1.5
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/core/index.js +10 -0
- package/dist/core/typography.unocss.js +0 -2
- package/dist/index.js +27 -2
- package/dist/styles/md2/components/QBanner.unocss.js +1 -1
- package/dist/styles/md3/components/QBanner.unocss.js +1 -1
- package/dist/styles/md3/components/QBtn.unocss.js +12 -5
- package/dist/styles/md3/components/QCard.unocss.js +2 -2
- package/dist/styles/md3/components/QDate.unocss.js +8 -4
- package/dist/styles/md3/components/QDrawer.unocss.js +19 -7
- package/dist/styles/md3/components/QField.unocss.js +16 -16
- package/dist/styles/md3/components/QFooter.unocss.js +1 -1
- package/dist/styles/md3/components/QHeader.unocss.js +2 -1
- package/dist/styles/md3/components/QIcon.unocss.js +1 -1
- package/dist/styles/md3/components/QItem.unocss.js +5 -5
- package/dist/styles/md3/components/QLayout.unocss.js +1 -1
- package/dist/styles/md3/components/QPageSticky.unocss.js +4 -0
- package/dist/styles/md3/components/QTabs.unocss.js +5 -4
- package/dist/styles/md3/components/QToggle.unocss.js +9 -11
- package/dist/styles/md3/components/QToolbar.unocss.js +1 -1
- package/dist/styles/md3/index.js +9 -1
- package/dist/types/styles/md3/index.d.ts +3 -1
- package/dist/types/theme.d.ts +1 -0
- package/package.json +1 -1
- package/src/core/index.ts +10 -0
- package/src/core/typography.unocss.ts +0 -2
- package/src/index.ts +33 -2
- package/src/styles/md2/components/QBanner.unocss.ts +1 -1
- package/src/styles/md3/components/QBanner.unocss.ts +1 -1
- package/src/styles/md3/components/QBtn.unocss.ts +12 -5
- package/src/styles/md3/components/QCard.unocss.ts +2 -2
- package/src/styles/md3/components/QDate.unocss.ts +8 -4
- package/src/styles/md3/components/QDrawer.unocss.ts +19 -7
- package/src/styles/md3/components/QField.unocss.ts +16 -16
- package/src/styles/md3/components/QFooter.unocss.ts +1 -1
- package/src/styles/md3/components/QHeader.unocss.ts +2 -1
- package/src/styles/md3/components/QIcon.unocss.ts +1 -1
- package/src/styles/md3/components/QItem.unocss.ts +5 -5
- package/src/styles/md3/components/QLayout.unocss.ts +1 -1
- package/src/styles/md3/components/QPageSticky.unocss.ts +4 -0
- package/src/styles/md3/components/QTabs.unocss.ts +5 -4
- package/src/styles/md3/components/QToggle.unocss.ts +9 -11
- package/src/styles/md3/components/QToolbar.unocss.ts +1 -1
- package/src/styles/md3/index.ts +13 -1
- package/src/theme.ts +1 -0
package/dist/core/index.js
CHANGED
|
@@ -284,6 +284,16 @@ font-family: inherit;
|
|
|
284
284
|
margin: 0;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
html, body, #q-app {
|
|
288
|
+
width: 100%;
|
|
289
|
+
direction: ltr;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
body {
|
|
293
|
+
min-width: 100px;
|
|
294
|
+
min-height: 100%;
|
|
295
|
+
}
|
|
296
|
+
|
|
287
297
|
/* beasties:include end */`
|
|
288
298
|
}
|
|
289
299
|
].concat(ColorPreflights, DarkPreflights, HelperPreflights, MousePreflights, TypographyPreflights, VisibilityPreflights, TransitionPreflights, SizePreflights);
|
package/dist/index.js
CHANGED
|
@@ -1081,6 +1081,22 @@ const pluginSafelistMap = {
|
|
|
1081
1081
|
'q-notification--bottom-right-leave-active'
|
|
1082
1082
|
]
|
|
1083
1083
|
};
|
|
1084
|
+
const colorSafelist = [
|
|
1085
|
+
'bg-primary',
|
|
1086
|
+
'text-primary',
|
|
1087
|
+
'bg-secondary',
|
|
1088
|
+
'text-secondary',
|
|
1089
|
+
'bg-accent',
|
|
1090
|
+
'text-accent',
|
|
1091
|
+
'bg-positive',
|
|
1092
|
+
'text-positive',
|
|
1093
|
+
'bg-negative',
|
|
1094
|
+
'text-negative',
|
|
1095
|
+
'bg-info',
|
|
1096
|
+
'text-info',
|
|
1097
|
+
'bg-warning',
|
|
1098
|
+
'text-warning'
|
|
1099
|
+
];
|
|
1084
1100
|
const baseSafelist = [
|
|
1085
1101
|
'relative-position',
|
|
1086
1102
|
'q-panel-parent',
|
|
@@ -1456,7 +1472,7 @@ const baseSafelist = [
|
|
|
1456
1472
|
// 'q-dark'
|
|
1457
1473
|
];
|
|
1458
1474
|
const generateSafelist = ({ plugins, iconSet }) => {
|
|
1459
|
-
let safelist = baseSafelist;
|
|
1475
|
+
let safelist = [...baseSafelist, ...colorSafelist];
|
|
1460
1476
|
if (plugins) {
|
|
1461
1477
|
for (const plugin of plugins) {
|
|
1462
1478
|
const pluginSafelist = pluginSafelistMap[plugin];
|
|
@@ -1515,6 +1531,8 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1515
1531
|
const pascalMatch = code.matchAll(/Q([A-Z][a-z0-9]+)+/g);
|
|
1516
1532
|
const transitionMatch = code.matchAll(/(transition|transition-show|transition-hide|transition-prev|transition-next)="(\S*)"/g);
|
|
1517
1533
|
const colorMatch = code.matchAll(/color[=|:]"(.*?)"/g);
|
|
1534
|
+
const themeColorMatch = code.matchAll(new RegExp(`(${Object.keys(theme.colors).join('|')})`, 'g'));
|
|
1535
|
+
const iconMatch = code.matchAll(/(?:icon|name)[=|:]"(.*?)"/g);
|
|
1518
1536
|
const pascalComponentsMatch = [];
|
|
1519
1537
|
const matches = [];
|
|
1520
1538
|
for (const match of kebabMatch) {
|
|
@@ -1540,6 +1558,13 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1540
1558
|
for (const match of colorMatch) {
|
|
1541
1559
|
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`);
|
|
1542
1560
|
}
|
|
1561
|
+
for (const match of themeColorMatch) {
|
|
1562
|
+
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`);
|
|
1563
|
+
}
|
|
1564
|
+
const iconClasses = [];
|
|
1565
|
+
for (const match of iconMatch) {
|
|
1566
|
+
iconClasses.push(`i-mdi-${match[1]}`);
|
|
1567
|
+
}
|
|
1543
1568
|
// const classes = qClasses.filter((c) =>
|
|
1544
1569
|
// matches.some((component) => {
|
|
1545
1570
|
// component = component.replaceAll(
|
|
@@ -1563,7 +1588,7 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1563
1588
|
return acc;
|
|
1564
1589
|
}, [])
|
|
1565
1590
|
];
|
|
1566
|
-
classes.push(...transitionClasses, ...colorClasses, ...componentClasses);
|
|
1591
|
+
classes.push(...transitionClasses, ...colorClasses, ...componentClasses, ...iconClasses);
|
|
1567
1592
|
return classes;
|
|
1568
1593
|
}
|
|
1569
1594
|
}
|
|
@@ -8,7 +8,7 @@ const shortcuts = [
|
|
|
8
8
|
[
|
|
9
9
|
/^q-banner__avatar$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-banner__avatar'] ??
|
|
11
|
-
`!min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
11
|
+
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
12
12
|
],
|
|
13
13
|
[
|
|
14
14
|
/^q-banner__actions$/,
|
|
@@ -8,7 +8,7 @@ const shortcuts = [
|
|
|
8
8
|
[
|
|
9
9
|
/^q-banner__avatar$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-banner__avatar'] ??
|
|
11
|
-
`!min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
11
|
+
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
12
12
|
],
|
|
13
13
|
[
|
|
14
14
|
/^q-banner__actions$/,
|
|
@@ -2,7 +2,7 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-btn$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-btn'] ??
|
|
5
|
-
`layer-components:
|
|
5
|
+
`layer-components:bg-light-primary dark:bg-dark-primary layer-components:text-light-on-primary layer-components:dark:text-dark-on-primary inline-flex flex-col font-medium items-stretch relative outline-0 border-0 align-middle text-[14px] leading-[1.715em] no-underline font-medium text-center w-auto min-h-40px cursor-default px-[16px] py-[4px] min-h-[2.572em] [&_.q-icon]:(text-[1.715em]) [&_.q-spinner]:(text-[1.715em]) [&.disabled]:(!opacity-70) [&:before]:(content-empty block absolute left-[0] right-[0] top-[0] bottom-[0] [border-radius:inherit] elevation-2)`
|
|
6
6
|
],
|
|
7
7
|
[
|
|
8
8
|
/^q-btn--actionable$/,
|
|
@@ -14,7 +14,9 @@ const shortcuts = [
|
|
|
14
14
|
[
|
|
15
15
|
/^q-btn--outline$/,
|
|
16
16
|
([, c], { theme }) => theme.quasar?.components?.['q-btn--outline'] ??
|
|
17
|
-
`!bg-transparent
|
|
17
|
+
`!bg-transparent layer-components:text-light-primary layer-components:dark:text-dark-primary
|
|
18
|
+
[&:before]:(border-[1px] border-solid border-[currentColor] [box-shadow:none]])
|
|
19
|
+
[&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
|
|
18
20
|
],
|
|
19
21
|
[
|
|
20
22
|
/^q-btn--push$/,
|
|
@@ -31,7 +33,9 @@ const shortcuts = [
|
|
|
31
33
|
[
|
|
32
34
|
/^q-btn--flat$/,
|
|
33
35
|
([, c], { theme }) => theme.quasar?.components?.['q-btn--flat'] ??
|
|
34
|
-
`!bg-transparent
|
|
36
|
+
`!bg-transparent layer-components:text-light-primary layer-components:dark:text-dark-primary
|
|
37
|
+
[&:before]:([box-shadow:none])
|
|
38
|
+
[&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
|
|
35
39
|
],
|
|
36
40
|
[
|
|
37
41
|
/^q-btn--unelevated$/,
|
|
@@ -47,15 +51,18 @@ const shortcuts = [
|
|
|
47
51
|
[
|
|
48
52
|
/^q-btn--fab$/,
|
|
49
53
|
([, c], { theme }) => theme.quasar?.components?.['q-btn--fab'] ??
|
|
50
|
-
`bg-light-primary-container dark:bg-dark-primary-container text-light-on-surface dark:text-dark-on-surface
|
|
54
|
+
`layer-components:bg-light-primary-container layer-components:dark:bg-dark-primary-container layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface
|
|
51
55
|
w-56px h-56px !rounded-16px
|
|
56
|
+
z-${theme.quasar.z.fab}
|
|
52
57
|
[&_.q-icon]:(text-[24px]) [&_.q-icon]:(m-auto)`
|
|
53
58
|
// min-h-[56px] min-w-[56px] p-[16px] pb-0
|
|
54
59
|
],
|
|
55
60
|
[
|
|
56
61
|
/^q-btn--fab-mini$/,
|
|
57
62
|
([, c], { theme }) => theme.quasar?.components?.['q-btn--fab-mini'] ??
|
|
58
|
-
`
|
|
63
|
+
`layer-components:bg-light-primary-container layer-components:dark:bg-dark-primary-container layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface
|
|
64
|
+
w-40px h-40px !rounded-16px
|
|
65
|
+
[&_.q-icon]:(text-[24px])`
|
|
59
66
|
// min-h-[40px] min-w-[40px]
|
|
60
67
|
],
|
|
61
68
|
[
|
|
@@ -2,7 +2,7 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-card$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-card'] ??
|
|
5
|
-
`rounded-[12px] align-top bg-[#fff] relative bg-light-surface-container dark:bg-dark-surface-container
|
|
5
|
+
`p-16px rounded-[12px] align-top bg-[#fff] relative bg-light-surface-container dark:bg-dark-surface-container
|
|
6
6
|
[&_>_div:not(.q--avoid-card-border)]:(rounded-tl-none rounded-tr-none rounded-bl-none rounded-br-none)
|
|
7
7
|
[&_>_img:not(.q--avoid-card-border)]:(rounded-tl-none rounded-tr-none rounded-bl-none rounded-br-none)
|
|
8
8
|
[&_>_div:nth-child(1_of_:not(.q--avoid-card-border))]:([border-top:0] [border-top-left-radius:inherit] [border-top-right-radius:inherit])
|
|
@@ -35,7 +35,7 @@ const shortcuts = [
|
|
|
35
35
|
[
|
|
36
36
|
/^q-card__actions$/,
|
|
37
37
|
([, c], { theme }) => theme.quasar?.components?.['q-card__actions'] ??
|
|
38
|
-
`p-[8px] items-center [&_.q-btn--rectangle]:(px-[8px] py-[0])`
|
|
38
|
+
`p-[8px] items-center [&_.q-btn--rectangle:not(.q-btn--rounded)]:(px-[8px] py-[0])`
|
|
39
39
|
],
|
|
40
40
|
[
|
|
41
41
|
/^q-card__actions--horiz$/,
|
|
@@ -88,22 +88,26 @@ const shortcuts = [
|
|
|
88
88
|
[
|
|
89
89
|
/^q-date__edit-range$/,
|
|
90
90
|
([, c], { theme }) => theme.quasar?.components?.['q-date__edit-range'] ??
|
|
91
|
-
`[&:after]:(border-
|
|
91
|
+
`[&:after]:(border-light-primary dark:border-dark-primary border-l-transparent border-r-transparent)
|
|
92
|
+
[&:nth-child(7n-6):after]:(rounded-tl-none rounded-bl-none)
|
|
93
|
+
[&:nth-child(7n):after]:(rounded-tr-none rounded-br-none)`
|
|
92
94
|
],
|
|
93
95
|
[
|
|
94
96
|
/^q-date__edit-range-from$/,
|
|
95
97
|
([, c], { theme }) => theme.quasar?.components?.['q-date__edit-range-from'] ??
|
|
96
|
-
`[&:after]:(left-[4px]
|
|
98
|
+
`[&:after]:(left-[4px]
|
|
99
|
+
border-r-0 border-light-primary dark:border-dark-primary rounded-tl-[28px] rounded-bl-[28px])`
|
|
97
100
|
],
|
|
98
101
|
[
|
|
99
102
|
/^q-date__edit-range-from-to$/,
|
|
100
103
|
([, c], { theme }) => theme.quasar?.components?.['q-date__edit-range-from-to'] ??
|
|
101
|
-
`[&:after]:(left-[4px]
|
|
104
|
+
`[&:after]:(left-[4px] border-light-primary dark:border-dark-primary border-r-transparent rounded-tl-[28px] rounded-bl-[28px])
|
|
105
|
+
[&:after]:(right-[4px] [border-light-primary dark:border-dark-primary border-l-transparent rounded-tr-[28px] rounded-br-[28px])`
|
|
102
106
|
],
|
|
103
107
|
[
|
|
104
108
|
/^q-date__edit-range-to$/,
|
|
105
109
|
([, c], { theme }) => theme.quasar?.components?.['q-date__edit-range-to'] ??
|
|
106
|
-
`[&:after]:(right-[4px]
|
|
110
|
+
`[&:after]:(right-[4px] border-l-transparent border-light-primary dark:border-dark-primary rounded-tr-[28px] rounded-br-[28px])`
|
|
107
111
|
],
|
|
108
112
|
[
|
|
109
113
|
/^q-date__calendar-days-container$/,
|
|
@@ -2,7 +2,7 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-drawer$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-drawer'] ??
|
|
5
|
-
`absolute top-[0] bottom-[0] bg-
|
|
5
|
+
`absolute top-[0] bottom-[0] bg-light-surface-container-low dark:bg-dark-surface-container-low z-${theme.quasar.z['side']}`
|
|
6
6
|
],
|
|
7
7
|
[
|
|
8
8
|
/^q-drawer--on-top$/,
|
|
@@ -22,12 +22,21 @@ const shortcuts = [
|
|
|
22
22
|
[
|
|
23
23
|
/^q-drawer-container$/,
|
|
24
24
|
([, c], { theme }) => theme.quasar?.components?.['q-drawer-container'] ??
|
|
25
|
-
`[&:not(.q-drawer--mini-animate)_.q-drawer--mini]:(!p-0)
|
|
25
|
+
`[&:not(.q-drawer--mini-animate)_.q-drawer--mini]:(!p-0)
|
|
26
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item]:(text-center justify-center pl-0 pr-0 min-w-[0])
|
|
27
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item\\_\\_section]:(text-center justify-center pl-0 pr-0 min-w-[0])
|
|
28
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item\\_\\_label]:(hidden)
|
|
29
|
+
[&:not(.q-drawer--mini-animate)__.q-drawer--mini__.q-item\\_\\_section--main]:(hidden)
|
|
30
|
+
[&:not(.q-drawer--mini-animate)__.q-drawer--mini__.q-item\\_\\_section--side__~_.q-item\\_\\_section--side]:(hidden)`
|
|
26
31
|
],
|
|
27
32
|
[
|
|
28
33
|
/^q-drawer--mini$/,
|
|
29
34
|
([, c], { theme }) => theme.quasar?.components?.['q-drawer--mini'] ??
|
|
30
|
-
`[&_.q-
|
|
35
|
+
`[&_>_.q-drawer\\_\\_content]:(!py-9px)
|
|
36
|
+
[&_>_.q-drawer\\_\\_content_>_*]:(!px-4px)
|
|
37
|
+
[&_.q-mini-drawer-hide]:(hidden) [&_.q-expansion-item\\_\\_content]:(hidden)
|
|
38
|
+
[&_.q-tab\\_\\_label]:(text-12px)
|
|
39
|
+
[&_.q-tabs--vertical_.q-tab]:(px-0px)`
|
|
31
40
|
],
|
|
32
41
|
[
|
|
33
42
|
/^q-drawer--mini-animate$/,
|
|
@@ -57,10 +66,13 @@ const shortcuts = [
|
|
|
57
66
|
[
|
|
58
67
|
/^q-drawer__content$/,
|
|
59
68
|
([, c], { theme }) => theme.quasar?.components?.['q-drawer__content'] ??
|
|
60
|
-
`
|
|
61
|
-
[&_>_
|
|
62
|
-
[&_>_.q-
|
|
63
|
-
[&_>_.q-
|
|
69
|
+
`py-14px
|
|
70
|
+
[&_>_*]:(px-28px)
|
|
71
|
+
[&_>_.q-scrollarea]:(px-0)
|
|
72
|
+
[&_>_.q-list]:(px-12px)
|
|
73
|
+
[&_.q-list_.q-item]:(border-rd-32px)
|
|
74
|
+
[&_.q-list_>_.q-router-link--active]:(text-light-primary dark:text-dark-primary)
|
|
75
|
+
[&_.q-list_.q-router-link--exact-active]:(bg-light-secondary-container dark:bg-dark-secondary-container
|
|
64
76
|
)`
|
|
65
77
|
]
|
|
66
78
|
];
|
|
@@ -29,7 +29,7 @@ const shortcuts = [
|
|
|
29
29
|
[&_::-ms-clear]:(hidden)
|
|
30
30
|
[&_::-ms-reveal]:(hidden)`
|
|
31
31
|
],
|
|
32
|
-
[/^q-field--with-bottom$/, ([, c], { theme }) =>
|
|
32
|
+
[/^q-field--with-bottom$/, ([, c], { theme }) => ``],
|
|
33
33
|
[
|
|
34
34
|
/^q-field__marginal$/,
|
|
35
35
|
([, c], { theme }) => theme.quasar?.components?.['q-field__marginal'] ??
|
|
@@ -55,12 +55,12 @@ const shortcuts = [
|
|
|
55
55
|
[
|
|
56
56
|
/^q-field__bottom$/,
|
|
57
57
|
([, c], { theme }) => theme.quasar?.components?.['q-field__bottom'] ??
|
|
58
|
-
`text-[12px] min-h-[20px] leading-none text-black/54 mt
|
|
58
|
+
`text-[12px] min-h-[20px] leading-none bg-transparent text-black/54 mt-4px px-[12px] pb-[0] [backface-visibility:hidden]`
|
|
59
59
|
],
|
|
60
60
|
[
|
|
61
61
|
/^q-field__bottom--animated$/,
|
|
62
62
|
([, c], { theme }) => theme.quasar?.components?.['q-field__bottom--animated'] ??
|
|
63
|
-
`
|
|
63
|
+
`left-[0] right-[0] bottom-[0]`
|
|
64
64
|
],
|
|
65
65
|
[
|
|
66
66
|
/^q-field__messages$/,
|
|
@@ -174,19 +174,19 @@ const shortcuts = [
|
|
|
174
174
|
[
|
|
175
175
|
/^q-field--filled$/,
|
|
176
176
|
([, c], { theme }) => theme.quasar?.components?.['q-field--filled'] ??
|
|
177
|
-
`bg-light-surface-container text-light-on-surface-variant
|
|
178
|
-
dark:bg-dark-surface-container dark:text-dark-on-surface-variant
|
|
177
|
+
`[&_.q-field\\_\\_control]:(bg-light-surface-container text-light-on-surface-variant
|
|
178
|
+
dark:bg-dark-surface-container dark:text-dark-on-surface-variant)
|
|
179
179
|
[&_.q-field\\_\\_control]:(px-[16px] py-[0] layer-components:bg-black/5 rounded-tl-[4px] rounded-br-[0] rounded-tr-[4px] rounded-bl-[0])
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
180
|
+
[&_.q-field\\_\\_control:before]:(layer-components:bg-black/5 [border-bottom:1px_solid_rgba(0,_0,_0,_0.42)] opacity-0 [transition:opacity_0.36s_cubic-bezier(0.4,_0,_0.2,_1),_background_0.36s_cubic-bezier(0.4,_0,_0.2,_1)])
|
|
181
|
+
[&_.q-field\\_\\_control:hover:before]:(opacity-100)
|
|
182
|
+
[&_.q-field\\_\\_control:after]:(h-[2px] top-auto origin-[center_bottom] [transform:scale3d(0,_1,_1)] bg-current [transition:transform_0.36s_cubic-bezier(0.4,_0,_0.2,_1)])
|
|
183
|
+
[&.q-field--rounded_.q-field\\_\\_control]:(rounded-tl-[28px] rounded-br-[0] rounded-tr-[28px] rounded-bl-[0])
|
|
184
|
+
[&.q-field--highlighted_.q-field\\_\\_control:before]:(opacity-100 layer-components:bg-black/12)
|
|
185
|
+
[&.q-field--highlighted_.q-field\\_\\_control:after]:([transform:scale3d(1,_1,_1)])
|
|
186
|
+
[&.q-field--dark_.q-field\\_\\_control]:(layer-components:bg-white/7)
|
|
187
|
+
[&.q-field--dark_.q-field\\_\\_control:before]:(layer-components:bg-white/7)
|
|
188
|
+
[&.q-field--dark.q-field--highlighted_.q-field\\_\\_control:before]:(layer-components:bg-white/1)
|
|
189
|
+
[&.q-field--readonly_.q-field\\_\\_control:before]:(opacity-100 bg-transparent [border-bottom-style:dashed])`
|
|
190
190
|
],
|
|
191
191
|
[
|
|
192
192
|
/^q-field--outlined$/,
|
|
@@ -273,7 +273,7 @@ const shortcuts = [
|
|
|
273
273
|
`[&_.q-field--with-bottom]:(pb-[19px])
|
|
274
274
|
[&_.q-field\\_\\_shadow]:(top-[0])
|
|
275
275
|
[&_.q-field\\_\\_control]:(h-[40px])
|
|
276
|
-
[&_.q-field\\_\\_marginal]:(
|
|
276
|
+
[&_.q-field\\_\\_marginal]:()
|
|
277
277
|
[&_.q-field\\_\\_bottom]:(text-[11px])
|
|
278
278
|
[&_.q-field\\_\\_label]:(text-[14px] top-[10px])
|
|
279
279
|
[&_.q-field\\_\\_before]:()
|
|
@@ -8,7 +8,7 @@ const shortcuts = [
|
|
|
8
8
|
[
|
|
9
9
|
/^q-footer$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-footer'] ??
|
|
11
|
-
`[&_.q-layout\\_\\_shadow]:(-top-[10px]) [&_.q-layout\\_\\_shadow:after]:(top-[10px])
|
|
11
|
+
`[&_.q-layout\\_\\_shadow]:(-top-[10px]) [&_.q-layout\\_\\_shadow:after]:(top-[10px]) z-${theme.quasar.z['marginals']}`
|
|
12
12
|
]
|
|
13
13
|
];
|
|
14
14
|
export { shortcuts };
|
|
@@ -8,7 +8,8 @@ const shortcuts = [
|
|
|
8
8
|
[
|
|
9
9
|
/^q-header$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-header'] ??
|
|
11
|
-
`z-2000 [&_.q-layout\\_\\_shadow]:(-bottom-10px) [&_.q-layout\\_\\_shadow:after]:(bottom-10px)
|
|
11
|
+
`z-2000 [&_.q-layout\\_\\_shadow]:(-bottom-10px) [&_.q-layout\\_\\_shadow:after]:(bottom-10px)
|
|
12
|
+
[&_.q-toolbar\\_\\_title]:(flex-grow-1000)`
|
|
12
13
|
// relative
|
|
13
14
|
]
|
|
14
15
|
];
|
|
@@ -7,7 +7,7 @@ const shortcuts = [
|
|
|
7
7
|
[&>img]:(h-full w-full)
|
|
8
8
|
[&:before]:(w-full h-full flex! items-center justify-center)
|
|
9
9
|
[&:after]:(w-full h-full flex! items-center justify-center)
|
|
10
|
-
select-none cursor-inherit text-light-on-surface dark:text-dark-on-surface inline-flex items-center justify-center v-middle
|
|
10
|
+
select-none cursor-inherit layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface inline-flex items-center justify-center v-middle
|
|
11
11
|
`
|
|
12
12
|
],
|
|
13
13
|
// [
|
|
@@ -2,7 +2,7 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-item$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-item'] ??
|
|
5
|
-
`min-h-[
|
|
5
|
+
`min-h-[28px] px-[16px] py-[8px] [color:inherit] [transition:color_0.3s,_background-color_0.3s] [&_>_.q-item\\_\\_section--thumbnail:first-child]:(-ml-[16px]) [&_>_.q-focus-helper_+_.q-item\\_\\_section--thumbnail]:(-ml-[16px]) [&_>_.q-item\\_\\_section--thumbnail:last-of-type]:(-mr-[16px]) relative
|
|
6
6
|
[&.q-router-link--active]:(text-primary)`
|
|
7
7
|
],
|
|
8
8
|
[
|
|
@@ -55,8 +55,8 @@ const shortcuts = [
|
|
|
55
55
|
/^q-item__section--main$/,
|
|
56
56
|
([, c], { theme }) => theme.quasar?.components?.['q-item__section--main'] ??
|
|
57
57
|
`w-auto min-w-[0] max-w-full flex-[10000_1_0%]
|
|
58
|
-
[&:has(>:last-child:nth-child(2))]:(min-h-
|
|
59
|
-
[&:has(>:last-child:nth-child(3))]:(min-h-
|
|
58
|
+
[&:has(>:last-child:nth-child(2))]:(min-h-36px)
|
|
59
|
+
[&:has(>:last-child:nth-child(3))]:(min-h-44px)
|
|
60
60
|
[&_+_.q-item\\_\\_section--main]:(ml-[8px])
|
|
61
61
|
[&_~_.q-item\\_\\_section--side]:(items-end pr-0 pl-[16px])`
|
|
62
62
|
],
|
|
@@ -73,9 +73,9 @@ const shortcuts = [
|
|
|
73
73
|
[
|
|
74
74
|
/^q-list--dense$/,
|
|
75
75
|
([, c], { theme }) => theme.quasar?.components?.['q-list--dense'] ??
|
|
76
|
-
`[&_>_.q-item]:(min-h-[
|
|
76
|
+
`[&_>_.q-item]:(min-h-[28px] px-[16px] py-[2px])`
|
|
77
77
|
],
|
|
78
|
-
[/^q-item--dense$/, ([, c], { theme }) => `min-h-[
|
|
78
|
+
[/^q-item--dense$/, ([, c], { theme }) => `min-h-[28px] px-[16px] py-[2px]`],
|
|
79
79
|
[
|
|
80
80
|
/^q-list--dark$/,
|
|
81
81
|
([, c], { theme }) => theme.quasar?.components?.['q-list--dark'] ??
|
|
@@ -78,7 +78,7 @@ const shortcuts = [
|
|
|
78
78
|
[
|
|
79
79
|
/^q-layout__section--marginal$/,
|
|
80
80
|
([, c], { theme }) => theme.quasar?.components?.['q-layout__section--marginal'] ??
|
|
81
|
-
`text-[#fff] bg-light-surface dark:bg-dark-surface-container text-light-on-surface dark:text-dark-on-surface`
|
|
81
|
+
`text-[#fff] bg-light-surface-container-low dark:bg-dark-surface-container-low text-light-on-surface dark:text-dark-on-surface`
|
|
82
82
|
]
|
|
83
83
|
];
|
|
84
84
|
export { preflights, shortcuts };
|
|
@@ -2,7 +2,7 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-tab$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-tab'] ??
|
|
5
|
-
`px-[16px] py-[0] min-h-[48px] [transition:color_0.3s,_background-color_0.3s]
|
|
5
|
+
`px-[16px] py-[0] min-h-[48px] [transition:color_0.3s,_background-color_0.3s] whitespace-nowrap [color:inherit] no-underline [&_.q-badge]:(top-[3px] -right-[12px])`
|
|
6
6
|
],
|
|
7
7
|
[
|
|
8
8
|
/^q-tab--full$/,
|
|
@@ -15,7 +15,7 @@ const shortcuts = [
|
|
|
15
15
|
[
|
|
16
16
|
/^q-tab__content$/,
|
|
17
17
|
([, c], { theme }) => theme.quasar?.components?.['q-tab__content'] ??
|
|
18
|
-
`[height:inherit] px-[0] py-[4px] min-w-[40px] [&_.q-chip--floating]:(top-[0] -right-[16px])`
|
|
18
|
+
`[height:inherit] z-2 px-[0] py-[4px] min-w-[40px] [&_.q-chip--floating]:(top-[0] -right-[16px])`
|
|
19
19
|
],
|
|
20
20
|
[
|
|
21
21
|
/^q-tab__content--inline$/,
|
|
@@ -45,7 +45,7 @@ const shortcuts = [
|
|
|
45
45
|
[
|
|
46
46
|
/^q-tab__indicator$/,
|
|
47
47
|
([, c], { theme }) => theme.quasar?.components?.['q-tab__indicator'] ??
|
|
48
|
-
|
|
48
|
+
`absolute h-32px w-52px top-0 left-10px border-rd-16px bg-light-secondary-container dark:bg-dark-secondary-container opacity-0`
|
|
49
49
|
],
|
|
50
50
|
[
|
|
51
51
|
/^q-tab--active$/,
|
|
@@ -108,7 +108,8 @@ const shortcuts = [
|
|
|
108
108
|
[
|
|
109
109
|
/^q-tabs--vertical$/,
|
|
110
110
|
([, c], { theme }) => theme.quasar?.components?.['q-tabs--vertical'] ??
|
|
111
|
-
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full) [&_.q-tabs\\_\\_arrow]:(w-full h-[36px] text-center) [&_.q-tabs\\_\\_arrow--left]:(top-[0] left-[0] right-[0]) [&_.q-tabs\\_\\_arrow--right]:(left-[0] right-[0] bottom-[0]) [&_.q-tab]:(px-[8px] py-[0])
|
|
111
|
+
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full) [&_.q-tabs\\_\\_arrow]:(w-full h-[36px] text-center) [&_.q-tabs\\_\\_arrow--left]:(top-[0] left-[0] right-[0]) [&_.q-tabs\\_\\_arrow--right]:(left-[0] right-[0] bottom-[0]) [&_.q-tab]:(px-[8px] py-[0])
|
|
112
|
+
[&.q-tabs--not-scrollable_.q-tabs\\_\\_content]:(h-full) [&.q-tabs--dense_.q-tab\\_\\_content]:(min-w-[24px])`
|
|
112
113
|
],
|
|
113
114
|
[
|
|
114
115
|
/^q-tabs--dense$/,
|
|
@@ -21,20 +21,20 @@ const shortcuts = [
|
|
|
21
21
|
[
|
|
22
22
|
/^q-toggle__track$/,
|
|
23
23
|
([, c], { theme }) => theme.quasar?.components?.['q-toggle__track'] ??
|
|
24
|
-
`outline-solid outline-2px outline-light-outline dark:outline-dark-outline !rounded-full h-[
|
|
24
|
+
`outline-solid outline-2px outline-light-outline dark:outline-dark-outline !rounded-full h-[1em] w-[1.6125em] bg-light-surface-container dark:bg-dark-surface-container`
|
|
25
25
|
],
|
|
26
26
|
[
|
|
27
27
|
/^q-toggle__thumb$/,
|
|
28
28
|
([, c], { theme }) => theme.quasar?.components?.['q-toggle__thumb'] ??
|
|
29
|
-
`
|
|
29
|
+
`layer-components:text-light-surface-container-highest layer-components:dark:text-dark-surface-container-highest
|
|
30
|
+
top-[0.125em] left-[0.5125em] w-[0.75em] h-[0.75em] [transition:left_0.22s_cubic-bezier(0.4,_0,_0.2,_1)] select-none z-0
|
|
30
31
|
[&:before]:()
|
|
31
|
-
[&:after]:(content-[''] bg-light-outline dark:bg-dark-outline absolute top-[0] right-[0] bottom-[0] left-[0] rounded-[50%] [box-shadow:0_3px_1px_-2px_rgba(0,_0,_0,_0.2),_0_2px_2px_0_rgba(0,_0,_0,_0.14),_0_1px_5px_0_rgba(0,_0,_0,_0.12)])
|
|
32
|
-
[&_.q-icon]:(layer-components:text-[0.
|
|
32
|
+
[&:after]:(content-[''] layer-components:bg-light-outline layer-components:dark:bg-dark-outline absolute top-[0] right-[0] bottom-[0] left-[0] rounded-[50%] [box-shadow:0_3px_1px_-2px_rgba(0,_0,_0,_0.2),_0_2px_2px_0_rgba(0,_0,_0,_0.14),_0_1px_5px_0_rgba(0,_0,_0,_0.12)])
|
|
33
|
+
[&_.q-icon]:(z-2 layer-components:text-[0.5em] layer-components:text-[#000] opacity-[0.54])`
|
|
33
34
|
],
|
|
34
35
|
[
|
|
35
36
|
/^q-toggle__inner$/,
|
|
36
|
-
([, c], { theme }) => theme.quasar?.components?.['q-toggle__inner'] ??
|
|
37
|
-
`text-[1.25em] w-[1.4em] min-w-[1.4em] max-h-[1em] px-[0.3em] py-[0.325em]`
|
|
37
|
+
([, c], { theme }) => theme.quasar?.components?.['q-toggle__inner'] ?? `px-0.325em`
|
|
38
38
|
],
|
|
39
39
|
[
|
|
40
40
|
/^q-toggle__inner--indet$/,
|
|
@@ -45,11 +45,9 @@ const shortcuts = [
|
|
|
45
45
|
/^q-toggle__inner--truthy$/,
|
|
46
46
|
([, c], { theme }) => theme.quasar?.components?.['q-toggle__inner--truthy'] ??
|
|
47
47
|
`[&_.q-toggle\\_\\_track]:(bg-light-primary dark:bg-dark-primary)
|
|
48
|
-
[&_.q-toggle\\_\\_thumb]:(left-[
|
|
49
|
-
[&_.q-toggle\\_\\_thumb:after]:(
|
|
50
|
-
[&_.q-toggle\\_\\_thumb_.q-icon]:(layer-components:text-[#fff] opacity-100)
|
|
51
|
-
[&:not(.disabled):focus_.q-toggle\\_\\_thumb:before]:(scale-200)
|
|
52
|
-
[&:not(.disabled):hover_.q-toggle\\_\\_thumb:before]:(scale-200)`
|
|
48
|
+
[&_.q-toggle\\_\\_thumb]:(text-light-on-primary-container dark:text-light-on-primary-container left-[0.95em] top-[0.0625em] w-[0.875em] h-[0.875em])
|
|
49
|
+
[&_.q-toggle\\_\\_thumb:after]:(layer-components:!bg-light-on-primary dark:!bg-dark-on-primary)
|
|
50
|
+
[&_.q-toggle\\_\\_thumb_.q-icon]:(layer-components:text-[#fff] opacity-100)`
|
|
53
51
|
],
|
|
54
52
|
[
|
|
55
53
|
/^q-toggle--dark$/,
|
|
@@ -10,7 +10,7 @@ const shortcuts = [
|
|
|
10
10
|
[
|
|
11
11
|
/^q-toolbar__title$/,
|
|
12
12
|
([, c], { theme }) => theme.quasar?.components?.['q-toolbar__title'] ??
|
|
13
|
-
`flex-
|
|
13
|
+
`flex-initial min-w-[1px] max-w-full text-[21px] font-normal tracking-[0.01em] px-[12px] py-[0] [&:first-child]:(pl-0) [&:last-child]:(pr-0)`
|
|
14
14
|
]
|
|
15
15
|
];
|
|
16
16
|
export { shortcuts };
|
package/dist/styles/md3/index.js
CHANGED
|
@@ -80,7 +80,7 @@ const style = {
|
|
|
80
80
|
rules: [].concat(),
|
|
81
81
|
shortcuts: [].concat(QIconShortcuts, QAjaxBarShortcuts, QAvatarShortcuts, QBadgeShortcuts, QBreadcrumbsShortcuts, QBannerShortcuts, QBarShortcuts, QBtnShortcuts, QBtnDropdownShortcuts, QBtnToggleShortcuts, QCardShortcuts, QCarouselShortcuts, QChatMessageShortcuts, QCheckboxShortcuts, QChipShortcuts, QCircularProgressShortcuts, QColorPickerShortcuts, QDateShortcuts, QDialogShortcuts, QEditorShortcuts, QExpansionItemShortcuts, QFabShortcuts, QFieldShortcuts, QFileShortcuts, QFormShortcuts, QImgShortcuts, QInnerLoadingShortcuts, QInputShortcuts, QIntersectionShortcuts, QItemShortcuts, QKnobShortcuts, QLayoutShortcuts, QLinearProgressShortcuts, QMenuShortcuts, QOptionGroupShortcuts, QPageShortcuts, QPageStickyShortcuts, QPaginationShortcuts, QParallaxShortcuts, QPopupEditShortcuts, QPullToRefreshShortcuts, QRadioShortcuts, QRatingShortcuts, QResponsiveShortcuts, QScrollareaShortcuts, QSelectShortcuts, QSeparatorShortcuts, QSkeletonShortcuts, QSlideItemShortcuts, QSliderShortcuts, QSpaceShortcuts, QSpinnerShortcuts, QSplitterShortcuts, QStepperShortcuts, QTabPanelShortcuts, QTableShortcuts, QTabsShortcuts, QTimeShortcuts, QTimelineShortcuts, QToggleShortcuts, QToolbarShortcuts, QTooltipShortcuts, QTreeShortcuts, QUploaderShortcuts, QVideoShortcuts, QVirtualScrollShortcuts, PanelShortcuts, QMorphShortcuts, QRippleShortcuts, QBottomSheetShortcuts, QDialogPluginShortcuts, QLoadingShortcuts, QNotifyShortcuts, QHeaderShortcuts, QFooterShortcuts, QDrawerShortcuts)
|
|
82
82
|
};
|
|
83
|
-
export const setDefaultProps = ({ QBtn, QBtnDropdown, QInput, QBtnToggle }) => {
|
|
83
|
+
export const setDefaultProps = ({ QBtn, QBtnDropdown, QInput, QBtnToggle, QSelect, QField }) => {
|
|
84
84
|
QBtn.props.rounded = {
|
|
85
85
|
type: QBtn.props.rounded,
|
|
86
86
|
default: true
|
|
@@ -97,5 +97,13 @@ export const setDefaultProps = ({ QBtn, QBtnDropdown, QInput, QBtnToggle }) => {
|
|
|
97
97
|
type: QBtnToggle.props.rounded,
|
|
98
98
|
default: true
|
|
99
99
|
};
|
|
100
|
+
QSelect.props.filled = {
|
|
101
|
+
type: QSelect.props.filled,
|
|
102
|
+
default: true
|
|
103
|
+
};
|
|
104
|
+
QField.props.filled = {
|
|
105
|
+
type: QField.props.filled,
|
|
106
|
+
default: true
|
|
107
|
+
};
|
|
100
108
|
};
|
|
101
109
|
export default style;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { QuasarStyle } from '../index.js';
|
|
2
2
|
declare const style: QuasarStyle;
|
|
3
|
-
export declare const setDefaultProps: ({ QBtn, QBtnDropdown, QInput, QBtnToggle }: {
|
|
3
|
+
export declare const setDefaultProps: ({ QBtn, QBtnDropdown, QInput, QBtnToggle, QSelect, QField }: {
|
|
4
4
|
QBtn: any;
|
|
5
5
|
QBtnDropdown: any;
|
|
6
6
|
QInput: any;
|
|
7
7
|
QBtnToggle: any;
|
|
8
|
+
QSelect: any;
|
|
9
|
+
QField: any;
|
|
8
10
|
}) => void;
|
|
9
11
|
export default style;
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -712,6 +712,7 @@ export interface QuasarTheme {
|
|
|
712
712
|
'q-drawer__backdrop'?: string;
|
|
713
713
|
'q-drawer__opener'?: string;
|
|
714
714
|
'q-page'?: string;
|
|
715
|
+
'q-page-sticky'?: string;
|
|
715
716
|
'q-page-sticky--shrink'?: string;
|
|
716
717
|
'q-body--layout-animate'?: string;
|
|
717
718
|
'q-body--drawer-toggle'?: string;
|
package/package.json
CHANGED
package/src/core/index.ts
CHANGED
|
@@ -315,6 +315,16 @@ font-family: inherit;
|
|
|
315
315
|
margin: 0;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
html, body, #q-app {
|
|
319
|
+
width: 100%;
|
|
320
|
+
direction: ltr;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
body {
|
|
324
|
+
min-width: 100px;
|
|
325
|
+
min-height: 100%;
|
|
326
|
+
}
|
|
327
|
+
|
|
318
328
|
/* beasties:include end */`
|
|
319
329
|
}
|
|
320
330
|
] as Preflight<QuasarTheme>[]
|
package/src/index.ts
CHANGED
|
@@ -1119,6 +1119,23 @@ const pluginSafelistMap: Partial<Record<keyof QuasarPlugins, string[]>> = {
|
|
|
1119
1119
|
]
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
+
const colorSafelist = [
|
|
1123
|
+
'bg-primary',
|
|
1124
|
+
'text-primary',
|
|
1125
|
+
'bg-secondary',
|
|
1126
|
+
'text-secondary',
|
|
1127
|
+
'bg-accent',
|
|
1128
|
+
'text-accent',
|
|
1129
|
+
'bg-positive',
|
|
1130
|
+
'text-positive',
|
|
1131
|
+
'bg-negative',
|
|
1132
|
+
'text-negative',
|
|
1133
|
+
'bg-info',
|
|
1134
|
+
'text-info',
|
|
1135
|
+
'bg-warning',
|
|
1136
|
+
'text-warning'
|
|
1137
|
+
]
|
|
1138
|
+
|
|
1122
1139
|
const baseSafelist = [
|
|
1123
1140
|
'relative-position',
|
|
1124
1141
|
'q-panel-parent',
|
|
@@ -1501,7 +1518,7 @@ const generateSafelist = ({
|
|
|
1501
1518
|
plugins?: (keyof QuasarPlugins)[]
|
|
1502
1519
|
iconSet?: QuasarIconSet
|
|
1503
1520
|
}) => {
|
|
1504
|
-
let safelist = baseSafelist
|
|
1521
|
+
let safelist = [...baseSafelist, ...colorSafelist]
|
|
1505
1522
|
if (plugins) {
|
|
1506
1523
|
for (const plugin of plugins) {
|
|
1507
1524
|
const pluginSafelist = pluginSafelistMap[plugin]
|
|
@@ -1566,6 +1583,11 @@ export const QuasarPreset = definePreset((options: QuasarPresetOptions) => {
|
|
|
1566
1583
|
)
|
|
1567
1584
|
const colorMatch = code.matchAll(/color[=|:]"(.*?)"/g)
|
|
1568
1585
|
|
|
1586
|
+
const themeColorMatch = code.matchAll(
|
|
1587
|
+
new RegExp(`(${Object.keys(theme.colors).join('|')})`, 'g')
|
|
1588
|
+
)
|
|
1589
|
+
const iconMatch = code.matchAll(/(?:icon|name)[=|:]"(.*?)"/g)
|
|
1590
|
+
|
|
1569
1591
|
const pascalComponentsMatch: string[] = []
|
|
1570
1592
|
const matches: string[] = []
|
|
1571
1593
|
|
|
@@ -1594,6 +1616,14 @@ export const QuasarPreset = definePreset((options: QuasarPresetOptions) => {
|
|
|
1594
1616
|
for (const match of colorMatch) {
|
|
1595
1617
|
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`)
|
|
1596
1618
|
}
|
|
1619
|
+
for (const match of themeColorMatch) {
|
|
1620
|
+
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`)
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
const iconClasses = []
|
|
1624
|
+
for (const match of iconMatch) {
|
|
1625
|
+
iconClasses.push(`i-mdi-${match[1]}`)
|
|
1626
|
+
}
|
|
1597
1627
|
|
|
1598
1628
|
// const classes = qClasses.filter((c) =>
|
|
1599
1629
|
// matches.some((component) => {
|
|
@@ -1625,7 +1655,8 @@ export const QuasarPreset = definePreset((options: QuasarPresetOptions) => {
|
|
|
1625
1655
|
classes.push(
|
|
1626
1656
|
...transitionClasses,
|
|
1627
1657
|
...colorClasses,
|
|
1628
|
-
...componentClasses
|
|
1658
|
+
...componentClasses,
|
|
1659
|
+
...iconClasses
|
|
1629
1660
|
)
|
|
1630
1661
|
return classes
|
|
1631
1662
|
}
|
|
@@ -15,7 +15,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
15
15
|
/^q-banner__avatar$/,
|
|
16
16
|
([, c], { theme }) =>
|
|
17
17
|
theme.quasar?.components?.['q-banner__avatar'] ??
|
|
18
|
-
`!min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
18
|
+
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
19
19
|
],
|
|
20
20
|
|
|
21
21
|
[
|
|
@@ -15,7 +15,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
15
15
|
/^q-banner__avatar$/,
|
|
16
16
|
([, c], { theme }) =>
|
|
17
17
|
theme.quasar?.components?.['q-banner__avatar'] ??
|
|
18
|
-
`!min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
18
|
+
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
19
19
|
],
|
|
20
20
|
|
|
21
21
|
[
|
|
@@ -6,7 +6,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
6
6
|
/^q-btn$/,
|
|
7
7
|
([, c], { theme }) =>
|
|
8
8
|
theme.quasar?.components?.['q-btn'] ??
|
|
9
|
-
`layer-components:
|
|
9
|
+
`layer-components:bg-light-primary dark:bg-dark-primary layer-components:text-light-on-primary layer-components:dark:text-dark-on-primary inline-flex flex-col font-medium items-stretch relative outline-0 border-0 align-middle text-[14px] leading-[1.715em] no-underline font-medium text-center w-auto min-h-40px cursor-default px-[16px] py-[4px] min-h-[2.572em] [&_.q-icon]:(text-[1.715em]) [&_.q-spinner]:(text-[1.715em]) [&.disabled]:(!opacity-70) [&:before]:(content-empty block absolute left-[0] right-[0] top-[0] bottom-[0] [border-radius:inherit] elevation-2)`
|
|
10
10
|
],
|
|
11
11
|
[
|
|
12
12
|
/^q-btn--actionable$/,
|
|
@@ -23,7 +23,9 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
23
23
|
/^q-btn--outline$/,
|
|
24
24
|
([, c], { theme }) =>
|
|
25
25
|
theme.quasar?.components?.['q-btn--outline'] ??
|
|
26
|
-
`!bg-transparent
|
|
26
|
+
`!bg-transparent layer-components:text-light-primary layer-components:dark:text-dark-primary
|
|
27
|
+
[&:before]:(border-[1px] border-solid border-[currentColor] [box-shadow:none]])
|
|
28
|
+
[&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
|
|
27
29
|
],
|
|
28
30
|
|
|
29
31
|
[
|
|
@@ -48,7 +50,9 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
48
50
|
/^q-btn--flat$/,
|
|
49
51
|
([, c], { theme }) =>
|
|
50
52
|
theme.quasar?.components?.['q-btn--flat'] ??
|
|
51
|
-
`!bg-transparent
|
|
53
|
+
`!bg-transparent layer-components:text-light-primary layer-components:dark:text-dark-primary
|
|
54
|
+
[&:before]:([box-shadow:none])
|
|
55
|
+
[&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
|
|
52
56
|
],
|
|
53
57
|
|
|
54
58
|
[
|
|
@@ -70,8 +74,9 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
70
74
|
/^q-btn--fab$/,
|
|
71
75
|
([, c], { theme }) =>
|
|
72
76
|
theme.quasar?.components?.['q-btn--fab'] ??
|
|
73
|
-
`bg-light-primary-container dark:bg-dark-primary-container text-light-on-surface dark:text-dark-on-surface
|
|
77
|
+
`layer-components:bg-light-primary-container layer-components:dark:bg-dark-primary-container layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface
|
|
74
78
|
w-56px h-56px !rounded-16px
|
|
79
|
+
z-${theme.quasar.z.fab}
|
|
75
80
|
[&_.q-icon]:(text-[24px]) [&_.q-icon]:(m-auto)`
|
|
76
81
|
// min-h-[56px] min-w-[56px] p-[16px] pb-0
|
|
77
82
|
],
|
|
@@ -80,7 +85,9 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
80
85
|
/^q-btn--fab-mini$/,
|
|
81
86
|
([, c], { theme }) =>
|
|
82
87
|
theme.quasar?.components?.['q-btn--fab-mini'] ??
|
|
83
|
-
`
|
|
88
|
+
`layer-components:bg-light-primary-container layer-components:dark:bg-dark-primary-container layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface
|
|
89
|
+
w-40px h-40px !rounded-16px
|
|
90
|
+
[&_.q-icon]:(text-[24px])`
|
|
84
91
|
// min-h-[40px] min-w-[40px]
|
|
85
92
|
],
|
|
86
93
|
|
|
@@ -6,7 +6,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
6
6
|
/^q-card$/,
|
|
7
7
|
([, c], { theme }) =>
|
|
8
8
|
theme.quasar?.components?.['q-card'] ??
|
|
9
|
-
`rounded-[12px] align-top bg-[#fff] relative bg-light-surface-container dark:bg-dark-surface-container
|
|
9
|
+
`p-16px rounded-[12px] align-top bg-[#fff] relative bg-light-surface-container dark:bg-dark-surface-container
|
|
10
10
|
[&_>_div:not(.q--avoid-card-border)]:(rounded-tl-none rounded-tr-none rounded-bl-none rounded-br-none)
|
|
11
11
|
[&_>_img:not(.q--avoid-card-border)]:(rounded-tl-none rounded-tr-none rounded-bl-none rounded-br-none)
|
|
12
12
|
[&_>_div:nth-child(1_of_:not(.q--avoid-card-border))]:([border-top:0] [border-top-left-radius:inherit] [border-top-right-radius:inherit])
|
|
@@ -49,7 +49,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
49
49
|
/^q-card__actions$/,
|
|
50
50
|
([, c], { theme }) =>
|
|
51
51
|
theme.quasar?.components?.['q-card__actions'] ??
|
|
52
|
-
`p-[8px] items-center [&_.q-btn--rectangle]:(px-[8px] py-[0])`
|
|
52
|
+
`p-[8px] items-center [&_.q-btn--rectangle:not(.q-btn--rounded)]:(px-[8px] py-[0])`
|
|
53
53
|
],
|
|
54
54
|
|
|
55
55
|
[
|
|
@@ -127,28 +127,32 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
127
127
|
/^q-date__edit-range$/,
|
|
128
128
|
([, c], { theme }) =>
|
|
129
129
|
theme.quasar?.components?.['q-date__edit-range'] ??
|
|
130
|
-
`[&:after]:(border-
|
|
130
|
+
`[&:after]:(border-light-primary dark:border-dark-primary border-l-transparent border-r-transparent)
|
|
131
|
+
[&:nth-child(7n-6):after]:(rounded-tl-none rounded-bl-none)
|
|
132
|
+
[&:nth-child(7n):after]:(rounded-tr-none rounded-br-none)`
|
|
131
133
|
],
|
|
132
134
|
|
|
133
135
|
[
|
|
134
136
|
/^q-date__edit-range-from$/,
|
|
135
137
|
([, c], { theme }) =>
|
|
136
138
|
theme.quasar?.components?.['q-date__edit-range-from'] ??
|
|
137
|
-
`[&:after]:(left-[4px]
|
|
139
|
+
`[&:after]:(left-[4px]
|
|
140
|
+
border-r-0 border-light-primary dark:border-dark-primary rounded-tl-[28px] rounded-bl-[28px])`
|
|
138
141
|
],
|
|
139
142
|
|
|
140
143
|
[
|
|
141
144
|
/^q-date__edit-range-from-to$/,
|
|
142
145
|
([, c], { theme }) =>
|
|
143
146
|
theme.quasar?.components?.['q-date__edit-range-from-to'] ??
|
|
144
|
-
`[&:after]:(left-[4px]
|
|
147
|
+
`[&:after]:(left-[4px] border-light-primary dark:border-dark-primary border-r-transparent rounded-tl-[28px] rounded-bl-[28px])
|
|
148
|
+
[&:after]:(right-[4px] [border-light-primary dark:border-dark-primary border-l-transparent rounded-tr-[28px] rounded-br-[28px])`
|
|
145
149
|
],
|
|
146
150
|
|
|
147
151
|
[
|
|
148
152
|
/^q-date__edit-range-to$/,
|
|
149
153
|
([, c], { theme }) =>
|
|
150
154
|
theme.quasar?.components?.['q-date__edit-range-to'] ??
|
|
151
|
-
`[&:after]:(right-[4px]
|
|
155
|
+
`[&:after]:(right-[4px] border-l-transparent border-light-primary dark:border-dark-primary rounded-tr-[28px] rounded-br-[28px])`
|
|
152
156
|
],
|
|
153
157
|
|
|
154
158
|
[
|
|
@@ -6,7 +6,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
6
6
|
/^q-drawer$/,
|
|
7
7
|
([, c], { theme }) =>
|
|
8
8
|
theme.quasar?.components?.['q-drawer'] ??
|
|
9
|
-
`absolute top-[0] bottom-[0] bg-
|
|
9
|
+
`absolute top-[0] bottom-[0] bg-light-surface-container-low dark:bg-dark-surface-container-low z-${theme.quasar.z['side']}`
|
|
10
10
|
],
|
|
11
11
|
|
|
12
12
|
[
|
|
@@ -34,14 +34,23 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
34
34
|
/^q-drawer-container$/,
|
|
35
35
|
([, c], { theme }) =>
|
|
36
36
|
theme.quasar?.components?.['q-drawer-container'] ??
|
|
37
|
-
`[&:not(.q-drawer--mini-animate)_.q-drawer--mini]:(!p-0)
|
|
37
|
+
`[&:not(.q-drawer--mini-animate)_.q-drawer--mini]:(!p-0)
|
|
38
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item]:(text-center justify-center pl-0 pr-0 min-w-[0])
|
|
39
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item\\_\\_section]:(text-center justify-center pl-0 pr-0 min-w-[0])
|
|
40
|
+
[&:not(.q-drawer--mini-animate)_.q-drawer--mini_.q-item\\_\\_label]:(hidden)
|
|
41
|
+
[&:not(.q-drawer--mini-animate)__.q-drawer--mini__.q-item\\_\\_section--main]:(hidden)
|
|
42
|
+
[&:not(.q-drawer--mini-animate)__.q-drawer--mini__.q-item\\_\\_section--side__~_.q-item\\_\\_section--side]:(hidden)`
|
|
38
43
|
],
|
|
39
44
|
|
|
40
45
|
[
|
|
41
46
|
/^q-drawer--mini$/,
|
|
42
47
|
([, c], { theme }) =>
|
|
43
48
|
theme.quasar?.components?.['q-drawer--mini'] ??
|
|
44
|
-
`[&_.q-
|
|
49
|
+
`[&_>_.q-drawer\\_\\_content]:(!py-9px)
|
|
50
|
+
[&_>_.q-drawer\\_\\_content_>_*]:(!px-4px)
|
|
51
|
+
[&_.q-mini-drawer-hide]:(hidden) [&_.q-expansion-item\\_\\_content]:(hidden)
|
|
52
|
+
[&_.q-tab\\_\\_label]:(text-12px)
|
|
53
|
+
[&_.q-tabs--vertical_.q-tab]:(px-0px)`
|
|
45
54
|
],
|
|
46
55
|
|
|
47
56
|
[
|
|
@@ -83,10 +92,13 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
83
92
|
/^q-drawer__content$/,
|
|
84
93
|
([, c], { theme }) =>
|
|
85
94
|
theme.quasar?.components?.['q-drawer__content'] ??
|
|
86
|
-
`
|
|
87
|
-
[&_>_
|
|
88
|
-
[&_>_.q-
|
|
89
|
-
[&_>_.q-
|
|
95
|
+
`py-14px
|
|
96
|
+
[&_>_*]:(px-28px)
|
|
97
|
+
[&_>_.q-scrollarea]:(px-0)
|
|
98
|
+
[&_>_.q-list]:(px-12px)
|
|
99
|
+
[&_.q-list_.q-item]:(border-rd-32px)
|
|
100
|
+
[&_.q-list_>_.q-router-link--active]:(text-light-primary dark:text-dark-primary)
|
|
101
|
+
[&_.q-list_.q-router-link--exact-active]:(bg-light-secondary-container dark:bg-dark-secondary-container
|
|
90
102
|
)`
|
|
91
103
|
]
|
|
92
104
|
]
|
|
@@ -35,7 +35,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
35
35
|
[&_::-ms-reveal]:(hidden)`
|
|
36
36
|
],
|
|
37
37
|
|
|
38
|
-
[/^q-field--with-bottom$/, ([, c], { theme }) =>
|
|
38
|
+
[/^q-field--with-bottom$/, ([, c], { theme }) => ``],
|
|
39
39
|
|
|
40
40
|
[
|
|
41
41
|
/^q-field__marginal$/,
|
|
@@ -71,14 +71,14 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
71
71
|
/^q-field__bottom$/,
|
|
72
72
|
([, c], { theme }) =>
|
|
73
73
|
theme.quasar?.components?.['q-field__bottom'] ??
|
|
74
|
-
`text-[12px] min-h-[20px] leading-none text-black/54 mt
|
|
74
|
+
`text-[12px] min-h-[20px] leading-none bg-transparent text-black/54 mt-4px px-[12px] pb-[0] [backface-visibility:hidden]`
|
|
75
75
|
],
|
|
76
76
|
|
|
77
77
|
[
|
|
78
78
|
/^q-field__bottom--animated$/,
|
|
79
79
|
([, c], { theme }) =>
|
|
80
80
|
theme.quasar?.components?.['q-field__bottom--animated'] ??
|
|
81
|
-
`
|
|
81
|
+
`left-[0] right-[0] bottom-[0]`
|
|
82
82
|
],
|
|
83
83
|
|
|
84
84
|
[
|
|
@@ -222,19 +222,19 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
222
222
|
/^q-field--filled$/,
|
|
223
223
|
([, c], { theme }) =>
|
|
224
224
|
theme.quasar?.components?.['q-field--filled'] ??
|
|
225
|
-
`bg-light-surface-container text-light-on-surface-variant
|
|
226
|
-
dark:bg-dark-surface-container dark:text-dark-on-surface-variant
|
|
225
|
+
`[&_.q-field\\_\\_control]:(bg-light-surface-container text-light-on-surface-variant
|
|
226
|
+
dark:bg-dark-surface-container dark:text-dark-on-surface-variant)
|
|
227
227
|
[&_.q-field\\_\\_control]:(px-[16px] py-[0] layer-components:bg-black/5 rounded-tl-[4px] rounded-br-[0] rounded-tr-[4px] rounded-bl-[0])
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
228
|
+
[&_.q-field\\_\\_control:before]:(layer-components:bg-black/5 [border-bottom:1px_solid_rgba(0,_0,_0,_0.42)] opacity-0 [transition:opacity_0.36s_cubic-bezier(0.4,_0,_0.2,_1),_background_0.36s_cubic-bezier(0.4,_0,_0.2,_1)])
|
|
229
|
+
[&_.q-field\\_\\_control:hover:before]:(opacity-100)
|
|
230
|
+
[&_.q-field\\_\\_control:after]:(h-[2px] top-auto origin-[center_bottom] [transform:scale3d(0,_1,_1)] bg-current [transition:transform_0.36s_cubic-bezier(0.4,_0,_0.2,_1)])
|
|
231
|
+
[&.q-field--rounded_.q-field\\_\\_control]:(rounded-tl-[28px] rounded-br-[0] rounded-tr-[28px] rounded-bl-[0])
|
|
232
|
+
[&.q-field--highlighted_.q-field\\_\\_control:before]:(opacity-100 layer-components:bg-black/12)
|
|
233
|
+
[&.q-field--highlighted_.q-field\\_\\_control:after]:([transform:scale3d(1,_1,_1)])
|
|
234
|
+
[&.q-field--dark_.q-field\\_\\_control]:(layer-components:bg-white/7)
|
|
235
|
+
[&.q-field--dark_.q-field\\_\\_control:before]:(layer-components:bg-white/7)
|
|
236
|
+
[&.q-field--dark.q-field--highlighted_.q-field\\_\\_control:before]:(layer-components:bg-white/1)
|
|
237
|
+
[&.q-field--readonly_.q-field\\_\\_control:before]:(opacity-100 bg-transparent [border-bottom-style:dashed])`
|
|
238
238
|
],
|
|
239
239
|
|
|
240
240
|
[
|
|
@@ -333,7 +333,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
333
333
|
`[&_.q-field--with-bottom]:(pb-[19px])
|
|
334
334
|
[&_.q-field\\_\\_shadow]:(top-[0])
|
|
335
335
|
[&_.q-field\\_\\_control]:(h-[40px])
|
|
336
|
-
[&_.q-field\\_\\_marginal]:(
|
|
336
|
+
[&_.q-field\\_\\_marginal]:()
|
|
337
337
|
[&_.q-field\\_\\_bottom]:(text-[11px])
|
|
338
338
|
[&_.q-field\\_\\_label]:(text-[14px] top-[10px])
|
|
339
339
|
[&_.q-field\\_\\_before]:()
|
|
@@ -15,7 +15,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
15
15
|
/^q-footer$/,
|
|
16
16
|
([, c], { theme }) =>
|
|
17
17
|
theme.quasar?.components?.['q-footer'] ??
|
|
18
|
-
`[&_.q-layout\\_\\_shadow]:(-top-[10px]) [&_.q-layout\\_\\_shadow:after]:(top-[10px])
|
|
18
|
+
`[&_.q-layout\\_\\_shadow]:(-top-[10px]) [&_.q-layout\\_\\_shadow:after]:(top-[10px]) z-${theme.quasar.z['marginals']}`
|
|
19
19
|
]
|
|
20
20
|
]
|
|
21
21
|
|
|
@@ -15,7 +15,8 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
15
15
|
/^q-header$/,
|
|
16
16
|
([, c], { theme }) =>
|
|
17
17
|
theme.quasar?.components?.['q-header'] ??
|
|
18
|
-
`z-2000 [&_.q-layout\\_\\_shadow]:(-bottom-10px) [&_.q-layout\\_\\_shadow:after]:(bottom-10px)
|
|
18
|
+
`z-2000 [&_.q-layout\\_\\_shadow]:(-bottom-10px) [&_.q-layout\\_\\_shadow:after]:(bottom-10px)
|
|
19
|
+
[&_.q-toolbar\\_\\_title]:(flex-grow-1000)`
|
|
19
20
|
// relative
|
|
20
21
|
]
|
|
21
22
|
]
|
|
@@ -13,7 +13,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
13
13
|
[&>img]:(h-full w-full)
|
|
14
14
|
[&:before]:(w-full h-full flex! items-center justify-center)
|
|
15
15
|
[&:after]:(w-full h-full flex! items-center justify-center)
|
|
16
|
-
select-none cursor-inherit text-light-on-surface dark:text-dark-on-surface inline-flex items-center justify-center v-middle
|
|
16
|
+
select-none cursor-inherit layer-components:text-light-on-surface layer-components:dark:text-dark-on-surface inline-flex items-center justify-center v-middle
|
|
17
17
|
`
|
|
18
18
|
],
|
|
19
19
|
// [
|
|
@@ -6,7 +6,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
6
6
|
/^q-item$/,
|
|
7
7
|
([, c], { theme }) =>
|
|
8
8
|
theme.quasar?.components?.['q-item'] ??
|
|
9
|
-
`min-h-[
|
|
9
|
+
`min-h-[28px] px-[16px] py-[8px] [color:inherit] [transition:color_0.3s,_background-color_0.3s] [&_>_.q-item\\_\\_section--thumbnail:first-child]:(-ml-[16px]) [&_>_.q-focus-helper_+_.q-item\\_\\_section--thumbnail]:(-ml-[16px]) [&_>_.q-item\\_\\_section--thumbnail:last-of-type]:(-mr-[16px]) relative
|
|
10
10
|
[&.q-router-link--active]:(text-primary)`
|
|
11
11
|
],
|
|
12
12
|
|
|
@@ -80,8 +80,8 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
80
80
|
([, c], { theme }) =>
|
|
81
81
|
theme.quasar?.components?.['q-item__section--main'] ??
|
|
82
82
|
`w-auto min-w-[0] max-w-full flex-[10000_1_0%]
|
|
83
|
-
[&:has(>:last-child:nth-child(2))]:(min-h-
|
|
84
|
-
[&:has(>:last-child:nth-child(3))]:(min-h-
|
|
83
|
+
[&:has(>:last-child:nth-child(2))]:(min-h-36px)
|
|
84
|
+
[&:has(>:last-child:nth-child(3))]:(min-h-44px)
|
|
85
85
|
[&_+_.q-item\\_\\_section--main]:(ml-[8px])
|
|
86
86
|
[&_~_.q-item\\_\\_section--side]:(items-end pr-0 pl-[16px])`
|
|
87
87
|
],
|
|
@@ -104,10 +104,10 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
104
104
|
/^q-list--dense$/,
|
|
105
105
|
([, c], { theme }) =>
|
|
106
106
|
theme.quasar?.components?.['q-list--dense'] ??
|
|
107
|
-
`[&_>_.q-item]:(min-h-[
|
|
107
|
+
`[&_>_.q-item]:(min-h-[28px] px-[16px] py-[2px])`
|
|
108
108
|
],
|
|
109
109
|
|
|
110
|
-
[/^q-item--dense$/, ([, c], { theme }) => `min-h-[
|
|
110
|
+
[/^q-item--dense$/, ([, c], { theme }) => `min-h-[28px] px-[16px] py-[2px]`],
|
|
111
111
|
|
|
112
112
|
[
|
|
113
113
|
/^q-list--dark$/,
|
|
@@ -88,7 +88,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
88
88
|
/^q-layout__section--marginal$/,
|
|
89
89
|
([, c], { theme }) =>
|
|
90
90
|
theme.quasar?.components?.['q-layout__section--marginal'] ??
|
|
91
|
-
`text-[#fff] bg-light-surface dark:bg-dark-surface-container text-light-on-surface dark:text-dark-on-surface`
|
|
91
|
+
`text-[#fff] bg-light-surface-container-low dark:bg-dark-surface-container-low text-light-on-surface dark:text-dark-on-surface`
|
|
92
92
|
]
|
|
93
93
|
]
|
|
94
94
|
|
|
@@ -2,6 +2,10 @@ import type { Rule, UserShortcuts } from '@unocss/core'
|
|
|
2
2
|
import type { QuasarTheme } from '../../../theme.js'
|
|
3
3
|
|
|
4
4
|
const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
5
|
+
[
|
|
6
|
+
/^q-page-sticky$/,
|
|
7
|
+
([, c], { theme }) => theme.quasar?.components?.['q-page-sticky'] ?? ``
|
|
8
|
+
],
|
|
5
9
|
[
|
|
6
10
|
/^q-page-sticky--shrink$/,
|
|
7
11
|
([, c], { theme }) =>
|
|
@@ -6,7 +6,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
6
6
|
/^q-tab$/,
|
|
7
7
|
([, c], { theme }) =>
|
|
8
8
|
theme.quasar?.components?.['q-tab'] ??
|
|
9
|
-
`px-[16px] py-[0] min-h-[48px] [transition:color_0.3s,_background-color_0.3s]
|
|
9
|
+
`px-[16px] py-[0] min-h-[48px] [transition:color_0.3s,_background-color_0.3s] whitespace-nowrap [color:inherit] no-underline [&_.q-badge]:(top-[3px] -right-[12px])`
|
|
10
10
|
],
|
|
11
11
|
|
|
12
12
|
[
|
|
@@ -25,7 +25,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
25
25
|
/^q-tab__content$/,
|
|
26
26
|
([, c], { theme }) =>
|
|
27
27
|
theme.quasar?.components?.['q-tab__content'] ??
|
|
28
|
-
`[height:inherit] px-[0] py-[4px] min-w-[40px] [&_.q-chip--floating]:(top-[0] -right-[16px])`
|
|
28
|
+
`[height:inherit] z-2 px-[0] py-[4px] min-w-[40px] [&_.q-chip--floating]:(top-[0] -right-[16px])`
|
|
29
29
|
],
|
|
30
30
|
|
|
31
31
|
[
|
|
@@ -67,7 +67,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
67
67
|
/^q-tab__indicator$/,
|
|
68
68
|
([, c], { theme }) =>
|
|
69
69
|
theme.quasar?.components?.['q-tab__indicator'] ??
|
|
70
|
-
|
|
70
|
+
`absolute h-32px w-52px top-0 left-10px border-rd-16px bg-light-secondary-container dark:bg-dark-secondary-container opacity-0`
|
|
71
71
|
],
|
|
72
72
|
|
|
73
73
|
[
|
|
@@ -156,7 +156,8 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
156
156
|
/^q-tabs--vertical$/,
|
|
157
157
|
([, c], { theme }) =>
|
|
158
158
|
theme.quasar?.components?.['q-tabs--vertical'] ??
|
|
159
|
-
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full) [&_.q-tabs\\_\\_arrow]:(w-full h-[36px] text-center) [&_.q-tabs\\_\\_arrow--left]:(top-[0] left-[0] right-[0]) [&_.q-tabs\\_\\_arrow--right]:(left-[0] right-[0] bottom-[0]) [&_.q-tab]:(px-[8px] py-[0])
|
|
159
|
+
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full) [&_.q-tabs\\_\\_arrow]:(w-full h-[36px] text-center) [&_.q-tabs\\_\\_arrow--left]:(top-[0] left-[0] right-[0]) [&_.q-tabs\\_\\_arrow--right]:(left-[0] right-[0] bottom-[0]) [&_.q-tab]:(px-[8px] py-[0])
|
|
160
|
+
[&.q-tabs--not-scrollable_.q-tabs\\_\\_content]:(h-full) [&.q-tabs--dense_.q-tab\\_\\_content]:(min-w-[24px])`
|
|
160
161
|
],
|
|
161
162
|
|
|
162
163
|
[
|
|
@@ -29,24 +29,24 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
29
29
|
/^q-toggle__track$/,
|
|
30
30
|
([, c], { theme }) =>
|
|
31
31
|
theme.quasar?.components?.['q-toggle__track'] ??
|
|
32
|
-
`outline-solid outline-2px outline-light-outline dark:outline-dark-outline !rounded-full h-[
|
|
32
|
+
`outline-solid outline-2px outline-light-outline dark:outline-dark-outline !rounded-full h-[1em] w-[1.6125em] bg-light-surface-container dark:bg-dark-surface-container`
|
|
33
33
|
],
|
|
34
34
|
|
|
35
35
|
[
|
|
36
36
|
/^q-toggle__thumb$/,
|
|
37
37
|
([, c], { theme }) =>
|
|
38
38
|
theme.quasar?.components?.['q-toggle__thumb'] ??
|
|
39
|
-
`
|
|
39
|
+
`layer-components:text-light-surface-container-highest layer-components:dark:text-dark-surface-container-highest
|
|
40
|
+
top-[0.125em] left-[0.5125em] w-[0.75em] h-[0.75em] [transition:left_0.22s_cubic-bezier(0.4,_0,_0.2,_1)] select-none z-0
|
|
40
41
|
[&:before]:()
|
|
41
|
-
[&:after]:(content-[''] bg-light-outline dark:bg-dark-outline absolute top-[0] right-[0] bottom-[0] left-[0] rounded-[50%] [box-shadow:0_3px_1px_-2px_rgba(0,_0,_0,_0.2),_0_2px_2px_0_rgba(0,_0,_0,_0.14),_0_1px_5px_0_rgba(0,_0,_0,_0.12)])
|
|
42
|
-
[&_.q-icon]:(layer-components:text-[0.
|
|
42
|
+
[&:after]:(content-[''] layer-components:bg-light-outline layer-components:dark:bg-dark-outline absolute top-[0] right-[0] bottom-[0] left-[0] rounded-[50%] [box-shadow:0_3px_1px_-2px_rgba(0,_0,_0,_0.2),_0_2px_2px_0_rgba(0,_0,_0,_0.14),_0_1px_5px_0_rgba(0,_0,_0,_0.12)])
|
|
43
|
+
[&_.q-icon]:(z-2 layer-components:text-[0.5em] layer-components:text-[#000] opacity-[0.54])`
|
|
43
44
|
],
|
|
44
45
|
|
|
45
46
|
[
|
|
46
47
|
/^q-toggle__inner$/,
|
|
47
48
|
([, c], { theme }) =>
|
|
48
|
-
theme.quasar?.components?.['q-toggle__inner'] ??
|
|
49
|
-
`text-[1.25em] w-[1.4em] min-w-[1.4em] max-h-[1em] px-[0.3em] py-[0.325em]`
|
|
49
|
+
theme.quasar?.components?.['q-toggle__inner'] ?? `px-0.325em`
|
|
50
50
|
],
|
|
51
51
|
|
|
52
52
|
[
|
|
@@ -61,11 +61,9 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
61
61
|
([, c], { theme }) =>
|
|
62
62
|
theme.quasar?.components?.['q-toggle__inner--truthy'] ??
|
|
63
63
|
`[&_.q-toggle\\_\\_track]:(bg-light-primary dark:bg-dark-primary)
|
|
64
|
-
[&_.q-toggle\\_\\_thumb]:(left-[
|
|
65
|
-
[&_.q-toggle\\_\\_thumb:after]:(
|
|
66
|
-
[&_.q-toggle\\_\\_thumb_.q-icon]:(layer-components:text-[#fff] opacity-100)
|
|
67
|
-
[&:not(.disabled):focus_.q-toggle\\_\\_thumb:before]:(scale-200)
|
|
68
|
-
[&:not(.disabled):hover_.q-toggle\\_\\_thumb:before]:(scale-200)`
|
|
64
|
+
[&_.q-toggle\\_\\_thumb]:(text-light-on-primary-container dark:text-light-on-primary-container left-[0.95em] top-[0.0625em] w-[0.875em] h-[0.875em])
|
|
65
|
+
[&_.q-toggle\\_\\_thumb:after]:(layer-components:!bg-light-on-primary dark:!bg-dark-on-primary)
|
|
66
|
+
[&_.q-toggle\\_\\_thumb_.q-icon]:(layer-components:text-[#fff] opacity-100)`
|
|
69
67
|
],
|
|
70
68
|
|
|
71
69
|
[
|
|
@@ -17,7 +17,7 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
17
17
|
/^q-toolbar__title$/,
|
|
18
18
|
([, c], { theme }) =>
|
|
19
19
|
theme.quasar?.components?.['q-toolbar__title'] ??
|
|
20
|
-
`flex-
|
|
20
|
+
`flex-initial min-w-[1px] max-w-full text-[21px] font-normal tracking-[0.01em] px-[12px] py-[0] [&:first-child]:(pl-0) [&:last-child]:(pr-0)`
|
|
21
21
|
]
|
|
22
22
|
]
|
|
23
23
|
|
package/src/styles/md3/index.ts
CHANGED
|
@@ -232,12 +232,16 @@ export const setDefaultProps = ({
|
|
|
232
232
|
QBtn,
|
|
233
233
|
QBtnDropdown,
|
|
234
234
|
QInput,
|
|
235
|
-
QBtnToggle
|
|
235
|
+
QBtnToggle,
|
|
236
|
+
QSelect,
|
|
237
|
+
QField
|
|
236
238
|
}: {
|
|
237
239
|
QBtn: any
|
|
238
240
|
QBtnDropdown: any
|
|
239
241
|
QInput: any
|
|
240
242
|
QBtnToggle: any
|
|
243
|
+
QSelect: any
|
|
244
|
+
QField: any
|
|
241
245
|
}) => {
|
|
242
246
|
QBtn.props.rounded = {
|
|
243
247
|
type: QBtn.props.rounded,
|
|
@@ -255,6 +259,14 @@ export const setDefaultProps = ({
|
|
|
255
259
|
type: QBtnToggle.props.rounded,
|
|
256
260
|
default: true
|
|
257
261
|
}
|
|
262
|
+
QSelect.props.filled = {
|
|
263
|
+
type: QSelect.props.filled,
|
|
264
|
+
default: true
|
|
265
|
+
}
|
|
266
|
+
QField.props.filled = {
|
|
267
|
+
type: QField.props.filled,
|
|
268
|
+
default: true
|
|
269
|
+
}
|
|
258
270
|
}
|
|
259
271
|
|
|
260
272
|
export default style
|
package/src/theme.ts
CHANGED
|
@@ -730,6 +730,7 @@ export interface QuasarTheme {
|
|
|
730
730
|
'q-drawer__backdrop'?: string
|
|
731
731
|
'q-drawer__opener'?: string
|
|
732
732
|
'q-page'?: string
|
|
733
|
+
'q-page-sticky'?: string
|
|
733
734
|
'q-page-sticky--shrink'?: string
|
|
734
735
|
'q-body--layout-animate'?: string
|
|
735
736
|
'q-body--drawer-toggle'?: string
|