@rocketui/vue 0.2.57 → 0.2.59

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.
@@ -2293,6 +2293,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2293
2293
  tooltipClass: string;
2294
2294
  showSelectAll: boolean;
2295
2295
  selectAllText: string;
2296
+ disableDeselect: boolean;
2296
2297
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2297
2298
  "update:modelValue": (...args: any[]) => void;
2298
2299
  clear: (...args: any[]) => void;
@@ -2323,6 +2324,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2323
2324
  tooltipClass: string;
2324
2325
  showSelectAll: boolean;
2325
2326
  selectAllText: string;
2327
+ disableDeselect: boolean;
2326
2328
  }>>> & {
2327
2329
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
2328
2330
  onClear?: ((...args: any[]) => any) | undefined;
@@ -2352,6 +2354,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2352
2354
  hideChipClear: boolean;
2353
2355
  showSelectAll: boolean;
2354
2356
  selectAllText: string;
2357
+ disableDeselect: boolean;
2355
2358
  }, {}>, {
2356
2359
  prepend?(_: {
2357
2360
  active: boolean;
@@ -3169,6 +3172,14 @@ declare interface SelectProps {
3169
3172
  * <Dropdown selectAllText="Select all" />
3170
3173
  */
3171
3174
  selectAllText?: string;
3175
+ /**
3176
+ * Disable deselecting the selected option
3177
+ * @type {boolean}
3178
+ * @default false
3179
+ * @example
3180
+ * <Dropdown disableDeselect />
3181
+ */
3182
+ disableDeselect?: boolean;
3172
3183
  }
3173
3184
 
3174
3185
  declare interface Tab {
@@ -8896,7 +8896,8 @@ const N5 = ["aria-disabled"], I5 = ["innerHTML"], Q5 = ["id"], G5 = /* @__PURE__
8896
8896
  hideChipClear: { type: Boolean, default: !1 },
8897
8897
  tooltipClass: { default: "" },
8898
8898
  showSelectAll: { type: Boolean, default: !1 },
8899
- selectAllText: { default: "Select all" }
8899
+ selectAllText: { default: "Select all" },
8900
+ disableDeselect: { type: Boolean, default: !1 }
8900
8901
  },
8901
8902
  emits: ["update:modelValue", "clear", "removeOption"],
8902
8903
  setup(H, { emit: V }) {
@@ -8957,7 +8958,7 @@ const N5 = ["aria-disabled"], I5 = ["innerHTML"], Q5 = ["id"], G5 = /* @__PURE__
8957
8958
  }
8958
8959
  }
8959
8960
  function k(a, s) {
8960
- if (i.value.value === s.value) {
8961
+ if (i.value.value === s.value && !C.disableDeselect) {
8961
8962
  i.value = {}, e.value = "", M("update:modelValue", ""), M("removeOption", s);
8962
8963
  return;
8963
8964
  }
@@ -9175,7 +9176,8 @@ const N5 = ["aria-disabled"], I5 = ["innerHTML"], Q5 = ["id"], G5 = /* @__PURE__
9175
9176
  "aria-disabled": c.disabled,
9176
9177
  class: p(["r-dropdown-options__option", {
9177
9178
  "r-dropdown-options__option--active": R(c),
9178
- "r-dropdown-options__option--disabled": c.disabled
9179
+ "r-dropdown-options__option--disabled": c.disabled,
9180
+ "r-dropdown-options__option--deselect": R(c) && C.disableDeselect
9179
9181
  }]),
9180
9182
  onClick: A1((E) => w(E, c, P, T), ["prevent"])
9181
9183
  }, [