@gomusdev/web-components 4.12.0 → 4.13.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.
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.13.0 (2026-07-28)
4
+
5
+ ### Features
6
+
7
+ * **cart:** make − remove the line at its minimum quantity
8
+
3
9
  ## 4.12.0 (2026-07-28)
4
10
 
5
11
  ### Features
@@ -6378,6 +6378,18 @@ createHTML: (html) => {
6378
6378
  console.warn(`[go] Invalid locale "${locale}" — not a valid BCP 47 language tag (use "de", "de-CH", "en", …). Price and date formatting will throw.`);
6379
6379
  }
6380
6380
  }
6381
+ var defaultTranslations_default = {
6382
+ en: {
6383
+ "quantity.remove": "Remove item",
6384
+ "quantity.remove.label": "✕",
6385
+ "cart.item.remove": "✕"
6386
+ },
6387
+ de: {
6388
+ "quantity.remove": "Artikel entfernen",
6389
+ "quantity.remove.label": "✕",
6390
+ "cart.item.remove": "✕"
6391
+ }
6392
+ };
6381
6393
  //#endregion
6382
6394
  //#region src/lib/helpers/urls.ts
6383
6395
  var ANGULAR_URLS = {
@@ -13723,6 +13735,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13723
13735
  success: false,
13724
13736
  errors: ["Not signed in"]
13725
13737
  } };
13738
+ var defaultTranslations = defaultTranslations_default;
13726
13739
  var Shop = class {
13727
13740
  type;
13728
13741
  #data = /* @__PURE__ */ state(proxy({
@@ -13790,7 +13803,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13790
13803
  return this.shop?.config.donations;
13791
13804
  }
13792
13805
  get translations() {
13793
- return this.shop?.translations;
13806
+ return {
13807
+ ...defaultTranslations[(this.locale ?? "en").toLowerCase().split(/[-_]/)[0]] ?? defaultTranslations.en,
13808
+ ...this.shop?.translations
13809
+ };
13794
13810
  }
13795
13811
  get currency() {
13796
13812
  return this.shop?.config.currency;
@@ -15753,23 +15769,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15753
15769
  }
15754
15770
  //#endregion
15755
15771
  //#region src/components/shared/quantityStepper/QuantityStepper.svelte
15756
- var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15772
+ var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15757
15773
  function QuantityStepper($$anchor, $$props) {
15758
15774
  const inputId = props_id();
15759
15775
  push($$props, true);
15760
- let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onChange = prop($$props, "onChange", 7);
15761
- const bounds = /* @__PURE__ */ user_derived(() => ({
15776
+ let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), removeAriaLabel = prop($$props, "removeAriaLabel", 7), removeLabel = prop($$props, "removeLabel", 7, "✕"), onChange = prop($$props, "onChange", 7);
15777
+ const removeMode = /* @__PURE__ */ user_derived(() => onDecrementBelowMin() != null);
15778
+ const removeBottom = /* @__PURE__ */ user_derived(() => Math.max(min(), 1));
15779
+ const bounds = /* @__PURE__ */ user_derived(() => get$2(removeMode) ? {
15780
+ min: get$2(removeBottom),
15781
+ max: max(),
15782
+ floor: get$2(removeBottom)
15783
+ } : {
15762
15784
  min: min(),
15763
15785
  max: max(),
15764
15786
  floor: floor()
15765
- }));
15787
+ });
15788
+ const atRemove = /* @__PURE__ */ user_derived(() => get$2(removeMode) && value() <= get$2(removeBottom));
15766
15789
  let inputEl;
15767
15790
  let invalid = /* @__PURE__ */ state(false);
15768
- const decDisabled = /* @__PURE__ */ user_derived(() => !canDecrement(value(), get$2(bounds)));
15791
+ const decDisabled = /* @__PURE__ */ user_derived(() => !get$2(atRemove) && !canDecrement(value(), get$2(bounds)));
15769
15792
  const incDisabled = /* @__PURE__ */ user_derived(() => !canIncrement(value(), get$2(bounds)));
15770
15793
  function emit(next) {
15771
15794
  if (next !== value()) onChange()(next);
15772
15795
  }
