@fastkit/vui 0.6.42 → 0.6.46

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.
@@ -22,6 +22,11 @@ export function createNavigationItemProps() {
22
22
  return {
23
23
  ...createListTileProps(),
24
24
  match: String,
25
+ depth: {
26
+ type: Number,
27
+ default: 0,
28
+ },
29
+ nested: Boolean,
25
30
  // key: {
26
31
  // type: [String, Number],
27
32
  // required: true,
@@ -98,6 +103,7 @@ export const VNavigationItem = defineComponent({
98
103
  const classes = computed(() => [
99
104
  {
100
105
  'v-navigation-item--opened': opened.value,
106
+ [`v-navigation-item--depth-${props.depth}`]: props.depth > 0,
101
107
  },
102
108
  ]);
103
109
 
@@ -238,6 +244,7 @@ export const VNavigationItem = defineComponent({
238
244
  {_children.map((child) =>
239
245
  renderNavigationItemInput(child, {
240
246
  startIconEmptySpace: _props.value.startIconEmptySpace,
247
+ depth: props.nested ? props.depth + 1 : props.depth,
241
248
  // onClick,
242
249
  // onChangeActive,
243
250
  }),
@@ -77,6 +77,7 @@ export const VPagination = defineComponent({
77
77
  props: paginationProps(),
78
78
  emits: {
79
79
  change: (page: number) => true,
80
+ 'update:modelValue': (page: number) => true,
80
81
  },
81
82
  setup(props, ctx) {
82
83
  const vui = useVui();
@@ -13,17 +13,23 @@
13
13
  --paper-link-color: var(--nav-color);
14
14
  }
15
15
 
16
+ display: block;
16
17
  color: var(--paper-text-color);
17
18
  background-color: var(--paper-background--color);
18
19
  border-radius: var(--paper-radius);
19
20
 
21
+ &__inner {
22
+ position: relative;
23
+ border-radius: inherit;
24
+ }
25
+
20
26
  &--square {
21
27
  --paper-radius: 0px;
22
28
  }
23
29
 
24
- a {
25
- color: var(--paper-link-color);
26
- }
30
+ // a:not(.v-paper) {
31
+ // color: var(--paper-link-color);
32
+ // }
27
33
 
28
34
  &__header {
29
35
  border-top-left-radius: inherit;
@@ -1,14 +1,19 @@
1
1
  import './VPaper.scss';
2
2
  import { defineComponent, computed, PropType, VNodeProps } from 'vue';
3
3
  import { createElevationProps, useElevation } from '../../composables';
4
- import { renderSlotOrEmpty, defineSlotsProps } from '@fastkit/vue-utils';
4
+ import {
5
+ renderSlotOrEmpty,
6
+ defineSlotsProps,
7
+ htmlAttributesPropOptions,
8
+ } from '@fastkit/vue-utils';
5
9
  import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
6
10
 
7
11
  export function createPaperBaseProps() {
8
12
  return {
13
+ ...htmlAttributesPropOptions,
9
14
  color: String as PropType<ScopeName>,
10
15
  tag: {
11
- type: String,
16
+ type: [String, Object] as PropType<any>,
12
17
  default: 'div',
13
18
  },
14
19
  ...defineSlotsProps<{
@@ -29,11 +34,13 @@ export function createPaperProps() {
29
34
  headerProps: Object as PropType<ARGS>,
30
35
  bodyProps: Object as PropType<ARGS>,
31
36
  footerProps: Object as PropType<ARGS>,
37
+ innerClass: [String, Array, Object] as PropType<any>,
32
38
  };
33
39
  }
34
40
 
35
41
  export const VPaper = defineComponent({
36
42
  name: 'VPaper',
43
+ inheritAttrs: false,
37
44
  props: createPaperProps(),
38
45
  setup(props, ctx) {
39
46
  const tag = computed(() => props.tag);
@@ -44,7 +51,7 @@ export const VPaper = defineComponent({
44
51
  scope.value.className,
45
52
  {
46
53
  'v-paper--plain': !scope.value.value,
47
- 'v-paper--has-color': !!scope.value.value,
54
+ 'v-paper--has-color': !!scope.value.value || !!ctx.attrs.disabled,
48
55
  'v-paper--square': props.square,
49
56
  },
50
57
  ]);
@@ -57,20 +64,22 @@ export const VPaper = defineComponent({
57
64
  const header = renderSlotOrEmpty(ctx.slots, 'header');
58
65
  const footer = renderSlotOrEmpty(ctx.slots, 'footer');
59
66
  return (
60
- <TagName class={['v-paper', classes.value]}>
61
- {header && (
62
- <div class="v-paper__header" {...headerProps.value}>
63
- {header}
67
+ <TagName class={['v-paper', classes.value]} {...ctx.attrs}>
68
+ <div class={['v-paper__inner', props.innerClass]}>
69
+ {header && (
70
+ <div class="v-paper__header" {...headerProps.value}>
71
+ {header}
72
+ </div>
73
+ )}
74
+ <div class="v-paper__body" {...bodyProps.value}>
75
+ {renderSlotOrEmpty(ctx.slots, 'default')}
64
76
  </div>
65
- )}
66
- <div class="v-paper__body" {...bodyProps.value}>
67
- {renderSlotOrEmpty(ctx.slots, 'default')}
77
+ {footer && (
78
+ <div class="v-paper__footer" {...footerProps.value}>
79
+ {footer}
80
+ </div>
81
+ )}
68
82
  </div>
69
- {footer && (
70
- <div class="v-paper__footer" {...footerProps.value}>
71
- {footer}
72
- </div>
73
- )}
74
83
  </TagName>
75
84
  );
76
85
  };
@@ -296,6 +296,11 @@
296
296
 
297
297
  // breadcrumbs
298
298
  --breadcrumbs-font-size: var(--typo-sm-size);
299
+
300
+ // =============================================
301
+ // tiles
302
+ // =============================================
303
+ --list-tile-padding: calc(var(--root-em) * 0.625);
299
304
  }
300
305
 
301
306
  :root,
@@ -106,8 +106,8 @@ export interface ViteVuiPluginOptions
106
106
  mediaMatch?: string;
107
107
  iconFont?: RawIconFontEntry[];
108
108
  iconFontDefaults?: IconFontSettings;
109
- onBooted?: () => any;
110
- onBootError?: (err: unknown) => any;
109
+ onBooted?: (() => any) | (() => Promise<any>);
110
+ onBootError?: ((err: unknown) => any) | ((err: unknown) => Promise<any>);
111
111
  __dev?: boolean;
112
112
  }
113
113