@mhmo91/schmancy 0.2.79 → 0.2.81
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/dist/{animated-text-Drgel89a.js → animated-text-BUKd3r4e.js} +3 -3
- package/dist/{animated-text-Drgel89a.js.map → animated-text-BUKd3r4e.js.map} +1 -1
- package/dist/{animated-text-ZUEQQHIA.cjs → animated-text-bWaeaN6g.cjs} +2 -2
- package/dist/{animated-text-ZUEQQHIA.cjs.map → animated-text-bWaeaN6g.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-Cfvbb333.cjs → area.component-Dcyh5X7W.cjs} +2 -2
- package/dist/{area.component-Cfvbb333.cjs.map → area.component-Dcyh5X7W.cjs.map} +1 -1
- package/dist/{area.component-BWniFh72.js → area.component-cLSO_FEd.js} +3 -3
- package/dist/{area.component-BWniFh72.js.map → area.component-cLSO_FEd.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-pDDovAE3.cjs → autocomplete-C_6aoN2a.cjs} +2 -2
- package/dist/{autocomplete-pDDovAE3.cjs.map → autocomplete-C_6aoN2a.cjs.map} +1 -1
- package/dist/{autocomplete-CaqTiWXc.js → autocomplete-QtrzJ2bH.js} +3 -3
- package/dist/{autocomplete-CaqTiWXc.js.map → autocomplete-QtrzJ2bH.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-9lpB6PGQ.cjs → checkbox-76h7I-GR.cjs} +2 -2
- package/dist/{checkbox-9lpB6PGQ.cjs.map → checkbox-76h7I-GR.cjs.map} +1 -1
- package/dist/{checkbox-BClcyH7K.js → checkbox-QEnNFBvt.js} +2 -2
- package/dist/{checkbox-BClcyH7K.js.map → checkbox-QEnNFBvt.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-CECbQF-e.js → chips-BK2uRJp5.js} +3 -3
- package/dist/{chips-CECbQF-e.js.map → chips-BK2uRJp5.js.map} +1 -1
- package/dist/{chips-C5BbSIAo.cjs → chips-Bqw0n_iS.cjs} +2 -2
- package/dist/{chips-C5BbSIAo.cjs.map → chips-Bqw0n_iS.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-J-JT-8ba.cjs → date-range-dVsfSCaM.cjs} +2 -2
- package/dist/{date-range-J-JT-8ba.cjs.map → date-range-dVsfSCaM.cjs.map} +1 -1
- package/dist/{date-range-BhYqCSZp.js → date-range-usulo0HQ.js} +3 -3
- package/dist/{date-range-BhYqCSZp.js.map → date-range-usulo0HQ.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-tojIaYXv.js → delay-Dv9ysNFQ.js} +2 -2
- package/dist/{delay-tojIaYXv.js.map → delay-Dv9ysNFQ.js.map} +1 -1
- package/dist/{delay-CpKz9qoJ.cjs → delay-l1sQmrcC.cjs} +2 -2
- package/dist/{delay-CpKz9qoJ.cjs.map → delay-l1sQmrcC.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{divider-CjeXqpY8.cjs → divider-Cj7lpip2.cjs} +2 -2
- package/dist/{divider-CjeXqpY8.cjs.map → divider-Cj7lpip2.cjs.map} +1 -1
- package/dist/{divider-Dp6Usk1d.js → divider-CrfNn-zZ.js} +3 -3
- package/dist/{divider-Dp6Usk1d.js.map → divider-CrfNn-zZ.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{flex-CLZyrhZ_.js → flex-D2j7HSfe.js} +2 -2
- package/dist/{flex-CLZyrhZ_.js.map → flex-D2j7HSfe.js.map} +1 -1
- package/dist/{flex-lEIKuhdY.cjs → flex-pp5McZDa.cjs} +2 -2
- package/dist/{flex-lEIKuhdY.cjs.map → flex-pp5McZDa.cjs.map} +1 -1
- package/dist/{form-BfV5JUNV.js → form-Bh111DGD.js} +2 -2
- package/dist/{form-BfV5JUNV.js.map → form-Bh111DGD.js.map} +1 -1
- package/dist/{form-Bnzb6YbT.cjs → form-DguPMFnf.cjs} +2 -2
- package/dist/{form-Bnzb6YbT.cjs.map → form-DguPMFnf.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-CS7L7dYv.js → icon-BwmU0LEi.js} +3 -3
- package/dist/{icon-CS7L7dYv.js.map → icon-BwmU0LEi.js.map} +1 -1
- package/dist/{icon-DXyemmCt.cjs → icon-CuaoCoaV.cjs} +2 -2
- package/dist/{icon-DXyemmCt.cjs.map → icon-CuaoCoaV.cjs.map} +1 -1
- package/dist/{icon-button-GJ_fOvRP.js → icon-button-CoiM2PHw.js} +3 -3
- package/dist/{icon-button-GJ_fOvRP.js.map → icon-button-CoiM2PHw.js.map} +1 -1
- package/dist/{icon-button-CWUpvLIc.cjs → icon-button-D926dBEW.cjs} +2 -2
- package/dist/{icon-button-CWUpvLIc.cjs.map → icon-button-D926dBEW.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +33 -33
- package/dist/{input-BOity9fs.js → input-BdgRy9ER.js} +2 -2
- package/dist/{input-BOity9fs.js.map → input-BdgRy9ER.js.map} +1 -1
- package/dist/{input-DP4Mi51t.cjs → input-DSDPR0OV.cjs} +2 -2
- package/dist/{input-DP4Mi51t.cjs.map → input-DSDPR0OV.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-DBsjW6lO.js → list-C-b8Bk8D.js} +2 -2
- package/dist/{list-DBsjW6lO.js.map → list-C-b8Bk8D.js.map} +1 -1
- package/dist/{list-DhcAzsI3.cjs → list-gHAuiKle.cjs} +2 -2
- package/dist/{list-DhcAzsI3.cjs.map → list-gHAuiKle.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-C-c-2rdW.cjs → litElement.mixin-DVUssLf7.cjs} +2 -2
- package/dist/{litElement.mixin-C-c-2rdW.cjs.map → litElement.mixin-DVUssLf7.cjs.map} +1 -1
- package/dist/{litElement.mixin-vAR9BIyD.js → litElement.mixin-DZS77DZg.js} +2 -2
- package/dist/{litElement.mixin-vAR9BIyD.js.map → litElement.mixin-DZS77DZg.js.map} +1 -1
- package/dist/{menu-BW3qO2A1.js → menu-B8b_0HdH.js} +3 -3
- package/dist/{menu-BW3qO2A1.js.map → menu-B8b_0HdH.js.map} +1 -1
- package/dist/{menu-Dem8Myie.cjs → menu-BzF6Ny1t.cjs} +2 -2
- package/dist/{menu-Dem8Myie.cjs.map → menu-BzF6Ny1t.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-DCA4GidB.js → option-DSYXiD4W.js} +2 -2
- package/dist/{option-DCA4GidB.js.map → option-DSYXiD4W.js.map} +1 -1
- package/dist/{option-C-gBYdv8.cjs → option-jLDxWW1q.cjs} +2 -2
- package/dist/{option-C-gBYdv8.cjs.map → option-jLDxWW1q.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{outlet-jd-bRdrF.js → outlet-BUvEEAzg.js} +2 -2
- package/dist/{outlet-jd-bRdrF.js.map → outlet-BUvEEAzg.js.map} +1 -1
- package/dist/{outlet-6MP6k9wf.cjs → outlet-BgTwB0b4.cjs} +2 -2
- package/dist/{outlet-6MP6k9wf.cjs.map → outlet-BgTwB0b4.cjs.map} +1 -1
- package/dist/{payment-card-form-BZiEUnKn.cjs → payment-card-form-DXwbO2rZ.cjs} +2 -2
- package/dist/{payment-card-form-BZiEUnKn.cjs.map → payment-card-form-DXwbO2rZ.cjs.map} +1 -1
- package/dist/{payment-card-form-CInoqXsW.js → payment-card-form-Dk7j5LfM.js} +3 -3
- package/dist/{payment-card-form-CInoqXsW.js.map → payment-card-form-Dk7j5LfM.js.map} +1 -1
- package/dist/{radio-group-C98aizGb.js → radio-group-CZenAErl.js} +2 -2
- package/dist/{radio-group-C98aizGb.js.map → radio-group-CZenAErl.js.map} +1 -1
- package/dist/{radio-group-B4Of8FBA.cjs → radio-group-D2BYhWrm.cjs} +2 -2
- package/dist/{radio-group-B4Of8FBA.cjs.map → radio-group-D2BYhWrm.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{select-DtJckUTa.cjs → select-BuuqcFxZ.cjs} +2 -2
- package/dist/{select-DtJckUTa.cjs.map → select-BuuqcFxZ.cjs.map} +1 -1
- package/dist/{select-Ba3A3DS4.js → select-iX8K1myD.js} +3 -3
- package/dist/{select-Ba3A3DS4.js.map → select-iX8K1myD.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-BgbV6g2F.cjs → sheet-BTsvaVm7.cjs} +2 -2
- package/dist/{sheet-BgbV6g2F.cjs.map → sheet-BTsvaVm7.cjs.map} +1 -1
- package/dist/{sheet-WsaFx6-i.js → sheet-D_4Bs8qF.js} +3 -3
- package/dist/{sheet-WsaFx6-i.js.map → sheet-D_4Bs8qF.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-BOXmzToY.js → slider-BNmGoTDi.js} +3 -3
- package/dist/{slider-BOXmzToY.js.map → slider-BNmGoTDi.js.map} +1 -1
- package/dist/{slider-CR2itGT0.cjs → slider-ylPeKhlx.cjs} +2 -2
- package/dist/{slider-CR2itGT0.cjs.map → slider-ylPeKhlx.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BKVFC3qz.js → spinner-BITeQbHV.js} +3 -3
- package/dist/{spinner-BKVFC3qz.js.map → spinner-BITeQbHV.js.map} +1 -1
- package/dist/{spinner-Do8LNQoW.cjs → spinner-Dmu4ziHl.cjs} +2 -2
- package/dist/{spinner-Do8LNQoW.cjs.map → spinner-Dmu4ziHl.cjs.map} +1 -1
- package/dist/surface-BqvR0DYx.cjs +20 -0
- package/dist/surface-BqvR0DYx.cjs.map +1 -0
- package/dist/surface-RGSzxvJQ.js +42 -0
- package/dist/surface-RGSzxvJQ.js.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-379iohVA.cjs → table-DWSb0G0X.cjs} +2 -2
- package/dist/{table-379iohVA.cjs.map → table-DWSb0G0X.cjs.map} +1 -1
- package/dist/{table-iRPRoThv.js → table-j4PKs0UW.js} +2 -2
- package/dist/{table-iRPRoThv.js.map → table-j4PKs0UW.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-BTUwCflk.cjs → tabs-group-9Xxu1XeD.cjs} +2 -2
- package/dist/{tabs-group-BTUwCflk.cjs.map → tabs-group-9Xxu1XeD.cjs.map} +1 -1
- package/dist/{tabs-group-BYuZ4dIc.js → tabs-group-Dfmnp7Cg.js} +2 -2
- package/dist/{tabs-group-BYuZ4dIc.js.map → tabs-group-Dfmnp7Cg.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tailwind.mixin-DxmWMnBQ.js → tailwind.mixin-Cmuz-an9.js} +2 -2
- package/dist/{tailwind.mixin-DxmWMnBQ.js.map → tailwind.mixin-Cmuz-an9.js.map} +1 -1
- package/dist/{tailwind.mixin-B7_ZpVpC.cjs → tailwind.mixin-DYL2WoGu.cjs} +2 -2
- package/dist/{tailwind.mixin-B7_ZpVpC.cjs.map → tailwind.mixin-DYL2WoGu.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-gEmSdSwy.js → teleport.component-Dq0V22Tx.js} +35 -35
- package/dist/{teleport.component-gEmSdSwy.js.map → teleport.component-Dq0V22Tx.js.map} +1 -1
- package/dist/{teleport.component-B4buMUvC.cjs → teleport.component-R35uOyGS.cjs} +2 -2
- package/dist/{teleport.component-B4buMUvC.cjs.map → teleport.component-R35uOyGS.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-C5i4amtn.js → textarea-CkVnGdpM.js} +2 -2
- package/dist/{textarea-C5i4amtn.js.map → textarea-CkVnGdpM.js.map} +1 -1
- package/dist/{textarea-DFEdjfVW.cjs → textarea-EEUgq1pX.cjs} +2 -2
- package/dist/{textarea-DFEdjfVW.cjs.map → textarea-EEUgq1pX.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-BFWwX__i.js → theme-button-BsOS56gJ.js} +2 -2
- package/dist/{theme-button-BFWwX__i.js.map → theme-button-BsOS56gJ.js.map} +1 -1
- package/dist/{theme-button-DsGEWHcv.cjs → theme-button-tkSCu4Ct.cjs} +2 -2
- package/dist/{theme-button-DsGEWHcv.cjs.map → theme-button-tkSCu4Ct.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-BTfo42Lo.cjs → theme.component-BwtqgxyA.cjs} +2 -2
- package/dist/{theme.component-BTfo42Lo.cjs.map → theme.component-BwtqgxyA.cjs.map} +1 -1
- package/dist/{theme.component-GuFArxKG.js → theme.component-jdT8c5pX.js} +2 -2
- package/dist/{theme.component-GuFArxKG.js.map → theme.component-jdT8c5pX.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tree-XbaraF4_.js → tree-Tu8UtBEI.js} +2 -2
- package/dist/{tree-XbaraF4_.js.map → tree-Tu8UtBEI.js.map} +1 -1
- package/dist/{tree-DJDSDjnb.cjs → tree-lm5zTa-P.cjs} +2 -2
- package/dist/{tree-DJDSDjnb.cjs.map → tree-lm5zTa-P.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-DGO4rddH.js → typewriter-BTjEcLfM.js} +4 -4
- package/dist/{typewriter-DGO4rddH.js.map → typewriter-BTjEcLfM.js.map} +1 -1
- package/dist/{typewriter-BF7pgYH2.cjs → typewriter-CMSlU9Wt.cjs} +2 -2
- package/dist/{typewriter-BF7pgYH2.cjs.map → typewriter-CMSlU9Wt.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-CLPItwOI.js → typography-CRWVnyIb.js} +2 -2
- package/dist/{typography-CLPItwOI.js.map → typography-CRWVnyIb.js.map} +1 -1
- package/dist/{typography-DVm5bpVi.cjs → typography-sXnB1yDT.cjs} +2 -2
- package/dist/{typography-DVm5bpVi.cjs.map → typography-sXnB1yDT.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/surface/surface.d.ts +32 -24
- package/dist/surface-DK-WnX6s.js +0 -42
- package/dist/surface-DK-WnX6s.js.map +0 -1
- package/dist/surface-NWJjaNWQ.cjs +0 -20
- package/dist/surface-NWJjaNWQ.cjs.map +0 -1
package/dist/surface-DK-WnX6s.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { e as u } from "./provide-BLSgVvMJ.js";
|
|
2
|
-
import { T as f } from "./tailwind.mixin-DxmWMnBQ.js";
|
|
3
|
-
import { css as l, html as d } from "lit";
|
|
4
|
-
import { property as a, customElement as p } from "lit/decorators.js";
|
|
5
|
-
import { classMap as g } from "lit/directives/class-map.js";
|
|
6
|
-
import { S as m } from "./context-YZmnxxIi.js";
|
|
7
|
-
var b = Object.defineProperty, w = Object.getOwnPropertyDescriptor, s = (r, i, h, o) => {
|
|
8
|
-
for (var n, t = o > 1 ? void 0 : o ? w(i, h) : i, c = r.length - 1; c >= 0; c--) (n = r[c]) && (t = (o ? n(i, h, t) : n(t)) || t);
|
|
9
|
-
return o && t && b(i, h, t), t;
|
|
10
|
-
};
|
|
11
|
-
let e = class extends f(l`
|
|
12
|
-
:host([fill='all']) {
|
|
13
|
-
height: 100%;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
:host([fill='width']) {
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
:host([fill='height']) {
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
:host {
|
|
23
|
-
display: block;
|
|
24
|
-
}
|
|
25
|
-
`) {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments), this.fill = "auto", this.rounded = "none", this.surface = "surface", this.elevation = 0;
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
const r = { relative: !0, "inset-0": !0, block: !0, "box-border": !0, "rounded-none": this.rounded === "none", "rounded-t-[8px]": this.rounded === "top", "rounded-l-[8px]": this.rounded === "left", "rounded-r-[8px]": this.rounded === "right", "rounded-b-[8px]": this.rounded === "bottom", "rounded-[8px]": this.rounded === "all", "w-full": this.fill === "width" || this.fill === "all", "h-full": this.fill === "height" || this.fill === "all", "shadow-xs": this.elevation === 1, "shadow-sm": this.elevation === 2, "shadow-md": this.elevation === 3, "shadow-lg": this.elevation === 4, "text-surface-on": this.surface === "surface" || this.surface === "surfaceDim" || this.surface === "surfaceBright" || this.surface === "containerLowest" || this.surface === "containerLow" || this.surface === "container" || this.surface === "containerHigh" || this.surface === "containerHighest", "bg-surface-default": this.surface === "surface", "bg-surface-dim": this.surface === "surfaceDim", "bg-surface-bright": this.surface === "surfaceBright", "bg-surface-lowest": this.surface === "containerLowest", "bg-surface-low": this.surface === "containerLow", "bg-surface-container": this.surface === "container", "bg-surface-high": this.surface === "containerHigh", "bg-surface-highest": this.surface === "containerHighest" };
|
|
31
|
-
return d`
|
|
32
|
-
<section class=${g(r)}>
|
|
33
|
-
<slot></slot>
|
|
34
|
-
</section>
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
s([a({ type: String, reflect: !0 })], e.prototype, "fill", 2), s([a()], e.prototype, "rounded", 2), s([u({ context: m }), a()], e.prototype, "surface", 2), s([a({ type: Number })], e.prototype, "elevation", 2), e = s([p("schmancy-surface")], e);
|
|
39
|
-
export {
|
|
40
|
-
e as S
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=surface-DK-WnX6s.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surface-DK-WnX6s.js","sources":["../src/surface/surface.ts"],"sourcesContent":["import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/tailwind.mixin'\nimport { TSurfaceColor } from '@schmancy/types'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js' // Utility for conditionally applying CSS classes\nimport { SchmancySurfaceTypeContext } from './context'\n\n/**\n * Defines the fill options for the surface component.\n */\nexport type SchmancySurfaceFill = 'all' | 'width' | 'height' | 'auto'\n\n/**\n * `<schmancy-surface>` component.\n *\n * This component provides a styled surface that adapts its dimensions based on the\n * provided fill attribute and applies additional styling such as elevation and rounding.\n * It uses a context provider to share the surface type with descendant components.\n *\n * @element schmancy-surface\n * @slot - Default slot for projecting child content.\n *\n * @example\n * <schmancy-surface fill=\"all\" rounded=\"all\" elevation=\"3\" surface=\"surfaceBright\">\n * <p>Your content here</p>\n * </schmancy-surface>\n */\n@customElement('schmancy-surface')\nexport class SchmancySurface extends TailwindElement(css`\n\t:host([fill='all']) {\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\t:host([fill='width']) {\n\t\twidth: 100%;\n\t}\n\t:host([fill='height']) {\n\t\theight: 100%;\n\t}\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t/**\n\t * Specifies how the component should fill the available space.\n\t * Options:\n\t * - `all`: Fill both width and height.\n\t * - `width`: Fill only the width.\n\t * - `height`: Fill only the height.\n\t * - `auto`: No automatic filling.\n\t *\n\t * @attr fill\n\t * @default 'auto'\n\t */\n\t@property({ type: String, reflect: true }) fill: SchmancySurfaceFill = 'auto'\n\n\t/**\n\t * Determines the rounding style for the component's corners.\n\t * Options include:\n\t * - `none`: No rounding.\n\t * - `top`, `left`, `right`, `bottom`: Round only one side.\n\t * - `all`: Round all corners.\n\t *\n\t * @attr rounded\n\t * @default 'none'\n\t */\n\t@property() rounded: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' = 'none'\n\n\t/**\n\t * Provides the surface type to descendant components via context.\n\t * This property also defines the background and text colors.\n\t *\n\t * @attr surface\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancySurfaceTypeContext })\n\t@property()\n\tsurface: TSurfaceColor = 'surface'\n\n\t/**\n\t * Sets the elevation level (shadow depth) of the surface.\n\t * Valid values are 0 to 5.\n\t *\n\t * @attr elevation\n\t * @default 0\n\t */\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\t/**\n\t * Renders the component template.\n\t * The component dynamically applies CSS classes based on property values\n\t * using the `classMap` directive.\n\t *\n\t * @returns The rendered template.\n\t */\n\tprotected render(): unknown {\n\t\t// Map properties to Tailwind CSS classes\n\t\tconst classes = {\n\t\t\trelative: true,\n\t\t\t'inset-0': true,\n\t\t\tblock: true,\n\t\t\t'box-border': true,\n\t\t\t// Apply rounding based on the `rounded` property\n\t\t\t'rounded-none': this.rounded === 'none',\n\t\t\t'rounded-t-[8px]': this.rounded === 'top',\n\t\t\t'rounded-l-[8px]': this.rounded === 'left',\n\t\t\t'rounded-r-[8px]': this.rounded === 'right',\n\t\t\t'rounded-b-[8px]': this.rounded === 'bottom',\n\t\t\t'rounded-[8px]': this.rounded === 'all',\n\t\t\t// Apply fill classes based on the `fill` property\n\t\t\t'w-full': this.fill === 'width' || this.fill === 'all',\n\t\t\t'h-full': this.fill === 'height' || this.fill === 'all',\n\t\t\t// Apply shadow classes based on the `elevation` property\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t// Text color based on the surface type (for readability)\n\t\t\t'text-surface-on':\n\t\t\t\tthis.surface === 'surface' ||\n\t\t\t\tthis.surface === 'surfaceDim' ||\n\t\t\t\tthis.surface === 'surfaceBright' ||\n\t\t\t\tthis.surface === 'containerLowest' ||\n\t\t\t\tthis.surface === 'containerLow' ||\n\t\t\t\tthis.surface === 'container' ||\n\t\t\t\tthis.surface === 'containerHigh' ||\n\t\t\t\tthis.surface === 'containerHighest',\n\t\t\t// Background color based on the surface type\n\t\t\t'bg-surface-default': this.surface === 'surface',\n\t\t\t'bg-surface-dim': this.surface === 'surfaceDim',\n\t\t\t'bg-surface-bright': this.surface === 'surfaceBright',\n\t\t\t'bg-surface-lowest': this.surface === 'containerLowest',\n\t\t\t'bg-surface-low': this.surface === 'containerLow',\n\t\t\t'bg-surface-container': this.surface === 'container',\n\t\t\t'bg-surface-high': this.surface === 'containerHigh',\n\t\t\t'bg-surface-highest': this.surface === 'containerHighest',\n\t\t}\n\n\t\t// Render the section element with the dynamically generated classes\n\t\treturn html`\n\t\t\t<section class=${classMap(classes)}>\n\t\t\t\t<slot></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-surface': SchmancySurface\n\t}\n}\n"],"names":["SchmancySurface","TailwindElement","css","super","arguments","this","fill","rounded","surface","elevation","render","classes","relative","block","html","classMap","__decorateClass","property","type","String","reflect","prototype","provide","context","SchmancySurfaceTypeContext","Number","customElement"],"mappings":";;;;;;;;;;AA6Ba,IAAAA,IAAN,cAA8BC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA9C,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SA0BiEC,GAAAA,KAAAC,OAAA,QAYKD,KAAAE,UAAA,QAWnDF,KAAAG,UAAA,WASsCH,KAAAI,YAAA;AAAA,EAAA;AAAA,EASrD,SAAAC;AAET,UAAMC,IAAU,EACfC,UAAAA,IACA,WAAW,IACXC,OAAO,IACP,cAAc,IAEd,gBAAgBR,KAAKE,YAAY,QACjC,mBAAmBF,KAAKE,YAAY,OACpC,mBAAmBF,KAAKE,YAAY,QACpC,mBAAmBF,KAAKE,YAAY,SACpC,mBAAmBF,KAAKE,YAAY,UACpC,iBAAiBF,KAAKE,YAAY,OAElC,UAAUF,KAAKC,SAAS,WAAWD,KAAKC,SAAS,OACjD,UAAUD,KAAKC,SAAS,YAAYD,KAAKC,SAAS,OAElD,aAAaD,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAEhC,mBACCJ,KAAKG,YAAY,aACjBH,KAAKG,YAAY,gBACjBH,KAAKG,YAAY,mBACjBH,KAAKG,YAAY,qBACjBH,KAAKG,YAAY,kBACjBH,KAAKG,YAAY,eACjBH,KAAKG,YAAY,mBACjBH,KAAKG,YAAY,oBAElB,sBAAsBH,KAAKG,YAAY,WACvC,kBAAkBH,KAAKG,YAAY,cACnC,qBAAqBH,KAAKG,YAAY,iBACtC,qBAAqBH,KAAKG,YAAY,mBACtC,kBAAkBH,KAAKG,YAAY,gBACnC,wBAAwBH,KAAKG,YAAY,aACzC,mBAAmBH,KAAKG,YAAY,iBACpC,sBAAsBH,KAAKG,YAAY,mBAAZA;AAIrB,WAAAM;AAAAA,oBACWC,EAASJ,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAAQ;AAtFOK;AAAAA,EAAA,CAA1CC,EAAS,EAAEC,MAAMC,QAAQC,SAAAA,QA1BdpB,EA0B+BqB,WAAA,QAAA,CAY/BL,GAAAA,EAAA,CAAXC,EAtCWjB,CAAAA,GAAAA,EAsCAqB,WAAA,WAAA,CAAA,GAWZL,EAAA,CAFCM,EAAQ,EAAEC,SAASC,EAAAA,CAAAA,GACnBP,MAhDWjB,EAiDZqB,WAAA,WAAA,CAS4BL,GAAAA,EAAA,CAA3BC,EAAS,EAAEC,MAAMO,OA1DNzB,CAAAA,CAAAA,GAAAA,EA0DgBqB,WAAA,aAAA,CAAA,GA1DhBrB,IAANgB,EAAA,CADNU,EAAc,kBAAA,CAAA,GACF1B;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("./provide-DSU87U5x.cjs"),f=require("./tailwind.mixin-B7_ZpVpC.cjs"),u=require("lit"),t=require("lit/decorators.js"),l=require("lit/directives/class-map.js"),d=require("./context-CHWQnKZ-.cjs");var p=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(s,i,a,c)=>{for(var o,e=c>1?void 0:c?g(i,a):i,n=s.length-1;n>=0;n--)(o=s[n])&&(e=(c?o(i,a,e):o(e))||e);return c&&e&&p(i,a,e),e};exports.SchmancySurface=class extends f.TailwindElement(u.css`
|
|
2
|
-
:host([fill='all']) {
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
:host([fill='width']) {
|
|
7
|
-
width: 100%;
|
|
8
|
-
}
|
|
9
|
-
:host([fill='height']) {
|
|
10
|
-
height: 100%;
|
|
11
|
-
}
|
|
12
|
-
:host {
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
`){constructor(){super(...arguments),this.fill="auto",this.rounded="none",this.surface="surface",this.elevation=0}render(){const s={relative:!0,"inset-0":!0,block:!0,"box-border":!0,"rounded-none":this.rounded==="none","rounded-t-[8px]":this.rounded==="top","rounded-l-[8px]":this.rounded==="left","rounded-r-[8px]":this.rounded==="right","rounded-b-[8px]":this.rounded==="bottom","rounded-[8px]":this.rounded==="all","w-full":this.fill==="width"||this.fill==="all","h-full":this.fill==="height"||this.fill==="all","shadow-xs":this.elevation===1,"shadow-sm":this.elevation===2,"shadow-md":this.elevation===3,"shadow-lg":this.elevation===4,"text-surface-on":this.surface==="surface"||this.surface==="surfaceDim"||this.surface==="surfaceBright"||this.surface==="containerLowest"||this.surface==="containerLow"||this.surface==="container"||this.surface==="containerHigh"||this.surface==="containerHighest","bg-surface-default":this.surface==="surface","bg-surface-dim":this.surface==="surfaceDim","bg-surface-bright":this.surface==="surfaceBright","bg-surface-lowest":this.surface==="containerLowest","bg-surface-low":this.surface==="containerLow","bg-surface-container":this.surface==="container","bg-surface-high":this.surface==="containerHigh","bg-surface-highest":this.surface==="containerHighest"};return u.html`
|
|
16
|
-
<section class=${l.classMap(s)}>
|
|
17
|
-
<slot></slot>
|
|
18
|
-
</section>
|
|
19
|
-
`}},r([t.property({type:String,reflect:!0})],exports.SchmancySurface.prototype,"fill",2),r([t.property()],exports.SchmancySurface.prototype,"rounded",2),r([h.e({context:d.SchmancySurfaceTypeContext}),t.property()],exports.SchmancySurface.prototype,"surface",2),r([t.property({type:Number})],exports.SchmancySurface.prototype,"elevation",2),exports.SchmancySurface=r([t.customElement("schmancy-surface")],exports.SchmancySurface);
|
|
20
|
-
//# sourceMappingURL=surface-NWJjaNWQ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"surface-NWJjaNWQ.cjs","sources":["../src/surface/surface.ts"],"sourcesContent":["import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/tailwind.mixin'\nimport { TSurfaceColor } from '@schmancy/types'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js' // Utility for conditionally applying CSS classes\nimport { SchmancySurfaceTypeContext } from './context'\n\n/**\n * Defines the fill options for the surface component.\n */\nexport type SchmancySurfaceFill = 'all' | 'width' | 'height' | 'auto'\n\n/**\n * `<schmancy-surface>` component.\n *\n * This component provides a styled surface that adapts its dimensions based on the\n * provided fill attribute and applies additional styling such as elevation and rounding.\n * It uses a context provider to share the surface type with descendant components.\n *\n * @element schmancy-surface\n * @slot - Default slot for projecting child content.\n *\n * @example\n * <schmancy-surface fill=\"all\" rounded=\"all\" elevation=\"3\" surface=\"surfaceBright\">\n * <p>Your content here</p>\n * </schmancy-surface>\n */\n@customElement('schmancy-surface')\nexport class SchmancySurface extends TailwindElement(css`\n\t:host([fill='all']) {\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\t:host([fill='width']) {\n\t\twidth: 100%;\n\t}\n\t:host([fill='height']) {\n\t\theight: 100%;\n\t}\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t/**\n\t * Specifies how the component should fill the available space.\n\t * Options:\n\t * - `all`: Fill both width and height.\n\t * - `width`: Fill only the width.\n\t * - `height`: Fill only the height.\n\t * - `auto`: No automatic filling.\n\t *\n\t * @attr fill\n\t * @default 'auto'\n\t */\n\t@property({ type: String, reflect: true }) fill: SchmancySurfaceFill = 'auto'\n\n\t/**\n\t * Determines the rounding style for the component's corners.\n\t * Options include:\n\t * - `none`: No rounding.\n\t * - `top`, `left`, `right`, `bottom`: Round only one side.\n\t * - `all`: Round all corners.\n\t *\n\t * @attr rounded\n\t * @default 'none'\n\t */\n\t@property() rounded: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' = 'none'\n\n\t/**\n\t * Provides the surface type to descendant components via context.\n\t * This property also defines the background and text colors.\n\t *\n\t * @attr surface\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancySurfaceTypeContext })\n\t@property()\n\tsurface: TSurfaceColor = 'surface'\n\n\t/**\n\t * Sets the elevation level (shadow depth) of the surface.\n\t * Valid values are 0 to 5.\n\t *\n\t * @attr elevation\n\t * @default 0\n\t */\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\t/**\n\t * Renders the component template.\n\t * The component dynamically applies CSS classes based on property values\n\t * using the `classMap` directive.\n\t *\n\t * @returns The rendered template.\n\t */\n\tprotected render(): unknown {\n\t\t// Map properties to Tailwind CSS classes\n\t\tconst classes = {\n\t\t\trelative: true,\n\t\t\t'inset-0': true,\n\t\t\tblock: true,\n\t\t\t'box-border': true,\n\t\t\t// Apply rounding based on the `rounded` property\n\t\t\t'rounded-none': this.rounded === 'none',\n\t\t\t'rounded-t-[8px]': this.rounded === 'top',\n\t\t\t'rounded-l-[8px]': this.rounded === 'left',\n\t\t\t'rounded-r-[8px]': this.rounded === 'right',\n\t\t\t'rounded-b-[8px]': this.rounded === 'bottom',\n\t\t\t'rounded-[8px]': this.rounded === 'all',\n\t\t\t// Apply fill classes based on the `fill` property\n\t\t\t'w-full': this.fill === 'width' || this.fill === 'all',\n\t\t\t'h-full': this.fill === 'height' || this.fill === 'all',\n\t\t\t// Apply shadow classes based on the `elevation` property\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t// Text color based on the surface type (for readability)\n\t\t\t'text-surface-on':\n\t\t\t\tthis.surface === 'surface' ||\n\t\t\t\tthis.surface === 'surfaceDim' ||\n\t\t\t\tthis.surface === 'surfaceBright' ||\n\t\t\t\tthis.surface === 'containerLowest' ||\n\t\t\t\tthis.surface === 'containerLow' ||\n\t\t\t\tthis.surface === 'container' ||\n\t\t\t\tthis.surface === 'containerHigh' ||\n\t\t\t\tthis.surface === 'containerHighest',\n\t\t\t// Background color based on the surface type\n\t\t\t'bg-surface-default': this.surface === 'surface',\n\t\t\t'bg-surface-dim': this.surface === 'surfaceDim',\n\t\t\t'bg-surface-bright': this.surface === 'surfaceBright',\n\t\t\t'bg-surface-lowest': this.surface === 'containerLowest',\n\t\t\t'bg-surface-low': this.surface === 'containerLow',\n\t\t\t'bg-surface-container': this.surface === 'container',\n\t\t\t'bg-surface-high': this.surface === 'containerHigh',\n\t\t\t'bg-surface-highest': this.surface === 'containerHighest',\n\t\t}\n\n\t\t// Render the section element with the dynamically generated classes\n\t\treturn html`\n\t\t\t<section class=${classMap(classes)}>\n\t\t\t\t<slot></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-surface': SchmancySurface\n\t}\n}\n"],"names":["SchmancySurface","TailwindElement","css","super","arguments","this","fill","rounded","surface","elevation","render","classes","relative","block","html","classMap","__decorateClass","property","type","String","reflect","prototype","provide","context","SchmancySurfaceTypeContext","Number","customElement"],"mappings":"+ZA6BaA,QAAAA,gBAAN,cAA8BC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA9C,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,SA0BiEC,EAAAA,KAAAC,KAAA,OAYKD,KAAAE,QAAA,OAWnDF,KAAAG,QAAA,UASsCH,KAAAI,UAAA,CAAA,CASrD,QAAAC,CAET,MAAMC,EAAU,CACfC,SAAAA,GACA,UAAW,GACXC,MAAO,GACP,aAAc,GAEd,eAAgBR,KAAKE,UAAY,OACjC,kBAAmBF,KAAKE,UAAY,MACpC,kBAAmBF,KAAKE,UAAY,OACpC,kBAAmBF,KAAKE,UAAY,QACpC,kBAAmBF,KAAKE,UAAY,SACpC,gBAAiBF,KAAKE,UAAY,MAElC,SAAUF,KAAKC,OAAS,SAAWD,KAAKC,OAAS,MACjD,SAAUD,KAAKC,OAAS,UAAYD,KAAKC,OAAS,MAElD,YAAaD,KAAKI,YAAc,EAChC,YAAaJ,KAAKI,YAAc,EAChC,YAAaJ,KAAKI,YAAc,EAChC,YAAaJ,KAAKI,YAAc,EAEhC,kBACCJ,KAAKG,UAAY,WACjBH,KAAKG,UAAY,cACjBH,KAAKG,UAAY,iBACjBH,KAAKG,UAAY,mBACjBH,KAAKG,UAAY,gBACjBH,KAAKG,UAAY,aACjBH,KAAKG,UAAY,iBACjBH,KAAKG,UAAY,mBAElB,qBAAsBH,KAAKG,UAAY,UACvC,iBAAkBH,KAAKG,UAAY,aACnC,oBAAqBH,KAAKG,UAAY,gBACtC,oBAAqBH,KAAKG,UAAY,kBACtC,iBAAkBH,KAAKG,UAAY,eACnC,uBAAwBH,KAAKG,UAAY,YACzC,kBAAmBH,KAAKG,UAAY,gBACpC,qBAAsBH,KAAKG,UAAY,kBAIjC,EAAA,OAAAM,EAAAA;AAAAA,oBACWC,EAAAA,SAASJ,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,GAAQ,CAtFOK,EAAAA,EAAA,CAA1CC,EAAAA,SAAS,CAAEC,KAAMC,OAAQC,QAAS,EAAA,CAAA,CAAA,EA1BvBpB,wBA0B+BqB,UAAA,OAAA,GAY/BL,EAAA,CAAXC,EAASA,SAAAA,CAAAA,EAtCEjB,wBAsCAqB,UAAA,UAAA,CAWZL,EAAAA,EAAA,CAFCM,IAAQ,CAAEC,QAASC,EAAAA,0BAAAA,CAAAA,EACnBP,EAASA,SAAAA,CAAAA,EAhDEjB,wBAiDZqB,UAAA,UAAA,CAS4BL,EAAAA,EAAA,CAA3BC,WAAS,CAAEC,KAAMO,MAAAA,CAAAA,CAAAA,EA1DNzB,wBA0DgBqB,UAAA,YAAA,CA1DhBrB,EAAAA,QAANA,gBAAAgB,EAAA,CADNU,EAAAA,cAAc,kBAAA,CAAA,EACF1B"}
|