15796
+ function pressDecrement() {
15797
+ if (get$2(atRemove)) onDecrementBelowMin()();
15798
+ else stepDown();
15799
+ }
15773
15800
  function stepDown() {
15774
15801
  if (canDecrement(value(), get$2(bounds))) emit(decrement(value(), get$2(bounds)));
15775
15802
  }
@@ -15777,7 +15804,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15777
15804
  if (canIncrement(value(), get$2(bounds))) emit(increment(value(), get$2(bounds)));
15778
15805
  }
15779
15806
  function commitTyped() {
15780
- const next = clampTyped(parseInt(inputEl.value, 10), get$2(bounds));
15807
+ const raw = parseInt(inputEl.value, 10);
15808
+ if (get$2(removeMode) && (!Number.isFinite(raw) || raw <= 0)) {
15809
+ set(invalid, false);
15810
+ inputEl.value = String(value());
15811
+ onDecrementBelowMin()();
15812
+ return;
15813
+ }
15814
+ const next = clampTyped(raw, get$2(bounds));
15781
15815
  set(invalid, false);
15782
15816
  inputEl.value = String(next);
15783
15817
  emit(next);
@@ -15798,7 +15832,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15798
15832
  break;
15799
15833
  case "Home":
15800
15834
  e.preventDefault();
15801
- emit(floor());
15835
+ emit(get$2(bounds).floor);
15802
15836
  break;
15803
15837
  case "End":
15804
15838
  e.preventDefault();
@@ -15860,6 +15894,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15860
15894
  increaseLabel($$value);
15861
15895
  flushSync();
15862
15896
  },
15897
+ get onDecrementBelowMin() {
15898
+ return onDecrementBelowMin();
15899
+ },
15900
+ set onDecrementBelowMin($$value) {
15901
+ onDecrementBelowMin($$value);
15902
+ flushSync();
15903
+ },
15904
+ get removeAriaLabel() {
15905
+ return removeAriaLabel();
15906
+ },
15907
+ set removeAriaLabel($$value) {
15908
+ removeAriaLabel($$value);
15909
+ flushSync();
15910
+ },
15911
+ get removeLabel() {
15912
+ return removeLabel();
15913
+ },
15914
+ set removeLabel($$value = "✕") {
15915
+ removeLabel($$value);
15916
+ flushSync();
15917
+ },
15863
15918
  get onChange() {
15864
15919
  return onChange();
15865
15920
  },
@@ -15870,6 +15925,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15870
15925
  };
15871
15926
  var div = root$50();
15872
15927
  var button = child(div);
15928
+ let classes;
15929
+ var span = child(button);
15930
+ var text = child(span, true);
15931
+ reset(span);
15932
+ reset(button);
15873
15933
  var input = sibling(button, 2);
15874
15934
  remove_input_defaults(input);
15875
15935
  bind_this(input, ($$value) => inputEl = $$value, () => inputEl);
@@ -15877,21 +15937,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15877
15937
  reset(div);
15878
15938
  template_effect(() => {
15879
15939
  set_attribute(div, "aria-label", label());
15880
- set_attribute(button, "title", decreaseLabel());
15940
+ classes = set_class(button, 1, "go-quantity-stepper-button go-quantity-stepper-decrement", null, classes, { "go-quantity-stepper-remove": get$2(atRemove) });
15941
+ set_attribute(button, "title", get$2(atRemove) ? removeAriaLabel() : decreaseLabel());
15881
15942
  set_attribute(button, "aria-controls", inputId);
15882
15943
  set_attribute(button, "aria-disabled", get$2(decDisabled));
15944
+ set_text(text, get$2(atRemove) ? removeLabel() : "−");
15883
15945
  set_attribute(input, "id", inputId);
15884
15946
  set_attribute(input, "aria-label", label());
15885
15947
  set_value(input, value());
15886
15948
  set_attribute(input, "aria-valuenow", value());
15887
- set_attribute(input, "aria-valuemin", floor());
15949
+ set_attribute(input, "aria-valuemin", get$2(bounds).floor);
15888
15950
  set_attribute(input, "aria-valuemax", max());
15889
15951
  set_attribute(input, "aria-invalid", get$2(invalid) ? "true" : void 0);
15890
15952
  set_attribute(button_1, "title", increaseLabel());
15891
15953
  set_attribute(button_1, "aria-controls", inputId);
15892
15954
  set_attribute(button_1, "aria-disabled", get$2(incDisabled));
15893
15955
  });
