@fastkit/vui 0.12.7 → 0.12.9

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 (109) hide show
  1. package/LICENSE +1 -1
  2. package/dist/vui.css +2786 -2716
  3. package/dist/vui.css.map +1 -0
  4. package/dist/vui.d.ts +9072 -10160
  5. package/dist/vui.mjs +2158 -1968
  6. package/dist/vui.mjs.map +1 -0
  7. package/package.json +89 -59
  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/VDataTable/VDataTable.tsx +39 -8
  31. package/src/components/VDrawerLayout/VDrawerLayout.scss +27 -25
  32. package/src/components/VForm/VForm.tsx +3 -4
  33. package/src/components/VFormControl/VFormControl.scss +84 -82
  34. package/src/components/VFormControl/VFormControl.tsx +2 -3
  35. package/src/components/VGrid/VGridContainer.scss +5 -3
  36. package/src/components/VGrid/VGridItem.scss +4 -2
  37. package/src/components/VHero/VHero.scss +23 -21
  38. package/src/components/VIcon/VIcon.scss +19 -17
  39. package/src/components/VListTile/VListTile.scss +60 -58
  40. package/src/components/VListTile/VListTile.tsx +5 -0
  41. package/src/components/VNavigation/VNavigation.scss +12 -10
  42. package/src/components/VNavigation/VNavigationItem.scss +21 -19
  43. package/src/components/VNavigation/VNavigationItem.tsx +5 -0
  44. package/src/components/VOption/VOption.scss +55 -56
  45. package/src/components/VOption/VOption.tsx +2 -2
  46. package/src/components/VOptionGroup/VOptionGroup.scss +14 -12
  47. package/src/components/VOptionGroup/VOptionGroup.tsx +3 -1
  48. package/src/components/VPagination/VPagination.scss +81 -79
  49. package/src/components/VPagination/VPagination.tsx +1 -1
  50. package/src/components/VPaper/VPaper.scss +43 -41
  51. package/src/components/VRadio/VRadio.scss +52 -53
  52. package/src/components/VRadio/VRadio.tsx +2 -2
  53. package/src/components/VSelect/VSelect.scss +77 -75
  54. package/src/components/VSelect/VSelect.tsx +5 -2
  55. package/src/components/VSkeltonLoader/VSkeltonLoaderBone.scss +24 -22
  56. package/src/components/VSwitch/VSwitch.scss +96 -94
  57. package/src/components/VSwitch/VSwitch.tsx +2 -2
  58. package/src/components/VTabs/VTab.scss +59 -57
  59. package/src/components/VTabs/VTabs.scss +41 -39
  60. package/src/components/VTabs/VTabs.tsx +5 -2
  61. package/src/components/VTextCounter/VTextCounter.scss +4 -2
  62. package/src/components/VTextField/VTextField.scss +37 -35
  63. package/src/components/VTextField/VTextField.tsx +2 -2
  64. package/src/components/VTextarea/VTextarea.scss +33 -31
  65. package/src/components/VTextarea/VTextarea.tsx +2 -2
  66. package/src/components/VToolbar/VToolbar.scss +19 -17
  67. package/src/components/VToolbar/VToolbarEdge.scss +21 -19
  68. package/src/components/VToolbar/VToolbarMenu.scss +6 -4
  69. package/src/components/VToolbar/VToolbarMenu.tsx +5 -0
  70. package/src/components/VToolbar/VToolbarTitle.scss +19 -17
  71. package/src/components/VWysiwygEditor/VWysiwygEditor.scss +52 -50
  72. package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +2 -2
  73. package/src/components/VWysiwygEditor/extensions/linter/Linter.scss +108 -109
  74. package/src/components/VWysiwygEditor/schemes.ts +1 -1
  75. package/src/components/VWysiwygEditor/tools/color.scss +106 -112
  76. package/src/components/kits.ts +1 -1
  77. package/src/composables/control.ts +1 -1
  78. package/src/composables/form-selector.scss +20 -18
  79. package/src/composables/form-selector.tsx +5 -3
  80. package/src/index.ts +13 -2
  81. package/src/plugin.tsx +4 -4
  82. package/src/schemes/control.ts +2 -2
  83. package/src/service.tsx +5 -5
  84. package/src/styles/core/functions.scss +2 -2
  85. package/src/styles/index.scss +23 -9
  86. package/dist/tool/index.d.ts +0 -2
  87. package/dist/tool/index.d.ts.map +0 -1
  88. package/dist/tool/index.mjs +0 -193
  89. package/dist/tool/vite-plugin.d.ts +0 -25
  90. package/dist/tool/vite-plugin.d.ts.map +0 -1
  91. package/src/.DS_Store +0 -0
  92. package/src/assets/builtins/color-scheme.ts +0 -9
  93. package/src/assets/builtins/media-match.ts +0 -3
  94. package/src/components/.DS_Store +0 -0
  95. package/src/components/VAvatar/.DS_Store +0 -0
  96. package/src/components/VChip/.DS_Store +0 -0
  97. package/src/components/VSkeltonLoader/.DS_Store +0 -0
  98. package/src/components/VTextField/.DS_Store +0 -0
  99. package/src/components/VWysiwygEditor/.DS_Store +0 -0
  100. package/src/components/VWysiwygEditor/extensions/.DS_Store +0 -0
  101. package/src/components/VWysiwygEditor/extensions/linter/.DS_Store +0 -0
  102. package/src/tool/index.ts +0 -2
  103. package/src/tool/vite-plugin.ts +0 -266
  104. /package/{src/styles → dist}/after-effects/display-flow.scss +0 -0
  105. /package/{src/styles → dist}/after-effects/spacing.scss +0 -0
  106. /package/{src/styles → dist}/after-effects/text.scss +0 -0
  107. /package/{src/styles → dist}/after-effects.scss +0 -0
  108. /package/dist/{assets/builtins → builtins}/color-scheme.ts +0 -0
  109. /package/dist/{assets/builtins → builtins}/media-match.ts +0 -0
