@e280/shiny 0.1.0-11 → 0.1.0-13
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 +3 -1
- package/package.json +3 -3
- package/s/components/button/component.ts +3 -3
- package/s/components/button/showcase.ts +119 -0
- package/s/components/button/style.css.ts +0 -1
- package/s/components/copy/component.ts +3 -1
- package/s/components/copy/showcase.ts +51 -0
- package/s/components/drawer/component.ts +30 -32
- package/s/components/drawer/showcase.ts +93 -0
- package/s/components/drawer/style.css.ts +9 -4
- package/s/components/tabs/showcase.ts +166 -0
- package/s/components/tabs/style.css.ts +7 -4
- package/s/demo/demo.bundle.ts +13 -281
- package/s/demo/demo.css +1 -0
- package/s/demo/lipsum.ts +6 -0
- package/s/demo/utils/lipsum.ts +1 -1
- package/s/demo/views/exhibit/style.css.ts +82 -0
- package/s/demo/views/exhibit/view.ts +61 -0
- package/s/demo/views/showcase/style.css.ts +53 -0
- package/s/demo/views/showcase/view.ts +54 -0
- package/s/demo/viewsets.ts +12 -0
- package/s/index.html.ts +4 -7
- package/s/themes/aura.css.ts +4 -4
- package/s/themes/infra/css-vars.ts +7 -2
- package/x/components/button/component.d.ts +2 -1
- package/x/components/button/component.js +2 -2
- package/x/components/button/component.js.map +1 -1
- package/x/components/button/showcase.d.ts +1 -0
- package/x/components/button/showcase.js +116 -0
- package/x/components/button/showcase.js.map +1 -0
- package/x/components/button/style.css.js +0 -1
- package/x/components/button/style.css.js.map +1 -1
- package/x/components/copy/component.d.ts +2 -2
- package/x/components/copy/component.js +3 -1
- package/x/components/copy/component.js.map +1 -1
- package/x/components/copy/showcase.d.ts +1 -0
- package/x/components/copy/showcase.js +48 -0
- package/x/components/copy/showcase.js.map +1 -0
- package/x/components/drawer/component.d.ts +3 -3
- package/x/components/drawer/component.js +28 -31
- package/x/components/drawer/component.js.map +1 -1
- package/x/components/drawer/showcase.d.ts +1 -0
- package/x/components/drawer/showcase.js +87 -0
- package/x/components/drawer/showcase.js.map +1 -0
- package/x/components/drawer/style.css.js +9 -4
- package/x/components/drawer/style.css.js.map +1 -1
- package/x/components/example/component.d.ts +1 -1
- package/x/components/tabs/component.d.ts +1 -1
- package/x/components/tabs/showcase.d.ts +1 -0
- package/x/components/tabs/showcase.js +162 -0
- package/x/components/tabs/showcase.js.map +1 -0
- package/x/components/tabs/style.css.js +7 -4
- package/x/components/tabs/style.css.js.map +1 -1
- package/x/demo/demo.bundle.js +13 -274
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +473 -401
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +1 -0
- package/x/demo/lipsum.d.ts +2 -0
- package/x/demo/lipsum.js +4 -0
- package/x/demo/lipsum.js.map +1 -0
- package/x/demo/utils/lipsum.js +1 -1
- package/x/demo/views/exhibit/style.css.js +81 -0
- package/x/demo/views/exhibit/style.css.js.map +1 -0
- package/x/demo/views/exhibit/view.d.ts +29 -0
- package/x/demo/views/exhibit/view.js +40 -0
- package/x/demo/views/exhibit/view.js.map +1 -0
- package/x/demo/views/showcase/style.css.d.ts +2 -0
- package/x/demo/views/showcase/style.css.js +52 -0
- package/x/demo/views/showcase/style.css.js.map +1 -0
- package/x/demo/views/showcase/view.d.ts +7 -0
- package/x/demo/views/showcase/view.js +40 -0
- package/x/demo/views/showcase/view.js.map +1 -0
- package/x/demo/{aura-views.d.ts → viewsets.d.ts} +5 -3
- package/x/demo/viewsets.js +9 -0
- package/x/demo/viewsets.js.map +1 -0
- package/x/index.html +5 -4
- package/x/index.html.js +4 -7
- package/x/index.html.js.map +1 -1
- package/x/install/aura.bundle.min.js +55 -49
- package/x/install/aura.bundle.min.js.map +3 -3
- package/x/install/plain.bundle.min.js +51 -45
- package/x/install/plain.bundle.min.js.map +3 -3
- package/x/shiny.d.ts +5 -5
- package/x/themes/aura.css.js +4 -4
- package/x/themes/infra/css-vars.d.ts +2 -1
- package/x/themes/infra/css-vars.js +2 -1
- package/x/themes/infra/css-vars.js.map +1 -1
- package/s/demo/aura-views.ts +0 -6
- package/s/demo/views/demonstration/style.css.ts +0 -124
- package/s/demo/views/demonstration/view.ts +0 -57
- package/x/demo/aura-views.js +0 -4
- package/x/demo/aura-views.js.map +0 -1
- package/x/demo/views/demonstration/style.css.js +0 -123
- package/x/demo/views/demonstration/style.css.js.map +0 -1
- package/x/demo/views/demonstration/view.d.ts +0 -12
- package/x/demo/views/demonstration/view.js +0 -44
- package/x/demo/views/demonstration/view.js.map +0 -1
- /package/x/demo/views/{demonstration → exhibit}/style.css.d.ts +0 -0
package/x/shiny.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare function shiny(context: ShinyContext): {
|
|
|
3
3
|
components: {
|
|
4
4
|
ShinyButton: {
|
|
5
5
|
new (): import("./components/button/component.js").ShinyButton;
|
|
6
|
-
view: import("@e280/sly").View<[]>;
|
|
6
|
+
view: import("@e280/sly").View<[content?: import("@e280/sly").Content]>;
|
|
7
7
|
} & typeof import("./components/button/component.js").ShinyButton;
|
|
8
8
|
ShinyCopy: {
|
|
9
9
|
new (): import("./index.js").ShinyCopy;
|
|
@@ -12,7 +12,7 @@ export declare function shiny(context: ShinyContext): {
|
|
|
12
12
|
ShinyDrawer: {
|
|
13
13
|
new (): import("./index.js").ShinyDrawer;
|
|
14
14
|
view: import("@e280/sly").View<[options: {
|
|
15
|
-
button
|
|
15
|
+
button?: boolean;
|
|
16
16
|
side?: "left" | "right";
|
|
17
17
|
control?: import("./index.js").DrawerControl;
|
|
18
18
|
}]>;
|
|
@@ -27,14 +27,14 @@ export declare function shiny(context: ShinyContext): {
|
|
|
27
27
|
} & typeof import("./index.js").ShinyTabs;
|
|
28
28
|
};
|
|
29
29
|
views: {
|
|
30
|
-
ShinyButton: import("@e280/sly").View<[]> & import("@e280/sly").View<[context: ShinyContext]>;
|
|
30
|
+
ShinyButton: import("@e280/sly").View<[content?: import("@e280/sly").Content]> & import("@e280/sly").View<[context: ShinyContext, content?: import("@e280/sly").Content]>;
|
|
31
31
|
ShinyCopy: import("@e280/sly").View<[text: string | undefined, ms?: any]> & import("@e280/sly").View<[context: ShinyContext, text: string | undefined, ms?: any]>;
|
|
32
32
|
ShinyDrawer: import("@e280/sly").View<[options: {
|
|
33
|
-
button
|
|
33
|
+
button?: boolean;
|
|
34
34
|
side?: "left" | "right";
|
|
35
35
|
control?: import("./index.js").DrawerControl;
|
|
36
36
|
}]> & import("@e280/sly").View<[context: ShinyContext, options: {
|
|
37
|
-
button
|
|
37
|
+
button?: boolean;
|
|
38
38
|
side?: "left" | "right";
|
|
39
39
|
control?: import("./index.js").DrawerControl;
|
|
40
40
|
}]>;
|
package/x/themes/aura.css.js
CHANGED
|
@@ -56,10 +56,10 @@ export const aura = css `@layer overlay {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
:host([view="shiny-drawer"]) {
|
|
59
|
+
:host([view="shiny-drawer"]:not([plain])) {
|
|
60
60
|
display: block;
|
|
61
61
|
|
|
62
|
-
&::part(
|
|
62
|
+
&::part(slate) {
|
|
63
63
|
padding: 1em;
|
|
64
64
|
background: linear-gradient(
|
|
65
65
|
to top right,
|
|
@@ -70,13 +70,13 @@ export const aura = css `@layer overlay {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
:host([view="shiny-drawer"]:state(left)) {
|
|
73
|
-
&::part(
|
|
73
|
+
&::part(slate) {
|
|
74
74
|
border-bottom-right-radius: 0.5em;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
:host([view="shiny-drawer"]:state(right)) {
|
|
79
|
-
&::part(
|
|
79
|
+
&::part(slate) {
|
|
80
80
|
border-bottom-left-radius: 0.5em;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -2,13 +2,14 @@ export type CssVars = {
|
|
|
2
2
|
"bg": string;
|
|
3
3
|
"alpha": string;
|
|
4
4
|
"lame": string;
|
|
5
|
-
"inactive-opacity": string;
|
|
6
5
|
"angry": string;
|
|
7
6
|
"zesty": string;
|
|
8
7
|
"happy": string;
|
|
9
8
|
"calm": string;
|
|
10
9
|
"sad": string;
|
|
11
10
|
"quirky": string;
|
|
11
|
+
"inactive-opacity": string;
|
|
12
|
+
"anim-duration": string;
|
|
12
13
|
};
|
|
13
14
|
export declare function defaultCssVars(): CssVars;
|
|
14
15
|
export declare function renderCssVars(vars: CssVars): import("lit").CSSResult;
|
|
@@ -3,7 +3,6 @@ export function defaultCssVars() {
|
|
|
3
3
|
return {
|
|
4
4
|
"bg": "#111",
|
|
5
5
|
"alpha": "#def",
|
|
6
|
-
"inactive-opacity": "0.5",
|
|
7
6
|
"lame": "#8888",
|
|
8
7
|
"angry": "#f50",
|
|
9
8
|
"zesty": "#cf0",
|
|
@@ -11,6 +10,8 @@ export function defaultCssVars() {
|
|
|
11
10
|
"calm": "#0af",
|
|
12
11
|
"sad": "#74f",
|
|
13
12
|
"quirky": "#f49",
|
|
13
|
+
"inactive-opacity": "0.5",
|
|
14
|
+
"anim-duration": "300ms",
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
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;AAmB7B,MAAM,UAAU,cAAc;IAC7B,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QAEf,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;QAEhB,kBAAkB,EAAE,KAAK;QACzB,eAAe,EAAE,OAAO;KACxB,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/s/demo/aura-views.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {css} from "lit"
|
|
3
|
-
export default css`@layer view {
|
|
4
|
-
|
|
5
|
-
:host {
|
|
6
|
-
position: relative;
|
|
7
|
-
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
|
|
11
|
-
padding: 1em;
|
|
12
|
-
border-radius: 0.5em;
|
|
13
|
-
gap: 1em;
|
|
14
|
-
|
|
15
|
-
background: linear-gradient(to right top, #252dd985, #aa6affbd);
|
|
16
|
-
backdrop-filter: blur(0.5em);
|
|
17
|
-
|
|
18
|
-
box-shadow: 0 0 5em #5d1fadaa;
|
|
19
|
-
border-top: 2px solid #fff4;
|
|
20
|
-
|
|
21
|
-
&::before {
|
|
22
|
-
content: "";
|
|
23
|
-
display: block;
|
|
24
|
-
position: absolute;
|
|
25
|
-
inset: 0;
|
|
26
|
-
border-radius: 0.5em;
|
|
27
|
-
background: #0007;
|
|
28
|
-
width: calc(100% - 0.3em);
|
|
29
|
-
height: calc(100% - 0.3em);
|
|
30
|
-
margin: auto;
|
|
31
|
-
z-index: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
> * {
|
|
35
|
-
position: relative;
|
|
36
|
-
z-index: 1;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
p.lipsum {
|
|
41
|
-
opacity: 0.7;
|
|
42
|
-
font-family: serif;
|
|
43
|
-
font-style: italic;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.meta {
|
|
47
|
-
flex: 1 1 10em;
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
gap: 0.5em;
|
|
51
|
-
|
|
52
|
-
h2 {
|
|
53
|
-
color: var(--prime);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
[view="shiny-tabs"] {
|
|
57
|
-
gap: 0.5em;
|
|
58
|
-
&::part(tabs) {
|
|
59
|
-
font-size: 0.8em;
|
|
60
|
-
opacity: 0.8;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.codes {
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
gap: 0.2em;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.codeblock {
|
|
71
|
-
display: flex;
|
|
72
|
-
background: #0002;
|
|
73
|
-
border-radius: 0.3em;
|
|
74
|
-
border-bottom: 1px solid #fff2;
|
|
75
|
-
box-shadow: inset 0.2em 0.3em 2em #0004;
|
|
76
|
-
|
|
77
|
-
.zone {
|
|
78
|
-
flex: 1 1 auto;
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
padding: 0.5em;
|
|
82
|
-
|
|
83
|
-
h3 {
|
|
84
|
-
opacity: 0.4;
|
|
85
|
-
font-size: 0.7em;
|
|
86
|
-
font-weight: normal;
|
|
87
|
-
font-style: italic;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
code {
|
|
91
|
-
display: block;
|
|
92
|
-
white-space: pre;
|
|
93
|
-
text-wrap: wrap;
|
|
94
|
-
tab-size: 2;
|
|
95
|
-
word-break: break-word;
|
|
96
|
-
|
|
97
|
-
font-size: 0.8em;
|
|
98
|
-
font-family: monospace;
|
|
99
|
-
color: #8f8;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[view="shiny-copy"] {
|
|
104
|
-
flex: 0 0 0;
|
|
105
|
-
font-size: 1.5em;
|
|
106
|
-
padding: 0.2em;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.content {
|
|
112
|
-
flex: 1 1 10rem;
|
|
113
|
-
display: flex;
|
|
114
|
-
flex-direction: column;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
align-items: center;
|
|
117
|
-
|
|
118
|
-
padding: 1rem;
|
|
119
|
-
border-radius: 0.5rem;
|
|
120
|
-
border: 1px dashed #fff4;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
}`
|
|
124
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {untab} from "@e280/stz"
|
|
3
|
-
import {Content, view} from "@e280/sly"
|
|
4
|
-
import {CSSResultGroup, html} from "lit"
|
|
5
|
-
import styleCss from "./style.css.js"
|
|
6
|
-
import {auraViews} from "../../aura-views.js"
|
|
7
|
-
import {foundationCss} from "../../../components/foundation.css.js"
|
|
8
|
-
|
|
9
|
-
export const Demonstration = view(use => (options: {
|
|
10
|
-
name: string
|
|
11
|
-
explain: Content
|
|
12
|
-
snippets: [label: {button: string, text: string}, code: string][]
|
|
13
|
-
content: Content
|
|
14
|
-
style: CSSResultGroup
|
|
15
|
-
}) => {
|
|
16
|
-
|
|
17
|
-
use.name(`demo-${options.name}`)
|
|
18
|
-
use.styles(foundationCss, styleCss, options.style)
|
|
19
|
-
|
|
20
|
-
function codeblock(heading: string, code: string) {
|
|
21
|
-
const cleanCode = untab(code).trim()
|
|
22
|
-
return html`
|
|
23
|
-
<div class=codeblock slot=panel>
|
|
24
|
-
<div class=zone>
|
|
25
|
-
<h3>${heading}</h3>
|
|
26
|
-
<code>${cleanCode}</code>
|
|
27
|
-
</div>
|
|
28
|
-
${auraViews.ShinyCopy(cleanCode)}
|
|
29
|
-
</div>
|
|
30
|
-
`
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return html`
|
|
34
|
-
<div class=meta>
|
|
35
|
-
<h2>✨ shiny-${options.name}</h2>
|
|
36
|
-
<div class=explain>${options.explain}</div>
|
|
37
|
-
${auraViews.ShinyTabs
|
|
38
|
-
.props()
|
|
39
|
-
.children(html`
|
|
40
|
-
${options.snippets.map(([label]) => (
|
|
41
|
-
auraViews.ShinyButton
|
|
42
|
-
.props()
|
|
43
|
-
.attr("plain", true)
|
|
44
|
-
.children(label.button)
|
|
45
|
-
.render()
|
|
46
|
-
))}
|
|
47
|
-
${options.snippets.map(([label, code]) => codeblock(label.text, code))}
|
|
48
|
-
`)
|
|
49
|
-
.render()}
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div class=content part=content>
|
|
53
|
-
${options.content}
|
|
54
|
-
</div>
|
|
55
|
-
`
|
|
56
|
-
})
|
|
57
|
-
|
package/x/demo/aura-views.js
DELETED
package/x/demo/aura-views.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aura-views.js","sourceRoot":"","sources":["../../s/demo/aura-views.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAA;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,KAAK,CAAA"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
export default css `@layer view {
|
|
3
|
-
|
|
4
|
-
:host {
|
|
5
|
-
position: relative;
|
|
6
|
-
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-wrap: wrap;
|
|
9
|
-
|
|
10
|
-
padding: 1em;
|
|
11
|
-
border-radius: 0.5em;
|
|
12
|
-
gap: 1em;
|
|
13
|
-
|
|
14
|
-
background: linear-gradient(to right top, #252dd985, #aa6affbd);
|
|
15
|
-
backdrop-filter: blur(0.5em);
|
|
16
|
-
|
|
17
|
-
box-shadow: 0 0 5em #5d1fadaa;
|
|
18
|
-
border-top: 2px solid #fff4;
|
|
19
|
-
|
|
20
|
-
&::before {
|
|
21
|
-
content: "";
|
|
22
|
-
display: block;
|
|
23
|
-
position: absolute;
|
|
24
|
-
inset: 0;
|
|
25
|
-
border-radius: 0.5em;
|
|
26
|
-
background: #0007;
|
|
27
|
-
width: calc(100% - 0.3em);
|
|
28
|
-
height: calc(100% - 0.3em);
|
|
29
|
-
margin: auto;
|
|
30
|
-
z-index: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
> * {
|
|
34
|
-
position: relative;
|
|
35
|
-
z-index: 1;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
p.lipsum {
|
|
40
|
-
opacity: 0.7;
|
|
41
|
-
font-family: serif;
|
|
42
|
-
font-style: italic;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.meta {
|
|
46
|
-
flex: 1 1 10em;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
gap: 0.5em;
|
|
50
|
-
|
|
51
|
-
h2 {
|
|
52
|
-
color: var(--prime);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
[view="shiny-tabs"] {
|
|
56
|
-
gap: 0.5em;
|
|
57
|
-
&::part(tabs) {
|
|
58
|
-
font-size: 0.8em;
|
|
59
|
-
opacity: 0.8;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.codes {
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
gap: 0.2em;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.codeblock {
|
|
70
|
-
display: flex;
|
|
71
|
-
background: #0002;
|
|
72
|
-
border-radius: 0.3em;
|
|
73
|
-
border-bottom: 1px solid #fff2;
|
|
74
|
-
box-shadow: inset 0.2em 0.3em 2em #0004;
|
|
75
|
-
|
|
76
|
-
.zone {
|
|
77
|
-
flex: 1 1 auto;
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
padding: 0.5em;
|
|
81
|
-
|
|
82
|
-
h3 {
|
|
83
|
-
opacity: 0.4;
|
|
84
|
-
font-size: 0.7em;
|
|
85
|
-
font-weight: normal;
|
|
86
|
-
font-style: italic;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
code {
|
|
90
|
-
display: block;
|
|
91
|
-
white-space: pre;
|
|
92
|
-
text-wrap: wrap;
|
|
93
|
-
tab-size: 2;
|
|
94
|
-
word-break: break-word;
|
|
95
|
-
|
|
96
|
-
font-size: 0.8em;
|
|
97
|
-
font-family: monospace;
|
|
98
|
-
color: #8f8;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[view="shiny-copy"] {
|
|
103
|
-
flex: 0 0 0;
|
|
104
|
-
font-size: 1.5em;
|
|
105
|
-
padding: 0.2em;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.content {
|
|
111
|
-
flex: 1 1 10rem;
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-direction: column;
|
|
114
|
-
justify-content: center;
|
|
115
|
-
align-items: center;
|
|
116
|
-
|
|
117
|
-
padding: 1rem;
|
|
118
|
-
border-radius: 0.5rem;
|
|
119
|
-
border: 1px dashed #fff4;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}`;
|
|
123
|
-
//# sourceMappingURL=style.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../../s/demo/views/demonstration/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwHhB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Content } from "@e280/sly";
|
|
2
|
-
import { CSSResultGroup } from "lit";
|
|
3
|
-
export declare const Demonstration: import("@e280/sly").View<[options: {
|
|
4
|
-
name: string;
|
|
5
|
-
explain: Content;
|
|
6
|
-
snippets: [label: {
|
|
7
|
-
button: string;
|
|
8
|
-
text: string;
|
|
9
|
-
}, code: string][];
|
|
10
|
-
content: Content;
|
|
11
|
-
style: CSSResultGroup;
|
|
12
|
-
}]>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { untab } from "@e280/stz";
|
|
2
|
-
import { view } from "@e280/sly";
|
|
3
|
-
import { html } from "lit";
|
|
4
|
-
import styleCss from "./style.css.js";
|
|
5
|
-
import { auraViews } from "../../aura-views.js";
|
|
6
|
-
import { foundationCss } from "../../../components/foundation.css.js";
|
|
7
|
-
export const Demonstration = view(use => (options) => {
|
|
8
|
-
use.name(`demo-${options.name}`);
|
|
9
|
-
use.styles(foundationCss, styleCss, options.style);
|
|
10
|
-
function codeblock(heading, code) {
|
|
11
|
-
const cleanCode = untab(code).trim();
|
|
12
|
-
return html `
|
|
13
|
-
<div class=codeblock slot=panel>
|
|
14
|
-
<div class=zone>
|
|
15
|
-
<h3>${heading}</h3>
|
|
16
|
-
<code>${cleanCode}</code>
|
|
17
|
-
</div>
|
|
18
|
-
${auraViews.ShinyCopy(cleanCode)}
|
|
19
|
-
</div>
|
|
20
|
-
`;
|
|
21
|
-
}
|
|
22
|
-
return html `
|
|
23
|
-
<div class=meta>
|
|
24
|
-
<h2>✨ shiny-${options.name}</h2>
|
|
25
|
-
<div class=explain>${options.explain}</div>
|
|
26
|
-
${auraViews.ShinyTabs
|
|
27
|
-
.props()
|
|
28
|
-
.children(html `
|
|
29
|
-
${options.snippets.map(([label]) => (auraViews.ShinyButton
|
|
30
|
-
.props()
|
|
31
|
-
.attr("plain", true)
|
|
32
|
-
.children(label.button)
|
|
33
|
-
.render()))}
|
|
34
|
-
${options.snippets.map(([label, code]) => codeblock(label.text, code))}
|
|
35
|
-
`)
|
|
36
|
-
.render()}
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div class=content part=content>
|
|
40
|
-
${options.content}
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=view.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../s/demo/views/demonstration/view.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAA;AAC/B,OAAO,EAAU,IAAI,EAAC,MAAM,WAAW,CAAA;AACvC,OAAO,EAAiB,IAAI,EAAC,MAAM,KAAK,CAAA;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAA;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAMxC,EAAE,EAAE;IAEL,GAAG,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;IAChC,GAAG,CAAC,MAAM,CAAC,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IAElD,SAAS,SAAS,CAAC,OAAe,EAAE,IAAY;QAC/C,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QACpC,OAAO,IAAI,CAAA;;;WAGF,OAAO;aACL,SAAS;;MAEhB,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC;;GAEjC,CAAA;IACF,CAAC;IAED,OAAO,IAAI,CAAA;;iBAEK,OAAO,CAAC,IAAI;wBACL,OAAO,CAAC,OAAO;KAClC,SAAS,CAAC,SAAS;SACnB,KAAK,EAAE;SACP,QAAQ,CAAC,IAAI,CAAA;OACX,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CACnC,SAAS,CAAC,WAAW;SACnB,KAAK,EAAE;SACP,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;SACnB,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;SACtB,MAAM,EAAE,CACV,CAAC;OACA,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACtE,CAAC;SACD,MAAM,EAAE;;;;KAIR,OAAO,CAAC,OAAO;;EAElB,CAAA;AACF,CAAC,CAAC,CAAA"}
|
|
File without changes
|