@fastkit/vui 0.13.6 → 0.14.0

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 (40) hide show
  1. package/dist/vui.css +42 -13
  2. package/dist/vui.d.ts +1658 -4327
  3. package/dist/vui.mjs +117 -109
  4. package/dist/vui.mjs.map +1 -1
  5. package/package.json +22 -22
  6. package/src/components/VAvatar/VAvatar.tsx +1 -2
  7. package/src/components/VBreadcrumbs/VBreadcrumbs.tsx +0 -1
  8. package/src/components/VBusyImage/VBusyImage.tsx +8 -5
  9. package/src/components/VButton/VButton.tsx +2 -9
  10. package/src/components/VCard/VCardActions.tsx +2 -7
  11. package/src/components/VCard/VCardContent.tsx +2 -7
  12. package/src/components/VCheckable/VCheckable.tsx +14 -15
  13. package/src/components/VCheckbox/VCheckbox.tsx +1 -2
  14. package/src/components/VChip/VChip.tsx +1 -2
  15. package/src/components/VContentSwitcher/VContentSwitcher.tsx +1 -2
  16. package/src/components/VControlField/VControlField.tsx +13 -13
  17. package/src/components/VDrawerLayout/VDrawerLayout.tsx +2 -1
  18. package/src/components/VForm/VForm.tsx +9 -6
  19. package/src/components/VFormControl/VFormControl.tsx +10 -7
  20. package/src/components/VGrid/VGridContainer.tsx +0 -2
  21. package/src/components/VGrid/VGridItem.tsx +0 -3
  22. package/src/components/VHero/VHero.tsx +9 -15
  23. package/src/components/VListTile/VListTile.tsx +2 -4
  24. package/src/components/VNavigation/VNavigationItem.tsx +2 -2
  25. package/src/components/VOption/VOption.tsx +1 -4
  26. package/src/components/VOptionGroup/VOptionGroup.tsx +9 -6
  27. package/src/components/VPaper/VPaper.tsx +10 -12
  28. package/src/components/VRadio/VRadio.tsx +1 -2
  29. package/src/components/VSelect/VSelect.tsx +14 -8
  30. package/src/components/VSkeltonLoader/VSkeltonLoaderBone.tsx +1 -2
  31. package/src/components/VSwitch/VSwitch.tsx +1 -2
  32. package/src/components/VTabs/VTab.tsx +1 -2
  33. package/src/components/VTabs/VTabs.tsx +8 -6
  34. package/src/components/VTextField/VTextField.tsx +5 -3
  35. package/src/components/VTextarea/VTextarea.tsx +4 -2
  36. package/src/components/VToolbar/VToolbar.tsx +1 -4
  37. package/src/components/VToolbar/VToolbarMenu.tsx +1 -2
  38. package/src/components/VToolbar/VToolbarTitle.tsx +8 -6
  39. package/src/composables/form-selector.tsx +10 -4
  40. package/src/plugin.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/vui",
3
- "version": "0.13.6",
3
+ "version": "0.14.0",
4
4
  "description": "A simple, extensible UI kit for Vue applications.",
5
5
  "keywords": [
6
6
  "fastkit",
@@ -44,35 +44,35 @@
44
44
  "src"
45
45
  ],
