unocss-preset-quasar 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/core/colors.unocss.js +77 -1
  2. package/dist/core/dark.unocss.js +4 -1
  3. package/dist/core/flex.unocss.js +17 -6
  4. package/dist/core/index.js +2 -2
  5. package/dist/index.js +31 -18
  6. package/dist/styles/md2/components/QBanner.unocss.js +5 -0
  7. package/dist/styles/md2/components/QCheckbox.unocss.js +1 -1
  8. package/dist/styles/md2/components/QItem.unocss.js +2 -2
  9. package/dist/styles/md2/components/QScrollarea.unocss.js +2 -5
  10. package/dist/styles/md2/components/QTabs.unocss.js +14 -5
  11. package/dist/styles/md3/components/QBanner.unocss.js +7 -2
  12. package/dist/styles/md3/components/QBtn.unocss.js +6 -6
  13. package/dist/styles/md3/components/QBtnToggle.unocss.js +4 -3
  14. package/dist/styles/md3/components/QCard.unocss.js +7 -2
  15. package/dist/styles/md3/components/QCheckbox.unocss.js +11 -7
  16. package/dist/styles/md3/components/QChip.unocss.js +5 -4
  17. package/dist/styles/md3/components/QCircularProgress.unocss.js +1 -1
  18. package/dist/styles/md3/components/QDate.unocss.js +14 -14
  19. package/dist/styles/md3/components/QDrawer.unocss.js +5 -4
  20. package/dist/styles/md3/components/QField.unocss.js +21 -19
  21. package/dist/styles/md3/components/QIcon.unocss.js +1 -1
  22. package/dist/styles/md3/components/QItem.unocss.js +10 -5
  23. package/dist/styles/md3/components/QLayout.unocss.js +1 -1
  24. package/dist/styles/md3/components/QMenu.unocss.js +1 -1
  25. package/dist/styles/md3/components/QRadio.unocss.js +2 -2
  26. package/dist/styles/md3/components/QScrollarea.unocss.js +2 -5
  27. package/dist/styles/md3/components/QSlider.unocss.js +2 -2
  28. package/dist/styles/md3/components/QStepper.unocss.js +30 -4
  29. package/dist/styles/md3/components/QTabs.unocss.js +15 -6
  30. package/dist/styles/md3/components/QTime.unocss.js +10 -10
  31. package/dist/styles/md3/components/QToggle.unocss.js +6 -6
  32. package/dist/styles/md3/index.js +9 -1
  33. package/dist/theme.js +39 -3
  34. package/dist/types/core/colors.unocss.d.ts +3 -2
  35. package/dist/types/styles/md3/index.d.ts +3 -1
  36. package/dist/types/theme.d.ts +11 -2
  37. package/package.json +5 -1
  38. package/src/core/colors.unocss.ts +79 -2
  39. package/src/core/dark.unocss.ts +4 -1
  40. package/src/core/flex.unocss.ts +16 -6
  41. package/src/core/index.ts +5 -1
  42. package/src/index.ts +31 -18
  43. package/src/styles/md2/components/QBanner.unocss.ts +7 -0
  44. package/src/styles/md2/components/QCheckbox.unocss.ts +1 -1
  45. package/src/styles/md2/components/QItem.unocss.ts +2 -2
  46. package/src/styles/md2/components/QScrollarea.unocss.ts +2 -5
  47. package/src/styles/md2/components/QTabs.unocss.ts +14 -5
  48. package/src/styles/md3/components/QBanner.unocss.ts +9 -2
  49. package/src/styles/md3/components/QBtn.unocss.ts +6 -6
  50. package/src/styles/md3/components/QBtnToggle.unocss.ts +4 -3
  51. package/src/styles/md3/components/QCard.unocss.ts +9 -2
  52. package/src/styles/md3/components/QCheckbox.unocss.ts +13 -7
  53. package/src/styles/md3/components/QChip.unocss.ts +5 -4
  54. package/src/styles/md3/components/QCircularProgress.unocss.ts +1 -1
  55. package/src/styles/md3/components/QDate.unocss.ts +14 -14
  56. package/src/styles/md3/components/QDrawer.unocss.ts +5 -4
  57. package/src/styles/md3/components/QField.unocss.ts +21 -19
  58. package/src/styles/md3/components/QIcon.unocss.ts +1 -1
  59. package/src/styles/md3/components/QItem.unocss.ts +10 -5
  60. package/src/styles/md3/components/QLayout.unocss.ts +1 -1
  61. package/src/styles/md3/components/QMenu.unocss.ts +1 -1
  62. package/src/styles/md3/components/QRadio.unocss.ts +2 -2
  63. package/src/styles/md3/components/QScrollarea.unocss.ts +2 -5
  64. package/src/styles/md3/components/QSlider.unocss.ts +2 -2
  65. package/src/styles/md3/components/QStepper.unocss.ts +32 -4
  66. package/src/styles/md3/components/QTabs.unocss.ts +15 -6
  67. package/src/styles/md3/components/QTime.unocss.ts +10 -10
  68. package/src/styles/md3/components/QToggle.unocss.ts +6 -6
  69. package/src/styles/md3/index.ts +13 -1
  70. package/src/theme.ts +51 -3
