sprintify-ui 0.10.46 → 0.10.48

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.
@@ -3,17 +3,18 @@ type __VLS_Props = {
3
3
  itemKey: string;
4
4
  handle?: string;
5
5
  disabled?: boolean;
6
+ has?: string;
6
7
  };
7
8
  declare const elementsRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
8
9
  declare function getKey(element: any): any;
9
10
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
10
- declare var __VLS_1: {
11
+ declare var __VLS_7: {
11
12
  key: any;
12
13
  element: any;
13
14
  index: number;
14
15
  };
15
16
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
16
- item?: (props: typeof __VLS_1) => any;
17
+ item?: (props: typeof __VLS_7) => any;
17
18
  }>;
18
19
  declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
19
20
  elementsRef: typeof elementsRef;
@@ -24,6 +25,7 @@ declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
24
25
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
25
26
  }>, {
26
27
  disabled: boolean;
28
+ has: string;
27
29
  itemKey: string;
28
30
  handle: string;
29
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -33,6 +35,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
33
35
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
34
36
  }>, {
35
37
  disabled: boolean;
38
+ has: string;
36
39
  itemKey: string;
37
40
  handle: string;
38
41
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.46",
3
+ "version": "0.10.48",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <div ref="elementsRef">
2
+ <component
3
+ :is="has"
4
+ ref="elementsRef"
5
+ >
3
6
  <slot
4
7
  v-for="(element, index) in modelValue"
5
8
  :key="getKey(element)"
@@ -7,7 +10,7 @@
7
10
  :element="element"
8
11
  :index="index"
9
12
  />
10
- </div>
13
+ </component>
11
14
  </template>
12
15
 
13
16
  <script lang="ts" setup>
@@ -19,10 +22,12 @@ const props = withDefaults(defineProps<{
19
22
  itemKey: string;
20
23
  handle?: string;
21
24
  disabled?: boolean;
25
+ has?: string
22
26
  }>(), {
23
27
  itemKey: 'id',
24
28
  handle: '.handle',
25
29
  disabled: false,
30
+ has: 'div', // Default to a div if not specified
26
31
  });
27
32
 
28
33
  const emit = defineEmits(['update:modelValue']);
@@ -270,9 +270,11 @@ const settingsStorage = config.settingsStorage;
270
270
 
271
271
  const collapsedKey = `${componentStorageKey}.collapsed`;
272
272
 
273
- const value = await settingsStorage.get(collapsedKey);
273
+ const collapsed = ref(false);
274
274
 
275
- const collapsed = ref(!!value);
275
+ onMounted(async () => {
276
+ collapsed.value = (await settingsStorage.get(collapsedKey)) == 1;
277
+ });
276
278
 
277
279
  function toggleCollapse() {
278
280
  collapsed.value = !collapsed.value;