@rocketui/vue 0.2.90 → 0.2.92

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.
@@ -2524,6 +2524,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2524
2524
  selectAllText: string;
2525
2525
  disableDeselect: boolean;
2526
2526
  maxVisibleChips: number;
2527
+ persistent: boolean;
2527
2528
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2528
2529
  "update:modelValue": (...args: any[]) => void;
2529
2530
  clear: (...args: any[]) => void;
@@ -2556,6 +2557,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2556
2557
  selectAllText: string;
2557
2558
  disableDeselect: boolean;
2558
2559
  maxVisibleChips: number;
2560
+ persistent: boolean;
2559
2561
  }>>> & {
2560
2562
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
2561
2563
  onClear?: ((...args: any[]) => any) | undefined;
@@ -2568,6 +2570,7 @@ export declare const RDropdown: __VLS_WithTemplateSlots_6<DefineComponent<__VLS_
2568
2570
  clearable: boolean;
2569
2571
  options: any;
2570
2572
  tooltipClass: string;
2573
+ persistent: boolean;
2571
2574
  modelValue: any;
2572
2575
  placeholder: string;
2573
2576
  chips: boolean;
@@ -3539,6 +3542,14 @@ declare interface SelectProps {
3539
3542
  * <Dropdown :maxVisibleChips="3" />
3540
3543
  */
3541
3544
  maxVisibleChips?: number;
3545
+ /**
3546
+ * Persistent dropdown
3547
+ * @type {boolean}
3548
+ * @default false
3549
+ * @example
3550
+ * <Dropdown :persistent="true" />
3551
+ */
3552
+ persistent?: boolean;
3542
3553
  }
3543
3554
 
3544
3555
  declare interface Tab {
@@ -7722,7 +7722,7 @@ const x2 = {
7722
7722
  id: `${l.value}`,
7723
7723
  class: "r-checkbox-texts__label",
7724
7724
  "data-disabled": C.disabled,
7725
- for: C.id
7725
+ for: l.value
7726
7726
  }, v(C.label), 9, l5),
7727
7727
  C.hideDetails ? g("", !0) : (m(), a("div", {
7728
7728
  key: 0,
@@ -8995,7 +8995,8 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
8995
8995
  showSelectAll: { type: Boolean, default: !1 },
8996
8996
  selectAllText: { default: "Select all" },
8997
8997
  disableDeselect: { type: Boolean, default: !1 },
8998
- maxVisibleChips: { default: 2 }
8998
+ maxVisibleChips: { default: 2 },
8999
+ persistent: { type: Boolean, default: !1 }
8999
9000
  },
9000
9001
  emits: ["update:modelValue", "clear", "removeOption"],
9001
9002
  setup(H, { emit: V }) {
@@ -9052,14 +9053,18 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9052
9053
  document.querySelectorAll(".r-dropdown--active").forEach((G) => {
9053
9054
  var B1;
9054
9055
  if (G.id !== ((B1 = B.value) == null ? void 0 : B1.id) && G.classList.contains("r-dropdown--active")) {
9055
- const H2 = n(G);
9056
+ const H2 = n(
9057
+ G
9058
+ );
9056
9059
  H2 && o(H2), G.childNodes.forEach((V1) => {
9057
9060
  V1 != null && V1.classList && (Object == null || Object.values(V1 == null ? void 0 : V1.classList).filter((N1) => N1.includes("--active")).forEach((N1) => {
9058
9061
  V1 == null || V1.classList.remove(N1);
9059
9062
  }));
9060
9063
  }), G.classList.remove("r-dropdown--active");
9061
9064
  }
9062
- }), s != null && s.classList.contains("r-dropdown--active") ? (s.classList.remove("r-dropdown--active"), M.value = !1, (X = B.value) == null || X.blur(), (p = y.value) == null || p.blur(), d.value && o(d.value)) : (s == null || s.classList.add("r-dropdown--active"), M.value = !0, (Q = B.value) == null || Q.focus(), (k1 = y.value) == null || k1.focus(), d.value || (d.value = n(c.value || B.value)), d.value && u(d.value), s == null || s.childNodes.forEach((G) => {
9065
+ }), s != null && s.classList.contains("r-dropdown--active") ? (s.classList.remove("r-dropdown--active"), M.value = !1, (X = B.value) == null || X.blur(), (p = y.value) == null || p.blur(), d.value && o(d.value)) : (s == null || s.classList.add("r-dropdown--active"), M.value = !0, (Q = B.value) == null || Q.focus(), (k1 = y.value) == null || k1.focus(), d.value || (d.value = n(
9066
+ c.value || B.value
9067
+ )), d.value && u(d.value), s == null || s.childNodes.forEach((G) => {
9063
9068
  G != null && G.classList && (Object == null || Object.values(G == null ? void 0 : G.classList).forEach((B1) => {
9064
9069
  G == null || G.classList.add(`${B1}--active`);
9065
9070
  }));
@@ -9080,7 +9085,9 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9080
9085
  if (!L.value.find((Q) => Q.value === s.value))
9081
9086
  L.value.push(s);
9082
9087
  else {
9083
- const Q = L.value.findIndex((k1) => k1.value === s.value);
9088
+ const Q = L.value.findIndex(
9089
+ (k1) => k1.value === s.value
9090
+ );
9084
9091
  L.value.splice(Q, 1), i("removeOption", s);
9085
9092
  }
9086
9093
  e.value = "", C.searchable && ((p = y.value) == null || p.focus());
@@ -9100,7 +9107,9 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9100
9107
  if (t instanceof KeyboardEvent && t.key !== "Backspace" || e.value !== "")
9101
9108
  return;
9102
9109
  t.stopPropagation(), P();
9103
- const X = L.value.findIndex((p) => p.value === s.value);
9110
+ const X = L.value.findIndex(
9111
+ (p) => p.value === s.value
9112
+ );
9104
9113
  L.value.splice(X, 1), i("removeOption", s), i("update:modelValue", L.value);
9105
9114
  }
9106
9115
  function J(t, s) {
@@ -9111,7 +9120,9 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9111
9120
  const P = e.value;
9112
9121
  if (P === "")
9113
9122
  return;
9114
- S.value.find((Q) => Q.label === P) || (L.value.push({ value: P, label: P }), e.value = "", (p = y.value) == null || p.focus());
9123
+ S.value.find(
9124
+ (Q) => Q.label === P
9125
+ ) || (L.value.push({ value: P, label: P }), e.value = "", (p = y.value) == null || p.focus());
9115
9126
  }
9116
9127
  function h(t) {
9117
9128
  var s;
@@ -9140,7 +9151,10 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9140
9151
  }
9141
9152
  const j = f(() => !C.multiple || !Array.isArray(C.modelValue) ? [] : C.modelValue.slice(0, C.maxVisibleChips)), z = f(() => !C.multiple || !Array.isArray(C.modelValue) ? 0 : Math.max(0, C.modelValue.length - C.maxVisibleChips));
9142
9153
  return o2(() => {
9143
- N(), navigator.userAgent.includes("iPhone") && document.querySelector("[name=viewport]").setAttribute("content", "width=device-width, initial-scale=1, maximum-scale=1");
9154
+ N(), navigator.userAgent.includes("iPhone") && document.querySelector("[name=viewport]").setAttribute(
9155
+ "content",
9156
+ "width=device-width, initial-scale=1, maximum-scale=1"
9157
+ );
9144
9158
  }), W(
9145
9159
  L,
9146
9160
  (t) => {
@@ -9149,9 +9163,12 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9149
9163
  {
9150
9164
  deep: !0
9151
9165
  }
9152
- ), W(() => b.value, (t) => {
9153
- N();
9154
- }), q1(() => {
9166
+ ), W(
9167
+ () => b.value,
9168
+ (t) => {
9169
+ N();
9170
+ }
9171
+ ), q1(() => {
9155
9172
  M.value && d.value && o(d.value);
9156
9173
  }), (t, s) => (m(), a("div", {
9157
9174
  id: t.id,
@@ -9169,6 +9186,7 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9169
9186
  "tooltip-class": ["w-full", C.tooltipClass],
9170
9187
  "trigger-class": "w-full",
9171
9188
  triggers: ["click"],
9189
+ persistent: C.persistent,
9172
9190
  type: "dropdown",
9173
9191
  onHide: s[1] || (s[1] = (P) => {
9174
9192
  _(P);
@@ -9266,7 +9284,11 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9266
9284
  type: "text",
9267
9285
  onInput: r1((p) => l1(P), ["prevent"]),
9268
9286
  onKeydown: [
9269
- L2((p) => $(p, L.value[L.value.length - 1], P), ["backspace"]),
9287
+ L2((p) => $(
9288
+ p,
9289
+ L.value[L.value.length - 1],
9290
+ P
9291
+ ), ["backspace"]),
9270
9292
  L2((p) => J(p, P), ["enter"])
9271
9293
  ]
9272
9294
  }, null, 42, u3), [
@@ -9325,7 +9347,12 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9325
9347
  "r-dropdown-options__option--active": L.value.length === F.value.length,
9326
9348
  "r-dropdown-options__option--disabled": !1
9327
9349
  }]),
9328
- onClick: r1((p) => x(p, { label: C.selectAllText, value: "select-all" }, P, X), ["prevent"])
9350
+ onClick: r1((p) => x(
9351
+ p,
9352
+ { label: C.selectAllText, value: "select-all" },
9353
+ P,
9354
+ X
9355
+ ), ["prevent"])
9329
9356
  }, [
9330
9357
  Z("div", O3, [
9331
9358
  Z("p", f3, v(C.selectAllText), 1)
@@ -9412,7 +9439,7 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9412
9439
  ], 10, c3)
9413
9440
  ]),
9414
9441
  _: 3
9415
- }, 8, ["id", "disabled", "tooltip-class"]),
9442
+ }, 8, ["id", "disabled", "tooltip-class", "persistent"]),
9416
9443
  t.$props.hideDetails ? g("", !0) : (m(), a("div", {
9417
9444
  key: 0,
9418
9445
  id: `${t.id}-details`,
@@ -9741,7 +9768,7 @@ const i3 = ["id", "aria-disabled"], A3 = ["innerHTML"], e3 = ["id"], d3 = ["id"]
9741
9768
  Z("label", {
9742
9769
  id: `${M.value}`,
9743
9770
  class: "r-switch-texts__label",
9744
- for: C.id
9771
+ for: M.value
9745
9772
  }, v(C.label), 9, j3),
9746
9773
  C.hideDetails ? g("", !0) : (m(), a("div", {
9747
9774
  key: 0,
@@ -9930,9 +9957,9 @@ const C0 = ["id", "aria-disabled", "aria-selected", "disabled"], H0 = { key: 0 }
9930
9957
  key: 0,
9931
9958
  id: `${M.value}`,
9932
9959
  class: "r-textarea__label",
9933
- for: "textarea",
9960
+ for: M.value,
9934
9961
  text: C.label
9935
- }, null, 8, ["id", "text"])) : g("", !0),
9962
+ }, null, 8, ["id", "for", "text"])) : g("", !0),
9936
9963
  Z("textarea", E1(e.$attrs, {
9937
9964
  id: `${M.value}`,
9938
9965
  class: ["r-textarea", {