@@ -11,7 +11,83 @@ const preflights = [
11
11
  --q-warning: ${theme.colors.warning};
12
12
  --q-dark: ${theme.colors.dark};
13
13
  --q-dark-page: ${theme.colors['dark-page']};
14
+ --light-primary: ${theme.colors.light.primary};
15
+ --light-on-primary: ${theme.colors.light.onPrimary};
16
+ --light-primary-container: ${theme.colors.light.primaryContainer};
17
+ --light-on-primary-container: ${theme.colors.light.onPrimaryContainer};
18
+ --light-secondary: ${theme.colors.light.secondary};
19
+ --light-on-secondary: ${theme.colors.light.onSecondary};
20
+ --light-secondary-container: ${theme.colors.light.secondaryContainer};
21
+ --light-on-secondary-container: ${theme.colors.light.onSecondaryContainer};
22
+ --light-tertiary: ${theme.colors.light.tertiary};
23
+ --light-on-tertiary: ${theme.colors.light.onTertiary};
24
+ --light-tertiary-container: ${theme.colors.light.tertiaryContainer};
25
+ --light-on-tertiary-container: ${theme.colors.light.onTertiaryContainer};
26
+ --light-error: ${theme.colors.light.error};
27
+ --light-on-error: ${theme.colors.light.onError};
28
+ --light-error-container: ${theme.colors.light.errorContainer};
29
+ --light-on-error-container: ${theme.colors.light.onErrorContainer};
30
+ --light-background: ${theme.colors.light.background};
31
+ --light-on-background: ${theme.colors.light.onBackground};
32
+ --light-surface: ${theme.colors.light.surface};
33
+ --light-on-surface: ${theme.colors.light.onSurface};
34
+ --light-surface-variant: ${theme.colors.light.surfaceVariant};
35
+ --light-on-surface-variant: ${theme.colors.light.onSurfaceVariant};
36
+ --light-outline: ${theme.colors.light.outline};
37
+ --light-outline-variant: ${theme.colors.light.outlineVariant};
38
+ --light-shadow: ${theme.colors.light.shadow};
39
+ --light-scrim: ${theme.colors.light.scrim};
40
+ --light-inverse-surface: ${theme.colors.light.inverseSurface};
41
+ --light-inverse-on-surface: ${theme.colors.light.inverseOnSurface};
42
+ --light-inverse-primary: ${theme.colors.light.inversePrimary};
43
+ --light-surface-dim: ${theme.colors.light.surfaceDim};
44
+ --light-surface-bright: ${theme.colors.light.surfaceBright};
45
+ --light-surface-container-lowest: ${theme.colors.light.surfaceContainerLowest};
46
+ --light-surface-container-low: ${theme.colors.light.surfaceContainerLow};
47
+ --light-surface-container: ${theme.colors.light.surfaceContainer};
48
+ --light-surface-container-high: ${theme.colors.light.surfaceContainerHigh};
49
+ --light-surface-container-highest: ${theme.colors.light.surfaceContainerHighest};
50
+ --dark-primary: ${theme.colors.dark.primary};
51
+ --dark-on-primary: ${theme.colors.dark.onPrimary};
52
+ --dark-primary-container: ${theme.colors.dark.primaryContainer};
53
+ --dark-on-primary-container: ${theme.colors.dark.onPrimaryContainer};
54
+ --dark-secondary: ${theme.colors.dark.secondary};
55
+ --dark-on-secondary: ${theme.colors.dark.onSecondary};
56
+ --dark-secondary-container: ${theme.colors.dark.secondaryContainer};
57
+ --dark-on-secondary-container: ${theme.colors.dark.onSecondaryContainer};
58
+ --dark-tertiary: ${theme.colors.dark.tertiary};
59
+ --dark-on-tertiary: ${theme.colors.dark.onTertiary};
60
+ --dark-tertiary-container: ${theme.colors.dark.tertiaryContainer};
61
+ --dark-on-tertiary-container: ${theme.colors.dark.onTertiaryContainer};
62
+ --dark-error: ${theme.colors.dark.error};
63
+ --dark-on-error: ${theme.colors.dark.onError};
64
+ --dark-error-container: ${theme.colors.dark.errorContainer};
65
+ --dark-on-error-container: ${theme.colors.dark.onErrorContainer};
66
+ --dark-background: ${theme.colors.dark.background};
67
+ --dark-on-background: ${theme.colors.dark.onBackground};
68
+ --dark-surface: ${theme.colors.dark.surface};
69
+ --dark-on-surface: ${theme.colors.dark.onSurface};
70
+ --dark-surface-variant: ${theme.colors.dark.surfaceVariant};
71
+ --dark-on-surface-variant: ${theme.colors.dark.onSurfaceVariant};
72
+ --dark-outline: ${theme.colors.dark.outline};
73
+ --dark-outline-variant: ${theme.colors.dark.outlineVariant};
74
+ --dark-shadow: ${theme.colors.dark.shadow};
75
+ --dark-scrim: ${theme.colors.dark.scrim};
76
+ --dark-inverse-surface: ${theme.colors.dark.inverseSurface};
77
+ --dark-inverse-on-surface: ${theme.colors.dark.inverseOnSurface};
78
+ --dark-inverse-primary: ${theme.colors.dark.inversePrimary};
79
+ --dark-surface-dim: ${theme.colors.dark.surfaceDim};
80
+ --dark-surface-bright: ${theme.colors.dark.surfaceBright};
81
+ --dark-surface-container-lowest: ${theme.colors.dark.surfaceContainerLowest};
82
+ --dark-surface-container-low: ${theme.colors.dark.surfaceContainerLow};
83
+ --dark-surface-container: ${theme.colors.dark.surfaceContainer};
84
+ --dark-surface-container-high: ${theme.colors.dark.surfaceContainerHigh};
85
+ --dark-surface-container-highest: ${theme.colors.dark.surfaceContainerHighest};
14
86
  }`
15
87
  }
16
88
  ];
17
- export { preflights };
89
+ const shortcuts = [
90
+ [/^text-(primary|secondary|accent)$/, ([, c], { theme }) => `text-$q-${c}`],
91
+ [/^bg-(primary|secondary|accent)$/, ([, c], { theme }) => `bg-$q-${c}`]
92
+ ];
93
+ export { preflights, shortcuts };
@@ -8,6 +8,9 @@ body.body--dark {
8
8
  }
9
9
  ];
10
10
  const shortcuts = [
11
- [/^q-dark$/, ([, c], { theme }) => `text-white bg-dark`]
11
+ [
12
+ /^q-dark$/,
13
+ ([, c], { theme }) => `dark:text-dark-on-surface bg-dark-surface`
14
+ ]
12
15
  ];
13
16
  export { preflights, shortcuts };
@@ -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
- return `${size}:basis-${nr}/12)`;
26
+ classes.push(`${size}:basis-${nr}/12)`);
25
27
  }
26
28
  else if (nr) {
27
- return `basis-${nr}/12`;
29
+ classes.push(`basis-${nr}/12`);
28
30
  }
29
- else if (size) {
30
- return `${size}:basis-auto ${size}:grow`;
31
+ else if (size === 'all') {
32
+ classes.push('basis-12/12');
31
33
  }
32
- return `grow`;
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
  [
@@ -1,4 +1,4 @@
1
- import { preflights as ColorPreflights } from './colors.unocss.js';
1
+ import { preflights as ColorPreflights, shortcuts as ColorShortcuts } from './colors.unocss.js';
2
2
  import { preflights as DarkPreflights, shortcuts as DarkShortcuts } from './dark.unocss.js';
3
3
  import { shortcuts as ElevationShortcuts, rules as ElevationRules } from './elevation.unocss.js';
4
4
  import { shortcuts as FlexShortcuts } from './flex.unocss.js';
@@ -298,4 +298,4 @@ body {
298
298
  }
299
299
  ].concat(ColorPreflights, DarkPreflights, HelperPreflights, MousePreflights, TypographyPreflights, VisibilityPreflights, TransitionPreflights, SizePreflights);
300
300
  export const rules = [].concat(MouseRules, HelperRules, ElevationRules, VisibilityRules);
301
- export const shortcuts = [].concat(DarkShortcuts, FlexShortcuts, HelperShortcuts, MouseShortcuts, OrientationShortcuts, PositionShortcuts, SizeShortcuts, TouchShortcuts, TransitionsShortcuts, TypographyShortcuts, VisibilityShortcuts, ElevationShortcuts);
301
+ export const shortcuts = [].concat(ColorShortcuts, DarkShortcuts, FlexShortcuts, HelperShortcuts, MouseShortcuts, OrientationShortcuts, PositionShortcuts, SizeShortcuts, TouchShortcuts, TransitionsShortcuts, TypographyShortcuts, VisibilityShortcuts, ElevationShortcuts);
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',
@@ -1594,7 +1606,8 @@ export const QuasarPreset = definePreset((options) => {
1594
1606
  }
1595
1607
  ],
1596
1608
  transformers: [
1597
- transformerVariantGroup()
1609
+ transformerVariantGroup(),
1610
+ transformerDirectives()
1598
1611
  // {
1599
1612
  // name: 'find-classes-in-quasar-src',
1600
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 min-w-[0] max-w-full [&_>_.q-icon]:(text-[24px]) [&_>_.q-avatar]:(text-[40px])`
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-[56px]`
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] uppercase whitespace-nowrap [color:inherit] no-underline [&_.q-badge]:(top-[3px] -right-[12px])`
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-[72px]`
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
- `!relative opacity-0 h-[2px] bg-current`
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) [&_.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]) [&_.q-tab\\_\\_indicator]:(h-[unset] w-[2px]) [&.q-tabs--not-scrollable_.q-tabs\\_\\_content]:(h-full) [&.q-tabs--dense_.q-tab\\_\\_content]:(min-w-[24px])`
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-[#fff]`
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: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)`
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,8 +14,8 @@ const shortcuts = [
14
14
  [
15
15
  /^q-btn--outline$/,
16
16
  ([, c], { theme }) => theme.quasar?.components?.['q-btn--outline'] ??
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]])
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
19
  [&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
20
20
  ],
21
21
  [
@@ -33,7 +33,7 @@ const shortcuts = [
33
33
  [
34
34
  /^q-btn--flat$/,
35
35
  ([, c], { theme }) => theme.quasar?.components?.['q-btn--flat'] ??
36
- `!bg-transparent layer-components:text-light-primary layer-components:dark:text-dark-primary
36
+ `!bg-transparent layer-components:text-$light-primary layer-components:dark:text-$dark-primary
37
37
  [&:before]:([box-shadow:none])
38
38
  [&_.q-btn\\_\\_progress-indicator]:(opacity-20 bg-current)`