@@ -1,56 +1,58 @@
1
1
  @use 'sass:math';
2
2
 
3
- .v-checkbox {
4
- --my-border-color: var(--color);
5
- --my-faux-bg-color: transparent;
3
+ @layer vui {
4
+ .v-checkbox {
5
+ --my-border-color: var(--color);
6
+ --my-faux-bg-color: transparent;
6
7
 
7
- &--selected,
8
- &--indeterminate {
9
- --my-border-color: transparent;
10
- --my-faux-bg-color: var(--color);
11
- }
8
+ &--selected,
9
+ &--indeterminate {
10
+ --my-border-color: transparent;
11
+ --my-faux-bg-color: var(--color);
12
+ }
12
13
 
13
- &__faux {
14
- display: block;
15
- width: 100%;
16
- height: 100%;
17
- clip-path: polygon(
18
- 0 0,
19
- 0 100%,
20
- 100% 100%,
21
- 100% 0,
22
- 88.25% 28.25%,
23
- 38% 78.125%,
24
- 12% 50%,
25
- 20% 42.1875%,
26
- 38% 63%,
27
- 82% 20%,
28
- 88.25% 28.25%,
29
- 100% 0
30
- );
31
- background: var(--my-faux-bg-color);
32
- border: solid 2px var(--my-border-color);
33
- border-radius: var(--control-field-radius);
34
- transition: border-color 0.2s, background-color 0.2s;
35
- }
14
+ &__faux {
15
+ display: block;
16
+ width: 100%;
17
+ height: 100%;
18
+ clip-path: polygon(
19
+ 0 0,
20
+ 0 100%,
21
+ 100% 100%,
22
+ 100% 0,
23
+ 88.25% 28.25%,
24
+ 38% 78.125%,
25
+ 12% 50%,
26
+ 20% 42.1875%,
27
+ 38% 63%,
28
+ 82% 20%,
29
+ 88.25% 28.25%,
30
+ 100% 0
31
+ );
32
+ background: var(--my-faux-bg-color);
33
+ border: solid 2px var(--my-border-color);
34
+ border-radius: var(--control-field-radius);
35
+ transition: border-color 0.2s, background-color 0.2s;
36
+ }
36
37
 
37
- &--indeterminate &__faux {
38
- $x1: math.div(12, 54) * 100%;
39
- $x2: 100% - $x1;
40
- $y1: math.div(24, 54) * 100%;
41
- $y2: 100% - $y1;
38
+ &--indeterminate &__faux {
39
+ $x1: math.div(12, 54) * 100%;
40
+ $x2: 100% - $x1;
41
+ $y1: math.div(24, 54) * 100%;
42
+ $y2: 100% - $y1;
42
43
 
43
- clip-path: polygon(
44
- 0 0,
45
- 0 100%,
46
- 100% 100%,
47
- 100% 0,
48
- #{$x2} #{$y1},
49
- #{$x2} #{$y2},
50
- #{$x1} #{$y2},
51
- #{$x1} #{$y1},
52
- #{$x2} #{$y1},
53
- 100% 0
54
- );
44
+ clip-path: polygon(
45
+ 0 0,
46
+ 0 100%,
47
+ 100% 100%,
48
+ 100% 0,
49
+ #{$x2} #{$y1},
50
+ #{$x2} #{$y2},
51
+ #{$x1} #{$y2},
52
+ #{$x1} #{$y1},
53
+ #{$x2} #{$y1},
54
+ 100% 0
55
+ );
56
+ }
55
57
  }
56
58
  }
@@ -3,8 +3,8 @@ import { defineComponent, computed } from 'vue';
3
3
  import {
4
4
  createFormSelectorItemSettings,
5
5
  useFormSelectorItemControl,
6
- renderSlotOrEmpty,
7
- } from '@fastkit/vue-kit';
6
+ } from '@fastkit/vue-form-control';
7
+ import { renderSlotOrEmpty } from '@fastkit/vue-utils';
8
8
  import { createControlProps, useControl } from '../../composables';
9
9
  import {
10
10
  VUI_CHECKBOX_GROUP_SYMBOL,
@@ -1,78 +1,80 @@
1
1
  @use '../../styles/core.scss';
2
2
 
3
- .v-chip {
4
- @include core.button-reset();
3
+ @layer vui {
4
+ .v-chip {
5
+ @include core.button-reset();
5
6
 
6
- $chip-sizes: xs, sm, md, lg, xl;
7
+ $chip-sizes: xs, sm, md, lg, xl;
7
8
 
8
- --chip-radius: calc(var(--chip-height) / 2);
9
+ --chip-radius: calc(var(--chip-height) / 2);
9
10
 
10
- display: inline-flex;
11
- align-items: center;
12
- justify-content: center;
13
- height: var(--chip-height);
14
- padding: 0 var(--chip-padding);
15
- overflow: hidden;
16
- font-size: var(--chip-font-size);
17
- font-weight: var(--chip-font-weight);
18
- line-height: 1;
19
- text-align: center;
20
- white-space: nowrap;
21
- vertical-align: bottom;
22
- cursor: default;
23
- border-style: solid;
24
- border-width: 1px;
25
- border-radius: var(--chip-radius);
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ height: var(--chip-height);
15
+ padding: 0 var(--chip-padding);
16
+ overflow: hidden;
17
+ font-size: var(--chip-font-size);
18
+ font-weight: var(--chip-font-weight);
19
+ line-height: 1;
20
+ text-align: center;
21
+ white-space: nowrap;
22
+ vertical-align: bottom;
23
+ cursor: default;
24
+ border-style: solid;
25
+ border-width: 1px;
26
+ border-radius: var(--chip-radius);
26
27
 
27
- --shadow-color: rgba(0, 0, 0, 0) !important; // @TODO layer supports
28
- --focusShadow-color: rgba(0, 0, 0, 0) !important; // @TODO layer supports
28
+ --shadow-color: rgba(0, 0, 0, 0) !important; // @TODO layer supports
29
+ --focusShadow-color: rgba(0, 0, 0, 0) !important; // @TODO layer supports
29
30
 
30
- &--clickable {
31
- cursor: pointer;
32
- }
31
+ &--clickable {
32
+ cursor: pointer;
33
+ }
33
34
 
34
- @each $size in $chip-sizes {
35
- &--#{$size} {
36
- --chip-height: var(--chip-height-#{$size});
37
- --chip-font-size: var(--chip-font-size-#{$size});
35
+ @each $size in $chip-sizes {
36
+ &--#{$size} {
37
+ --chip-height: var(--chip-height-#{$size});
38
+ --chip-font-size: var(--chip-font-size-#{$size});
39
+ }
38
40
  }
39
- }
40
41
 
41
- &--label {
42
- --chip-radius: 4px;
43
- }
42
+ &--label {
43
+ --chip-radius: 4px;
44
+ }
44
45
 
45
- // &[disabled] {
46
- // pointer-events: none;
46
+ // &[disabled] {
47
+ // pointer-events: none;
47
48
 
48
- // &::before {
49
- // content: none;
50
- // }
51
- // }
52
- // // noop
49
+ // &::before {
50
+ // content: none;
51
+ // }
52
+ // }
53
+ // // noop
53
54
 
54
- // img,
55
- // &__image {
56
- // display: inline-flex;
57
- // width: inherit !important;
58
- // height: inherit !important;
59
- // border-radius: inherit;
60
- // object-fit: cover;
61
- // }
55
+ // img,
56
+ // &__image {
57
+ // display: inline-flex;
58
+ // width: inherit !important;
59
+ // height: inherit !important;
60
+ // border-radius: inherit;
61
+ // object-fit: cover;
62
+ // }
62
63
 
63
- &__icon {
64
- &--start {
65
- margin-right: calc(var(--chip-padding) * 0.5);
66
- margin-left: calc(var(--chip-padding) * -0.5);
67
- }
64
+ &__icon {
65
+ &--start {
66
+ margin-right: calc(var(--chip-padding) * 0.5);
67
+ margin-left: calc(var(--chip-padding) * -0.5);
68
+ }
68
69
 
69
- &--end {
70
- margin-right: calc(var(--chip-padding) * -0.5);
71
- margin-left: calc(var(--chip-padding) * 0.5);
70
+ &--end {
71
+ margin-right: calc(var(--chip-padding) * -0.5);
72
+ margin-left: calc(var(--chip-padding) * 0.5);
73
+ }
72
74
  }
73
- }
74
75
 
75
- .v-avatar {
76
- --avatar-size: 14px;
76
+ .v-avatar {
77
+ --avatar-size: 14px;
78
+ }
77
79
  }
78
80
  }
@@ -10,9 +10,14 @@ import { useVui } from '../../injections';
10
10
  import type { IconName } from '../VIcon';
11
11
  import { VIcon } from '../VIcon';
12
12
 
13
+ // @TODO Unable to resolve dts for `navigationableInheritProps`.
14
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
+ // @ts-ignore
16
+ import { RouteLocationRaw } from 'vue-router';
17
+
13
18
  export const CHIP_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;
14
19
 
15
- export type ChipSize = typeof CHIP_SIZES[number];
20
+ export type ChipSize = (typeof CHIP_SIZES)[number];
16
21
 
17
22
  export type VChipIcon = () => VNodeChild;
18
23
 
@@ -1,72 +1,74 @@
1
- .v-content-switcher {
2
- position: relative;
3
- display: block;
4
- width: 100%;
5
- overflow: hidden;
6
- transition: var(--transition-tab);
7
-
8
- &__content {
1
+ @layer vui {
2
+ .v-content-switcher {
3
+ position: relative;
4
+ display: block;
9
5
  width: 100%;
10
- }
6
+ overflow: hidden;
7
+ transition: var(--transition-tab);
11
8
 
12
- &-prev {
13
- &-enter-active,
14
- &-leave-active {
15
- transition: var(--transition-tab);
9
+ &__content {
10
+ width: 100%;
16
11
  }
17
12
 
18
- &-enter {
19
- &-from {
20
- transform: translateX(-100%);
13
+ &-prev {
14
+ &-enter-active,
15
+ &-leave-active {
16
+ transition: var(--transition-tab);
21
17
  }
22
18
 
23
- &-to {
24
- transform: translateX(0%);
19
+ &-enter {
20
+ &-from {
21
+ transform: translateX(-100%);
22
+ }
23
+
24
+ &-to {
25
+ transform: translateX(0%);
26
+ }
25
27
  }
26
- }
27
28
 
28
- &-leave {
29
- transform: translateX(0%);
29
+ &-leave {
30
+ transform: translateX(0%);
30
31
 
31
- &-active {
32
- position: absolute;
33
- top: 0;
34
- left: 0;
35
- }
32
+ &-active {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ }
36
37
 
37
- &-to {
38
- transform: translateX(100%);
38
+ &-to {
39
+ transform: translateX(100%);
40
+ }
39
41
  }
40
42
  }
41
- }
42
43
 
43
- &-next {
44
- &-enter-active,
45
- &-leave-active {
46
- transition: var(--transition-tab);
47
- }
48
-
49
- &-enter {
50
- &-from {
51
- transform: translateX(100%);
44
+ &-next {
45
+ &-enter-active,
46
+ &-leave-active {
47
+ transition: var(--transition-tab);
52
48
  }
53
49
 
54
- &-to {
55
- transform: translateX(0%);
50
+ &-enter {
51
+ &-from {
52
+ transform: translateX(100%);
53
+ }
54
+
55
+ &-to {
56
+ transform: translateX(0%);
57
+ }
56
58
  }
57
- }
58
59
 
59
- &-leave {
60
- transform: translateX(0%);
60
+ &-leave {
61
+ transform: translateX(0%);
61
62
 
62
- &-active {
63
- position: absolute;
64
- top: 0;
65
- left: 0;
66
- }
63
+ &-active {
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ }
67
68
 
68
- &-to {
69
- transform: translateX(-100%);
69
+ &-to {
70
+ transform: translateX(-100%);
71
+ }
70
72
  }
71
73
  }
72
74
  }