@mhmo91/schmancy 0.5.7 → 0.5.9
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/ai/button.md +2 -2
- package/dist/ai/button.md +2 -2
- package/dist/{avatar-UTlBlxcT.js → avatar-BcUJ8ppk.js} +3 -3
- package/dist/{avatar-UTlBlxcT.js.map → avatar-BcUJ8ppk.js.map} +1 -1
- package/dist/{avatar-BUXdM5FT.cjs → avatar-DQwmIF5M.cjs} +2 -2
- package/dist/{avatar-BUXdM5FT.cjs.map → avatar-DQwmIF5M.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/icon-button-BGp-CT3V.js +157 -0
- package/dist/icon-button-BGp-CT3V.js.map +1 -0
- package/dist/icon-button-BoKo-vxE.cjs +67 -0
- package/dist/icon-button-BoKo-vxE.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{tabs-compatibility-Haw4T3N0.js → tabs-compatibility-CpSB50Sr.js} +5 -6
- package/dist/{tabs-compatibility-Haw4T3N0.js.map → tabs-compatibility-CpSB50Sr.js.map} +1 -1
- package/dist/{tabs-compatibility-CfdHAYaN.cjs → tabs-compatibility-lRm3kfw7.cjs} +3 -4
- package/dist/{tabs-compatibility-CfdHAYaN.cjs.map → tabs-compatibility-lRm3kfw7.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/src/button/button.d.ts +1 -1
- package/types/src/button/button.test.d.ts +1 -0
- package/dist/icon-button-B2xz-N2x.js +0 -157
- package/dist/icon-button-B2xz-N2x.js.map +0 -1
- package/dist/icon-button-LN_b5Jfs.cjs +0 -67
- package/dist/icon-button-LN_b5Jfs.cjs.map +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import "rxjs";
|
|
2
|
+
import "lit/directives/class-map.js";
|
|
3
|
+
import "lit/directives/style-map.js";
|
|
4
|
+
import { query as m, property as s, queryAssignedElements as f, customElement as y } from "lit/decorators.js";
|
|
5
|
+
import "./tailwind.mixin-R2xLfpws.js";
|
|
6
|
+
import { $ as v } from "./litElement.mixin-CEPZ0lJP.js";
|
|
7
|
+
import { css as x, html as h, LitElement as g } from "lit";
|
|
8
|
+
import { ifDefined as d } from "lit/directives/if-defined.js";
|
|
9
|
+
import { when as u } from "lit/directives/when.js";
|
|
10
|
+
var $ = Object.defineProperty, w = Object.getOwnPropertyDescriptor, o = (t, e, a, n) => {
|
|
11
|
+
for (var b, i = n > 1 ? void 0 : n ? w(e, a) : e, c = t.length - 1; c >= 0; c--) (b = t[c]) && (i = (n ? b(e, a, i) : b(i)) || i);
|
|
12
|
+
return n && i && $(e, a, i), i;
|
|
13
|
+
};
|
|
14
|
+
let l = class extends v(x`:host{
|
|
15
|
+
display: inline-block;
|
|
16
|
+
min-width: fit-content;
|
|
17
|
+
}`) {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments), this.variant = "text", this.width = "auto", this.type = "button", this.disabled = !1;
|
|
20
|
+
}
|
|
21
|
+
set ariaLabel(t) {
|
|
22
|
+
const e = this._ariaLabel;
|
|
23
|
+
this._ariaLabel = t, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", e);
|
|
24
|
+
}
|
|
25
|
+
get ariaLabel() {
|
|
26
|
+
return this._ariaLabel;
|
|
27
|
+
}
|
|
28
|
+
focus(t) {
|
|
29
|
+
this.nativeElement.focus(t);
|
|
30
|
+
}
|
|
31
|
+
blur() {
|
|
32
|
+
this.nativeElement.blur();
|
|
33
|
+
}
|
|
34
|
+
get imgClasses() {
|
|
35
|
+
return ["max-h-5", "max-w-5", "sm:max-h-6", "sm:max-w-6", "object-contain"];
|
|
36
|
+
}
|
|
37
|
+
firstUpdated() {
|
|
38
|
+
this.prefixImgs?.forEach((t) => {
|
|
39
|
+
t.classList.add(...this.imgClasses), t.hasAttribute("alt") || t.setAttribute("alt", "");
|
|
40
|
+
}), this.suffixImgs?.forEach((t) => {
|
|
41
|
+
t.classList.add(...this.imgClasses), t.hasAttribute("alt") || t.setAttribute("alt", "");
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
click() {
|
|
45
|
+
this.dispatchEvent(new Event("click", { bubbles: !0, composed: !0 }));
|
|
46
|
+
}
|
|
47
|
+
_preventDefault(t) {
|
|
48
|
+
t.preventDefault(), t.stopPropagation();
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
const t = this.variant === "tonal" ? "filled tonal" : this.variant, e = { "z-0 py-2 px-3 sm:py-1.5 sm:px-3 md:py-2 md:px-4 text-sm sm:text-base transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-1 sm:gap-1.5 md:gap-2 outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden w-[inherit]": !0, "cursor-pointer": !this.disabled, "opacity-[0.38]": this.disabled, "hover:shadow-xs": !this.disabled && (t === "outlined" || t === "text" || t === "filled" || t === "filled tonal"), "hover:shadow-sm": !this.disabled && t === "elevated", "w-full tex-center": this.width === "full", "bg-surface-low text-primary-default shadow-xs": t === "elevated", "bg-transparent text-primary-default border-1 border-solid border-outline": t === "outlined", "bg-primary-default text-primary-on": t === "filled", "bg-secondary-container text-secondary-onContainer": t === "filled tonal", "text-primary-default": t === "text" }, a = { "absolute inset-0 hover:opacity-[0.08] z-0 rounded-full": !0, "hover:bg-primary-on": t === "filled", "hover:bg-primary-default": t === "outlined" || t === "elevated" || t === "text", "hover:bg-secondary-container": t === "filled tonal" };
|
|
52
|
+
return this.href ? h`
|
|
53
|
+
<a
|
|
54
|
+
part="base"
|
|
55
|
+
href=${d(this.disabled ? void 0 : this.href)}
|
|
56
|
+
aria-label=${d(this.ariaLabel)}
|
|
57
|
+
class="${this.classMap(e)}"
|
|
58
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
59
|
+
aria-disabled=${this.disabled}
|
|
60
|
+
@click=${this.disabled ? this._preventDefault : void 0}
|
|
61
|
+
>
|
|
62
|
+
${u(!this.disabled, () => h`<div class="${this.classMap(a)}"></div>`)}
|
|
63
|
+
<slot name="prefix"></slot>
|
|
64
|
+
<slot></slot>
|
|
65
|
+
<slot name="suffix"></slot>
|
|
66
|
+
</a>
|
|
67
|
+
` : h`
|
|
68
|
+
<button
|
|
69
|
+
part="base"
|
|
70
|
+
aria-label=${d(this.ariaLabel)}
|
|
71
|
+
?disabled=${this.disabled}
|
|
72
|
+
class="${this.classMap(e)}"
|
|
73
|
+
type=${d(this.type)}
|
|
74
|
+
tabindex=${d(this.disabled ? "-1" : void 0)}
|
|
75
|
+
>
|
|
76
|
+
${u(!this.disabled, () => h`<div class="${this.classMap(a)}"></div>`)}
|
|
77
|
+
<slot name="prefix"></slot>
|
|
78
|
+
<slot></slot>
|
|
79
|
+
<slot name="suffix"></slot>
|
|
80
|
+
</button>
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
l.shadowRootOptions = { ...g.shadowRootOptions, mode: "open", delegatesFocus: !0 }, o([m('[part="base"]', !0)], l.prototype, "nativeElement", 2), o([s({ reflect: !0, type: String })], l.prototype, "variant", 2), o([s()], l.prototype, "width", 2), o([s({ reflect: !0, type: String })], l.prototype, "type", 2), o([s()], l.prototype, "href", 2), o([s({ type: Boolean, reflect: !0 })], l.prototype, "disabled", 2), o([s({ attribute: "aria-label" })], l.prototype, "ariaLabel", 1), o([f({ slot: "prefix", flatten: !0, selector: "img" })], l.prototype, "prefixImgs", 2), o([f({ slot: "suffix", flatten: !0, selector: "img" })], l.prototype, "suffixImgs", 2), l = o([y("schmancy-button")], l);
|
|
85
|
+
var L = Object.defineProperty, z = Object.getOwnPropertyDescriptor, p = (t, e, a, n) => {
|
|
86
|
+
for (var b, i = n > 1 ? void 0 : n ? z(e, a) : e, c = t.length - 1; c >= 0; c--) (b = t[c]) && (i = (n ? b(e, a, i) : b(i)) || i);
|
|
87
|
+
return n && i && L(e, a, i), i;
|
|
88
|
+
};
|
|
89
|
+
let r = class extends v(x`
|
|
90
|
+
:host {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
`) {
|
|
94
|
+
constructor() {
|
|
95
|
+
super(...arguments), this.size = "md", this.variant = "text", this.width = "auto", this.type = "button", this.disabled = !1;
|
|
96
|
+
}
|
|
97
|
+
set ariaLabel(t) {
|
|
98
|
+
const e = this._ariaLabel;
|
|
99
|
+
this._ariaLabel = t, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", e);
|
|
100
|
+
}
|
|
101
|
+
get ariaLabel() {
|
|
102
|
+
return this._ariaLabel;
|
|
103
|
+
}
|
|
104
|
+
focus(t) {
|
|
105
|
+
this.nativeElement.focus(t);
|
|
106
|
+
}
|
|
107
|
+
blur() {
|
|
108
|
+
this.nativeElement.blur();
|
|
109
|
+
}
|
|
110
|
+
click() {
|
|
111
|
+
this.dispatchEvent(new Event("click", { bubbles: !0, composed: !0 }));
|
|
112
|
+
}
|
|
113
|
+
_preventDefault(t) {
|
|
114
|
+
t.preventDefault(), t.stopPropagation();
|
|
115
|
+
}
|
|
116
|
+
firstUpdated(t) {
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
const t = this.variant === "tonal" ? "filled tonal" : this.variant, e = { "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, "opacity-[0.38]": this.disabled, "cursor-pointer": !this.disabled, "hover:shadow-xs": !this.disabled && (t === "outlined" || t === "text" || t === "filled" || t === "filled tonal"), "hover:shadow-sm": !this.disabled && t === "elevated", "w-full text-center": this.width === "full", "bg-surface-low text-primary-default shadow-xs": t === "elevated", "bg-transparent text-primary-default border-1 border-outline": t === "outlined", "bg-primary-default text-primary-on": t === "filled", "bg-secondary-container text-secondary-onContainer": t === "filled tonal", "text-primary-default": t === "text", "px-[6px] py-[6px]": this.size === "sm", "px-[8px] py-[8px]": this.size === "md", "px-[12px] py-[12px]": this.size === "lg" }, a = { "hover:opacity-[0.08] rounded-full z-0": !0, "hover:bg-primary-on": t === "filled", "hover:bg-primary-default": t === "outlined" || t === "elevated" || t === "text", "hover:bg-secondary-container": t === "filled tonal" };
|
|
120
|
+
return this.href ? h`
|
|
121
|
+
<a
|
|
122
|
+
part="base"
|
|
123
|
+
href=${d(this.disabled ? void 0 : this.href)}
|
|
124
|
+
aria-label=${d(this.ariaLabel)}
|
|
125
|
+
class="${this.classMap(e)}"
|
|
126
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
127
|
+
aria-disabled=${this.disabled}
|
|
128
|
+
@click=${this.disabled ? this._preventDefault : void 0}
|
|
129
|
+
>
|
|
130
|
+
${u(!this.disabled, () => h`<div class="absolute inset-0 ${this.classMap(a)}"></div>`)}
|
|
131
|
+
<schmancy-icon size=${this.size === "sm" ? "18px" : this.size === "md" ? "24px" : "32px"}>
|
|
132
|
+
<slot></slot>
|
|
133
|
+
</schmancy-icon>
|
|
134
|
+
</a>
|
|
135
|
+
` : h`
|
|
136
|
+
<button
|
|
137
|
+
part="base"
|
|
138
|
+
aria-label=${d(this.ariaLabel)}
|
|
139
|
+
?disabled=${this.disabled}
|
|
140
|
+
class="${this.classMap(e)}"
|
|
141
|
+
type=${d(this.type)}
|
|
142
|
+
tabindex=${d(this.disabled ? "-1" : void 0)}
|
|
143
|
+
>
|
|
144
|
+
${u(!this.disabled, () => h`<div class="absolute inset-0 ${this.classMap(a)}"></div>`)}
|
|
145
|
+
<schmancy-icon size=${this.size === "sm" ? "18px" : this.size === "md" ? "24px" : "32px"}>
|
|
146
|
+
<slot></slot>
|
|
147
|
+
</schmancy-icon>
|
|
148
|
+
</button>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
r.shadowRootOptions = { ...g.shadowRootOptions, mode: "open", delegatesFocus: !0 }, p([m('[part="base"]', !0)], r.prototype, "nativeElement", 2), p([s({ type: String })], r.prototype, "size", 2), p([s({ reflect: !0, type: String })], r.prototype, "variant", 2), p([s()], r.prototype, "width", 2), p([s({ reflect: !0, type: String })], r.prototype, "type", 2), p([s()], r.prototype, "href", 2), p([s({ type: Boolean, reflect: !0 })], r.prototype, "disabled", 2), p([s({ attribute: "aria-label" })], r.prototype, "ariaLabel", 1), r = p([y("schmancy-icon-button")], r);
|
|
153
|
+
export {
|
|
154
|
+
l as S,
|
|
155
|
+
r as a
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=icon-button-BGp-CT3V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button-BGp-CT3V.js","sources":["../src/button/button.ts","../src/button/icon-button.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends $LitElement(\n\tcss`:host{\n\t\tdisplay: inline-block;\n\t\tmin-width: fit-content;\n\t}`\n) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property()\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['max-h-5', 'max-w-5', 'sm:max-h-6', 'sm:max-w-6', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 py-2 px-3 sm:py-1.5 sm:px-3 md:py-2 md:px-4 text-sm sm:text-base transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-1 sm:gap-1.5 md:gap-2 outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden w-[inherit]':\n\t\t\t\ttrue,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-xs':\n\t\t\t\t!this.disabled &&\n\t\t\t\t(effectiveVariant === 'outlined' ||\n\t\t\t\t\teffectiveVariant === 'text' ||\n\t\t\t\t\teffectiveVariant === 'filled' ||\n\t\t\t\t\teffectiveVariant === 'filled tonal'),\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',\n\t\t\t'bg-transparent text-primary-default border-1 border-solid border-outline': effectiveVariant === 'outlined',\n\t\t\t'bg-primary-default text-primary-on': effectiveVariant === 'filled',\n\t\t\t'bg-secondary-container text-secondary-onContainer': effectiveVariant === 'filled tonal',\n\t\t\t'text-primary-default': effectiveVariant === 'text',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-full': true,\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled',\n\t\t\t'hover:bg-primary-default': effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, LitElement, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { ButtonVariant } from './button'\n\n/**\n * An icon button component.\n * @element schmancy-icon-button\n * @slot - The default slot.\n */\n@customElement('schmancy-icon-button')\nexport class SchmnacyIconButton extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The size of the icon.\n\t * @attr\n\t * @default 'md'\n\t */\n\t@property({ type: String })\n\tpublic size: 'sm' | 'md' | 'lg' = 'md'\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t */\n\t@property()\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t// Manage aria-label manually so that we can always use our internal property.\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\tprotected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\t// Add any first-update logic here if needed.\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'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':\n\t\t\t\ttrue,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'hover:shadow-xs':\n\t\t\t\t!this.disabled &&\n\t\t\t\t(effectiveVariant === 'outlined' ||\n\t\t\t\t\teffectiveVariant === 'text' ||\n\t\t\t\t\teffectiveVariant === 'filled' ||\n\t\t\t\t\teffectiveVariant === 'filled tonal'),\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full text-center': this.width === 'full',\n\t\t\t'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',\n\t\t\t'bg-transparent text-primary-default border-1 border-outline': effectiveVariant === 'outlined',\n\t\t\t'bg-primary-default text-primary-on': effectiveVariant === 'filled',\n\t\t\t'bg-secondary-container text-secondary-onContainer': effectiveVariant === 'filled tonal',\n\t\t\t'text-primary-default': effectiveVariant === 'text',\n\t\t\t'px-[6px] py-[6px]': this.size === 'sm',\n\t\t\t'px-[8px] py-[8px]': this.size === 'md',\n\t\t\t'px-[12px] py-[12px]': this.size === 'lg',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'hover:opacity-[0.08] rounded-full z-0': true,\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled',\n\t\t\t'hover:bg-primary-default': effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"absolute inset-0 ${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<schmancy-icon size=${this.size === 'sm' ? '18px' : this.size === 'md' ? '24px' : '32px'}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</schmancy-icon>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"absolute inset-0 ${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<schmancy-icon size=${this.size === 'sm' ? '18px' : this.size === 'md' ? '24px' : '32px'}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-icon>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon-button': SchmnacyIconButton\n\t}\n}\n"],"names":["SchmancyButton","$LitElement","css","constructor","super","arguments","this","variant","width","type","disabled","value","oldVal","_ariaLabel","hasAttribute","removeAttribute","requestUpdate","options","nativeElement","focus","blur","imgClasses","firstUpdated","prefixImgs","forEach","img","classList","add","setAttribute","suffixImgs","click","dispatchEvent","Event","bubbles","composed","event","preventDefault","stopPropagation","effectiveVariant","classes","stateLayerClasses","href","html","ifDefined","ariaLabel","classMap","_preventDefault","when","shadowRootOptions","LitElement","mode","delegatesFocus","__decorateClass","query","prototype","property","reflect","String","Boolean","attribute","queryAssignedElements","slot","flatten","selector","customElement","SchmnacyIconButton","size","_changedProperties","render"],"mappings":";;;;;;;;;;;;;AAqBO,IAAMA,IAAN,cAA6BC,EACnCC;AAAAA;AAAAA;AAAAA;EADM,cAAAC;AAAAC,aAAAC,SAAAA,GAwBNC,KAAOC,UAAy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A,GAUDF,EAAA,CADNG,EAAS,EAAE9C,MAAMgD,OAAAA,CAAAA,CAAAA,GArBNQ,EAsBLX,WAAA,QAAA,CAAA,GAQAF,EAAA,CADNG,EAAS,EAAEC,SAAAA,IAAe/C,MAAMgD,OAAAA,CAAAA,CAAAA,GA7BrBQ,EA8BLX,WAAA,WAAA,CAAA,GASAF,EAAA,CADNG,EAAAA,CAAAA,GAtCWU,EAuCLX,WAAA,SAAA,CAAA,GAQAF,EAAA,CADNG,EAAS,EAAEC,SAAAA,IAAe/C,MAAMgD,OAAAA,CAAAA,CAAAA,GA9CrBQ,EA+CLX,WAAA,QAAA,CAAA,GAQAF,EAAA,CADNG,EAAAA,CAAAA,GAtDWU,EAuDLX,WAAA,QAAA,IAOAF,EAAA,CADNG,EAAS,EAAE9C,MAAMiD,SAASF,SAAAA,GAAS,CAAA,CAAA,GA7DxBS,EA8DLX,WAAA,YAAA,IAcaF,EAAA,CADnBG,EAAS,EAAEI,WAAW,kBA3EXM,EA4EQX,WAAA,aAAA,CAAA,GA5ERW,IAANb,EAAA,CADNY,EAAc,sBAAA,CAAA,GACFC,CAAAA;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const i=require("lit/decorators.js");require("./tailwind.mixin-BvVlz7hG.cjs");const u=require("./litElement.mixin-B2K_bdpW.cjs"),r=require("lit"),l=require("lit/directives/if-defined.js"),p=require("lit/directives/when.js");var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,o=(t,e,s,n)=>{for(var c,a=n>1?void 0:n?f(e,s):e,h=t.length-1;h>=0;h--)(c=t[h])&&(a=(n?c(e,s,a):c(a))||a);return n&&a&&b(e,s,a),a};exports.SchmancyButton=class extends u.$LitElement(r.css`:host{
|
|
2
|
+
display: inline-block;
|
|
3
|
+
min-width: fit-content;
|
|
4
|
+
}`){constructor(){super(...arguments),this.variant="text",this.width="auto",this.type="button",this.disabled=!1}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.hasAttribute("aria-label")&&this.removeAttribute("aria-label"),this.requestUpdate("ariaLabel",e)}get ariaLabel(){return this._ariaLabel}focus(t){this.nativeElement.focus(t)}blur(){this.nativeElement.blur()}get imgClasses(){return["max-h-5","max-w-5","sm:max-h-6","sm:max-w-6","object-contain"]}firstUpdated(){this.prefixImgs?.forEach(t=>{t.classList.add(...this.imgClasses),t.hasAttribute("alt")||t.setAttribute("alt","")}),this.suffixImgs?.forEach(t=>{t.classList.add(...this.imgClasses),t.hasAttribute("alt")||t.setAttribute("alt","")})}click(){this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}_preventDefault(t){t.preventDefault(),t.stopPropagation()}render(){const t=this.variant==="tonal"?"filled tonal":this.variant,e={"z-0 py-2 px-3 sm:py-1.5 sm:px-3 md:py-2 md:px-4 text-sm sm:text-base transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-1 sm:gap-1.5 md:gap-2 outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden w-[inherit]":!0,"cursor-pointer":!this.disabled,"opacity-[0.38]":this.disabled,"hover:shadow-xs":!this.disabled&&(t==="outlined"||t==="text"||t==="filled"||t==="filled tonal"),"hover:shadow-sm":!this.disabled&&t==="elevated","w-full tex-center":this.width==="full","bg-surface-low text-primary-default shadow-xs":t==="elevated","bg-transparent text-primary-default border-1 border-solid border-outline":t==="outlined","bg-primary-default text-primary-on":t==="filled","bg-secondary-container text-secondary-onContainer":t==="filled tonal","text-primary-default":t==="text"},s={"absolute inset-0 hover:opacity-[0.08] z-0 rounded-full":!0,"hover:bg-primary-on":t==="filled","hover:bg-primary-default":t==="outlined"||t==="elevated"||t==="text","hover:bg-secondary-container":t==="filled tonal"};return this.href?r.html`
|
|
5
|
+
<a
|
|
6
|
+
part="base"
|
|
7
|
+
href=${l.ifDefined(this.disabled?void 0:this.href)}
|
|
8
|
+
aria-label=${l.ifDefined(this.ariaLabel)}
|
|
9
|
+
class="${this.classMap(e)}"
|
|
10
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
11
|
+
aria-disabled=${this.disabled}
|
|
12
|
+
@click=${this.disabled?this._preventDefault:void 0}
|
|
13
|
+
>
|
|
14
|
+
${p.when(!this.disabled,()=>r.html`<div class="${this.classMap(s)}"></div>`)}
|
|
15
|
+
<slot name="prefix"></slot>
|
|
16
|
+
<slot></slot>
|
|
17
|
+
<slot name="suffix"></slot>
|
|
18
|
+
</a>
|
|
19
|
+
`:r.html`
|
|
20
|
+
<button
|
|
21
|
+
part="base"
|
|
22
|
+
aria-label=${l.ifDefined(this.ariaLabel)}
|
|
23
|
+
?disabled=${this.disabled}
|
|
24
|
+
class="${this.classMap(e)}"
|
|
25
|
+
type=${l.ifDefined(this.type)}
|
|
26
|
+
tabindex=${l.ifDefined(this.disabled?"-1":void 0)}
|
|
27
|
+
>
|
|
28
|
+
${p.when(!this.disabled,()=>r.html`<div class="${this.classMap(s)}"></div>`)}
|
|
29
|
+
<slot name="prefix"></slot>
|
|
30
|
+
<slot></slot>
|
|
31
|
+
<slot name="suffix"></slot>
|
|
32
|
+
</button>
|
|
33
|
+
`}},exports.SchmancyButton.shadowRootOptions={...r.LitElement.shadowRootOptions,mode:"open",delegatesFocus:!0},o([i.query('[part="base"]',!0)],exports.SchmancyButton.prototype,"nativeElement",2),o([i.property({reflect:!0,type:String})],exports.SchmancyButton.prototype,"variant",2),o([i.property()],exports.SchmancyButton.prototype,"width",2),o([i.property({reflect:!0,type:String})],exports.SchmancyButton.prototype,"type",2),o([i.property()],exports.SchmancyButton.prototype,"href",2),o([i.property({type:Boolean,reflect:!0})],exports.SchmancyButton.prototype,"disabled",2),o([i.property({attribute:"aria-label"})],exports.SchmancyButton.prototype,"ariaLabel",1),o([i.queryAssignedElements({slot:"prefix",flatten:!0,selector:"img"})],exports.SchmancyButton.prototype,"prefixImgs",2),o([i.queryAssignedElements({slot:"suffix",flatten:!0,selector:"img"})],exports.SchmancyButton.prototype,"suffixImgs",2),exports.SchmancyButton=o([i.customElement("schmancy-button")],exports.SchmancyButton);var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,d=(t,e,s,n)=>{for(var c,a=n>1?void 0:n?m(e,s):e,h=t.length-1;h>=0;h--)(c=t[h])&&(a=(n?c(e,s,a):c(a))||a);return n&&a&&y(e,s,a),a};exports.SchmnacyIconButton=class extends u.$LitElement(r.css`
|
|
34
|
+
:host {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
`){constructor(){super(...arguments),this.size="md",this.variant="text",this.width="auto",this.type="button",this.disabled=!1}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.hasAttribute("aria-label")&&this.removeAttribute("aria-label"),this.requestUpdate("ariaLabel",e)}get ariaLabel(){return this._ariaLabel}focus(t){this.nativeElement.focus(t)}blur(){this.nativeElement.blur()}click(){this.dispatchEvent(new Event("click",{bubbles:!0,composed:!0}))}_preventDefault(t){t.preventDefault(),t.stopPropagation()}firstUpdated(t){}render(){const t=this.variant==="tonal"?"filled tonal":this.variant,e={"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,"opacity-[0.38]":this.disabled,"cursor-pointer":!this.disabled,"hover:shadow-xs":!this.disabled&&(t==="outlined"||t==="text"||t==="filled"||t==="filled tonal"),"hover:shadow-sm":!this.disabled&&t==="elevated","w-full text-center":this.width==="full","bg-surface-low text-primary-default shadow-xs":t==="elevated","bg-transparent text-primary-default border-1 border-outline":t==="outlined","bg-primary-default text-primary-on":t==="filled","bg-secondary-container text-secondary-onContainer":t==="filled tonal","text-primary-default":t==="text","px-[6px] py-[6px]":this.size==="sm","px-[8px] py-[8px]":this.size==="md","px-[12px] py-[12px]":this.size==="lg"},s={"hover:opacity-[0.08] rounded-full z-0":!0,"hover:bg-primary-on":t==="filled","hover:bg-primary-default":t==="outlined"||t==="elevated"||t==="text","hover:bg-secondary-container":t==="filled tonal"};return this.href?r.html`
|
|
38
|
+
<a
|
|
39
|
+
part="base"
|
|
40
|
+
href=${l.ifDefined(this.disabled?void 0:this.href)}
|
|
41
|
+
aria-label=${l.ifDefined(this.ariaLabel)}
|
|
42
|
+
class="${this.classMap(e)}"
|
|
43
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
44
|
+
aria-disabled=${this.disabled}
|
|
45
|
+
@click=${this.disabled?this._preventDefault:void 0}
|
|
46
|
+
>
|
|
47
|
+
${p.when(!this.disabled,()=>r.html`<div class="absolute inset-0 ${this.classMap(s)}"></div>`)}
|
|
48
|
+
<schmancy-icon size=${this.size==="sm"?"18px":this.size==="md"?"24px":"32px"}>
|
|
49
|
+
<slot></slot>
|
|
50
|
+
</schmancy-icon>
|
|
51
|
+
</a>
|
|
52
|
+
`:r.html`
|
|
53
|
+
<button
|
|
54
|
+
part="base"
|
|
55
|
+
aria-label=${l.ifDefined(this.ariaLabel)}
|
|
56
|
+
?disabled=${this.disabled}
|
|
57
|
+
class="${this.classMap(e)}"
|
|
58
|
+
type=${l.ifDefined(this.type)}
|
|
59
|
+
tabindex=${l.ifDefined(this.disabled?"-1":void 0)}
|
|
60
|
+
>
|
|
61
|
+
${p.when(!this.disabled,()=>r.html`<div class="absolute inset-0 ${this.classMap(s)}"></div>`)}
|
|
62
|
+
<schmancy-icon size=${this.size==="sm"?"18px":this.size==="md"?"24px":"32px"}>
|
|
63
|
+
<slot></slot>
|
|
64
|
+
</schmancy-icon>
|
|
65
|
+
</button>
|
|
66
|
+
`}},exports.SchmnacyIconButton.shadowRootOptions={...r.LitElement.shadowRootOptions,mode:"open",delegatesFocus:!0},d([i.query('[part="base"]',!0)],exports.SchmnacyIconButton.prototype,"nativeElement",2),d([i.property({type:String})],exports.SchmnacyIconButton.prototype,"size",2),d([i.property({reflect:!0,type:String})],exports.SchmnacyIconButton.prototype,"variant",2),d([i.property()],exports.SchmnacyIconButton.prototype,"width",2),d([i.property({reflect:!0,type:String})],exports.SchmnacyIconButton.prototype,"type",2),d([i.property()],exports.SchmnacyIconButton.prototype,"href",2),d([i.property({type:Boolean,reflect:!0})],exports.SchmnacyIconButton.prototype,"disabled",2),d([i.property({attribute:"aria-label"})],exports.SchmnacyIconButton.prototype,"ariaLabel",1),exports.SchmnacyIconButton=d([i.customElement("schmancy-icon-button")],exports.SchmnacyIconButton);
|
|
67
|
+
//# sourceMappingURL=icon-button-BoKo-vxE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button-BoKo-vxE.cjs","sources":["../src/button/button.ts","../src/button/icon-button.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\n\nexport interface SchmancyButtonEventMap {\n\tSchmancyFocus: CustomEvent<void>\n\tSchmancyBlur: CustomEvent<void>\n}\n\nexport type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | 'outlined' | 'text'\n\n/**\n * A button component.\n * @element schmancy-button\n * @slot - The default slot.\n * @slot prefix - The prefix slot.\n * @slot suffix - The suffix slot.\n */\n@customElement('schmancy-button')\nexport class SchmancyButton extends $LitElement(\n\tcss`:host{\n\t\tdisplay: inline-block;\n\t\tmin-width: fit-content;\n\t}`\n) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t * @public\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t * @public\n\t */\n\t@property()\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t@queryAssignedElements({\n\t\tslot: 'prefix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate prefixImgs!: HTMLImageElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'suffix',\n\t\tflatten: true,\n\t\tselector: 'img',\n\t})\n\tprivate suffixImgs!: HTMLImageElement[]\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['max-h-5', 'max-w-5', 'sm:max-h-6', 'sm:max-w-6', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\t// Add image classes and ensure decorative images have an empty alt.\n\t\tthis.prefixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t\tthis.suffixImgs?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t\tif (!img.hasAttribute('alt')) {\n\t\t\t\timg.setAttribute('alt', '')\n\t\t\t}\n\t\t})\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'z-0 py-2 px-3 sm:py-1.5 sm:px-3 md:py-2 md:px-4 text-sm sm:text-base transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-1 sm:gap-1.5 md:gap-2 outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden w-[inherit]':\n\t\t\t\ttrue,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'hover:shadow-xs':\n\t\t\t\t!this.disabled &&\n\t\t\t\t(effectiveVariant === 'outlined' ||\n\t\t\t\t\teffectiveVariant === 'text' ||\n\t\t\t\t\teffectiveVariant === 'filled' ||\n\t\t\t\t\teffectiveVariant === 'filled tonal'),\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full tex-center': this.width === 'full',\n\t\t\t'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',\n\t\t\t'bg-transparent text-primary-default border-1 border-solid border-outline': effectiveVariant === 'outlined',\n\t\t\t'bg-primary-default text-primary-on': effectiveVariant === 'filled',\n\t\t\t'bg-secondary-container text-secondary-onContainer': effectiveVariant === 'filled tonal',\n\t\t\t'text-primary-default': effectiveVariant === 'text',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'absolute inset-0 hover:opacity-[0.08] z-0 rounded-full': true,\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled',\n\t\t\t'hover:bg-primary-default': effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<slot name=\"prefix\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"suffix\"></slot>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-button': SchmancyButton\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, LitElement, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { when } from 'lit/directives/when.js'\nimport { ButtonVariant } from './button'\n\n/**\n * An icon button component.\n * @element schmancy-icon-button\n * @slot - The default slot.\n */\n@customElement('schmancy-icon-button')\nexport class SchmnacyIconButton extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t@query('[part=\"base\"]', true)\n\tprivate nativeElement!: HTMLElement\n\n\tprivate _ariaLabel!: string\n\n\t/**\n\t * The size of the icon.\n\t * @attr\n\t * @default 'md'\n\t */\n\t@property({ type: String })\n\tpublic size: 'sm' | 'md' | 'lg' = 'md'\n\n\t/**\n\t * The variant of the button.\n\t * @attr\n\t * @default 'text'\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic variant: ButtonVariant = 'text'\n\n\t/**\n\t * The width of the button.\n\t * @attr\n\t * @type {'full' | 'auto'}\n\t * @default 'auto'\n\t */\n\t@property()\n\tpublic width: 'full' | 'auto' = 'auto'\n\n\t/**\n\t * The type of the button.\n\t * Defaults to 'button' (preventing accidental form submissions).\n\t * @attr\n\t */\n\t@property({ reflect: true, type: String })\n\tpublic type: 'button' | 'reset' | 'submit' = 'button'\n\n\t/**\n\t * The URL the button points to.\n\t * If provided, the component will render as an anchor element.\n\t * @attr\n\t */\n\t@property()\n\tpublic href?: string\n\n\t/**\n\t * Determines whether the button is disabled.\n\t * @attr\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t// Manage aria-label manually so that we can always use our internal property.\n\tpublic override set ariaLabel(value: string) {\n\t\tconst oldVal = this._ariaLabel\n\t\tthis._ariaLabel = value\n\n\t\tif (this.hasAttribute('aria-label')) {\n\t\t\tthis.removeAttribute('aria-label')\n\t\t}\n\t\tthis.requestUpdate('ariaLabel', oldVal)\n\t}\n\n\t@property({ attribute: 'aria-label' })\n\tpublic override get ariaLabel() {\n\t\treturn this._ariaLabel\n\t}\n\n\t/** Sets focus in the button. */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.nativeElement.focus(options)\n\t}\n\n\t/** Removes focus from the button. */\n\tpublic override blur() {\n\t\tthis.nativeElement.blur()\n\t}\n\n\tclick(): void {\n\t\tthis.dispatchEvent(new Event('click', { bubbles: true, composed: true }))\n\t}\n\n\t// Prevent default behavior when the component is disabled.\n\tprivate _preventDefault(event: Event) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t}\n\n\tprotected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\t// Add any first-update logic here if needed.\n\t}\n\n\trender() {\n\t\t// Map 'tonal' variant to 'filled tonal' for backwards compatibility\n\t\tconst effectiveVariant = this.variant === 'tonal' ? 'filled tonal' : this.variant;\n\n\t\t// Compute classes for the interactive element.\n\t\tconst classes = {\n\t\t\t'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':\n\t\t\t\ttrue,\n\t\t\t'opacity-[0.38]': this.disabled,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'hover:shadow-xs':\n\t\t\t\t!this.disabled &&\n\t\t\t\t(effectiveVariant === 'outlined' ||\n\t\t\t\t\teffectiveVariant === 'text' ||\n\t\t\t\t\teffectiveVariant === 'filled' ||\n\t\t\t\t\teffectiveVariant === 'filled tonal'),\n\t\t\t'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',\n\t\t\t'w-full text-center': this.width === 'full',\n\t\t\t'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',\n\t\t\t'bg-transparent text-primary-default border-1 border-outline': effectiveVariant === 'outlined',\n\t\t\t'bg-primary-default text-primary-on': effectiveVariant === 'filled',\n\t\t\t'bg-secondary-container text-secondary-onContainer': effectiveVariant === 'filled tonal',\n\t\t\t'text-primary-default': effectiveVariant === 'text',\n\t\t\t'px-[6px] py-[6px]': this.size === 'sm',\n\t\t\t'px-[8px] py-[8px]': this.size === 'md',\n\t\t\t'px-[12px] py-[12px]': this.size === 'lg',\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'hover:opacity-[0.08] rounded-full z-0': true,\n\t\t\t'hover:bg-primary-on': effectiveVariant === 'filled',\n\t\t\t'hover:bg-primary-default': effectiveVariant === 'outlined' || effectiveVariant === 'elevated' || effectiveVariant === 'text',\n\t\t\t'hover:bg-secondary-container': effectiveVariant === 'filled tonal',\n\t\t}\n\n\t\t// If href is provided, render an anchor element.\n\t\tif (this.href) {\n\t\t\treturn html`\n\t\t\t\t<a\n\t\t\t\t\tpart=\"base\"\n\t\t\t\t\thref=${ifDefined(this.disabled ? undefined : this.href)}\n\t\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t@click=${this.disabled ? this._preventDefault : undefined}\n\t\t\t\t>\n\t\t\t\t\t${when(!this.disabled, () => html`<div class=\"absolute inset-0 ${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t\t<schmancy-icon size=${this.size === 'sm' ? '18px' : this.size === 'md' ? '24px' : '32px'}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</schmancy-icon>\n\t\t\t\t</a>\n\t\t\t`\n\t\t}\n\n\t\t// Otherwise, render a native button element.\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tpart=\"base\"\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\ttype=${ifDefined(this.type)}\n\t\t\t\ttabindex=${ifDefined(this.disabled ? '-1' : undefined)}\n\t\t\t>\n\t\t\t\t${when(!this.disabled, () => html`<div class=\"absolute inset-0 ${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t\t<schmancy-icon size=${this.size === 'sm' ? '18px' : this.size === 'md' ? '24px' : '32px'}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-icon>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-icon-button': SchmnacyIconButton\n\t}\n}\n"],"names":["SchmancyButton","$LitElement","css","constructor","super","arguments","this","variant","width","type","disabled","value","oldVal","_ariaLabel","hasAttribute","removeAttribute","requestUpdate","options","nativeElement","focus","blur","imgClasses","firstUpdated","prefixImgs","forEach","img","classList","add","setAttribute","suffixImgs","click","dispatchEvent","Event","bubbles","composed","event","preventDefault","stopPropagation","effectiveVariant","classes","stateLayerClasses","href","html","ifDefined","ariaLabel","classMap","_preventDefault","when","shadowRootOptions","LitElement","mode","delegatesFocus","__decorateClass","query","prototype","property","reflect","String","Boolean","attribute","queryAssignedElements","slot","flatten","selector","customElement","SchmnacyIconButton","size","_changedProperties","render"],"mappings":"2gBAqBaA,QAAAA,eAAN,cAA6BC,EAAAA,YACnCC;;;KADM,aAAAC,CAAAC,SAAAC,SAAAA,EAwBNC,KAAOC,QAAyB,OAUhCD,KAAOE,MAAyB,OAQhCF,KAAOG,KAAsC,SAe7CH,KAAOI,WAAW,CAElB,cAA8BC,EAAAA,CAC7B,MAAMC,EAASN,KAAKO,WACpBP,KAAKO,WAAaF,EAEdL,KAAKQ,aAAa,YAAA,GACrBR,KAAKS,gBAAgB,YAAA,EAEtBT,KAAKU,cAAc,YAAaJ,EACjC,CAGA,IAAA,YACC,OAAON,KAAKO,UACb,CAiBgB,MAAMI,EAA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A,SAAS,CAAEC,QAAAA,GAAe/C,KAAMgD,MAAAA,CAAAA,CAAAA,EA9CrBQ,2BA+CLX,UAAA,OAAA,GAQAF,EAAA,CADNG,EAAAA,SAAAA,CAAAA,EAtDWU,2BAuDLX,UAAA,OAAA,CAAA,EAOAF,EAAA,CADNG,EAAAA,SAAS,CAAE9C,KAAMiD,QAASF,QAAAA,EAAS,CAAA,CAAA,EA7DxBS,2BA8DLX,UAAA,WAAA,CAAA,EAcaF,EAAA,CADnBG,WAAS,CAAEI,UAAW,gBA3EXM,2BA4EQX,UAAA,YAAA,CAAA,EA5ERW,QAAAA,mBAANb,EAAA,CADNY,EAAAA,cAAc,sBAAA,CAAA,EACFC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-DhWaYtKW.cjs");const c=require("./area.component-D7wlGsfA.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-BcddCLwr.cjs");const r=require("./avatar-BUXdM5FT.cjs"),A=require("./boat-SUt73FzK.cjs");require("./spinner-CZaVYJ0a.cjs");const d=require("./icon-button-LN_b5Jfs.cjs");require("./media-BYpO4hxM.cjs");const N=require("./checkbox-BQ9zyi0G.cjs"),n=require("./suggestion-chip-BeGEK7BS.cjs"),h=require("./code-preview-BguhYQ-9.cjs"),v=require("./payment-card-form-BplCPLQi.cjs"),g=require("./date-range-BHL6NVpp.cjs"),E=require("./date-range-inline-lDogjrro.cjs"),s=require("./delay-Dqd6hPRo.cjs"),x=require("./details-CL2VJWOL.cjs"),u=require("./dialog-content-Ch1E0_XY.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),F=require("lit/directives/guard.js");require("./divider-DeIUf2pW.cjs");const C=require("./dropdown-content-BdGJaEb1.cjs"),O=require("./timezone-34kNWMce.cjs");require("./form-CIW_BgEw.cjs"),require("./icon-7xUK_cdP.cjs");const P=require("./input-BTHdBKs2.cjs"),o=require("./flex-D7Lk1FvV.cjs"),p=require("./list-Cmj0mY-X.cjs"),i=require("./email-recipients-CWV3bcBZ.cjs"),H=require("./map-B_AGndzc.cjs");require("./menu-DJM8tj5e.cjs");const j=require("./navigation-rail-item-hYAXrNQM.cjs"),m=require("./notification-service-C5ApldUR.cjs"),D=require("./notify-CZXq5oqO.cjs");require("./option-Dolb8CBn.cjs"),require("./progress-C-2JM-2b.cjs");const q=require("./radio-button-DTTyHAW3.cjs"),B=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const V=require("./select-DPa2FYdv.cjs");require("./sheet-WxZAbHZ5.cjs");const y=require("./sheet.service-BxvWBGsJ.cjs"),w=require("./slider-CY7W7Psq.cjs"),S=require("./schmancy-steps-container-D9hAAg2V.cjs"),a=require("./context-object-bNADqf9U.cjs"),e=require("./selector-hook-cqmAutda.cjs"),R=require("./surface-CvQMtIw-.cjs"),T=require("./table-BJVlDuQa.cjs");require("./tabs-compatibility-CfdHAYaN.cjs"),require("./textarea-BE1uxnbN.cjs");const l=require("./theme.component-zoufYNW7.cjs"),I=require("./theme.events-Car6U_SQ.cjs"),Y=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DXJTRh4E.cjs");const M=require("./tooltip-DZK4j3n0.cjs"),z=require("./tree-D5fhY5eA.cjs"),L=require("./types.cjs"),G=require("./typewriter-DSTaSuRG.cjs"),W=require("./typography-DoswBHCt.cjs"),$=require("./intersection-CVvaDv96.cjs"),k=require("./number-B7aCRYnH.cjs"),K=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>c.SchmancyRoute}),exports.area=c.area,exports.routerHistory=c.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>A.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>d.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>d.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>N.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>n.SchmancyAssistChip}),exports.SchmancyChip=n.SchmancyFilterChip,exports.SchmancyFilterChip=n.SchmancyFilterChip,Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>n.SchmancyInputChip}),Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>n.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>v.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>g.SchmancyDateRange}),exports.validateInitialDateRange=g.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>E.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>x.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>F.guard}),Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>P.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>P.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>i.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>i.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>i.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>i.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>i.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>H.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=m.$notify,exports.NotificationAudioService=m.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>m.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>m.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=B.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>V.SchmancySelect}),exports.SchmancySheetPosition=y.SchmancySheetPosition,exports.SheetHereMorty=y.SheetHereMorty,exports.SheetWhereAreYouRicky=y.SheetWhereAreYouRicky,exports.sheet=y.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createStorageManager=a.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>R.SchmancySurface}),exports.SchmancySurfaceTypeContext=R.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>T.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>T.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>l.SchmancyThemeComponent}),exports.formateTheme=l.formateTheme,exports.tailwindStyles=l.tailwindStyles,exports.theme=l.theme,exports.ThemeHereIAm=I.ThemeHereIAm,exports.ThemeWhereAreYou=I.ThemeWhereAreYou,exports.SchmancyTheme=Y.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>z.SchmancyTree}),exports.SchmancyEvents=L.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>G.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>W.SchmancyTypography}),exports.intersection$=$.intersection$,exports.Numbers=k.Numbers,exports.similarity=K.similarity;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-DhWaYtKW.cjs");const c=require("./area.component-D7wlGsfA.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-BcddCLwr.cjs");const r=require("./avatar-DQwmIF5M.cjs"),A=require("./boat-SUt73FzK.cjs");require("./spinner-CZaVYJ0a.cjs");const d=require("./icon-button-BoKo-vxE.cjs");require("./media-BYpO4hxM.cjs");const N=require("./checkbox-BQ9zyi0G.cjs"),n=require("./suggestion-chip-BeGEK7BS.cjs"),h=require("./code-preview-BguhYQ-9.cjs"),v=require("./payment-card-form-BplCPLQi.cjs"),g=require("./date-range-BHL6NVpp.cjs"),E=require("./date-range-inline-lDogjrro.cjs"),s=require("./delay-Dqd6hPRo.cjs"),x=require("./details-CL2VJWOL.cjs"),u=require("./dialog-content-Ch1E0_XY.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),F=require("lit/directives/guard.js");require("./divider-DeIUf2pW.cjs");const C=require("./dropdown-content-BdGJaEb1.cjs"),O=require("./timezone-34kNWMce.cjs");require("./form-CIW_BgEw.cjs"),require("./icon-7xUK_cdP.cjs");const P=require("./input-BTHdBKs2.cjs"),o=require("./flex-D7Lk1FvV.cjs"),p=require("./list-Cmj0mY-X.cjs"),i=require("./email-recipients-CWV3bcBZ.cjs"),H=require("./map-B_AGndzc.cjs");require("./menu-DJM8tj5e.cjs");const j=require("./navigation-rail-item-hYAXrNQM.cjs"),m=require("./notification-service-C5ApldUR.cjs"),D=require("./notify-CZXq5oqO.cjs");require("./option-Dolb8CBn.cjs"),require("./progress-C-2JM-2b.cjs");const q=require("./radio-button-DTTyHAW3.cjs"),B=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const V=require("./select-DPa2FYdv.cjs");require("./sheet-WxZAbHZ5.cjs");const y=require("./sheet.service-BxvWBGsJ.cjs"),w=require("./slider-CY7W7Psq.cjs"),S=require("./schmancy-steps-container-D9hAAg2V.cjs"),a=require("./context-object-bNADqf9U.cjs"),e=require("./selector-hook-cqmAutda.cjs"),R=require("./surface-CvQMtIw-.cjs"),T=require("./table-BJVlDuQa.cjs");require("./tabs-compatibility-lRm3kfw7.cjs"),require("./textarea-BE1uxnbN.cjs");const l=require("./theme.component-zoufYNW7.cjs"),I=require("./theme.events-Car6U_SQ.cjs"),Y=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DXJTRh4E.cjs");const M=require("./tooltip-DZK4j3n0.cjs"),z=require("./tree-D5fhY5eA.cjs"),L=require("./types.cjs"),G=require("./typewriter-DSTaSuRG.cjs"),W=require("./typography-DoswBHCt.cjs"),$=require("./intersection-CVvaDv96.cjs"),k=require("./number-B7aCRYnH.cjs"),K=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>c.SchmancyRoute}),exports.area=c.area,exports.routerHistory=c.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>A.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>d.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>d.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>N.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>n.SchmancyAssistChip}),exports.SchmancyChip=n.SchmancyFilterChip,exports.SchmancyFilterChip=n.SchmancyFilterChip,Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>n.SchmancyInputChip}),Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>n.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>v.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>g.SchmancyDateRange}),exports.validateInitialDateRange=g.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>E.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>x.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>F.guard}),Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>P.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>P.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>i.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>i.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>i.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>i.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>i.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>H.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=m.$notify,exports.NotificationAudioService=m.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>m.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>m.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=B.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>V.SchmancySelect}),exports.SchmancySheetPosition=y.SchmancySheetPosition,exports.SheetHereMorty=y.SheetHereMorty,exports.SheetWhereAreYouRicky=y.SheetWhereAreYouRicky,exports.sheet=y.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createStorageManager=a.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>R.SchmancySurface}),exports.SchmancySurfaceTypeContext=R.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>T.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>T.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>l.SchmancyThemeComponent}),exports.formateTheme=l.formateTheme,exports.tailwindStyles=l.tailwindStyles,exports.theme=l.theme,exports.ThemeHereIAm=I.ThemeHereIAm,exports.ThemeWhereAreYou=I.ThemeWhereAreYou,exports.SchmancyTheme=Y.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>z.SchmancyTree}),exports.SchmancyEvents=L.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>G.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>W.SchmancyTypography}),exports.intersection$=$.intersection$,exports.Numbers=k.Numbers,exports.similarity=K.similarity;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import "./animated-text-Dty0fSbq.js";
|
|
|
2
2
|
import { F as C, H as g, c as u, S as D, b, a as w, r as R } from "./area.component-LQXgflI2.js";
|
|
3
3
|
import { p as I, k as M, c as N, j as A, m as v, b as E, d as H, h as B, a as F, e as L, f as O, o as $, g as j, i as k, l as z, n as P, s as V } from "./utils-CYOVFxSx.js";
|
|
4
4
|
import "./autocomplete-BFvzCShB.js";
|
|
5
|
-
import { $ as G, H as W, a as K, r as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ra, k as ta, m as oa, n as ca, o as sa, l as ma, p as na, q as Sa, W as ia, s as ha, j as ya, t as pa } from "./avatar-
|
|
5
|
+
import { $ as G, H as W, a as K, r as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ra, k as ta, m as oa, n as ca, o as sa, l as ma, p as na, q as Sa, W as ia, s as ha, j as ya, t as pa } from "./avatar-BcUJ8ppk.js";
|
|
6
6
|
import { S as fa } from "./boat-OKaCjCVb.js";
|
|
7
7
|
import "./spinner-D8Dc17fq.js";
|
|
8
|
-
import { S as da, a as Ca } from "./icon-button-
|
|
8
|
+
import { S as da, a as Ca } from "./icon-button-BGp-CT3V.js";
|
|
9
9
|
import "./media-Flyi23Fn.js";
|
|
10
10
|
import { S as ua } from "./checkbox-DYgxPkRd.js";
|
|
11
11
|
import { S as ba, a as wa, a as Ra, b as Ta, c as Ia } from "./suggestion-chip-p0k9PAya.js";
|
|
@@ -48,7 +48,7 @@ import { B as sr, I as mr, L as nr, M as Sr, S as ir, a as hr, b as yr, d as pr,
|
|
|
48
48
|
import { p as xr, a as dr, v as Cr, G as gr, c as ur, E as Dr, z as br, C as wr, B as Rr, x as Tr, w as Ir, y as Mr, D as Nr, F as Ar, u as vr, A as Er, b as Hr, r as Br, d as Fr, q as Lr, f as Or, g as $r, i as jr, j as kr, k as zr, l as Pr, o as Vr, h as Yr, n as Gr, m as Wr, e as Kr, s as _r, t as qr } from "./selector-hook-ChImS_JT.js";
|
|
49
49
|
import { a as Jr, S as Ur } from "./surface-Cmmdx0F2.js";
|
|
50
50
|
import { a as Zr, S as at } from "./table-CSDX6lDq.js";
|
|
51
|
-
import "./tabs-compatibility-
|
|
51
|
+
import "./tabs-compatibility-CpSB50Sr.js";
|
|
52
52
|
import "./textarea-D5YjtfC7.js";
|
|
53
53
|
import { S as rt, f as tt, t as ot, a as ct } from "./theme.component-C03A-Sve.js";
|
|
54
54
|
import { a as mt, T as nt } from "./theme.events-CPSLaOlR.js";
|
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-DQwmIF5M.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
|
@@ -22,11 +22,11 @@ let c = class extends y(f`
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
p([h({ type: String, reflect: !0 })], c.prototype, "label", 2), p([h({ type: String, reflect: !0 })], c.prototype, "value", 2), p([h({ type: Boolean, reflect: !0 })], c.prototype, "active", 2), p([E({ context: g, subscribe: !0 }), u()], c.prototype, "mode", 2), c = p([v("schmancy-tab")], c);
|
|
25
|
-
var S = Object.defineProperty, M = Object.getOwnPropertyDescriptor,
|
|
25
|
+
var S = Object.defineProperty, M = Object.getOwnPropertyDescriptor, i = (t, e, a, s) => {
|
|
26
26
|
for (var l, o = s > 1 ? void 0 : s ? M(e, a) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (o = (s ? l(e, a, o) : l(o)) || o);
|
|
27
27
|
return s && o && S(e, a, o), o;
|
|
28
28
|
};
|
|
29
|
-
let
|
|
29
|
+
let r = class extends y(f`
|
|
30
30
|
:host {
|
|
31
31
|
display: block;
|
|
32
32
|
}
|
|
@@ -91,14 +91,13 @@ let i = class extends y(f`
|
|
|
91
91
|
</schmancy-button>
|
|
92
92
|
`)}
|
|
93
93
|
</section>
|
|
94
|
-
<schmancy-divider class="px-6"></schmancy-divider>
|
|
95
94
|
<section id="tabsContent">
|
|
96
95
|
<slot @slotchange=${() => this.hydrateTabs()}></slot>
|
|
97
96
|
</section>
|
|
98
97
|
`;
|
|
99
98
|
}
|
|
100
99
|
};
|
|
101
|
-
|
|
102
|
-
customElements.define("schmancy-tabs-group", class extends
|
|
100
|
+
i([j({ context: g }), h({ type: String })], r.prototype, "mode", 2), i([h({ type: Boolean })], r.prototype, "rounded", 2), i([h({ type: String, reflect: !0 })], r.prototype, "activeTab", 2), i([$({ flatten: !0 })], r.prototype, "tabsElements", 2), i([m("#tabsNavigation")], r.prototype, "navElement", 2), i([m("#tabsContent")], r.prototype, "tabsContent", 2), i([u()], r.prototype, "tabs", 2), r = i([v("schmancy-tab-group")], r);
|
|
101
|
+
customElements.define("schmancy-tabs-group", class extends r {
|
|
103
102
|
});
|
|
104
|
-
//# sourceMappingURL=tabs-compatibility-
|
|
103
|
+
//# sourceMappingURL=tabs-compatibility-CpSB50Sr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-compatibility-Haw4T3N0.js","sources":["../src/tabs/context.ts","../src/tabs/tab.ts","../src/tabs/tabs-group.ts","../src/tabs/tabs-compatibility.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type TSchmancyTabsMode = 'scroll' | 'tabs'\n\nexport const SchmancyTabsModeContext = createContext<TSchmancyTabsMode>('tabs')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyTabsModeContext } from './context'\n\n@customElement('schmancy-tab')\nexport default class SchmancyTab extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true }) label\n\t@property({ type: String, reflect: true }) value\n\t@property({ type: Boolean, reflect: true }) active!: boolean\n\n\t@consume({ context: SchmancyTabsModeContext, subscribe: true })\n\t@state()\n\tmode\n\tprotected render(): unknown {\n\t\treturn html` <slot .hidden=${this.mode === 'tabs' ? !this.active : false}></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tab': SchmancyTab\n\t}\n}\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { filter, fromEvent, interval, map, take, throttleTime } from 'rxjs'\nimport { SchmancyTabsModeContext, TSchmancyTabsMode } from './context'\nimport SchmancyTab from './tab'\n\n/**\n * @slot - The content of the tab group\n * @fires tab-changed - The event fired when the tab is changed\n */\n@customElement('schmancy-tab-group')\nexport default class SchmancyTabGroup extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@provide({ context: SchmancyTabsModeContext })\n\t@property({ type: String })\n\tmode: TSchmancyTabsMode = 'tabs'\n\n\t@property({ type: Boolean }) rounded = true\n\n\t@property({ type: String, reflect: true }) activeTab: string\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate tabsElements!: Array<SchmancyTab>\n\n\t@query('#tabsNavigation') navElement!: HTMLElement\n\t@query('#tabsContent') tabsContent!: HTMLElement\n\n\t@state()\n\tprivate tabs: Array<SchmancyTab> = []\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(window, 'scroll')\n\t\t\t.pipe(\n\t\t\t\tthrottleTime(1000),\n\t\t\t\tfilter(() => this.mode === 'scroll'),\n\t\t\t\tmap(() => {\n\t\t\t\t\tlet closestDiv = null\n\t\t\t\t\tlet closestDistance = Infinity\n\t\t\t\t\tthis.tabsElements.forEach(div => {\n\t\t\t\t\t\tconst distance =\n\t\t\t\t\t\t\tdiv.getBoundingClientRect().top - this.navElement.clientHeight + document.body.offsetHeight / 3\n\n\t\t\t\t\t\tif (distance < closestDistance && distance > 0) {\n\t\t\t\t\t\t\tclosestDistance = distance\n\t\t\t\t\t\t\tclosestDiv = div\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\treturn closestDiv\n\t\t\t\t}),\n\t\t\t\tfilter((el: SchmancyTab | null) => el !== null),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: (el: SchmancyTab) => {\n\t\t\t\t\tthis.activeTab = el.value\n\t\t\t\t},\n\t\t\t})\n\t}\n\n\tfirstUpdated() {\n\t\tinterval(0)\n\t\t\t.pipe(\n\t\t\t\tfilter(() => !!this.navElement.clientHeight),\n\t\t\t\ttake(1),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.tabsElements.forEach(tab => {\n\t\t\t\t\tif (this.mode === 'scroll') tab.style.paddingTop = this.navElement.clientHeight + 'px'\n\t\t\t\t})\n\t\t\t})\n\t}\n\n\thydrateTabs() {\n\t\tthis.tabs = this.tabsElements\n\t\tif (!this.activeTab && this.tabsElements[0]) {\n\t\t\tthis.activeTab = this.tabsElements[0].value\n\t\t\tthis.tabsElements[0].active = true\n\t\t} else {\n\t\t\tthis.tabsElements.forEach(tab => {\n\t\t\t\tif (tab.value === this.activeTab) tab.active = true\n\t\t\t\telse tab.active = false\n\t\t\t})\n\t\t}\n\t\tconst lastTab = this.tabs?.[-1]\n\t\tif (lastTab) {\n\t\t\tlastTab.style.paddingBottom = lastTab.offsetHeight + 'px'\n\t\t}\n\t}\n\n\ttabChanged(selectedTab: { label: string; value: string }) {\n\t\tlet activeTabElement: SchmancyTab | undefined\n\t\tthis.tabsElements.forEach(tab => {\n\t\t\tif (tab.value === selectedTab.value) {\n\t\t\t\ttab.active = true\n\t\t\t\tactiveTabElement = tab\n\t\t\t\t// scroll to the tab\n\t\t\t\tif (this.mode === 'scroll') {\n\t\t\t\t\t// Scroll the desired element into view\n\t\t\t\t\tactiveTabElement.scrollIntoView({\n\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\tblock: 'start',\n\t\t\t\t\t\tinline: 'start',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttab.active = false\n\t\t\t}\n\t\t})\n\t\tthis.mode === 'tabs' && (this.activeTab = selectedTab.value)\n\t\tthis.dispatchEvent(new CustomEvent('tab-changed', { detail: this.activeTab }))\n\t}\n\n\tprotected render(): unknown {\n\t\tconst tabs = {\n\t\t\t'bg-surface-default color-surface-on': true,\n\t\t\t'flex z-50 overflow-auto': true,\n\t\t\t'sticky top-0 shadow-md': this.mode === 'scroll',\n\t\t\t'rounded-full': this.rounded,\n\t\t}\n\n\t\tconst activeTab = {\n\t\t\t'text-primary-default': true,\n\t\t}\n\n\t\tconst inactiveTab = {\n\t\t\t'border-transparent': true,\n\t\t\t'hover:text-surface-on': true,\n\t\t\t'hover:border-outlineVariant': true,\n\t\t\t'text-surface-onVariant': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"tabsNavigation\" class=\"${this.classMap(tabs)}\" aria-label=\"Tabs\">\n\t\t\t\t${repeat(\n\t\t\t\t\tthis.tabs,\n\t\t\t\t\ttab => tab.value,\n\t\t\t\t\ttab => html`\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.tabChanged({\n\t\t\t\t\t\t\t\t\tlabel: tab.label,\n\t\t\t\t\t\t\t\t\tvalue: tab.value,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-current=\"page\"\n\t\t\t\t\t\t\tclass=\"h-auto relative\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"px-4 py-3 ${this.activeTab === tab.value\n\t\t\t\t\t\t\t\t\t? this.classMap(activeTab)\n\t\t\t\t\t\t\t\t\t: this.classMap(inactiveTab)}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-typography class=\"h-full align-middle flex \" type=\"title\" token=\"md\" weight=\"medium\">\n\t\t\t\t\t\t\t\t\t${tab.label}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t.hidden=${this.activeTab !== tab.value}\n\t\t\t\t\t\t\t\t\tclass=\"border-primary-default absolute bottom-0 inset-x-6 border-solid border-2 rounded-t-full\"\n\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t\t<schmancy-divider class=\"px-6\"></schmancy-divider>\n\t\t\t<section id=\"tabsContent\">\n\t\t\t\t<slot @slotchange=${() => this.hydrateTabs()}></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tab-group': SchmancyTabGroup\n\t}\n}\n","/**\n * Compatibility layer for schmancy-tabs-group (which is the more correct plural form)\n * that aliases to schmancy-tab-group for backward compatibility\n */\nimport SchmancyTabGroup from './tabs-group';\n\n// Create a simple class extends the original tab group\nclass SchmancyTabsGroup extends SchmancyTabGroup {}\n\n// Register the alias element\ncustomElements.define('schmancy-tabs-group', SchmancyTabsGroup);\n\nexport default SchmancyTabsGroup;\n\n// Add the type definition to ensure TypeScript recognizes the element\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-tabs-group': SchmancyTabsGroup;\n }\n}"],"names":["SchmancyTabsModeContext","createContext","SchmancyTab","TailwindElement","css","render","html","this","mode","active","__decorateClass","property","type","String","reflect","prototype","Boolean","consume","context","subscribe","state","customElement","SchmancyTabGroup","constructor","super","arguments","rounded","tabs","connectedCallback","fromEvent","window","pipe","throttleTime","filter","map","closestDiv","closestDistance","Infinity","tabsElements","forEach","div","distance","getBoundingClientRect","top","navElement","clientHeight","document","body","offsetHeight","el","next","activeTab","value","firstUpdated","interval","take","tab","style","paddingTop","hydrateTabs","lastTab","paddingBottom","selectedTab","activeTabElement","scrollIntoView","behavior","block","inline","dispatchEvent","CustomEvent","detail","inactiveTab","classMap","repeat","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AE6BL,EAAA,CAA5BC,EAAS,EAAEC,MAAMI,QAAAA,CAAAA,CAAAA,GATEM,EASSP,WAAA,WAAA,CAAA,GAEcL,EAAA,CAA1CC,EAAS,EAAEC,MAAMC,QAAQC,YAAS,CAAA,CAAA,GAXfQ,EAWuBP,WAAA,aAAA,CAAA,GAInCL,EAAA,CAHPmE,EAAsB,EACtBC,SAAAA,QAbmBxD,EAeZP,WAAA,gBAAA,CAAA,GAEkBL,EAAA,CAAzBqE,EAAM,iBAAA,CAAA,GAjBazD,EAiBMP,WAAA,cAAA,CAAA,GACHL,EAAA,CAAtBqE,EAAM,cAAA,CAAA,GAlBazD,EAkBGP,WAAA,eAAA,IAGfL,EAAA,CADPU,EAAAA,CAAAA,GApBmBE,EAqBZP,WAAA,QAAA,CAAA,GArBYO,IAArBZ,EAAA,CADCW,EAAc,oBAAA,CAAA,GACMC;ACJrB0D,eAAeC,OAAO,uBAHtB,cAAgC3D,EAAAA;AAAAA,CAAAA;"}
|
|
1
|
+
{"version":3,"file":"tabs-compatibility-CpSB50Sr.js","sources":["../src/tabs/context.ts","../src/tabs/tab.ts","../src/tabs/tabs-group.ts","../src/tabs/tabs-compatibility.ts"],"sourcesContent":["import { createContext } from '@lit/context'\n\nexport type TSchmancyTabsMode = 'scroll' | 'tabs'\n\nexport const SchmancyTabsModeContext = createContext<TSchmancyTabsMode>('tabs')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyTabsModeContext } from './context'\n\n@customElement('schmancy-tab')\nexport default class SchmancyTab extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true }) label\n\t@property({ type: String, reflect: true }) value\n\t@property({ type: Boolean, reflect: true }) active!: boolean\n\n\t@consume({ context: SchmancyTabsModeContext, subscribe: true })\n\t@state()\n\tmode\n\tprotected render(): unknown {\n\t\treturn html` <slot .hidden=${this.mode === 'tabs' ? !this.active : false}></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tab': SchmancyTab\n\t}\n}\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { filter, fromEvent, interval, map, take, throttleTime } from 'rxjs'\nimport { SchmancyTabsModeContext, TSchmancyTabsMode } from './context'\nimport SchmancyTab from './tab'\n\n/**\n * @slot - The content of the tab group\n * @fires tab-changed - The event fired when the tab is changed\n */\n@customElement('schmancy-tab-group')\nexport default class SchmancyTabGroup extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@provide({ context: SchmancyTabsModeContext })\n\t@property({ type: String })\n\tmode: TSchmancyTabsMode = 'tabs'\n\n\t@property({ type: Boolean }) rounded = true\n\n\t@property({ type: String, reflect: true }) activeTab: string\n\t@queryAssignedElements({\n\t\tflatten: true,\n\t})\n\tprivate tabsElements!: Array<SchmancyTab>\n\n\t@query('#tabsNavigation') navElement!: HTMLElement\n\t@query('#tabsContent') tabsContent!: HTMLElement\n\n\t@state()\n\tprivate tabs: Array<SchmancyTab> = []\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(window, 'scroll')\n\t\t\t.pipe(\n\t\t\t\tthrottleTime(1000),\n\t\t\t\tfilter(() => this.mode === 'scroll'),\n\t\t\t\tmap(() => {\n\t\t\t\t\tlet closestDiv = null\n\t\t\t\t\tlet closestDistance = Infinity\n\t\t\t\t\tthis.tabsElements.forEach(div => {\n\t\t\t\t\t\tconst distance =\n\t\t\t\t\t\t\tdiv.getBoundingClientRect().top - this.navElement.clientHeight + document.body.offsetHeight / 3\n\n\t\t\t\t\t\tif (distance < closestDistance && distance > 0) {\n\t\t\t\t\t\t\tclosestDistance = distance\n\t\t\t\t\t\t\tclosestDiv = div\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\treturn closestDiv\n\t\t\t\t}),\n\t\t\t\tfilter((el: SchmancyTab | null) => el !== null),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: (el: SchmancyTab) => {\n\t\t\t\t\tthis.activeTab = el.value\n\t\t\t\t},\n\t\t\t})\n\t}\n\n\tfirstUpdated() {\n\t\tinterval(0)\n\t\t\t.pipe(\n\t\t\t\tfilter(() => !!this.navElement.clientHeight),\n\t\t\t\ttake(1),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.tabsElements.forEach(tab => {\n\t\t\t\t\tif (this.mode === 'scroll') tab.style.paddingTop = this.navElement.clientHeight + 'px'\n\t\t\t\t})\n\t\t\t})\n\t}\n\n\thydrateTabs() {\n\t\tthis.tabs = this.tabsElements\n\t\tif (!this.activeTab && this.tabsElements[0]) {\n\t\t\tthis.activeTab = this.tabsElements[0].value\n\t\t\tthis.tabsElements[0].active = true\n\t\t} else {\n\t\t\tthis.tabsElements.forEach(tab => {\n\t\t\t\tif (tab.value === this.activeTab) tab.active = true\n\t\t\t\telse tab.active = false\n\t\t\t})\n\t\t}\n\t\tconst lastTab = this.tabs?.[-1]\n\t\tif (lastTab) {\n\t\t\tlastTab.style.paddingBottom = lastTab.offsetHeight + 'px'\n\t\t}\n\t}\n\n\ttabChanged(selectedTab: { label: string; value: string }) {\n\t\tlet activeTabElement: SchmancyTab | undefined\n\t\tthis.tabsElements.forEach(tab => {\n\t\t\tif (tab.value === selectedTab.value) {\n\t\t\t\ttab.active = true\n\t\t\t\tactiveTabElement = tab\n\t\t\t\t// scroll to the tab\n\t\t\t\tif (this.mode === 'scroll') {\n\t\t\t\t\t// Scroll the desired element into view\n\t\t\t\t\tactiveTabElement.scrollIntoView({\n\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\tblock: 'start',\n\t\t\t\t\t\tinline: 'start',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttab.active = false\n\t\t\t}\n\t\t})\n\t\tthis.mode === 'tabs' && (this.activeTab = selectedTab.value)\n\t\tthis.dispatchEvent(new CustomEvent('tab-changed', { detail: this.activeTab }))\n\t}\n\n\tprotected render(): unknown {\n\t\tconst tabs = {\n\t\t\t'bg-surface-default color-surface-on': true,\n\t\t\t'flex z-50 overflow-auto': true,\n\t\t\t'sticky top-0 shadow-md': this.mode === 'scroll',\n\t\t\t'rounded-full': this.rounded,\n\t\t}\n\n\t\tconst activeTab = {\n\t\t\t'text-primary-default': true,\n\t\t}\n\n\t\tconst inactiveTab = {\n\t\t\t'border-transparent': true,\n\t\t\t'hover:text-surface-on': true,\n\t\t\t'hover:border-outlineVariant': true,\n\t\t\t'text-surface-onVariant': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"tabsNavigation\" class=\"${this.classMap(tabs)}\" aria-label=\"Tabs\">\n\t\t\t\t${repeat(\n\t\t\t\t\tthis.tabs,\n\t\t\t\t\ttab => tab.value,\n\t\t\t\t\ttab => html`\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.tabChanged({\n\t\t\t\t\t\t\t\t\tlabel: tab.label,\n\t\t\t\t\t\t\t\t\tvalue: tab.value,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\taria-current=\"page\"\n\t\t\t\t\t\t\tclass=\"h-auto relative\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"px-4 py-3 ${this.activeTab === tab.value\n\t\t\t\t\t\t\t\t\t? this.classMap(activeTab)\n\t\t\t\t\t\t\t\t\t: this.classMap(inactiveTab)}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-typography class=\"h-full align-middle flex \" type=\"title\" token=\"md\" weight=\"medium\">\n\t\t\t\t\t\t\t\t\t${tab.label}\n\t\t\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t.hidden=${this.activeTab !== tab.value}\n\t\t\t\t\t\t\t\t\tclass=\"border-primary-default absolute bottom-0 inset-x-6 border-solid border-2 rounded-t-full\"\n\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t\t<section id=\"tabsContent\">\n\t\t\t\t<slot @slotchange=${() => this.hydrateTabs()}></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-tab-group': SchmancyTabGroup\n\t}\n}\n","/**\n * Compatibility layer for schmancy-tabs-group (which is the more correct plural form)\n * that aliases to schmancy-tab-group for backward compatibility\n */\nimport SchmancyTabGroup from './tabs-group';\n\n// Create a simple class extends the original tab group\nclass SchmancyTabsGroup extends SchmancyTabGroup {}\n\n// Register the alias element\ncustomElements.define('schmancy-tabs-group', SchmancyTabsGroup);\n\nexport default SchmancyTabsGroup;\n\n// Add the type definition to ensure TypeScript recognizes the element\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-tabs-group': SchmancyTabsGroup;\n }\n}"],"names":["SchmancyTabsModeContext","createContext","SchmancyTab","TailwindElement","css","render","html","this","mode","active","__decorateClass","property","type","String","reflect","prototype","Boolean","consume","context","subscribe","state","customElement","SchmancyTabGroup","constructor","super","arguments","rounded","tabs","connectedCallback","fromEvent","window","pipe","throttleTime","filter","map","closestDiv","closestDistance","Infinity","tabsElements","forEach","div","distance","getBoundingClientRect","top","navElement","clientHeight","document","body","offsetHeight","el","next","activeTab","value","firstUpdated","interval","take","tab","style","paddingTop","hydrateTabs","lastTab","paddingBottom","selectedTab","activeTabElement","scrollIntoView","behavior","block","inline","dispatchEvent","CustomEvent","detail","inactiveTab","classMap","repeat","tabChanged","label","provide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AA5BC,EAAS,EAAEC,MAAMI,QAAAA,CAAAA,CAAAA,GATEM,EASSP,WAAA,WAAA,CAAA,GAEcL,EAAA,CAA1CC,EAAS,EAAEC,MAAMC,QAAQC,YAAS,CAAA,CAAA,GAXfQ,EAWuBP,WAAA,aAAA,CAAA,GAInCL,EAAA,CAHPmE,EAAsB,EACtBC,SAAAA,QAbmBxD,EAeZP,WAAA,gBAAA,CAAA,GAEkBL,EAAA,CAAzBqE,EAAM,iBAAA,CAAA,GAjBazD,EAiBMP,WAAA,cAAA,CAAA,GACHL,EAAA,CAAtBqE,EAAM,cAAA,CAAA,GAlBazD,EAkBGP,WAAA,eAAA,IAGfL,EAAA,CADPU,EAAAA,CAAAA,GApBmBE,EAqBZP,WAAA,QAAA,CAAA,GArBYO,IAArBZ,EAAA,CADCW,EAAc,oBAAA,CAAA,GACMC;ACJrB0D,eAAeC,OAAO,uBAHtB,cAAgC3D,EAAAA;AAAAA,CAAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const y=require("./consume-edta5ng5.cjs"),l=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const o=require("lit/decorators.js"),u=require("./tailwind.mixin-BvVlz7hG.cjs"),b=require("lit"),m=require("./provide-BxZ2kn_p.cjs"),f=require("lit/directives/repeat.js"),v=m.n("tabs");var g=Object.defineProperty,E=Object.getOwnPropertyDescriptor,
|
|
1
|
+
"use strict";const y=require("./consume-edta5ng5.cjs"),l=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const o=require("lit/decorators.js"),u=require("./tailwind.mixin-BvVlz7hG.cjs"),b=require("lit"),m=require("./provide-BxZ2kn_p.cjs"),f=require("lit/directives/repeat.js"),v=m.n("tabs");var g=Object.defineProperty,E=Object.getOwnPropertyDescriptor,d=(t,e,a,s)=>{for(var c,r=s>1?void 0:s?E(e,a):e,h=t.length-1;h>=0;h--)(c=t[h])&&(r=(s?c(e,a,r):c(r))||r);return s&&r&&g(e,a,r),r};let p=class extends u.TailwindElement(b.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
5
|
-
`){render(){return b.html` <slot .hidden=${this.mode==="tabs"&&!this.active}></slot> `}};
|
|
5
|
+
`){render(){return b.html` <slot .hidden=${this.mode==="tabs"&&!this.active}></slot> `}};d([o.property({type:String,reflect:!0})],p.prototype,"label",2),d([o.property({type:String,reflect:!0})],p.prototype,"value",2),d([o.property({type:Boolean,reflect:!0})],p.prototype,"active",2),d([y.c({context:v,subscribe:!0}),o.state()],p.prototype,"mode",2),p=d([o.customElement("schmancy-tab")],p);var T=Object.defineProperty,x=Object.getOwnPropertyDescriptor,n=(t,e,a,s)=>{for(var c,r=s>1?void 0:s?x(e,a):e,h=t.length-1;h>=0;h--)(c=t[h])&&(r=(s?c(e,a,r):c(r))||r);return s&&r&&T(e,a,r),r};let i=class extends u.TailwindElement(b.css`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
}
|
|
@@ -28,9 +28,8 @@
|
|
|
28
28
|
</schmancy-button>
|
|
29
29
|
`)}
|
|
30
30
|
</section>
|
|
31
|
-
<schmancy-divider class="px-6"></schmancy-divider>
|
|
32
31
|
<section id="tabsContent">
|
|
33
32
|
<slot @slotchange=${()=>this.hydrateTabs()}></slot>
|
|
34
33
|
</section>
|
|
35
34
|
`}};n([m.e({context:v}),o.property({type:String})],i.prototype,"mode",2),n([o.property({type:Boolean})],i.prototype,"rounded",2),n([o.property({type:String,reflect:!0})],i.prototype,"activeTab",2),n([o.queryAssignedElements({flatten:!0})],i.prototype,"tabsElements",2),n([o.query("#tabsNavigation")],i.prototype,"navElement",2),n([o.query("#tabsContent")],i.prototype,"tabsContent",2),n([o.state()],i.prototype,"tabs",2),i=n([o.customElement("schmancy-tab-group")],i);customElements.define("schmancy-tabs-group",class extends i{});
|
|
36
|
-
//# sourceMappingURL=tabs-compatibility-
|
|
35
|
+
//# sourceMappingURL=tabs-compatibility-lRm3kfw7.cjs.map
|