unocss-preset-quasar 0.1.4 → 0.1.6
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/dark.unocss.js +4 -1
- package/dist/core/flex.unocss.js +17 -6
- package/dist/core/index.js +10 -0
- package/dist/core/typography.unocss.js +0 -2
- package/dist/index.js +58 -20
- package/dist/styles/md2/components/QBanner.unocss.js +5 -0
- package/dist/styles/md2/components/QCheckbox.unocss.js +1 -1
- package/dist/styles/md2/components/QItem.unocss.js +2 -2
- package/dist/styles/md2/components/QScrollarea.unocss.js +2 -5
- package/dist/styles/md2/components/QTabs.unocss.js +14 -5
- package/dist/styles/md3/components/QBanner.unocss.js +7 -2
- package/dist/styles/md3/components/QBtn.unocss.js +12 -5
- package/dist/styles/md3/components/QBtnToggle.unocss.js +1 -0
- package/dist/styles/md3/components/QCard.unocss.js +7 -2
- package/dist/styles/md3/components/QCheckbox.unocss.js +7 -3
- package/dist/styles/md3/components/QChip.unocss.js +4 -3
- package/dist/styles/md3/components/QDate.unocss.js +8 -4
- package/dist/styles/md3/components/QDrawer.unocss.js +20 -7
- package/dist/styles/md3/components/QField.unocss.js +33 -32
- 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 +15 -10
- 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/QScrollarea.unocss.js +2 -5
- package/dist/styles/md3/components/QStepper.unocss.js +30 -4
- package/dist/styles/md3/components/QTabs.unocss.js +16 -6
- package/dist/styles/md3/components/QToggle.unocss.js +1 -3
- package/dist/styles/md3/components/QToolbar.unocss.js +1 -1
- package/dist/styles/md3/index.js +17 -1
- package/dist/theme.js +1 -1
- package/dist/types/styles/md3/index.d.ts +5 -1
- package/dist/types/theme.d.ts +5 -0
- package/package.json +1 -1
- package/src/core/dark.unocss.ts +4 -1
- package/src/core/flex.unocss.ts +16 -6
- package/src/core/index.ts +10 -0
- package/src/core/typography.unocss.ts +0 -2
- package/src/index.ts +64 -20
- package/src/styles/md2/components/QBanner.unocss.ts +7 -0
- package/src/styles/md2/components/QCheckbox.unocss.ts +1 -1
- package/src/styles/md2/components/QItem.unocss.ts +2 -2
- package/src/styles/md2/components/QScrollarea.unocss.ts +2 -5
- package/src/styles/md2/components/QTabs.unocss.ts +14 -5
- package/src/styles/md3/components/QBanner.unocss.ts +9 -2
- package/src/styles/md3/components/QBtn.unocss.ts +12 -5
- package/src/styles/md3/components/QBtnToggle.unocss.ts +1 -0
- package/src/styles/md3/components/QCard.unocss.ts +9 -2
- package/src/styles/md3/components/QCheckbox.unocss.ts +9 -3
- package/src/styles/md3/components/QChip.unocss.ts +4 -3
- package/src/styles/md3/components/QDate.unocss.ts +8 -4
- package/src/styles/md3/components/QDrawer.unocss.ts +20 -7
- package/src/styles/md3/components/QField.unocss.ts +33 -32
- 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 +15 -10
- 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/QScrollarea.unocss.ts +2 -5
- package/src/styles/md3/components/QStepper.unocss.ts +32 -4
- package/src/styles/md3/components/QTabs.unocss.ts +16 -6
- package/src/styles/md3/components/QToggle.unocss.ts +1 -3
- package/src/styles/md3/components/QToolbar.unocss.ts +1 -1
- package/src/styles/md3/index.ts +25 -1
- package/src/theme.ts +6 -1
package/dist/core/dark.unocss.js
CHANGED
package/dist/core/flex.unocss.js
CHANGED
|
@@ -8,6 +8,7 @@ const colGutter = {
|
|
|
8
8
|
lg: 6,
|
|
9
9
|
xl: 12
|
|
10
10
|
};
|
|
11
|
+
const sizes = ['none', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
11
12
|
const shortcuts = [
|
|
12
13
|
[
|
|
13
14
|
/^row$/,
|
|
@@ -18,18 +19,28 @@ const shortcuts = [
|
|
|
18
19
|
([, c], { theme }) => `flex flex-col flex-wrap flex-auto [&.reverse]:(flex-col-reverse)`
|
|
19
20
|
],
|
|
20
21
|
[
|
|
21
|
-
/^col(?:-)?(none|xs|sm|md|lg|xl)?(?:-)?([2-9]|1[0-2]?)?$/,
|
|
22
|
+
/^col(?:-)?(none|xs|sm|md|lg|xl|all|auto|grow)?(?:-)?([2-9]|1[0-2]?)?$/,
|
|
22
23
|
([, size, nr], { theme }) => {
|
|
24
|
+
const classes = ['w-auto max-w-full'];
|
|
23
25
|
if (size && nr) {
|
|
24
|
-
|
|
26
|
+
classes.push(`${size}:basis-${nr}/12)`);
|
|
25
27
|
}
|
|
26
28
|
else if (nr) {
|
|
27
|
-
|
|
29
|
+
classes.push(`basis-${nr}/12`);
|
|
28
30
|
}
|
|
29
|
-
else if (size) {
|
|
30
|
-
|
|
31
|
+
else if (size === 'all') {
|
|
32
|
+
classes.push('basis-12/12');
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
else if (size === 'auto') {
|
|
35
|
+
classes.push('basis-auto');
|
|
36
|
+
}
|
|
37
|
+
else if (sizes.includes(size)) {
|
|
38
|
+
classes.push(`${size}:basis-auto ${size}:grow`);
|
|
39
|
+
}
|
|
40
|
+
else if (size === 'grow' || size === void 0) {
|
|
41
|
+
classes.push('grow');
|
|
42
|
+
}
|
|
43
|
+
return classes.join(' ');
|
|
33
44
|
}
|
|
34
45
|
],
|
|
35
46
|
[
|
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { definePreset, presetIcons, presetWebFonts, transformerVariantGroup } from 'unocss';
|
|
1
|
+
import { definePreset, presetIcons, presetWebFonts, transformerDirectives, transformerVariantGroup } from 'unocss';
|
|
2
2
|
import presetWind3 from '@unocss/preset-wind3';
|
|
3
3
|
import { generateTheme } from './theme.js';
|
|
4
4
|
import { animatedUno } from 'animated-unocss';
|
|
@@ -121,6 +121,20 @@ const QSliderSafelist = [
|
|
|
121
121
|
'q-slider--dark',
|
|
122
122
|
'q-slider--dense'
|
|
123
123
|
];
|
|
124
|
+
const QChipSafelist = [
|
|
125
|
+
'q-chip',
|
|
126
|
+
'q-chip--colored',
|
|
127
|
+
'q-chip--dark',
|
|
128
|
+
'q-chip--outline',
|
|
129
|
+
'q-chip--selected',
|
|
130
|
+
'q-chip__icon',
|
|
131
|
+
'q-chip__icon--left',
|
|
132
|
+
'q-chip__icon--right',
|
|
133
|
+
'q-chip__icon--remove',
|
|
134
|
+
'q-chip__content',
|
|
135
|
+
'q-chip--dense',
|
|
136
|
+
'q-chip--square'
|
|
137
|
+
];
|
|
124
138
|
const componentsSafelistMap = {
|
|
125
139
|
QIcon: ['q-icon'],
|
|
126
140
|
QTabPanel: ['q-panel', 'q-panel-parent'],
|
|
@@ -136,6 +150,7 @@ const componentsSafelistMap = {
|
|
|
136
150
|
],
|
|
137
151
|
QBanner: [
|
|
138
152
|
'q-banner',
|
|
153
|
+
'q-banner__content',
|
|
139
154
|
'q-banner--top-padding',
|
|
140
155
|
'q-banner__avatar',
|
|
141
156
|
'q-banner__actions',
|
|
@@ -256,20 +271,7 @@ const componentsSafelistMap = {
|
|
|
256
271
|
'q-checkbox--dark',
|
|
257
272
|
'q-checkbox--dense'
|
|
258
273
|
],
|
|
259
|
-
QChip:
|
|
260
|
-
'q-chip',
|
|
261
|
-
'q-chip--colored',
|
|
262
|
-
'q-chip--dark',
|
|
263
|
-
'q-chip--outline',
|
|
264
|
-
'q-chip--selected',
|
|
265
|
-
'q-chip__icon',
|
|
266
|
-
'q-chip__icon--left',
|
|
267
|
-
'q-chip__icon--right',
|
|
268
|
-
'q-chip__icon--remove',
|
|
269
|
-
'q-chip__content',
|
|
270
|
-
'q-chip--dense',
|
|
271
|
-
'q-chip--square'
|
|
272
|
-
],
|
|
274
|
+
QChip: QChipSafelist,
|
|
273
275
|
QCircularProgress: [
|
|
274
276
|
'q-circular-progress',
|
|
275
277
|
'q-circular-progress__svg',
|
|
@@ -612,9 +614,11 @@ const componentsSafelistMap = {
|
|
|
612
614
|
'q-scrollarea__bar--invisible',
|
|
613
615
|
'q-scrollarea__thumb--invisible',
|
|
614
616
|
'q-scrollarea__content',
|
|
615
|
-
'q-scrollarea--dark'
|
|
617
|
+
'q-scrollarea--dark',
|
|
618
|
+
'relative-position'
|
|
616
619
|
],
|
|
617
620
|
QSelect: [
|
|
621
|
+
...QChipSafelist,
|
|
618
622
|
'q-list',
|
|
619
623
|
'q-item',
|
|
620
624
|
'q-virtual-scroll',
|
|
@@ -677,6 +681,7 @@ const componentsSafelistMap = {
|
|
|
677
681
|
],
|
|
678
682
|
QStepper: [
|
|
679
683
|
'q-stepper',
|
|
684
|
+
'q-stepper__label',
|
|
680
685
|
'q-stepper__title',
|
|
681
686
|
'q-stepper__caption',
|
|
682
687
|
'q-stepper__dot',
|
|
@@ -698,7 +703,8 @@ const componentsSafelistMap = {
|
|
|
698
703
|
'q-stepper--flat',
|
|
699
704
|
'q-stepper--bordered',
|
|
700
705
|
'q-stepper--horizontal',
|
|
701
|
-
'q-stepper--vertical'
|
|
706
|
+
'q-stepper--vertical',
|
|
707
|
+
'col-grow'
|
|
702
708
|
],
|
|
703
709
|
QTabPanels: ['q-tab-panels', 'q-tab-panel'],
|
|
704
710
|
QMarkupTable: ['q-markup-table'],
|
|
@@ -1004,6 +1010,12 @@ const pluginSafelistMap = {
|
|
|
1004
1010
|
'q-loading-bar--right',
|
|
1005
1011
|
'q-loading-bar--left'
|
|
1006
1012
|
],
|
|
1013
|
+
Loading: [
|
|
1014
|
+
'q-loading',
|
|
1015
|
+
'q-loading__backdrop',
|
|
1016
|
+
'q-loading__box',
|
|
1017
|
+
'q-loading__message'
|
|
1018
|
+
],
|
|
1007
1019
|
Notify: [
|
|
1008
1020
|
'q-avatar',
|
|
1009
1021
|
'q-avatar__content',
|
|
@@ -1081,6 +1093,22 @@ const pluginSafelistMap = {
|
|
|
1081
1093
|
'q-notification--bottom-right-leave-active'
|
|
1082
1094
|
]
|
|
1083
1095
|
};
|
|
1096
|
+
const colorSafelist = [
|
|
1097
|
+
'bg-primary',
|
|
1098
|
+
'text-primary',
|
|
1099
|
+
'bg-secondary',
|
|
1100
|
+
'text-secondary',
|
|
1101
|
+
'bg-accent',
|
|
1102
|
+
'text-accent',
|
|
1103
|
+
'bg-positive',
|
|
1104
|
+
'text-positive',
|
|
1105
|
+
'bg-negative',
|
|
1106
|
+
'text-negative',
|
|
1107
|
+
'bg-info',
|
|
1108
|
+
'text-info',
|
|
1109
|
+
'bg-warning',
|
|
1110
|
+
'text-warning'
|
|
1111
|
+
];
|
|
1084
1112
|
const baseSafelist = [
|
|
1085
1113
|
'relative-position',
|
|
1086
1114
|
'q-panel-parent',
|
|
@@ -1456,7 +1484,7 @@ const baseSafelist = [
|
|
|
1456
1484
|
// 'q-dark'
|
|
1457
1485
|
];
|
|
1458
1486
|
const generateSafelist = ({ plugins, iconSet }) => {
|
|
1459
|
-
let safelist = baseSafelist;
|
|
1487
|
+
let safelist = [...baseSafelist, ...colorSafelist];
|
|
1460
1488
|
if (plugins) {
|
|
1461
1489
|
for (const plugin of plugins) {
|
|
1462
1490
|
const pluginSafelist = pluginSafelistMap[plugin];
|
|
@@ -1515,6 +1543,8 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1515
1543
|
const pascalMatch = code.matchAll(/Q([A-Z][a-z0-9]+)+/g);
|
|
1516
1544
|
const transitionMatch = code.matchAll(/(transition|transition-show|transition-hide|transition-prev|transition-next)="(\S*)"/g);
|
|
1517
1545
|
const colorMatch = code.matchAll(/color[=|:]"(.*?)"/g);
|
|
1546
|
+
const themeColorMatch = code.matchAll(new RegExp(`(${Object.keys(theme.colors).join('|')})`, 'g'));
|
|
1547
|
+
const iconMatch = code.matchAll(/(?:icon|name)[=|:]"(.*?)"/g);
|
|
1518
1548
|
const pascalComponentsMatch = [];
|
|
1519
1549
|
const matches = [];
|
|
1520
1550
|
for (const match of kebabMatch) {
|
|
@@ -1540,6 +1570,13 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1540
1570
|
for (const match of colorMatch) {
|
|
1541
1571
|
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`);
|
|
1542
1572
|
}
|
|
1573
|
+
for (const match of themeColorMatch) {
|
|
1574
|
+
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`);
|
|
1575
|
+
}
|
|
1576
|
+
const iconClasses = [];
|
|
1577
|
+
for (const match of iconMatch) {
|
|
1578
|
+
iconClasses.push(`i-mdi-${match[1]}`);
|
|
1579
|
+
}
|
|
1543
1580
|
// const classes = qClasses.filter((c) =>
|
|
1544
1581
|
// matches.some((component) => {
|
|
1545
1582
|
// component = component.replaceAll(
|
|
@@ -1563,13 +1600,14 @@ export const QuasarPreset = definePreset((options) => {
|
|
|
1563
1600
|
return acc;
|
|
1564
1601
|
}, [])
|
|
1565
1602
|
];
|
|
1566
|
-
classes.push(...transitionClasses, ...colorClasses, ...componentClasses);
|
|
1603
|
+
classes.push(...transitionClasses, ...colorClasses, ...componentClasses, ...iconClasses);
|
|
1567
1604
|
return classes;
|
|
1568
1605
|
}
|
|
1569
1606
|
}
|
|
1570
1607
|
],
|
|
1571
1608
|
transformers: [
|
|
1572
|
-
transformerVariantGroup()
|
|
1609
|
+
transformerVariantGroup(),
|
|
1610
|
+
transformerDirectives()
|
|
1573
1611
|
// {
|
|
1574
1612
|
// name: 'find-classes-in-quasar-src',
|
|
1575
1613
|
// enforce: 'pre', // enforce before other transformers
|
|
@@ -10,6 +10,11 @@ const shortcuts = [
|
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-banner__avatar'] ??
|
|
11
11
|
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
12
12
|
],
|
|
13
|
+
[
|
|
14
|
+
/^q-banner__content$/,
|
|
15
|
+
([, c], { theme }) => theme.quasar?.components?.['q-banner__content'] ??
|
|
16
|
+
`max-w-[calc(100%-56px)]`
|
|
17
|
+
],
|
|
13
18
|
[
|
|
14
19
|
/^q-banner__actions$/,
|
|
15
20
|
([, c], { theme }) => theme.quasar?.components?.['q-banner__actions'] ??
|
|
@@ -51,7 +51,7 @@ const shortcuts = [
|
|
|
51
51
|
[
|
|
52
52
|
/^q-checkbox__inner$/,
|
|
53
53
|
([, c], { theme }) => theme.quasar?.components?.['q-checkbox__inner'] ??
|
|
54
|
-
`text-[40px] w-[1em] min-w-[1em] h-[1em] outline-[0] rounded-[50%] layer-components:text-[rgba(0,_0,_0,_0.54)]`
|
|
54
|
+
`mr-2px text-[40px] w-[1em] min-w-[1em] h-[1em] outline-[0] rounded-[50%] layer-components:text-[rgba(0,_0,_0,_0.54)]`
|
|
55
55
|
],
|
|
56
56
|
[
|
|
57
57
|
/^q-checkbox__inner--truthy$/,
|
|
@@ -8,12 +8,12 @@ const shortcuts = [
|
|
|
8
8
|
[
|
|
9
9
|
/^q-item__section--side$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-item__section--side'] ??
|
|
11
|
-
`!flex-initial text-[#757575] items-start pr-[16px] w-auto
|
|
11
|
+
`!flex-initial text-[#757575] items-start pr-[16px] w-auto max-w-full [&_>_.q-icon]:(text-[24px]) [&_>_.q-avatar]:(text-[40px])`
|
|
12
12
|
],
|
|
13
13
|
[
|
|
14
14
|
/^q-item__section--avatar$/,
|
|
15
15
|
([, c], { theme }) => theme.quasar?.components?.['q-item__section--avatar'] ??
|
|
16
|
-
`!flex-initial [color:inherit] min-w-[
|
|
16
|
+
`!flex-initial [color:inherit] min-w-[40px]`
|
|
17
17
|
],
|
|
18
18
|
[
|
|
19
19
|
/^q-item__section--thumbnail$/,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const shortcuts = [
|
|
2
|
-
[/^q-scrollarea$/, ([, c], { theme }) => `relative`],
|
|
2
|
+
[/^q-scrollarea$/, ([, c], { theme }) => `relative [contain:strict]`],
|
|
3
3
|
[
|
|
4
4
|
/^q-scrollarea__bar$/,
|
|
5
5
|
([, c], { theme }) => theme.quasar?.components?.['q-scrollarea__bar'] ??
|
|
@@ -26,10 +26,7 @@ const shortcuts = [
|
|
|
26
26
|
],
|
|
27
27
|
[/^q-scrollarea__thumb:hover$/, ([, c], { theme }) => `hover:opacity-30`],
|
|
28
28
|
[/^q-scrollarea__thumb:active$/, ([, c], { theme }) => `active:opacity-50`],
|
|
29
|
-
[
|
|
30
|
-
/^q-scrollarea__content$/,
|
|
31
|
-
([, c], { theme }) => `!relative min-h-full min-w-full`
|
|
32
|
-
],
|
|
29
|
+
[/^q-scrollarea__content$/, ([, c], { theme }) => `min-h-full w-full`],
|
|
33
30
|
[
|
|
34
31
|
/^q-scrollarea--dark$/,
|
|
35
32
|
([, c], { theme }) => theme.quasar?.components?.['q-scrollarea--dark'] ??
|
|
@@ -2,11 +2,13 @@ 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
|
|
6
|
+
[&_.q-badge]:(top-[3px] -right-[12px])
|
|
7
|
+
`
|
|
6
8
|
],
|
|
7
9
|
[
|
|
8
10
|
/^q-tab--full$/,
|
|
9
|
-
([, c], { theme }) => theme.quasar?.components?.['q-tab--full'] ?? `min-h-
|
|
11
|
+
([, c], { theme }) => theme.quasar?.components?.['q-tab--full'] ?? `min-h-72px h-72px`
|
|
10
12
|
],
|
|
11
13
|
[
|
|
12
14
|
/^q-tab--no-caps$/,
|
|
@@ -15,7 +17,7 @@ const shortcuts = [
|
|
|
15
17
|
[
|
|
16
18
|
/^q-tab__content$/,
|
|
17
19
|
([, 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])`
|
|
20
|
+
`[height:inherit] z-2 px-[0] py-[4px] min-w-[40px] [&_.q-chip--floating]:(top-[0] -right-[16px])`
|
|
19
21
|
],
|
|
20
22
|
[
|
|
21
23
|
/^q-tab__content--inline$/,
|
|
@@ -45,7 +47,7 @@ const shortcuts = [
|
|
|
45
47
|
[
|
|
46
48
|
/^q-tab__indicator$/,
|
|
47
49
|
([, c], { theme }) => theme.quasar?.components?.['q-tab__indicator'] ??
|
|
48
|
-
|
|
50
|
+
`opacity-0 h-[2px] bg-current`
|
|
49
51
|
],
|
|
50
52
|
[
|
|
51
53
|
/^q-tab--active$/,
|
|
@@ -108,7 +110,14 @@ const shortcuts = [
|
|
|
108
110
|
[
|
|
109
111
|
/^q-tabs--vertical$/,
|
|
110
112
|
([, c], { theme }) => theme.quasar?.components?.['q-tabs--vertical'] ??
|
|
111
|
-
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full)
|
|
113
|
+
`!block h-full [&_.q-tabs\\_\\_content]:(!block h-full)
|
|
114
|
+
[&_.q-tabs\\_\\_arrow]:(w-full h-[36px] text-center)
|
|
115
|
+
[&_.q-tabs\\_\\_arrow--left]:(top-[0] left-[0] right-[0])
|
|
116
|
+
[&_.q-tabs\\_\\_arrow--right]:(left-[0] right-[0] bottom-[0])
|
|
117
|
+
[&_.q-tab]:(px-[8px] py-[0])
|
|
118
|
+
[&_.q-tab\\_\\_indicator]:(h-[unset] w-2px min-h-100%)
|
|
119
|
+
[&_.q-tabs--not-scrollable_.q-tabs\\_\\_content]:(h-full)
|
|
120
|
+
[&_.q-tabs--dense_.q-tab\\_\\_content]:(min-w-[24px])`
|
|
112
121
|
],
|
|
113
122
|
[
|
|
114
123
|
/^q-tabs--dense$/,
|
|
@@ -2,13 +2,18 @@ const shortcuts = [
|
|
|
2
2
|
[
|
|
3
3
|
/^q-banner$/,
|
|
4
4
|
([, c], { theme }) => theme.quasar?.components?.['q-banner'] ??
|
|
5
|
-
`min-h-[54px] px-[16px] py-[8px] bg-
|
|
5
|
+
`min-h-[54px] px-[16px] py-[8px] bg-transparent`
|
|
6
6
|
],
|
|
7
7
|
[/^q-banner--top-padding$/, ([, c], { theme }) => `pt-[14px]`],
|
|
8
8
|
[
|
|
9
9
|
/^q-banner__avatar$/,
|
|
10
10
|
([, c], { theme }) => theme.quasar?.components?.['q-banner__avatar'] ??
|
|
11
|
-
`!flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
11
|
+
`!self-auto !flex-initial !min-w-[1px] [&_>_.q-avatar]:(text-[46px]) [&_>_.q-icon]:(text-[40px]) [&:not(:empty)_+_.q-banner\\_\\_content]:(pl-[16px])`
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
/^q-banner__content$/,
|
|
15
|
+
([, c], { theme }) => theme.quasar?.components?.['q-banner__content'] ??
|
|
16
|
+
`max-w-[calc(100%-56px)]`
|
|
12
17
|
],
|
|
13
18
|
[
|
|
14
19
|
/^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]:(shadow-none border-[1px] border-solid border-[currentColor])
|
|
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
|
[
|
|
@@ -7,6 +7,7 @@ const shortcuts = [
|
|
|
7
7
|
rounded-[3px]
|
|
8
8
|
[box-shadow:0_1px_5px_rgba(0,_0,_0,_0.2),_0_2px_2px_rgba(0,_0,_0,_0.14),_0_3px_1px_-2px_rgba(0,_0,_0,_0.12)]
|
|
9
9
|
align-middle
|
|
10
|
+
[&_>_.q-btn]:(layer-components:bg-light-surface-container layer-components:dark:bg-dark-surface-container)
|
|
10
11
|
[&_>_.q-btn-item]:(text-light-on-surface dark:text-dark-on-surface self-stretch)
|
|
11
12
|
[&_>_.q-btn-item.bg-primary]:(!bg-light-primary !text-light-on-primary dark:!bg-dark-primary dark:!text-dark-on-primary)
|
|
12
13
|
[&_>_.q-btn-item:before]:([box-shadow:none])
|
|
@@ -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
|
|
5
|
+
`p-16px rounded-[12px] align-top relative bg-light-surface-container-low dark:bg-dark-surface-container-low
|
|
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])
|
|
@@ -15,6 +15,11 @@ const shortcuts = [
|
|
|
15
15
|
[&:not(.disabled):hover]:(shadow-md)
|
|
16
16
|
[&.disabled]:(op-38)`
|
|
17
17
|
],
|
|
18
|
+
[
|
|
19
|
+
/^q-card--filled$/,
|
|
20
|
+
([, c], { theme }) => theme.quasar?.components?.['q-card--filled'] ??
|
|
21
|
+
`bg-light-surface-container-highest dark:bg-dark-surface-container-highest`
|
|
22
|
+
],
|
|
18
23
|
[
|
|
19
24
|
/^q-card--bordered$/,
|
|
20
25
|
([, c], { theme }) => theme.quasar?.components?.['q-card--bordered'] ??
|
|
@@ -35,7 +40,7 @@ const shortcuts = [
|
|
|
35
40
|
[
|
|
36
41
|
/^q-card__actions$/,
|
|
37
42
|
([, c], { theme }) => theme.quasar?.components?.['q-card__actions'] ??
|
|
38
|
-
`p-[8px] items-center [&_.q-btn--rectangle]:(px-[8px] py-[0])`
|
|
43
|
+
`p-[8px] items-center [&_.q-btn--rectangle:not(.q-btn--rounded)]:(px-[8px] py-[0])`
|
|
39
44
|
],
|
|
40
45
|
[
|
|
41
46
|
/^q-card__actions--horiz$/,
|
|
@@ -10,14 +10,18 @@ const shortcuts = [
|
|
|
10
10
|
/^q-checkbox$/,
|
|
11
11
|
([, c], { theme }) => theme.quasar?.components?.['q-checkbox'] ??
|
|
12
12
|
`align-middle [&.disabled]:(!opacity-75)
|
|
13
|
-
[&:not(.disabled):hover_.q-checkbox\\_\\_inner:before]:(content-[''] absolute top-
|
|
13
|
+
[&:not(.disabled):hover_.q-checkbox\\_\\_inner:before]:(content-[''] absolute top-0 left-0 bottom-0 right-0 border-rd-50 bg-current op-12 scale-x-120 scale-y-120 scale-z-100)
|
|
14
14
|
[&:not(.disabled):focus_.q-checkbox\\_\\_inner:before]:(scale-z-100)`
|
|
15
15
|
],
|
|
16
16
|
[/^q-checkbox__native$/, ([, c], { theme }) => `w-px h-px`],
|
|
17
|
+
[
|
|
18
|
+
/^q-checkbox__label$/,
|
|
19
|
+
([, c], { theme }) => theme.quasar?.components?.['q-checkbox__label'] ?? `pl-0.25em`
|
|
20
|
+
],
|
|
17
21
|
[
|
|
18
22
|
/^q-checkbox__bg$/,
|
|
19
23
|
([, c], { theme }) => theme.quasar?.components?.['q-checkbox__bg'] ??
|
|
20
|
-
`select-none top-1/4 left-1/4 w-1/2 h-1/2 border-[2px] border-solid border-[currentColor] rounded-[2px] [transition:background_0.22s_cubic-bezier(0,_0,_0.2,_1)_0ms]`
|
|
24
|
+
`ml--2px mt--2px select-none top-1/4 left-1/4 w-1/2 h-1/2 border-[2px] border-solid border-[currentColor] rounded-[2px] [transition:background_0.22s_cubic-bezier(0,_0,_0.2,_1)_0ms]`
|
|
21
25
|
],
|
|
22
26
|
[/^q-checkbox__icon-container$/, ([, c], { theme }) => `select-none`],
|
|
23
27
|
[/^q-checkbox__icon$/, ([, c], { theme }) => `text-current text-[0.5em]`],
|
|
@@ -35,7 +39,7 @@ const shortcuts = [
|
|
|
35
39
|
[
|
|
36
40
|
/^q-checkbox__inner$/,
|
|
37
41
|
([, c], { theme }) => theme.quasar?.components?.['q-checkbox__inner'] ??
|
|
38
|
-
`text-[40px] w-[1em] min-w-[1em] h-[1em] outline-[0] rounded-[50%] layer-components:text-[rgba(0,_0,_0,_0.54)]`
|
|
42
|
+
`mr-2px text-[40px] w-[1em] min-w-[1em] h-[1em] outline-[0] rounded-[50%] layer-components:text-[rgba(0,_0,_0,_0.54)]`
|
|
39
43
|
],
|
|
40
44
|
[
|
|
41
45
|
/^q-checkbox__inner--truthy$/,
|
|
@@ -15,8 +15,9 @@ const shortcuts = [
|
|
|
15
15
|
/^q-chip$/,
|
|
16
16
|
([, c], { theme }) => theme.quasar?.components?.['q-chip'] ??
|
|
17
17
|
`!flex-initial align-middle rounded-[0.5em] outline-[0] relative h-[2em] max-w-full m-[4px]
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
outline-solid outline-1px outline-light-outline-variant dark:outline-dark-outline-variant
|
|
19
|
+
bg-light-surface-container-low dark:bg-dark-secondary-container
|
|
20
|
+
text-light-on-surface-variant dark:text-dark-on-secondary-container
|
|
20
21
|
text-[14px] px-[1em] py-[0.375em]
|
|
21
22
|
[&_.q-avatar]:(text-[2em] -ml-[0.45em] mr-[0.2em] rounded-[16px])`
|
|
22
23
|
],
|
|
@@ -70,7 +71,7 @@ const shortcuts = [
|
|
|
70
71
|
[
|
|
71
72
|
/^q-chip--square$/,
|
|
72
73
|
([, c], { theme }) => theme.quasar?.components?.['q-chip--square'] ??
|
|
73
|
-
`rounded-[
|
|
74
|
+
`rounded-[8px] [&_.q-avatar]:(rounded-tl-[3px] rounded-br-[0] rounded-tr-[0] rounded-bl-[3px])`
|
|
74
75
|
]
|
|
75
76
|
];
|
|
76
77
|
export { preflights, shortcuts };
|
|
@@ -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
|
+
`border-rd-16px 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,11 +66,15 @@ const shortcuts = [
|
|
|
57
66
|
[
|
|
58
67
|
/^q-drawer__content$/,
|
|
59
68
|
([, c], { theme }) => theme.quasar?.components?.['q-drawer__content'] ??
|
|
60
|
-
`
|
|
61
|
-
[&_>_
|
|
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-item:hover]:(bg-light-on-secondary-container/8 dark:bg-dark-on-secondary-container/8)
|
|
62
75
|
[&_.q-list_>_.q-router-link--active]:(text-light-primary dark:text-dark-primary)
|
|
63
|
-
[&_.q-list_.q-router-link--
|
|
64
|
-
|
|
76
|
+
[&_.q-list_.q-router-link--active]:(bg-light-secondary-container dark:bg-dark-secondary-container)
|
|
77
|
+
`
|
|
65
78
|
]
|
|
66
79
|
];
|
|
67
80
|
export { shortcuts };
|