@mhmo91/schmancy 0.10.21 → 0.10.23

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 (88) hide show
  1. package/custom-elements.json +0 -106
  2. package/dist/agent/{overlay.confirm-body-DXus8d-w.js → overlay.confirm-body-xfOh5Q28.js} +0 -4
  3. package/dist/agent/{overlay.confirm-body-DXus8d-w.js.map → overlay.confirm-body-xfOh5Q28.js.map} +1 -1
  4. package/dist/agent/schmancy.agent.js +1835 -1951
  5. package/dist/agent/schmancy.agent.js.map +1 -1
  6. package/dist/agent/schmancy.manifest.json +1 -89
  7. package/dist/badge.cjs +1 -1
  8. package/dist/badge.js +1 -1
  9. package/dist/button-C1IMGS6M.js +446 -0
  10. package/dist/button-C1IMGS6M.js.map +1 -0
  11. package/dist/button-CWNbPPq-.cjs +120 -0
  12. package/dist/button-CWNbPPq-.cjs.map +1 -0
  13. package/dist/button.cjs +1 -120
  14. package/dist/button.js +2 -447
  15. package/dist/content-drawer.cjs +1 -1
  16. package/dist/content-drawer.js +1 -1
  17. package/dist/{date-range-aPSmSBhk.js → date-range-CAqB-B0M.js} +1 -1
  18. package/dist/{date-range-aPSmSBhk.js.map → date-range-CAqB-B0M.js.map} +1 -1
  19. package/dist/{date-range-CsJfjbmi.cjs → date-range-VA1mi1N7.cjs} +1 -1
  20. package/dist/{date-range-CsJfjbmi.cjs.map → date-range-VA1mi1N7.cjs.map} +1 -1
  21. package/dist/date-range.cjs +1 -1
  22. package/dist/date-range.js +1 -1
  23. package/dist/{form-Bz5WamuM.js → form-B-Sm6u25.js} +1 -1
  24. package/dist/{form-Bz5WamuM.js.map → form-B-Sm6u25.js.map} +1 -1
  25. package/dist/{form-PioZDvzA.cjs → form-ha3df3K7.cjs} +1 -1
  26. package/dist/{form-PioZDvzA.cjs.map → form-ha3df3K7.cjs.map} +1 -1
  27. package/dist/form.cjs +1 -1
  28. package/dist/form.js +2 -2
  29. package/dist/handover/agent-runtime-followups.md +1 -1
  30. package/dist/handover/agent-runtime-v1.md +3 -3
  31. package/dist/icons-DJuXwn8D.js +48 -0
  32. package/dist/icons-DJuXwn8D.js.map +1 -0
  33. package/dist/icons-oNRUCAEY.cjs +33 -0
  34. package/dist/icons-oNRUCAEY.cjs.map +1 -0
  35. package/dist/icons.cjs +1 -1
  36. package/dist/icons.js +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +7 -7
  39. package/dist/{menu-CxE16xur.js → menu-Csm6Fg88.js} +1 -1
  40. package/dist/{menu-CxE16xur.js.map → menu-Csm6Fg88.js.map} +1 -1
  41. package/dist/{menu-BOZ2iwed.cjs → menu-DBuZiPyW.cjs} +1 -1
  42. package/dist/{menu-BOZ2iwed.cjs.map → menu-DBuZiPyW.cjs.map} +1 -1
  43. package/dist/menu.cjs +1 -1
  44. package/dist/menu.js +1 -1
  45. package/dist/nav-drawer.cjs +1 -1
  46. package/dist/nav-drawer.js +1 -1
  47. package/dist/navigation-bar.cjs +1 -1
  48. package/dist/navigation-bar.js +1 -1
  49. package/dist/{overlay-D3mdWOLS.js → overlay-CAI2FAp7.js} +3 -2
  50. package/dist/{overlay-D3mdWOLS.js.map → overlay-CAI2FAp7.js.map} +1 -1
  51. package/dist/{overlay-B3gKPWhu.cjs → overlay-CpvmytrQ.cjs} +2 -1
  52. package/dist/{overlay-B3gKPWhu.cjs.map → overlay-CpvmytrQ.cjs.map} +1 -1
  53. package/dist/overlay.cjs +1 -1
  54. package/dist/{overlay.confirm-body-Czi6cMZq.js → overlay.confirm-body-Cq25CkTw.js} +0 -4
  55. package/dist/overlay.confirm-body-Cq25CkTw.js.map +1 -0
  56. package/dist/{overlay.confirm-body-yr0HzS_d.cjs → overlay.confirm-body-QD-5cj3_.cjs} +0 -4
  57. package/dist/overlay.confirm-body-QD-5cj3_.cjs.map +1 -0
  58. package/dist/overlay.js +3 -3
  59. package/dist/{overlay.service-DNs3AWqp.cjs → overlay.service-BG0bqPwJ.cjs} +1 -1
  60. package/dist/{overlay.service-DNs3AWqp.cjs.map → overlay.service-BG0bqPwJ.cjs.map} +1 -1
  61. package/dist/{overlay.service-BfZf3xoD.js → overlay.service-Bpjrhaxh.js} +2 -2
  62. package/dist/{overlay.service-BfZf3xoD.js.map → overlay.service-Bpjrhaxh.js.map} +1 -1
  63. package/dist/skills/overlay.md +4 -0
  64. package/dist/skills/schmancy/overlay.md +4 -0
  65. package/dist/{src-CHd-U-w4.js → src-B15R32Sp.js} +7 -7
  66. package/dist/{src-CHd-U-w4.js.map → src-B15R32Sp.js.map} +1 -1
  67. package/dist/{src-ggWtvpDr.cjs → src-BWQvtOOf.cjs} +1 -1
  68. package/dist/{src-ggWtvpDr.cjs.map → src-BWQvtOOf.cjs.map} +1 -1
  69. package/dist/teleport.cjs +1 -1
  70. package/dist/teleport.js +1 -1
  71. package/package.json +1 -1
  72. package/skills/schmancy/overlay.md +4 -0
  73. package/src/icons/icon.ts +43 -293
  74. package/src/overlay/overlay.component.ts +1 -0
  75. package/src/overlay/overlay.confirm-body.ts +0 -4
  76. package/types/src/icons/icon.d.ts +0 -81
  77. package/dist/button.cjs.map +0 -1
  78. package/dist/button.js.map +0 -1
  79. package/dist/context-6oXCZmZN.js +0 -3
  80. package/dist/context-6oXCZmZN.js.map +0 -1
  81. package/dist/context-CRZeiCqq.cjs +0 -1
  82. package/dist/context-CRZeiCqq.cjs.map +0 -1
  83. package/dist/icons-BgUbHwy8.js +0 -169
  84. package/dist/icons-BgUbHwy8.js.map +0 -1
  85. package/dist/icons-morK4hHz.cjs +0 -52
  86. package/dist/icons-morK4hHz.cjs.map +0 -1
  87. package/dist/overlay.confirm-body-Czi6cMZq.js.map +0 -1
  88. package/dist/overlay.confirm-body-yr0HzS_d.cjs.map +0 -1
