@omnitend/dashboard-for-laravel 0.30.0 → 0.31.0

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.
@@ -7,6 +7,14 @@ interface Props {
7
7
  textWhenTrue?: string;
8
8
  /** Text shown when off — overrides `label` in the off state (e.g. "Product is not current"). */
9
9
  textWhenFalse?: string;
10
+ /**
11
+ * On-state colour. `"success"` (default) reads the house green-on / red-off
12
+ * style — an active/enabled/good switch ("Product is current", "Stock is
13
+ * tracked", "Visible"). `"neutral"` is for semantically-mixed switches
14
+ * ("contains alcohol", an allergen toggle, "hidden on web shop") that
15
+ * shouldn't imply good/bad — it uses the brand primary on / grey off (#158).
16
+ */
17
+ onVariant?: "success" | "neutral";
10
18
  }
11
19
  declare var __VLS_4: {
12
20
  on: boolean;
@@ -20,6 +28,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
20
28
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
21
29
  }>, {
22
30
  modelValue: boolean;
31
+ onVariant: "success" | "neutral";
23
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
33
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
25
34
  export default _default;
@@ -30470,7 +30470,8 @@ const H$ = { class: "sidebar-header p-3" }, U$ = { class: "d-flex align-items-ce
30470
30470
  modelValue: { type: Boolean, default: !1 },
30471
30471
  label: {},
30472
30472
  textWhenTrue: {},
30473
- textWhenFalse: {}
30473
+ textWhenFalse: {},
30474
+ onVariant: { default: "success" }
30474
30475
  },
30475
30476
  emits: ["update:modelValue"],
30476
30477
  setup(e, { emit: t }) {
@@ -30479,12 +30480,13 @@ const H$ = { class: "sidebar-header p-3" }, U$ = { class: "d-flex align-items-ce
30479
30480
  set: (i) => l("update:modelValue", i)
30480
30481
  });
30481
30482
  return (i, u) => (b(), L("div", {
30482
- class: de(["dx-switch", { "dx-switch--on": o.value }])
30483
+ class: de(["dx-switch", [`dx-switch--${e.onVariant}`, { "dx-switch--on": o.value }]])
30483
30484
  }, [
30484
30485
  ce(ps, K({
30485
30486
  modelValue: s.value,
30486
30487
  "onUpdate:modelValue": u[0] || (u[0] = (f) => s.value = f),
30487
- switch: ""
30488
+ switch: "",
30489
+ class: e.onVariant === "neutral" ? "switch-neutral" : void 0
30488
30490
  }, i.$attrs), {
30489
30491
  default: C(() => [
30490
30492
  x(i.$slots, "default", { on: o.value }, () => [
@@ -30492,10 +30494,10 @@ const H$ = { class: "sidebar-header p-3" }, U$ = { class: "d-flex align-items-ce
30492
30494
  ], !0)
30493
30495
  ]),
30494
30496
  _: 3
30495
- }, 16, ["modelValue"])
30497
+ }, 16, ["modelValue", "class"])
30496
30498
  ], 2));
30497
30499
  }
30498
- }), Bd = /* @__PURE__ */ Qt(Sk, [["__scopeId", "data-v-d25b9a66"]]), oo = /* @__PURE__ */ M({
30500
+ }), Bd = /* @__PURE__ */ Qt(Sk, [["__scopeId", "data-v-f4d183e2"]]), oo = /* @__PURE__ */ M({
30499
30501
  inheritAttrs: !1,
30500
30502
  __name: "DFormInvalidFeedback",
30501
30503
  setup(e) {
@@ -31045,6 +31047,7 @@ const Nk = {
31045
31047
  key: 1,
31046
31048
  modelValue: W.value,
31047
31049
  "onUpdate:modelValue": se[2] || (se[2] = (ke) => W.value = ke),
31050
+ "on-variant": e.field.switchVariant,
31048
31051
  disabled: U.value || R.value || X.value
31049
31052
  }, he.value), {
31050
31053
  default: C(() => [
@@ -31054,7 +31057,7 @@ const Nk = {
31054
31057
  }, null, 8, ["label", "class"])
31055
31058
  ]),
31056
31059
  _: 1
31057
- }, 16, ["modelValue", "disabled"])),
31060
+ }, 16, ["modelValue", "on-variant", "disabled"])),
31058
31061
  e.form.hasError(v.value) ? (b(), O(oo, {
31059
31062
  key: 2,
31060
31063
  "force-show": ""
@@ -31123,6 +31126,7 @@ const Nk = {
31123
31126
  key: 1,
31124
31127
  modelValue: W.value,
31125
31128
  "onUpdate:modelValue": se[3] || (se[3] = (ke) => W.value = ke),
31129
+ "on-variant": e.field.switchVariant,
31126
31130
  disabled: U.value || R.value || X.value
31127
31131
  }, he.value), {
31128
31132
  default: C(() => [
@@ -31132,7 +31136,7 @@ const Nk = {
31132
31136
  }, null, 8, ["label", "info"])
31133
31137
  ]),
31134
31138
  _: 1
31135
- }, 16, ["modelValue", "disabled"])),
31139
+ }, 16, ["modelValue", "on-variant", "disabled"])),
31136
31140
  e.form.hasError(v.value) ? (b(), O(oo, {
31137
31141
  key: 2,
31138
31142
  "force-show": ""
@@ -31471,7 +31475,7 @@ const Nk = {
31471
31475
  }
31472
31476
  ]), 1040, ["class"]));
31473
31477
  }
31474
- }), dr = /* @__PURE__ */ Qt(Wk, [["__scopeId", "data-v-4dc68a7a"]]), $d = /* @__PURE__ */ M({
31478
+ }), dr = /* @__PURE__ */ Qt(Wk, [["__scopeId", "data-v-7a882f73"]]), $d = /* @__PURE__ */ M({
31475
31479
  __name: "DXFormField",
31476
31480
  props: {
31477
31481
  field: {},