46
46
  "dependencies": {
47
- "@fastkit/color-scheme": "1.0.5",
48
- "@fastkit/color-scheme-gen": "0.13.5",
47
+ "@fastkit/color-scheme": "1.0.6",
48
+ "@fastkit/color-scheme-gen": "0.13.6",
49
49
  "@fastkit/dom": "0.1.1",
50
50
  "@fastkit/helpers": "0.13.1",
51
- "@fastkit/icon-font": "1.0.4",
52
- "@fastkit/media-match": "1.0.4",
53
- "@fastkit/media-match-gen": "0.13.5",
51
+ "@fastkit/icon-font": "1.0.5",
52
+ "@fastkit/media-match": "1.0.5",
53
+ "@fastkit/media-match-gen": "0.13.6",
54
54
  "@fastkit/rules": "0.13.1",
55
55
  "@fastkit/stylebase": "0.13.0",
56
56
  "@fastkit/tiny-logger": "0.13.1",
57
- "@fastkit/vue-action": "0.1.1",
58
- "@fastkit/vue-app-layout": "0.13.3",
59
- "@fastkit/vue-body-scroll-lock": "0.1.1",
60
- "@fastkit/vue-click-outside": "0.1.1",
61
- "@fastkit/vue-color-scheme": "0.13.5",
62
- "@fastkit/vue-form-control": "0.13.1",
57
+ "@fastkit/vue-action": "0.2.0",
58
+ "@fastkit/vue-app-layout": "0.14.0",
59
+ "@fastkit/vue-body-scroll-lock": "0.1.2",
60
+ "@fastkit/vue-click-outside": "0.1.2",
61
+ "@fastkit/vue-color-scheme": "0.13.6",
62
+ "@fastkit/vue-form-control": "0.14.0",
63
63
  "@fastkit/vue-keyboard": "0.1.1",
64
- "@fastkit/vue-loading": "0.13.6",
65
- "@fastkit/vue-location": "0.1.1",
66
- "@fastkit/vue-media-match": "0.13.5",
67
- "@fastkit/vue-resize": "0.1.1",
68
- "@fastkit/vue-scroller": "0.13.1",
69
- "@fastkit/vue-stack": "0.13.5",
70
- "@fastkit/vue-transitions": "0.1.1",
71
- "@fastkit/vue-utils": "0.13.1"
64
+ "@fastkit/vue-loading": "0.14.0",
65
+ "@fastkit/vue-location": "0.1.2",
66
+ "@fastkit/vue-media-match": "0.13.6",
67
+ "@fastkit/vue-resize": "0.1.2",
68
+ "@fastkit/vue-scroller": "0.14.0",
69
+ "@fastkit/vue-stack": "0.14.0",
70
+ "@fastkit/vue-transitions": "0.1.2",
71
+ "@fastkit/vue-utils": "0.14.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "vue": "^3.2.0",
75
- "vue-router": "^4.1.0"
74
+ "vue": "^3.3.0",
75
+ "vue-router": "^4.2.0"
76
76
  },
77
77
  "buildOptions": {
78
78
  "name": "Vui"
@@ -1,6 +1,5 @@
1
1
  import './VAvatar.scss';
2
2
  import { defineComponent, computed, PropType } from 'vue';
3
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
3
  import { actionableInheritProps, useActionable } from '@fastkit/vue-action';
5
4
  import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
6
5
  import { useVui } from '../../injections';
@@ -75,7 +74,7 @@ export const VAvatar = defineComponent({
75
74
  class={['v-avatar', classes.value, color.colorClasses.value]}
76
75
  style={styles.value}>
77
76
  {(!!src && <VBusyImage class="v-avatar__image" src={src} cover />) ||
78
- renderSlotOrEmpty(ctx.slots)}
77
+ ctx.slots.default?.()}
79
78
  </Tag>
80
79
  );
81
80
  };
