@e280/shiny 0.1.0-2 → 0.1.0-4
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 +19 -0
- package/package.json +2 -2
- package/s/{ui → components}/copy/style.css.ts +1 -1
- package/s/components/drawer/component.ts +74 -0
- package/s/components/drawer/drawer.ts +31 -0
- package/s/components/drawer/style.css.ts +107 -0
- package/s/{ui → components}/example/component.ts +2 -1
- package/s/{ui → components}/raw-components.ts +2 -0
- package/s/demo/demo.bundle.ts +110 -9
- package/s/demo/utils/lipsum.ts +19 -0
- package/s/demo/views/demonstration/style.css.ts +1 -0
- package/s/demo/views/demonstration/view.ts +5 -6
- package/s/icons/tabler/menu-2.svg.ts +4 -0
- package/s/icons/tabler/x.svg.ts +4 -0
- package/s/index.ts +3 -3
- package/s/shiny.ts +2 -2
- package/s/themes/basic.css.ts +3 -0
- package/x/{ui → components}/copy/component.js +1 -1
- package/x/components/copy/component.js.map +1 -0
- package/x/{ui → components}/copy/style.css.js +1 -1
- package/x/components/copy/style.css.js.map +1 -0
- package/x/components/drawer/component.d.ts +381 -0
- package/x/components/drawer/component.js +66 -0
- package/x/components/drawer/component.js.map +1 -0
- package/x/components/drawer/drawer.d.ts +9 -0
- package/x/components/drawer/drawer.js +24 -0
- package/x/components/drawer/drawer.js.map +1 -0
- package/x/components/drawer/style.css.js +106 -0
- package/x/components/drawer/style.css.js.map +1 -0
- package/x/{ui → components}/example/component.js +2 -1
- package/x/components/example/component.js.map +1 -0
- package/x/components/example/style.css.d.ts +2 -0
- package/x/components/example/style.css.js.map +1 -0
- package/x/components/framework.js.map +1 -0
- package/x/{ui → components}/raw-components.d.ts +2 -0
- package/x/{ui → components}/raw-components.js +2 -0
- package/x/components/raw-components.js.map +1 -0
- package/x/demo/demo.bundle.js +108 -9
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +233 -30
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/utils/lipsum.d.ts +2 -0
- package/x/demo/utils/lipsum.js +11 -0
- package/x/demo/utils/lipsum.js.map +1 -0
- package/x/demo/views/demonstration/style.css.js +1 -0
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.d.ts +3 -2
- package/x/demo/views/demonstration/view.js +2 -3
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/icons/tabler/menu-2.svg.d.ts +2 -0
- package/x/icons/tabler/menu-2.svg.js +3 -0
- package/x/icons/tabler/menu-2.svg.js.map +1 -0
- package/x/icons/tabler/x.svg.d.ts +2 -0
- package/x/icons/tabler/x.svg.js +3 -0
- package/x/icons/tabler/x.svg.js.map +1 -0
- package/x/index.d.ts +3 -3
- package/x/index.html +2 -2
- package/x/index.js +3 -3
- package/x/index.js.map +1 -1
- package/x/install.bundle.min.js +146 -14
- package/x/install.bundle.min.js.map +4 -4
- package/x/shiny.d.ts +20 -3
- package/x/shiny.js +1 -1
- package/x/shiny.js.map +1 -1
- package/x/themes/basic.css.js +3 -0
- package/x/themes/basic.css.js.map +1 -1
- package/x/ui/copy/component.js.map +0 -1
- package/x/ui/copy/style.css.js.map +0 -1
- package/x/ui/example/component.js.map +0 -1
- package/x/ui/example/style.css.js.map +0 -1
- package/x/ui/framework.js.map +0 -1
- package/x/ui/raw-components.js.map +0 -1
- package/s/{ui → components}/copy/component.ts +1 -1
- /package/s/{ui → components}/example/style.css.ts +0 -0
- /package/s/{ui → components}/framework.ts +0 -0
- /package/x/{ui → components}/copy/component.d.ts +0 -0
- /package/x/{ui → components}/copy/style.css.d.ts +0 -0
- /package/x/{ui/example → components/drawer}/style.css.d.ts +0 -0
- /package/x/{ui → components}/example/component.d.ts +0 -0
- /package/x/{ui → components}/example/style.css.js +0 -0
- /package/x/{ui → components}/framework.d.ts +0 -0
- /package/x/{ui → components}/framework.js +0 -0
package/x/demo/demo.bundle.js
CHANGED
|
@@ -3,7 +3,17 @@ import { dom, view } from "@e280/sly";
|
|
|
3
3
|
import { shiny } from "../shiny.js";
|
|
4
4
|
import { basic } from "../themes/basic.css.js";
|
|
5
5
|
import { Demonstration } from "./views/demonstration/view.js";
|
|
6
|
+
import { makeLipsumDispenser } from "./utils/lipsum.js";
|
|
6
7
|
const { views } = shiny({ theme: basic });
|
|
8
|
+
const labels = {
|
|
9
|
+
html: "html web component",
|
|
10
|
+
view: "sly view",
|
|
11
|
+
css: "custom css",
|
|
12
|
+
};
|
|
13
|
+
const lipsum = (() => {
|
|
14
|
+
const dispenser = makeLipsumDispenser();
|
|
15
|
+
return () => dispenser.takeRandom();
|
|
16
|
+
})();
|
|
7
17
|
dom.register({ ShinyDemo: view.component(use => {
|
|
8
18
|
use.styles(css `
|
|
9
19
|
:host {
|
|
@@ -11,10 +21,6 @@ dom.register({ ShinyDemo: view.component(use => {
|
|
|
11
21
|
flex-direction: column;
|
|
12
22
|
gap: 1em;
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
[view="shiny-copy"]::part(content) {
|
|
16
|
-
font-size: 4em;
|
|
17
|
-
}
|
|
18
24
|
`);
|
|
19
25
|
return [
|
|
20
26
|
Demonstration({
|
|
@@ -23,13 +29,106 @@ dom.register({ ShinyDemo: view.component(use => {
|
|
|
23
29
|
explain: html `
|
|
24
30
|
<p>button for click-to-copy text</p>
|
|
25
31
|
`,
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
snippets: [
|
|
33
|
+
[labels.html, `
|
|
34
|
+
<shiny-copy text="hello world"></shiny-copy>
|
|
35
|
+
`],
|
|
36
|
+
[labels.view, `
|
|
37
|
+
ShinyCopy("hello world")
|
|
38
|
+
`],
|
|
39
|
+
[labels.css, `
|
|
40
|
+
shiny-copy {
|
|
41
|
+
font-size: 1em;
|
|
42
|
+
--good: #0f4;
|
|
43
|
+
--bad: #f40;
|
|
44
|
+
--invalid: #8888;
|
|
45
|
+
--inactive-opacity: 0.5;
|
|
46
|
+
}
|
|
47
|
+
`],
|
|
48
|
+
],
|
|
49
|
+
content: views.ShinyCopy("hello world"),
|
|
50
|
+
style: css `
|
|
51
|
+
.content sly-view {
|
|
52
|
+
font-size: 4em;
|
|
53
|
+
}
|
|
54
|
+
`,
|
|
55
|
+
}),
|
|
56
|
+
Demonstration({
|
|
57
|
+
views,
|
|
58
|
+
name: "shiny-drawer",
|
|
59
|
+
explain: html `
|
|
60
|
+
<p>slide-out panel with optional burger button</p>
|
|
28
61
|
`,
|
|
29
|
-
|
|
30
|
-
|
|
62
|
+
snippets: [
|
|
63
|
+
[labels.html, `
|
|
64
|
+
<shiny-drawer button>
|
|
65
|
+
<header>example</header>
|
|
66
|
+
<section slot=plate>lorem kettlebell..</section>
|
|
67
|
+
</shiny-drawer>
|
|
68
|
+
`],
|
|
69
|
+
[labels.view, `
|
|
70
|
+
ShinyDrawer.props().children(html\`
|
|
71
|
+
<header>example</header>
|
|
72
|
+
<section slot=plate>lorem kettlebell..</section>
|
|
73
|
+
\`).render()
|
|
74
|
+
`],
|
|
75
|
+
[labels.css, `
|
|
76
|
+
shiny-drawer {
|
|
77
|
+
--button-size: 2em;
|
|
78
|
+
--drawer-height: auto;
|
|
79
|
+
--anim-duration: 200ms;
|
|
80
|
+
--blanket-bg: #1118;
|
|
81
|
+
--blanket-backdrop-filter: blur(0.5em);
|
|
82
|
+
--inactive-opacity: 0.5;
|
|
83
|
+
}
|
|
84
|
+
`],
|
|
85
|
+
],
|
|
86
|
+
content: views.ShinyDrawer.props()
|
|
87
|
+
.children(html `
|
|
88
|
+
<header>
|
|
89
|
+
<h2>example drawer</h2>
|
|
90
|
+
<p>you can put any content in here.</p>
|
|
91
|
+
<p class=lipsum>${lipsum()}</p>
|
|
92
|
+
</header>
|
|
93
|
+
<section slot=plate>
|
|
94
|
+
<p class=lipsum>${lipsum()}</p>
|
|
95
|
+
</section>
|
|
96
|
+
`)
|
|
97
|
+
.render(),
|
|
98
|
+
style: css `
|
|
99
|
+
.content sly-view {
|
|
100
|
+
border-radius: 0.5em;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
--button-size: 3em;
|
|
103
|
+
|
|
104
|
+
p.lipsum {
|
|
105
|
+
opacity: 0.7;
|
|
106
|
+
font-family: serif;
|
|
107
|
+
font-style: italic;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
header {
|
|
111
|
+
padding: 0.5em;
|
|
112
|
+
border-bottom-right-radius: 0.5em;
|
|
113
|
+
background: linear-gradient(
|
|
114
|
+
to top right,
|
|
115
|
+
#00a9dd69,
|
|
116
|
+
#70ffd77a
|
|
117
|
+
);
|
|
118
|
+
> * + * { margin-top: 0.5em; }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
section {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
min-height: 100%;
|
|
126
|
+
padding: 1em;
|
|
127
|
+
padding-top: 3em;
|
|
128
|
+
> * + * { margin-top: 0.5em; }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
31
131
|
`,
|
|
32
|
-
content: views.ShinyCopy("hello world"),
|
|
33
132
|
}),
|
|
34
133
|
];
|
|
35
134
|
}) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.bundle.js","sourceRoot":"","sources":["../../s/demo/demo.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAA;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"demo.bundle.js","sourceRoot":"","sources":["../../s/demo/demo.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAA;AAC7B,OAA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