@e280/shiny 0.1.0-11 → 0.1.0-12
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 +73 -0
- 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/demonstration/view.ts +2 -2
- package/s/demo/views/exhibit/style.css.ts +82 -0
- package/s/demo/views/exhibit/view.ts +59 -0
- package/s/demo/views/showcase/style.css.ts +50 -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 +69 -0
- package/x/components/tabs/showcase.js.map +1 -0
- package/x/demo/demo.bundle.js +13 -274
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +404 -399
- 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/demonstration/view.js +2 -2
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/demo/views/exhibit/style.css.d.ts +2 -0
- 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 +38 -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 +49 -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 +48 -45
- package/x/install/aura.bundle.min.js.map +3 -3
- package/x/install/plain.bundle.min.js +44 -41
- 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/x/demo/aura-views.js +0 -4
- package/x/demo/aura-views.js.map +0 -1
package/x/demo/demo.bundle.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import { css
|
|
1
|
+
import { css } from "lit";
|
|
2
2
|
import { dom, view } from "@e280/sly";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Demonstration } from "./views/demonstration/view.js";
|
|
9
|
-
const viewsets = [
|
|
10
|
-
{ label: "aura", views: auraViews },
|
|
11
|
-
{ label: "plain", views: shiny({ theme: plain }).views },
|
|
12
|
-
];
|
|
13
|
-
const labels = {
|
|
14
|
-
html: { button: "html", text: "html web component" },
|
|
15
|
-
view: { button: "view", text: "sly view" },
|
|
16
|
-
css: { button: "css", text: "custom css" },
|
|
17
|
-
};
|
|
18
|
-
const dispenser = makeLipsumDispenser();
|
|
19
|
-
const lipsum = () => dispenser.takeFirst();
|
|
3
|
+
import { lipsumDispenser } from "./lipsum.js";
|
|
4
|
+
import { copyShowcase } from "../components/copy/showcase.js";
|
|
5
|
+
import { tabsShowcase } from "../components/tabs/showcase.js";
|
|
6
|
+
import { buttonShowcase } from "../components/button/showcase.js";
|
|
7
|
+
import { drawerShowcase } from "../components/drawer/showcase.js";
|
|
20
8
|
dom.register({ ShinyDemo: view.component(use => {
|
|
21
9
|
use.styles(css `
|
|
22
10
|
:host {
|
|
@@ -42,262 +30,13 @@ dom.register({ ShinyDemo: view.component(use => {
|
|
|
42
30
|
}
|
|
43
31
|
}
|
|
44
32
|
`);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
name: "button",
|
|
52
|
-
explain: html `
|
|
53
|
-
<p>clicky-clacky pressy button.</p>
|
|
54
|
-
`,
|
|
55
|
-
snippets: [
|
|
56
|
-
[labels.html, `
|
|
57
|
-
<shiny-button>hello</shiny-button>
|
|
58
|
-
`],
|
|
59
|
-
[labels.view, `
|
|
60
|
-
ShinyButton
|
|
61
|
-
.props()
|
|
62
|
-
.children("hello")
|
|
63
|
-
.render()
|
|
64
|
-
`],
|
|
65
|
-
[labels.css, `
|
|
66
|
-
shiny-button {
|
|
67
|
-
font-size: 1em;
|
|
68
|
-
--happy: #0fa;
|
|
69
|
-
--angry: #f50;
|
|
70
|
-
--lame: #8888;
|
|
71
|
-
--inactive-opacity: 0.5;
|
|
72
|
-
}
|
|
73
|
-
`],
|
|
74
|
-
],
|
|
75
|
-
content: [
|
|
76
|
-
views.ShinyButton.props()
|
|
77
|
-
.children("button")
|
|
78
|
-
.render(),
|
|
79
|
-
views.ShinyButton.props()
|
|
80
|
-
.attr("gradient", true)
|
|
81
|
-
.children("gradient")
|
|
82
|
-
.render(),
|
|
83
|
-
views.ShinyButton.props()
|
|
84
|
-
.attr("angry", true)
|
|
85
|
-
.attr("gradient", true)
|
|
86
|
-
.children("angry")
|
|
87
|
-
.render(),
|
|
88
|
-
views.ShinyButton.props()
|
|
89
|
-
.attr("happy", true)
|
|
90
|
-
.attr("gradient", true)
|
|
91
|
-
.children("happy")
|
|
92
|
-
.render(),
|
|
93
|
-
views.ShinyButton.props()
|
|
94
|
-
.attr("zesty", true)
|
|
95
|
-
.attr("gradient", true)
|
|
96
|
-
.children("zesty")
|
|
97
|
-
.render(),
|
|
98
|
-
views.ShinyButton.props()
|
|
99
|
-
.attr("sad", true)
|
|
100
|
-
.attr("gradient", true)
|
|
101
|
-
.children("sad")
|
|
102
|
-
.render(),
|
|
103
|
-
views.ShinyButton.props()
|
|
104
|
-
.attr("quirky", true)
|
|
105
|
-
.attr("gradient", true)
|
|
106
|
-
.children("quirky")
|
|
107
|
-
.render(),
|
|
108
|
-
views.ShinyButton.props()
|
|
109
|
-
.attr("plain", true)
|
|
110
|
-
.children("plain")
|
|
111
|
-
.render(),
|
|
112
|
-
],
|
|
113
|
-
style: css `
|
|
114
|
-
.content {
|
|
115
|
-
flex-direction: row;
|
|
116
|
-
flex-wrap: wrap;
|
|
117
|
-
align-content: center;
|
|
118
|
-
gap: 0.5em;
|
|
119
|
-
|
|
120
|
-
sly-view {
|
|
121
|
-
font-size: 1.2em;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`,
|
|
125
|
-
}),
|
|
126
|
-
Demonstration({
|
|
127
|
-
name: "tabs",
|
|
128
|
-
explain: html `
|
|
129
|
-
<p>button bar. panels optional.</p>
|
|
130
|
-
`,
|
|
131
|
-
snippets: [
|
|
132
|
-
[labels.html, `
|
|
133
|
-
<shiny-tabs>
|
|
134
|
-
<shiny-button>tab1</shiny-button>
|
|
135
|
-
<shiny-button>tab2</shiny-button>
|
|
136
|
-
<shiny-button>tab3</shiny-button>
|
|
137
|
-
<div slot=panel>panel1</div>
|
|
138
|
-
<div slot=panel>panel2</div>
|
|
139
|
-
<div slot=panel>panel3</div>
|
|
140
|
-
</shiny-tabs>
|
|
141
|
-
`],
|
|
142
|
-
[labels.view, `
|
|
143
|
-
ShinyTabs
|
|
144
|
-
.props()
|
|
145
|
-
.children(html\`
|
|
146
|
-
\${ShinyButton.props()
|
|
147
|
-
.children("tab1").render()}
|
|
148
|
-
\${ShinyButton.props()
|
|
149
|
-
.children("tab2").render()}
|
|
150
|
-
\${ShinyButton.props()
|
|
151
|
-
.children("tab3").render()}
|
|
152
|
-
<div slot=panel>panel1</div>
|
|
153
|
-
<div slot=panel>panel2</div>
|
|
154
|
-
<div slot=panel>panel3</div>
|
|
155
|
-
\`)
|
|
156
|
-
.render()
|
|
157
|
-
`],
|
|
158
|
-
[labels.css, `
|
|
159
|
-
shiny-tabs {
|
|
160
|
-
&::part(tabs) {}
|
|
161
|
-
&::part(panels) {}
|
|
162
|
-
> shiny-button {}
|
|
163
|
-
}
|
|
164
|
-
`],
|
|
165
|
-
],
|
|
166
|
-
content: views.ShinyTabs
|
|
167
|
-
.props()
|
|
168
|
-
.children(html `
|
|
169
|
-
${views.ShinyButton.props().children("tab1").render()}
|
|
170
|
-
${views.ShinyButton.props().children("tab2").render()}
|
|
171
|
-
${views.ShinyButton.props().children("tab3").render()}
|
|
172
|
-
<p slot=panel class=lipsum>${lipsum()}</p>
|
|
173
|
-
<p slot=panel class=lipsum>${lipsum()}</p>
|
|
174
|
-
<p slot=panel class=lipsum>${lipsum()}</p>
|
|
175
|
-
`)
|
|
176
|
-
.render(),
|
|
177
|
-
style: css `
|
|
178
|
-
.content {
|
|
179
|
-
justify-content: start;
|
|
180
|
-
p { margin-top: 0.5em; }
|
|
181
|
-
}
|
|
182
|
-
`,
|
|
183
|
-
}),
|
|
184
|
-
Demonstration({
|
|
185
|
-
name: "copy",
|
|
186
|
-
explain: html `
|
|
187
|
-
<p>click-to-copy text button.</p>
|
|
188
|
-
`,
|
|
189
|
-
snippets: [
|
|
190
|
-
[labels.html, `
|
|
191
|
-
<shiny-copy text="hello world"></shiny-copy>
|
|
192
|
-
`],
|
|
193
|
-
[labels.view, `
|
|
194
|
-
ShinyCopy("hello world")
|
|
195
|
-
`],
|
|
196
|
-
[labels.css, `
|
|
197
|
-
shiny-copy {
|
|
198
|
-
font-size: 1em;
|
|
199
|
-
--happy: #0fa;
|
|
200
|
-
--angry: #f50;
|
|
201
|
-
--lame: #8888;
|
|
202
|
-
--inactive-opacity: 0.5;
|
|
203
|
-
}
|
|
204
|
-
`],
|
|
205
|
-
],
|
|
206
|
-
content: views.ShinyCopy("hello world"),
|
|
207
|
-
style: css `
|
|
208
|
-
.content sly-view {
|
|
209
|
-
font-size: 4em;
|
|
210
|
-
}
|
|
211
|
-
`,
|
|
212
|
-
}),
|
|
213
|
-
Demonstration({
|
|
214
|
-
name: "drawer",
|
|
215
|
-
explain: html `
|
|
216
|
-
<p>slide-out panel. button optional.</p>
|
|
217
|
-
`,
|
|
218
|
-
snippets: [
|
|
219
|
-
[labels.html, `
|
|
220
|
-
<shiny-drawer button side=left>
|
|
221
|
-
<header>example</header>
|
|
222
|
-
<section slot=plate>
|
|
223
|
-
lorem kettlebell..
|
|
224
|
-
</section>
|
|
225
|
-
</shiny-drawer>
|
|
226
|
-
`],
|
|
227
|
-
[labels.view, `
|
|
228
|
-
ShinyDrawer
|
|
229
|
-
.props({button: true, side: "left"})
|
|
230
|
-
.children(html\`
|
|
231
|
-
<header>example</header>
|
|
232
|
-
<section slot=plate>
|
|
233
|
-
lorem kettlebell..
|
|
234
|
-
</section>
|
|
235
|
-
\`)
|
|
236
|
-
.render()
|
|
237
|
-
`],
|
|
238
|
-
[labels.css, `
|
|
239
|
-
shiny-drawer {
|
|
240
|
-
--button-size: 2em;
|
|
241
|
-
--anim-duration: 200ms;
|
|
242
|
-
--blanket-backdrop-filter: blur(0.5em);
|
|
243
|
-
--blanket-bg: color-mix(
|
|
244
|
-
in oklab,
|
|
245
|
-
transparent,
|
|
246
|
-
var(--bg)
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
`],
|
|
250
|
-
],
|
|
251
|
-
content: views.ShinyDrawer
|
|
252
|
-
.props({ button: true })
|
|
253
|
-
.children(html `
|
|
254
|
-
<header>
|
|
255
|
-
<h2>example drawer</h2>
|
|
256
|
-
<p>you can put any content in here.</p>
|
|
257
|
-
<p class=lipsum>${lipsum()}</p>
|
|
258
|
-
</header>
|
|
259
|
-
<section slot=plate>
|
|
260
|
-
<p class=lipsum>${lipsum()}</p>
|
|
261
|
-
<p class=lipsum>${lipsum()}</p>
|
|
262
|
-
</section>
|
|
263
|
-
`)
|
|
264
|
-
.render(),
|
|
265
|
-
style: css `
|
|
266
|
-
.content sly-view {
|
|
267
|
-
border-radius: 0.5em;
|
|
268
|
-
overflow: hidden;
|
|
269
|
-
--button-size: 3em;
|
|
270
|
-
|
|
271
|
-
header {
|
|
272
|
-
> * + * { margin-top: 0.5em; }
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
section {
|
|
276
|
-
display: flex;
|
|
277
|
-
flex-direction: column;
|
|
278
|
-
justify-content: center;
|
|
279
|
-
min-height: 100%;
|
|
280
|
-
padding: 1em;
|
|
281
|
-
padding-top: 3em;
|
|
282
|
-
> * + * { margin-top: 0.5em; }
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
`,
|
|
286
|
-
}),
|
|
33
|
+
lipsumDispenser.takeAll();
|
|
34
|
+
return [
|
|
35
|
+
buttonShowcase(),
|
|
36
|
+
copyShowcase(),
|
|
37
|
+
drawerShowcase(),
|
|
38
|
+
tabsShowcase(),
|
|
287
39
|
];
|
|
288
|
-
return html `
|
|
289
|
-
<div class=themes>
|
|
290
|
-
<span>theme</span>
|
|
291
|
-
${auraViews.ShinyTabs
|
|
292
|
-
.props(tabControl)
|
|
293
|
-
.children(viewsets.map(viewset => html `
|
|
294
|
-
${auraViews.ShinyButton.props().children(viewset.label).render()}
|
|
295
|
-
`))
|
|
296
|
-
.render()}
|
|
297
|
-
</div>
|
|
298
|
-
|
|
299
|
-
${demonstrations}
|
|
300
|
-
`;
|
|
301
40
|
}) });
|
|
302
|
-
console.log("✨shiny");
|
|
41
|
+
console.log("✨shiny✨");
|
|
303
42
|
//# sourceMappingURL=demo.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.bundle.js","sourceRoot":"","sources":["../../s/demo/demo.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"demo.bundle.js","sourceRoot":"","sources":["../../s/demo/demo.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAA;AAE/D,GAAG,CAAC,QAAQ,CAAC,EAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QAC7C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBb,CAAC,CAAA;QAEF,eAAe,CAAC,OAAO,EAAE,CAAA;QAEzB,OAAO;YACN,cAAc,EAAE;YAChB,YAAY,EAAE;YACd,cAAc,EAAE;YAChB,YAAY,EAAE;SACd,CAAA;IACF,CAAC,CAAC,EAAC,CAAC,CAAA;AAEJ,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA"}
|