15894
- delegated("click", button, stepDown);
15956
+ delegated("click", button, pressDecrement);
15895
15957
  delegated("input", input, onInput);
15896
15958
  delegated("change", input, commitTyped);
15897
15959
  event("blur", input, commitTyped);
@@ -15914,6 +15976,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15914
15976
  label: {},
15915
15977
  decreaseLabel: {},
15916
15978
  increaseLabel: {},
15979
+ onDecrementBelowMin: {},
15980
+ removeAriaLabel: {},
15981
+ removeLabel: {},
15917
15982
  onChange: {}
15918
15983
  }, [], [], { mode: "open" });
15919
15984
  //#endregion
@@ -15954,8 +16019,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15954
16019
  * `min_persons`) a hard bottom on both controls: the backend does not enforce it,
15955
16020
  * so the UI must (Angular-shop parity).
15956
16021
  */
16022
+ /**
16023
+ * Cart-only: when set, the stepper's `−` at the order minimum removes the line instead of
16024
+ * stepping (fires this). Presence turns the behaviour on; the legacy `<select>` ignores it.
16025
+ */
15957
16026
  /** Emits the next committed quantity. The control never mutates anything itself. */
15958
- let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onChange = prop($$props, "onChange", 7);
16027
+ let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), onChange = prop($$props, "onChange", 7);
15959
16028
  const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
15960
16029
  var $$exports = {
15961
16030
  get value() {
@@ -16000,6 +16069,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16000
16069
  deselectable($$value);
16001
16070
  flushSync();
16002
16071
  },
16072
+ get onDecrementBelowMin() {
16073
+ return onDecrementBelowMin();
16074
+ },
16075
+ set onDecrementBelowMin($$value) {
16076
+ onDecrementBelowMin($$value);
16077
+ flushSync();
16078
+ },
16003
16079
  get onChange() {
16004
16080
  return onChange();
16005
16081
  },
@@ -16015,6 +16091,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16015
16091
  let $0 = /* @__PURE__ */ user_derived(() => deselectable() ? 0 : min());
16016
16092
  let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
16017
16093
  let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
16094
+ let $3 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove"));
16095
+ let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove.label"));
16018
16096
  QuantityStepper($$anchor, {
16019
16097
  get value() {
16020
16098
  return value();
@@ -16037,6 +16115,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16037
16115
  get increaseLabel() {
16038
16116
  return get$2($2);
16039
16117
  },
16118
+ get onDecrementBelowMin() {
16119
+ return onDecrementBelowMin();
16120
+ },
16121
+ get removeAriaLabel() {
16122
+ return get$2($3);
16123
+ },
16124
+ get removeLabel() {
16125
+ return get$2($4);
16126
+ },
16040
16127
  get onChange() {
16041
16128
  return onChange();
16042
16129
  }
@@ -16077,6 +16164,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16077
16164
  label: {},
16078
16165
  floor: {},
16079
16166
  deselectable: {},
16167
+ onDecrementBelowMin: {},
16080
16168
  onChange: {}
16081
16169
  }, [], [], { mode: "open" });
16082
16170
  //#endregion
@@ -18071,7 +18159,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18071
18159
  var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18072
18160
  var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
18073
18161
  var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
18074
- var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18162
+ var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>`);
18075
18163
  var root_6$2 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
18076
18164
  var root_7$2 = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>`, 1);
18077
18165
  function Item$1($$anchor, $$props) {
@@ -18240,7 +18328,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18240
18328
  return get$2($1);
18241
18329
  },
18242
18330
  floor: 1,
18243
- onChange: updateQuantity
18331
+ onChange: updateQuantity,
18332
+ onDecrementBelowMin: del
18244
18333
  });
18245
18334
  }
18246
18335
  };
