@fastkit/vui 0.12.8 → 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 (108) 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 -10172
  5. package/dist/vui.mjs +2141 -1969
  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/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/VWysiwygEditor/VWysiwygEditor.scss +52 -50
  71. package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +2 -2
  72. package/src/components/VWysiwygEditor/extensions/linter/Linter.scss +108 -109
  73. package/src/components/VWysiwygEditor/schemes.ts +1 -1
  74. package/src/components/VWysiwygEditor/tools/color.scss +106 -112
  75. package/src/components/kits.ts +1 -1
  76. package/src/composables/control.ts +1 -1
  77. package/src/composables/form-selector.scss +20 -18
  78. package/src/composables/form-selector.tsx +5 -3
  79. package/src/index.ts +13 -2
  80. package/src/plugin.tsx +4 -4
  81. package/src/schemes/control.ts +2 -2
  82. package/src/service.tsx +5 -5
  83. package/src/styles/core/functions.scss +2 -2
  84. package/src/styles/index.scss +23 -9
  85. package/dist/tool/index.d.ts +0 -2
  86. package/dist/tool/index.d.ts.map +0 -1
  87. package/dist/tool/index.mjs +0 -193
  88. package/dist/tool/vite-plugin.d.ts +0 -25
  89. package/dist/tool/vite-plugin.d.ts.map +0 -1
  90. package/src/.DS_Store +0 -0
  91. package/src/assets/builtins/color-scheme.ts +0 -9
  92. package/src/assets/builtins/media-match.ts +0 -3
  93. package/src/components/.DS_Store +0 -0
  94. package/src/components/VAvatar/.DS_Store +0 -0
  95. package/src/components/VChip/.DS_Store +0 -0
  96. package/src/components/VSkeltonLoader/.DS_Store +0 -0
  97. package/src/components/VTextField/.DS_Store +0 -0
  98. package/src/components/VWysiwygEditor/.DS_Store +0 -0
  99. package/src/components/VWysiwygEditor/extensions/.DS_Store +0 -0
  100. package/src/components/VWysiwygEditor/extensions/linter/.DS_Store +0 -0
  101. package/src/tool/index.ts +0 -2
  102. package/src/tool/vite-plugin.ts +0 -266
  103. /package/{src/styles → dist}/after-effects/display-flow.scss +0 -0
  104. /package/{src/styles → dist}/after-effects/spacing.scss +0 -0
  105. /package/{src/styles → dist}/after-effects/text.scss +0 -0
  106. /package/{src/styles → dist}/after-effects.scss +0 -0
  107. /package/dist/{assets/builtins → builtins}/color-scheme.ts +0 -0
  108. /package/dist/{assets/builtins → builtins}/media-match.ts +0 -0
