stimulus_plumbers 0.3.2 → 0.3.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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +3 -1
  4. data/app/assets/javascripts/stimulus-plumbers/stimulus-plumbers-controllers.es.js +78 -52
  5. data/app/assets/javascripts/stimulus-plumbers/stimulus-plumbers-controllers.umd.js +1 -1
  6. data/app/assets/stylesheets/stimulus_plumbers/tokens.css +13 -6
  7. data/lib/stimulus_plumbers/components/action_list/item.rb +13 -10
  8. data/lib/stimulus_plumbers/components/action_list/section.rb +7 -1
  9. data/lib/stimulus_plumbers/components/action_list.rb +14 -8
  10. data/lib/stimulus_plumbers/components/avatar.rb +11 -5
  11. data/lib/stimulus_plumbers/components/button/group.rb +7 -1
  12. data/lib/stimulus_plumbers/components/button.rb +48 -10
  13. data/lib/stimulus_plumbers/components/calendar/month/turbo/days_of_month.rb +9 -5
  14. data/lib/stimulus_plumbers/components/calendar/month/turbo/days_of_week.rb +7 -3
  15. data/lib/stimulus_plumbers/components/calendar/month/turbo.rb +7 -3
  16. data/lib/stimulus_plumbers/components/calendar.rb +4 -1
  17. data/lib/stimulus_plumbers/components/card/section.rb +7 -1
  18. data/lib/stimulus_plumbers/components/card.rb +11 -5
  19. data/lib/stimulus_plumbers/components/combobox/date.rb +7 -3
  20. data/lib/stimulus_plumbers/components/combobox/dropdown.rb +7 -1
  21. data/lib/stimulus_plumbers/components/combobox/options/option.rb +7 -1
  22. data/lib/stimulus_plumbers/components/combobox/options/option_group.rb +7 -1
  23. data/lib/stimulus_plumbers/components/combobox/options.rb +9 -5
  24. data/lib/stimulus_plumbers/components/combobox/popover.rb +30 -7
  25. data/lib/stimulus_plumbers/components/combobox/time/drum.rb +7 -1
  26. data/lib/stimulus_plumbers/components/combobox/time.rb +7 -3
  27. data/lib/stimulus_plumbers/components/combobox/trigger.rb +50 -7
  28. data/lib/stimulus_plumbers/components/combobox/{autocomplete.rb → typeahead.rb} +7 -5
  29. data/lib/stimulus_plumbers/components/combobox.rb +10 -6
  30. data/lib/stimulus_plumbers/components/date_picker/navigation.rb +1 -1
  31. data/lib/stimulus_plumbers/components/date_picker/navigator.rb +7 -15
  32. data/lib/stimulus_plumbers/components/divider.rb +23 -3
  33. data/lib/stimulus_plumbers/components/icon.rb +6 -16
  34. data/lib/stimulus_plumbers/components/input_group.rb +29 -0
  35. data/lib/stimulus_plumbers/components/popover.rb +7 -3
  36. data/lib/stimulus_plumbers/form/builder.rb +1 -1
  37. data/lib/stimulus_plumbers/form/fields/inputs/datetime.rb +24 -12
  38. data/lib/stimulus_plumbers/form/fields/inputs/password.rb +3 -3
  39. data/lib/stimulus_plumbers/form/fields/inputs/search.rb +10 -10
  40. data/lib/stimulus_plumbers/form/fields/inputs/select/grouped.rb +21 -17
  41. data/lib/stimulus_plumbers/form/fields/inputs/select/timezone.rb +7 -5
  42. data/lib/stimulus_plumbers/form/fields/inputs/select/weekday.rb +7 -9
  43. data/lib/stimulus_plumbers/form/fields/inputs/select.rb +40 -28
  44. data/lib/stimulus_plumbers/helpers/action_list_helper.rb +6 -6
  45. data/lib/stimulus_plumbers/helpers/avatar_helper.rb +2 -2
  46. data/lib/stimulus_plumbers/helpers/button_helper.rb +4 -8
  47. data/lib/stimulus_plumbers/helpers/calendar_helper.rb +13 -10
  48. data/lib/stimulus_plumbers/helpers/calendar_turbo_helper.rb +2 -16
  49. data/lib/stimulus_plumbers/helpers/card_helper.rb +4 -4
  50. data/lib/stimulus_plumbers/helpers/combobox_helper.rb +36 -23
  51. data/lib/stimulus_plumbers/helpers/divider_helper.rb +2 -2
  52. data/lib/stimulus_plumbers/helpers/popover_helper.rb +2 -2
  53. data/lib/stimulus_plumbers/themes/base.rb +15 -16
  54. data/lib/stimulus_plumbers/themes/icons/external.rb +60 -0
  55. data/lib/stimulus_plumbers/themes/icons/registry.rb +36 -0
  56. data/lib/stimulus_plumbers/themes/schema/icon.rb +57 -15
  57. data/lib/stimulus_plumbers/themes/schema/ranges.rb +2 -2
  58. data/lib/stimulus_plumbers/themes/schema.rb +59 -55
  59. data/lib/stimulus_plumbers/version.rb +1 -1
  60. data/lib/stimulus_plumbers.rb +2 -2
  61. metadata +5 -3
  62. data/lib/stimulus_plumbers/form/fields/input_group.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22989c9f9c0a687219de7ee1521bf9a7764ca6a552706754ffe97e7d87123647
