sprintify-ui 0.6.40 → 0.6.42

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,4 +1,8 @@
1
1
  import { Breadcrumb, ActionItem } from '@/types';
2
+ import BaseBadge from './BaseBadge.vue';
3
+ type BaseBadgeProps = InstanceType<typeof BaseBadge>["$props"] & {
4
+ label: string;
5
+ };
2
6
  declare const _default: import("vue").DefineComponent<{
3
7
  title: {
4
8
  type: import("vue").PropType<string>;
@@ -28,11 +32,7 @@ declare const _default: import("vue").DefineComponent<{
28
32
  default: undefined;
29
33
  };
30
34
  badge: {
31
- type: import("vue").PropType<{
32
- icon: string;
33
- label: string;
34
- color: string;
35
- }>;
35
+ type: import("vue").PropType<BaseBadgeProps>;
36
36
  default: undefined;
37
37
  };
38
38
  maxActions: {
@@ -68,11 +68,7 @@ declare const _default: import("vue").DefineComponent<{
68
68
  default: undefined;
69
69
  };
70
70
  badge: {
71
- type: import("vue").PropType<{
72
- icon: string;
73
- label: string;
74
- color: string;
75
- }>;
71
+ type: import("vue").PropType<BaseBadgeProps>;
76
72
  default: undefined;
77
73
  };
78
74
  maxActions: {
@@ -88,11 +84,7 @@ declare const _default: import("vue").DefineComponent<{
88
84
  label: string;
89
85
  }[];
90
86
  subtitle: string;
91
- badge: {
92
- icon: string;
93
- label: string;
94
- color: string;
95
- };
87
+ badge: BaseBadgeProps;
96
88
  maxActions: number;
97
89
  }, {}>;
98
90
  export default _default;
@@ -54,6 +54,8 @@ declare const _default: import("vue").DefineComponent<{
54
54
  focus: typeof focus;
55
55
  blur: typeof blur;
56
56
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
57
+ blur: (...args: any[]) => void;
58
+ focus: (...args: any[]) => void;
57
59
  "update:modelValue": (...args: any[]) => void;
58
60
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
59
61
  modelValue: {
@@ -105,6 +107,8 @@ declare const _default: import("vue").DefineComponent<{
105
107
  type: BooleanConstructor;
106
108
  };
107
109
  }>> & {
110
+ onFocus?: ((...args: any[]) => any) | undefined;
111
+ onBlur?: ((...args: any[]) => any) | undefined;
108
112
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
109
113
  }, {
110
114
  class: string | string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.40",
3
+ "version": "0.6.42",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -18,11 +18,10 @@
18
18
  class="order-1 mb-1 xs:order-2 xs:mb-0"
19
19
  >
20
20
  <BaseBadge
21
- :color="badge.color"
22
- :icon="badge.icon"
21
+ v-bind="badge"
23
22
  class="relative xs:-bottom-[2px]"
24
23
  >
25
- {{ badge.label }}
24
+ {{ badge?.label }}
26
25
  </BaseBadge>
27
26
  </div>
28
27
  </div>
@@ -106,13 +105,17 @@ import BaseBadge from './BaseBadge.vue';
106
105
  import BaseMenu from './BaseMenu.vue';
107
106
  import { cloneDeep } from 'lodash';
108
107
 
108
+ type BaseBadgeProps = InstanceType<typeof BaseBadge>["$props"] & {
109
+ label: string;
110
+ };
111
+
109
112
  const props = withDefaults(
110
113
  defineProps<{
111
114
  title: string;
112
115
  subtitle?: string;
113
116
  attributes?: { icon: string; label: string }[];
114
117
  actions?: ActionItem[];
115
- badge?: { icon: string; label: string; color: string };
118
+ badge?: BaseBadgeProps;
116
119
  layout?: 'default' | 'compact';
117
120
  breadcrumbs?: Breadcrumb[];
118
121
  maxActions?: number;
@@ -11,6 +11,8 @@
11
11
  :autocomplete="autocomplete ? 'on' : 'off'"
12
12
  :class="classes"
13
13
  @input="emitUpdate(transformInputValue($event))"
14
+ @blur="$emit('blur')"
15
+ @focus="$emit('focus')"
14
16
  />
15
17
  </template>
16
18
 
@@ -76,7 +78,7 @@ const props = defineProps({
76
78
  },
77
79
  });
78
80
 
79
- const emit = defineEmits(['update:modelValue']);
81
+ const emit = defineEmits(['update:modelValue', 'blur', 'focus']);
80
82
 
81
83
  const { nameInternal, requiredInternal, hasErrorInternal, emitUpdate, sizeInternal } =
82
84
  useField({