sprintify-ui 0.7.2 → 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.
@@ -8211,6 +8211,10 @@ const dg = /* @__PURE__ */ Gi(rE, [["render", aE]]), sE = { class: "relative w-f
8211
8211
  default: !1,
8212
8212
  type: Boolean
8213
8213
  },
8214
+ showDeleteButton: {
8215
+ default: !0,
8216
+ type: Boolean
8217
+ },
8214
8218
  emptyOptionLabel: {
8215
8219
  default() {
8216
8220
  return ze("sui.none");
@@ -8371,7 +8375,7 @@ const dg = /* @__PURE__ */ Gi(rE, [["render", aE]]), sE = { class: "relative w-f
8371
8375
  Z,
8372
8376
  V
8373
8377
  ];
8374
- }), I = L(() => w.value && !r.disabled && r.showModelValue);
8378
+ }), I = L(() => w.value && !r.disabled && r.showModelValue && r.showDeleteButton);
8375
8379
  return t({
8376
8380
  focus: R,
8377
8381
  blur: N,
@@ -8574,6 +8578,10 @@ const SE = {
8574
8578
  default: !1,
8575
8579
  type: Boolean
8576
8580
  },
8581
+ showDeleteButton: {
8582
+ default: !0,
8583
+ type: Boolean
8584
+ },
8577
8585
  emptyOptionLabel: {
8578
8586
  default: void 0,
8579
8587
  type: String
@@ -8669,6 +8677,7 @@ const SE = {
8669
8677
  "focus-on-mount": n.focusOnMount,
8670
8678
  "show-empty-option": n.showEmptyOption,
8671
8679
  "empty-option-label": n.emptyOptionLabel,
8680
+ "show-delete-button": n.showDeleteButton,
8672
8681
  select: n.select,
8673
8682
  filter: E,
8674
8683
  onClear: y,
@@ -8689,7 +8698,7 @@ const SE = {
8689
8698
  ])
8690
8699
  ]),
8691
8700
  _: 3
8692
- }, 8, ["loading", "loading-bottom", "model-value", "disabled", "name", "placeholder", "options", "value-key", "label-key", "has-error", "required", "size", "inline", "dropdown-show", "show-model-value", "visible-focus", "focus-on-mount", "show-empty-option", "empty-option-label", "select", "onScrollBottom"]));
8701
+ }, 8, ["loading", "loading-bottom", "model-value", "disabled", "name", "placeholder", "options", "value-key", "label-key", "has-error", "required", "size", "inline", "dropdown-show", "show-model-value", "visible-focus", "focus-on-mount", "show-empty-option", "empty-option-label", "show-delete-button", "select", "onScrollBottom"]));
8693
8702
  }
8694
8703
  }), _E = ["src"], kE = { class: "truncate" }, AE = { class: "truncate font-light opacity-50" }, Al = /* @__PURE__ */ Ee({
8695
8704
  inheritAttrs: !1,
@@ -8982,6 +8991,10 @@ const SE = {
8982
8991
  default: !1,
8983
8992
  type: Boolean
8984
8993
  },
8994
+ showDeleteButton: {
8995
+ default: !0,
8996
+ type: Boolean
8997
+ },
8985
8998
  emptyOptionLabel: {
8986
8999
  default: void 0,
8987
9000
  type: String
@@ -9035,6 +9048,7 @@ const SE = {
9035
9048
  "dropdown-show": n.dropdownShow,
9036
9049
  "show-model-value": n.showModelValue,
9037
9050
  "show-empty-option": n.showEmptyOption,
9051
+ "show-delete-button": n.showDeleteButton,
9038
9052
  "empty-option-label": n.emptyOptionLabel,
9039
9053
  "visible-focus": n.visibleFocus,
9040
9054
  "focus-on-mount": n.focusOnMount,
@@ -9051,7 +9065,7 @@ const SE = {
9051
9065
  Ne(s.$slots, "footer", zt(jt(d)))
9052
9066
  ]),
9053
9067
  _: 3
9054
- }, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
9068
+ }, 8, ["model-value", "options", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "show-delete-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
9055
9069
  }
9056
9070
  }), NE = /* @__PURE__ */ Ee({
9057
9071
  __name: "BaseBelongsToFetch",
@@ -9128,6 +9142,10 @@ const SE = {
9128
9142
  default: !1,
9129
9143
  type: Boolean
9130
9144
  },
9145
+ showDeleteButton: {
9146
+ default: !0,
9147
+ type: Boolean
9148
+ },
9131
9149
  emptyOptionLabel: {
9132
9150
  default: void 0,
9133
9151
  type: String
@@ -9214,6 +9232,7 @@ const SE = {
9214
9232
  "dropdown-show": n.dropdownShow,
9215
9233
  "show-model-value": n.showModelValue,
9216
9234
  "show-empty-option": n.showEmptyOption,
9235
+ "show-delete-button": n.showDeleteButton,
9217
9236
  "empty-option-label": n.emptyOptionLabel,
9218
9237
  "visible-focus": n.visibleFocus,
9219
9238
  "focus-on-mount": n.focusOnMount,
@@ -9230,7 +9249,7 @@ const SE = {
9230
9249
  Ne(f.$slots, "footer", zt(jt(p)))
9231
9250
  ]),
9232
9251
  _: 3
9233
- }, 8, ["model-value", "url", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
9252
+ }, 8, ["model-value", "url", "disabled", "name", "placeholder", "required", "value-key", "label-key", "has-error", "inline", "size", "dropdown-show", "show-model-value", "show-empty-option", "show-delete-button", "empty-option-label", "visible-focus", "focus-on-mount", "select"]));
9234
9253
  }
9235
9254
  }), BE = { key: 0 }, PE = { key: 1 }, LE = /* @__PURE__ */ Ee({
9236
9255
  __name: "BaseBoolean",
@@ -27508,7 +27527,8 @@ const PM = ["disabled", "placeholder"], LM = /* @__PURE__ */ Ee({
27508
27527
  noCalendar: { type: Boolean, default: !1 },
27509
27528
  disableDates: { default() {
27510
27529
  return [];
27511
- } }
27530
+ } },
27531
+ showRemoveButton: { type: Boolean, default: !0 }
27512
27532
  },
27513
27533
  emits: ["update:modelValue"],
27514
27534
  setup(n, { emit: t }) {
@@ -27685,7 +27705,7 @@ const PM = ["disabled", "placeholder"], LM = /* @__PURE__ */ Ee({
27685
27705
  class: de(["w-full", C(b)]),
27686
27706
  placeholder: C(ze)("sui.click_or_select_date")
27687
27707
  }, null, 10, PM),
27688
- C(s) && !x.disabled && x.showInput ? (B(), K("div", {
27708
+ C(s) && !x.disabled && x.showInput && x.showRemoveButton ? (B(), K("div", {
27689
27709
  key: 1,
27690
27710
  class: de(C(_))
27691
27711
  }, [
@@ -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> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.7.2",
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
  },