4
- data.tar.gz: 225ce1430818dc4f78b9380303b37828e2194fb43613a8fd89f00fcd9d239eec
3
+ metadata.gz: c0b50e93ab4bf370155a7a5ce7f854c16aea85c36a86fe3f3436f10976dc8cbf
4
+ data.tar.gz: bdcf5e14e445cc0ec8e71bc90352cdacd69d6cb630152483fc49e30796426f6d
5
5
  SHA512:
6
- metadata.gz: 1c337e51c679f76263bc8c4d23e700a4a74056c2e691e6776f68106881b0c6405443fc2a37fa569307fb41ecd0427711fadf3197598005e880f64844f575fddc
7
- data.tar.gz: eda036e191d29413f69062f09ffb8b60e63793459aa5f4a3cc90a57a9f9e77ffb60520f671d3d08bd006249110a1da401044c1129a39a0052fa83ff4cb43930b
6
+ metadata.gz: 62760486a85c81bd697bc82582f9127e110cc040b6c63843751d34d073e56a3217fecab4ae305f8dd347d0610dc889d6a1a444852f4237ca940397a5c8260284
7
+ data.tar.gz: 4af2f324957ec1f90064b31aea04eece03db7732e3ff3a29986917bcba3659791e853e26e088e0c71b1de3acbaebf19e6288a44cb0b6d499456a7cb8aa72e654
data/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
4
4
 
