@e280/shiny 0.1.0-10 → 0.1.0-11
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/README.md +10 -7
- package/package.json +1 -1
- package/s/components/button/component.ts +30 -0
- package/s/components/button/style.css.ts +64 -0
- package/s/components/raw-components.ts +2 -0
- package/s/components/tabs/component.ts +13 -2
- package/s/components/tabs/control.ts +3 -3
- package/s/components/tabs/style.css.ts +38 -1
- package/s/demo/demo.bundle.ts +140 -57
- package/s/demo/views/demonstration/style.css.ts +8 -0
- package/s/demo/views/demonstration/view.ts +9 -5
- package/s/themes/aura.css.ts +48 -10
- package/s/themes/infra/css-vars.ts +15 -7
- package/s/themes/plain.css.ts +0 -1
- package/x/components/button/component.d.ts +5 -0
- package/x/components/button/component.js +25 -0
- package/x/components/button/component.js.map +1 -0
- package/x/components/button/style.css.d.ts +2 -0
- package/x/components/button/style.css.js +63 -0
- package/x/components/button/style.css.js.map +1 -0
- package/x/components/raw-components.d.ts +2 -0
- package/x/components/raw-components.js +2 -0
- package/x/components/raw-components.js.map +1 -1
- package/x/components/tabs/component.js +13 -2
- package/x/components/tabs/component.js.map +1 -1
- package/x/components/tabs/control.d.ts +1 -1
- package/x/components/tabs/control.js +3 -3
- package/x/components/tabs/control.js.map +1 -1
- package/x/components/tabs/style.css.js +38 -1
- package/x/components/tabs/style.css.js.map +1 -1
- package/x/demo/aura-views.d.ts +1 -0
- package/x/demo/demo.bundle.js +138 -56
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +292 -111
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/views/demonstration/style.css.js +8 -0
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.js +7 -5
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/index.html +2 -2
- package/x/install/aura.bundle.min.js +184 -42
- package/x/install/aura.bundle.min.js.map +4 -4
- package/x/install/plain.bundle.min.js +137 -34
- package/x/install/plain.bundle.min.js.map +4 -4
- package/x/shiny.d.ts +5 -0
- package/x/themes/aura.css.js +48 -10
- package/x/themes/aura.css.js.map +1 -1
- package/x/themes/infra/css-vars.d.ts +6 -3
- package/x/themes/infra/css-vars.js +7 -4
- package/x/themes/infra/css-vars.js.map +1 -1
- package/x/themes/plain.css.js +0 -1
- package/x/themes/plain.css.js.map +1 -1
package/x/shiny.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ShinyContext } from "./components/framework.js";
|
|
2
2
|
export declare function shiny(context: ShinyContext): {
|
|
3
3
|
components: {
|
|
4
|
+
ShinyButton: {
|
|
5
|
+
new (): import("./components/button/component.js").ShinyButton;
|
|
6
|
+
view: import("@e280/sly").View<[]>;
|
|
7
|
+
} & typeof import("./components/button/component.js").ShinyButton;
|
|
4
8
|
ShinyCopy: {
|
|
5
9
|
new (): import("./index.js").ShinyCopy;
|
|
6
10
|
view: import("@e280/sly").View<[text: string | undefined, ms?: any]>;
|
|
@@ -23,6 +27,7 @@ export declare function shiny(context: ShinyContext): {
|
|
|
23
27
|
} & typeof import("./index.js").ShinyTabs;
|
|
24
28
|
};
|
|
25
29
|
views: {
|
|
30
|
+
ShinyButton: import("@e280/sly").View<[]> & import("@e280/sly").View<[context: ShinyContext]>;
|
|
26
31
|
ShinyCopy: import("@e280/sly").View<[text: string | undefined, ms?: any]> & import("@e280/sly").View<[context: ShinyContext, text: string | undefined, ms?: any]>;
|
|
27
32
|
ShinyDrawer: import("@e280/sly").View<[options: {
|
|
28
33
|
button: boolean;
|
package/x/themes/aura.css.js
CHANGED
|
@@ -3,13 +3,59 @@ import { defaultCssVars, renderCssVars } from "./infra/css-vars.js";
|
|
|
3
3
|
export const aura = css `@layer overlay {
|
|
4
4
|
|
|
5
5
|
:host {
|
|
6
|
-
display: block;
|
|
7
|
-
|
|
8
6
|
${renderCssVars({
|
|
9
7
|
...defaultCssVars(),
|
|
10
8
|
})}
|
|
11
9
|
}
|
|
12
10
|
|
|
11
|
+
:host([view="shiny-button"]:not([plain])) {
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
--buttoncolor: var(--calm);
|
|
15
|
+
--padding: 0.3em 0.7em;
|
|
16
|
+
|
|
17
|
+
color: white;
|
|
18
|
+
border-radius: 2em;
|
|
19
|
+
background: var(--buttoncolor);
|
|
20
|
+
border: none;
|
|
21
|
+
|
|
22
|
+
font-weight: medium;
|
|
23
|
+
text-shadow: 0.1em 0.1em 0.1em #0004;
|
|
24
|
+
box-shadow: 0.1em 0.2em 0.3em #0002;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([view="shiny-button"][lame]) { --buttoncolor: var(--lame); }
|
|
28
|
+
:host([view="shiny-button"][angry]) { --buttoncolor: var(--angry); }
|
|
29
|
+
:host([view="shiny-button"][zesty]) { --buttoncolor: var(--zesty); }
|
|
30
|
+
:host([view="shiny-button"][happy]) { --buttoncolor: var(--happy); }
|
|
31
|
+
:host([view="shiny-button"][calm]) { --buttoncolor: var(--calm); }
|
|
32
|
+
:host([view="shiny-button"][sad]) { --buttoncolor: var(--sad); }
|
|
33
|
+
:host([view="shiny-button"][quirky]) { --buttoncolor: var(--quirky); }
|
|
34
|
+
|
|
35
|
+
:host([view="shiny-button"][gradient]:not([plain])) {
|
|
36
|
+
border: none;
|
|
37
|
+
background: linear-gradient(
|
|
38
|
+
to bottom right,
|
|
39
|
+
color-mix(in oklab, var(--buttoncolor), white 40%),
|
|
40
|
+
color-mix(in oklab, var(--buttoncolor), black 20%)
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
&::before {
|
|
44
|
+
content: "";
|
|
45
|
+
display: block;
|
|
46
|
+
position: absolute;
|
|
47
|
+
z-index: 0;
|
|
48
|
+
inset: 0.15em;
|
|
49
|
+
border-radius: inherit;
|
|
50
|
+
background: color-mix(in oklab, var(--buttoncolor), #0004 50%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
> * {
|
|
54
|
+
position: relative;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
13
59
|
:host([view="shiny-drawer"]) {
|
|
14
60
|
display: block;
|
|
15
61
|
|
|
@@ -35,13 +81,5 @@ export const aura = css `@layer overlay {
|
|
|
35
81
|
}
|
|
36
82
|
}
|
|
37
83
|
|
|
38
|
-
:host([view="shiny-tabs"]) {
|
|
39
|
-
display: block;
|
|
40
|
-
|
|
41
|
-
&::part(tabs) {
|
|
42
|
-
display: flex;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
84
|
}`;
|
|
47
85
|
//# sourceMappingURL=aura.css.js.map
|
package/x/themes/aura.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aura.css.js","sourceRoot":"","sources":["../../s/themes/aura.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"aura.css.js","sourceRoot":"","sources":["../../s/themes/aura.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;;;GAGpB,aAAa,CAAC;IACf,GAAG,cAAc,EAAE;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ED,CAAA"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export type CssVars = {
|
|
2
2
|
"bg": string;
|
|
3
3
|
"alpha": string;
|
|
4
|
-
"happy": string;
|
|
5
|
-
"sad": string;
|
|
6
|
-
"angry": string;
|
|
7
4
|
"lame": string;
|
|
8
5
|
"inactive-opacity": string;
|
|
6
|
+
"angry": string;
|
|
7
|
+
"zesty": string;
|
|
8
|
+
"happy": string;
|
|
9
|
+
"calm": string;
|
|
10
|
+
"sad": string;
|
|
11
|
+
"quirky": string;
|
|
9
12
|
};
|
|
10
13
|
export declare function defaultCssVars(): CssVars;
|
|
11
14
|
export declare function renderCssVars(vars: CssVars): import("lit").CSSResult;
|
|
@@ -2,12 +2,15 @@ import { unsafeCSS } from "lit";
|
|
|
2
2
|
export function defaultCssVars() {
|
|
3
3
|
return {
|
|
4
4
|
"bg": "#111",
|
|
5
|
-
"alpha": "#
|
|
5
|
+
"alpha": "#def",
|
|
6
|
+
"inactive-opacity": "0.5",
|
|
7
|
+
"lame": "#8888",
|
|
8
|
+
"angry": "#f50",
|
|
9
|
+
"zesty": "#cf0",
|
|
6
10
|
"happy": "#0fa",
|
|
11
|
+
"calm": "#0af",
|
|
7
12
|
"sad": "#74f",
|
|
8
|
-
"
|
|
9
|
-
"lame": "#8888",
|
|
10
|
-
"inactive-opacity": "0.5",
|
|
13
|
+
"quirky": "#f49",
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
16
|
export function renderCssVars(vars) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-vars.js","sourceRoot":"","sources":["../../../s/themes/infra/css-vars.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"css-vars.js","sourceRoot":"","sources":["../../../s/themes/infra/css-vars.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAiB7B,MAAM,UAAU,cAAc;IAC7B,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,kBAAkB,EAAE,KAAK;QACzB,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KAChB,CAAA;AACF,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAa;IAC1C,OAAO,SAAS,CACf,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;SAClB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,iBAAiB,GAAG,KAAK,KAAK,IAAI,CAAC;SACjE,IAAI,CAAC,IAAI,CAAC,CACZ,CAAA;AACF,CAAC"}
|
package/x/themes/plain.css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain.css.js","sourceRoot":"","sources":["../../s/themes/plain.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"plain.css.js","sourceRoot":"","sources":["../../s/themes/plain.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACjE,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;GAGrB,aAAa,CAAC,cAAc,EAAE,CAAC;;;EAGhC,CAAA"}
|