@@ -28,7 +28,6 @@ export const VBreadcrumbs = defineComponent({
28
28
  divider: [String, Function] as PropType<
29
29
  VNodeChild | ((vui: VuiService) => VNodeChild)
30
30
  >,
31
- // ...defineSlotsProps<{}>(),
32
31
  },
33
32
  setup(props, ctx) {
34
33
  const vui = useVui();
@@ -14,7 +14,7 @@ import {
14
14
  } from 'vue';
15
15
  import { IN_WINDOW } from '@fastkit/helpers';
16
16
  import { loadImage } from '@fastkit/dom';
17
- import { defineSlotsProps } from '@fastkit/vue-utils';
17
+ import { defineSlots } from '@fastkit/vue-utils';
18
18
 
19
19
  export declare type ImgHTMLAttributesPropOptions = {
20
20
  [K in keyof ImgHTMLAttributes]-?: PropType<ImgHTMLAttributes[K]>;
@@ -75,6 +75,10 @@ export interface BusyImageRects {
75
75
  main: BusyImageRect;
76
76
  }
77
77
 
78
+ const slots = defineSlots<{
79
+ default?: () => any;
80
+ }>();
81
+
78
82
  /**
79
83
  * 画像表示用コンポーネント
80
84
  * <img /> タグのように振る舞うが、ローディング表示や、表示サイズの調整など、ちょっといい感じにやるためのコンポーネント
@@ -87,14 +91,13 @@ export const VBusyImage = defineComponent({
87
91
  width: NUMBERISH_PROP,
88
92
  height: NUMBERISH_PROP,
89
93
  cover: Boolean,
90
- ...defineSlotsProps<{
91
- default: void;
92
- }>(),
94
+ ...slots(),
93
95
  },
94
96
  emits: {
95
97
  load: (ev: Event) => true,
96
98
  error: (ev: Event) => true,
97
99
  },
100
+ slots,
98
101
  setup(props, ctx) {
99
102
  const loadStateRef = ref<BusyImageLoadState>(
100
103
  props.cover && isAvailableSrc(ctx.attrs.src as any)
@@ -245,7 +248,7 @@ export const VBusyImage = defineComponent({
245
248
  return () => {
246
249
  const { el: elAttrs, img: imgAttrs } = attrsRef.value;
247
250
  const styles = stylesRef.value;
248
- const children = ctx.slots.default && ctx.slots.default();
251
+ const children = ctx.slots.default?.();
249
252
 
250
253
  return (
251
254
  <span
@@ -7,12 +7,7 @@ import {
7
7
  VNodeChild,
8
8
  } from 'vue';
9
9
  import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
10
- import {
11
- ExtractPropInput,
12
- createPropsOptions,
13
- renderSlotOrEmpty,
14
- htmlAttributesPropOptions,
15
- } from '@fastkit/vue-utils';
10
+ import { ExtractPropInput, createPropsOptions } from '@fastkit/vue-utils';
16
11
  import { VAction, actionableInheritProps } from '@fastkit/vue-action';
17
12
  import { useVui } from '../../injections';
18
13
  import { createControlProps, useControl } from '../../composables';
@@ -54,7 +49,6 @@ function resolveRawVButtonIcon(
54
49
  }
55
50
 
56
51
  export const vueButtonProps = createPropsOptions({
57
- ...htmlAttributesPropOptions,
58
52
  ...colorSchemeProps(),
59
53
  ...actionableInheritProps,
60
54
  spacer: [Boolean, String] as PropType<RawVButtonSpacer>,
@@ -136,12 +130,11 @@ export const VButton = defineComponent({
136
130
  ]);
137
131
 
138
132
  return () => {
139
- const children = renderSlotOrEmpty(ctx.slots);
140
133
  return (
141
134
  <VAction {...ctx.attrs} class={['v-button', classes.value]}>
142
135
  <span class="v-button__content">
143
136
  {startIcon.value}
144
- {children}
137
+ {ctx.slots.default?.()}
145
138
  {icon.value}
146
139
  {endIcon.value}
147
140
  </span>
@@ -1,16 +1,11 @@
1
1
  import './VCardActions.scss';
2
2
  import { defineComponent } from 'vue';
3
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
3
 
5
4
  export const VCardActions = defineComponent({
6
5
  name: 'VCardActions',
7
- setup(props, ctx) {
6
+ setup(_props, ctx) {
8
7
  return () => {
9
- return (
10
- <div class="v-card-actions">
11
- {renderSlotOrEmpty(ctx.slots, 'default')}
12
- </div>
13
- );
8
+ return <div class="v-card-actions">{ctx.slots.default?.()}</div>;
14
9
  };
15
10
  },
16
11
  });
@@ -1,16 +1,11 @@
1
1
  import './VCardContent.scss';
2
2
  import { defineComponent } from 'vue';
3
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
3
 
5
4
  export const VCardContent = defineComponent({
6
5
  name: 'VCardContent',
7
- setup(props, ctx) {
6
+ setup(_props, ctx) {
8
7
  return () => {
9
- return (
10
- <div class="v-card-content">
11
- {renderSlotOrEmpty(ctx.slots, 'default')}
12
- </div>
13
- );
8
+ return <div class="v-card-content">{ctx.slots.default?.()}</div>;
14
9
  };
15
10
  },
16
11
  });
@@ -1,8 +1,15 @@
1
1
  import './VCheckable.scss';
2
2
  import { computed, defineComponent } from 'vue';
3
- import { defineSlotsProps, renderSlotOrEmpty } from '@fastkit/vue-utils';
3
+ import { defineSlots } from '@fastkit/vue-utils';
4
4
  import { useVuiColorProvider } from '../../injections';
5
5
 
6
+ const slots = defineSlots<{
7
+ input?: () => any;
8
+ faux?: () => any;
9
+ icon?: () => any;
10
+ label?: () => any;
11
+ }>();
12
+
6
13
  export const VCheckable = defineComponent({
7
14
  name: 'VCheckable',
8
15
  props: {
@@ -10,14 +17,10 @@ export const VCheckable = defineComponent({
10
17
  disabled: Boolean,
11
18
  readonly: Boolean,
12
19
  checked: Boolean,
13
- ...defineSlotsProps<{
14
- input: void;
15
- faux: void;
16
- icon: void;
17
- label: void;
18
- }>(),
20
+ ...slots(),
19
21
  // autoWidth: Boolean,
20
22
  },
23
+ slots,
21
24
  setup(props, ctx) {
22
25
  const colorProvider = useVuiColorProvider();
23
26
  const invalid = computed(() => props.invalid);
@@ -42,18 +45,14 @@ export const VCheckable = defineComponent({
42
45
  return () => (
43
46
  <label class={['v-checkable', classes.value]}>
44
47
  <span class="v-checkable__faux">
45
- {renderSlotOrEmpty(ctx.slots, 'input')}
48
+ {ctx.slots.input?.()}
46
49
  {ctx.slots.icon ? (
47
- renderSlotOrEmpty(ctx.slots, 'icon')
50
+ ctx.slots.icon()
48
51
  ) : (
49
- <span class="v-checkable__faux__icon">
50
- {renderSlotOrEmpty(ctx.slots, 'faux')}
51
- </span>
52
+ <span class="v-checkable__faux__icon">{ctx.slots.faux?.()}</span>
52
53
  )}
53
54
  </span>
54
- <span class="v-checkable__label">
55
- {renderSlotOrEmpty(ctx.slots, 'label')}
56
- </span>
55
+ <span class="v-checkable__label">{ctx.slots.label?.()}</span>
57
56
  </label>
58
57
  );
59
58
  },
@@ -4,7 +4,6 @@ import {
4
4
  createFormSelectorItemSettings,
5
5
  useFormSelectorItemControl,
6
6
  } from '@fastkit/vue-form-control';
7
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
8
7
  import { createControlProps, useControl } from '../../composables';
9
8
  import {
10
9
  VUI_CHECKBOX_GROUP_SYMBOL,
@@ -55,7 +54,7 @@ export const VCheckbox = defineComponent({
55
54
  input: () =>
56
55
  selectorItemControl.createInputElement({ type: 'checkbox' }),
57
56
  faux: () => <span class="v-checkbox__faux"></span>,
58
- label: () => renderSlotOrEmpty(this.$slots, 'default'),
57
+ label: () => this.$slots.default?.(),
59
58
  }}
60
59
  />
61
60
  );
@@ -1,6 +1,5 @@
1
1
  import './VChip.scss';
2
2
  import { defineComponent, computed, PropType, VNodeChild } from 'vue';
3
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
4
3
  import { actionableInheritProps, useActionable } from '@fastkit/vue-action';
5
4
  import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
6
5
  import { useVui } from '../../injections';
@@ -95,7 +94,7 @@ export const VChip = defineComponent({
95
94
  {...attrs}
96
95
  class={['v-chip', classes.value, color.colorClasses.value]}>
97
96
  {startIcon.value}
98
- <span class="v-chip__content">{renderSlotOrEmpty(ctx.slots)}</span>
97
+ <span class="v-chip__content">{ctx.slots.default?.()}</span>
99
98
  {endIcon.value}
100
99
  </Tag>
101
100
  );
@@ -10,7 +10,6 @@ import {
10
10
  } from 'vue';
11
11
  import { getDocumentScroller } from '@fastkit/vue-scroller';
12
12
  import { VTabsItem } from '../VTabs/VTabs';
13
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
14
13
 
15
14
  export interface ContentSwitcherSeeTopOptions {
16
15
  /**
@@ -116,7 +115,7 @@ export const VContentSwitcher = defineComponent({
116
115
 
117
116
  return () => {
118
117
  const current = currentRef.value;
119
- const children = renderSlotOrEmpty(ctx.slots) || [];
118
+ const children = ctx.slots.default?.() || [];
120
119
  const currentSlot = ctx.slots[current];
121
120
 
122
121
  if (currentSlot) {
@@ -6,8 +6,8 @@ import {
6
6
  resolveVNodeChildOrSlots,
7
7
  TypedSlot,
8
8
  createPropsOptions,
9
- defineSlotsProps,
10
- renderSlotOrEmpty,
9
+ defineSlots,
10
+ DefineSlotsType,
11
11
  } from '@fastkit/vue-utils';
12
12
  import {
13
13
  createControlProps,
@@ -43,11 +43,13 @@ export function createControlFieldProps() {
43
43
  // startAdornment: () => true,
44
44
  // endAdornment: () => true,
45
45
  // };
46
- export interface InputBoxSlots {
47
- default: void;
48
- startAdornment: void;
49
- endAdornment: void;
50
- }
46
+ export type InputBoxSlots = DefineSlotsType<{
47
+ default?: () => any;
48
+ startAdornment?: () => any;
49
+ endAdornment?: () => any;
50
+ }>;
51
+
52
+ const slots = defineSlots<InputBoxSlots>();
51
53
 
52
54
  type ResolvedSlots = Partial<Record<AdornmentPosition, TypedSlot<void>>>;
53
55
 
@@ -57,10 +59,10 @@ export const VControlField = defineComponent({
57
59
  ...createControlFieldProps(),
58
60
  focused: Boolean,
59
61
  autoHeight: Boolean,
60
- ...defineSlotsProps<InputBoxSlots>(),
62
+ ...slots(),
61
63
  error: Boolean,
62
64
  },
63
- // _slots: inputBoxSlots,
65
+ slots,
64
66
  emits: {
65
67
  click: (ev: MouseEvent) => true,
66
68
  },
@@ -122,7 +124,7 @@ export const VControlField = defineComponent({
122
124
  />
123
125
  );
124
126
  } else {
125
- child = renderSlotOrEmpty(resolvedSlots.value, position);
127
+ child = resolvedSlots.value[position]?.();
126
128
  }
127
129
  if (!child) return;
128
130
  return (
@@ -159,9 +161,7 @@ export const VControlField = defineComponent({
159
161
  // tabindex={this.computedTabindex}
160
162
  ref={this.hostElRef()}>
161
163
  {this.renderAdornment('start')}
162
- <div class="v-control-field__body">
163
- {renderSlotOrEmpty(this.$slots, 'default')}
164
- </div>
164
+ <div class="v-control-field__body">{this.$slots.default?.()}</div>
165
165
  {this.renderAdornment('end')}
166
166
  </div>
167
167
  );
@@ -1,12 +1,13 @@
1
1
  import './VDrawerLayout.scss';
2
2
  import { defineComponent, computed } from 'vue';
3
- import { createPaperBaseProps, VPaper } from '../VPaper';
3
+ import { createPaperBaseProps, paperBaseSlots, VPaper } from '../VPaper';
4
4
 
5
5
  export const VDrawerLayout = defineComponent({
6
6
  name: 'VDrawerLayout',
7
7
  props: {
8
8
  ...createPaperBaseProps(),
9
9
  },
10
+ slots: paperBaseSlots,
10
11
  setup(props, ctx) {
11
12
  return () => {
12
13
  const paperProps = computed(() => ({
@@ -4,7 +4,7 @@ import {
4
4
  createFormSettings,
5
5
  useForm,
6
6
  } from '@fastkit/vue-form-control';
7
- import { defineSlotsProps, renderSlotOrEmpty } from '@fastkit/vue-utils';
7
+ import { DefineSlotsType, defineSlots } from '@fastkit/vue-utils';
8
8
  import { getDocumentScroller } from '@fastkit/vue-scroller';
9
9
  import { createControlProps, useControl } from '../../composables';
10
10
  import { VUI_FORM_SYMBOL, useVui } from '../../injections';
@@ -13,15 +13,17 @@ const { props, emits } = createFormSettings({
13
13
  nodeType: VUI_FORM_SYMBOL,
14
14
  });
15
15
 
16
- export interface VFormSlots {
17
- default: VueForm;
18
- }
16
+ export type VFormSlots = DefineSlotsType<{
17
+ default?: (form: VueForm) => any;
18
+ }>;
19
+
20
+ export const formSlots = defineSlots<VFormSlots>();
19
21
 
20
22
  export function createVFormProps() {
21
23
  return {
22
24
  ...props,
23
25
  ...createControlProps(),
24
- ...defineSlotsProps<VFormSlots>(),
26
+ ...formSlots(),
25
27
  // disableAutoScroll: Boolean,
26
28
  };
27
29
  }
@@ -30,6 +32,7 @@ export const VForm = defineComponent({
30
32
  name: 'VForm',
31
33
  props: createVFormProps(),
32
34
  emits,
35
+ slots: formSlots,
33
36
  setup(props, ctx) {
34
37
  const vui = useVui();
35
38
  const nodeControl = useForm(props, ctx as any, {
@@ -70,7 +73,7 @@ export const VForm = defineComponent({
70
73
  action={this.nativeAction}
71
74
  spellcheck={this.spellcheck}
72
75
  onSubmit={form.handleSubmit}>
73
- {renderSlotOrEmpty(this.$slots, 'default', form as any)}
76
+ {this.$slots.default?.(form)}
74
77
  </form>
75
78
  );
76
79
  },
@@ -7,7 +7,7 @@ import {
7
7
  FormControl,
8
8
  RequiredChipSource,
9
9
  } from '@fastkit/vue-form-control';
10
- import { defineSlotsProps, renderSlotOrEmpty } from '@fastkit/vue-utils';
10
+ import { defineSlots } from '@fastkit/vue-utils';
11
11
  import { useVuiColorProvider, useVui } from '../../injections';
12
12
  import type { VuiService } from '../../service';
13
13
  import { VIcon } from '../VIcon';
@@ -41,17 +41,20 @@ export function createRequiredChipRenderer(
41
41
  };
42
42
  }
43
43
 
44
+ const slots = defineSlots<
45
+ FormControlSlots & {
46
+ default?: (form: FormControl) => any;
47
+ }
48
+ >();
49
+
44
50
  export const VFormControl = defineComponent({
45
51
  name: 'VFormControl',
46
52
  props: {
47
53
  ...props,
48
- ...defineSlotsProps<
49
- FormControlSlots & {
50
- default: FormControl;
51
- }
52
- >(),
54
+ ...slots(),
53
55
  error: Boolean,
54
56
  },
57
+ slots,
55
58
  emits,
56
59
  setup(props, ctx) {
57
60
  const vui = useVui();
@@ -152,7 +155,7 @@ export const VFormControl = defineComponent({
152
155
  </label>
153
156
  )}
154
157
  <div class="v-form-control__body">
155
- {renderSlotOrEmpty(ctx.slots, 'default', control as any)}
158
+ {ctx.slots.default?.(control)}
156
159
  {!props.hiddenInfo && (
157
160
  <div class="v-form-control__info">
158
161
  {!!message && (
@@ -1,7 +1,6 @@
1
1
  import './VGridContainer.scss';
2
2
 
3
3
  import { defineComponent, computed } from 'vue';
4
- import { htmlAttributesPropOptions } from '@fastkit/vue-utils';
5
4
  import { RawGridValueProp, extractRawGridValueClasses } from './schemes';
6
5
 
7
6
  export type GridContainerSpacingValue =
@@ -66,7 +65,6 @@ export const VGridContainer = defineComponent({
66
65
  name: 'VGridContainer',
67
66
  inheritAttrs: false,
68
67
  props: {
69
- ...htmlAttributesPropOptions,
70
68
  wrapperTag: {
71
69
  type: String,
72
70
  default: 'div',
@@ -1,8 +1,6 @@
1
1
  import './VGridItem.scss';
2
2
 
3
3
  import { defineComponent, computed } from 'vue';
4
- // import { MediaMatchKey, MEDIA_MATCH_CONDITIONS } from '@fastkit/media-match';
5
- import { htmlAttributesPropOptions } from '@fastkit/vue-utils';
6
4
  import { RawGridValueProp, extractRawGridValueClasses } from './schemes';
7
5
 
8
6
  export type GridItemNumberSizeValue =
@@ -50,7 +48,6 @@ export const VGridItem = defineComponent({
50
48
  name: 'VGridItem',
51
49
  inheritAttrs: false,
52
50
  props: {
53
- ...htmlAttributesPropOptions,
54
51
  tag: {
55
52
  type: String,
56
53
  default: 'div',
@@ -1,19 +1,17 @@
1
1
  import './VHero.scss';
2
2
  import { defineComponent, PropType } from 'vue';
3
- import {
4
- renderSlotOrEmpty,
5
- htmlAttributesPropOptions,
6
- defineSlotsProps,
7
- } from '@fastkit/vue-utils';
3
+ import { defineSlots } from '@fastkit/vue-utils';
8
4
  import { toScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
9
5
  import { VAppContainer } from '@fastkit/vue-app-layout';
10
6
 
11
- // Adornment
7
+ const slots = defineSlots<{
8
+ default?: () => void;
9
+ adornment?: () => void;
10
+ }>();
12
11
 
13
12
  export const VHero = defineComponent({
14
13
  name: 'VHero',
15
14
  props: {
16
- ...htmlAttributesPropOptions,
17
15
  color: {
18
16
  type: String as PropType<ScopeName>,
19
17
  default: 'primary',
@@ -26,23 +24,19 @@ export const VHero = defineComponent({
26
24
  type: String,
27
25
  default: 'h1',
28
26
  },
29
- ...defineSlotsProps<{
30
- default: void;
31
- adornment: void;
32
- }>(),
27
+ ...slots(),
33
28
  },
29
+ slots,
34
30
  setup(props, ctx) {
35
31
  return () => {
36
32
  const TagName = props.tag as 'header';
37
33
  const HTagName = props.hTag as 'h1';
38
- const adornment = renderSlotOrEmpty(ctx.slots, 'adornment');
34
+ const adornment = ctx.slots.adornment?.();
39
35
 
40
36
  return (
41
37
  <VAppContainer pulled>
42
38
  <TagName class={['v-hero', toScopeColorClass(props.color)]}>
43
- <HTagName class="v-hero__title">
44
- {renderSlotOrEmpty(ctx.slots, 'default')}
45
- </HTagName>
39
+ <HTagName class="v-hero__title">{ctx.slots.default?.()}</HTagName>
46
40
  {adornment && <div class="v-hero__adornment">{adornment}</div>}
47
41
  </TagName>
48
42
  </VAppContainer>
@@ -8,7 +8,7 @@ import {
8
8
  watch,
9
9
  } from 'vue';
10
10
  import { rawIconProp, resolveRawIconProp } from '../VIcon';
11
- import { renderSlotOrEmpty, createPropsOptions } from '@fastkit/vue-utils';
11
+ import { createPropsOptions } from '@fastkit/vue-utils';
12
12
  import { actionableInheritProps, VAction } from '@fastkit/vue-action';
13
13
  import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
14
14
  import { useVui } from '../../injections';
@@ -108,9 +108,7 @@ export const VListTile = defineComponent({
108
108
  {_startIcon}
109
109
  </span>
110
110
  )}
111
- <span class="v-list-tile__body">
112
- {renderSlotOrEmpty(ctx.slots, 'default')}
113
- </span>
111
+ <span class="v-list-tile__body">{ctx.slots.default?.()}</span>
114
112
  {_endIcon && (
115
113
  <span class="v-list-tile__icon v-list-tile__icon--end">
116
114
  {_endIcon}
@@ -10,7 +10,7 @@ import {
10
10
  watch,
11
11
  } from 'vue';
12
12
  import { createListTileProps, listTileEmits, VListTile } from '../VListTile';
13
- import { ExtractPropInput, renderSlotOrEmpty } from '@fastkit/vue-utils';
13
+ import { ExtractPropInput } from '@fastkit/vue-utils';
14
14
  import { VExpandTransition } from '@fastkit/vue-transitions';
15
15
  import { useVui } from '../../injections';
16
16
  import { useRoute } from 'vue-router';
@@ -259,7 +259,7 @@ export const VNavigationItem = defineComponent({
259
259
  class={['v-navigation-item', classes.value]}
260
260
  onClick={onClick}
261
261
  onChangeActive={onChangeActive}>
262
- {renderSlotOrEmpty(ctx.slots, 'default')}
262
+ {ctx.slots.default?.()}
263
263
  </VListTile>
264
264
  {_children && (
265
265
  <VExpandTransition>
@@ -4,7 +4,6 @@ import {
4
4
  createFormSelectorItemSettings,
5
5
  useFormSelectorItemControl,
6
6
  } from '@fastkit/vue-form-control';
7
- import { renderSlotOrEmpty } from '@fastkit/vue-utils';
8
7
  import { createControlProps, useControl } from '../../composables';
9
8
  import { VUI_SELECT_SYMBOL, VUI_OPTION_SYMBOL } from '../../injections';
10
9
 
@@ -50,9 +49,7 @@ export const VOption = defineComponent({
50
49
  {...({
51
50
  'aria-disabled': selectorItemControl.isDisabled,
52
51
  } as any)}>
53
- <span class="v-option__label">
54
- {renderSlotOrEmpty(this.$slots, 'default')}
55
- </span>
52
+ <span class="v-option__label">{this.$slots.default?.()}</span>
56
53
  </label>
57
54
  );
58
55
  },