@fastkit/vui 0.6.38 → 0.6.42

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 (188) hide show
  1. package/dist/tool/index.js +3 -0
  2. package/dist/tool/vite-plugin.d.ts.map +1 -1
  3. package/dist/vui.cjs.js +180 -5
  4. package/dist/vui.cjs.prod.js +180 -5
  5. package/dist/vui.css +24 -14
  6. package/dist/vui.d.ts +3294 -876
  7. package/dist/vui.esm-bundler.js +180 -7
  8. package/dist/vui.min.css +1 -1
  9. package/dist/vui.min.css.map +1 -1
  10. package/package.json +8 -7
  11. package/src/.DS_Store +0 -0
  12. package/src/assets/.DS_Store +0 -0
  13. package/src/assets/builtins/color-scheme.ts +9 -0
  14. package/src/assets/builtins/media-match.ts +3 -0
  15. package/src/components/.DS_Store +0 -0
  16. package/src/components/VAccordion/VAccordion.scss +2 -0
  17. package/src/components/VAccordion/VAccordion.tsx +5 -0
  18. package/src/components/VAccordion/index.ts +1 -0
  19. package/src/components/VApp/VApp.tsx +17 -0
  20. package/src/components/VApp/index.ts +1 -0
  21. package/src/components/VBreadcrumbs/VBreadcrumbs.scss +61 -0
  22. package/src/components/VBreadcrumbs/VBreadcrumbs.tsx +137 -0
  23. package/src/components/VBreadcrumbs/index.ts +1 -0
  24. package/src/components/VButton/.DS_Store +0 -0
  25. package/src/components/VButton/VButton.scss +137 -0
  26. package/src/components/VButton/VButton.tsx +148 -0
  27. package/src/components/VButton/VButtonGroup.scss +23 -0
  28. package/src/components/VButton/VButtonGroup.tsx +81 -0
  29. package/src/components/VButton/index.ts +2 -0
  30. package/src/components/VCard/VCard.scss +3 -0
  31. package/src/components/VCard/VCard.tsx +20 -0
  32. package/src/components/VCard/VCardActions.scss +10 -0
  33. package/src/components/VCard/VCardActions.tsx +16 -0
  34. package/src/components/VCard/VCardContent.scss +3 -0
  35. package/src/components/VCard/VCardContent.tsx +16 -0
  36. package/src/components/VCard/index.ts +3 -0
  37. package/src/components/VCheckable/VCheckable.scss +103 -0
  38. package/src/components/VCheckable/VCheckable.tsx +60 -0
  39. package/src/components/VCheckable/index.ts +1 -0
  40. package/src/components/VCheckbox/VCheckbox.scss +56 -0
  41. package/src/components/VCheckbox/VCheckbox.tsx +63 -0
  42. package/src/components/VCheckbox/index.ts +1 -0
  43. package/src/components/VCheckboxGroup/.DS_Store +0 -0
  44. package/src/components/VCheckboxGroup/VCheckboxGroup.tsx +11 -0
  45. package/src/components/VCheckboxGroup/index.ts +1 -0
  46. package/src/components/VContentSwitcher/VContentSwitcher.scss +73 -0
  47. package/src/components/VContentSwitcher/VContentSwitcher.tsx +156 -0
  48. package/src/components/VContentSwitcher/index.ts +1 -0
  49. package/src/components/VControlField/VControlField.scss +183 -0
  50. package/src/components/VControlField/VControlField.tsx +152 -0
  51. package/src/components/VControlField/index.ts +1 -0
  52. package/src/components/VDataTable/VDataTable.scss +230 -0
  53. package/src/components/VDataTable/VDataTable.tsx +761 -0
  54. package/src/components/VDataTable/index.ts +1 -0
  55. package/src/components/VDrawerLayout/VDrawerLayout.scss +26 -0
  56. package/src/components/VDrawerLayout/VDrawerLayout.tsx +35 -0
  57. package/src/components/VDrawerLayout/index.ts +1 -0
  58. package/src/components/VForm/VForm.tsx +77 -0
  59. package/src/components/VForm/index.ts +1 -0
  60. package/src/components/VFormControl/VFormControl.scss +59 -0
  61. package/src/components/VFormControl/VFormControl.tsx +85 -0
  62. package/src/components/VFormControl/index.ts +1 -0
  63. package/src/components/VGrid/VGridContainer.scss +4 -0
  64. package/src/components/VGrid/VGridContainer.tsx +191 -0
  65. package/src/components/VGrid/VGridItem.scss +3 -0
  66. package/src/components/VGrid/VGridItem.tsx +114 -0
  67. package/src/components/VGrid/index.ts +2 -0
  68. package/src/components/VGrid/schemes.ts +28 -0
  69. package/src/components/VHero/.DS_Store +0 -0
  70. package/src/components/VHero/VHero.scss +26 -0
  71. package/src/components/VHero/VHero.tsx +52 -0
  72. package/src/components/VHero/index.ts +1 -0
  73. package/src/components/VIcon/VIcon.scss +22 -0
  74. package/src/components/VIcon/VIcon.tsx +110 -0
  75. package/src/components/VIcon/index.ts +1 -0
  76. package/src/components/VListTile/VListTile.scss +71 -0
  77. package/src/components/VListTile/VListTile.tsx +121 -0
  78. package/src/components/VListTile/index.ts +1 -0
  79. package/src/components/VNavigation/VNavigation.scss +12 -0
  80. package/src/components/VNavigation/VNavigation.tsx +79 -0
  81. package/src/components/VNavigation/VNavigationItem.scss +14 -0
  82. package/src/components/VNavigation/VNavigationItem.tsx +252 -0
  83. package/src/components/VNavigation/index.ts +2 -0
  84. package/src/components/VOption/VOption.scss +61 -0
  85. package/src/components/VOption/VOption.tsx +52 -0
  86. package/src/components/VOption/index.ts +1 -0
  87. package/src/components/VOptionGroup/VOptionGroup.scss +3 -0
  88. package/src/components/VOptionGroup/VOptionGroup.tsx +55 -0
  89. package/src/components/VOptionGroup/index.ts +1 -0
  90. package/src/components/VPagination/VPagination.scss +100 -0
  91. package/src/components/VPagination/VPagination.tsx +346 -0
  92. package/src/components/VPagination/index.ts +1 -0
  93. package/src/components/VPaper/VPaper.scss +37 -0
  94. package/src/components/VPaper/VPaper.tsx +78 -0
  95. package/src/components/VPaper/index.ts +1 -0
  96. package/src/components/VRadio/.DS_Store +0 -0
  97. package/src/components/VRadio/VRadio.scss +66 -0
  98. package/src/components/VRadio/VRadio.tsx +56 -0
  99. package/src/components/VRadio/index.ts +1 -0
  100. package/src/components/VRadioGroup/.DS_Store +0 -0
  101. package/src/components/VRadioGroup/VRadioGroup.tsx +10 -0
  102. package/src/components/VRadioGroup/index.ts +1 -0
  103. package/src/components/VSelect/VSelect.scss +78 -0
  104. package/src/components/VSelect/VSelect.tsx +204 -0
  105. package/src/components/VSelect/index.ts +1 -0
  106. package/src/components/VSwitch/VSwitch.scss +125 -0
  107. package/src/components/VSwitch/VSwitch.tsx +66 -0
  108. package/src/components/VSwitch/index.ts +1 -0
  109. package/src/components/VSwitchGroup/.DS_Store +0 -0
  110. package/src/components/VSwitchGroup/VSwitchGroup.tsx +11 -0
  111. package/src/components/VSwitchGroup/index.ts +1 -0
  112. package/src/components/VTabs/.DS_Store +0 -0
  113. package/src/components/VTabs/VTab.scss +73 -0
  114. package/src/components/VTabs/VTab.tsx +88 -0
  115. package/src/components/VTabs/VTabs.scss +49 -0
  116. package/src/components/VTabs/VTabs.tsx +315 -0
  117. package/src/components/VTabs/index.ts +1 -0
  118. package/src/components/VTextCounter/VTextCounter.scss +3 -0
  119. package/src/components/VTextCounter/VTextCounter.tsx +21 -0
  120. package/src/components/VTextCounter/index.ts +1 -0
  121. package/src/components/VTextField/VTextField.scss +45 -0
  122. package/src/components/VTextField/VTextField.tsx +96 -0
  123. package/src/components/VTextField/index.ts +1 -0
  124. package/src/components/VTextarea/VTextarea.scss +41 -0
  125. package/src/components/VTextarea/VTextarea.tsx +93 -0
  126. package/src/components/VTextarea/index.ts +1 -0
  127. package/src/components/VToolbar/.DS_Store +0 -0
  128. package/src/components/VToolbar/VToolbar.scss +26 -0
  129. package/src/components/VToolbar/VToolbar.tsx +44 -0
  130. package/src/components/VToolbar/VToolbarEdge.scss +27 -0
  131. package/src/components/VToolbar/VToolbarEdge.tsx +35 -0
  132. package/src/components/VToolbar/VToolbarMenu.scss +7 -0
  133. package/src/components/VToolbar/VToolbarMenu.tsx +26 -0
  134. package/src/components/VToolbar/VToolbarTitle.scss +22 -0
  135. package/src/components/VToolbar/VToolbarTitle.tsx +25 -0
  136. package/src/components/VToolbar/index.ts +4 -0
  137. package/src/components/VWysiwygEditor/.DS_Store +0 -0
  138. package/src/components/VWysiwygEditor/VWysiwygEditor.scss +60 -0
  139. package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +293 -0
  140. package/src/components/VWysiwygEditor/index.ts +2 -0
  141. package/src/components/VWysiwygEditor/schemes.ts +65 -0
  142. package/src/components/VWysiwygEditor/tools/bullet-list.ts +18 -0
  143. package/src/components/VWysiwygEditor/tools/format-bold.ts +19 -0
  144. package/src/components/VWysiwygEditor/tools/format-italic.ts +18 -0
  145. package/src/components/VWysiwygEditor/tools/format-underline.ts +18 -0
  146. package/src/components/VWysiwygEditor/tools/history.ts +26 -0
  147. package/src/components/VWysiwygEditor/tools/index.ts +8 -0
  148. package/src/components/VWysiwygEditor/tools/link.ts +57 -0
  149. package/src/components/VWysiwygEditor/tools/ordered-list.ts +21 -0
  150. package/src/components/VWysiwygEditor/tools/text-color.ts +14 -0
  151. package/src/components/index.ts +32 -0
  152. package/src/components/kits.ts +1 -0
  153. package/src/components/loading.ts +1 -0
  154. package/src/composables/.DS_Store +0 -0
  155. package/src/composables/control.ts +118 -0
  156. package/src/composables/elevation.ts +34 -0
  157. package/src/composables/form-selector.scss +11 -0
  158. package/src/composables/form-selector.tsx +101 -0
  159. package/src/composables/index.ts +4 -0
  160. package/src/composables/vui.ts +9 -0
  161. package/src/index.ts +10 -0
  162. package/src/injections.ts +61 -0
  163. package/src/logger.ts +7 -0
  164. package/src/plugin.tsx +76 -0
  165. package/src/schemes/control.ts +7 -0
  166. package/src/schemes/elevation.ts +26 -0
  167. package/src/schemes/index.ts +2 -0
  168. package/src/service.tsx +242 -0
  169. package/src/styles/.DS_Store +0 -0
  170. package/src/styles/after-effects/display-flow.scss +346 -0
  171. package/src/styles/after-effects/spacing.scss +155 -0
  172. package/src/styles/after-effects/text.scss +90 -0
  173. package/src/styles/after-effects.scss +3 -0
  174. package/src/styles/base.scss +14 -0
  175. package/src/styles/control.scss +11 -0
  176. package/src/styles/core/functions.scss +62 -0
  177. package/src/styles/core/typo.scss +56 -0
  178. package/src/styles/core.scss +2 -0
  179. package/src/styles/elevation.scss +9 -0
  180. package/src/styles/group.scss +57 -0
  181. package/src/styles/index.scss +9 -0
  182. package/src/styles/transition.scss +11 -0
  183. package/src/styles/typo.scss +11 -0
  184. package/src/styles/variables.scss +320 -0
  185. package/src/styles/wysiwyg.scss +24 -0
  186. package/src/tool/.DS_Store +0 -0
  187. package/src/tool/index.ts +2 -0
  188. package/src/tool/vite-plugin.ts +281 -0