39
39
  ],
@@ -51,7 +51,7 @@ const shortcuts = [
51
51
  [
52
52
  /^q-btn--fab$/,
53
53
  ([, c], { theme }) => theme.quasar?.components?.['q-btn--fab'] ??
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
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
55
55
  w-56px h-56px !rounded-16px
56
56
  z-${theme.quasar.z.fab}
57
57
  [&_.q-icon]:(text-[24px]) [&_.q-icon]:(m-auto)`
@@ -60,7 +60,7 @@ const shortcuts = [
60
60
  [
61
61
  /^q-btn--fab-mini$/,
62
62
  ([, c], { theme }) => theme.quasar?.components?.['q-btn--fab-mini'] ??
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
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
64
  w-40px h-40px !rounded-16px
65
65
  [&_.q-icon]:(text-[24px])`
66
66
  // min-h-[40px] min-w-[40px]
@@ -7,12 +7,13 @@ 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-item]:(text-light-on-surface dark:text-dark-on-surface self-stretch)
11
- [&_>_.q-btn-item.bg-primary]:(!bg-light-primary !text-light-on-primary dark:!bg-dark-primary dark:!text-dark-on-primary)
10
+ [&_>_.q-btn]:(layer-components:bg-$light-surface-container layer-components:dark:bg-$dark-surface-container)
11
+ [&_>_.q-btn-item]:(text-$light-on-surface dark:text-$dark-on-surface self-stretch)
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])
13
14
  [&_>_.q-btn-item_.q-badge--floating]:(right-0)