@@ -1863,95 +1863,7 @@
1863
1863
  {
1864
1864
  "kind": "class",
1865
1865
  "name": "SchmancyIcon",
1866
- "tagName": "schmancy-icon",
1867
- "attributes": [
1868
- {
1869
- "name": "fill",
1870
- "type": {
1871
- "text": "number"
1872
- },
1873
- "default": "0",
1874
- "description": "Fill value for the icon (0-1) 0 = outlined, 1 = filled"
1875
- },
1876
- {
1877
- "name": "weight",
1878
- "type": {
1879
- "text": "number"
1880
- },
1881
- "default": "400",
1882
- "description": "Weight value for the icon (100-700) Controls the thickness of the icon strokes"
1883
- },
1884
- {
1885
- "name": "grade",
1886
- "type": {
1887
- "text": "number"
1888
- },
1889
- "default": "0",
1890
- "description": "Grade value for the icon (-50-200) Adjusts the visual weight/grade"
1891
- },
1892
- {
1893
- "name": "variant",
1894
- "type": {
1895
- "text": "\"rounded\" | \"outlined\" | \"sharp\""
1896
- },
1897
- "values": [
1898
- "rounded",
1899
- "outlined",
1900
- "sharp"
1901
- ],
1902
- "default": "'outlined'",
1903
- "description": "Icon variant style"
1904
- },
1905
- {
1906
- "name": "size",
1907
- "type": {
1908
- "text": "string"
1909
- },
1910
- "default": "'md'",
1911
- "description": "Size of the icon - M3 aligned tokens or custom string Tokens: 'xxs' (12px), 'xs' (16px), 'sm' (20px), 'md' (24px), 'lg' (32px) Custom: any CSS size string like '48px', '2rem' When this icon is a descendant of `<schmancy-button>`, the button's `size` wins (via `SchmancyButtonSizeContext`). The local `size` only applies when there is no ancestor button."
1912
- },
1913
- {
1914
- "name": "icon",
1915
- "type": {
1916
- "text": "string"
1917
- },
1918
- "description": "Icon name - use this instead of slot content to prevent translation breaking icons. When set, this takes precedence over slot content. Example: <schmancy-icon icon=\"delete\"></schmancy-icon>"
1919
- }
1920
- ],
1921
- "cssProperties": [
1922
- {
1923
- "name": "--schmancy-icon-size",
1924
- "description": "The size of the icon (default: 24px)"
1925
- },
1926
- {
1927
- "name": "--schmancy-icon-fill",
1928
- "description": "Fill value for icon (0-1)"
1929
- },
1930
- {
1931
- "name": "--schmancy-icon-weight",
1932
- "description": "Weight value for icon (100-700)"
1933
- },
1934
- {
1935
- "name": "--schmancy-icon-grade",
1936
- "description": "Grade value for icon (-50-200)"
1937
- },
1938
- {
1939
- "name": "--schmancy-icon-opsz",
1940
- "description": "Optical size (default: 24)"
1941
- }
1942
- ],
1943
- "cssParts": [
1944
- {
1945
- "name": "icon",
1946
- "description": "The inner `<span>` carrying the Material Symbols glyph."
1947
- }
1948
- ],
1949
- "contexts": [
1950
- {
1951
- "name": "SchmancyButtonSizeContext",
1952
- "kind": "consume"
1953
- }
1954
- ]
1866
+ "tagName": "schmancy-icon"
1955
1867
  }
