@fastkit/vui 0.12.8 → 0.12.10

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 (130) hide show
  1. package/LICENSE +1 -1
  2. package/dist/vui.css +2522 -2723
  3. package/dist/vui.css.map +1 -0
  4. package/dist/vui.d.ts +8760 -10172
  5. package/dist/vui.mjs +1704 -2490
  6. package/dist/vui.mjs.map +1 -0
  7. package/package.json +69 -61
  8. package/src/components/VApp/VApp.tsx +3 -1
  9. package/src/components/VAvatar/VAvatar.scss +62 -60
  10. package/src/components/VAvatar/VAvatar.tsx +6 -1
  11. package/src/components/VBreadcrumbs/VBreadcrumbs.scss +53 -51
  12. package/src/components/VBusyImage/VBusyImage.scss +50 -51
  13. package/src/components/VButton/VButton.scss +120 -118
  14. package/src/components/VButton/VButton.tsx +6 -1
  15. package/src/components/VButton/VButtonGroup.scss +21 -19
  16. package/src/components/VCard/VCard.scss +41 -42
  17. package/src/components/VCard/VCard.tsx +5 -0
  18. package/src/components/VCard/VCardActions.scss +9 -7
  19. package/src/components/VCard/VCardContent.scss +4 -2
  20. package/src/components/VCheckable/VCheckable.scss +79 -80
  21. package/src/components/VCheckable/VCheckable.tsx +1 -1
  22. package/src/components/VCheckbox/VCheckbox.scss +50 -48
  23. package/src/components/VCheckbox/VCheckbox.tsx +2 -2
  24. package/src/components/VChip/VChip.scss +61 -59
  25. package/src/components/VChip/VChip.tsx +6 -1
  26. package/src/components/VContentSwitcher/VContentSwitcher.scss +52 -50
  27. package/src/components/VControlField/VControlField.scss +148 -146
  28. package/src/components/VControlField/VControlField.tsx +3 -3
  29. package/src/components/VDataTable/VDataTable.scss +167 -168
  30. package/src/components/VDrawerLayout/VDrawerLayout.scss +27 -25
  31. package/src/components/VForm/VForm.tsx +3 -4
  32. package/src/components/VFormControl/VFormControl.scss +84 -82
  33. package/src/components/VFormControl/VFormControl.tsx +2 -3
  34. package/src/components/VGrid/VGridContainer.scss +5 -3
  35. package/src/components/VGrid/VGridItem.scss +4 -2
  36. package/src/components/VHero/VHero.scss +23 -21
  37. package/src/components/VIcon/VIcon.scss +19 -17
  38. package/src/components/VListTile/VListTile.scss +60 -58
  39. package/src/components/VListTile/VListTile.tsx +5 -0
  40. package/src/components/VNavigation/VNavigation.scss +12 -10
  41. package/src/components/VNavigation/VNavigationItem.scss +21 -19
  42. package/src/components/VNavigation/VNavigationItem.tsx +5 -0
  43. package/src/components/VOption/VOption.scss +55 -56
  44. package/src/components/VOption/VOption.tsx +2 -2
  45. package/src/components/VOptionGroup/VOptionGroup.scss +14 -12
  46. package/src/components/VOptionGroup/VOptionGroup.tsx +3 -1
  47. package/src/components/VPagination/VPagination.scss +81 -79
  48. package/src/components/VPagination/VPagination.tsx +1 -1
  49. package/src/components/VPaper/VPaper.scss +43 -41
  50. package/src/components/VRadio/VRadio.scss +52 -53
  51. package/src/components/VRadio/VRadio.tsx +2 -2
  52. package/src/components/VSelect/VSelect.scss +77 -75
  53. package/src/components/VSelect/VSelect.tsx +5 -2
  54. package/src/components/VSkeltonLoader/VSkeltonLoaderBone.scss +24 -22
  55. package/src/components/VSwitch/VSwitch.scss +96 -94
  56. package/src/components/VSwitch/VSwitch.tsx +2 -2
  57. package/src/components/VTabs/VTab.scss +59 -57
  58. package/src/components/VTabs/VTabs.scss +41 -39
  59. package/src/components/VTabs/VTabs.tsx +5 -2
  60. package/src/components/VTextCounter/VTextCounter.scss +4 -2
  61. package/src/components/VTextField/VTextField.scss +37 -35
  62. package/src/components/VTextField/VTextField.tsx +2 -2
  63. package/src/components/VTextarea/VTextarea.scss +33 -31
  64. package/src/components/VTextarea/VTextarea.tsx +2 -2
  65. package/src/components/VToolbar/VToolbar.scss +19 -17
  66. package/src/components/VToolbar/VToolbarEdge.scss +21 -19
  67. package/src/components/VToolbar/VToolbarMenu.scss +6 -4
  68. package/src/components/VToolbar/VToolbarMenu.tsx +5 -0
  69. package/src/components/VToolbar/VToolbarTitle.scss +19 -17
  70. package/src/components/index.ts +3 -1
  71. package/src/components/kits.ts +1 -1
  72. package/src/composables/control.ts +1 -1
  73. package/src/composables/form-selector.scss +20 -18
  74. package/src/composables/form-selector.tsx +5 -3
  75. package/src/index.ts +13 -2
  76. package/src/injections.ts +1 -1
  77. package/src/plugin.tsx +4 -4
  78. package/src/schemes/control.ts +2 -2
  79. package/src/service.tsx +5 -5
  80. package/src/styles/core/functions.scss +2 -2
  81. package/src/styles/index.scss +23 -9
  82. package/dist/tool/index.d.ts +0 -2
  83. package/dist/tool/index.d.ts.map +0 -1
  84. package/dist/tool/index.mjs +0 -193
  85. package/dist/tool/vite-plugin.d.ts +0 -25
  86. package/dist/tool/vite-plugin.d.ts.map +0 -1
  87. package/src/.DS_Store +0 -0
  88. package/src/assets/builtins/color-scheme.ts +0 -9
  89. package/src/assets/builtins/media-match.ts +0 -3
  90. package/src/components/.DS_Store +0 -0
  91. package/src/components/VAvatar/.DS_Store +0 -0
  92. package/src/components/VChip/.DS_Store +0 -0
  93. package/src/components/VSkeltonLoader/.DS_Store +0 -0
  94. package/src/components/VTextField/.DS_Store +0 -0
  95. package/src/components/VWysiwygEditor/.DS_Store +0 -0
  96. package/src/components/VWysiwygEditor/VWysiwygEditor.scss +0 -66
  97. package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +0 -354
  98. package/src/components/VWysiwygEditor/extensions/.DS_Store +0 -0
  99. package/src/components/VWysiwygEditor/extensions/color.ts +0 -72
  100. package/src/components/VWysiwygEditor/extensions/index.ts +0 -2
  101. package/src/components/VWysiwygEditor/extensions/linter/.DS_Store +0 -0
  102. package/src/components/VWysiwygEditor/extensions/linter/Linter.scss +0 -140
  103. package/src/components/VWysiwygEditor/extensions/linter/Linter.tsx +0 -210
  104. package/src/components/VWysiwygEditor/extensions/linter/LinterPlugin.ts +0 -65
  105. package/src/components/VWysiwygEditor/extensions/linter/index.ts +0 -5
  106. package/src/components/VWysiwygEditor/extensions/linter/plugins/BadWords.tsx +0 -50
  107. package/src/components/VWysiwygEditor/extensions/linter/plugins/HeadingLevel.ts +0 -39
  108. package/src/components/VWysiwygEditor/extensions/linter/plugins/Punctuation.ts +0 -49
  109. package/src/components/VWysiwygEditor/extensions/linter/plugins/index.ts +0 -3
  110. package/src/components/VWysiwygEditor/extensions/linter/utils.ts +0 -28
  111. package/src/components/VWysiwygEditor/index.ts +0 -4
  112. package/src/components/VWysiwygEditor/schemes.ts +0 -251
  113. package/src/components/VWysiwygEditor/tools/bullet-list.ts +0 -18
  114. package/src/components/VWysiwygEditor/tools/color.scss +0 -140
  115. package/src/components/VWysiwygEditor/tools/color.tsx +0 -90
  116. package/src/components/VWysiwygEditor/tools/format-bold.ts +0 -19
  117. package/src/components/VWysiwygEditor/tools/format-italic.ts +0 -18
  118. package/src/components/VWysiwygEditor/tools/format-underline.ts +0 -18
  119. package/src/components/VWysiwygEditor/tools/history.ts +0 -26
  120. package/src/components/VWysiwygEditor/tools/index.ts +0 -8
  121. package/src/components/VWysiwygEditor/tools/link.ts +0 -57
  122. package/src/components/VWysiwygEditor/tools/ordered-list.ts +0 -21
  123. package/src/tool/index.ts +0 -2
  124. package/src/tool/vite-plugin.ts +0 -266
  125. /package/{src/styles → dist}/after-effects/display-flow.scss +0 -0
  126. /package/{src/styles → dist}/after-effects/spacing.scss +0 -0
  127. /package/{src/styles → dist}/after-effects/text.scss +0 -0
  128. /package/{src/styles → dist}/after-effects.scss +0 -0
  129. /package/dist/{assets/builtins → builtins}/color-scheme.ts +0 -0
  130. /package/dist/{assets/builtins → builtins}/media-match.ts +0 -0
