@fastkit/vui 0.6.44 → 0.6.45

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.
@@ -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<{
@@ -34,6 +39,7 @@ export function createPaperProps() {
34
39
 
35
40
  export const VPaper = defineComponent({
36
41
  name: 'VPaper',
42
+ inheritAttrs: false,
37
43
  props: createPaperProps(),
38
44
  setup(props, ctx) {
39
45
  const tag = computed(() => props.tag);
@@ -44,7 +50,7 @@ export const VPaper = defineComponent({
44
50
  scope.value.className,
45
51
  {
46
52
  'v-paper--plain': !scope.value.value,
47
- 'v-paper--has-color': !!scope.value.value,
53
+ 'v-paper--has-color': !!scope.value.value || !!ctx.attrs.disabled,
48
54
  'v-paper--square': props.square,
49
55
  },
50
56
  ]);
@@ -57,20 +63,22 @@ export const VPaper = defineComponent({
57
63
  const header = renderSlotOrEmpty(ctx.slots, 'header');
58
64
  const footer = renderSlotOrEmpty(ctx.slots, 'footer');
59
65
  return (
60
- <TagName class={['v-paper', classes.value]}>
61
- {header && (
62
- <div class="v-paper__header" {...headerProps.value}>
63
- {header}
66
+ <TagName class={['v-paper', classes.value]} {...ctx.attrs}>
67
+ <div class="v-paper__inner">
68
+ {header && (
69
+ <div class="v-paper__header" {...headerProps.value}>
70
+ {header}
71
+ </div>
72
+ )}
73
+ <div class="v-paper__body" {...bodyProps.value}>
74
+ {renderSlotOrEmpty(ctx.slots, 'default')}
64
75
  </div>
65
- )}
66
- <div class="v-paper__body" {...bodyProps.value}>
67
- {renderSlotOrEmpty(ctx.slots, 'default')}
76
+ {footer && (
77
+ <div class="v-paper__footer" {...footerProps.value}>
78
+ {footer}
79
+ </div>
80
+ )}
68
81
  </div>
69
- {footer && (
70
- <div class="v-paper__footer" {...footerProps.value}>
71
- {footer}
72
- </div>
73
- )}
74
82
  </TagName>
75
83
  );
76
84
  };
@@ -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,