1956
1868
  ]
1957
1869
  },
package/dist/badge.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-ggWtvpDr.cjs`);Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return e.w}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return e.T}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-BWQvtOOf.cjs`);Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return e.w}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return e.T}});
package/dist/badge.js CHANGED
@@ -1,2 +1,2 @@
1
- import { T as e, w as t } from "./src-CHd-U-w4.js";
1
+ import { T as e, w as t } from "./src-B15R32Sp.js";
2
2
  export { t as ScBadgeV2, e as SchmancyBadgeV2 };
@@ -0,0 +1,446 @@
1
+ import { c as e } from "./mixins-pU53qf6R.js";
2
+ import { a as t } from "./active-host-BP0zy_Y9.js";
3
+ import { t as n } from "./magnetic-DxvoEz8_.js";
4
+ import { createContext as r, provide as i } from "@lit/context";
5
+ import { customElement as a, property as o, query as s, queryAssignedElements as c, state as l } from "lit/decorators.js";
6
+ import { LitElement as u, css as d, html as f } from "lit";
7
+ import { ifDefined as p } from "lit/directives/if-defined.js";
8
+ import { when as m } from "lit/directives/when.js";
9
+ var h = r("schmancy-button-size"), g = class extends e {
10
+ static {
11
+ this.styles = [d`:host{
12
+ display: inline-flex;
13
+ overflow: hidden;
14
+ position: relative;
15
+ touch-action: manipulation;
16
+ border-radius: 1rem;
17
+ transition:
18
+ box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
19
+ transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
20
+ }
21
+ :host([width="full"]) {
22
+ display: flex;
23
+ width: 100%;
24
+ }
25
+ :host(:hover:not([disabled])) {
26
+ box-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);
27
+ }
28
+ :host(:active:not([disabled])) {
29
+ transform: scale(0.97);
30
+ box-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);
31
+ transition-duration: 100ms;
32
+ }
33
+ @media (prefers-reduced-motion: reduce) {
34
+ :host { transition: none; }
35
+ :host(:hover:not([disabled])) { box-shadow: none; }
36
+ :host(:active:not([disabled])) { transform: none; box-shadow: none; }
37
+ }
38
+ :host *,
39
+ * {
40
+ touch-action: manipulation;
41
+ }`];
42
+ }
43
+ static {
44
+ this.shadowRootOptions = {
45
+ ...u.shadowRootOptions,
46
+ mode: "open",
47
+ delegatesFocus: !0
48
+ };
49
+ }
50
+ static {
51
+ this.formAssociated = !0;
52
+ }
53
+ constructor() {
54
+ super(), this.variant = "text", this.width = "auto", this.size = "md", this.type = "button", this.disabled = !1;
55
+ try {
56
+ this.internals = this.attachInternals();
57
+ } catch {
58
+ this.internals = void 0;
59
+ }
60
+ this.addEventListener("click", (e) => {
61
+ if (this.disabled) return e.preventDefault(), void e.stopImmediatePropagation();
62
+ let t = this.internals?.form;
63
+ t && (this.type === "submit" ? (e.preventDefault(), t.requestSubmit()) : this.type === "reset" && (e.preventDefault(), t.reset()));
64
+ });
65
+ }
66
+ get form() {
67
+ return this.internals?.form ?? null;
68
+ }
69
+ formDisabledCallback(e) {
70
+ this.disabled = e;
71
+ }
72
+ connectedCallback() {
73
+ if (super.connectedCallback(), this.type !== "submit") return;
74
+ let e = this.closest("schmancy-form");
75
+ if (!e) return;
76
+ let t = () => {
77
+ e.getAttribute("aria-busy") === "true" ? (this.setAttribute("aria-busy", "true"), this.internals?.states.add("submitting")) : (this.removeAttribute("aria-busy"), this.internals?.states.delete("submitting"));
78
+ };
79
+ t(), this._formBusyObserver = new MutationObserver(t), this._formBusyObserver.observe(e, {
80
+ attributes: !0,
81
+ attributeFilter: ["aria-busy"]
82
+ });
83
+ }
84
+ disconnectedCallback() {
85
+ this._formBusyObserver?.disconnect(), this._formBusyObserver = void 0, super.disconnectedCallback();
86
+ }
87
+ set ariaLabel(e) {
88
+ let t = this._ariaLabel;
89
+ this._ariaLabel = e, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", t);
90
+ }
91
+ get ariaLabel() {
92
+ return this._ariaLabel;
93
+ }
94
+ focus(e) {
95
+ this.nativeElement.focus(e);
96
+ }
97
+ blur() {
98
+ this.nativeElement.blur();
99
+ }
100
+ get effectiveColor() {
101
+ return this.color ? this.color : (this.variant === "tonal" ? "filled tonal" : this.variant) === "filled tonal" ? "secondary" : "primary";
102
+ }
103
+ get imgClasses() {
104
+ return [{
105
+ xxs: "w-3 h-3",
106
+ xs: "w-4 h-4",
107
+ sm: "w-5 h-5",
108
+ md: "w-6 h-6",
109
+ lg: "w-7 h-7"
110
+ }[this.size], "object-contain"];
111
+ }
112
+ firstUpdated() {
113
+ this.prefixImgs?.forEach((e) => {
114
+ e.classList.add(...this.imgClasses), e.hasAttribute("alt") || e.setAttribute("alt", "");
115
+ }), this.suffixImgs?.forEach((e) => {
116
+ e.classList.add(...this.imgClasses), e.hasAttribute("alt") || e.setAttribute("alt", "");
117
+ });
118
+ }
119
+ click() {
120
+ this.dispatchEvent(new Event("click", {
121
+ bubbles: !0,
122
+ composed: !0
123
+ }));
124
+ }
125
+ _preventDefault(e) {
126
+ e.preventDefault(), e.stopPropagation();
127
+ }
128
+ render() {
129
+ let e = this.variant === "tonal" ? "filled tonal" : this.variant, t = {
130
+ "z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden": !0,
131
+ "h-6": this.size === "xxs",
132
+ "h-8": this.size === "xs",
133
+ "h-10": this.size === "sm",
134
+ "h-12": this.size === "md",
135
+ "h-14": this.size === "lg",
136
+ "py-1 px-2": this.size === "xxs",
137
+ "py-2 px-4": this.size === "xs",
138
+ "py-2.5 px-5": this.size === "sm",
139
+ "py-3 px-6": this.size === "md",
140
+ "py-4 px-7": this.size === "lg",
141
+ "text-[10px] font-medium leading-3": this.size === "xxs",
142
+ "text-xs font-medium leading-4": this.size === "xs",
143
+ "text-sm font-medium leading-5": this.size === "sm" || this.size === "md",
144
+ "text-base font-medium leading-6": this.size === "lg",
145
+ "tracking-[0.1px]": !0,
146
+ "gap-0.5": this.size === "xxs",
147
+ "gap-1": this.size === "xs",
148
+ "gap-1.5": this.size === "sm",
149
+ "gap-2": this.size === "md",
150
+ "gap-2.5": this.size === "lg",
151
+ "cursor-pointer": !this.disabled,
152
+ "opacity-[0.38]": this.disabled,
153
+ "hover:shadow-sm": !this.disabled && e === "elevated",
154
+ "w-full tex-center": this.width === "full",
155
+ "bg-surface-low shadow-xs": e === "elevated",
156
+ "bg-transparent border-1 border-solid": e === "outlined",
157
+ "border-outline": e === "outlined" && this.effectiveColor === "primary",
158
+ "border-success-default": e === "outlined" && this.effectiveColor === "success",
159
+ "border-error-default": e === "outlined" && this.effectiveColor === "error",
160
+ "border-warning-default": e === "outlined" && this.effectiveColor === "warning",
161
+ "border-info-default": e === "outlined" && this.effectiveColor === "info",
162
+ "border-secondary-default": e === "outlined" && this.effectiveColor === "secondary",
163
+ "border-outline-variant": e === "outlined" && this.effectiveColor === "neutral",
164
+ "bg-primary-default": e === "filled" && this.effectiveColor === "primary",
165
+ "bg-secondary-default": e === "filled" && this.effectiveColor === "secondary",
166
+ "bg-success-default": e === "filled" && this.effectiveColor === "success",
167
+ "bg-error-default": e === "filled" && this.effectiveColor === "error",
168
+ "bg-warning-default": e === "filled" && this.effectiveColor === "warning",
169
+ "bg-info-default": e === "filled" && this.effectiveColor === "info",
170
+ "bg-surface-containerHighest": e === "filled" && this.effectiveColor === "neutral",
171
+ "text-primary-on": e === "filled" && this.effectiveColor === "primary",
172
+ "text-secondary-on": e === "filled" && this.effectiveColor === "secondary",
173
+ "text-success-on": e === "filled" && this.effectiveColor === "success",
174
+ "text-error-on": e === "filled" && this.effectiveColor === "error",
175
+ "text-warning-on": e === "filled" && this.effectiveColor === "warning",
176
+ "text-info-on": e === "filled" && this.effectiveColor === "info",
177
+ "text-surface-on": e === "filled" && this.effectiveColor === "neutral",
178
+ "bg-primary-container": e === "filled tonal" && this.effectiveColor === "primary",
179
+ "bg-secondary-container": e === "filled tonal" && this.effectiveColor === "secondary",
180
+ "bg-success-container": e === "filled tonal" && this.effectiveColor === "success",
181
+ "bg-error-container": e === "filled tonal" && this.effectiveColor === "error",
182
+ "bg-warning-container": e === "filled tonal" && this.effectiveColor === "warning",
183
+ "bg-info-container": e === "filled tonal" && this.effectiveColor === "info",
184
+ "bg-surface-containerLow": e === "filled tonal" && this.effectiveColor === "neutral",
185
+ "text-primary-onContainer": e === "filled tonal" && this.effectiveColor === "primary",
186
+ "text-secondary-onContainer": e === "filled tonal" && this.effectiveColor === "secondary",
187
+ "text-success-onContainer": e === "filled tonal" && this.effectiveColor === "success",
188
+ "text-error-onContainer": e === "filled tonal" && this.effectiveColor === "error",
189
+ "text-warning-onContainer": e === "filled tonal" && this.effectiveColor === "warning",
190
+ "text-info-onContainer": e === "filled tonal" && this.effectiveColor === "info",
191
+ "text-primary-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "primary",
192
+ "text-secondary-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "secondary",
193
+ "text-success-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "success",
194
+ "text-error-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "error",
195
+ "text-warning-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "warning",
196
+ "text-info-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "info",
197
+ "text-surface-onVariant": (e === "text" || e === "elevated" || e === "outlined" || e === "filled tonal") && this.effectiveColor === "neutral"
198
+ }, r = {
199
+ "absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl": !0,
200
+ "focus-visible:opacity-[0.10]": !0,
201
+ "active:opacity-[0.10]": !0,
202
+ "hover:bg-primary-on": e === "filled" && this.effectiveColor === "primary",
203
+ "hover:bg-secondary-on": e === "filled" && this.effectiveColor === "secondary",
204
+ "hover:bg-success-on": e === "filled" && this.effectiveColor === "success",
205
+ "hover:bg-error-on": e === "filled" && this.effectiveColor === "error",
206
+ "hover:bg-warning-on": e === "filled" && this.effectiveColor === "warning",
207
+ "hover:bg-info-on": e === "filled" && this.effectiveColor === "info",
208
+ "hover:bg-surface-on": e === "filled" && this.effectiveColor === "neutral",
209
+ "hover:bg-primary-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "primary",
210
+ "hover:bg-secondary-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "secondary",
211
+ "hover:bg-success-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "success",
212
+ "hover:bg-error-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "error",
213
+ "hover:bg-warning-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "warning",
214
+ "hover:bg-info-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "info",
215
+ "hover:bg-surface-onVariant": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "neutral",
216
+ "hover:bg-primary-container": e === "filled tonal" && this.effectiveColor === "primary",
217
+ "hover:bg-secondary-container": e === "filled tonal" && this.effectiveColor === "secondary",
218
+ "hover:bg-success-container": e === "filled tonal" && this.effectiveColor === "success",
219
+ "hover:bg-error-container": e === "filled tonal" && this.effectiveColor === "error",
220
+ "hover:bg-warning-container": e === "filled tonal" && this.effectiveColor === "warning",
221
+ "hover:bg-info-container": e === "filled tonal" && this.effectiveColor === "info",
222
+ "hover:bg-surface-containerLow": e === "filled tonal" && this.effectiveColor === "neutral"
223
+ };
224
+ return this.href ? f`
225
+ <a
226
+ ${n({
227
+ strength: 3,
228
+ radius: 60
229
+ })}
230
+ part="base"
231
+ href=${p(this.disabled ? void 0 : this.href)}
232
+ aria-label=${p(this.ariaLabel)}
233
+ class="${this.classMap(t)}"
234
+ tabindex=${this.disabled ? "-1" : "0"}
235
+ aria-disabled=${this.disabled}
236
+ @click=${this.disabled ? this._preventDefault : void 0}
237
+ >
238
+ ${m(!this.disabled, () => f`<div class="${this.classMap(r)}"></div>`)}
239
+ <slot name="prefix"></slot>
240
+ <slot></slot>
241
+ <slot name="suffix"></slot>
242
+ </a>
243
+ ` : f`
244
+ <button
245
+ ${n({
246
+ strength: 3,
247
+ radius: 60
248
+ })}
249
+ part="base"
250
+ aria-label=${p(this.ariaLabel)}
251
+ ?disabled=${this.disabled}
252
+ class="${this.classMap(t)}"
253
+ type=${p(this.type)}
254
+ tabindex=${p(this.disabled ? "-1" : void 0)}
255
+ >
256
+ ${m(!this.disabled, () => f`<div class="${this.classMap(r)}"></div>`)}
257
+ <slot name="prefix"></slot>
258
+ <slot></slot>
259
+ <slot name="suffix"></slot>
260
+ </button>
261
+ `;
262
+ }
263
+ };
264
+ t([s("[part=\"base\"]", !0)], g.prototype, "nativeElement", void 0), t([o({
265
+ reflect: !0,
266
+ type: String
267
+ })], g.prototype, "variant", void 0), t([o({
268
+ reflect: !0,
269
+ type: String
270
+ })], g.prototype, "color", void 0), t([o({ reflect: !0 })], g.prototype, "width", void 0), t([i({ context: h }), o({ type: String })], g.prototype, "size", void 0), t([o({
271
+ reflect: !0,
272
+ type: String
273
+ })], g.prototype, "type", void 0), t([o()], g.prototype, "href", void 0), t([o({
274
+ type: Boolean,
275
+ reflect: !0
276
+ })], g.prototype, "disabled", void 0), t([o({ attribute: "aria-label" })], g.prototype, "ariaLabel", null), t([c({
277
+ slot: "prefix",
278
+ flatten: !0,
279
+ selector: "img"
280
+ })], g.prototype, "prefixImgs", void 0), t([c({
281
+ slot: "suffix",
282
+ flatten: !0,
283
+ selector: "img"
284
+ })], g.prototype, "suffixImgs", void 0), g = t([a("schmancy-button")], g);
285
+ var _ = class extends e {
286
+ constructor(...e) {
287
+ super(...e), this.size = "md", this.variant = "text", this.width = "auto", this.type = "button", this.disabled = !1, this.text = !1;
288
+ }
289
+ static {
290
+ this.styles = [d`
291
+ :host {
292
+ display: inline-flex;
293
+ border-radius: 9999px;
294
+ transition:
295
+ box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
296
+ transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
297
+ }
298
+ :host([width="full"]) {
299
+ display: flex;
300
+ width: 100%;
301
+ }
302
+ :host(:hover:not([disabled])) {
303
+ box-shadow: 0 2px 12px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 18%, transparent);
304
+ }
305
+ :host(:active:not([disabled])) {
306
+ transform: scale(0.92);
307
+ box-shadow: none;
308
+ transition-duration: 100ms;
309
+ }
310
+ @media (prefers-reduced-motion: reduce) {
311
+ :host { transition: none; }
312
+ :host(:hover:not([disabled])) { box-shadow: none; }
313
+ :host(:active:not([disabled])) { transform: none; box-shadow: none; }
314
+ }
315
+ `];
316
+ }
317
+ static {
318
+ this.shadowRootOptions = {
319
+ ...u.shadowRootOptions,
320
+ mode: "open",
321
+ delegatesFocus: !0
322
+ };
323
+ }
324
+ connectedCallback() {
325
+ super.connectedCallback(), this._captureIconFromChildren();
326
+ }
327
+ _captureIconFromChildren() {
328
+ if (!this.icon && !this.text) {
329
+ for (let e of this.childNodes) if (e.nodeType === Node.TEXT_NODE) {
330
+ let t = e.textContent?.trim();
331
+ if (t) return void (this._capturedIcon = t);
332
+ }
333
+ }
334
+ }
335
+ _handleSlotChange(e) {
336
+ if (this.icon || this.text) return;
337
+ let t = e.target.assignedNodes({ flatten: !0 });
338
+ for (let e of t) if (e.nodeType === Node.TEXT_NODE) {
339
+ let t = e.textContent?.trim();
340
+ if (t) return void (this._capturedIcon = t);
341
+ }
342
+ }
343
+ set ariaLabel(e) {
344
+ let t = this._ariaLabel;
345
+ this._ariaLabel = e, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", t);
346
+ }
347
+ get ariaLabel() {
348
+ return this._ariaLabel;
349
+ }
350
+ focus(e) {
351
+ this.nativeElement.focus(e);
352
+ }
353
+ blur() {
354
+ this.nativeElement.blur();
355
+ }
356
+ click() {
357
+ this.dispatchEvent(new Event("click", {
358
+ bubbles: !0,
359
+ composed: !0
360
+ }));
361
+ }
362
+ _preventDefault(e) {
363
+ e.preventDefault(), e.stopPropagation();
364
+ }
365
+ firstUpdated(e) {}
366
+ render() {
367
+ let e = this.variant === "tonal" ? "filled tonal" : this.variant, t = {
368
+ "z-0 h-full transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-[8px] outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden": !0,
369
+ "opacity-[0.38]": this.disabled,
370
+ "cursor-pointer": !this.disabled,
371
+ "hover:shadow-xs": !this.disabled && (e === "outlined" || e === "text" || e === "filled" || e === "filled tonal"),
372
+ "hover:shadow-sm": !this.disabled && e === "elevated",
373
+ "flex-1 text-center": this.width === "full",
374
+ "bg-surface-low text-primary-default shadow-xs": e === "elevated",
375
+ "bg-transparent text-primary-default border-1 border-outline": e === "outlined",
376
+ "bg-primary-default text-primary-on": e === "filled",
377
+ "bg-secondary-container text-secondary-onContainer": e === "filled tonal",
378
+ "text-primary-default": e === "text",
379
+ "p-1.5": this.size === "xxs",
380
+ "p-2": this.size === "xs",
381
+ "p-2.5": this.size === "sm",
382
+ "p-3": this.size === "md",
383
+ "p-4": this.size === "lg",
384
+ "p-5": this.size === "xl"
385
+ }, r = {
386
+ "hover:opacity-[0.08] rounded-full z-0": !0,
387
+ "hover:bg-primary-on": e === "filled",
388
+ "hover:bg-primary-default": e === "outlined" || e === "elevated" || e === "text",
389
+ "hover:bg-secondary-container": e === "filled tonal"
390
+ }, i = this.size === "xxs" ? "12px" : this.size === "xs" ? "16px" : this.size === "sm" ? "20px" : this.size === "md" || this.size === "lg" ? "24px" : "40px";
391
+ return this.href ? f`
392
+ <a
393
+ ${n({
394
+ strength: 3,
395
+ radius: 50
396
+ })}
397
+ part="base"
398
+ href=${p(this.disabled ? void 0 : this.href)}
399
+ aria-label=${p(this.ariaLabel)}
400
+ class="${this.classMap(t)}"
401
+ tabindex=${this.disabled ? "-1" : "0"}
402
+ aria-disabled=${this.disabled}
403
+ @click=${this.disabled ? this._preventDefault : void 0}
404
+ >
405
+ ${m(!this.disabled, () => f`<div class="absolute inset-0 ${this.classMap(r)}"></div>`)}
406
+ ${this.text ? f`<slot></slot>` : f`
407
+ <slot style="display:none" @slotchange=${this._handleSlotChange}></slot>
408
+ <schmancy-icon size=${i} icon=${p(this.icon || this._capturedIcon)}></schmancy-icon>
409
+ `}
410
+ </a>
411
+ ` : f`
412
+ <button
413
+ ${n({
414
+ strength: 3,
415
+ radius: 50
416
+ })}
417
+ part="base"
418
+ aria-label=${p(this.ariaLabel)}
419
+ ?disabled=${this.disabled}
420
+ class="${this.classMap(t)}"
421
+ type=${p(this.type)}
422
+ tabindex=${p(this.disabled ? "-1" : void 0)}
423
+ >
424
+ ${m(!this.disabled, () => f`<div class="absolute inset-0 ${this.classMap(r)}"></div>`)}
425
+ ${this.text ? f`<slot></slot>` : f`
426
+ <slot style="display:none" @slotchange=${this._handleSlotChange}></slot>
427
+ <schmancy-icon size=${i} icon=${p(this.icon || this._capturedIcon)}></schmancy-icon>
428
+ `}
429
+ </button>
430
+ `;
431
+ }
432
+ };
433
+ t([s("[part=\"base\"]", !0)], _.prototype, "nativeElement", void 0), t([o({ type: String })], _.prototype, "size", void 0), t([o({
434
+ reflect: !0,
435
+ type: String
436
+ })], _.prototype, "variant", void 0), t([o({ reflect: !0 })], _.prototype, "width", void 0), t([o({
437
+ reflect: !0,
438
+ type: String
439
+ })], _.prototype, "type", void 0), t([o()], _.prototype, "href", void 0), t([o({
440
+ type: Boolean,
441
+ reflect: !0
442
+ })], _.prototype, "disabled", void 0), t([o({
443
+ type: Boolean,
444
+ reflect: !0
445
+ })], _.prototype, "text", void 0), t([o({ type: String })], _.prototype, "icon", void 0), t([l()], _.prototype, "_capturedIcon", void 0), t([o({ attribute: "aria-label" })], _.prototype, "ariaLabel", null), _ = t([a("schmancy-icon-button")], _);
446
+ export { g as n, _ as t };