14
15
  [&_>_.q-btn-group]:([box-shadow:none])
15
- [&_>_.q-btn-group:first-child_>_.q-btn--active]:(!bg-light-secondary-container dark:!bg-dark-secondary-container)
16
+ [&_>_.q-btn-group:first-child_>_.q-btn--active]:(!bg-$light-secondary-container dark:!bg-$dark-secondary-container)
16
17
  [&_>_.q-btn-group:first-child_>_.q-btn:first-child]:([border-top-left-radius:inherit] [border-bottom-left-radius:inherit])
17
18
  [&_>_.q-btn-group:last-child_>_.q-btn:last-child]:()
18
19
  [&_>_.q-btn-group:not(:first-child)_>_.q-btn:first-child]:(border-rd-l-0)
@@ -2,7 +2,7 @@ const shortcuts = [
2
2
  [
3
3
  /^q-card$/,
4
4
  ([, c], { theme }) => theme.quasar?.components?.['q-card'] ??
5
- `p-16px rounded-[12px] align-top bg-[#fff] relative bg-light-surface-container dark:bg-dark-surface-container
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])
@@ -11,10 +11,15 @@ const shortcuts = [
11
11
  [&_>_img:nth-last-child(1_of_:not(.q--avoid-card-border))]:([border-bottom:0] [border-bottom-left-radius:inherit] [border-bottom-right-radius:inherit])
12
12
  [&_>_div:not(.q--avoid-card-border)]:([border-left:0] [border-right:0] shadow-none)
13
13
  [&_>_img]:(block w-full max-w-full border-[0])
14
- [&:not(.disabled):focus]:(bg-light-secondary dark:bg-dark-secondary)
14
+ [&:not(.disabled):focus]:(bg-$light-secondary dark:bg-$dark-secondary)
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'] ??
@@ -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-[12.5%] left-[12.5%] bottom-0 right-0 border-rd-50 bg-current op-12 scale-x-120 scale-y-120 scale-z-100)
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,27 +39,27 @@ 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$/,
42
46
  ([, c], { theme }) => theme.quasar?.components?.['q-checkbox__inner--truthy'] ??
43
- `text-light-primary dark:text-dark-primary
47
+ `text-$light-primary dark:text-$dark-primary
44
48
  [&_.q-checkbox\\_\\_bg]:(bg-current)
45
49
  [&_path]:(stroke-offset-none [transition:stroke-dashoffset_0.18s_cubic-bezier(0.4,_0,_0.6,_1)_0ms])`
46
50
  ],
47
51
  [
48
52
  /^q-checkbox__inner--indet$/,
49
53
  ([, c], { theme }) => theme.quasar?.components?.['q-checkbox__inner--indet'] ??
50
- `text-light-primary dark:text-dark-primary [&_.q-checkbox\\_\\_bg]:(bg-current) [&_.q-checkbox\\_\\_indet]:(rotate-[0] scale-100 [transition:transform_0.22s_cubic-bezier(0,_0,_0.2,_1)_0ms])`
54
+ `text-$light-primary dark:text-$dark-primary [&_.q-checkbox\\_\\_bg]:(bg-current) [&_.q-checkbox\\_\\_indet]:(rotate-[0] scale-100 [transition:transform_0.22s_cubic-bezier(0,_0,_0.2,_1)_0ms])`
51
55
  ],
52
56
  [
53
57
  /^q-checkbox--dark$/,
54
58
  ([, c], { theme }) => theme.quasar?.components?.['q-checkbox--dark'] ??
55
59
  `[&_.q-checkbox\\_\\_inner]:(layer-components:text-[rgba(255,_255,_255,_0.7)])
56
60
  [&_.q-checkbox\\_\\_inner:before]:(!opacity-[0.32])
57
- [&_.q-checkbox\\_\\_inner--truthy]:(layer-components:(text-light-primary dark:text-dark-primary))
58
- [&_.q-checkbox\\_\\_inner--indet]:(layer-components:(text-light-primary dark:text-dark-primary))`
61
+ [&_.q-checkbox\\_\\_inner--truthy]:(layer-components:(text-$light-primary dark:text-$dark-primary))
62
+ [&_.q-checkbox\\_\\_inner--indet]:(layer-components:(text-$light-primary dark:text-$dark-primary))`
59
63
  ],
60
64
  [
61
65
  /^q-checkbox--dense$/,
@@ -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
- bg-light-surface-container dark:bg-dark-surface-container
19
- text-light-on-surface dark:text-dark-on-surface
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
  ],
@@ -42,7 +43,7 @@ const shortcuts = [
42
43
  [
43
44
  /^q-chip__icon$/,
44
45
  ([, c], { theme }) => theme.quasar?.components?.['q-chip__icon'] ??
45
- `text-light-primary dark:text-dark-primary text-[1.40625em] -m-[0.2em]`
46
+ `text-$light-primary dark:text-$dark-primary text-[1.40625em] -m-[0.2em]`
46
47
  ],
47
48
  [
48
49
  /^q-chip__icon--left$/,
@@ -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-[4px] [&_.q-avatar]:(rounded-tl-[3px] rounded-br-[0] rounded-tr-[0] rounded-bl-[3px])`
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 };
@@ -21,7 +21,7 @@ const shortcuts = [
21
21
  [
22
22
  /^q-circular-progress$/,
23
23
  ([, c], { theme }) => theme.quasar?.components?.['q-circular-progress'] ??
24
- `text-light-primary dark:text-dark-primary inline-block relative align-middle w-[1em] h-[1em] leading-none`
24
+ `text-$light-primary dark:text-$dark-primary inline-block relative align-middle w-[1em] h-[1em] leading-none`
25
25
  ],
26
26
  [/^q-circular-progress__svg$/, ([, c], { theme }) => `w-full h-full`],
27
27
  [/^q-circular-progress__text$/, ([, c], { theme }) => `text-[0.25em]`],