@wishbone-media/spark 0.53.0 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishbone-media/spark",
3
- "version": "0.53.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -13,18 +13,11 @@
13
13
  <div
14
14
  v-else-if="hasDefaultHeader"
15
15
  :class="[
16
- 'border-b border-gray-300',
17
- $slots.nav
18
- ? 'flex items-stretch justify-between gap-4 px-6'
19
- : 'flex items-center justify-between gap-4 px-6 py-4',
16
+ 'flex h-20 items-stretch justify-between gap-4 border-b border-gray-300 px-5',
20
17
  props.headerClass,
21
18
  ]"
22
19
  >
23
- <!-- Left cluster: tab nav replaces back/title/extra when provided -->
24
- <div v-if="$slots.nav" class="flex min-w-0 items-stretch">
25
- <slot name="nav" />
26
- </div>
27
- <div v-else class="flex min-w-0 items-center gap-3">
20
+ <div class="flex min-w-0 items-center gap-3">
28
21
  <SparkButton
29
22
  v-if="props.backTo"
30
23
  variant="secondary"
@@ -40,15 +33,14 @@
40
33
  {{ props.title }}
41
34
  </h3>
42
35
  <slot name="title-extra" />
36
+ <div v-if="$slots.nav" class="flex self-stretch items-stretch">
37
+ <slot name="nav" />
38
+ </div>
39
+ <slot name="header-left" />
43
40
  </div>
44
41
 
45
- <!-- Right cluster: metadata then actions -->
46
- <div
47
- v-if="$slots.meta || $slots.actions"
48
- class="flex shrink-0 items-center gap-4"
49
- :class="$slots.nav ? 'py-3' : ''"
50
- >
51
- <slot name="meta" />
42
+ <div v-if="$slots['header-right'] || $slots.actions" class="flex shrink-0 items-center gap-4">
43
+ <slot name="header-right" />
52
44
  <slot name="actions" />
53
45
  </div>
54
46
  </div>
@@ -64,10 +56,6 @@
64
56
  >
65
57
  <slot />
66
58
  </div>
67
-
68
- <div v-if="$slots.footer" :class="['border-t border-gray-300 p-5', props.footerClass]">
69
- <slot name="footer" />
70
- </div>
71
59
  </div>
72
60
  </template>
73
61
 
@@ -107,14 +95,9 @@ const props = defineProps({
107
95
  type: String,
108
96
  default: '',
109
97
  },
110
- // Extra classes for the footer wrapper.
111
- footerClass: {
112
- type: String,
113
- default: '',
114
- },
115
98
  // Default header: main heading text. Renders the header without needing
116
- // the #header slot; combine with backTo and the title-extra/nav/meta/actions
117
- // slots. The #header slot overrides the default header entirely.
99
+ // the #header slot; combine with backTo and the named/catch-all slots.
100
+ // The #header slot overrides the default header entirely.
118
101
  title: {
119
102
  type: String,
120
103
  default: null,
@@ -132,7 +115,13 @@ const bodyEl = ref(null)
132
115
 
133
116
  const hasDefaultHeader = computed(() =>
134
117
  Boolean(
135
- props.title || props.backTo || slots['title-extra'] || slots.nav || slots.meta || slots.actions,
118
+ props.title ||
119
+ props.backTo ||
120
+ slots['title-extra'] ||
121
+ slots.nav ||
122
+ slots['header-left'] ||
123
+ slots['header-right'] ||
124
+ slots.actions,
136
125
  ),
137
126
  )
138
127
 
@@ -70,6 +70,7 @@ const defaultTableSettings = {
70
70
  stretchH: 'all',
71
71
  colWidths: 50,
72
72
  renderAllRows: true,
73
+ height: 'auto',
73
74
  readOnly: true,
74
75
  tableClassName: 'spark-table-table',
75
76
  readOnlyCellClassName: 'read-only',