@e280/shiny 0.1.0-12 → 0.1.0-14
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 +12 -8
- package/package.json +1 -1
- package/s/components/button/showcase.ts +1 -1
- package/s/components/copy/showcase.ts +1 -1
- package/s/components/drawer/showcase.ts +6 -1
- package/s/components/drawer/style.css.ts +2 -0
- package/s/components/example/component.ts +2 -2
- package/s/components/example/showcase.ts +32 -0
- package/s/components/tabs/showcase.ts +102 -4
- package/s/components/tabs/style.css.ts +7 -4
- package/s/demo/views/exhibit/style.css.ts +1 -1
- package/s/demo/views/exhibit/view.ts +3 -1
- package/s/demo/views/showcase/style.css.ts +3 -0
- package/s/demo/views/showcase/view.ts +21 -21
- package/s/themes/aura.css.ts +5 -5
- package/x/components/button/showcase.js +1 -1
- package/x/components/copy/showcase.js +1 -1
- package/x/components/drawer/showcase.js +6 -1
- package/x/components/drawer/showcase.js.map +1 -1
- package/x/components/drawer/style.css.js +2 -0
- package/x/components/drawer/style.css.js.map +1 -1
- package/x/components/example/component.d.ts +1 -1
- package/x/components/example/component.js +2 -2
- package/x/components/example/component.js.map +1 -1
- package/x/components/example/showcase.d.ts +1 -0
- package/x/components/example/showcase.js +30 -0
- package/x/components/example/showcase.js.map +1 -0
- package/x/components/tabs/showcase.js +102 -4
- package/x/components/tabs/showcase.js.map +1 -1
- package/x/components/tabs/style.css.js +7 -4
- package/x/components/tabs/style.css.js.map +1 -1
- package/x/demo/demo.bundle.min.js +157 -78
- package/x/demo/demo.bundle.min.js.map +2 -2
- package/x/demo/views/exhibit/style.css.js +1 -1
- package/x/demo/views/exhibit/view.d.ts +1 -1
- package/x/demo/views/exhibit/view.js +3 -1
- package/x/demo/views/exhibit/view.js.map +1 -1
- package/x/demo/views/showcase/style.css.js +3 -0
- package/x/demo/views/showcase/style.css.js.map +1 -1
- package/x/demo/views/showcase/view.js +4 -4
- package/x/demo/views/showcase/view.js.map +1 -1
- package/x/demo/viewsets.d.ts +1 -1
- package/x/index.html +2 -2
- package/x/install/aura.bundle.min.js +16 -11
- package/x/install/aura.bundle.min.js.map +2 -2
- package/x/install/plain.bundle.min.js +11 -6
- package/x/install/plain.bundle.min.js.map +2 -2
- package/x/shiny.d.ts +2 -2
- package/x/themes/aura.css.js +5 -5
- package/s/demo/views/demonstration/style.css.ts +0 -124
- package/s/demo/views/demonstration/view.ts +0 -57
- package/x/demo/views/demonstration/style.css.d.ts +0 -2
- 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/README.md
CHANGED
|
@@ -45,29 +45,33 @@
|
|
|
45
45
|
```ts
|
|
46
46
|
const {components, views} = shiny({theme: themes.aura})
|
|
47
47
|
```
|
|
48
|
-
- `aura` — (default) cosmic dreamy seaside nebula vibes
|
|
49
|
-
- `plain` — bare-bones spartan theme, buttons look lame
|
|
50
48
|
- (optional) register the components
|
|
51
49
|
```ts
|
|
52
50
|
dom.register(components)
|
|
53
51
|
```
|
|
54
52
|
- or use views instead of components
|
|
55
|
-
-
|
|
53
|
+
- go shopping at https://shiny.e280.org/
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
<br/><br/>
|
|
58
|
+
|
|
59
|
+
## 🎨 themes
|
|
60
|
+
|
|
61
|
+
- **`aura`** — cosmic dreamy seaside nebula vibes
|
|
62
|
+
- `plain` — bare-bones spartan theme, for diy, buttons look lame
|
|
56
63
|
|
|
57
64
|
|
|
58
65
|
|
|
59
66
|
<br/><br/>
|
|
60
67
|
|
|
61
68
|
## 😎 views are for the cool kids
|
|
62
|
-
- hey, remember those `views` you got from the install snippet?
|
|
63
|
-
```ts
|
|
64
|
-
const {components, views} = shiny({theme: themes.aura})
|
|
65
|
-
```
|
|
69
|
+
- hey, remember those `views` you got from the web app install snippet?
|
|
66
70
|
- well you can yoink out a view you wanna use
|
|
67
71
|
```ts
|
|
68
72
|
const {ShinyCopy} = views
|
|
69
73
|
```
|
|
70
|
-
- then you can
|
|
74
|
+
- then you can use 'em directly in your lit templates
|
|
71
75
|
```ts
|
|
72
76
|
import {html} from "lit"
|
|
73
77
|
import {dom, view} from "@e280/sly"
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ const lip2 = lipsum()
|
|
|
9
9
|
const lip3 = lipsum()
|
|
10
10
|
|
|
11
11
|
const cssSnippet = `
|
|
12
|
-
shiny-drawer {
|
|
12
|
+
[view="shiny-drawer"] {
|
|
13
13
|
--button-size: 2em;
|
|
14
14
|
--anim-duration: 200ms;
|
|
15
15
|
--slate-hidden-opacity: 1;
|
|
@@ -19,6 +19,11 @@ const cssSnippet = `
|
|
|
19
19
|
transparent,
|
|
20
20
|
var(--bg)
|
|
21
21
|
);
|
|
22
|
+
--slate-bg: linear-gradient(
|
|
23
|
+
to top right,
|
|
24
|
+
color-mix(in oklab, var(--calm), #222 50%),
|
|
25
|
+
color-mix(in oklab, var(--calm), #888 50%)
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
`
|
|
24
29
|
|
|
@@ -6,6 +6,7 @@ export default css`@layer view {
|
|
|
6
6
|
display: block;
|
|
7
7
|
width: 100%;
|
|
8
8
|
height: 100%;
|
|
9
|
+
--slate-bg: transparent;
|
|
9
10
|
--button-size: 2em;
|
|
10
11
|
--blanket-backdrop-filter: blur(0.5em);
|
|
11
12
|
--slate-hidden-opacity: 1;
|
|
@@ -64,6 +65,7 @@ export default css`@layer view {
|
|
|
64
65
|
display: block;
|
|
65
66
|
height: 100%;
|
|
66
67
|
overflow-y: auto;
|
|
68
|
+
background: var(--slate-bg);
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
> button {
|
|
@@ -6,7 +6,7 @@ import {foundationCss} from "../foundation.css.js"
|
|
|
6
6
|
import {ShinyContext, ShinyElement} from "../framework.js"
|
|
7
7
|
|
|
8
8
|
export class ShinyExample extends (
|
|
9
|
-
view(use => (context: ShinyContext, start
|
|
9
|
+
view(use => (context: ShinyContext, start = 1) => {
|
|
10
10
|
use.name("shiny-example")
|
|
11
11
|
use.styles(foundationCss, context.theme, styleCss)
|
|
12
12
|
|
|
@@ -22,6 +22,6 @@ export class ShinyExample extends (
|
|
|
22
22
|
.component(class extends ShinyElement {
|
|
23
23
|
attrs = dom.attrs(this).spec({start: Number})
|
|
24
24
|
})
|
|
25
|
-
.props(el => [el.context, el.attrs.start
|
|
25
|
+
.props(el => [el.context, el.attrs.start] as const)
|
|
26
26
|
) {}
|
|
27
27
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
import {css, html} from "lit"
|
|
3
|
+
import {Showcase} from "../../demo/views/showcase/view.js"
|
|
4
|
+
|
|
5
|
+
export const drawerShowcase = () => Showcase({
|
|
6
|
+
name: "drawer",
|
|
7
|
+
style: css`
|
|
8
|
+
.box {}
|
|
9
|
+
`,
|
|
10
|
+
exhibits: [
|
|
11
|
+
{
|
|
12
|
+
label: "example",
|
|
13
|
+
explain: html`<p>example component.</p>`,
|
|
14
|
+
snippets: [
|
|
15
|
+
{label: "html", code: `
|
|
16
|
+
<shiny-example></shiny-example>
|
|
17
|
+
`},
|
|
18
|
+
{label: "view", code: `
|
|
19
|
+
ShinyExample()
|
|
20
|
+
`},
|
|
21
|
+
{label: "css", code: `
|
|
22
|
+
[view="shiny-example"] {}
|
|
23
|
+
`},
|
|
24
|
+
],
|
|
25
|
+
style: css``,
|
|
26
|
+
presentation: views => html`
|
|
27
|
+
${views.ShinyExample()}
|
|
28
|
+
`,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
})
|
|
32
|
+
|
|
@@ -8,10 +8,15 @@ const lip2 = lipsum()
|
|
|
8
8
|
const lip3 = lipsum()
|
|
9
9
|
|
|
10
10
|
const cssSnippet = `
|
|
11
|
-
shiny-tabs {
|
|
11
|
+
[view="shiny-tabs"] {
|
|
12
12
|
&::part(tabs) {}
|
|
13
13
|
&::part(panels) {}
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
/* buttons */
|
|
16
|
+
> :not([slot="panel"]) {}
|
|
17
|
+
|
|
18
|
+
/* panels */
|
|
19
|
+
> [slot="panel"] {}
|
|
15
20
|
}
|
|
16
21
|
`
|
|
17
22
|
|
|
@@ -21,15 +26,16 @@ export const tabsShowcase = () => Showcase({
|
|
|
21
26
|
.box {
|
|
22
27
|
place-content: start start;
|
|
23
28
|
p { margin-top: 0.5em; }
|
|
29
|
+
button { padding: 1em; }
|
|
24
30
|
}
|
|
25
31
|
`,
|
|
26
32
|
exhibits: [
|
|
27
33
|
{
|
|
28
|
-
label: "
|
|
34
|
+
label: "shiny snug",
|
|
29
35
|
explain: html`<p>button bar. panels optional.</p>`,
|
|
30
36
|
snippets: [
|
|
31
37
|
{label: "html", code: `
|
|
32
|
-
<shiny-tabs>
|
|
38
|
+
<shiny-tabs snug>
|
|
33
39
|
<shiny-button>tab1</shiny-button>
|
|
34
40
|
<shiny-button>tab2</shiny-button>
|
|
35
41
|
<shiny-button>tab3</shiny-button>
|
|
@@ -41,6 +47,7 @@ export const tabsShowcase = () => Showcase({
|
|
|
41
47
|
{label: "view", code: `
|
|
42
48
|
ShinyTabs
|
|
43
49
|
.props()
|
|
50
|
+
.attr("snug")
|
|
44
51
|
.children(html\`
|
|
45
52
|
\${ShinyButton.props().children("tab1").render()}
|
|
46
53
|
\${ShinyButton.props().children("tab2").render()}
|
|
@@ -57,6 +64,7 @@ export const tabsShowcase = () => Showcase({
|
|
|
57
64
|
presentation: views => html`
|
|
58
65
|
${views.ShinyTabs
|
|
59
66
|
.props()
|
|
67
|
+
.attr("snug")
|
|
60
68
|
.children(html`
|
|
61
69
|
${views.ShinyButton.props().children("tab1").render()}
|
|
62
70
|
${views.ShinyButton.props().children("tab2").render()}
|
|
@@ -68,6 +76,96 @@ export const tabsShowcase = () => Showcase({
|
|
|
68
76
|
.render()}
|
|
69
77
|
`,
|
|
70
78
|
},
|
|
79
|
+
{
|
|
80
|
+
label: "regular",
|
|
81
|
+
explain: html`<p>button bar. panels optional.</p>`,
|
|
82
|
+
snippets: [
|
|
83
|
+
{label: "html", code: `
|
|
84
|
+
<shiny-tabs>
|
|
85
|
+
<button>tab1</button>
|
|
86
|
+
<button>tab2</button>
|
|
87
|
+
<button>tab3</button>
|
|
88
|
+
<div slot=panel>panel1</div>
|
|
89
|
+
<div slot=panel>panel2</div>
|
|
90
|
+
<div slot=panel>panel3</div>
|
|
91
|
+
</shiny-tabs>
|
|
92
|
+
`},
|
|
93
|
+
{label: "view", code: `
|
|
94
|
+
ShinyTabs
|
|
95
|
+
.props()
|
|
96
|
+
.children(html\`
|
|
97
|
+
<button>tab1</button>
|
|
98
|
+
<button>tab2</button>
|
|
99
|
+
<button>tab3</button>
|
|
100
|
+
<div slot=panel>panel1</div>
|
|
101
|
+
<div slot=panel>panel2</div>
|
|
102
|
+
<div slot=panel>panel3</div>
|
|
103
|
+
\`)
|
|
104
|
+
.render()
|
|
105
|
+
`},
|
|
106
|
+
{label: "css", code: cssSnippet},
|
|
107
|
+
],
|
|
108
|
+
style: css``,
|
|
109
|
+
presentation: views => html`
|
|
110
|
+
${views.ShinyTabs
|
|
111
|
+
.props()
|
|
112
|
+
.children(html`
|
|
113
|
+
<button>tab1</button>
|
|
114
|
+
<button>tab2</button>
|
|
115
|
+
<button>tab3</button>
|
|
116
|
+
<p slot=panel class=lipsum>${lip1}</p>
|
|
117
|
+
<p slot=panel class=lipsum>${lip2}</p>
|
|
118
|
+
<p slot=panel class=lipsum>${lip3}</p>
|
|
119
|
+
`)
|
|
120
|
+
.render()}
|
|
121
|
+
`,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "regular snug",
|
|
125
|
+
explain: html`<p>button bar. panels optional.</p>`,
|
|
126
|
+
snippets: [
|
|
127
|
+
{label: "html", code: `
|
|
128
|
+
<shiny-tabs snug>
|
|
129
|
+
<button>tab1</button>
|
|
130
|
+
<button>tab2</button>
|
|
131
|
+
<button>tab3</button>
|
|
132
|
+
<div slot=panel>panel1</div>
|
|
133
|
+
<div slot=panel>panel2</div>
|
|
134
|
+
<div slot=panel>panel3</div>
|
|
135
|
+
</shiny-tabs>
|
|
136
|
+
`},
|
|
137
|
+
{label: "view", code: `
|
|
138
|
+
ShinyTabs
|
|
139
|
+
.props()
|
|
140
|
+
.attr("snug")
|
|
141
|
+
.children(html\`
|
|
142
|
+
<button>tab1</button>
|
|
143
|
+
<button>tab2</button>
|
|
144
|
+
<button>tab3</button>
|
|
145
|
+
<div slot=panel>panel1</div>
|
|
146
|
+
<div slot=panel>panel2</div>
|
|
147
|
+
<div slot=panel>panel3</div>
|
|
148
|
+
\`)
|
|
149
|
+
.render()
|
|
150
|
+
`},
|
|
151
|
+
{label: "css", code: cssSnippet},
|
|
152
|
+
],
|
|
153
|
+
style: css``,
|
|
154
|
+
presentation: views => html`
|
|
155
|
+
${views.ShinyTabs
|
|
156
|
+
.props()
|
|
157
|
+
.attr("snug")
|
|
158
|
+
.children(html`
|
|
159
|
+
<button>tab1</button>
|
|
160
|
+
<button>tab2</button>
|
|
161
|
+
<button>tab3</button>
|
|
162
|
+
<p slot=panel class=lipsum>${lip1}</p>
|
|
163
|
+
<p slot=panel class=lipsum>${lip2}</p>
|
|
164
|
+
<p slot=panel class=lipsum>${lip3}</p>
|
|
165
|
+
`)
|
|
166
|
+
.render()}
|
|
167
|
+
`,
|
|
168
|
+
},
|
|
71
169
|
],
|
|
72
170
|
})
|
|
73
171
|
|
|
@@ -9,16 +9,19 @@ export default css`@layer view {
|
|
|
9
9
|
|
|
10
10
|
slot[part="tabs"] {
|
|
11
11
|
display: flex;
|
|
12
|
-
|
|
13
|
-
&::slotted(*) {
|
|
14
|
-
border-radius: 0.3em;
|
|
15
|
-
}
|
|
12
|
+
flex-wrap: wrap;
|
|
16
13
|
|
|
17
14
|
&::slotted([data-active]) {
|
|
18
15
|
opacity: 1;
|
|
19
16
|
color: currentColor;
|
|
20
17
|
text-decoration: underline;
|
|
21
18
|
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([snug]) slot[part="tabs"] {
|
|
22
|
+
&::slotted(*) {
|
|
23
|
+
border-radius: 0.3em;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
&::slotted(:not([data-last], [data-next-is-active])) {
|
|
24
27
|
border-right: none;
|
|
@@ -36,7 +36,9 @@ export const Exhibit = view(use => (
|
|
|
36
36
|
|
|
37
37
|
<div class=snippet>
|
|
38
38
|
<header>
|
|
39
|
-
${auraViews.ShinyTabs
|
|
39
|
+
${auraViews.ShinyTabs
|
|
40
|
+
.props(snippetControl)
|
|
41
|
+
.attr("snug")
|
|
40
42
|
.children(exhibit.snippets.map(s =>
|
|
41
43
|
auraViews.ShinyButton
|
|
42
44
|
.props()
|
|
@@ -25,27 +25,27 @@ export const Showcase = view(use => (options: {
|
|
|
25
25
|
return html`
|
|
26
26
|
<header>
|
|
27
27
|
<h2>✨shiny-${options.name}✨</h2>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
28
|
+
${auraViews.ShinyTabs
|
|
29
|
+
.props(exhibitTabControl)
|
|
30
|
+
.attr("snug")
|
|
31
|
+
.children(options.exhibits.map(p =>
|
|
32
|
+
auraViews.ShinyButton
|
|
33
|
+
.props()
|
|
34
|
+
.attr("sad")
|
|
35
|
+
.children(p.label)
|
|
36
|
+
.render()
|
|
37
|
+
))
|
|
38
|
+
.render()}
|
|
39
|
+
${auraViews.ShinyTabs
|
|
40
|
+
.props(themeTabControl)
|
|
41
|
+
.attr("snug")
|
|
42
|
+
.children(viewsets.map(([theme]) =>
|
|
43
|
+
auraViews.ShinyButton
|
|
44
|
+
.props()
|
|
45
|
+
.children(theme)
|
|
46
|
+
.render()
|
|
47
|
+
))
|
|
48
|
+
.render()}
|
|
49
49
|
</header>
|
|
50
50
|
|
|
51
51
|
${Exhibit(exhibit, exhibitViews, options.style)}
|
package/s/themes/aura.css.ts
CHANGED
|
@@ -59,14 +59,14 @@ export const aura = css`@layer overlay {
|
|
|
59
59
|
|
|
60
60
|
:host([view="shiny-drawer"]:not([plain])) {
|
|
61
61
|
display: block;
|
|
62
|
+
--slate-bg: linear-gradient(
|
|
63
|
+
to top right,
|
|
64
|
+
color-mix(in oklab, var(--calm), #222 50%),
|
|
65
|
+
color-mix(in oklab, var(--calm), #888 50%)
|
|
66
|
+
);
|
|
62
67
|
|
|
63
68
|
&::part(slate) {
|
|
64
69
|
padding: 1em;
|
|
65
|
-
background: linear-gradient(
|
|
66
|
-
to top right,
|
|
67
|
-
#00a9dd69,
|
|
68
|
-
#70ffd77a
|
|
69
|
-
);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -5,7 +5,7 @@ const lip1 = lipsum();
|
|
|
5
5
|
const lip2 = lipsum();
|
|
6
6
|
const lip3 = lipsum();
|
|
7
7
|
const cssSnippet = `
|
|
8
|
-
shiny-drawer {
|
|
8
|
+
[view="shiny-drawer"] {
|
|
9
9
|
--button-size: 2em;
|
|
10
10
|
--anim-duration: 200ms;
|
|
11
11
|
--slate-hidden-opacity: 1;
|
|
@@ -15,6 +15,11 @@ const cssSnippet = `
|
|
|
15
15
|
transparent,
|
|
16
16
|
var(--bg)
|
|
17
17
|
);
|
|
18
|
+
--slate-bg: linear-gradient(
|
|
19
|
+
to top right,
|
|
20
|
+
color-mix(in oklab, var(--calm), #222 50%),
|
|
21
|
+
color-mix(in oklab, var(--calm), #888 50%)
|
|
22
|
+
);
|
|
18
23
|
}
|
|
19
24
|
`;
|
|
20
25
|
const makeExhibit = (side) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../../../s/components/drawer/showcase.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAA;AAG1D,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AACrB,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AACrB,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AAErB,MAAM,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../../../s/components/drawer/showcase.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAA;AAG1D,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AACrB,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AACrB,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;AAErB,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;CAiBlB,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,IAAsB,EAAiB,EAAE,CAAC,CAAC;IAC/D,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI,CAAA,0CAA0C;IACvD,QAAQ,EAAE;QACT,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;+BACO,IAAI;;;;GAIhC,EAAC;QACF,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;;mCAEW,IAAI;;;;;;GAMpC,EAAC;QACF,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAC;KAChC;IACD,KAAK,EAAE,GAAG,CAAA,EAAE;IACZ,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAA;IACxB,KAAK,CAAC,WAAW;SACjB,KAAK,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;SAC3B,QAAQ,CAAC,IAAI,CAAA;;;;uBAIM,IAAI;;;uBAGJ,IAAI;uBACJ,IAAI;;IAEvB,CAAC;SACD,MAAM,EAAE;EACV;CACD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC5C,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;EAoBT;IACD,QAAQ,EAAE;QACT,WAAW,CAAC,MAAM,CAAC;QACnB,WAAW,CAAC,OAAO,CAAC;KACpB;CACD,CAAC,CAAA"}
|
|
@@ -5,6 +5,7 @@ export default css `@layer view {
|
|
|
5
5
|
display: block;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
+
--slate-bg: transparent;
|
|
8
9
|
--button-size: 2em;
|
|
9
10
|
--blanket-backdrop-filter: blur(0.5em);
|
|
10
11
|
--slate-hidden-opacity: 1;
|
|
@@ -63,6 +64,7 @@ export default css `@layer view {
|
|
|
63
64
|
display: block;
|
|
64
65
|
height: 100%;
|
|
65
66
|
overflow-y: auto;
|
|
67
|
+
background: var(--slate-bg);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
> button {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/components/drawer/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/components/drawer/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2HhB,CAAA"}
|
|
@@ -365,7 +365,7 @@ declare const ShinyExample_base: import("@e280/sly").ComponentClass<{
|
|
|
365
365
|
focus(options?: FocusOptions): void;
|
|
366
366
|
};
|
|
367
367
|
styles: import("lit").CSSResultGroup | undefined;
|
|
368
|
-
}, [context: ShinyContext, start
|
|
368
|
+
}, [context: ShinyContext, start?: any]>;
|
|
369
369
|
export declare class ShinyExample extends ShinyExample_base {
|
|
370
370
|
}
|
|
371
371
|
export {};
|
|
@@ -3,7 +3,7 @@ import { dom, view } from "@e280/sly";
|
|
|
3
3
|
import styleCss from "./style.css.js";
|
|
4
4
|
import { foundationCss } from "../foundation.css.js";
|
|
5
5
|
import { ShinyElement } from "../framework.js";
|
|
6
|
-
export class ShinyExample extends (view(use => (context, start) => {
|
|
6
|
+
export class ShinyExample extends (view(use => (context, start = 1) => {
|
|
7
7
|
use.name("shiny-example");
|
|
8
8
|
use.styles(foundationCss, context.theme, styleCss);
|
|
9
9
|
const $count = use.signal(start);
|
|
@@ -17,6 +17,6 @@ export class ShinyExample extends (view(use => (context, start) => {
|
|
|
17
17
|
.component(class extends ShinyElement {
|
|
18
18
|
attrs = dom.attrs(this).spec({ start: Number });
|
|
19
19
|
})
|
|
20
|
-
.props(el => [el.context, el.attrs.start
|
|
20
|
+
.props(el => [el.context, el.attrs.start])) {
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/components/example/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAe,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAE1D,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/components/example/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAe,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAE1D,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAqB,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE;IAChD,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IACzB,GAAG,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAElD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,SAAS,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA,CAAC,CAAC,CAAA;IAE1C,OAAO,IAAI,CAAA;qBACQ,SAAS;MACxB,MAAM,EAAE;;GAEX,CAAA;AACF,CAAC,CAAC;KACD,SAAS,CAAC,KAAM,SAAQ,YAAY;IACpC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC,CAAA;CAC7C,CAAC;KACD,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAU,CAAC,CACnD;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const drawerShowcase: () => import("lit-html/directive.js").DirectiveResult<import("lit-html/directive.js").DirectiveClass>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { css, html } from "lit";
|
|
2
|
+
import { Showcase } from "../../demo/views/showcase/view.js";
|
|
3
|
+
export const drawerShowcase = () => Showcase({
|
|
4
|
+
name: "drawer",
|
|
5
|
+
style: css `
|
|
6
|
+
.box {}
|
|
7
|
+
`,
|
|
8
|
+
exhibits: [
|
|
9
|
+
{
|
|
10
|
+
label: "example",
|
|
11
|
+
explain: html `<p>example component.</p>`,
|
|
12
|
+
snippets: [
|
|
13
|
+
{ label: "html", code: `
|
|
14
|
+
<shiny-example></shiny-example>
|
|
15
|
+
` },
|
|
16
|
+
{ label: "view", code: `
|
|
17
|
+
ShinyExample()
|
|
18
|
+
` },
|
|
19
|
+
{ label: "css", code: `
|
|
20
|
+
[view="shiny-example"] {}
|
|
21
|
+
` },
|
|
22
|
+
],
|
|
23
|
+
style: css ``,
|
|
24
|
+
presentation: views => html `
|
|
25
|
+
${views.ShinyExample()}
|
|
26
|
+
`,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=showcase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../../../s/components/example/showcase.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAA;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC5C,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,GAAG,CAAA;;EAET;IACD,QAAQ,EAAE;QACT;YACC,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,IAAI,CAAA,2BAA2B;YACxC,QAAQ,EAAE;gBACT,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;;KAErB,EAAC;gBACF,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;;KAErB,EAAC;gBACF,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;;KAEpB,EAAC;aACF;YACD,KAAK,EAAE,GAAG,CAAA,EAAE;YACZ,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAA;MACxB,KAAK,CAAC,YAAY,EAAE;IACtB;SACD;KACD;CACD,CAAC,CAAA"}
|