@@ -18255,8 +18344,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18255
18344
  var consequent_8 = ($$anchor) => {
18256
18345
  var li_3 = root_5$3();
18257
18346
  var button = child(li_3);
18347
+ var text_6 = child(button, true);
18348
+ reset(button);
18258
18349
  reset(li_3);
18259
- template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.item.remove")]);
18350
+ template_effect(($0, $1) => {
18351
+ set_attribute(button, "aria-label", $0);
18352
+ set_text(text_6, $1);
18353
+ }, [() => shop.t("cart.item.aria.removeItem"), () => shop.t("cart.item.remove")]);
18260
18354
  delegated("click", button, del);
18261
18355
  append($$anchor, li_3);
18262
18356
  };
@@ -18264,7 +18358,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18264
18358
  if (!preview()) $$render(consequent_8);
18265
18359
  });
18266
18360
  var li_4 = sibling(node_4, 2);
18267
- var text_6 = child(li_4, true);
18361
+ var text_7 = child(li_4, true);
18268
18362
  reset(li_4);
18269
18363
  reset(ul);
18270
18364
  reset(article);
@@ -18298,7 +18392,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
18298
18392
  if_block(node_5, ($$render) => {
18299
18393
  if (get$2(mantleProduct)) $$render(consequent_9);
18300
18394
  });
18301
- template_effect(($0) => set_text(text_6, $0), [() => formatCurrency(displayItem().total_price_cents)]);
18395
+ template_effect(($0) => set_text(text_7, $0), [() => formatCurrency(displayItem().total_price_cents)]);
18302
18396
  append($$anchor, fragment_1);
18303
18397
  };
