@codbex/harmonia 0.4.0 → 0.5.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.
@@ -18436,7 +18436,7 @@ function accordion_default(Alpine) {
18436
18436
  if (!accordion) {
18437
18437
  throw new Error("h-accordion-item must be inside an h-accordion");
18438
18438
  }
18439
- el.classList.add("border-b", "last:border-b-0");
18439
+ el.classList.add("border-b", "last:border-b-0", "[[data-variant=header]_&]:data-[state=closed]:border-b-0");
18440
18440
  el.setAttribute("data-slot", "accordion-item");
18441
18441
  const itemId = expression ?? `ha${v4_default()}`;
18442
18442
  function getIsExpanded() {
@@ -18471,7 +18471,18 @@ function accordion_default(Alpine) {
18471
18471
  if (!accordionItem || !accordion) {
18472
18472
  throw new Error("h-accordion-trigger must be inside an h-accordion-item, which must be inside an h-accordion");
18473
18473
  }
18474
- el.classList.add("flex");
18474
+ el.classList.add(
18475
+ "flex",
18476
+ "h-12",
18477
+ "[[data-size=md]_&]:h-10",
18478
+ "[[data-size=sm]_&]:h-8",
18479
+ "[[data-variant=header]_&]:bg-object-header",
18480
+ "[[data-variant=header]_&]:text-object-header-foreground",
18481
+ "[[data-variant=header]_&]:px-4",
18482
+ "[[data-variant=header]_&]:border-b",
18483
+ "[[data-size=md][data-variant=header]_&]:px-3",
18484
+ "[[data-size=sm][data-variant=header]_&]:px-2.5"
18485
+ );
18475
18486
  el.setAttribute("tabIndex", "-1");
18476
18487
  const getLabel = evaluateLater(expression);
18477
18488
  const chevronDown = (0, import_lucide.createElement)(import_lucide.ChevronDown, {
@@ -18490,10 +18501,9 @@ function accordion_default(Alpine) {
18490
18501
  "focus-visible:ring-ring/50",
18491
18502
  "flex",
18492
18503
  "flex-1",
18493
- "items-start",
18504
+ "items-center",
18494
18505
  "justify-between",
18495
18506
  "gap-4",
18496
- "py-4",
18497
18507
  "text-left",
18498
18508
  "text-sm",
18499
18509
  "font-medium",
@@ -18593,13 +18603,11 @@ function alert_default(Alpine) {
18593
18603
  }
18594
18604
  setVariant(el.getAttribute("data-variant") ?? "default");
18595
18605
  const observer = new MutationObserver((mutations) => {
18596
- mutations.forEach((mutation) => {
18597
- if (mutation.type === "attributes" && mutation.attributeName === "data-variant") {
18598
- setVariant(el.getAttribute("data-variant") ?? "default");
18599
- }
18606
+ mutations.forEach(() => {
18607
+ setVariant(el.getAttribute("data-variant") ?? "default");
18600
18608
  });
18601
18609
  });
18602
- observer.observe(el, { attributes: true });
18610
+ observer.observe(el, { attributes: true, attributeFilter: ["data-variant"] });
18603
18611
  cleanup(() => {
18604
18612
  observer.disconnect();
18605
18613
  });
@@ -18630,6 +18638,7 @@ function avatar_default(Alpine) {
18630
18638
  "has-[img]:border-0",
18631
18639
  "flex",
18632
18640
  "size-8",
18641
+ "aspect-square",
18633
18642
  "shrink-0",
18634
18643
  "overflow-hidden",
18635
18644
  "rounded-full",
@@ -18672,13 +18681,11 @@ function avatar_default(Alpine) {
18672
18681
  interval = setInterval(completeCheck, 10);
18673
18682
  }
18674
18683
  const observer = new MutationObserver((mutations) => {
18675
- mutations.forEach((mutation) => {
18676
- if (mutation.type === "attributes") {
18677
- if (mutation.attributeName === "src") interval = setInterval(completeCheck, 10);
18678
- }
18684
+ mutations.forEach(() => {
18685
+ interval = setInterval(completeCheck, 10);
18679
18686
  });
18680
18687
  });
18681
- observer.observe(el, { attributes: true });
18688
+ observer.observe(el, { attributes: true, attributeFilter: ["src"] });
18682
18689
  cleanup(() => {
18683
18690
  if (interval) clearInterval(interval);
18684
18691
  observer.disconnect();
@@ -18721,12 +18728,6 @@ function badge_default(Alpine) {
18721
18728
  "focus-visible:border-ring",
18722
18729
  "focus-visible:ring-ring/50",
18723
18730
  "focus-visible:ring-[3px]",
18724
- "aria-invalid:ring-negative/20",
18725
- "dark:aria-invalid:ring-negative/40",
18726
- "aria-invalid:border-negative",
18727
- "invalid:ring-negative/20",
18728
- "dark:invalid:ring-negative/40",
18729
- "invalid:border-negative",
18730
18731
  "transition-[color,box-shadow]",
18731
18732
  "overflow-hidden"
18732
18733
  );
@@ -18748,13 +18749,11 @@ function badge_default(Alpine) {
18748
18749
  }
18749
18750
  setVariant(el.getAttribute("data-variant") ?? "default");
18750
18751
  const observer = new MutationObserver((mutations) => {
18751
- mutations.forEach((mutation) => {
18752
- if (mutation.type === "attributes" && mutation.attributeName === "data-variant") {
18753
- setVariant(el.getAttribute("data-variant") ?? "default");
18754
- }
18752
+ mutations.forEach(() => {
18753
+ setVariant(el.getAttribute("data-variant") ?? "default");
18755
18754
  });
18756
18755
  });
18757
- observer.observe(el, { attributes: true });
18756
+ observer.observe(el, { attributes: true, attributeFilter: ["data-variant"] });
18758
18757
  cleanup(() => {
18759
18758
  observer.disconnect();
18760
18759
  });
@@ -18822,7 +18821,6 @@ var buttonVariants = {
18822
18821
  "border",
18823
18822
  "bg-background",
18824
18823
  "text-foreground",
18825
- "shadow-none",
18826
18824
  "hover:bg-secondary",
18827
18825
  "hover:text-secondary-foreground",
18828
18826
  "active:bg-secondary-active",
@@ -18870,11 +18868,31 @@ var setButtonClasses = (el) => {
18870
18868
  "aria-invalid:ring-negative/20",
18871
18869
  "dark:aria-invalid:ring-negative/40",
18872
18870
  "aria-invalid:border-negative",
18873
- "invalid:ring-negative/20",
18874
- "dark:invalid:ring-negative/40",
18875
- "invalid:border-negative"
18871
+ "invalid:!ring-negative/20",
18872
+ "dark:invalid:!ring-negative/40",
18873
+ "invalid:!border-negative"
18876
18874
  );
18877
18875
  };
18876
+ var getButtonSize = (size3, inGroup = false) => {
18877
+ switch (size3) {
18878
+ case "xs":
18879
+ return inGroup ? ["h-6", "gap-1", "px-2", "[&>svg:not([class*='size-'])]:size-3.5", "has-[>svg]:px-2"] : ["h-6.5", "gap-1.5", "px-2.5", "has-[>svg]:px-2.5"];
18880
+ case "sm":
18881
+ return inGroup ? ["h-8", "px-2.5", "gap-1.5", "has-[>svg]:px-2.5"] : ["h-8", "gap-1.5", "px-3", "has-[>svg]:px-2.5"];
18882
+ case "lg":
18883
+ return ["h-10", "px-6", "has-[>svg]:px-4"];
18884
+ case "icon-xs":
18885
+ return inGroup ? ["size-6", "p-0", "has-[>svg]:p-0"] : ["size-6.5"];
18886
+ case "icon-sm":
18887
+ return inGroup ? ["size-8", "p-0", "has-[>svg]:p-0"] : ["size-8"];
18888
+ case "icon":
18889
+ return ["size-9"];
18890
+ case "icon-lg":
18891
+ return ["size-10"];
18892
+ default:
18893
+ return ["h-9", "px-4", "py-2", "has-[>svg]:px-3"];
18894
+ }
18895
+ };
18878
18896
  function button_default(Alpine) {
18879
18897
  Alpine.directive("h-button", (el, { modifiers }, { cleanup }) => {
18880
18898
  setButtonClasses(el);
@@ -18882,16 +18900,6 @@ function button_default(Alpine) {
18882
18900
  el.setAttribute("data-slot", "button");
18883
18901
  }
18884
18902
  const inGroup = modifiers.includes("group");
18885
- const sizes = {
18886
- default: ["h-9", "px-4", "py-2", "has-[>svg]:px-3"],
18887
- xs: inGroup ? ["h-6", "gap-1", "px-2", "[&>svg:not([class*='size-'])]:size-3.5", "has-[>svg]:px-2"] : ["h-6.5", "gap-1.5", "px-2.5", "has-[>svg]:px-2.5"],
18888
- sm: inGroup ? ["h-8", "px-2.5", "gap-1.5", "has-[>svg]:px-2.5"] : ["h-8", "gap-1.5", "px-3", "has-[>svg]:px-2.5"],
18889
- lg: ["h-10", "px-6", "has-[>svg]:px-4"],
18890
- "icon-xs": inGroup ? ["size-6", "p-0", "has-[>svg]:p-0"] : ["size-6.5"],
18891
- "icon-sm": inGroup ? ["size-8", "p-0", "has-[>svg]:p-0"] : ["size-8"],
18892
- icon: ["size-9"],
18893
- "icon-lg": ["size-10"]
18894
- };
18895
18903
  function setVariant(variant) {
18896
18904
  for (const [_, value] of Object.entries(buttonVariants)) {
18897
18905
  el.classList.remove(...value);
@@ -18899,12 +18907,9 @@ function button_default(Alpine) {
18899
18907
  if (buttonVariants.hasOwnProperty(variant)) el.classList.add(...buttonVariants[variant]);
18900
18908
  }
18901
18909
  function setSize(size3) {
18902
- if (sizes.hasOwnProperty(size3)) {
18903
- el.classList.add(...sizes[size3]);
18904
- el.setAttribute("data-size", size3);
18905
- if (size3.startsWith("icon") && !el.hasAttribute("aria-labelledby") && !el.hasAttribute("aria-label")) {
18906
- console.error('h-button: Icon-only buttons must have an "aria-label" or "aria-labelledby" attribute', el);
18907
- }
18910
+ el.classList.add(...getButtonSize(size3, inGroup));
18911
+ if (size3 && size3.startsWith("icon") && !el.hasAttribute("aria-labelledby") && !el.hasAttribute("aria-label")) {
18912
+ console.error('h-button: Icon-only buttons must have an "aria-label" or "aria-labelledby" attribute', el);
18908
18913
  }
18909
18914
  }
18910
18915
  setVariant(el.getAttribute("data-variant") ?? "default");
@@ -18919,19 +18924,17 @@ function button_default(Alpine) {
18919
18924
  if (["date-picker-trigger", "time-picker-trigger"].includes(el.getAttribute("data-slot"))) {
18920
18925
  setSize("icon-xs");
18921
18926
  } else {
18922
- setSize("default");
18927
+ setSize();
18923
18928
  }
18924
18929
  }
18925
18930
  }
18926
18931
  const observer = new MutationObserver((mutations) => {
18927
18932
  mutations.forEach((mutation) => {
18928
- if (mutation.type === "attributes") {
18929
- if (mutation.attributeName === "data-variant") setVariant(el.getAttribute("data-variant") ?? "default");
18930
- else if (mutation.attributeName === "data-size") setSize(el.getAttribute("data-size") ?? (inGroup ? "xs" : "default"));
18931
- }
18933
+ if (mutation.attributeName === "data-variant") setVariant(el.getAttribute("data-variant") ?? "default");
18934
+ else setSize(el.getAttribute("data-size") ?? (inGroup ? "xs" : "default"));
18932
18935
  });
18933
18936
  });
18934
- observer.observe(el, { attributes: true });
18937
+ observer.observe(el, { attributes: true, attributeFilter: ["data-variant", "data-size"] });
18935
18938
  cleanup(() => {
18936
18939
  observer.disconnect();
18937
18940
  });
@@ -21159,8 +21162,8 @@ function dialog_default(Alpine) {
21159
21162
  el.setAttribute("tabindex", "-1");
21160
21163
  el.setAttribute("data-slot", "dialog-overlay");
21161
21164
  const observer = new MutationObserver((mutations) => {
21162
- mutations.forEach((mutation) => {
21163
- if (mutation.type === "attributes" && mutation.attributeName === "data-open" && el.getAttribute("data-open") === "true") {
21165
+ mutations.forEach(() => {
21166
+ if (el.getAttribute("data-open") === "true") {
21164
21167
  const inputs = el.getElementsByTagName("INPUT");
21165
21168
  if (inputs.length) {
21166
21169
  for (let i = 0; i < inputs.length; i++) {
@@ -21179,7 +21182,7 @@ function dialog_default(Alpine) {
21179
21182
  }
21180
21183
  });
21181
21184
  });
21182
- observer.observe(el, { attributes: true });
21185
+ observer.observe(el, { attributes: true, attributeFilter: ["data-open"] });
21183
21186
  cleanup(() => {
21184
21187
  observer.disconnect();
21185
21188
  });
@@ -21419,9 +21422,9 @@ function input_default(Alpine) {
21419
21422
  "aria-invalid:ring-negative/20",
21420
21423
  "dark:aria-invalid:ring-negative/40",
21421
21424
  "aria-invalid:border-negative",
21422
- "invalid:ring-negative/20",
21423
- "dark:invalid:ring-negative/40",
21424
- "invalid:border-negative"
21425
+ "invalid:!ring-negative/20",
21426
+ "dark:invalid:!ring-negative/40",
21427
+ "invalid:!border-negative"
21425
21428
  );
21426
21429
  if (modifiers.includes("group")) {
21427
21430
  el.classList.remove("rounded-control", "border", "bg-input-inner", "shadow-control", "focus-visible:ring-[3px]");
@@ -21573,9 +21576,9 @@ function list_default(Alpine) {
21573
21576
  "aria-invalid:ring-negative/20",
21574
21577
  "dark:aria-invalid:ring-negative/40",
21575
21578
  "aria-invalid:border-negative",
21576
- "invalid:ring-negative/20",
21577
- "dark:invalid:ring-negative/40",
21578
- "invalid:border-negative",
21579
+ "invalid:!ring-negative/20",
21580
+ "dark:invalid:!ring-negative/40",
21581
+ "invalid:!border-negative",
21579
21582
  "[&>ul:first-child>*:first-child]:rounded-t-control",
21580
21583
  "[&>ul:last-child>*:last-child]:rounded-b-control"
21581
21584
  );
@@ -22617,10 +22620,28 @@ function select_default(Alpine) {
22617
22620
  select._select.multiple = Array.isArray(el._x_model.get());
22618
22621
  select._select.model = el._x_model.get();
22619
22622
  }
22623
+ setButtonClasses(el);
22624
+ const setVariant = (variant) => {
22625
+ if (variant === "secondary") {
22626
+ el.classList.add(...buttonVariants["default"]);
22627
+ return;
22628
+ } else if (variant === "transparent") {
22629
+ el.classList.add(...buttonVariants["transparent"]);
22630
+ } else el.classList.add("shadow-control", ...buttonVariants["outline"]);
22631
+ };
22632
+ const setSize = (size3) => {
22633
+ const sizes = ["sm", "xs", "lg"];
22634
+ if (sizes.includes(size3)) {
22635
+ el.classList.add(...getButtonSize(size3));
22636
+ } else el.classList.add(...getButtonSize());
22637
+ };
22638
+ setVariant(el.getAttribute("data-variant"));
22639
+ setSize(el.getAttribute("data-size"));
22640
+ el.classList.add("w-full", "[&_svg]:opacity-50", "[&[data-state=open]>svg]:rotate-180");
22620
22641
  el.setAttribute("type", "button");
22621
22642
  const selectValue = document.createElement("span");
22622
22643
  selectValue.setAttribute("data-slot", "select-value");
22623
- selectValue.classList.add("pointer-events-none");
22644
+ selectValue.classList.add("text-left", "truncate", "pointer-events-none", "w-full");
22624
22645
  function getPlaceholder() {
22625
22646
  if (!el.value) {
22626
22647
  const value = el.getAttribute("placeholder");
@@ -22635,17 +22656,15 @@ function select_default(Alpine) {
22635
22656
  getPlaceholder();
22636
22657
  const observer = new MutationObserver((mutations) => {
22637
22658
  mutations.forEach((mutation) => {
22638
- if (mutation.type === "attributes") {
22639
- if (mutation.attributeName === "value") {
22640
- el.dispatchEvent(new Event("change", { bubbles: true }));
22641
- if (el.value) selectValue.classList.remove("text-muted-foreground");
22642
- } else if (mutation.attributeName === "placeholder" && !select._select.label.length) {
22643
- getPlaceholder();
22644
- }
22659
+ if (mutation.attributeName === "value") {
22660
+ el.dispatchEvent(new Event("change", { bubbles: true }));
22661
+ if (el.value) selectValue.classList.remove("text-muted-foreground");
22662
+ } else if (mutation.attributeName === "placeholder" && !select._select.label.length) {
22663
+ getPlaceholder();
22645
22664
  }
22646
22665
  });
22647
22666
  });
22648
- observer.observe(el, { attributes: true });
22667
+ observer.observe(el, { attributes: true, attributeFilter: ["value", "placeholder"] });
22649
22668
  effect(() => {
22650
22669
  if (select._select.label.length === 1) {
22651
22670
  selectValue.innerText = select._select.label[0];
@@ -22655,48 +22674,6 @@ function select_default(Alpine) {
22655
22674
  getPlaceholder();
22656
22675
  }
22657
22676
  });
22658
- el.classList.add(
22659
- "[&>*]:pointer-events-none",
22660
- "cursor-pointer",
22661
- "border-input",
22662
- "focus-visible:border-ring",
22663
- "focus-visible:ring-ring/50",
22664
- "aria-invalid:ring-negative/20",
22665
- "dark:aria-invalid:ring-negative/40",
22666
- "aria-invalid:border-negative",
22667
- "invalid:ring-negative/20",
22668
- "dark:invalid:ring-negative/40",
22669
- "invalid:border-negative",
22670
- "hover:bg-secondary-hover",
22671
- "active:bg-secondary-active",
22672
- "flex",
22673
- "w-full",
22674
- "items-center",
22675
- "justify-between",
22676
- "gap-2",
22677
- "rounded-control",
22678
- "border",
22679
- "bg-input-inner",
22680
- "px-3",
22681
- "text-sm",
22682
- "whitespace-nowrap",
22683
- "shadow-control",
22684
- "transition-[color,box-shadow]",
22685
- "outline-none",
22686
- "focus-visible:ring-[3px]",
22687
- "disabled:cursor-not-allowed",
22688
- "disabled:opacity-50",
22689
- "*:data-[slot=select-value]:line-clamp-1",
22690
- "*:data-[slot=select-value]:flex",
22691
- "*:data-[slot=select-value]:items-center",
22692
- "*:data-[slot=select-value]:gap-2",
22693
- "[&_svg]:pointer-events-none",
22694
- "[&_svg]:shrink-0",
22695
- "[&_svg:not([class*='size-'])]:size-4",
22696
- "[&_svg]:size-4",
22697
- "[&_svg]:opacity-50",
22698
- "[&[data-state=open]>svg]:rotate-180"
22699
- );
22700
22677
  el.setAttribute("data-slot", "select-trigger");
22701
22678
  if (el.hasAttribute("id")) {
22702
22679
  select._select.id = el.getAttribute("id");
@@ -22708,21 +22685,6 @@ function select_default(Alpine) {
22708
22685
  el.setAttribute("aria-haspopup", "listbox");
22709
22686
  el.setAttribute("aria-autocomplete", "none");
22710
22687
  el.setAttribute("role", "combobox");
22711
- const sizes = {
22712
- default: ["h-9", "py-2"],
22713
- xs: ["h-6.5", "py-[0.188rem]"],
22714
- sm: ["h-8", "py-1.5"]
22715
- };
22716
- function setSize(size3) {
22717
- for (const [_, value] of Object.entries(sizes)) {
22718
- el.classList.remove(...value);
22719
- }
22720
- if (sizes.hasOwnProperty(size3)) {
22721
- el.classList.add(...sizes[size3]);
22722
- }
22723
- }
22724
- if (!el.hasAttribute("data-size")) el.setAttribute("data-size", "default");
22725
- setSize(el.getAttribute("data-size"));
22726
22688
  effect(() => {
22727
22689
  el.setAttribute("data-state", select._select.expanded ? "open" : "closed");
22728
22690
  el.setAttribute("aria-expanded", select._select.expanded);
@@ -22807,7 +22769,7 @@ function select_default(Alpine) {
22807
22769
  if (!select) {
22808
22770
  throw new Error("h-select-content must be inside an h-select element");
22809
22771
  }
22810
- el.classList.add("absolute", "bg-popover", "text-popover-foreground", "data-[state=closed]:hidden", "p-1", "top-0", "left-0", "z-50", "min-w-[1rem]", "overflow-x-hidden", "overflow-y-auto", "rounded-control", "border", "shadow-md");
22772
+ el.classList.add("absolute", "bg-popover", "text-popover-foreground", "data-[state=closed]:hidden", "p-1", "top-0", "left-0", "z-50", "min-w-[1rem]", "overflow-x-hidden", "overflow-y-auto", "rounded-md", "border", "shadow-md");
22811
22773
  el.setAttribute("data-slot", "select-content");
22812
22774
  el.setAttribute("role", "listbox");
22813
22775
  el.setAttribute("role", "presentation");
@@ -22939,7 +22901,7 @@ function select_default(Alpine) {
22939
22901
  "cursor-default",
22940
22902
  "items-center",
22941
22903
  "gap-2",
22942
- "rounded-control",
22904
+ "rounded-sm",
22943
22905
  "py-1.5",
22944
22906
  "pr-8",
22945
22907
  "pl-2",
@@ -23099,15 +23061,11 @@ function sidebar_default(Alpine) {
23099
23061
  };
23100
23062
  setFloating();
23101
23063
  const observer = new MutationObserver((mutations) => {
23102
- mutations.forEach((mutation) => {
23103
- if (mutation.type === "attributes") {
23104
- if (mutation.attributeName === "data-floating") {
23105
- setFloating();
23106
- }
23107
- }
23064
+ mutations.forEach(() => {
23065
+ setFloating();
23108
23066
  });
23109
23067
  });
23110
- observer.observe(el, { attributes: true });
23068
+ observer.observe(el, { attributes: true, attributeFilter: ["data-floating"] });
23111
23069
  cleanup(() => {
23112
23070
  observer.disconnect();
23113
23071
  });
@@ -23394,10 +23352,21 @@ function skeleton_default(Alpine) {
23394
23352
  el.classList.add("bg-secondary", "animate-pulse");
23395
23353
  if (modifiers.includes("control")) {
23396
23354
  el.classList.add("rounded-control");
23355
+ switch (el.getAttribute("data-size")) {
23356
+ case "xs":
23357
+ el.classList.add("h-6.5");
23358
+ break;
23359
+ case "sm":
23360
+ el.classList.add("h-8");
23361
+ break;
23362
+ default:
23363
+ el.classList.add("h-9");
23364
+ break;
23365
+ }
23397
23366
  } else if (modifiers.includes("card")) {
23398
23367
  el.classList.add("rounded-lg");
23399
23368
  } else if (modifiers.includes("avatar")) {
23400
- el.classList.add("rounded-full", "size-8");
23369
+ el.classList.add("rounded-full", "size-8", "aspect-square");
23401
23370
  } else el.classList.add("rounded-md");
23402
23371
  el.setAttribute("data-slot", "skeleton");
23403
23372
  });
@@ -23760,8 +23729,11 @@ function text_default(Alpine) {
23760
23729
  case "blockquote":
23761
23730
  el.classList.add("mt-6", "border-l-2", "pl-6", "italic");
23762
23731
  break;
23732
+ case "code-inline":
23733
+ el.classList.add("bg-muted", "relative", "rounded", "px-[0.3rem]", "py-[0.2rem]", "font-mono", "text-sm", "font-semibold", "whitespace-pre");
23734
+ break;
23763
23735
  case "code":
23764
- el.classList.add("bg-muted", "relative", "rounded", "px-[0.3rem]", "py-[0.2rem]", "font-mono", "text-sm", "font-semibold");
23736
+ el.classList.add("bg-muted", "relative", "rounded", "p-3", "font-mono", "text-sm", "font-semibold", "whitespace-pre");
23765
23737
  break;
23766
23738
  case "lead":
23767
23739
  el.classList.add("text-muted-foreground", "text-xl");
@@ -23795,9 +23767,9 @@ function textarea_default(Alpine) {
23795
23767
  "aria-invalid:ring-negative/20",
23796
23768
  "dark:aria-invalid:ring-negative/40",
23797
23769
  "aria-invalid:border-negative",
23798
- "invalid:ring-negative/20",
23799
- "dark:invalid:ring-negative/40",
23800
- "invalid:border-negative",
23770
+ "invalid:!ring-negative/20",
23771
+ "dark:invalid:!ring-negative/40",
23772
+ "invalid:!border-negative",
23801
23773
  "bg-input-inner",
23802
23774
  "flex",
23803
23775
  "field-sizing-content",
@@ -24583,6 +24555,7 @@ function toolbar_default(Alpine) {
24583
24555
  "w-full",
24584
24556
  "h-12",
24585
24557
  "data-[size=sm]:h-8",
24558
+ "data-[size=md]:h-10",
24586
24559
  "data-[variant=transparent]:bg-transparent",
24587
24560
  "data-[variant=transparent]:text-foreground",
24588
24561
  "data-[floating=true]:shadow-xs",
@@ -24592,11 +24565,11 @@ function toolbar_default(Alpine) {
24592
24565
  el.setAttribute("data-slot", "toolbar");
24593
24566
  });
24594
24567
  Alpine.directive("h-toolbar-image", (el) => {
24595
- el.classList.add("size-8", "[[data-size=sm]_&]:size-6");
24568
+ el.classList.add("size-8", "[[data-size=md]_&]:size-7", "[[data-size=sm]_&]:size-6");
24596
24569
  el.setAttribute("data-slot", "toolbar-image");
24597
24570
  });
24598
24571
  Alpine.directive("h-toolbar-title", (el) => {
24599
- el.classList.add("text", "[[data-size=sm]_&]:text-sm", "first:pl-2", "font-medium", "whitespace-nowrap", "text-ellipsis", "overflow-hidden");
24572
+ el.classList.add("text", "[[data-size=sm]_&]:text-sm", "[[data-size=md]_&]:text-sm", "first:pl-2", "font-medium", "whitespace-nowrap", "text-ellipsis", "overflow-hidden");
24600
24573
  el.setAttribute("data-slot", "toolbar-title");
24601
24574
  });
24602
24575
  Alpine.directive("h-toolbar-spacer", (el) => {
@@ -24605,7 +24578,7 @@ function toolbar_default(Alpine) {
24605
24578
  el.setAttribute("data-slot", "toolbar-spacer");
24606
24579
  });
24607
24580
  Alpine.directive("h-toolbar-separator", (el) => {
24608
- el.classList.add("w-px", "h-8", "[[data-size=sm]_&]:h-6", "border-l");
24581
+ el.classList.add("w-px", "h-8", "[[data-size=md]_&]:h-6", "[[data-size=sm]_&]:h-6", "border-l");
24609
24582
  el.setAttribute("data-slot", "toolbar-separator");
24610
24583
  });
24611
24584
  }
@@ -24688,7 +24661,24 @@ function tooltip_default(Alpine) {
24688
24661
  }
24689
24662
 
24690
24663
  // package.json
24691
- var version = "0.4.0";
24664
+ var version = "0.5.0";
24665
+
24666
+ // src/utils/breakpoint-listener.js
24667
+ function getBreakpointListener(handler2, breakpoint = 768) {
24668
+ const mql = top.matchMedia(`(width <= ${breakpoint}px)`);
24669
+ const onWidthChange = (event) => {
24670
+ handler2(event.matches);
24671
+ };
24672
+ mql.addEventListener("change", onWidthChange);
24673
+ handler2(mql.matches);
24674
+ return {
24675
+ _mql: mql,
24676
+ _onWidthChange: onWidthChange,
24677
+ remove() {
24678
+ this._mql.removeEventListener("change", this._onWidthChange);
24679
+ }
24680
+ };
24681
+ }
24692
24682
 
24693
24683
  // src/utils/theme.js
24694
24684
  var colorSchemeKey = "codbex.harmonia.colorMode";
@@ -24742,52 +24732,47 @@ var getColorScheme = () => {
24742
24732
  initColorScheme();
24743
24733
 
24744
24734
  // src/module.js
24745
- var Harmonia = {
24746
- init(registerPlugin) {
24747
- registerPlugin(accordion_default);
24748
- registerPlugin(alert_default);
24749
- registerPlugin(avatar_default);
24750
- registerPlugin(badge_default);
24751
- registerPlugin(button_default);
24752
- registerPlugin(calendar_default);
24753
- registerPlugin(card_default);
24754
- registerPlugin(checkbox_default);
24755
- registerPlugin(collapsible_default);
24756
- registerPlugin(datepicker_default);
24757
- registerPlugin(dialog_default);
24758
- registerPlugin(fieldset_default);
24759
- registerPlugin(icon_default);
24760
- registerPlugin(info_page_default);
24761
- registerPlugin(input_default);
24762
- registerPlugin(label_default);
24763
- registerPlugin(list_default);
24764
- registerPlugin(menu_default);
24765
- registerPlugin(pagination_default);
24766
- registerPlugin(popover_default);
24767
- registerPlugin(progress_default);
24768
- registerPlugin(radio_default);
24769
- registerPlugin(range_default);
24770
- registerPlugin(select_default);
24771
- registerPlugin(separator_default);
24772
- registerPlugin(sidebar_default);
24773
- registerPlugin(skeleton_default);
24774
- registerPlugin(spinner_default);
24775
- registerPlugin(switch_default);
24776
- registerPlugin(table_default);
24777
- registerPlugin(tabs_default);
24778
- registerPlugin(tag_default);
24779
- registerPlugin(text_default);
24780
- registerPlugin(textarea_default);
24781
- registerPlugin(tile_default);
24782
- registerPlugin(timepicker_default);
24783
- registerPlugin(toolbar_default);
24784
- registerPlugin(tooltip_default);
24785
- },
24786
- setColorScheme,
24787
- getColorScheme,
24788
- version
24735
+ var registerComponents = (registerPlugin) => {
24736
+ registerPlugin(accordion_default);
24737
+ registerPlugin(alert_default);
24738
+ registerPlugin(avatar_default);
24739
+ registerPlugin(badge_default);
24740
+ registerPlugin(button_default);
24741
+ registerPlugin(calendar_default);
24742
+ registerPlugin(card_default);
24743
+ registerPlugin(checkbox_default);
24744
+ registerPlugin(collapsible_default);
24745
+ registerPlugin(datepicker_default);
24746
+ registerPlugin(dialog_default);
24747
+ registerPlugin(fieldset_default);
24748
+ registerPlugin(icon_default);
24749
+ registerPlugin(info_page_default);
24750
+ registerPlugin(input_default);
24751
+ registerPlugin(label_default);
24752
+ registerPlugin(list_default);
24753
+ registerPlugin(menu_default);
24754
+ registerPlugin(pagination_default);
24755
+ registerPlugin(popover_default);
24756
+ registerPlugin(progress_default);
24757
+ registerPlugin(radio_default);
24758
+ registerPlugin(range_default);
24759
+ registerPlugin(select_default);
24760
+ registerPlugin(separator_default);
24761
+ registerPlugin(sidebar_default);
24762
+ registerPlugin(skeleton_default);
24763
+ registerPlugin(spinner_default);
24764
+ registerPlugin(switch_default);
24765
+ registerPlugin(table_default);
24766
+ registerPlugin(tabs_default);
24767
+ registerPlugin(tag_default);
24768
+ registerPlugin(text_default);
24769
+ registerPlugin(textarea_default);
24770
+ registerPlugin(tile_default);
24771
+ registerPlugin(timepicker_default);
24772
+ registerPlugin(toolbar_default);
24773
+ registerPlugin(tooltip_default);
24789
24774
  };
24790
- var module_default = Harmonia;
24775
+ var module_default = registerComponents;
24791
24776
  export {
24792
24777
  accordion_default as Accordion,
24793
24778
  alert_default as Alert,
@@ -24827,7 +24812,12 @@ export {
24827
24812
  timepicker_default as TimePicker,
24828
24813
  toolbar_default as Toolbar,
24829
24814
  tooltip_default as Tooltip,
24830
- module_default as default
24815
+ module_default as default,
24816
+ getBreakpointListener,
24817
+ getColorScheme,
24818
+ registerComponents,
24819
+ setColorScheme,
24820
+ version
24831
24821
  };
24832
24822
  /*! Bundled license information:
24833
24823