5
+ ---
6
+ ## [0.3.3](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.3.2..stimulus-plumbers-rails/v0.3.3) - 2026-05-26
7
+
8
+ ### Bug Fixes
9
+
10
+ - both stimulus/turbo calendar will render aria-current=date on today date. tailwind theme will apply today css style via aria attribute ([#77](https://github.com/ryancyq/stimulus-plumbers/issues/77)) - ([29da3cd](https://github.com/ryancyq/stimulus-plumbers/commit/29da3cdf81a069fb4fdfbee3a6d4ac57c9ed9a16)) - Ryan Chang
11
+ - untested examples ([#79](https://github.com/ryancyq/stimulus-plumbers/issues/79)) - ([a99e887](https://github.com/ryancyq/stimulus-plumbers/commit/a99e887be863508d08c8657757f5ec32d931580e)) - Ryan Chang
12
+ - rename conflicts with stimulus value/target/class result in ambiguous definitions ([#81](https://github.com/ryancyq/stimulus-plumbers/issues/81)) - ([60d47a7](https://github.com/ryancyq/stimulus-plumbers/commit/60d47a7a907878b45a10f07e82bf647b815b47f0)) - Ryan Chang
13
+ - rename autocomplete to typeahead for accurate naming ([#83](https://github.com/ryancyq/stimulus-plumbers/issues/83)) - ([ff5ff26](https://github.com/ryancyq/stimulus-plumbers/commit/ff5ff26143aba80c85b3e638e060c294c92dcc31)) - Ryan Chang
14
+ - update version bump script to ruby - ([854935c](https://github.com/ryancyq/stimulus-plumbers/commit/854935c16b840ef9a7fdeac245c25016cdc66053)) - Ryan Chang
15
+ - overuse of html_options, replace with generic kwargs - ([9efa833](https://github.com/ryancyq/stimulus-plumbers/commit/9efa8332840334298502fd3f4d990ba48d0570ae)) - Ryan Chang
16
+ - calendar helper when no date is provided - ([a049c71](https://github.com/ryancyq/stimulus-plumbers/commit/a049c71ca64ab32e712ed8cc28057bec4910bc2b)) - Ryan Chang
17
+
18
+ ### Features
19
+
20
+ - calendar month selected ([#78](https://github.com/ryancyq/stimulus-plumbers/issues/78)) - ([d826697](https://github.com/ryancyq/stimulus-plumbers/commit/d8266979fff9041474b29ffa937acfec94e95ca3)) - Ryan Chang
21
+ - button with icons ([#82](https://github.com/ryancyq/stimulus-plumbers/issues/82)) - ([7ae5267](https://github.com/ryancyq/stimulus-plumbers/commit/7ae52675a6983b42f574f9919495686b6802a121)) - Ryan Chang
22
+ - button variant ([#84](https://github.com/ryancyq/stimulus-plumbers/issues/84)) - ([07b7f9c](https://github.com/ryancyq/stimulus-plumbers/commit/07b7f9c8beebe0be31817809476ab9715926e1ee)) - Ryan Chang
23
+ - allow theme schema validation to support other validator like method/boolean instead of just array ([#86](https://github.com/ryancyq/stimulus-plumbers/issues/86)) - ([0eeb485](https://github.com/ryancyq/stimulus-plumbers/commit/0eeb48533e0a7ce20d9031fd782f854ae52d6a64)) - Ryan Chang
24
+ - svg icon rendering ([#85](https://github.com/ryancyq/stimulus-plumbers/issues/85)) - ([7405c67](https://github.com/ryancyq/stimulus-plumbers/commit/7405c670b618f6f7e723c852ac633ca2655eda68)) - Ryan Chang
25
+ - combobox theme ([#87](https://github.com/ryancyq/stimulus-plumbers/issues/87)) - ([5220185](https://github.com/ryancyq/stimulus-plumbers/commit/522018500956d271da0a6dde44d6c335e2a0c649)) - Ryan Chang
26
+
27
+ ### Tests
28
+
29
+ - reorganize test structure due to recent refactoring ([#80](https://github.com/ryancyq/stimulus-plumbers/issues/80)) - ([edbb1a8](https://github.com/ryancyq/stimulus-plumbers/commit/edbb1a832eb493dd41434bb1d668e5cef076d52a)) - Ryan Chang
30
+ - theme scheme validator include/exclude usecases - ([edf287f](https://github.com/ryancyq/stimulus-plumbers/commit/edf287fa6c01ff718d5291909f67300f36a232ef)) - Ryan Chang
31
+
5
32
  ---
6
33
  ## [0.3.1](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.3.0..stimulus-plumbers-rails/v0.3.1) - 2026-05-19
7
34
 
data/README.md CHANGED
@@ -44,9 +44,11 @@ config.action_view.default_form_builder = StimulusPlumbers::Form::Builder
44
44
 
45
45
  | Component | Helper(s) | Docs |
46
46
  |-----------|-----------|------|
47
+ | Button | `sp_button`, `sp_button_group` | [docs/component/button.md](docs/component/button.md) |
48
+ | Action List | `sp_action_list`, `sp_action_list_item`, `sp_action_list_section` | [docs/component/action_list.md](docs/component/action_list.md) |
47
49
  | Combobox — date | `sp_combobox_date` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_date) |
48
50
  | Combobox — dropdown | `sp_combobox_dropdown` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_dropdown) |
49
- | Combobox — autocomplete | `sp_combobox_autocomplete` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_autocomplete) |
51
+ | Combobox — typeahead | `sp_combobox_typeahead` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_typeahead) |
50
52
  | Combobox — time | `sp_combobox_time` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_time) |
51
53
  | Calendar | `sp_calendar_month` | [docs/component/calendar.md](docs/component/calendar.md) |
52
54
  | Popover | `sp_popover` | [docs/component/popover.md](docs/component/popover.md) |
@@ -490,17 +490,22 @@ var de = /\D/g, fe = /^\d{13,19}$/, pe = /(.{4})(?=.)/g, me = {
490
490
  configurable: !0
491
491
  });
492
492
  }
493
- }, U = (e, t) => new H(e, t);
494
- //#endregion
495
- //#region src/plumbers/plumber/date.js
493
+ }, U = (e, t) => new H(e, t), xe = /^\d{4}-\d{2}-\d{2}$/;
496
494
  function W(e) {
497
495
  return e instanceof Date && !isNaN(e);
498
496
  }
499
497
  function G(...e) {
500
498
  if (e.length === 0) throw "Missing values to parse as date";
501
499
  if (e.length === 1) {
502
- let t = new Date(e[0]);
503
- if (e[0] && W(t)) return t;
500
+ let t = e[0];
501
+ if (!t) return;
502
+ if (typeof t == "string" && xe.test(t)) {
503
+ let [e, n, r] = t.split("-").map(Number), i = new Date(e, n - 1, r);
504
+ if (W(i)) return i;
505
+ } else {
506
+ let e = new Date(t);
507
+ if (W(e)) return e;
508
+ }
504
509
  } else {
505
510
  let t = new Date(...e);
506
511
  if (W(t)) return t;
@@ -523,7 +528,7 @@ var K = 7, q = {
523
528
  disabledYears: [],
524
529
  firstDayOfWeek: 0,
525
530
  onNavigated: "navigated"
526
- }, xe = class extends j {
531
+ }, Se = class extends j {
527
532
  constructor(e, t = {}) {
528
533
  super(e, t);
529
534
  let n = Object.assign({}, q, t), { onNavigated: r, since: i, till: a, firstDayOfWeek: o } = n;
@@ -593,8 +598,8 @@ var K = 7, q = {
593
598
  }
594
599
  set today(e) {
595
600
  if (!W(e)) return;
596
- let t = this.month ? this.month : e.getMonth(), n = this.year ? this.year : e.getFullYear(), r = t == e.getMonth() && n == e.getFullYear(), i = this.hasDayValue ? this.day : r ? e.getDate() : 1;
597
- this.now = new Date(n, t, i).toISOString();
601
+ let t = this.month ?? e.getMonth(), n = this.year ?? e.getFullYear(), r = t == e.getMonth() && n == e.getFullYear() ? e.getDate() : 1;
602
+ this.now = new Date(n, t, r);
598
603
  }
599
604
  get current() {
600
605
  return typeof this.year == "number" && typeof this.month == "number" && typeof this.day == "number" ? G(this.year, this.month, this.day) : null;
@@ -727,14 +732,14 @@ var K = 7, q = {
727
732
  };
728
733
  } });
729
734
  }
730
- }, Se = (e, t) => new xe(e, t), J = {
735
+ }, Ce = (e, t) => new Se(e, t), J = {
731
736
  content: null,
732
737
  url: "",
733
738
  reload: "never",
734
739
  stale: 3600,
735
740
  onLoad: "canLoad",
736
741
  onLoaded: "contentLoaded"
737
- }, Ce = class extends j {
742
+ }, we = class extends j {
738
743
  constructor(e, t = {}) {
739
744
  super(e, t);
740
745
  let n = Object.assign({}, J, t), { content: r, url: i, reload: a, stale: o } = n;
@@ -773,7 +778,7 @@ var K = 7, q = {
773
778
  let e = this;
774
779
  Object.assign(this.controller, { load: e.load.bind(e) });
775
780
  }
776
- }, we = (e, t) => new Ce(e, t), Y = class extends j {
781
+ }, Te = (e, t) => new we(e, t), Y = class extends j {
777
782
  observe(e) {
778
783
  this._handler = e, this.events.forEach((t) => window.addEventListener(t, e, !0));
779
784
  }
@@ -786,21 +791,21 @@ var K = 7, q = {
786
791
  e.unobserve(), t();
787
792
  };
788
793
  }
789
- }, Te = {
794
+ }, Ee = {
790
795
  trigger: null,
791
796
  events: ["click"],
792
797
  onDismissed: "dismissed"
793
- }, Ee = class extends Y {
798
+ }, De = class extends Y {
794
799
  constructor(e, t = {}) {
795
800
  super(e, t);
796
- let { trigger: n, events: r, onDismissed: i } = Object.assign({}, Te, t);
801
+ let { trigger: n, events: r, onDismissed: i } = Object.assign({}, Ee, t);
797
802
  this.onDismissed = i, this.trigger = n || this.element, this.events = r, this.enhance(), this.observe(this.dismiss);
798
803
  }
799
804
  dismiss = async (e) => {
800
805
  let { target: t } = e;
801
806
  t instanceof HTMLElement && (this.element.contains(t) || this.visible && (this.dispatch("dismiss"), await this.awaitCallback(this.onDismissed, { target: this.trigger }), this.dispatch("dismissed")));
802
807
  };
803
- }, X = (e, t) => new Ee(e, t), De = {
808
+ }, X = (e, t) => new De(e, t), Oe = {
804
809
  anchor: null,
805
810
  events: ["click"],
806
811
  placement: "bottom",
@@ -808,10 +813,10 @@ var K = 7, q = {
808
813
  onFlipped: "flipped",
809
814
  ariaRole: null,
810
815
  respectMotion: !0
811
- }, Oe = class extends Y {
816
+ }, ke = class extends Y {
812
817
  constructor(e, t = {}) {
813
818
  super(e, t);
814
- let { anchor: n, events: r, placement: i, alignment: a, onFlipped: o, ariaRole: s, respectMotion: c } = Object.assign({}, De, t);
819
+ let { anchor: n, events: r, placement: i, alignment: a, onFlipped: o, ariaRole: s, respectMotion: c } = Object.assign({}, Oe, t);
815
820
  this.anchor = n, this.events = r, this.placement = i, this.alignment = a, this.onFlipped = o, this.ariaRole = s, this.respectMotion = c, this.prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches, this.anchor && this.element && S({
816
821
  trigger: this.anchor,
817
822
  target: this.element,
@@ -927,7 +932,7 @@ var K = 7, q = {
927
932
  enhance() {
928
933
  super.enhance(), this.controller.flip = this.flip;
929
934
  }
930
- }, ke = (e, t) => new Oe(e, t), Ae = {
935
+ }, Ae = (e, t) => new ke(e, t), je = {
931
936
  events: ["resize"],
932
937
  boundaries: [
933
938
  "top",
@@ -936,10 +941,10 @@ var K = 7, q = {
936
941
  ],
937
942
  onShifted: "shifted",
938
943
  respectMotion: !0
939
- }, je = class extends Y {
944
+ }, Me = class extends Y {
940
945
  constructor(e, t = {}) {
941
946
  super(e, t);
942
- let { onShifted: n, events: r, boundaries: i, respectMotion: a } = Object.assign({}, Ae, t);
947
+ let { onShifted: n, events: r, boundaries: i, respectMotion: a } = Object.assign({}, je, t);
943
948
  this.onShifted = n, this.events = r, this.boundaries = i, this.respectMotion = a, this.prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches, this.enhance(), this.observe(this.shift);
944
949
  }
945
950
  shift = async () => {
@@ -988,11 +993,11 @@ var K = 7, q = {
988
993
  enhance() {
989
994
  super.enhance(), this.controller.shift = this.shift;
990
995
  }
991
- }, Me = (e, t) => new je(e, t), Z = {
996
+ }, Ne = (e, t) => new Me(e, t), Z = {
992
997
  visibility: "visibility",
993
998
  onShown: "shown",
994
999
  onHidden: "hidden"
995
- }, Ne = class extends j {
1000
+ }, Pe = class extends j {
996
1001
  constructor(e, t = {}) {
997
1002
  let { visibility: n, onShown: r, onHidden: i, activator: a } = Object.assign({}, Z, t), o = typeof n == "string" ? n : Z.namespace, s = typeof t.visible == "string" ? t.visible : "isVisible";
998
1003
  (typeof t.visible != "boolean" || t.visible) && (t.visible = `${o}.${s}`), super(e, t), this.visibility = o, this.visibilityResolver = s, this.onShown = r, this.onHidden = i, this.activator = a instanceof HTMLElement ? a : null, this.enhance(), this.element instanceof HTMLElement && this.activate(this.isVisible(this.element));
@@ -1027,7 +1032,7 @@ var K = 7, q = {
1027
1032
  return t;
1028
1033
  } });
1029
1034
  }
1030
- }, Q = (e, t) => new Ne(e, t), Pe = class extends e {
1035
+ }, Q = (e, t) => new Pe(e, t), $ = class extends e {
1031
1036
  static targets = ["daysOfWeek", "daysOfMonth"];
1032
1037
  static classes = [
1033
1038
  "dayOfWeek",
@@ -1050,10 +1055,18 @@ var K = 7, q = {
1050
1055
  daysOfOtherMonth: {
1051
1056
  type: Boolean,
1052
1057
  default: !1
1058
+ },
1059
+ today: {
1060
+ type: String,
1061
+ default: ""
1062
+ },
1063
+ selected: {
1064
+ type: String,
1065
+ default: ""
1053
1066
  }
1054
1067
  };
1055
1068
  initialize() {
1056
- Se(this);
1069
+ Ce(this, { today: this.todayValue });
1057
1070
  }
1058
1071
  connect() {
1059
1072
  this.draw();
@@ -1061,8 +1074,21 @@ var K = 7, q = {
1061
1074
  navigated() {
1062
1075
  this.draw();
1063
1076
  }
1077
+ selectedValueChanged() {
1078
+ if (!this.hasDaysOfMonthTarget || (this.daysOfMonthTarget.querySelectorAll("[aria-selected]").forEach((e) => {
1079
+ e.setAttribute("aria-selected", "false");
1080
+ }), !this.selectedValue)) return;
1081
+ let e = G(this.selectedValue);
1082
+ if (!e) return;
1083
+ let t = this.daysOfMonthTarget.querySelector(`time[datetime="${e.toISOString()}"]`);
1084
+ t && t.closest("[aria-selected]").setAttribute("aria-selected", "true");
1085
+ }
1086
+ onSelect(e) {
1087
+ let t = e.detail?.iso;
1088
+ t && (this.selectedValue = t);
1089
+ }
1064
1090
  draw() {
1065
- this.drawDaysOfWeek(), this.drawDaysOfMonth();
1091
+ this.drawDaysOfWeek(), this.drawDaysOfMonth(), this.selectedValueChanged();
1066
1092
  }
1067
1093
  createDayElement(e, { selectable: t = !1, disabled: n = !1 } = {}) {
1068
1094
  let r = document.createElement(t ? "button" : "div");
@@ -1086,7 +1112,7 @@ var K = 7, q = {
1086
1112
  selectable: e.current,
1087
1113
  disabled: r
1088
1114
  });
1089
- t === e.date.getTime() && a.setAttribute("aria-current", "date"), this.hasDayOfMonthClass && a.classList.add(...this.dayOfMonthClasses);
1115
+ t === e.date.getTime() && a.setAttribute("aria-current", "date"), (e.current || this.daysOfOtherMonthValue) && a.setAttribute("aria-selected", ""), this.hasDayOfMonthClass && a.classList.add(...this.dayOfMonthClasses);
1090
1116
  let o = document.createElement("time");
1091
1117
  o.dateTime = e.iso, a.appendChild(o), n.push(a);
1092
1118
  }
@@ -1121,12 +1147,12 @@ var K = 7, q = {
1121
1147
  }
1122
1148
  }, Ie = class extends e {
1123
1149
  static targets = ["source"];
1124
- static values = { type: {
1150
+ static values = { contentType: {
1125
1151
  type: String,
1126
1152
  default: "text/plain"
1127
1153
  } };
1128
1154
  onPaste(e) {
1129
- let t = e.clipboardData?.getData(this.typeValue) ?? "", n = Array.from(e.clipboardData?.types ?? []);
1155
+ let t = e.clipboardData?.getData(this.contentTypeValue) ?? "", n = Array.from(e.clipboardData?.types ?? []);
1130
1156
  e.preventDefault(), this.dispatch("pasted", {
1131
1157
  detail: {
1132
1158
  text: t,
@@ -1229,7 +1255,7 @@ var K = 7, q = {
1229
1255
  let { year: e } = this.calendarMonthOutlet.calendar;
1230
1256
  this.yearTarget.textContent = new Intl.DateTimeFormat(this.localesValue, { year: this.yearFormatValue }).format(new Date(e, 0));
1231
1257
  }
1232
- }, $ = class extends e {
1258
+ }, Re = class extends e {
1233
1259
  static targets = [
1234
1260
  "listbox",
1235
1261
  "loading",
@@ -1310,7 +1336,7 @@ var K = 7, q = {
1310
1336
  disconnect() {
1311
1337
  this._requestor.cancel();
1312
1338
  }
1313
- }, Re = class extends e {
1339
+ }, ze = class extends e {
1314
1340
  static targets = [
1315
1341
  "hour",
1316
1342
  "minute",
@@ -1346,12 +1372,12 @@ var K = 7, q = {
1346
1372
  selectedValue(e) {
1347
1373
  return e?.querySelector("[aria-selected=\"true\"]")?.dataset.value ?? null;
1348
1374
  }
1349
- }, ze = class extends e {
1375
+ }, Be = class extends e {
1350
1376
  static targets = ["trigger"];
1351
1377
  connect() {
1352
1378
  X(this, { trigger: this.hasTriggerTarget ? this.triggerTarget : null });
1353
1379
  }
1354
- }, Be = class extends e {
1380
+ }, Ve = class extends e {
1355
1381
  static targets = ["anchor", "reference"];
1356
1382
  static values = {
1357
1383
  placement: {
@@ -1376,7 +1402,7 @@ var K = 7, q = {
1376
1402
  console.error("FlipperController requires an anchor target. Add data-flipper-target=\"anchor\" to your element.");
1377
1403
  return;
1378
1404
  }
1379
- ke(this, {
1405
+ Ae(this, {
1380
1406
  element: this.referenceTarget,
1381
1407
  anchor: this.anchorTarget,
1382
1408
  placement: this.placementValue,
@@ -1384,11 +1410,11 @@ var K = 7, q = {
1384
1410
  ariaRole: this.roleValue
1385
1411
  });
1386
1412
  }
1387
- }, Ve = class extends e {
1413
+ }, He = class extends e {
1388
1414
  static targets = [
1389
1415
  "trigger",
1390
1416
  "popover",
1391
- "value"
1417
+ "input"
1392
1418
  ];
1393
1419
  static values = {
1394
1420
  value: String,
@@ -1435,12 +1461,12 @@ var K = 7, q = {
1435
1461
  this.hasComboboxDropdownOutlet && this.comboboxDropdownOutlet.filter(t);
1436
1462
  }
1437
1463
  valueValueChanged(e) {
1438
- this.hasValueTarget && (this.valueTarget.value = e), this.dispatch("changed", { detail: { value: e } });
1464
+ this.hasInputTarget && (this.inputTarget.value = e), this.dispatch("changed", { detail: { value: e } });
1439
1465
  }
1440
- }, He = class extends e {
1466
+ }, Ue = class extends e {
1441
1467
  static targets = ["input", "toggle"];
1442
1468
  static values = {
1443
- type: {
1469
+ format: {
1444
1470
  type: String,
1445
1471
  default: "plain"
1446
1472
  },
@@ -1455,19 +1481,19 @@ var K = 7, q = {
1455
1481
  };
1456
1482
  connect() {
1457
1483
  U(this, {
1458
- type: this.typeValue,
1484
+ type: this.formatValue,
1459
1485
  options: this.optionsValue
1460
1486
  }), this.format(this.readValue()), this.drawToggle();
1461
1487
  }
1462
- typeValueChanged() {
1488
+ formatValueChanged() {
1463
1489
  this.formatter && (U(this, {
1464
- type: this.typeValue,
1490
+ type: this.formatValue,
1465
1491
  options: this.optionsValue
1466
1492
  }), this.format(this.readValue()), this.drawToggle());
1467
1493
  }
1468
1494
  optionsValueChanged() {
1469
1495
  this.formatter && (U(this, {
1470
- type: this.typeValue,
1496
+ type: this.formatValue,
1471
1497
  options: this.optionsValue
1472
1498
  }), this.format(this.readValue()));
1473
1499
  }
@@ -1481,7 +1507,7 @@ var K = 7, q = {
1481
1507
  this.formatter && this.onFormatting(e);
1482
1508
  }
1483
1509
  toggle() {
1484
- !this.formatter.maskable() && this.typeValue !== "password" || (this.revealedValue = !this.revealedValue);
1510
+ !this.formatter.maskable() && this.formatValue !== "password" || (this.revealedValue = !this.revealedValue);
1485
1511
  }
1486
1512
  onPaste(e) {
1487
1513
  let t = e.detail?.text ?? "";
@@ -1491,7 +1517,7 @@ var K = 7, q = {
1491
1517
  }
1492
1518
  drawToggle() {
1493
1519
  if (!this.hasToggleTarget) return;
1494
- let e = this.formatter?.maskable() || this.typeValue === "password";
1520
+ let e = this.formatter?.maskable() || this.formatValue === "password";
1495
1521
  this.toggleTarget.hidden = !e, e && _(this.toggleTarget, this.revealedValue);
1496
1522
  }
1497
1523
  readValue() {
@@ -1499,14 +1525,14 @@ var K = 7, q = {
1499
1525
  }
1500
1526
  onFormatting(e) {
1501
1527
  if (!this.formatter) return;
1502
- if (this.typeValue === "password") {
1528
+ if (this.formatValue === "password") {
1503
1529
  this.hasInputTarget && (this.inputTarget.type = this.revealedValue ? "text" : "password");
1504
1530
  return;
1505
1531
  }
1506
1532
  let t = this.formatter.normalize(e), n = this.revealedValue || !this.formatter.maskable() ? this.formatter.format(t) : this.formatter.mask(t);
1507
1533
  this.hasInputTarget && (this.inputTarget instanceof HTMLInputElement ? this.inputTarget.value = n : this.inputTarget.textContent = n), this.dispatch("formatted", { detail: { value: n } });
1508
1534
  }
1509
- }, Ue = class extends e {
1535
+ }, We = class extends e {
1510
1536
  static targets = ["input", "clear"];
1511
1537
  initialize() {
1512
1538
  this.onInput = this.draw.bind(this), this.onEscape = this.handleEscape.bind(this);
@@ -1529,7 +1555,7 @@ var K = 7, q = {
1529
1555
  handleEscape(e) {
1530
1556
  e.key === "Escape" && this.inputTarget.value !== "" && (e.preventDefault(), this.clear());
1531
1557
  }
1532
- }, We = class extends e {
1558
+ }, Ge = class extends e {
1533
1559
  static targets = ["modal", "overlay"];
1534
1560
  initialize() {
1535
1561
  this.onCancel = this.close.bind(this);
@@ -1572,12 +1598,12 @@ var K = 7, q = {
1572
1598
  let t = this.modalTarget.getBoundingClientRect();
1573
1599
  (e.clientY < t.top || e.clientY > t.bottom || e.clientX < t.left || e.clientX > t.right) && this.close();
1574
1600
  };
1575
- }, Ge = class extends e {
1601
+ }, Ke = class extends e {
1576
1602
  static targets = ["content"];
1577
1603
  connect() {
1578
- Me(this, { element: this.hasContentTarget ? this.contentTarget : null });
1604
+ Ne(this, { element: this.hasContentTarget ? this.contentTarget : null });
1579
1605
  }
1580
- }, Ke = class extends e {
1606
+ }, qe = class extends e {
1581
1607
  static targets = [
1582
1608
  "content",
1583
1609
  "template",
@@ -1598,7 +1624,7 @@ var K = 7, q = {
1598
1624
  }
1599
1625
  };
1600
1626
  connect() {
1601
- we(this, {
1627
+ Te(this, {
1602
1628
  element: this.hasContentTarget ? this.contentTarget : null,
1603
1629
  url: this.hasUrlValue ? this.urlValue : null
1604
1630
  }), this.hasContentTarget && Q(this, {
@@ -1639,4 +1665,4 @@ var K = 7, q = {
1639
1665
  }
1640
1666
  };
1641
1667
  //#endregion
1642
- export { y as ARIA_HASPOPUP_VALUES, Pe as CalendarMonthController, Fe as CalendarMonthObserverController, Ie as ClipboardController, Le as ComboboxDateController, $ as ComboboxDropdownController, Re as ComboboxTimeController, ze as DismisserController, t as FOCUSABLE_SELECTOR, z as FORMATTER_TYPES, Be as FlipperController, o as FocusRestoration, a as FocusTrap, H as Formatter, Ve as InputComboboxController, He as InputFormatController, Ue as InputSearchController, We as ModalController, Ge as PannerController, Ke as PopoverController, w as Requestor, d as RovingTabIndex, p as announce, S as connectTriggerToTarget, ne as disconnectTriggerFromTarget, h as ensureId, E as filterOptions, i as focusFirst, T as fuzzyMatcher, m as generateId, n as getFocusableElements, c as isActivationKey, l as isArrowKey, s as isKey, r as isVisible, u as preventDefault, g as setAriaState, v as setChecked, te as setDisabled, ee as setExpanded, _ as setPressed };
1668
+ export { y as ARIA_HASPOPUP_VALUES, $ as CalendarMonthController, Fe as CalendarMonthObserverController, Ie as ClipboardController, Le as ComboboxDateController, Re as ComboboxDropdownController, ze as ComboboxTimeController, Be as DismisserController, t as FOCUSABLE_SELECTOR, z as FORMATTER_TYPES, Ve as FlipperController, o as FocusRestoration, a as FocusTrap, H as Formatter, We as InputClearableController, He as InputComboboxController, Ue as InputFormatterController, Ge as ModalController, Ke as PannerController, qe as PopoverController, w as Requestor, d as RovingTabIndex, p as announce, S as connectTriggerToTarget, ne as disconnectTriggerFromTarget, h as ensureId, E as filterOptions, i as focusFirst, T as fuzzyMatcher, m as generateId, n as getFocusableElements, c as isActivationKey, l as isArrowKey, s as isKey, r as isVisible, u as preventDefault, g as setAriaState, v as setChecked, te as setDisabled, ee as setExpanded, _ as setPressed };