sprintify-ui 0.7.1 → 0.7.3

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.
@@ -84,6 +84,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
84
84
  default: boolean;
85
85
  type: BooleanConstructor;
86
86
  };
87
+ showDeleteButton: {
88
+ default: boolean;
89
+ type: BooleanConstructor;
90
+ };
87
91
  emptyOptionLabel: {
88
92
  default(): string;
89
93
  type: StringConstructor;
@@ -184,6 +188,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
184
188
  default: boolean;
185
189
  type: BooleanConstructor;
186
190
  };
191
+ showDeleteButton: {
192
+ default: boolean;
193
+ type: BooleanConstructor;
194
+ };
187
195
  emptyOptionLabel: {
188
196
  default(): string;
189
197
  type: StringConstructor;
@@ -218,6 +226,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
218
226
  visibleFocus: boolean;
219
227
  focusOnMount: boolean;
220
228
  showEmptyOption: boolean;
229
+ showDeleteButton: boolean;
221
230
  emptyOptionLabel: string;
222
231
  }, {}>, {
223
232
  empty?(_: {
@@ -69,6 +69,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
69
69
  default: boolean;
70
70
  type: BooleanConstructor;
71
71
  };
72
+ showDeleteButton: {
73
+ default: boolean;
74
+ type: BooleanConstructor;
75
+ };
72
76
  emptyOptionLabel: {
73
77
  default: undefined;
74
78
  type: StringConstructor;
@@ -158,6 +162,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
158
162
  default: boolean;
159
163
  type: BooleanConstructor;
160
164
  };
165
+ showDeleteButton: {
166
+ default: boolean;
167
+ type: BooleanConstructor;
168
+ };
161
169
  emptyOptionLabel: {
162
170
  default: undefined;
163
171
  type: StringConstructor;
@@ -187,6 +195,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
187
195
  visibleFocus: boolean;
188
196
  focusOnMount: boolean;
189
197
  showEmptyOption: boolean;
198
+ showDeleteButton: boolean;
190
199
  emptyOptionLabel: string;
191
200
  queryKey: string;
192
201
  }, {}>, {
@@ -65,6 +65,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
65
65
  default: boolean;
66
66
  type: BooleanConstructor;
67
67
  };
68
+ showDeleteButton: {
69
+ default: boolean;
70
+ type: BooleanConstructor;
71
+ };
68
72
  emptyOptionLabel: {
69
73
  default: undefined;
70
74
  type: StringConstructor;
@@ -146,6 +150,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
146
150
  default: boolean;
147
151
  type: BooleanConstructor;
148
152
  };
153
+ showDeleteButton: {
154
+ default: boolean;
155
+ type: BooleanConstructor;
156
+ };
149
157
  emptyOptionLabel: {
150
158
  default: undefined;
151
159
  type: StringConstructor;
@@ -171,6 +179,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
171
179
  visibleFocus: boolean;
172
180
  focusOnMount: boolean;
173
181
  showEmptyOption: boolean;
182
+ showDeleteButton: boolean;
174
183
  emptyOptionLabel: string;
175
184
  primaryKey: string;
176
185
  }, {}>, {
@@ -73,6 +73,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
73
73
  default: boolean;
74
74
  type: BooleanConstructor;
75
75
  };
76
+ showDeleteButton: {
77
+ default: boolean;
78
+ type: BooleanConstructor;
79
+ };
76
80
  emptyOptionLabel: {
77
81
  default: undefined;
78
82
  type: StringConstructor;
@@ -162,6 +166,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
162
166
  default: boolean;
163
167
  type: BooleanConstructor;
164
168
  };
169
+ showDeleteButton: {
170
+ default: boolean;
171
+ type: BooleanConstructor;
172
+ };
165
173
  emptyOptionLabel: {
166
174
  default: undefined;
167
175
  type: StringConstructor;
@@ -187,6 +195,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
187
195
  visibleFocus: boolean;
188
196
  focusOnMount: boolean;
189
197
  showEmptyOption: boolean;
198
+ showDeleteButton: boolean;
190
199
  emptyOptionLabel: string;
191
200
  primaryKey: string;
192
201
  showRouteUrl: ((id: string | number) => string) | undefined;
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
14
14
  mode?: "multiple" | "single" | "range" | "time" | undefined;
15
15
  noCalendar?: boolean | undefined;
16
16
  disableDates?: (string | Date | ((date: Date) => boolean))[] | undefined;
17
+ showRemoveButton?: boolean | undefined;
17
18
  }>, {
18
19
  modelValue: null;
19
20
  required: undefined;
@@ -28,6 +29,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
28
29
  enableTime: boolean;
29
30
  mode: string;
30
31
  noCalendar: boolean;
32
+ showRemoveButton: boolean;
31
33
  disableDates(): never[];
32
34
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
35
  "update:modelValue": (...args: any[]) => void;
@@ -46,6 +48,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
46
48
  mode?: "multiple" | "single" | "range" | "time" | undefined;
47
49
  noCalendar?: boolean | undefined;
48
50
  disableDates?: (string | Date | ((date: Date) => boolean))[] | undefined;
51
+ showRemoveButton?: boolean | undefined;
49
52
  }>, {
50
53
  modelValue: null;
51
54
  required: undefined;
@@ -60,6 +63,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
60
63
  enableTime: boolean;
61
64
  mode: string;
62
65
  noCalendar: boolean;
66
+ showRemoveButton: boolean;
63
67
  disableDates(): never[];
64
68
  }>>> & {
65
69
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -78,6 +82,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
78
82
  enableTime: boolean;
79
83
  noCalendar: boolean;
80
84
  disableDates: (string | Date | ((date: Date) => boolean))[];
85
+ showRemoveButton: boolean;
81
86
  }, {}>;
82
87
  export default _default;
83
88
  type __VLS_WithDefaults<P, D> = {
@@ -1,7 +1,7 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { App } from 'vue';
3
3
  import { useDialogsStore } from './stores/dialogs';
4
- import { useSnackbarsStore, useNotificationsStore } from './stores/snackbars';
4
+ import { useSnackbarsStore } from './stores/snackbars';
5
5
  import { useSystemAlertStore } from './stores/systemAlerts';
6
6
  import { useClickOutside } from './composables/clickOutside';
7
7
  import { useField } from './composables/field';
@@ -246,7 +246,6 @@ export { messages };
246
246
  export { config };
247
247
  export { useDialogsStore };
248
248
  export { useSnackbarsStore };
249
- export { useNotificationsStore };
250
249
  export { useSystemAlertStore };
251
250
  export { useClickOutside };
252
251
  export { useField };
@@ -8,12 +8,3 @@ export declare const useSnackbarsStore: import("pinia").StoreDefinition<"notific
8
8
  remove(snackbar: Snackbar): void;
9
9
  clear(): void;
10
10
  }>;
11
- export declare const useNotificationsStore: import("pinia").StoreDefinition<"notifications", {
12
- count: number;
13
- snackbars: Snackbar[];
14
- timeouts: Record<number, number>;
15
- }, {}, {
16
- push(options: SnackbarOptions): void;
17
- remove(snackbar: Snackbar): void;
18
- clear(): void;
19
- }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -44,7 +44,7 @@
44
44
  </div>
45
45
 
46
46
  <div
47
- v-if="showDeleteButton"
47
+ v-if="showDeleteButtonInternal"
48
48
  class="absolute right-0 top-0 flex h-full p-1"
49
49
  >
50
50
  <button
@@ -197,6 +197,10 @@ const props = defineProps({
197
197
  default: false,
198
198
  type: Boolean,
199
199
  },
200
+ showDeleteButton: {
201
+ default: true,
202
+ type: Boolean,
203
+ },
200
204
  emptyOptionLabel: {
201
205
  default() {
202
206
  return t('sui.none');
@@ -511,7 +515,7 @@ const deleteButtonIconClasses = computed(() => {
511
515
 
512
516
  const inputClasses = computed(() => {
513
517
  const base = 'w-full';
514
- const paddingRight = showDeleteButton.value ? 'pr-5' : '';
518
+ const paddingRight = showDeleteButtonInternal.value ? 'pr-5' : '';
515
519
  const withSelect = props.select ? 'rounded-l-none' : '';
516
520
 
517
521
  return [
@@ -521,8 +525,8 @@ const inputClasses = computed(() => {
521
525
  ];
522
526
  })
523
527
 
524
- const showDeleteButton = computed(() => {
525
- return normalizedModelValue.value && !props.disabled && props.showModelValue;
528
+ const showDeleteButtonInternal = computed(() => {
529
+ return normalizedModelValue.value && !props.disabled && props.showModelValue && props.showDeleteButton;
526
530
  });
527
531
 
528
532
  defineExpose({
@@ -20,6 +20,7 @@
20
20
  :focus-on-mount="focusOnMount"
21
21
  :show-empty-option="showEmptyOption"
22
22
  :empty-option-label="emptyOptionLabel"
23
+ :show-delete-button="showDeleteButton"
23
24
  :select="select"
24
25
  :filter="filterOptions"
25
26
  @clear="onClear"
@@ -154,6 +155,10 @@ const props = defineProps({
154
155
  default: false,
155
156
  type: Boolean,
156
157
  },
158
+ showDeleteButton: {
159
+ default: true,
160
+ type: Boolean,
161
+ },
157
162
  emptyOptionLabel: {
158
163
  default: undefined,
159
164
  type: String,
@@ -15,6 +15,7 @@
15
15
  :dropdown-show="dropdownShow"
16
16
  :show-model-value="showModelValue"
17
17
  :show-empty-option="showEmptyOption"
18
+ :show-delete-button="showDeleteButton"
18
19
  :empty-option-label="emptyOptionLabel"
19
20
  :visible-focus="visibleFocus"
20
21
  :focus-on-mount="focusOnMount"
@@ -115,6 +116,10 @@ const props = defineProps({
115
116
  default: false,
116
117
  type: Boolean,
117
118
  },
119
+ showDeleteButton: {
120
+ default: true,
121
+ type: Boolean,
122
+ },
118
123
  emptyOptionLabel: {
119
124
  default: undefined,
120
125
  type: String,
@@ -15,6 +15,7 @@
15
15
  :dropdown-show="dropdownShow"
16
16
  :show-model-value="showModelValue"
17
17
  :show-empty-option="showEmptyOption"
18
+ :show-delete-button="showDeleteButton"
18
19
  :empty-option-label="emptyOptionLabel"
19
20
  :visible-focus="visibleFocus"
20
21
  :focus-on-mount="focusOnMount"
@@ -126,6 +127,10 @@ const props = defineProps({
126
127
  default: false,
127
128
  type: Boolean,
128
129
  },
130
+ showDeleteButton: {
131
+ default: true,
132
+ type: Boolean,
133
+ },
129
134
  emptyOptionLabel: {
130
135
  default: undefined,
131
136
  type: String,
@@ -24,7 +24,7 @@
24
24
  :placeholder="t('sui.click_or_select_date')"
25
25
  >
26
26
  <div
27
- v-if="modelValueFormatted && !disabled && showInput"
27
+ v-if="modelValueFormatted && !disabled && showInput && showRemoveButton"
28
28
  :class="closeWrapClasses"
29
29
  >
30
30
  <button
@@ -73,6 +73,7 @@ const props = withDefaults(
73
73
  mode?: 'single' | 'multiple' | 'range' | 'time';
74
74
  noCalendar?: boolean;
75
75
  disableDates?: (string | Date | ((date: Date) => boolean))[];
76
+ showRemoveButton?: boolean;
76
77
  }>(),
77
78
  {
78
79
  modelValue: null,
@@ -88,6 +89,7 @@ const props = withDefaults(
88
89
  enableTime: false,
89
90
  mode: 'single',
90
91
  noCalendar: false,
92
+ showRemoveButton: true,
91
93
  disableDates() {
92
94
  return [];
93
95
  },
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ import QueryString from 'qs';
5
5
  import en from '@/lang/en.json';
6
6
  import fr from '@/lang/fr.json';
7
7
  import { useDialogsStore } from './stores/dialogs';
8
- import { useSnackbarsStore, useNotificationsStore } from './stores/snackbars';
8
+ import { useSnackbarsStore } from './stores/snackbars';
9
9
  import { useSystemAlertStore } from './stores/systemAlerts';
10
10
  import { useClickOutside } from './composables/clickOutside';
11
11
  import { useField } from './composables/field';
@@ -125,7 +125,6 @@ export { config };
125
125
 
126
126
  export { useDialogsStore };
127
127
  export { useSnackbarsStore };
128
- export { useNotificationsStore };
129
128
  export { useSystemAlertStore };
130
129
  export { useClickOutside };
131
130
  export { useField };
@@ -45,5 +45,3 @@ export const useSnackbarsStore = defineStore('notifications', {
45
45
  },
46
46
  },
47
47
  });
48
-
49
- export const useNotificationsStore = useSnackbarsStore;