@fastkit/vui 0.6.36 → 0.6.40
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/tool/index.js +3 -0
- package/dist/tool/vite-plugin.d.ts.map +1 -1
- package/dist/vui.cjs.js +214 -19
- package/dist/vui.cjs.prod.js +214 -19
- package/dist/vui.css +69 -17
- package/dist/vui.d.ts +3609 -17
- package/dist/vui.esm-bundler.js +214 -21
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/package.json +8 -7
- package/src/.DS_Store +0 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/builtins/color-scheme.ts +9 -0
- package/src/assets/builtins/media-match.ts +3 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/VAccordion/VAccordion.scss +2 -0
- package/src/components/VAccordion/VAccordion.tsx +5 -0
- package/src/components/VAccordion/index.ts +1 -0
- package/src/components/VApp/VApp.tsx +17 -0
- package/src/components/VApp/index.ts +1 -0
- package/src/components/VBreadcrumbs/VBreadcrumbs.scss +61 -0
- package/src/components/VBreadcrumbs/VBreadcrumbs.tsx +137 -0
- package/src/components/VBreadcrumbs/index.ts +1 -0
- package/src/components/VButton/.DS_Store +0 -0
- package/src/components/VButton/VButton.scss +137 -0
- package/src/components/VButton/VButton.tsx +148 -0
- package/src/components/VButton/VButtonGroup.scss +23 -0
- package/src/components/VButton/VButtonGroup.tsx +81 -0
- package/src/components/VButton/index.ts +2 -0
- package/src/components/VCard/VCard.scss +3 -0
- package/src/components/VCard/VCard.tsx +20 -0
- package/src/components/VCard/VCardActions.scss +10 -0
- package/src/components/VCard/VCardActions.tsx +16 -0
- package/src/components/VCard/VCardContent.scss +3 -0
- package/src/components/VCard/VCardContent.tsx +16 -0
- package/src/components/VCard/index.ts +3 -0
- package/src/components/VCheckable/VCheckable.scss +103 -0
- package/src/components/VCheckable/VCheckable.tsx +60 -0
- package/src/components/VCheckable/index.ts +1 -0
- package/src/components/VCheckbox/VCheckbox.scss +56 -0
- package/src/components/VCheckbox/VCheckbox.tsx +63 -0
- package/src/components/VCheckbox/index.ts +1 -0
- package/src/components/VCheckboxGroup/.DS_Store +0 -0
- package/src/components/VCheckboxGroup/VCheckboxGroup.tsx +11 -0
- package/src/components/VCheckboxGroup/index.ts +1 -0
- package/src/components/VContentSwitcher/VContentSwitcher.scss +73 -0
- package/src/components/VContentSwitcher/VContentSwitcher.tsx +156 -0
- package/src/components/VContentSwitcher/index.ts +1 -0
- package/src/components/VControlField/VControlField.scss +183 -0
- package/src/components/VControlField/VControlField.tsx +152 -0
- package/src/components/VControlField/index.ts +1 -0
- package/src/components/VDataTable/VDataTable.scss +230 -0
- package/src/components/VDataTable/VDataTable.tsx +761 -0
- package/src/components/VDataTable/index.ts +1 -0
- package/src/components/VDrawerLayout/VDrawerLayout.scss +26 -0
- package/src/components/VDrawerLayout/VDrawerLayout.tsx +35 -0
- package/src/components/VDrawerLayout/index.ts +1 -0
- package/src/components/VForm/VForm.tsx +77 -0
- package/src/components/VForm/index.ts +1 -0
- package/src/components/VFormControl/VFormControl.scss +59 -0
- package/src/components/VFormControl/VFormControl.tsx +85 -0
- package/src/components/VFormControl/index.ts +1 -0
- package/src/components/VGrid/VGridContainer.scss +4 -0
- package/src/components/VGrid/VGridContainer.tsx +191 -0
- package/src/components/VGrid/VGridItem.scss +3 -0
- package/src/components/VGrid/VGridItem.tsx +110 -0
- package/src/components/VGrid/index.ts +2 -0
- package/src/components/VGrid/schemes.ts +28 -0
- package/src/components/VHero/.DS_Store +0 -0
- package/src/components/VHero/VHero.scss +26 -0
- package/src/components/VHero/VHero.tsx +52 -0
- package/src/components/VHero/index.ts +1 -0
- package/src/components/VIcon/VIcon.scss +22 -0
- package/src/components/VIcon/VIcon.tsx +110 -0
- package/src/components/VIcon/index.ts +1 -0
- package/src/components/VListTile/VListTile.scss +71 -0
- package/src/components/VListTile/VListTile.tsx +121 -0
- package/src/components/VListTile/index.ts +1 -0
- package/src/components/VNavigation/VNavigation.scss +12 -0
- package/src/components/VNavigation/VNavigation.tsx +79 -0
- package/src/components/VNavigation/VNavigationItem.scss +14 -0
- package/src/components/VNavigation/VNavigationItem.tsx +252 -0
- package/src/components/VNavigation/index.ts +2 -0
- package/src/components/VOption/VOption.scss +61 -0
- package/src/components/VOption/VOption.tsx +52 -0
- package/src/components/VOption/index.ts +1 -0
- package/src/components/VOptionGroup/VOptionGroup.scss +3 -0
- package/src/components/VOptionGroup/VOptionGroup.tsx +55 -0
- package/src/components/VOptionGroup/index.ts +1 -0
- package/src/components/VPagination/VPagination.scss +100 -0
- package/src/components/VPagination/VPagination.tsx +346 -0
- package/src/components/VPagination/index.ts +1 -0
- package/src/components/VPaper/VPaper.scss +37 -0
- package/src/components/VPaper/VPaper.tsx +78 -0
- package/src/components/VPaper/index.ts +1 -0
- package/src/components/VRadio/.DS_Store +0 -0
- package/src/components/VRadio/VRadio.scss +66 -0
- package/src/components/VRadio/VRadio.tsx +56 -0
- package/src/components/VRadio/index.ts +1 -0
- package/src/components/VRadioGroup/.DS_Store +0 -0
- package/src/components/VRadioGroup/VRadioGroup.tsx +10 -0
- package/src/components/VRadioGroup/index.ts +1 -0
- package/src/components/VSelect/VSelect.scss +78 -0
- package/src/components/VSelect/VSelect.tsx +204 -0
- package/src/components/VSelect/index.ts +1 -0
- package/src/components/VSwitch/VSwitch.scss +125 -0
- package/src/components/VSwitch/VSwitch.tsx +66 -0
- package/src/components/VSwitch/index.ts +1 -0
- package/src/components/VSwitchGroup/.DS_Store +0 -0
- package/src/components/VSwitchGroup/VSwitchGroup.tsx +11 -0
- package/src/components/VSwitchGroup/index.ts +1 -0
- package/src/components/VTabs/.DS_Store +0 -0
- package/src/components/VTabs/VTab.scss +73 -0
- package/src/components/VTabs/VTab.tsx +88 -0
- package/src/components/VTabs/VTabs.scss +49 -0
- package/src/components/VTabs/VTabs.tsx +315 -0
- package/src/components/VTabs/index.ts +1 -0
- package/src/components/VTextCounter/VTextCounter.scss +3 -0
- package/src/components/VTextCounter/VTextCounter.tsx +21 -0
- package/src/components/VTextCounter/index.ts +1 -0
- package/src/components/VTextField/VTextField.scss +45 -0
- package/src/components/VTextField/VTextField.tsx +96 -0
- package/src/components/VTextField/index.ts +1 -0
- package/src/components/VTextarea/VTextarea.scss +41 -0
- package/src/components/VTextarea/VTextarea.tsx +93 -0
- package/src/components/VTextarea/index.ts +1 -0
- package/src/components/VToolbar/.DS_Store +0 -0
- package/src/components/VToolbar/VToolbar.scss +26 -0
- package/src/components/VToolbar/VToolbar.tsx +44 -0
- package/src/components/VToolbar/VToolbarEdge.scss +27 -0
- package/src/components/VToolbar/VToolbarEdge.tsx +35 -0
- package/src/components/VToolbar/VToolbarMenu.scss +7 -0
- package/src/components/VToolbar/VToolbarMenu.tsx +26 -0
- package/src/components/VToolbar/VToolbarTitle.scss +22 -0
- package/src/components/VToolbar/VToolbarTitle.tsx +25 -0
- package/src/components/VToolbar/index.ts +4 -0
- package/src/components/VWysiwygEditor/.DS_Store +0 -0
- package/src/components/VWysiwygEditor/VWysiwygEditor.scss +60 -0
- package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +293 -0
- package/src/components/VWysiwygEditor/index.ts +2 -0
- package/src/components/VWysiwygEditor/schemes.ts +65 -0
- package/src/components/VWysiwygEditor/tools/bullet-list.ts +18 -0
- package/src/components/VWysiwygEditor/tools/format-bold.ts +19 -0
- package/src/components/VWysiwygEditor/tools/format-italic.ts +18 -0
- package/src/components/VWysiwygEditor/tools/format-underline.ts +18 -0
- package/src/components/VWysiwygEditor/tools/history.ts +26 -0
- package/src/components/VWysiwygEditor/tools/index.ts +8 -0
- package/src/components/VWysiwygEditor/tools/link.ts +57 -0
- package/src/components/VWysiwygEditor/tools/ordered-list.ts +21 -0
- package/src/components/VWysiwygEditor/tools/text-color.ts +14 -0
- package/src/components/index.ts +32 -0
- package/src/components/kits.ts +1 -0
- package/src/components/loading.ts +1 -0
- package/src/composables/.DS_Store +0 -0
- package/src/composables/control.ts +118 -0
- package/src/composables/elevation.ts +34 -0
- package/src/composables/form-selector.scss +11 -0
- package/src/composables/form-selector.tsx +101 -0
- package/src/composables/index.ts +4 -0
- package/src/composables/vui.ts +9 -0
- package/src/index.ts +10 -0
- package/src/injections.ts +61 -0
- package/src/logger.ts +7 -0
- package/src/plugin.tsx +76 -0
- package/src/schemes/control.ts +7 -0
- package/src/schemes/elevation.ts +26 -0
- package/src/schemes/index.ts +2 -0
- package/src/service.tsx +242 -0
- package/src/styles/.DS_Store +0 -0
- package/src/styles/after-effects/display-flow.scss +346 -0
- package/src/styles/after-effects/spacing.scss +155 -0
- package/src/styles/after-effects/text.scss +90 -0
- package/src/styles/after-effects.scss +3 -0
- package/src/styles/base.scss +14 -0
- package/src/styles/control.scss +11 -0
- package/src/styles/core/functions.scss +62 -0
- package/src/styles/core/typo.scss +56 -0
- package/src/styles/core.scss +2 -0
- package/src/styles/elevation.scss +9 -0
- package/src/styles/group.scss +57 -0
- package/src/styles/index.scss +9 -0
- package/src/styles/transition.scss +11 -0
- package/src/styles/typo.scss +11 -0
- package/src/styles/variables.scss +320 -0
- package/src/styles/wysiwyg.scss +24 -0
- package/src/tool/.DS_Store +0 -0
- package/src/tool/index.ts +2 -0
- package/src/tool/vite-plugin.ts +281 -0
package/dist/vui.cjs.prod.js
CHANGED
|
@@ -6,8 +6,10 @@ var vueKit = require('@fastkit/vue-kit');
|
|
|
6
6
|
var vue = require('vue');
|
|
7
7
|
var vueRouter = require('vue-router');
|
|
8
8
|
var vueUtils = require('@fastkit/vue-utils');
|
|
9
|
+
var vueScroller = require('@fastkit/vue-scroller');
|
|
9
10
|
var vueColorScheme = require('@fastkit/vue-color-scheme');
|
|
10
11
|
var vueLoading = require('@fastkit/vue-loading');
|
|
12
|
+
var mediaMatch = require('@fastkit/media-match');
|
|
11
13
|
var iconFont = require('@fastkit/icon-font');
|
|
12
14
|
var helpers = require('@fastkit/helpers');
|
|
13
15
|
var vueAppLayout = require('@fastkit/vue-app-layout');
|
|
@@ -22,7 +24,6 @@ var extensionHistory = require('@tiptap/extension-history');
|
|
|
22
24
|
var extensionLink = require('@tiptap/extension-link');
|
|
23
25
|
var rules = require('@fastkit/rules');
|
|
24
26
|
var extensionOrderedList = require('@tiptap/extension-ordered-list');
|
|
25
|
-
var vueScroller = require('@fastkit/vue-scroller');
|
|
26
27
|
|
|
27
28
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
28
29
|
|
|
@@ -274,6 +275,169 @@ function useElevation(props, opts = {}) {
|
|
|
274
275
|
};
|
|
275
276
|
}
|
|
276
277
|
|
|
278
|
+
function extractRawGridValueClasses(value, prefix, getter) {
|
|
279
|
+
if (typeof value !== 'object')
|
|
280
|
+
return `${prefix}${getter ? getter(value) : value}`;
|
|
281
|
+
return Object.entries(value).map(([breakpoint, breakpointValue]) => {
|
|
282
|
+
return `${prefix}${getter ? getter(breakpointValue) : breakpointValue}--${breakpoint}`;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
// export const DEFAULT_MEDIA_MATCH_KEY = MEDIA_MATCH_CONDITIONS[0].key;
|
|
286
|
+
|
|
287
|
+
const VGridItem = vue.defineComponent({
|
|
288
|
+
name: 'VGridItem',
|
|
289
|
+
inheritAttrs: false,
|
|
290
|
+
props: { ...vueUtils.htmlAttributesPropOptions,
|
|
291
|
+
tag: {
|
|
292
|
+
type: String,
|
|
293
|
+
default: 'div'
|
|
294
|
+
},
|
|
295
|
+
...undefined,
|
|
296
|
+
align: undefined,
|
|
297
|
+
justify: undefined,
|
|
298
|
+
order: undefined
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
setup(props, ctx) {
|
|
302
|
+
const data = vue.computed(() => {
|
|
303
|
+
const classes = [];
|
|
304
|
+
const attrs = { ...ctx.attrs
|
|
305
|
+
};
|
|
306
|
+
const {
|
|
307
|
+
align,
|
|
308
|
+
justify,
|
|
309
|
+
order
|
|
310
|
+
} = props;
|
|
311
|
+
delete attrs.align;
|
|
312
|
+
delete attrs.justify;
|
|
313
|
+
delete attrs.order;
|
|
314
|
+
align && classes.push(extractRawGridValueClasses(align, 'self-align-'));
|
|
315
|
+
justify && classes.push(extractRawGridValueClasses(justify, 'self-justify-'));
|
|
316
|
+
order != null && classes.push(extractRawGridValueClasses(order, 'order-'));
|
|
317
|
+
mediaMatch.MEDIA_MATCH_CONDITIONS.forEach(({
|
|
318
|
+
key
|
|
319
|
+
}) => {
|
|
320
|
+
const v = attrs[key];
|
|
321
|
+
delete attrs[key];
|
|
322
|
+
|
|
323
|
+
if (v != null) {
|
|
324
|
+
classes.push(`grid-size-${v}--${key}`);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
return {
|
|
328
|
+
classes,
|
|
329
|
+
attrs
|
|
330
|
+
};
|
|
331
|
+
});
|
|
332
|
+
return () => {
|
|
333
|
+
const TagName = props.tag;
|
|
334
|
+
const {
|
|
335
|
+
classes,
|
|
336
|
+
attrs
|
|
337
|
+
} = data.value;
|
|
338
|
+
return vue.createVNode(TagName, vue.mergeProps({
|
|
339
|
+
"class": ['v-grid-item grid-item', classes]
|
|
340
|
+
}, attrs), ctx.slots);
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
function spacingValueToString(value) {
|
|
347
|
+
return Number.isInteger(value) ? String(value) : `${value}h`;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const VGridContainer = vue.defineComponent({
|
|
351
|
+
name: 'VGridContainer',
|
|
352
|
+
inheritAttrs: false,
|
|
353
|
+
props: { ...vueUtils.htmlAttributesPropOptions,
|
|
354
|
+
wrapperTag: {
|
|
355
|
+
type: String,
|
|
356
|
+
default: 'div'
|
|
357
|
+
},
|
|
358
|
+
tag: {
|
|
359
|
+
type: String,
|
|
360
|
+
default: 'div'
|
|
361
|
+
},
|
|
362
|
+
spacing: undefined,
|
|
363
|
+
spacingX: undefined,
|
|
364
|
+
spacingY: undefined,
|
|
365
|
+
direction: undefined,
|
|
366
|
+
wrap: undefined,
|
|
367
|
+
alignContent: undefined,
|
|
368
|
+
justifyContent: undefined
|
|
369
|
+
},
|
|
370
|
+
|
|
371
|
+
setup(props, ctx) {
|
|
372
|
+
const data = vue.computed(() => {
|
|
373
|
+
const classes = [];
|
|
374
|
+
const attrs = { ...ctx.attrs
|
|
375
|
+
};
|
|
376
|
+
const {
|
|
377
|
+
spacing,
|
|
378
|
+
spacingX,
|
|
379
|
+
spacingY,
|
|
380
|
+
direction,
|
|
381
|
+
wrap,
|
|
382
|
+
alignContent,
|
|
383
|
+
justifyContent
|
|
384
|
+
} = props;
|
|
385
|
+
const wrapperClass = attrs.class;
|
|
386
|
+
const wrapperStyle = attrs.style;
|
|
387
|
+
delete attrs.class;
|
|
388
|
+
delete attrs.style;
|
|
389
|
+
delete attrs.spacing;
|
|
390
|
+
delete attrs.spacingX;
|
|
391
|
+
delete attrs.spacingY;
|
|
392
|
+
delete attrs.direction;
|
|
393
|
+
delete attrs.wrap;
|
|
394
|
+
delete attrs.alignContent;
|
|
395
|
+
delete attrs.justifyContent; // spacingX = mergeSpacing(spacing, spacingX);
|
|
396
|
+
// spacingY = mergeSpacing(spacing, spacingY);
|
|
397
|
+
// if (!spacingX) {
|
|
398
|
+
// spacingX = spacing;
|
|
399
|
+
// }
|
|
400
|
+
// align &&
|
|
401
|
+
// classes.push(extractRawGridItemValueClasses(align, 'self-align-'));
|
|
402
|
+
// justify &&
|
|
403
|
+
// classes.push(extractRawGridItemValueClasses(justify, 'self-justify-'));
|
|
404
|
+
|
|
405
|
+
spacing != null && classes.push(extractRawGridValueClasses(spacing, 'grid-spacing-', spacingValueToString));
|
|
406
|
+
spacingX != null && classes.push(extractRawGridValueClasses(spacingX, 'grid-spacing-x-', spacingValueToString));
|
|
407
|
+
spacingY != null && classes.push(extractRawGridValueClasses(spacingY, 'grid-spacing-y-', spacingValueToString));
|
|
408
|
+
direction && classes.push(extractRawGridValueClasses(direction, 'direction-'));
|
|
409
|
+
wrap && classes.push(extractRawGridValueClasses(wrap, ''));
|
|
410
|
+
alignContent && classes.push(extractRawGridValueClasses(alignContent, 'align-'));
|
|
411
|
+
justifyContent && classes.push(extractRawGridValueClasses(justifyContent, 'justify-'));
|
|
412
|
+
return {
|
|
413
|
+
wrapperClass,
|
|
414
|
+
wrapperStyle,
|
|
415
|
+
classes,
|
|
416
|
+
attrs
|
|
417
|
+
};
|
|
418
|
+
});
|
|
419
|
+
return () => {
|
|
420
|
+
const WrapperTag = props.wrapperTag;
|
|
421
|
+
const TagName = props.tag;
|
|
422
|
+
const {
|
|
423
|
+
wrapperClass,
|
|
424
|
+
wrapperStyle,
|
|
425
|
+
classes,
|
|
426
|
+
attrs
|
|
427
|
+
} = data.value;
|
|
428
|
+
return vue.createVNode(WrapperTag, {
|
|
429
|
+
"class": ['v-grid-container-wrapper', wrapperClass],
|
|
430
|
+
"style": wrapperStyle
|
|
431
|
+
}, {
|
|
432
|
+
default: () => [vue.createVNode(TagName, vue.mergeProps({
|
|
433
|
+
"class": ['v-grid-container grid-container', classes]
|
|
434
|
+
}, attrs), ctx.slots)]
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
});
|
|
440
|
+
|
|
277
441
|
function createPaperBaseProps() {
|
|
278
442
|
return {
|
|
279
443
|
color: String,
|
|
@@ -450,7 +614,8 @@ function resolveRawVButtonIcon(raw, type = 'main') {
|
|
|
450
614
|
}, null);
|
|
451
615
|
}
|
|
452
616
|
|
|
453
|
-
const vueButtonProps = vueUtils.createPropsOptions({ ...
|
|
617
|
+
const vueButtonProps = vueUtils.createPropsOptions({ ...vueUtils.htmlAttributesPropOptions,
|
|
618
|
+
...vueColorScheme.colorSchemeProps(),
|
|
454
619
|
...vueUtils.navigationableInheritProps,
|
|
455
620
|
spacer: [Boolean, String],
|
|
456
621
|
loading: Boolean,
|
|
@@ -995,7 +1160,7 @@ function _isSlot$c(s) {
|
|
|
995
1160
|
|
|
996
1161
|
const VHero = vue.defineComponent({
|
|
997
1162
|
name: 'VHero',
|
|
998
|
-
props: {
|
|
1163
|
+
props: { ...vueUtils.htmlAttributesPropOptions,
|
|
999
1164
|
color: {
|
|
1000
1165
|
type: String,
|
|
1001
1166
|
default: 'primary'
|
|
@@ -1007,7 +1172,8 @@ const VHero = vue.defineComponent({
|
|
|
1007
1172
|
hTag: {
|
|
1008
1173
|
type: String,
|
|
1009
1174
|
default: 'h1'
|
|
1010
|
-
}
|
|
1175
|
+
},
|
|
1176
|
+
...vueUtils.defineSlotsProps()
|
|
1011
1177
|
},
|
|
1012
1178
|
|
|
1013
1179
|
setup(props, ctx) {
|
|
@@ -1016,6 +1182,7 @@ const VHero = vue.defineComponent({
|
|
|
1016
1182
|
|
|
1017
1183
|
const TagName = props.tag;
|
|
1018
1184
|
const HTagName = props.hTag;
|
|
1185
|
+
const adornment = vueUtils.renderSlotOrEmpty(ctx.slots, 'adornment');
|
|
1019
1186
|
return vue.createVNode(vueAppLayout.VAppContainer, {
|
|
1020
1187
|
"pulled": true
|
|
1021
1188
|
}, {
|
|
@@ -1026,7 +1193,9 @@ const VHero = vue.defineComponent({
|
|
|
1026
1193
|
"class": "v-hero__title"
|
|
1027
1194
|
}, _isSlot$c(_slot = vueUtils.renderSlotOrEmpty(ctx.slots, 'default')) ? _slot : {
|
|
1028
1195
|
default: () => [_slot]
|
|
1029
|
-
})
|
|
1196
|
+
}), adornment && vue.createVNode("div", {
|
|
1197
|
+
"class": "v-hero__adornment"
|
|
1198
|
+
}, [adornment])]
|
|
1030
1199
|
})]
|
|
1031
1200
|
});
|
|
1032
1201
|
};
|
|
@@ -2096,7 +2265,10 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2096
2265
|
tools: {
|
|
2097
2266
|
type: Array,
|
|
2098
2267
|
default: () => []
|
|
2099
|
-
}
|
|
2268
|
+
},
|
|
2269
|
+
floatingToolbar: Boolean,
|
|
2270
|
+
disabledMinHeight: Boolean,
|
|
2271
|
+
disabledMaxHeight: Boolean
|
|
2100
2272
|
},
|
|
2101
2273
|
emits: { ...vueFormControl.createTextableEmits()
|
|
2102
2274
|
},
|
|
@@ -2126,6 +2298,9 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2126
2298
|
};
|
|
2127
2299
|
|
|
2128
2300
|
vue.watch(() => inputControl.canOperation, updateEditable);
|
|
2301
|
+
vue.watch(() => props.modelValue, modelValue => {
|
|
2302
|
+
editor.value && editor.value.commands.setContent(modelValue == null ? '' : modelValue);
|
|
2303
|
+
});
|
|
2129
2304
|
const editor = vue3.useEditor({
|
|
2130
2305
|
onCreate: ({
|
|
2131
2306
|
editor
|
|
@@ -2151,7 +2326,7 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2151
2326
|
class: 'v-wysiwyg-editor__input__prose'
|
|
2152
2327
|
}
|
|
2153
2328
|
}
|
|
2154
|
-
});
|
|
2329
|
+
}); // editor.value.state.doc.content
|
|
2155
2330
|
|
|
2156
2331
|
const focus = (position, options) => {
|
|
2157
2332
|
return editor.value.chain().focus(position, options);
|
|
@@ -2166,7 +2341,7 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2166
2341
|
editor: editor.value
|
|
2167
2342
|
}));
|
|
2168
2343
|
|
|
2169
|
-
const createTools = (
|
|
2344
|
+
const createTools = (bubbleMenu = false) => {
|
|
2170
2345
|
let _slot;
|
|
2171
2346
|
|
|
2172
2347
|
const {
|
|
@@ -2175,10 +2350,13 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2175
2350
|
const {
|
|
2176
2351
|
value: context
|
|
2177
2352
|
} = wysiwygContext;
|
|
2178
|
-
const tools =
|
|
2353
|
+
const tools = bubbleMenu ? settings.tools.filter(t => !!t.floating) : settings.tools;
|
|
2179
2354
|
const _editor = editor.value;
|
|
2180
|
-
const variant = vui.setting(
|
|
2355
|
+
const variant = vui.setting(bubbleMenu ? 'containedVariant' : 'plainVariant');
|
|
2181
2356
|
return vue.createVNode(VButtonGroup, {
|
|
2357
|
+
"class": {
|
|
2358
|
+
'v-wysiwyg-editor__floating-toolbar': props.floatingToolbar
|
|
2359
|
+
},
|
|
2182
2360
|
"variant": variant
|
|
2183
2361
|
}, _isSlot$7(_slot = tools.map(({
|
|
2184
2362
|
key,
|
|
@@ -2201,6 +2379,7 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2201
2379
|
|
|
2202
2380
|
if (!iconName) return;
|
|
2203
2381
|
return vue.createVNode(VButton, {
|
|
2382
|
+
"tabindex": -1,
|
|
2204
2383
|
"key": key,
|
|
2205
2384
|
"icon": iconName,
|
|
2206
2385
|
"onClick": ev => onClick(context, ev),
|
|
@@ -2226,7 +2405,10 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2226
2405
|
return vue.createVNode(VFormControl, {
|
|
2227
2406
|
"nodeControl": this.nodeControl,
|
|
2228
2407
|
"focused": this.nodeControl.focused,
|
|
2229
|
-
"class": ['v-wysiwyg-editor', this.classes
|
|
2408
|
+
"class": ['v-wysiwyg-editor', this.classes, `v-wysiwyg-editor--${this.size}`, {
|
|
2409
|
+
'v-wysiwyg-editor--disabled-min-heihgt': this.disabledMinHeight,
|
|
2410
|
+
'v-wysiwyg-editor--disabled-max-heihgt': this.disabledMaxHeight
|
|
2411
|
+
}],
|
|
2230
2412
|
"label": this.label,
|
|
2231
2413
|
"hint": this.hint,
|
|
2232
2414
|
"hiddenInfo": this.hiddenInfo,
|
|
@@ -2240,7 +2422,11 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2240
2422
|
const {
|
|
2241
2423
|
editor
|
|
2242
2424
|
} = this;
|
|
2243
|
-
return vue.createVNode(
|
|
2425
|
+
return vue.createVNode("div", {
|
|
2426
|
+
"class": "v-wysiwyg-editor__wrapper"
|
|
2427
|
+
}, [!this.isReadonly && this.createTools(), vue.createVNode("div", {
|
|
2428
|
+
"class": "v-wysiwyg-editor__body"
|
|
2429
|
+
}, [vue.createVNode(VControlField, {
|
|
2244
2430
|
"class": "v-wysiwyg-editor__input",
|
|
2245
2431
|
"autoHeight": true,
|
|
2246
2432
|
"startAdornment": this.startAdornment,
|
|
@@ -2252,14 +2438,14 @@ const VWysiwygEditor = vue.defineComponent({
|
|
|
2252
2438
|
return vue.createVNode(vue.Fragment, null, [vue.createVNode(vue3.EditorContent, {
|
|
2253
2439
|
"class": "v-wysiwyg-editor__input__element wysiwyg",
|
|
2254
2440
|
"editor": editor
|
|
2255
|
-
}, null), !!editor && !this.isReadonly && vue.createVNode(vue3.BubbleMenu, {
|
|
2441
|
+
}, null), !this.floatingToolbar && !!editor && !this.isReadonly && vue.createVNode(vue3.BubbleMenu, {
|
|
2256
2442
|
"class": "v-wysiwyg-editor__bubble-menu",
|
|
2257
2443
|
"editor": editor
|
|
2258
2444
|
}, _isSlot$7(_slot2 = this.createTools(true)) ? _slot2 : {
|
|
2259
2445
|
default: () => [_slot2]
|
|
2260
2446
|
})]);
|
|
2261
2447
|
}
|
|
2262
|
-
})]);
|
|
2448
|
+
})])]);
|
|
2263
2449
|
},
|
|
2264
2450
|
infoAppends: () => {
|
|
2265
2451
|
const {
|
|
@@ -2357,11 +2543,15 @@ const WysiwygHistoryTool = (vui, options) => {
|
|
|
2357
2543
|
const WysiwygLinkTool = (vui, options) => {
|
|
2358
2544
|
const tool = {
|
|
2359
2545
|
key: 'link',
|
|
2360
|
-
icon: ({ editor }) => {
|
|
2361
|
-
|
|
2362
|
-
},
|
|
2363
|
-
|
|
2546
|
+
// icon: ({ editor }) => {
|
|
2547
|
+
// return vui.icon(editor.isActive('link') ? 'editorLinkOff' : 'editorLink');
|
|
2548
|
+
// },
|
|
2549
|
+
icon: vui.icon('editorLink'),
|
|
2364
2550
|
active: ({ editor }) => editor.isActive('link'),
|
|
2551
|
+
// disabled: ({ editor }) => {
|
|
2552
|
+
// const { $from, $to } = editor.view.state.selection;
|
|
2553
|
+
// return $to.pos - $from.pos === 0;
|
|
2554
|
+
// },
|
|
2365
2555
|
onClick: async ({ vui, editor }) => {
|
|
2366
2556
|
const { href = '' } = editor.getAttributes('link');
|
|
2367
2557
|
const result = await vui.prompt({
|
|
@@ -2377,7 +2567,6 @@ const WysiwygLinkTool = (vui, options) => {
|
|
|
2377
2567
|
return;
|
|
2378
2568
|
}
|
|
2379
2569
|
const range = editor.chain().focus().extendMarkRange('link');
|
|
2380
|
-
console.log(range);
|
|
2381
2570
|
if (!result) {
|
|
2382
2571
|
range.unsetLink().run();
|
|
2383
2572
|
}
|
|
@@ -3842,6 +4031,10 @@ const VToolbarTitle = vue.defineComponent({
|
|
|
3842
4031
|
const DEFAULT_AUTO_SCROLL_TO_ELEMENT_OFFSET_TOP = -20;
|
|
3843
4032
|
const DEFAULT_TEXTAREA_ROWS = 3;
|
|
3844
4033
|
class VuiService {
|
|
4034
|
+
get scroller() {
|
|
4035
|
+
return vueScroller.getDocumentScroller();
|
|
4036
|
+
}
|
|
4037
|
+
|
|
3845
4038
|
constructor(options, stackService) {
|
|
3846
4039
|
this.options = options;
|
|
3847
4040
|
this.configure();
|
|
@@ -4050,6 +4243,8 @@ exports.VContentSwitcher = VContentSwitcher;
|
|
|
4050
4243
|
exports.VDataTable = VDataTable;
|
|
4051
4244
|
exports.VDrawerLayout = VDrawerLayout;
|
|
4052
4245
|
exports.VForm = VForm;
|
|
4246
|
+
exports.VGridContainer = VGridContainer;
|
|
4247
|
+
exports.VGridItem = VGridItem;
|
|
4053
4248
|
exports.VHero = VHero;
|
|
4054
4249
|
exports.VIcon = VIcon;
|
|
4055
4250
|
exports.VListTile = VListTile;
|
package/dist/vui.css
CHANGED
|
@@ -346,7 +346,7 @@ template {
|
|
|
346
346
|
|
|
347
347
|
:root {
|
|
348
348
|
--root-em: 16px;
|
|
349
|
-
--root-spacing:
|
|
349
|
+
--root-spacing: 8px;
|
|
350
350
|
--transition-fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1);
|
|
351
351
|
--transition-linear-out-slow-in: cubic-bezier(0, 0, 0.2, 1);
|
|
352
352
|
--transition-fast-out-linear-in: cubic-bezier(0.4, 0, 1, 1);
|
|
@@ -431,7 +431,7 @@ template {
|
|
|
431
431
|
--control-label-height: 1.4375em;
|
|
432
432
|
--control-message-color: rgba(0, 0, 0, 0.6);
|
|
433
433
|
--control-message-font-size: 0.75em;
|
|
434
|
-
--control-message-horizontal-margin: var(--root-spacing);
|
|
434
|
+
--control-message-horizontal-margin: calc(var(--root-spacing) * 0.5);
|
|
435
435
|
--control-checkable-outer-size: 2em;
|
|
436
436
|
--control-checkable-icon-size: 1em;
|
|
437
437
|
--control-checkable-faux-scale: 1.2;
|
|
@@ -440,6 +440,12 @@ template {
|
|
|
440
440
|
--control-switch-width: 3.625em;
|
|
441
441
|
--control-switch-track-width: 2.125em;
|
|
442
442
|
--control-switch-track-height: 0.875em;
|
|
443
|
+
--wysiwyg-min-height-sm: 3em;
|
|
444
|
+
--wysiwyg-min-height-md: 6em;
|
|
445
|
+
--wysiwyg-min-height-lg: 9em;
|
|
446
|
+
--wysiwyg-max-height-sm: 9em;
|
|
447
|
+
--wysiwyg-max-height-md: 13em;
|
|
448
|
+
--wysiwyg-max-height-lg: 16em;
|
|
443
449
|
--shadow-key-umbra-opacity: rgba(0, 0, 0, 0.2);
|
|
444
450
|
--shadow-key-penumbra-opacity: rgba(0, 0, 0, 0.14);
|
|
445
451
|
--shadow-key-ambient-opacity: rgba(0, 0, 0, 0.12);
|
|
@@ -585,8 +591,7 @@ body {
|
|
|
585
591
|
font-family: var(--typo-font);
|
|
586
592
|
}
|
|
587
593
|
|
|
588
|
-
h1
|
|
589
|
-
.text-h1 {
|
|
594
|
+
h1 {
|
|
590
595
|
font-size: var(--typo-h1-size);
|
|
591
596
|
font-weight: var(--typo-h1-weight);
|
|
592
597
|
line-height: var(--typo-h1-height);
|
|
@@ -595,8 +600,7 @@ h1,
|
|
|
595
600
|
color: var(--typo-h1-color);
|
|
596
601
|
}
|
|
597
602
|
|
|
598
|
-
h2
|
|
599
|
-
.text-h2 {
|
|
603
|
+
h2 {
|
|
600
604
|
font-size: var(--typo-h2-size);
|
|
601
605
|
font-weight: var(--typo-h2-weight);
|
|
602
606
|
line-height: var(--typo-h2-height);
|
|
@@ -605,8 +609,7 @@ h2,
|
|
|
605
609
|
color: var(--typo-h2-color);
|
|
606
610
|
}
|
|
607
611
|
|
|
608
|
-
h3
|
|
609
|
-
.text-h3 {
|
|
612
|
+
h3 {
|
|
610
613
|
font-size: var(--typo-h3-size);
|
|
611
614
|
font-weight: var(--typo-h3-weight);
|
|
612
615
|
line-height: var(--typo-h3-height);
|
|
@@ -615,8 +618,7 @@ h3,
|
|
|
615
618
|
color: var(--typo-h3-color);
|
|
616
619
|
}
|
|
617
620
|
|
|
618
|
-
h4
|
|
619
|
-
.text-h4 {
|
|
621
|
+
h4 {
|
|
620
622
|
font-size: var(--typo-h4-size);
|
|
621
623
|
font-weight: var(--typo-h4-weight);
|
|
622
624
|
line-height: var(--typo-h4-height);
|
|
@@ -625,8 +627,7 @@ h4,
|
|
|
625
627
|
color: var(--typo-h4-color);
|
|
626
628
|
}
|
|
627
629
|
|
|
628
|
-
h5
|
|
629
|
-
.text-h5 {
|
|
630
|
+
h5 {
|
|
630
631
|
font-size: var(--typo-h5-size);
|
|
631
632
|
font-weight: var(--typo-h5-weight);
|
|
632
633
|
line-height: var(--typo-h5-height);
|
|
@@ -635,8 +636,7 @@ h5,
|
|
|
635
636
|
color: var(--typo-h5-color);
|
|
636
637
|
}
|
|
637
638
|
|
|
638
|
-
h6
|
|
639
|
-
.text-h6 {
|
|
639
|
+
h6 {
|
|
640
640
|
font-size: var(--typo-h6-size);
|
|
641
641
|
font-weight: var(--typo-h6-weight);
|
|
642
642
|
line-height: var(--typo-h6-height);
|
|
@@ -837,6 +837,9 @@ thead th {
|
|
|
837
837
|
.wysiwyg table:last-child {
|
|
838
838
|
margin-bottom: 0;
|
|
839
839
|
}
|
|
840
|
+
.wysiwyg p {
|
|
841
|
+
margin: 0;
|
|
842
|
+
}
|
|
840
843
|
.v-form-selector__body {
|
|
841
844
|
display: block;
|
|
842
845
|
}
|
|
@@ -848,6 +851,7 @@ thead th {
|
|
|
848
851
|
.v-form-control {
|
|
849
852
|
display: flex;
|
|
850
853
|
flex-direction: column;
|
|
854
|
+
max-width: 100%;
|
|
851
855
|
margin: var(--control-horizontal-margin) 0;
|
|
852
856
|
--my-label-color: var(--control-label-color);
|
|
853
857
|
--my-message-color: var(--control-message-color);
|
|
@@ -885,6 +889,13 @@ thead th {
|
|
|
885
889
|
flex: 0 1;
|
|
886
890
|
margin-left: auto;
|
|
887
891
|
}
|
|
892
|
+
.v-grid-item {
|
|
893
|
+
display: block;
|
|
894
|
+
}
|
|
895
|
+
.v-grid-container {
|
|
896
|
+
display: flex;
|
|
897
|
+
flex-wrap: wrap;
|
|
898
|
+
}
|
|
888
899
|
.v-paper {
|
|
889
900
|
--paper-radius: var(--control-field-radius);
|
|
890
901
|
color: var(--paper-text-color);
|
|
@@ -978,6 +989,9 @@ thead th {
|
|
|
978
989
|
.v-button--plain {
|
|
979
990
|
color: inherit !important;
|
|
980
991
|
}
|
|
992
|
+
.v-button--plain[disabled] {
|
|
993
|
+
opacity: 0.5;
|
|
994
|
+
}
|
|
981
995
|
.v-button--sm {
|
|
982
996
|
font-size: calc(var(--root-em) * 0.75);
|
|
983
997
|
}
|
|
@@ -1232,18 +1246,26 @@ thead th {
|
|
|
1232
1246
|
.v-hero {
|
|
1233
1247
|
--hero-background-color: var(--main-color);
|
|
1234
1248
|
--hero-text-color: var(--text-color);
|
|
1249
|
+
display: flex;
|
|
1250
|
+
align-items: center;
|
|
1235
1251
|
padding: 20px 30px;
|
|
1236
1252
|
margin: 0;
|
|
1237
1253
|
color: var(--hero-text-color);
|
|
1238
1254
|
background-color: var(--hero-background-color);
|
|
1239
1255
|
}
|
|
1240
1256
|
.v-hero__title {
|
|
1257
|
+
flex: 1 1 100%;
|
|
1241
1258
|
margin: 0;
|
|
1242
1259
|
font-size: 1.75rem;
|
|
1243
1260
|
font-weight: 300;
|
|
1244
1261
|
line-height: 1;
|
|
1245
1262
|
color: inherit;
|
|
1246
1263
|
}
|
|
1264
|
+
.v-hero__adornment {
|
|
1265
|
+
flex: 0 0 auto;
|
|
1266
|
+
padding-left: 10px;
|
|
1267
|
+
margin-left: auto;
|
|
1268
|
+
}
|
|
1247
1269
|
.v-navigation-item--opened {
|
|
1248
1270
|
--tile-background: var(--tile-active-background);
|
|
1249
1271
|
--tile-text-color: var(--tile-text-active-color);
|
|
@@ -1753,6 +1775,32 @@ thead th {
|
|
|
1753
1775
|
font-style: italic;
|
|
1754
1776
|
color: var(--control-disabled-color);
|
|
1755
1777
|
}
|
|
1778
|
+
.v-wysiwyg-editor--sm {
|
|
1779
|
+
--min-height: var(--wysiwyg-min-height-sm);
|
|
1780
|
+
--max-height: var(--wysiwyg-max-height-sm);
|
|
1781
|
+
}
|
|
1782
|
+
.v-wysiwyg-editor--md {
|
|
1783
|
+
--min-height: var(--wysiwyg-min-height-md);
|
|
1784
|
+
--max-height: var(--wysiwyg-max-height-md);
|
|
1785
|
+
}
|
|
1786
|
+
.v-wysiwyg-editor--lg {
|
|
1787
|
+
--min-height: var(--wysiwyg-min-height-lg);
|
|
1788
|
+
--max-height: var(--wysiwyg-max-height-lg);
|
|
1789
|
+
}
|
|
1790
|
+
.v-wysiwyg-editor__wrapper {
|
|
1791
|
+
position: relative;
|
|
1792
|
+
}
|
|
1793
|
+
.v-wysiwyg-editor__floating-toolbar {
|
|
1794
|
+
position: absolute;
|
|
1795
|
+
right: 0;
|
|
1796
|
+
bottom: 100%;
|
|
1797
|
+
z-index: 1;
|
|
1798
|
+
}
|
|
1799
|
+
.v-wysiwyg-editor__body {
|
|
1800
|
+
position: relative;
|
|
1801
|
+
max-height: var(--max-height);
|
|
1802
|
+
overflow: auto;
|
|
1803
|
+
}
|
|
1756
1804
|
.v-wysiwyg-editor__input {
|
|
1757
1805
|
cursor: text;
|
|
1758
1806
|
}
|
|
@@ -1762,11 +1810,15 @@ thead th {
|
|
|
1762
1810
|
padding: 8px 0;
|
|
1763
1811
|
margin: 0;
|
|
1764
1812
|
}
|
|
1765
|
-
.v-wysiwyg-
|
|
1813
|
+
.v-wysiwyg-editor__input__prose {
|
|
1814
|
+
min-height: var(--min-height);
|
|
1766
1815
|
outline: none;
|
|
1767
1816
|
}
|
|
1768
|
-
.v-wysiwyg-
|
|
1769
|
-
|
|
1817
|
+
.v-wysiwyg-editor--disabled-min-heihgt .v-wysiwyg-editor__input__prose {
|
|
1818
|
+
min-height: 0;
|
|
1819
|
+
}
|
|
1820
|
+
.v-wysiwyg-editor--disabled-max-heihgt .v-wysiwyg-editor__body {
|
|
1821
|
+
max-height: none;
|
|
1770
1822
|
}
|
|
1771
1823
|
.v-tabs {
|
|
1772
1824
|
position: relative;
|