@@ -1,26 +1,28 @@
1
1
  // @use './core.scss';
2
2
  // @use '../../styles/core.scss';
3
3
 
4
- .v-toolbar {
5
- --height: var(--toolbar-height);
4
+ @layer vui {
5
+ .v-toolbar {
6
+ --height: var(--toolbar-height);
6
7
 
7
- display: flex;
8
- align-items: center;
9
- width: 100%;
10
- height: var(--height);
11
- padding: 0 calc(var(--root-em) * 1.5); // 24
12
- margin: 0;
13
- border-radius: inherit;
8
+ display: flex;
9
+ align-items: center;
10
+ width: 100%;
11
+ height: var(--height);
12
+ padding: 0 calc(var(--root-em) * 1.5); // 24
13
+ margin: 0;
14
+ border-radius: inherit;
14
15
 
15
- &--plain {
16
- --main-color: var(--palette-background);
17
- }
16
+ &--plain {
17
+ --main-color: var(--palette-background);
18
+ }
18
19
 
19
- .v-app-layout__header > & {
20
- height: 100%;
21
- }
20
+ .v-app-layout__header > & {
21
+ height: 100%;
22
+ }
22
23
 
23
- &--dense {
24
- --height: var(--toolbar-dense-height);
24
+ &--dense {
25
+ --height: var(--toolbar-dense-height);
26
+ }
25
27
  }
26
28
  }
@@ -1,27 +1,29 @@
1
1
  // @use '../../styles/core.scss';
2
2
 
3
- .v-toolbar-edge {
4
- display: flex;
5
- flex: 0 0;
6
- align-items: center;
7
- align-self: stretch;
3
+ @layer vui {
4
+ .v-toolbar-edge {
5
+ display: flex;
6
+ flex: 0 0;
7
+ align-items: center;
8
+ align-self: stretch;
8
9
 
9
- &:empty,
10
- &--empty {
11
- display: none;
12
- }
10
+ &:empty,
11
+ &--empty {
12
+ display: none;
13
+ }
13
14
 
14
- $my-negative-margin: calc(-1 * var(--root-em) * 0.75); // -12
15
- $my-margin: calc(var(--root-em) * 0.75); // -12
15
+ $my-negative-margin: calc(-1 * var(--root-em) * 0.75); // -12
16
+ $my-margin: calc(var(--root-em) * 0.75); // -12
16
17
 
17
- &--start {
18
- margin-right: $my-margin;
19
- margin-left: $my-negative-margin;
20
- }
18
+ &--start {
19
+ margin-right: $my-margin;
20
+ margin-left: $my-negative-margin;
21
+ }
21
22
 
22
- &--end {
23
- padding-left: $my-margin;
24
- margin-right: $my-negative-margin;
25
- margin-left: auto;
23
+ &--end {
24
+ padding-left: $my-margin;
25
+ margin-right: $my-negative-margin;
26
+ margin-left: auto;
27
+ }
26
28
  }
27
29
  }
@@ -1,7 +1,9 @@
1
1
  // @use '../../styles/core.scss';
2
2
 
3
- .v-toolbar-menu {
4
- height: 100%;
5
- margin: 0;
6
- box-shadow: none;
3
+ @layer vui {
4
+ .v-toolbar-menu {
5
+ height: 100%;
6
+ margin: 0;
7
+ box-shadow: none;
8
+ }
7
9
  }
@@ -4,6 +4,11 @@ import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
4
  import { VButton, vueButtonProps } from '../VButton';
5
5
  import { useVui } from '../../injections';
6
6
 
7
+ // @TODO Unable to resolve dts for `navigationableInheritProps`.
8
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9
+ // @ts-ignore
10
+ import { RouteLocationRaw } from 'vue-router';
11
+
7
12
  export type VToolbarMenuEdge = 'start' | 'end';
8
13
 
9
14
  export const VToolbarMenu = defineComponent({
@@ -1,22 +1,24 @@
1
1
  // @use '../../styles/core.scss';
2
2
 
3
- .v-toolbar-title {
4
- display: flex;
5
- flex-grow: 1;
6
- margin: 0;
7
- // font-size: var(--typo-h3-size);
8
- font-size: 1.25rem;
9
- // font-weight: var(--typo-h3-weight);
10
- font-weight: 400;
11
- // font-size: 16px;
12
- // font-weight: 500;
13
- line-height: 1;
3
+ @layer vui {
4
+ .v-toolbar-title {
5
+ display: flex;
6
+ flex-grow: 1;
7
+ margin: 0;
8
+ // font-size: var(--typo-h3-size);
9
+ font-size: 1.25rem;
10
+ // font-weight: var(--typo-h3-weight);
11
+ font-weight: 400;
12
+ // font-size: 16px;
13
+ // font-weight: 500;
14
+ line-height: 1;
14
15
 
15
- // font-weight: 500;
16
- // font-size: 1.25rem;
17
- // line-height: 1.6;
18
- // letter-spacing: 0.0075em;
19
- white-space: nowrap;
16
+ // font-weight: 500;
17
+ // font-size: 1.25rem;
18
+ // line-height: 1.6;
19
+ // letter-spacing: 0.0075em;
20
+ white-space: nowrap;
20
21
 
21
- // @include core.typo('h2');
22
+ // @include core.typo('h2');
23
+ }
22
24
  }
@@ -15,6 +15,8 @@ export * from './VDrawerLayout';
15
15
  export * from './VHero';
16
16
  // export * from './VAccordion';
17
17
  export * from './VNavigation';
18
+ export * from './VControlField';
19
+ export * from './VTextCounter';
18
20
  export * from './VFormControl';
19
21
  export * from './VCheckbox';
20
22
  export * from './VCheckboxGroup';
@@ -28,7 +30,7 @@ export * from './VSelect';
28
30
  export * from './VTextField';
29
31
  export * from './VNumberField';
30
32
  export * from './VTextarea';
31
- export * from './VWysiwygEditor';
33
+ // export * from './VWysiwygEditor';
32
34
  export * from './VForm';
33
35
  export * from './VTabs';
34
36
  export * from './VBreadcrumbs';
@@ -1 +1 @@
1
- export { VDialog, VMenu, VSnackbar, VTooltip } from '@fastkit/vue-kit';
1
+ export { VDialog, VMenu, VSnackbar, VTooltip } from '@fastkit/vue-stack';
@@ -12,7 +12,7 @@ import {
12
12
  ControlFieldVariant,
13
13
  CONTROL_FIELD_VARIANTS,
14
14
  } from '../schemes';
15
- import { createPropsOptions } from '@fastkit/vue-kit';
15
+ import { createPropsOptions } from '@fastkit/vue-utils';
16
16
  import {
17
17
  VuiControlInjectionKey,
18
18
  VuiControlFieldInjectionKey,
@@ -1,24 +1,26 @@
1
- .v-form-selector {
2
- &__body {
3
- display: block;
4
- }
1
+ @layer vui {
2
+ .v-form-selector {
3
+ &__body {
4
+ display: block;
5
+ }
5
6
 
6
- &__placeholder {
7
- display: flex;
8
- align-items: center;
9
- margin-top: 8px;
10
- font-style: italic;
11
- opacity: 0.5;
7
+ &__placeholder {
8
+ display: flex;
9
+ align-items: center;
10
+ margin-top: 8px;
11
+ font-style: italic;
12
+ opacity: 0.5;
12
13
 
13
- &--error {
14
- color: var(--main-color);
15
- opacity: 1;
14
+ &--error {
15
+ color: var(--main-color);
16
+ opacity: 1;
17
+ }
16
18
  }
17
- }
18
19
 
19
- &--stacked &__body {
20
- display: flex;
21
- flex-direction: column;
22
- align-items: flex-start;
20
+ &--stacked &__body {
21
+ display: flex;
22
+ flex-direction: column;
23
+ align-items: flex-start;
24
+ }
23
25
  }
24
26
  }
@@ -1,8 +1,6 @@
1
1
  import './form-selector.scss';
2
2
  import { VNodeChild, defineComponent, PropType, computed } from 'vue';
3
3
  import {
4
- defineSlotsProps,
5
- TypedSlot,
6
4
  createFormControlProps,
7
5
  createFormSelectorSettings,
8
6
  FormControlSlots,
@@ -10,10 +8,14 @@ import {
10
8
  FormSelectorControl,
11
9
  ResolvedFormSelectorItem,
12
10
  FormNodeControl,
11
+ } from '@fastkit/vue-form-control';
12
+ import {
13
+ defineSlotsProps,
14
+ TypedSlot,
13
15
  renderSlotOrEmpty,
14
16
  VNodeChildOrSlot,
15
17
  resolveVNodeChildOrSlots,
16
- } from '@fastkit/vue-kit';
18
+ } from '@fastkit/vue-utils';
17
19
  import { createControlProps, useControl } from './control';
18
20
  import { VFormControl } from '../components/VFormControl';
19
21
  import { useVui } from '../injections';
package/src/index.ts CHANGED
@@ -1,7 +1,18 @@
1
- export * from '@fastkit/vue-kit';
2
-
3
1
  import './styles/index.scss';
4
2
 
3
+ export * from '@fastkit/helpers';
4
+ export * from '@fastkit/icon-font';
5
+ export * from '@fastkit/media-match';
6
+ export * from '@fastkit/vue-media-match';
7
+ export * from '@fastkit/rules';
8
+ export * from '@fastkit/vue-app-layout';
9
+ export * from '@fastkit/vue-color-scheme';
10
+ export * from '@fastkit/vue-form-control';
11
+ export * from '@fastkit/vue-scroller';
12
+ export * from '@fastkit/vue-stack';
13
+ export * from '@fastkit/vue-utils';
14
+ export * from '@fastkit/vue-loading';
15
+
5
16
  export * from './schemes';
6
17
  export * from './composables';
7
18
  export * from './components';
package/src/injections.ts CHANGED
@@ -18,7 +18,7 @@ export const VuiColorProviderInjectionKey: InjectionKey<VuiColorProvider> =
18
18
 
19
19
  export const VUI_TEXT_FIELD_SYMBOL = 'vui-text-field';
20
20
  export const VUI_TEXTAREA_SYMBOL = 'vui-textarea';
21
- export const VUI_WYSIWYG_EDITOR_SYMBOL = 'vui-wysiwyg-editor';
21
+ // export const VUI_WYSIWYG_EDITOR_SYMBOL = 'vui-wysiwyg-editor';
22
22
  export const VUI_SELECT_SYMBOL = 'vui-select';
23
23
  export const VUI_OPTION_SYMBOL = 'vui-option';
24
24
  export const VUI_CHECKBOX_GROUP_SYMBOL = 'vui-checkbox-group';
package/src/plugin.tsx CHANGED
@@ -7,12 +7,12 @@ import {
7
7
  VuiInjectionKey,
8
8
  } from './service';
9
9
  import {
10
- installVueAppLayout,
11
10
  installVueStackPlugin,
12
11
  VueStackServiceOptions,
13
- VueColorSchemePlugin,
14
- onAppUnmount,
15
- } from '@fastkit/vue-kit';
12
+ } from '@fastkit/vue-stack';
13
+ import { VueColorSchemePlugin } from '@fastkit/vue-color-scheme';
14
+ import { installVueAppLayout } from '@fastkit/vue-app-layout';
15
+ import { onAppUnmount } from '@fastkit/vue-utils';
16
16
  import { VButton } from './components/VButton';
17
17
 
18
18
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -1,10 +1,10 @@
1
1
  export const CONTROL_SIZES = ['sm', 'md', 'lg'] as const;
2
2
 
3
- export type ControlSize = typeof CONTROL_SIZES[number];
3
+ export type ControlSize = (typeof CONTROL_SIZES)[number];
4
4
 
5
5
  export const CONTROL_FIELD_VARIANTS = ['outlined', 'filled', 'flat'] as const;
6
6
 
7
- export type ControlFieldVariant = typeof CONTROL_FIELD_VARIANTS[number];
7
+ export type ControlFieldVariant = (typeof CONTROL_FIELD_VARIANTS)[number];
8
8
 
9
9
  export const CONTROL_LOADING_SPINNER_SIZES: Record<ControlSize, number> = {
10
10
  sm: 16,
package/src/service.tsx CHANGED
@@ -4,20 +4,20 @@ import { VNodeChild, reactive, UnwrapNestedRefs } from 'vue';
4
4
  import { ScopeName, ColorVariant } from '@fastkit/color-scheme';
5
5
  import type { IconName, RawIconProp } from './components/VIcon';
6
6
  import {
7
- type VueColorSchemePluginSettings,
8
7
  type VueStackService,
9
8
  type VDialogProps,
10
9
  type VStackControl,
11
- type VNodeChildOrSlot,
12
10
  resolveVStackDynamicInput,
13
- } from '@fastkit/vue-kit';
11
+ } from '@fastkit/vue-stack';
12
+ import { type VNodeChildOrSlot } from '@fastkit/vue-utils';
13
+ import { type VueColorSchemePluginSettings } from '@fastkit/vue-color-scheme';
14
14
  import type { Router } from 'vue-router';
15
15
  import { RouterLink, useLink, UseLinkOptions } from 'vue-router';
16
16
  import { LocationService, setDefaultRouterLink } from '@fastkit/vue-utils';
17
17
  import { VForm } from './components/VForm';
18
18
  import { VTextField, TextFieldInput } from './components/VTextField';
19
19
  import { VueForm, FormControlHinttipDelay } from '@fastkit/vue-form-control';
20
- import { getDocumentScroller } from '@fastkit/vue-scroller';
20
+ import { getDocumentScroller, UseScroller } from '@fastkit/vue-scroller';
21
21
  import { ControlSize } from './schemes';
22
22
 
23
23
  export type UseLinkResult = ReturnType<typeof useLink>;
@@ -188,7 +188,7 @@ export class VuiService {
188
188
  readonly stack: VueStackService;
189
189
  readonly useLink: typeof useLink;
190
190
 
191
- get scroller() {
191
+ get scroller(): UseScroller {
192
192
  return getDocumentScroller();
193
193
  }
194
194
 
@@ -49,8 +49,8 @@
49
49
  touch-action: manipulation;
50
50
  cursor: pointer;
51
51
  user-select: none;
52
- background-color: transparent;
53
- border: 0;
52
+ // background-color: transparent;
53
+ border-width: 0;
54
54
  outline: 0;
55
55
  appearance: none;
56
56
 
@@ -1,9 +1,23 @@
1
- // @use '@fastkit/stylebase/normalize.css';
2
- @use '../../../stylebase/normalize.css';
3
- @use './variables.scss';
4
- @use './base.scss';
5
- @use './typo.scss';
6
- @use './elevation.scss';
7
- @use './group.scss';
8
- @use './control.scss';
9
- @use './wysiwyg.scss';
1
+ @use 'sass:meta';
2
+
3
+ @layer vui-normalize, vui-color-scheme, vui;
4
+
5
+ @layer vui-normalize {
6
+ @include meta.load-css('@fastkit/stylebase/normalize.css');
7
+
8
+ button {
9
+ background-color: transparent;
10
+ }
11
+ }
12
+
13
+ @layer vui {
14
+ // @include meta.load-css('@fastkit/stylebase/normalize.css');
15
+
16
+ @include meta.load-css('./variables.scss');
17
+ @include meta.load-css('./base.scss');
18
+ @include meta.load-css('./typo.scss');
19
+ @include meta.load-css('./elevation.scss');
20
+ @include meta.load-css('./group.scss');
21
+ @include meta.load-css('./control.scss');
22
+ @include meta.load-css('./wysiwyg.scss');
23
+ }
@@ -1,2 +0,0 @@
1
- export * from './vite-plugin';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vui/src/tool/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,193 +0,0 @@
1
- import { dynamicSrcVitePlugin } from '@fastkit/vite-kit';
2
- import path from 'node:path';
3
- import fs from 'fs-extra';
4
- import { getDirname, findPackageDirSync } from '@fastkit/node-util';
5
- import { render } from 'eta';
6
- import { TinyLogger, createTinyError } from '@fastkit/tiny-logger';
7
-
8
- const name = 'vui';
9
- new TinyLogger(name);
10
- const VuiError = createTinyError(name);
11
-
12
- const VUI_PACKAGE_DIR = path.resolve(getDirname(import.meta.url), '../..');
13
- const STYLE_AFTER_EFFECTS_PATH = path.join(VUI_PACKAGE_DIR, 'src/styles/after-effects.scss');
14
- const COLOR_DUMP_STYLE = `@include dump-color-scheme(true);`;
15
- const TEMPLATE = `
16
- /* eslint-disable */
17
- // @ts-nocheck
18
- <% if (!it.__dev) { %>
19
- import '@fastkit/vue-stack/vue-stack.css';
20
- import '@fastkit/vue-app-layout/vue-app-layout.css';
21
- import '@fastkit/vue-loading/vue-loading.css';
22
- import '@fastkit/vue-scroller/vue-scroller.css';
23
- import '@fastkit/vui/vui.css';
24
- <% } %>
25
- import './setup.scss';
26
- import type { App } from 'vue';
27
- import type { Router } from 'vue-router';
28
- import { VPageLink } from '@fastkit/vue-page';
29
- import { installVuiPlugin as _installVuiPlugin, RawVuiPluginOptions, mergeVuiPluginOptions } from '@fastkit/vui';
30
- import { colorScheme } from '<%~ it.colorScheme %>';
31
- import '<%~ it.mediaMatch %>';
32
- import './icon-font';
33
- import '${STYLE_AFTER_EFFECTS_PATH}';
34
-
35
- export function installVui(settings: { app: App, router: Router }, options?: RawVuiPluginOptions) {
36
- const merged = mergeVuiPluginOptions({
37
- RouterLink: VPageLink,
38
- colorScheme,
39
- uiSettings: <%~ it.uiSettings %>,
40
- icons: <%~ it.icons %>,
41
- ...settings,
42
- }, options);
43
- _installVuiPlugin(settings.app, merged);
44
- }
45
-
46
- export default installVui;
47
- `.trim();
48
- async function renderTemplate({ colorScheme, mediaMatch, uiSettings, icons, __dev, }) {
49
- const result = await render(TEMPLATE, {
50
- colorScheme,
51
- mediaMatch,
52
- uiSettings: JSON.stringify(uiSettings),
53
- icons: JSON.stringify(icons),
54
- __dev,
55
- }, { async: true });
56
- if (!result) {
57
- throw new VuiError('template render error.');
58
- }
59
- return result;
60
- }
61
- function defaultDynamicDest() {
62
- return path.resolve('.vui');
63
- }
64
- function getBuiltinsDir() {
65
- const pkgDir = findPackageDirSync(undefined, true);
66
- if (!pkgDir) {
67
- throw new Error(`missing package directory`);
68
- }
69
- return path.join(pkgDir, 'node_modules/@fastkit/vui/dist/assets/builtins');
70
- }
71
- function viteVuiPlugin(options = {}) {
72
- const plugins = [];
73
- const builtinsDir = getBuiltinsDir();
74
- const { colorScheme = path.join(builtinsDir, 'color-scheme'), mediaMatch = path.join(builtinsDir, 'media-match'), iconFont, iconFontDefaults, onBooted, onBootError, uiSettings = {
75
- primaryScope: 'primary',
76
- plainVariant: 'plain',
77
- containedVariant: 'contained',
78
- warningScope: 'warning',
79
- errorScope: 'error',
80
- buttonDefault: {
81
- color: 'base',
82
- variant: 'contained',
83
- },
84
- tabDefault: {
85
- color: 'accent',
86
- },
87
- dialogOk: {
88
- color: 'primary',
89
- },
90
- }, icons = {
91
- menuDown: 'mdi-menu-down',
92
- navigationExpand: 'mdi-menu-down',
93
- prev: 'mdi-chevron-left',
94
- next: 'mdi-chevron-right',
95
- sort: 'mdi-chevron-down',
96
- editorTextColor: 'mdi-format-color-text',
97
- editorformatBold: 'mdi-format-bold',
98
- editorformatUnderline: 'mdi-format-underline',
99
- editorformatItalic: 'mdi-format-italic',
100
- editorformatListBulleted: 'mdi-format-list-bulleted',
101
- editorformatListNumbered: 'mdi-format-list-numbered',
102
- editorLink: 'mdi-link',
103
- editorLinkOff: 'mdi-link-off',
104
- editorUndo: 'mdi-undo-variant',
105
- editorRedo: 'mdi-redo-variant',
106
- hinttip: 'mdi-help-circle-outline',
107
- clear: 'mdi-close',
108
- reload: 'mdi-reload',
109
- // navigationExpand: (gen, active) => {
110
- // return gen({
111
- // name: 'mdi-menu-down' as any,
112
- // rotate: active ? 180 : 0,
113
- // });
114
- // },
115
- ...options.icons,
116
- }, __dev, } = options;
117
- let dynamicDest;
118
- const { dynamicDest: _dynamicDest } = options;
119
- if (!_dynamicDest) {
120
- dynamicDest = defaultDynamicDest();
121
- }
122
- else {
123
- dynamicDest = _dynamicDest;
124
- }
125
- const colorSchemeSrc = path.resolve(colorScheme);
126
- const colorSchemeDest = path.join(dynamicDest, 'color-scheme');
127
- const mediaMatchDest = path.join(dynamicDest, 'media-match');
128
- const dts = `
129
- /// <reference path="./color-scheme/color-scheme.info.ts" />
130
- /// <reference path="./icon-font/index.ts" />
131
- /// <reference path="./media-match/media-match.ts" />
132
- export {};
133
- `.trim();
134
- fs.ensureDirSync(dynamicDest);
135
- fs.writeFileSync(path.join(dynamicDest, 'setup.scss'), COLOR_DUMP_STYLE);
136
- fs.writeFileSync(path.join(dynamicDest, 'vui.d.ts'), dts);
137
- let iconFontEntries = iconFont || [
138
- {
139
- src: '@mdi',
140
- },
141
- ];
142
- if (iconFontDefaults) {
143
- iconFontEntries = iconFontEntries.map((entry) => {
144
- return {
145
- ...iconFontDefaults,
146
- ...entry,
147
- };
148
- });
149
- }
150
- plugins.push(dynamicSrcVitePlugin({
151
- colorScheme: {
152
- src: colorSchemeSrc,
153
- dest: colorSchemeDest,
154
- },
155
- mediaMatch: {
156
- src: path.resolve(mediaMatch),
157
- dest: mediaMatchDest,
158
- },
159
- iconFont: {
160
- entries: iconFontEntries,
161
- dest: path.join(dynamicDest, 'icon-font'),
162
- },
163
- onBooted,
164
- onBootError,
165
- }));
166
- const plugin = {
167
- name: 'vite:vui',
168
- enforce: 'pre',
169
- async config(config) {
170
- await fs.writeFile(path.join(dynamicDest, 'installer.ts'), await renderTemplate(settings));
171
- const ssr = config.ssr || {};
172
- ssr.noExternal = ssr.noExternal || [];
173
- ssr.noExternal.push(/\/vui\/dist\/assets\//);
174
- config.ssr = ssr;
175
- return config;
176
- },
177
- };
178
- plugins.push(plugin);
179
- const settings = {
180
- colorScheme: path.join(colorSchemeDest, 'color-scheme.info'),
181
- mediaMatch: path.join(mediaMatchDest, 'media-match'),
182
- uiSettings,
183
- icons,
184
- __dev,
185
- };
186
- return {
187
- plugins,
188
- dest: dynamicDest,
189
- settings,
190
- };
191
- }
192
-
193
- export { viteVuiPlugin };
@@ -1,25 +0,0 @@
1
- import { Plugin } from 'vite';
2
- import { RawIconFontEntry, IconFontSettings } from '@fastkit/icon-font-gen';
3
- import { VuiServiceOptions } from '../service';
4
- export interface ViteVuiPluginOptions extends Partial<Pick<VuiServiceOptions, 'uiSettings' | 'icons'>> {
5
- dynamicDest?: string;
6
- colorScheme?: string;
7
- mediaMatch?: string;
8
- iconFont?: RawIconFontEntry[];
9
- iconFontDefaults?: IconFontSettings;
10
- onBooted?: (() => any) | (() => Promise<any>);
11
- onBootError?: ((err: unknown) => any) | ((err: unknown) => Promise<any>);
12
- __dev?: boolean;
13
- }
14
- export interface ViteVuiPluginResultSettings extends Pick<VuiServiceOptions, 'uiSettings' | 'icons'> {
15
- colorScheme: string;
16
- mediaMatch: string;
17
- __dev?: boolean;
18
- }
19
- export interface ViteVuiPluginResult {
20
- settings: ViteVuiPluginResultSettings;
21
- plugins: (Plugin | Plugin[])[];
22
- dest: string;
23
- }
24
- export declare function viteVuiPlugin(options?: ViteVuiPluginOptions): ViteVuiPluginResult;
25
- //# sourceMappingURL=vite-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vui/src/tool/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAK9B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAmF/C,MAAM,WAAW,oBACf,SAAQ,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,OAAO,CAAC;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,2BAA2B,CAAC;IACtC,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CAqJrB"}
package/src/.DS_Store DELETED
Binary file
@@ -1,9 +0,0 @@
1
- import { createSimpleColorScheme } from '@fastkit/color-scheme-gen';
2
-
3
- const scheme = createSimpleColorScheme({
4
- // primary: '#28bebd',
5
- // secondary: '#484d55',
6
- // default: '#2f495e',
7
- });
8
-
9
- export default scheme;
@@ -1,3 +0,0 @@
1
- import { createRecommendedSettings } from '@fastkit/media-match-gen';
2
-
3
- export default createRecommendedSettings();