18304
18398
  if_block(node, ($$render) => {
@@ -6377,6 +6377,18 @@ function warnOnInvalidLocale(locale) {
6377
6377
  console.warn(`[go] Invalid locale "${locale}" — not a valid BCP 47 language tag (use "de", "de-CH", "en", …). Price and date formatting will throw.`);
6378
6378
  }
6379
6379
  }
6380
+ var defaultTranslations_default = {
6381
+ en: {
6382
+ "quantity.remove": "Remove item",
6383
+ "quantity.remove.label": "✕",
6384
+ "cart.item.remove": "✕"
6385
+ },
6386
+ de: {
6387
+ "quantity.remove": "Artikel entfernen",
6388
+ "quantity.remove.label": "✕",
6389
+ "cart.item.remove": "✕"
6390
+ }
6391
+ };
6380
6392
  //#endregion
6381
6393
  //#region src/lib/helpers/urls.ts
6382
6394
  var ANGULAR_URLS = {
@@ -13722,6 +13734,7 @@ var NOT_SIGNED_IN = { error: {
13722
13734
  success: false,
13723
13735
  errors: ["Not signed in"]
13724
13736
  } };
13737
+ var defaultTranslations = defaultTranslations_default;
13725
13738
  var Shop = class {
13726
13739
  type;
13727
13740
  #data = /* @__PURE__ */ state(proxy({
@@ -13789,7 +13802,10 @@ var Shop = class {
13789
13802
  return this.shop?.config.donations;
13790
13803
  }
13791
13804
  get translations() {
13792
- return this.shop?.translations;
13805
+ return {
13806
+ ...defaultTranslations[(this.locale ?? "en").toLowerCase().split(/[-_]/)[0]] ?? defaultTranslations.en,
13807
+ ...this.shop?.translations
13808
+ };
13793
13809
  }
13794
13810
  get currency() {
13795
13811
  return this.shop?.config.currency;
@@ -15752,23 +15768,34 @@ function canDecrement(value, { floor = 0 }) {
15752
15768
  }
15753
15769
  //#endregion
15754
15770
  //#region src/components/shared/quantityStepper/QuantityStepper.svelte
15755
- var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" class="go-quantity-stepper-button go-quantity-stepper-decrement" tabindex="-1"><span aria-hidden="true">−</span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15771
+ var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
15756
15772
  function QuantityStepper($$anchor, $$props) {
15757
15773
  const inputId = props_id();
15758
15774
  push($$props, true);
15759
- let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onChange = prop($$props, "onChange", 7);
15760
- const bounds = /* @__PURE__ */ user_derived(() => ({
15775
+ let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), removeAriaLabel = prop($$props, "removeAriaLabel", 7), removeLabel = prop($$props, "removeLabel", 7, "✕"), onChange = prop($$props, "onChange", 7);
15776
+ const removeMode = /* @__PURE__ */ user_derived(() => onDecrementBelowMin() != null);
15777
+ const removeBottom = /* @__PURE__ */ user_derived(() => Math.max(min(), 1));
15778
+ const bounds = /* @__PURE__ */ user_derived(() => get$2(removeMode) ? {
15779
+ min: get$2(removeBottom),
15780
+ max: max(),
15781
+ floor: get$2(removeBottom)
15782
+ } : {
15761
15783
  min: min(),
15762
15784
  max: max(),
15763
15785
  floor: floor()
15764
- }));
15786
+ });
15787
+ const atRemove = /* @__PURE__ */ user_derived(() => get$2(removeMode) && value() <= get$2(removeBottom));
15765
15788
  let inputEl;
15766
15789
  let invalid = /* @__PURE__ */ state(false);
15767
- const decDisabled = /* @__PURE__ */ user_derived(() => !canDecrement(value(), get$2(bounds)));
15790
+ const decDisabled = /* @__PURE__ */ user_derived(() => !get$2(atRemove) && !canDecrement(value(), get$2(bounds)));
15768
15791
  const incDisabled = /* @__PURE__ */ user_derived(() => !canIncrement(value(), get$2(bounds)));
15769
15792
  function emit(next) {
15770
15793
  if (next !== value()) onChange()(next);
15771
15794
  }
15795
+ function pressDecrement() {
15796
+ if (get$2(atRemove)) onDecrementBelowMin()();
15797
+ else stepDown();
15798
+ }
15772
15799
  function stepDown() {
15773
15800
  if (canDecrement(value(), get$2(bounds))) emit(decrement(value(), get$2(bounds)));
15774
15801
  }
@@ -15776,7 +15803,14 @@ function QuantityStepper($$anchor, $$props) {
15776
15803
  if (canIncrement(value(), get$2(bounds))) emit(increment(value(), get$2(bounds)));
15777
15804
  }
15778
15805
  function commitTyped() {
15779
- const next = clampTyped(parseInt(inputEl.value, 10), get$2(bounds));
15806
+ const raw = parseInt(inputEl.value, 10);
15807
+ if (get$2(removeMode) && (!Number.isFinite(raw) || raw <= 0)) {
15808
+ set(invalid, false);
15809
+ inputEl.value = String(value());
15810
+ onDecrementBelowMin()();
15811
+ return;
15812
+ }
15813
+ const next = clampTyped(raw, get$2(bounds));
15780
15814
  set(invalid, false);
15781
15815
  inputEl.value = String(next);
15782
15816
  emit(next);
@@ -15797,7 +15831,7 @@ function QuantityStepper($$anchor, $$props) {
15797
15831
  break;
15798
15832
  case "Home":
15799
15833
  e.preventDefault();
15800
- emit(floor());
15834
+ emit(get$2(bounds).floor);
15801
15835
  break;
15802
15836
  case "End":
15803
15837
  e.preventDefault();
@@ -15859,6 +15893,27 @@ function QuantityStepper($$anchor, $$props) {
15859
15893
  increaseLabel($$value);
15860
15894
  flushSync();
15861
15895
  },
15896
+ get onDecrementBelowMin() {
15897
+ return onDecrementBelowMin();
15898
+ },
15899
+ set onDecrementBelowMin($$value) {
15900
+ onDecrementBelowMin($$value);
15901
+ flushSync();
15902
+ },
15903
+ get removeAriaLabel() {
15904
+ return removeAriaLabel();
15905
+ },
15906
+ set removeAriaLabel($$value) {
15907
+ removeAriaLabel($$value);
15908
+ flushSync();
15909
+ },
15910
+ get removeLabel() {
15911
+ return removeLabel();
15912
+ },
15913
+ set removeLabel($$value = "✕") {
15914
+ removeLabel($$value);
15915
+ flushSync();
15916
+ },
15862
15917
  get onChange() {
15863
15918
  return onChange();
15864
15919
  },
@@ -15869,6 +15924,11 @@ function QuantityStepper($$anchor, $$props) {
15869
15924
  };
15870
15925
  var div = root$50();
15871
15926
  var button = child(div);
15927
+ let classes;
15928
+ var span = child(button);
15929
+ var text = child(span, true);
15930
+ reset(span);
15931
+ reset(button);
15872
15932
  var input = sibling(button, 2);
15873
15933
  remove_input_defaults(input);
15874
15934
  bind_this(input, ($$value) => inputEl = $$value, () => inputEl);
@@ -15876,21 +15936,23 @@ function QuantityStepper($$anchor, $$props) {
15876
15936
  reset(div);
15877
15937
  template_effect(() => {
15878
15938
  set_attribute(div, "aria-label", label());
15879
- set_attribute(button, "title", decreaseLabel());
15939
+ classes = set_class(button, 1, "go-quantity-stepper-button go-quantity-stepper-decrement", null, classes, { "go-quantity-stepper-remove": get$2(atRemove) });
15940
+ set_attribute(button, "title", get$2(atRemove) ? removeAriaLabel() : decreaseLabel());
15880
15941
  set_attribute(button, "aria-controls", inputId);
15881
15942
  set_attribute(button, "aria-disabled", get$2(decDisabled));
15943
+ set_text(text, get$2(atRemove) ? removeLabel() : "−");
15882
15944
  set_attribute(input, "id", inputId);
15883
15945
  set_attribute(input, "aria-label", label());
15884
15946
  set_value(input, value());
15885
15947
  set_attribute(input, "aria-valuenow", value());
15886
- set_attribute(input, "aria-valuemin", floor());
15948
+ set_attribute(input, "aria-valuemin", get$2(bounds).floor);
15887
15949
  set_attribute(input, "aria-valuemax", max());
15888
15950
  set_attribute(input, "aria-invalid", get$2(invalid) ? "true" : void 0);
15889
15951
  set_attribute(button_1, "title", increaseLabel());
15890
15952
  set_attribute(button_1, "aria-controls", inputId);
15891
15953
  set_attribute(button_1, "aria-disabled", get$2(incDisabled));
15892
15954
  });
15893
- delegated("click", button, stepDown);
15955
+ delegated("click", button, pressDecrement);
15894
15956
  delegated("input", input, onInput);
15895
15957
  delegated("change", input, commitTyped);
15896
15958
  event("blur", input, commitTyped);
@@ -15913,6 +15975,9 @@ create_custom_element(QuantityStepper, {
15913
15975
  label: {},
15914
15976
  decreaseLabel: {},
15915
15977
  increaseLabel: {},
15978
+ onDecrementBelowMin: {},
15979
+ removeAriaLabel: {},
15980
+ removeLabel: {},
15916
15981
  onChange: {}
15917
15982
  }, [], [], { mode: "open" });
15918
15983
  //#endregion
@@ -15953,8 +16018,12 @@ function QuantityControl($$anchor, $$props) {
15953
16018
  * `min_persons`) a hard bottom on both controls: the backend does not enforce it,
15954
16019
  * so the UI must (Angular-shop parity).
15955
16020
  */
16021
+ /**
16022
+ * Cart-only: when set, the stepper's `−` at the order minimum removes the line instead of
16023
+ * stepping (fires this). Presence turns the behaviour on; the legacy `<select>` ignores it.
16024
+ */
15956
16025
  /** Emits the next committed quantity. The control never mutates anything itself. */
15957
- let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onChange = prop($$props, "onChange", 7);
16026
+ let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), onChange = prop($$props, "onChange", 7);
15958
16027
  const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
15959
16028
  var $$exports = {
15960
16029
  get value() {
@@ -15999,6 +16068,13 @@ function QuantityControl($$anchor, $$props) {
15999
16068
  deselectable($$value);
16000
16069
  flushSync();
16001
16070
  },
16071
+ get onDecrementBelowMin() {
16072
+ return onDecrementBelowMin();
16073
+ },
16074
+ set onDecrementBelowMin($$value) {
16075
+ onDecrementBelowMin($$value);
16076
+ flushSync();
16077
+ },
16002
16078
  get onChange() {
16003
16079
  return onChange();
16004
16080
  },
@@ -16014,6 +16090,8 @@ function QuantityControl($$anchor, $$props) {
16014
16090
  let $0 = /* @__PURE__ */ user_derived(() => deselectable() ? 0 : min());
16015
16091
  let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
16016
16092
  let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
16093
+ let $3 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove"));
16094
+ let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove.label"));
16017
16095
  QuantityStepper($$anchor, {
16018
16096
  get value() {
16019
16097
  return value();
@@ -16036,6 +16114,15 @@ function QuantityControl($$anchor, $$props) {
16036
16114
  get increaseLabel() {
16037
16115
  return get$2($2);
16038
16116
  },
16117
+ get onDecrementBelowMin() {
16118
+ return onDecrementBelowMin();
16119
+ },
16120
+ get removeAriaLabel() {
16121
+ return get$2($3);
16122
+ },
16123
+ get removeLabel() {
16124
+ return get$2($4);
16125
+ },
16039
16126
  get onChange() {
16040
16127
  return onChange();
16041
16128
  }
@@ -16076,6 +16163,7 @@ create_custom_element(QuantityControl, {
16076
16163
  label: {},
16077
16164
  floor: {},
16078
16165
  deselectable: {},
16166
+ onDecrementBelowMin: {},
16079
16167
  onChange: {}
16080
16168
  }, [], [], { mode: "open" });
16081
16169
  //#endregion
@@ -18070,7 +18158,7 @@ var root_1$15 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-disco
18070
18158
  var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
18071
18159
  var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
18072
18160
  var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
18073
- var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
18161
+ var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>`);
18074
18162
  var root_6$2 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
18075
18163
  var root_7$2 = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article> <!>`, 1);
18076
18164
  function Item$1($$anchor, $$props) {
@@ -18239,7 +18327,8 @@ function Item$1($$anchor, $$props) {
18239
18327
  return get$2($1);
18240
18328
  },
18241
18329
  floor: 1,
18242
- onChange: updateQuantity
18330
+ onChange: updateQuantity,
18331
+ onDecrementBelowMin: del
18243
18332
  });
18244
18333
  }
18245
18334
  };
@@ -18254,8 +18343,13 @@ function Item$1($$anchor, $$props) {
18254
18343
  var consequent_8 = ($$anchor) => {
18255
18344
  var li_3 = root_5$3();
18256
18345
  var button = child(li_3);
18346
+ var text_6 = child(button, true);
18347
+ reset(button);
18257
18348
  reset(li_3);
18258
- template_effect(($0) => set_attribute(button, "aria-label", $0), [() => shop.t("cart.item.remove")]);
18349
+ template_effect(($0, $1) => {
18350
+ set_attribute(button, "aria-label", $0);
18351
+ set_text(text_6, $1);
18352
+ }, [() => shop.t("cart.item.aria.removeItem"), () => shop.t("cart.item.remove")]);
18259
18353
  delegated("click", button, del);
18260
18354
  append($$anchor, li_3);
18261
18355
  };
@@ -18263,7 +18357,7 @@ function Item$1($$anchor, $$props) {
18263
18357
  if (!preview()) $$render(consequent_8);
18264
18358
  });
18265
18359
  var li_4 = sibling(node_4, 2);
18266
- var text_6 = child(li_4, true);
18360
+ var text_7 = child(li_4, true);
18267
18361
  reset(li_4);
18268
18362
  reset(ul);
18269
18363
  reset(article);
@@ -18297,7 +18391,7 @@ function Item$1($$anchor, $$props) {
18297
18391
  if_block(node_5, ($$render) => {
18298
18392
  if (get$2(mantleProduct)) $$render(consequent_9);
18299
18393
  });
18300
- template_effect(($0) => set_text(text_6, $0), [() => formatCurrency(displayItem().total_price_cents)]);
18394
+ template_effect(($0) => set_text(text_7, $0), [() => formatCurrency(displayItem().total_price_cents)]);
18301
18395
  append($$anchor, fragment_1);
18302
18396
  };
18303
18397
  if_block(node, ($$render) => {