vitrify 0.17.3 → 0.17.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/plugins/quasar/unocss/core/elevation.unocss.js +3 -3
- package/dist/plugins/quasar/unocss/index.js +167 -27
- package/dist/types/plugins/quasar/unocss/core/helpers.unocss.d.ts +1 -1
- package/dist/types/plugins/quasar/unocss/core/visibility.unocss.d.ts +1 -1
- package/dist/types/plugins/quasar/unocss/index.d.ts +3 -1
- package/dist/types/plugins/quasar.d.ts +6 -8
- package/package.json +1 -1
- package/src/node/plugins/quasar/unocss/core/elevation.unocss.ts +5 -5
- package/src/node/plugins/quasar/unocss/core/helpers.unocss.ts +1 -1
- package/src/node/plugins/quasar/unocss/core/visibility.unocss.ts +1 -1
- package/src/node/plugins/quasar/unocss/index.ts +184 -32
- package/src/node/plugins/quasar.ts +12 -9
|
@@ -17,7 +17,7 @@ const shadows = (mode) => [
|
|
|
17
17
|
return acc;
|
|
18
18
|
}, []),
|
|
19
19
|
[
|
|
20
|
-
|
|
20
|
+
/^inset-shadow$/,
|
|
21
21
|
function* ([, color], { symbols, theme }) {
|
|
22
22
|
yield {
|
|
23
23
|
[symbols.parent]: mode === 'dark' ? 'body.body--dark' : undefined,
|
|
@@ -26,7 +26,7 @@ const shadows = (mode) => [
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
[
|
|
29
|
-
|
|
29
|
+
/^inset-shadow-down$/,
|
|
30
30
|
function* ([, color], { symbols, theme }) {
|
|
31
31
|
yield {
|
|
32
32
|
[symbols.parent]: mode === 'dark' ? 'body.body--dark' : undefined,
|
|
@@ -37,7 +37,7 @@ const shadows = (mode) => [
|
|
|
37
37
|
];
|
|
38
38
|
const rules = [
|
|
39
39
|
[
|
|
40
|
-
|
|
40
|
+
/^shadow-transition$/,
|
|
41
41
|
function* ([, color], { theme }) {
|
|
42
42
|
yield {
|
|
43
43
|
transition: `${theme['shadowTransition']} !important`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Import normalize and animate css
|
|
2
2
|
import { definePreset, transformerVariantGroup } from 'unocss';
|
|
3
|
-
import
|
|
3
|
+
import presetUno from '@unocss/preset-uno';
|
|
4
4
|
import theme from './theme.js';
|
|
5
5
|
import { animatedUno } from 'animated-unocss';
|
|
6
6
|
import { shortcuts as QIconShortcuts } from './components/QIcon.unocss.js';
|
|
@@ -11,23 +11,23 @@ import { shortcuts as QAvatarShortcuts } from './components/QAvatar.unocss.js';
|
|
|
11
11
|
import { shortcuts as QBadgeShortcuts } from './components/QBadge.unocss.js';
|
|
12
12
|
import { shortcuts as QBannerShortcuts } from './components/QBanner.unocss.js';
|
|
13
13
|
import { shortcuts as QBarShortcuts } from './components/QBar.unocss.js';
|
|
14
|
-
import { shortcuts as QBreadcrumbsShortcuts } from './components/QBreadcrumbs.unocss.js';
|
|
14
|
+
import { preflights as QBreadcrumbsPreflights, shortcuts as QBreadcrumbsShortcuts } from './components/QBreadcrumbs.unocss.js';
|
|
15
15
|
import { shortcuts as QBtnDropdownShortcuts } from './components/QBtnDropdown.unocss.js';
|
|
16
16
|
import { shortcuts as QBtnGroupShortcuts } from './components/QBtnGroup.unocss.js';
|
|
17
17
|
import { shortcuts as QBtnToggleShortcuts } from './components/QBtnToggle.unocss.js';
|
|
18
18
|
import { shortcuts as QCardShortcuts } from './components/QCard.unocss.js';
|
|
19
19
|
import { shortcuts as QCarouselShortcuts } from './components/QCarousel.unocss.js';
|
|
20
20
|
import { shortcuts as QChatMessageShortcuts } from './components/QChatMessage.unocss.js';
|
|
21
|
-
import { shortcuts as QCheckboxShortcuts } from './components/QCheckbox.unocss.js';
|
|
22
|
-
import { shortcuts as QChipShortcuts } from './components/QChip.unocss.js';
|
|
23
|
-
import { shortcuts as QCircularProgressShortcuts } from './components/QCircularProgress.unocss.js';
|
|
21
|
+
import { preflights as QCheckboxPreflights, shortcuts as QCheckboxShortcuts } from './components/QCheckbox.unocss.js';
|
|
22
|
+
import { preflights as QChipPreflights, shortcuts as QChipShortcuts } from './components/QChip.unocss.js';
|
|
23
|
+
import { preflights as QCircularProgressPreflights, shortcuts as QCircularProgressShortcuts } from './components/QCircularProgress.unocss.js';
|
|
24
24
|
import { shortcuts as QColorPickerShortcuts } from './components/QColorPicker.unocss.js';
|
|
25
25
|
import { shortcuts as QDateShortcuts } from './components/QDate.unocss.js';
|
|
26
|
-
import { shortcuts as QDialogShortcuts } from './components/QDialog.unocss.js';
|
|
26
|
+
import { preflights as QDialogPreflights, shortcuts as QDialogShortcuts } from './components/QDialog.unocss.js';
|
|
27
27
|
import { shortcuts as QEditorShortcuts } from './components/QEditor.unocss.js';
|
|
28
28
|
import { shortcuts as QExpansionItemShortcuts } from './components/QExpansionItem.unocss.js';
|
|
29
29
|
import { shortcuts as QFabShortcuts } from './components/QFab.unocss.js';
|
|
30
|
-
import { shortcuts as QFieldShortcuts } from './components/QField.unocss.js';
|
|
30
|
+
import { shortcuts as QFieldShortcuts, preflights as QFieldPreflights } from './components/QField.unocss.js';
|
|
31
31
|
import { shortcuts as QFileShortcuts } from './components/QFile.unocss.js';
|
|
32
32
|
import { shortcuts as QFormShortcuts } from './components/QForm.unocss.js';
|
|
33
33
|
import { shortcuts as QImgShortcuts } from './components/QImg.unocss.js';
|
|
@@ -36,8 +36,8 @@ import { shortcuts as QInputShortcuts } from './components/QInput.unocss.js';
|
|
|
36
36
|
import { shortcuts as QIntersectionShortcuts } from './components/QIntersection.unocss.js';
|
|
37
37
|
import { shortcuts as QItemShortcuts } from './components/QItem.unocss.js';
|
|
38
38
|
import { shortcuts as QKnobShortcuts } from './components/QKnob.unocss.js';
|
|
39
|
-
import { shortcuts as QLayoutShortcuts } from './components/QLayout.unocss.js';
|
|
40
|
-
import { shortcuts as QLinearProgressShortcuts } from './components/QLinearProgress.unocss.js';
|
|
39
|
+
import { shortcuts as QLayoutShortcuts, preflights as QLayoutPreflights } from './components/QLayout.unocss.js';
|
|
40
|
+
import { shortcuts as QLinearProgressShortcuts, preflights as QLinearProgressPreflights } from './components/QLinearProgress.unocss.js';
|
|
41
41
|
import { shortcuts as QMenuShortcuts } from './components/QMenu.unocss.js';
|
|
42
42
|
import { shortcuts as QOptionGroupShortcuts } from './components/QOptionGroup.unocss.js';
|
|
43
43
|
import { shortcuts as QPageShortcuts } from './components/QPage.unocss.js';
|
|
@@ -46,28 +46,28 @@ import { shortcuts as QPaginationShortcuts } from './components/QPagination.unoc
|
|
|
46
46
|
import { shortcuts as QParallaxShortcuts } from './components/QParallax.unocss.js';
|
|
47
47
|
import { shortcuts as QPopupEditShortcuts } from './components/QPopupEdit.unocss.js';
|
|
48
48
|
import { shortcuts as QPullToRefreshShortcuts } from './components/QPullToRefresh.unocss.js';
|
|
49
|
-
import { shortcuts as QRadioShortcuts } from './components/QRadio.unocss.js';
|
|
49
|
+
import { shortcuts as QRadioShortcuts, preflights as QRadioPreflights } from './components/QRadio.unocss.js';
|
|
50
50
|
import { shortcuts as QRatingShortcuts } from './components/QRating.unocss.js';
|
|
51
51
|
import { shortcuts as QResponsiveShortcuts } from './components/QResponsive.unocss.js';
|
|
52
52
|
import { shortcuts as QScrollareaShortcuts } from './components/QScrollarea.unocss.js';
|
|
53
|
-
import { shortcuts as QSelectShortcuts } from './components/QSelect.unocss.js';
|
|
53
|
+
import { shortcuts as QSelectShortcuts, preflights as QSelectPreflights } from './components/QSelect.unocss.js';
|
|
54
54
|
import { shortcuts as QSeparatorShortcuts } from './components/QSeparator.unocss.js';
|
|
55
|
-
import { shortcuts as QSkeletonShortcuts } from './components/QSkeleton.unocss.js';
|
|
55
|
+
import { shortcuts as QSkeletonShortcuts, preflights as QSkeletonPreflights } from './components/QSkeleton.unocss.js';
|
|
56
56
|
import { shortcuts as QSlideItemShortcuts } from './components/QSlideItem.unocss.js';
|
|
57
57
|
import { shortcuts as QSliderShortcuts } from './components/QSlider.unocss.js';
|
|
58
58
|
import { shortcuts as QSpaceShortcuts } from './components/QSpace.unocss.js';
|
|
59
|
-
import { shortcuts as QSpinnerShortcuts } from './components/QSpinner.unocss.js';
|
|
59
|
+
import { shortcuts as QSpinnerShortcuts, preflights as QSpinnerPreflights } from './components/QSpinner.unocss.js';
|
|
60
60
|
import { shortcuts as QSplitterShortcuts } from './components/QSplitter.unocss.js';
|
|
61
61
|
import { shortcuts as QStepperShortcuts } from './components/QStepper.unocss.js';
|
|
62
62
|
import { shortcuts as QTabPanelShortcuts } from './components/QTabPanel.unocss.js';
|
|
63
|
-
import { shortcuts as QTableShortcuts } from './components/QTable.unocss.js';
|
|
63
|
+
import { shortcuts as QTableShortcuts, preflights as QTablePreflights } from './components/QTable.unocss.js';
|
|
64
64
|
import { shortcuts as QTabsShortcuts } from './components/QTabs.unocss.js';
|
|
65
65
|
import { shortcuts as QTimeShortcuts } from './components/QTime.unocss.js';
|
|
66
66
|
import { shortcuts as QTimelineShortcuts } from './components/QTimeline.unocss.js';
|
|
67
|
-
import { shortcuts as QToggleShortcuts } from './components/QToggle.unocss.js';
|
|
67
|
+
import { shortcuts as QToggleShortcuts, preflights as QTogglePreflights } from './components/QToggle.unocss.js';
|
|
68
68
|
import { shortcuts as QToolbarShortcuts } from './components/QToolbar.unocss.js';
|
|
69
69
|
import { shortcuts as QTooltipShortcuts } from './components/QTooltip.unocss.js';
|
|
70
|
-
import { shortcuts as QTreeShortcuts } from './components/QTree.unocss.js';
|
|
70
|
+
import { shortcuts as QTreeShortcuts, preflights as QTreePreflights } from './components/QTree.unocss.js';
|
|
71
71
|
import { shortcuts as QUploaderShortcuts } from './components/QUploader.unocss.js';
|
|
72
72
|
import { shortcuts as QVideoShortcuts } from './components/QVideo.unocss.js';
|
|
73
73
|
import { shortcuts as QVirtualScrollShortcuts } from './components/QVirtualScroll.unocss.js';
|
|
@@ -77,18 +77,19 @@ import { shortcuts as QBottomSheetShortcuts } from './plugins/QBottomSheet.unocs
|
|
|
77
77
|
import { shortcuts as QDialogPluginShortcuts } from './plugins/QDialogPlugin.unocss.js';
|
|
78
78
|
import { shortcuts as QLoadingShortcuts } from './plugins/QLoading.unocss.js';
|
|
79
79
|
import { shortcuts as QNotifyShortcuts } from './plugins/QNotify.unocss.js';
|
|
80
|
-
import {
|
|
80
|
+
import { preflights as ColorPreflights } from './core/colors.unocss.js';
|
|
81
|
+
import { preflights as DarkPreflights, shortcuts as DarkShortcuts } from './core/dark.unocss.js';
|
|
81
82
|
import { rules as ElevationRules } from './core/elevation.unocss.js';
|
|
82
83
|
import { shortcuts as FlexShortcuts } from './core/flex.unocss.js';
|
|
83
|
-
import { rules as HelperRules, shortcuts as HelperShortcuts } from './core/helpers.unocss.js';
|
|
84
|
-
import { shortcuts as MouseShortcuts } from './core/mouse.unocss.js';
|
|
84
|
+
import { rules as HelperRules, preflights as HelperPreflights, shortcuts as HelperShortcuts } from './core/helpers.unocss.js';
|
|
85
|
+
import { preflights as MousePreflights, shortcuts as MouseShortcuts } from './core/mouse.unocss.js';
|
|
85
86
|
import { shortcuts as OrientationShortcuts } from './core/orientation.unocss.js';
|
|
86
87
|
import { shortcuts as PositionShortcuts } from './core/position.unocss.js';
|
|
87
88
|
import { shortcuts as SizeShortcuts } from './core/size.unocss.js';
|
|
88
89
|
import { shortcuts as TouchShortcuts } from './core/touch.unocss.js';
|
|
89
90
|
import { shortcuts as TransitionsShortcuts } from './core/transitions.unocss.js';
|
|
90
|
-
import { shortcuts as TypographyShortcuts } from './core/typography.unocss.js';
|
|
91
|
-
import { rules as VisibilityRules, shortcuts as VisibilityShortcuts } from './core/visibility.unocss.js';
|
|
91
|
+
import { preflights as TypographyPreflights, shortcuts as TypographyShortcuts } from './core/typography.unocss.js';
|
|
92
|
+
import { rules as VisibilityRules, preflights as VisibilityPreflights, shortcuts as VisibilityShortcuts } from './core/visibility.unocss.js';
|
|
92
93
|
import { shortcuts as QHeaderShortcuts } from './components/QHeader.unocss.js';
|
|
93
94
|
import { shortcuts as QFooterShortcuts } from './components/QFooter.unocss.js';
|
|
94
95
|
import { shortcuts as QDrawerShortcuts } from './components/QDrawer.unocss.js';
|
|
@@ -96,7 +97,136 @@ const toKebabCase = (str) => str
|
|
|
96
97
|
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
|
|
97
98
|
?.map((x) => x.toLowerCase())
|
|
98
99
|
.join('-') ?? '';
|
|
99
|
-
const
|
|
100
|
+
const pluginSafelistMap = {
|
|
101
|
+
BottomSheet: [
|
|
102
|
+
'q-bottom-sheet',
|
|
103
|
+
'q-bottom-sheet__avatar',
|
|
104
|
+
'q-bottom-sheet--list',
|
|
105
|
+
'q-bottom-sheet--grid',
|
|
106
|
+
'q-bottom-sheet__item'
|
|
107
|
+
],
|
|
108
|
+
Dialog: [
|
|
109
|
+
'q-dialog__title',
|
|
110
|
+
'q-dialog__progress',
|
|
111
|
+
'q-dialog__inner',
|
|
112
|
+
'q-dialog__inner--square',
|
|
113
|
+
'q-dialog__inner--minimized',
|
|
114
|
+
'q-dialog__inner--maximized',
|
|
115
|
+
'q-dialog__inner--top',
|
|
116
|
+
'q-dialog__inner--bottom',
|
|
117
|
+
'q-dialog__inner--right',
|
|
118
|
+
'q-dialog__inner--left',
|
|
119
|
+
'q-dialog__inner--fullwidth',
|
|
120
|
+
'q-dialog__inner--fullheight',
|
|
121
|
+
'q-dialog__backdrop',
|
|
122
|
+
'q-btn',
|
|
123
|
+
'q-btn--actionable',
|
|
124
|
+
'q-btn--no-uppercase',
|
|
125
|
+
'q-btn--rectangle',
|
|
126
|
+
'q-btn--outline',
|
|
127
|
+
'q-btn--push',
|
|
128
|
+
'q-btn--rounded',
|
|
129
|
+
'q-btn--round',
|
|
130
|
+
'q-btn--square',
|
|
131
|
+
'q-btn--flat',
|
|
132
|
+
'q-btn--unelevated',
|
|
133
|
+
'q-btn--dense',
|
|
134
|
+
'q-btn--fab',
|
|
135
|
+
'q-btn--fab-mini',
|
|
136
|
+
'q-btn__content',
|
|
137
|
+
'q-btn__content--hidden',
|
|
138
|
+
'q-btn__progress',
|
|
139
|
+
'q-btn__progress-indicator',
|
|
140
|
+
'q-btn__progress--dark',
|
|
141
|
+
'q-card',
|
|
142
|
+
'q-card--bordered',
|
|
143
|
+
'q-card--dark',
|
|
144
|
+
'q-card__section',
|
|
145
|
+
'q-card__section--vert',
|
|
146
|
+
'q-card__section--horiz',
|
|
147
|
+
'q-card__actions',
|
|
148
|
+
'q-card__actions--horiz',
|
|
149
|
+
'q-card__actions--vert',
|
|
150
|
+
'q-separator--spaced',
|
|
151
|
+
'q-textarea',
|
|
152
|
+
'q-textarea--autogrow',
|
|
153
|
+
'q-field',
|
|
154
|
+
'q-field--with-bottom',
|
|
155
|
+
'q-field__marginal',
|
|
156
|
+
'q-field__before',
|
|
157
|
+
'q-field__prepend',
|
|
158
|
+
'q-field__after',
|
|
159
|
+
'q-field__append',
|
|
160
|
+
'q-field__inner',
|
|
161
|
+
'q-field__bottom',
|
|
162
|
+
'q-field__bottom--animated',
|
|
163
|
+
'q-field__messages',
|
|
164
|
+
'q-field__counter',
|
|
165
|
+
'q-field--item-aligned',
|
|
166
|
+
'q-field__control-container',
|
|
167
|
+
'q-field__control',
|
|
168
|
+
'q-field__shadow',
|
|
169
|
+
'q-field__native',
|
|
170
|
+
'q-field__prefix',
|
|
171
|
+
'q-field__suffix',
|
|
172
|
+
'q-field__input',
|
|
173
|
+
'q-field--readonly',
|
|
174
|
+
'q-field--disabled',
|
|
175
|
+
'q-field__label',
|
|
176
|
+
'q-field--float',
|
|
177
|
+
'q-field--highlighted',
|
|
178
|
+
'q-field--filled',
|
|
179
|
+
'q-field--outlined',
|
|
180
|
+
'q-field--standard',
|
|
181
|
+
'q-field--dark',
|
|
182
|
+
'q-field--standout',
|
|
183
|
+
'q-field--labeled',
|
|
184
|
+
'q-field--dense',
|
|
185
|
+
'q-field--borderless',
|
|
186
|
+
'q-field--error',
|
|
187
|
+
'q-field__focusable-action',
|
|
188
|
+
'q-field--auto-height',
|
|
189
|
+
'q-field--square',
|
|
190
|
+
'q-option-group--inline',
|
|
191
|
+
'q-spinner',
|
|
192
|
+
'q-spinner-mat'
|
|
193
|
+
],
|
|
194
|
+
LoadingBar: [
|
|
195
|
+
'q-loading-bar',
|
|
196
|
+
'q-loading-bar--top',
|
|
197
|
+
'q-loading-bar--bottom',
|
|
198
|
+
'q-loading-bar--right',
|
|
199
|
+
'q-loading-bar--left'
|
|
200
|
+
],
|
|
201
|
+
Notify: [
|
|
202
|
+
'q-avatar',
|
|
203
|
+
'q-avatar__content',
|
|
204
|
+
'q-avatar--square',
|
|
205
|
+
'q-icon',
|
|
206
|
+
'q-btn',
|
|
207
|
+
'q-btn--actionable',
|
|
208
|
+
'q-btn--no-uppercase',
|
|
209
|
+
'q-btn--rectangle',
|
|
210
|
+
'q-btn--outline',
|
|
211
|
+
'q-btn--push',
|
|
212
|
+
'q-btn--rounded',
|
|
213
|
+
'q-btn--round',
|
|
214
|
+
'q-btn--square',
|
|
215
|
+
'q-btn--flat',
|
|
216
|
+
'q-btn--unelevated',
|
|
217
|
+
'q-btn--dense',
|
|
218
|
+
'q-btn--fab',
|
|
219
|
+
'q-btn--fab-mini',
|
|
220
|
+
'q-btn__content',
|
|
221
|
+
'q-btn__content--hidden',
|
|
222
|
+
'q-btn__progress',
|
|
223
|
+
'q-btn__progress-indicator',
|
|
224
|
+
'q-btn__progress--dark',
|
|
225
|
+
'q-spinner',
|
|
226
|
+
'q-spinner-mat'
|
|
227
|
+
]
|
|
228
|
+
};
|
|
229
|
+
const baseSafelist = [
|
|
100
230
|
'material-icons',
|
|
101
231
|
'material-icons-outlined',
|
|
102
232
|
'material-icons-round',
|
|
@@ -1202,11 +1332,22 @@ const qClasses = [
|
|
|
1202
1332
|
'q-notification--bottom-leave-active',
|
|
1203
1333
|
'q-notification--bottom-right-leave-active'
|
|
1204
1334
|
];
|
|
1205
|
-
|
|
1335
|
+
const generateSafelist = (plugins) => {
|
|
1336
|
+
let safelist = baseSafelist;
|
|
1337
|
+
if (plugins) {
|
|
1338
|
+
for (const plugin of plugins) {
|
|
1339
|
+
const pluginSafelist = pluginSafelistMap[plugin];
|
|
1340
|
+
if (pluginSafelist)
|
|
1341
|
+
safelist = safelist.concat(pluginSafelist);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
return safelist;
|
|
1345
|
+
};
|
|
1346
|
+
export default definePreset((options = {}) => {
|
|
1206
1347
|
return {
|
|
1207
1348
|
name: 'quasar',
|
|
1208
|
-
presets: [
|
|
1209
|
-
safelist,
|
|
1349
|
+
presets: [presetUno(), animatedUno()],
|
|
1350
|
+
safelist: generateSafelist(options?.plugins),
|
|
1210
1351
|
preflights: [
|
|
1211
1352
|
{
|
|
1212
1353
|
getCSS: ({ theme }) => `/* beasties:include start */
|
|
@@ -1469,8 +1610,7 @@ export default definePreset((options) => {
|
|
|
1469
1610
|
}
|
|
1470
1611
|
/* beasties:include end */`
|
|
1471
1612
|
}
|
|
1472
|
-
]
|
|
1473
|
-
.concat(),
|
|
1613
|
+
].concat(QBreadcrumbsPreflights, QCheckboxPreflights, QChipPreflights, QCircularProgressPreflights, QDialogPreflights, QFieldPreflights, QLayoutPreflights, QLinearProgressPreflights, QRadioPreflights, QSelectPreflights, QSpinnerPreflights, QSkeletonPreflights, QTablePreflights, QTogglePreflights, QTreePreflights, ColorPreflights, DarkPreflights, HelperPreflights, MousePreflights, TypographyPreflights, VisibilityPreflights),
|
|
1474
1614
|
rules: [].concat(HelperRules, ElevationRules, VisibilityRules),
|
|
1475
1615
|
shortcuts: [].concat(QIconShortcuts, QAjaxBarShortcuts, QAvatarShortcuts, QBadgeShortcuts, QBreadcrumbsShortcuts, QBannerShortcuts, QBarShortcuts, QBtnShortcuts, QBtnDropdownShortcuts, QBtnGroupShortcuts, 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, DarkShortcuts, FlexShortcuts, HelperShortcuts, MouseShortcuts, OrientationShortcuts, PositionShortcuts, SizeShortcuts, TouchShortcuts, TransitionsShortcuts, TypographyShortcuts, VisibilityShortcuts, QHeaderShortcuts, QFooterShortcuts, QDrawerShortcuts),
|
|
1476
1616
|
theme: theme(options),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Preflight, Rule, UserShortcuts } from '@unocss/core';
|
|
2
2
|
import type { QuasarTheme } from '../theme.js';
|
|
3
3
|
declare const preflights: Preflight<QuasarTheme>[];
|
|
4
|
-
declare const rules: Rule[];
|
|
4
|
+
declare const rules: Rule<QuasarTheme>[];
|
|
5
5
|
declare const shortcuts: UserShortcuts<QuasarTheme>;
|
|
6
6
|
export { rules, preflights, shortcuts };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Preflight, Rule, UserShortcuts } from '@unocss/core';
|
|
2
2
|
import type { QuasarTheme } from '../theme.js';
|
|
3
3
|
declare const preflights: Preflight<QuasarTheme>[];
|
|
4
|
-
declare const rules: Rule[];
|
|
4
|
+
declare const rules: Rule<QuasarTheme>[];
|
|
5
5
|
declare const shortcuts: UserShortcuts<QuasarTheme>;
|
|
6
6
|
export { rules, preflights, shortcuts };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { type QuasarPlugins } from 'quasar';
|
|
1
2
|
export interface QuasarPresetOptions {
|
|
3
|
+
plugins?: (keyof QuasarPlugins)[];
|
|
2
4
|
theme?: {
|
|
3
5
|
shadowColor?: string;
|
|
4
6
|
darkShadowColor?: string;
|
|
5
7
|
};
|
|
6
8
|
}
|
|
7
|
-
declare const _default: import("unocss").
|
|
9
|
+
declare const _default: import("unocss").Preset<object>;
|
|
8
10
|
export default _default;
|
|
9
11
|
export declare const defaultSplitRE: RegExp;
|
|
10
12
|
export declare const splitWithVariantGroupRE: RegExp;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { VitrifyPlugin } from './index.js';
|
|
2
|
+
import { type QuasarFonts, type QuasarComponents, type QuasarDirectives, type QuasarIconSets, type QuasarPlugins } from 'quasar';
|
|
2
3
|
export interface QuasarConf {
|
|
3
|
-
ctx?: Record<string, any>;
|
|
4
|
-
css?: string[];
|
|
5
|
-
boot?: string[];
|
|
6
4
|
framework: {
|
|
7
|
-
components?:
|
|
8
|
-
directives?:
|
|
9
|
-
plugins?:
|
|
5
|
+
components?: (keyof QuasarComponents)[];
|
|
6
|
+
directives?: (keyof QuasarDirectives)[];
|
|
7
|
+
plugins?: (keyof QuasarPlugins)[];
|
|
10
8
|
lang?: string;
|
|
11
|
-
iconSet?:
|
|
9
|
+
iconSet?: QuasarIconSets;
|
|
12
10
|
};
|
|
13
|
-
extras?:
|
|
11
|
+
extras?: (QuasarIconSets | QuasarFonts)[];
|
|
14
12
|
disableSass?: boolean;
|
|
15
13
|
}
|
|
16
14
|
export declare const injectSsrContext: (html: string, ssrContext: Record<string, any>) => string;
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ type IntRange<F extends number, T extends number> = Exclude<
|
|
|
13
13
|
Enumerate<F>
|
|
14
14
|
>
|
|
15
15
|
|
|
16
|
-
const shadows = (mode: 'light' | 'dark') => [
|
|
16
|
+
const shadows = (mode: 'light' | 'dark'): Rule<QuasarTheme>[] => [
|
|
17
17
|
...Array.from({ length: 24 }, (_, i) => i + 1).reduce((acc, z) => {
|
|
18
18
|
acc.push([
|
|
19
19
|
new RegExp(`shadow-${z}`),
|
|
@@ -33,7 +33,7 @@ const shadows = (mode: 'light' | 'dark') => [
|
|
|
33
33
|
return acc
|
|
34
34
|
}, [] as Rule<QuasarTheme>[]),
|
|
35
35
|
[
|
|
36
|
-
|
|
36
|
+
/^inset-shadow$/,
|
|
37
37
|
function* ([, color], { symbols, theme }) {
|
|
38
38
|
yield {
|
|
39
39
|
[symbols.parent]: mode === 'dark' ? 'body.body--dark' : undefined,
|
|
@@ -42,7 +42,7 @@ const shadows = (mode: 'light' | 'dark') => [
|
|
|
42
42
|
}
|
|
43
43
|
] as Rule<QuasarTheme>,
|
|
44
44
|
[
|
|
45
|
-
|
|
45
|
+
/^inset-shadow-down$/,
|
|
46
46
|
function* ([, color], { symbols, theme }) {
|
|
47
47
|
yield {
|
|
48
48
|
[symbols.parent]: mode === 'dark' ? 'body.body--dark' : undefined,
|
|
@@ -54,13 +54,13 @@ const shadows = (mode: 'light' | 'dark') => [
|
|
|
54
54
|
|
|
55
55
|
const rules: Rule<QuasarTheme>[] = [
|
|
56
56
|
[
|
|
57
|
-
|
|
57
|
+
/^shadow-transition$/,
|
|
58
58
|
function* ([, color], { theme }) {
|
|
59
59
|
yield {
|
|
60
60
|
transition: `${theme['shadowTransition']} !important`
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
]
|
|
63
|
+
] as Rule<QuasarTheme>,
|
|
64
64
|
...shadows('light'),
|
|
65
65
|
...shadows('dark'),
|
|
66
66
|
...['no-shadow', 'shadow-0'].map(
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// Import normalize and animate css
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
definePreset,
|
|
4
|
+
type Preflight,
|
|
5
|
+
type Rule,
|
|
6
|
+
transformerVariantGroup,
|
|
7
|
+
type UserShortcuts
|
|
8
|
+
} from 'unocss'
|
|
9
|
+
import presetUno from '@unocss/preset-uno'
|
|
4
10
|
import theme, { type QuasarTheme } from './theme.js'
|
|
5
11
|
import { animatedUno } from 'animated-unocss'
|
|
6
12
|
|
|
@@ -160,8 +166,10 @@ import {
|
|
|
160
166
|
import { shortcuts as QHeaderShortcuts } from './components/QHeader.unocss.js'
|
|
161
167
|
import { shortcuts as QFooterShortcuts } from './components/QFooter.unocss.js'
|
|
162
168
|
import { shortcuts as QDrawerShortcuts } from './components/QDrawer.unocss.js'
|
|
169
|
+
import { type QuasarPlugins } from 'quasar'
|
|
163
170
|
|
|
164
171
|
export interface QuasarPresetOptions {
|
|
172
|
+
plugins?: (keyof QuasarPlugins)[]
|
|
165
173
|
theme?: {
|
|
166
174
|
shadowColor?: string
|
|
167
175
|
darkShadowColor?: string
|
|
@@ -174,7 +182,137 @@ const toKebabCase = (str: string) =>
|
|
|
174
182
|
?.map((x) => x.toLowerCase())
|
|
175
183
|
.join('-') ?? ''
|
|
176
184
|
|
|
177
|
-
const
|
|
185
|
+
const pluginSafelistMap: Partial<Record<keyof QuasarPlugins, string[]>> = {
|
|
186
|
+
BottomSheet: [
|
|
187
|
+
'q-bottom-sheet',
|
|
188
|
+
'q-bottom-sheet__avatar',
|
|
189
|
+
'q-bottom-sheet--list',
|
|
190
|
+
'q-bottom-sheet--grid',
|
|
191
|
+
'q-bottom-sheet__item'
|
|
192
|
+
],
|
|
193
|
+
Dialog: [
|
|
194
|
+
'q-dialog__title',
|
|
195
|
+
'q-dialog__progress',
|
|
196
|
+
'q-dialog__inner',
|
|
197
|
+
'q-dialog__inner--square',
|
|
198
|
+
'q-dialog__inner--minimized',
|
|
199
|
+
'q-dialog__inner--maximized',
|
|
200
|
+
'q-dialog__inner--top',
|
|
201
|
+
'q-dialog__inner--bottom',
|
|
202
|
+
'q-dialog__inner--right',
|
|
203
|
+
'q-dialog__inner--left',
|
|
204
|
+
'q-dialog__inner--fullwidth',
|
|
205
|
+
'q-dialog__inner--fullheight',
|
|
206
|
+
'q-dialog__backdrop',
|
|
207
|
+
'q-btn',
|
|
208
|
+
'q-btn--actionable',
|
|
209
|
+
'q-btn--no-uppercase',
|
|
210
|
+
'q-btn--rectangle',
|
|
211
|
+
'q-btn--outline',
|
|
212
|
+
'q-btn--push',
|
|
213
|
+
'q-btn--rounded',
|
|
214
|
+
'q-btn--round',
|
|
215
|
+
'q-btn--square',
|
|
216
|
+
'q-btn--flat',
|
|
217
|
+
'q-btn--unelevated',
|
|
218
|
+
'q-btn--dense',
|
|
219
|
+
'q-btn--fab',
|
|
220
|
+
'q-btn--fab-mini',
|
|
221
|
+
'q-btn__content',
|
|
222
|
+
'q-btn__content--hidden',
|
|
223
|
+
'q-btn__progress',
|
|
224
|
+
'q-btn__progress-indicator',
|
|
225
|
+
'q-btn__progress--dark',
|
|
226
|
+
'q-card',
|
|
227
|
+
'q-card--bordered',
|
|
228
|
+
'q-card--dark',
|
|
229
|
+
'q-card__section',
|
|
230
|
+
'q-card__section--vert',
|
|
231
|
+
'q-card__section--horiz',
|
|
232
|
+
'q-card__actions',
|
|
233
|
+
'q-card__actions--horiz',
|
|
234
|
+
'q-card__actions--vert',
|
|
235
|
+
'q-separator--spaced',
|
|
236
|
+
'q-textarea',
|
|
237
|
+
'q-textarea--autogrow',
|
|
238
|
+
'q-field',
|
|
239
|
+
'q-field--with-bottom',
|
|
240
|
+
'q-field__marginal',
|
|
241
|
+
'q-field__before',
|
|
242
|
+
'q-field__prepend',
|
|
243
|
+
'q-field__after',
|
|
244
|
+
'q-field__append',
|
|
245
|
+
'q-field__inner',
|
|
246
|
+
'q-field__bottom',
|
|
247
|
+
'q-field__bottom--animated',
|
|
248
|
+
'q-field__messages',
|
|
249
|
+
'q-field__counter',
|
|
250
|
+
'q-field--item-aligned',
|
|
251
|
+
'q-field__control-container',
|
|
252
|
+
'q-field__control',
|
|
253
|
+
'q-field__shadow',
|
|
254
|
+
'q-field__native',
|
|
255
|
+
'q-field__prefix',
|
|
256
|
+
'q-field__suffix',
|
|
257
|
+
'q-field__input',
|
|
258
|
+
'q-field--readonly',
|
|
259
|
+
'q-field--disabled',
|
|
260
|
+
'q-field__label',
|
|
261
|
+
'q-field--float',
|
|
262
|
+
'q-field--highlighted',
|
|
263
|
+
'q-field--filled',
|
|
264
|
+
'q-field--outlined',
|
|
265
|
+
'q-field--standard',
|
|
266
|
+
'q-field--dark',
|
|
267
|
+
'q-field--standout',
|
|
268
|
+
'q-field--labeled',
|
|
269
|
+
'q-field--dense',
|
|
270
|
+
'q-field--borderless',
|
|
271
|
+
'q-field--error',
|
|
272
|
+
'q-field__focusable-action',
|
|
273
|
+
'q-field--auto-height',
|
|
274
|
+
'q-field--square',
|
|
275
|
+
'q-option-group--inline',
|
|
276
|
+
'q-spinner',
|
|
277
|
+
'q-spinner-mat'
|
|
278
|
+
],
|
|
279
|
+
LoadingBar: [
|
|
280
|
+
'q-loading-bar',
|
|
281
|
+
'q-loading-bar--top',
|
|
282
|
+
'q-loading-bar--bottom',
|
|
283
|
+
'q-loading-bar--right',
|
|
284
|
+
'q-loading-bar--left'
|
|
285
|
+
],
|
|
286
|
+
Notify: [
|
|
287
|
+
'q-avatar',
|
|
288
|
+
'q-avatar__content',
|
|
289
|
+
'q-avatar--square',
|
|
290
|
+
'q-icon',
|
|
291
|
+
'q-btn',
|
|
292
|
+
'q-btn--actionable',
|
|
293
|
+
'q-btn--no-uppercase',
|
|
294
|
+
'q-btn--rectangle',
|
|
295
|
+
'q-btn--outline',
|
|
296
|
+
'q-btn--push',
|
|
297
|
+
'q-btn--rounded',
|
|
298
|
+
'q-btn--round',
|
|
299
|
+
'q-btn--square',
|
|
300
|
+
'q-btn--flat',
|
|
301
|
+
'q-btn--unelevated',
|
|
302
|
+
'q-btn--dense',
|
|
303
|
+
'q-btn--fab',
|
|
304
|
+
'q-btn--fab-mini',
|
|
305
|
+
'q-btn__content',
|
|
306
|
+
'q-btn__content--hidden',
|
|
307
|
+
'q-btn__progress',
|
|
308
|
+
'q-btn__progress-indicator',
|
|
309
|
+
'q-btn__progress--dark',
|
|
310
|
+
'q-spinner',
|
|
311
|
+
'q-spinner-mat'
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const baseSafelist = [
|
|
178
316
|
'material-icons',
|
|
179
317
|
'material-icons-outlined',
|
|
180
318
|
'material-icons-round',
|
|
@@ -1282,11 +1420,22 @@ const qClasses = [
|
|
|
1282
1420
|
'q-notification--bottom-right-leave-active'
|
|
1283
1421
|
]
|
|
1284
1422
|
|
|
1285
|
-
|
|
1423
|
+
const generateSafelist = (plugins?: (keyof QuasarPlugins)[]) => {
|
|
1424
|
+
let safelist = baseSafelist
|
|
1425
|
+
if (plugins) {
|
|
1426
|
+
for (const plugin of plugins) {
|
|
1427
|
+
const pluginSafelist = pluginSafelistMap[plugin]
|
|
1428
|
+
if (pluginSafelist) safelist = safelist.concat(pluginSafelist)
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
return safelist
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
export default definePreset((options: QuasarPresetOptions = {}) => {
|
|
1286
1435
|
return {
|
|
1287
1436
|
name: 'quasar',
|
|
1288
|
-
presets: [
|
|
1289
|
-
safelist,
|
|
1437
|
+
presets: [presetUno(), animatedUno()],
|
|
1438
|
+
safelist: generateSafelist(options?.plugins),
|
|
1290
1439
|
preflights: (
|
|
1291
1440
|
[
|
|
1292
1441
|
{
|
|
@@ -1551,32 +1700,35 @@ export default definePreset((options?: QuasarPresetOptions) => {
|
|
|
1551
1700
|
/* beasties:include end */`
|
|
1552
1701
|
}
|
|
1553
1702
|
] as Preflight<QuasarTheme>[]
|
|
1554
|
-
)
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1703
|
+
).concat(
|
|
1704
|
+
QBreadcrumbsPreflights,
|
|
1705
|
+
QCheckboxPreflights,
|
|
1706
|
+
QChipPreflights,
|
|
1707
|
+
QCircularProgressPreflights,
|
|
1708
|
+
QDialogPreflights,
|
|
1709
|
+
QFieldPreflights,
|
|
1710
|
+
QLayoutPreflights,
|
|
1711
|
+
QLinearProgressPreflights,
|
|
1712
|
+
QRadioPreflights,
|
|
1713
|
+
QSelectPreflights,
|
|
1714
|
+
QSpinnerPreflights,
|
|
1715
|
+
QSkeletonPreflights,
|
|
1716
|
+
QTablePreflights,
|
|
1717
|
+
QTogglePreflights,
|
|
1718
|
+
QTreePreflights,
|
|
1719
|
+
ColorPreflights,
|
|
1720
|
+
DarkPreflights,
|
|
1721
|
+
HelperPreflights,
|
|
1722
|
+
MousePreflights,
|
|
1723
|
+
TypographyPreflights,
|
|
1724
|
+
VisibilityPreflights
|
|
1725
|
+
),
|
|
1726
|
+
rules: ([] as Rule<QuasarTheme>[]).concat(
|
|
1727
|
+
HelperRules,
|
|
1728
|
+
ElevationRules,
|
|
1729
|
+
VisibilityRules
|
|
1730
|
+
),
|
|
1731
|
+
shortcuts: ([] as UserShortcuts<QuasarTheme>[]).concat(
|
|
1580
1732
|
QIconShortcuts,
|
|
1581
1733
|
QAjaxBarShortcuts,
|
|
1582
1734
|
QAvatarShortcuts,
|
|
@@ -7,20 +7,23 @@ import type {
|
|
|
7
7
|
} from '../vitrify-config.js'
|
|
8
8
|
import type { VitrifyPlugin } from './index.js'
|
|
9
9
|
import { findDepPkgJsonPath } from 'vitefu'
|
|
10
|
+
import {
|
|
11
|
+
type QuasarFonts,
|
|
12
|
+
type QuasarComponents,
|
|
13
|
+
type QuasarDirectives,
|
|
14
|
+
type QuasarIconSets,
|
|
15
|
+
type QuasarPlugins
|
|
16
|
+
} from 'quasar'
|
|
10
17
|
|
|
11
18
|
export interface QuasarConf {
|
|
12
|
-
ctx?: Record<string, any>
|
|
13
|
-
css?: string[]
|
|
14
|
-
boot?: string[]
|
|
15
19
|
framework: {
|
|
16
|
-
components?:
|
|
17
|
-
directives?:
|
|
18
|
-
plugins?:
|
|
20
|
+
components?: (keyof QuasarComponents)[]
|
|
21
|
+
directives?: (keyof QuasarDirectives)[]
|
|
22
|
+
plugins?: (keyof QuasarPlugins)[]
|
|
19
23
|
lang?: string
|
|
20
|
-
iconSet?:
|
|
24
|
+
iconSet?: QuasarIconSets
|
|
21
25
|
}
|
|
22
|
-
|
|
23
|
-
extras?: string[]
|
|
26
|
+
extras?: (QuasarIconSets | QuasarFonts)[]
|
|
24
27
|
disableSass?: boolean
|
|
25
28
|
}
|
|
26
29
|
|