sprintify-ui 0.6.48 → 0.6.51

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,5 +1,6 @@
1
1
  import { ClassNameValue } from 'tailwind-merge';
2
2
  import { RouteLocationRaw } from 'vue-router';
3
+ declare function focus(): void;
3
4
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
5
  class: {
5
6
  type: import("vue").PropType<string | false | 0 | ClassNameValue[] | null>;
@@ -41,7 +42,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
41
42
  type: import("vue").PropType<"start" | "end">;
42
43
  default: string;
43
44
  };
44
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ }, {
46
+ focus: typeof focus;
47
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
48
  click: (...args: any[]) => void;
46
49
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
47
50
  class: {
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
22
22
  };
23
23
  attributes: {
24
24
  type: import("vue").PropType<{
25
- icon: string;
25
+ icon?: string | undefined;
26
26
  label: string;
27
27
  }[]>;
28
28
  default: undefined;
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
58
58
  };
59
59
  attributes: {
60
60
  type: import("vue").PropType<{
61
- icon: string;
61
+ icon?: string | undefined;
62
62
  label: string;
63
63
  }[]>;
64
64
  default: undefined;
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
80
80
  breadcrumbs: Breadcrumb[];
81
81
  layout: 'default' | 'compact';
82
82
  attributes: {
83
- icon: string;
83
+ icon?: string;
84
84
  label: string;
85
85
  }[];
86
86
  subtitle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.48",
3
+ "version": "0.6.51",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -75,7 +75,8 @@ const classes = computed(() => {
75
75
  md: 'px-1.5 py-0.5 text-xs',
76
76
  lg: 'px-1.5 py-0.5 text-sm',
77
77
  }[sizeInternal.value];
78
- const wrap = props.wrap ? 'whitespace-nowrap' : '';
78
+
79
+ const wrap = props.wrap ? '' : 'whitespace-nowrap';
79
80
 
80
81
  return twMerge(base, wrap, size, props.class);
81
82
  })
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <component
3
3
  :is="as"
4
- ref="button"
4
+ ref="buttonRef"
5
5
  :class="classes"
6
6
  :style="styles"
7
7
  :to="to"
@@ -205,4 +205,16 @@ const iconClass = computed(() => {
205
205
  return classes;
206
206
  });
207
207
 
208
+ const buttonRef = ref<HTMLElement | undefined>(undefined);
209
+
210
+ function focus() {
211
+ if (buttonRef.value) {
212
+ buttonRef.value.focus();
213
+ }
214
+ }
215
+
216
+ defineExpose({
217
+ focus,
218
+ });
219
+
208
220
  </script>
@@ -44,11 +44,12 @@
44
44
  <div
45
45
  v-for="attribute in attributes"
46
46
  :key="attribute.label"
47
- class="flex items-center"
47
+ class="flex items-center gap-1.5"
48
48
  >
49
49
  <BaseIcon
50
+ v-if="attribute.icon"
50
51
  :icon="attribute.icon"
51
- class="mr-1.5 h-4 w-4 shrink-0 text-slate-600"
52
+ class="h-4 w-4 shrink-0 text-slate-600"
52
53
  aria-hidden="true"
53
54
  />
54
55
  <span class="text-sm text-slate-600">
@@ -113,7 +114,7 @@ const props = withDefaults(
113
114
  defineProps<{
114
115
  title: string;
115
116
  subtitle?: string;
116
- attributes?: { icon: string; label: string }[];
117
+ attributes?: { icon?: string; label: string }[];
117
118
  actions?: ActionItem[];
118
119
  badge?: BaseBadgeProps;
119
120
  layout?: 'default' | 'compact';