@@ -0,0 +1,252 @@
1
+ import './VNavigationItem.scss';
2
+ import {
3
+ defineComponent,
4
+ computed,
5
+ VNodeChild,
6
+ PropType,
7
+ VNodeProps,
8
+ Fragment,
9
+ ref,
10
+ watch,
11
+ } from 'vue';
12
+ import { createListTileProps, listTileEmits, VListTile } from '../VListTile';
13
+ import {
14
+ ExtractPropInput,
15
+ renderSlotOrEmpty,
16
+ VExpandTransition,
17
+ } from '@fastkit/vue-utils';
18
+ import { useVui } from '../../injections';
19
+ import { useRoute } from 'vue-router';
20
+
21
+ export function createNavigationItemProps() {
22
+ return {
23
+ ...createListTileProps(),
24
+ match: String,
25
+ // key: {
26
+ // type: [String, Number],
27
+ // required: true,
28
+ // },
29
+ };
30
+ }
31
+
32
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
33
+ export interface NavigationItemInput
34
+ extends ExtractPropInput<ReturnType<typeof createNavigationItemProps>> {
35
+ key: string | number;
36
+ label: VNodeChild | (() => VNodeChild);
37
+ children?: NavigationItemInput[];
38
+ }
39
+
40
+ export function resolveNavigationItemInput(input: NavigationItemInput) {
41
+ let label = input.label;
42
+ const props: NavigationItemInput = {
43
+ ...input,
44
+ };
45
+ if (typeof label === 'function') {
46
+ label = label();
47
+ }
48
+ delete (props as NavigationItemInput).label;
49
+
50
+ return {
51
+ label,
52
+ props,
53
+ };
54
+ }
55
+
56
+ export function renderNavigationItemInput(
57
+ input: NavigationItemInput,
58
+ extraProps?: Record<string, unknown> & VNodeProps,
59
+ ) {
60
+ const { label, props } = resolveNavigationItemInput(input);
61
+ return (
62
+ <VNavigationItem {...{ ...props, ...(extraProps as any) }}>
63
+ {label}
64
+ </VNavigationItem>
65
+ );
66
+ }
67
+
68
+ export const VNavigationItem = defineComponent({
69
+ name: 'VNavigationItem',
70
+ inheritAttrs: false,
71
+ props: {
72
+ ...createNavigationItemProps(),
73
+ children: Array as PropType<NavigationItemInput[]>,
74
+ },
75
+ emits: {
76
+ ...listTileEmits,
77
+ },
78
+ setup(props, ctx) {
79
+ const vui = useVui();
80
+ const opened = ref(false);
81
+
82
+ const children = computed(() => {
83
+ const c = props.children;
84
+ return c && c.length ? c : undefined;
85
+ });
86
+
87
+ const to = computed(() => ctx.attrs.to);
88
+
89
+ const match = computed(() => {
90
+ const { match } = props;
91
+ const { to } = ctx.attrs;
92
+ if (match) return match;
93
+ if (!to) return;
94
+ if (typeof to === 'string') return to;
95
+ return (to as any).path as string | undefined;
96
+ });
97
+
98
+ const classes = computed(() => [
99
+ {
100
+ 'v-navigation-item--opened': opened.value,
101
+ },
102
+ ]);
103
+
104
+ const route = useRoute();
105
+
106
+ // const classes = computed(() => [
107
+ // // {
108
+ // // 'v-navigation-item--matched': matched.value,
109
+ // // },
110
+ // ]);
111
+
112
+ watch(
113
+ () => route.path,
114
+ (newPath) => {
115
+ const c = children.value;
116
+ const m = match.value;
117
+
118
+ if (!c || !m) {
119
+ // matched.value = false;
120
+ return;
121
+ }
122
+
123
+ if (newPath.match(m)) {
124
+ open();
125
+ // matched.value = true;
126
+ } else {
127
+ close();
128
+ // matched.value = false;
129
+ }
130
+ },
131
+ { immediate: true },
132
+ );
133
+
134
+ // const iconPayload = () => opened.value;
135
+
136
+ const _props = computed(() => {
137
+ const c = children.value;
138
+ let { endIcon } = props;
139
+ if (c && !endIcon) {
140
+ endIcon = vui.icon('navigationExpand');
141
+ if (typeof endIcon === 'string') {
142
+ const name = endIcon;
143
+ endIcon = (gen) => {
144
+ return gen({
145
+ name,
146
+ rotate: opened.value ? 180 : 0,
147
+ });
148
+ };
149
+ }
150
+ }
151
+
152
+ const __props: any = {
153
+ ...props,
154
+ endIcon,
155
+ };
156
+
157
+ delete __props.children;
158
+
159
+ // const _activeClass = props.activeClass;
160
+ // const activeClass = `v-navigation-item--active${
161
+ // _activeClass ? ` ${_activeClass}` : ''
162
+ // }`;
163
+
164
+ return {
165
+ ...__props,
166
+ // activeClass,
167
+ // startIcon: toRawIconProp(__props.startIcon, iconPayload),
168
+ // endIcon: toRawIconProp(__props.endIcon, iconPayload),
169
+ };
170
+ });
171
+
172
+ function open() {
173
+ if (!children.value) return;
174
+ opened.value = true;
175
+ }
176
+
177
+ function close() {
178
+ opened.value = false;
179
+ }
180
+
181
+ function toggle() {
182
+ return opened.value ? close() : open();
183
+ }
184
+
185
+ const onClick = (ev: MouseEvent) => {
186
+ if (!to.value) {
187
+ return toggle();
188
+ }
189
+ open();
190
+ // if (!to.value) {
191
+ // toggle();
192
+ // }
193
+ // ctx.emit('click', ev);
194
+ };
195
+
196
+ const onChangeActive = (isActive: boolean) => {
197
+ // if (isActive) {
198
+ // // open();
199
+ // // if (typeof window !== 'undefined') {
200
+ // // // open();
201
+ // // // console.log('hoge', window);
202
+ // // setTimeout(() => {
203
+ // // open();
204
+ // // }, 1000);
205
+ // // }
206
+ // // open();
207
+ // // console.log(props);
208
+ // // setTimeout(() => {
209
+ // // open();
210
+ // // }, 500);
211
+ // }
212
+ ctx.emit('changeActive', isActive);
213
+ };
214
+
215
+ ctx.expose({
216
+ close,
217
+ });
218
+
219
+ return () => {
220
+ const _children = children.value;
221
+ const fallbackTag = _children ? 'button' : undefined;
222
+
223
+ return (
224
+ <Fragment>
225
+ <VListTile
226
+ {...ctx.attrs}
227
+ {..._props.value}
228
+ fallbackTag={fallbackTag}
229
+ endIcon={_props.value.endIcon}
230
+ class={['v-navigation-item', classes.value]}
231
+ onClick={onClick}
232
+ onChangeActive={onChangeActive}>
233
+ {renderSlotOrEmpty(ctx.slots, 'default')}
234
+ </VListTile>
235
+ {_children && (
236
+ <VExpandTransition>
237
+ <div class="v-navigation-item__expand" v-show={opened.value}>
238
+ {_children.map((child) =>
239
+ renderNavigationItemInput(child, {
240
+ startIconEmptySpace: _props.value.startIconEmptySpace,
241
+ // onClick,
242
+ // onChangeActive,
243
+ }),
244
+ )}
245
+ </div>
246
+ </VExpandTransition>
247
+ )}
248
+ </Fragment>
249
+ );
250
+ };
251
+ },
252
+ });
@@ -0,0 +1,2 @@
1
+ export * from './VNavigationItem';
2
+ export * from './VNavigation';
@@ -0,0 +1,61 @@
1
+ @use '../../styles/core.scss';
2
+
3
+ .v-option {
4
+ position: relative;
5
+ display: flex;
6
+ width: 100%;
7
+ padding: 0.375em 1em;
8
+ cursor: pointer;
9
+ user-select: none;
10
+
11
+ input {
12
+ @include core.hidden-input-element;
13
+ }
14
+
15
+ &::before,
16
+ &::after {
17
+ position: absolute;
18
+ top: 0;
19
+ right: 0;
20
+ bottom: 0;
21
+ left: 0;
22
+ display: block;
23
+ pointer-events: none;
24
+ content: '';
25
+ opacity: 0;
26
+ transition: opacity 0.2s;
27
+ }
28
+
29
+ &::before {
30
+ background: currentColor;
31
+ }
32
+
33
+ &::after {
34
+ background: var(--palette-primary);
35
+ }
36
+
37
+ &:hover,
38
+ &:focus-within {
39
+ &::before {
40
+ opacity: 0.12;
41
+ }
42
+ }
43
+
44
+ &__label {
45
+ position: relative;
46
+ display: block;
47
+ }
48
+
49
+ &--selected::after {
50
+ opacity: 0.12;
51
+ }
52
+
53
+ &--selected &__label {
54
+ font-weight: 500;
55
+ color: var(--palette-primary);
56
+ }
57
+
58
+ &--has-not-value &__label {
59
+ font-style: italic;
60
+ }
61
+ }
@@ -0,0 +1,52 @@
1
+ import './VOption.scss';
2
+ import { defineComponent, computed } from 'vue';
3
+ import {
4
+ createFormSelectorItemSettings,
5
+ useFormSelectorItemControl,
6
+ renderSlotOrEmpty,
7
+ } from '@fastkit/vue-kit';
8
+ import { createControlProps, useControl } from '../../composables';
9
+ import { VUI_SELECT_SYMBOL, VUI_OPTION_SYMBOL } from '../../injections';
10
+
11
+ const { props, emits } = createFormSelectorItemSettings();
12
+
13
+ export const VOption = defineComponent({
14
+ name: 'VOption',
15
+ props: {
16
+ ...props,
17
+ ...createControlProps(),
18
+ },
19
+ emits,
20
+ setup(props, ctx) {
21
+ const nodeControl = useFormSelectorItemControl(props, ctx, {
22
+ nodeType: VUI_OPTION_SYMBOL,
23
+ parentNodeType: VUI_SELECT_SYMBOL,
24
+ });
25
+ const control = useControl(props);
26
+ const classes = computed(() => {
27
+ return [
28
+ 'v-option',
29
+ {
30
+ 'v-option--selected': nodeControl.selected,
31
+ 'v-option--has-not-value': !nodeControl.hasValue,
32
+ 'v-option--disabled': nodeControl.isDisabled,
33
+ },
34
+ control.classes.value,
35
+ ];
36
+ });
37
+ return {
38
+ ...nodeControl.expose(),
39
+ classes,
40
+ };
41
+ },
42
+ render() {
43
+ const { selectorItemControl, classes } = this;
44
+ return (
45
+ <label class={classes} onClick={selectorItemControl.handleClickElement}>
46
+ <span class="v-option__label">
47
+ {renderSlotOrEmpty(this.$slots, 'default')}
48
+ </span>
49
+ </label>
50
+ );
51
+ },
52
+ });
@@ -0,0 +1 @@
1
+ export * from './VOption';
@@ -0,0 +1,3 @@
1
+ .v-option-group {
2
+ display: block;
3
+ }
@@ -0,0 +1,55 @@
1
+ import './VOptionGroup.scss';
2
+ import { computed, PropType, defineComponent } from 'vue';
3
+ import {
4
+ createFormSelectorItemGroupProps,
5
+ useFormSelectorItemGroupControl,
6
+ FormSelectorItemGroupControl,
7
+ defineSlotsProps,
8
+ VNodeChildOrSlot,
9
+ resolveVNodeChildOrSlots,
10
+ renderSlotOrEmpty,
11
+ } from '@fastkit/vue-kit';
12
+ import { VUI_SELECT_SYMBOL } from '../../injections';
13
+
14
+ export const VOptionGroup = defineComponent({
15
+ name: 'VOptionGroup',
16
+ props: {
17
+ ...createFormSelectorItemGroupProps(),
18
+ // eslint-disable-next-line vue/require-prop-types
19
+ label: {} as PropType<VNodeChildOrSlot<FormSelectorItemGroupControl>>,
20
+ ...defineSlotsProps<{
21
+ label: FormSelectorItemGroupControl;
22
+ }>(),
23
+ },
24
+ setup(props, ctx) {
25
+ const groupControl = useFormSelectorItemGroupControl(props, ctx, {
26
+ parentNodeType: VUI_SELECT_SYMBOL,
27
+ });
28
+ const labelSlot = computed(() => {
29
+ return resolveVNodeChildOrSlots(props.label, ctx.slots.label);
30
+ });
31
+ const classes = computed(() => {
32
+ return [
33
+ 'v-option-group',
34
+ {
35
+ 'v-option-group--disabled': groupControl.isDisabled,
36
+ },
37
+ ];
38
+ });
39
+ return {
40
+ ...groupControl.expose(),
41
+ classes,
42
+ labelSlot,
43
+ };
44
+ },
45
+ render() {
46
+ const { labelSlot, classes, groupControl } = this;
47
+ const label = labelSlot ? labelSlot(groupControl) : undefined;
48
+ return (
49
+ <div class={classes}>
50
+ {!!label && <div class="v-option-group__label">{label}</div>}
51
+ {renderSlotOrEmpty(this.$slots, 'default')}
52
+ </div>
53
+ );
54
+ },
55
+ });
@@ -0,0 +1 @@
1
+ export * from './VOptionGroup';
@@ -0,0 +1,100 @@
1
+ @use '../../styles/core.scss';
2
+
3
+ .v-pagination {
4
+ --pagination-size: var(--pagination-item-size);
5
+ --pagination-margin: var(--pagination-item-margin);
6
+ --pagination-font-size: var(--pagination-item-font-size);
7
+ --pagination-radius: var(--pagination-item-radius);
8
+
9
+ &::before {
10
+ width: var(--pagination-size);
11
+ margin: var(--pagination-margin);
12
+ content: none;
13
+ }
14
+
15
+ display: flex;
16
+ align-items: center;
17
+ overflow: hidden;
18
+ font-weight: bold;
19
+ line-height: 1;
20
+
21
+ &--left {
22
+ justify-content: flex-start;
23
+ }
24
+
25
+ &--center {
26
+ justify-content: center;
27
+ }
28
+
29
+ &--right {
30
+ justify-content: flex-end;
31
+ }
32
+
33
+ &__item,
34
+ a#{&}__item {
35
+ @include core.button-reset;
36
+
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ min-width: var(--pagination-size);
41
+ height: var(--pagination-size);
42
+ margin: calc(var(--pagination-margin) * 0.5);
43
+ font-size: var(--pagination-font-size);
44
+ color: inherit;
45
+ border-radius: var(--pagination-radius);
46
+ transition: 0.1s;
47
+
48
+ &:hover,
49
+ &:focus {
50
+ background: rgba(0, 0, 0, 0.1);
51
+ }
52
+
53
+ &--active {
54
+ &,
55
+ &:hover,
56
+ &:focus,
57
+ &:active {
58
+ color: var(--text-color);
59
+ pointer-events: none;
60
+ background-color: var(--main-color);
61
+ }
62
+ }
63
+
64
+ &--disabled {
65
+ color: var(--palette-muted) !important;
66
+ pointer-events: none !important;
67
+ background: transparent !important;
68
+ }
69
+
70
+ &--truncate {
71
+ color: var(--palette-muted) !important;
72
+ pointer-events: none !important;
73
+ background: transparent !important;
74
+ }
75
+
76
+ .v-icon {
77
+ font-size: 125%;
78
+ }
79
+ }
80
+
81
+ &--dense &__item {
82
+ --pagination-size: var(--pagination-item-size-dense);
83
+ --pagination-margin: var(--pagination-item-margin-dense);
84
+ --pagination-font-size: var(--pagination-item-font-size-dense);
85
+ }
86
+
87
+ &--disabled &__item {
88
+ color: var(--palette-muted);
89
+ pointer-events: none;
90
+
91
+ &:hover,
92
+ &:focus {
93
+ background: transparent;
94
+ }
95
+
96
+ &--active {
97
+ background: var(--palette-muted);
98
+ }
99
+ }
100
+ }