@@ -1,183 +1,185 @@
1
- .v-control-field {
2
- position: relative;
3
- display: inline-flex;
4
- align-items: center;
5
- width: 100%;
6
- min-width: 0;
7
- height: var(--control-field-height);
8
- padding: 0 8px;
9
- font-size: var(--control-field-font-size);
10
- line-height: var(--control-field-line-height);
11
- letter-spacing: var(--control-field-letter-spacing);
12
-
13
- --my-bottom-color: var(--control-field-bottom-color);
14
- --my-bottom-hover-color: var(--control-field-bottom-hover-color);
15
- --my-focused-color: var(--main-color);
16
- --my-fill-color: var(--control-field-fill-color);
17
- --my-fill-hover-color: var(--control-field-fill-hover-color);
18
- --my-outline-color: var(--control-field-outline-color);
19
- --my-outline-hover-color: var(--control-field-outline-hover-color);
20
-
21
- &--invalid:not(#{&}--disabled):not(#{&}--readonly) {
22
- --my-bottom-color: var(--main-color);
23
- --my-bottom-hover-color: var(--main-color);
24
- --my-outline-color: var(--main-color);
25
- --my-outline-hover-color: var(--main-color);
26
- }
27
-
28
- &--readonly {
29
- // pointer-events: none !important;
30
- cursor: default;
31
- }
32
-
33
- &--disabled {
34
- color: var(--control-disabled-color);
35
- pointer-events: none;
36
- // cursor: not-allowed !important;
37
- user-select: none;
38
- }
39
-
40
- &::before,
41
- &::after {
42
- position: absolute;
43
- right: 0;
44
- bottom: 0;
45
- left: 0;
46
- pointer-events: none;
47
- content: '';
48
- // transition: all 0.2s;
49
- }
1
+ @layer vui {
2
+ .v-control-field {
3
+ position: relative;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ width: 100%;
7
+ min-width: 0;
8
+ height: var(--control-field-height);
9
+ padding: 0 8px;
10
+ font-size: var(--control-field-font-size);
11
+ line-height: var(--control-field-line-height);
12
+ letter-spacing: var(--control-field-letter-spacing);
13
+
14
+ --my-bottom-color: var(--control-field-bottom-color);
15
+ --my-bottom-hover-color: var(--control-field-bottom-hover-color);
16
+ --my-focused-color: var(--main-color);
17
+ --my-fill-color: var(--control-field-fill-color);
18
+ --my-fill-hover-color: var(--control-field-fill-hover-color);
19
+ --my-outline-color: var(--control-field-outline-color);
20
+ --my-outline-hover-color: var(--control-field-outline-hover-color);
21
+
22
+ &--invalid:not(#{&}--disabled):not(#{&}--readonly) {
23
+ --my-bottom-color: var(--main-color);
24
+ --my-bottom-hover-color: var(--main-color);
25
+ --my-outline-color: var(--main-color);
26
+ --my-outline-hover-color: var(--main-color);
27
+ }
50
28
 
51
- &::before {
52
- height: 1px;
53
- border-bottom: solid 1px var(--my-bottom-color);
54
- transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
55
- }
29
+ &--readonly {
30
+ // pointer-events: none !important;
31
+ cursor: default;
32
+ }
56
33
 
57
- &::after {
58
- height: 2px;
59
- background: var(--my-focused-color);
60
- transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
61
- transform: scaleX(0);
62
- }
34
+ &--disabled {
35
+ color: var(--control-disabled-color);
36
+ pointer-events: none;
37
+ // cursor: not-allowed !important;
38
+ user-select: none;
39
+ }
63
40
 
64
- &--focused,
65
- &:focus-within {
66
- --my-outline-color: var(--my-focused-color);
67
- --my-outline-hover-color: var(--my-focused-color);
41
+ &::before,
42
+ &::after {
43
+ position: absolute;
44
+ right: 0;
45
+ bottom: 0;
46
+ left: 0;
47
+ pointer-events: none;
48
+ content: '';
49
+ // transition: all 0.2s;
50
+ }
68
51
 
69
- outline: none;
52
+ &::before {
53
+ height: 1px;
54
+ border-bottom: solid 1px var(--my-bottom-color);
55
+ transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
56
+ }
70
57
 
71
58
  &::after {
72
- transform: scaleX(1);
59
+ height: 2px;
60
+ background: var(--my-focused-color);
61
+ transition: transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
62
+ transform: scaleX(0);
73
63
  }
74
- }
75
64
 
76
- // &:focus-within {
77
- // &::after {
78
- // transform: scaleX(1);
79
- // }
80
- // }
65
+ &--focused,
66
+ &:focus-within {
67
+ --my-outline-color: var(--my-focused-color);
68
+ --my-outline-hover-color: var(--my-focused-color);
81
69
 
82
- &--auto-height {
83
- height: auto;
84
- }
70
+ outline: none;
85
71
 
86
- &__body {
87
- display: flex;
88
- flex: 1 1 auto;
89
- align-items: stretch;
90
- align-self: stretch;
91
- // margin: 0 8px;
92
- margin: 0;
93
- // pointer-events: none;
72
+ &::after {
73
+ transform: scaleX(1);
74
+ }
75
+ }
94
76
 
95
- // color: #f00;
77
+ // &:focus-within {
78
+ // &::after {
79
+ // transform: scaleX(1);
80
+ // }
81
+ // }
96
82
 
97
- // background-color: var(--control-fill-color);
98
- // border: solid 1px;
99
- }
83
+ &--auto-height {
84
+ height: auto;
85
+ }
100
86
 
101
- &--flat {
102
- padding-right: 0;
103
- padding-left: 0;
104
- }
87
+ &__body {
88
+ display: flex;
89
+ flex: 1 1 auto;
90
+ align-items: stretch;
91
+ align-self: stretch;
92
+ // margin: 0 8px;
93
+ margin: 0;
94
+ // pointer-events: none;
105
95
 
106
- &--filled {
107
- background-color: var(--my-fill-color);
108
- border-top-left-radius: var(--control-field-radius);
109
- border-top-right-radius: var(--control-field-radius);
110
- transition: background-color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
96
+ // color: #f00;
111
97
 
112
- &:hover:not(:focus-within) {
113
- background-color: var(--my-fill-hover-color);
98
+ // background-color: var(--control-fill-color);
99
+ // border: solid 1px;
114
100
  }
115
- }
116
101
 
117
- &--flat:hover,
118
- &--filled:hover {
119
- &::before {
120
- border-color: var(--my-bottom-hover-color);
102
+ &--flat {
103
+ padding-right: 0;
104
+ padding-left: 0;
121
105
  }
122
- }
123
106
 
124
- &--flat:hover {
125
- &::before {
126
- height: 2px;
127
- border-bottom-width: 2px;
128
- }
129
- }
107
+ &--filled {
108
+ background-color: var(--my-fill-color);
109
+ border-top-left-radius: var(--control-field-radius);
110
+ border-top-right-radius: var(--control-field-radius);
111
+ transition: background-color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
130
112
 
131
- &--flat#{&}--disabled,
132
- &--filled#{&}--disabled {
133
- &::before {
134
- border-bottom-style: dotted;
113
+ &:hover:not(:focus-within) {
114
+ background-color: var(--my-fill-hover-color);
115
+ }
135
116
  }
136
- }
137
-
138
- &--outlined {
139
- // border: solid 1px var(--my-outline-color);
140
- border-radius: var(--control-field-radius);
141
- transition: box-shadow 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
142
117
 
143
- &::before {
144
- top: 0;
145
- height: auto;
146
- background: transparent;
147
- border: solid 1px var(--my-outline-color);
148
- border-radius: inherit;
118
+ &--flat:hover,
119
+ &--filled:hover {
120
+ &::before {
121
+ border-color: var(--my-bottom-hover-color);
122
+ }
149
123
  }
150
124
 
151
- &:hover::before {
152
- border-color: var(--my-outline-hover-color);
125
+ &--flat:hover {
126
+ &::before {
127
+ height: 2px;
128
+ border-bottom-width: 2px;
129
+ }
153
130
  }
154
131
 
155
- &::after {
156
- content: none;
132
+ &--flat#{&}--disabled,
133
+ &--filled#{&}--disabled {
134
+ &::before {
135
+ border-bottom-style: dotted;
136
+ }
157
137
  }
158
138
 
159
- &:focus-within {
160
- box-shadow: 0 0 1px var(--shadow-color),
161
- 0 0 2px 2px var(--focusShadow-color);
162
- // border-color: var(--my-focused-color);
139
+ &--outlined {
140
+ // border: solid 1px var(--my-outline-color);
141
+ border-radius: var(--control-field-radius);
142
+ transition: box-shadow 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
143
+
144
+ &::before {
145
+ top: 0;
146
+ height: auto;
147
+ background: transparent;
148
+ border: solid 1px var(--my-outline-color);
149
+ border-radius: inherit;
150
+ }
151
+
152
+ &:hover::before {
153
+ border-color: var(--my-outline-hover-color);
154
+ }
155
+
156
+ &::after {
157
+ content: none;
158
+ }
159
+
160
+ &:focus-within {
161
+ box-shadow: 0 0 1px var(--shadow-color),
162
+ 0 0 2px 2px var(--focusShadow-color);
163
+ // border-color: var(--my-focused-color);
164
+ }
163
165
  }
164
- }
165
166
 
166
- &__adornment {
167
- // pointer-events: none;
167
+ &__adornment {
168
+ // pointer-events: none;
168
169
 
169
- $my-offset: 0.25em;
170
+ $my-offset: 0.25em;
170
171
 
171
- &--start {
172
- padding-right: $my-offset;
173
- }
172
+ &--start {
173
+ padding-right: $my-offset;
174
+ }
174
175
 
175
- &--end {
176
- padding-left: $my-offset;
177
- }
176
+ &--end {
177
+ padding-left: $my-offset;
178
+ }
178
179
 
179
- .v-icon {
180
- font-size: 1.2em;
180
+ .v-icon {
181
+ font-size: 1.2em;
182
+ }
181
183
  }
182
184
  }
183
185
  }
@@ -1,14 +1,14 @@
1
1
  import './VControlField.scss';
2
2
  import { computed, PropType, ref, defineComponent, VNodeChild } from 'vue';
3
+ import { useParentFormNode } from '@fastkit/vue-form-control';
3
4
  import {
4
- useParentFormNode,
5
5
  VNodeChildOrSlot,
6
6
  resolveVNodeChildOrSlots,
7
7
  TypedSlot,
8
8
  createPropsOptions,
9
9
  defineSlotsProps,
10
10
  renderSlotOrEmpty,
11
- } from '@fastkit/vue-kit';
11
+ } from '@fastkit/vue-utils';
12
12
  import {
13
13
  createControlProps,
14
14
  useControl,
@@ -21,7 +21,7 @@ import { CONTROL_LOADING_SPINNER_SIZES } from '../../schemes';
21
21
 
22
22
  const ADORNMENT_POSITIONS = ['start', 'end'] as const;
23
23
 
24
- export type AdornmentPosition = typeof ADORNMENT_POSITIONS[number];
24
+ export type AdornmentPosition = (typeof ADORNMENT_POSITIONS)[number];
25
25
 
26
26
  export function createControlFieldProps() {
27
27
  return {