@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.
Files changed (57) hide show
  1. package/README.md +12 -8
  2. package/package.json +1 -1
  3. package/s/components/button/showcase.ts +1 -1
  4. package/s/components/copy/showcase.ts +1 -1
  5. package/s/components/drawer/showcase.ts +6 -1
  6. package/s/components/drawer/style.css.ts +2 -0
  7. package/s/components/example/component.ts +2 -2
  8. package/s/components/example/showcase.ts +32 -0
  9. package/s/components/tabs/showcase.ts +102 -4
  10. package/s/components/tabs/style.css.ts +7 -4
  11. package/s/demo/views/exhibit/style.css.ts +1 -1
  12. package/s/demo/views/exhibit/view.ts +3 -1
  13. package/s/demo/views/showcase/style.css.ts +3 -0
  14. package/s/demo/views/showcase/view.ts +21 -21
  15. package/s/themes/aura.css.ts +5 -5
  16. package/x/components/button/showcase.js +1 -1
  17. package/x/components/copy/showcase.js +1 -1
  18. package/x/components/drawer/showcase.js +6 -1
  19. package/x/components/drawer/showcase.js.map +1 -1
  20. package/x/components/drawer/style.css.js +2 -0
  21. package/x/components/drawer/style.css.js.map +1 -1
  22. package/x/components/example/component.d.ts +1 -1
  23. package/x/components/example/component.js +2 -2
  24. package/x/components/example/component.js.map +1 -1
  25. package/x/components/example/showcase.d.ts +1 -0
  26. package/x/components/example/showcase.js +30 -0
  27. package/x/components/example/showcase.js.map +1 -0
  28. package/x/components/tabs/showcase.js +102 -4
  29. package/x/components/tabs/showcase.js.map +1 -1
  30. package/x/components/tabs/style.css.js +7 -4
  31. package/x/components/tabs/style.css.js.map +1 -1
  32. package/x/demo/demo.bundle.min.js +157 -78
  33. package/x/demo/demo.bundle.min.js.map +2 -2
  34. package/x/demo/views/exhibit/style.css.js +1 -1
  35. package/x/demo/views/exhibit/view.d.ts +1 -1
  36. package/x/demo/views/exhibit/view.js +3 -1
  37. package/x/demo/views/exhibit/view.js.map +1 -1
  38. package/x/demo/views/showcase/style.css.js +3 -0
  39. package/x/demo/views/showcase/style.css.js.map +1 -1
  40. package/x/demo/views/showcase/view.js +4 -4
  41. package/x/demo/views/showcase/view.js.map +1 -1
  42. package/x/demo/viewsets.d.ts +1 -1
  43. package/x/index.html +2 -2
  44. package/x/install/aura.bundle.min.js +16 -11
  45. package/x/install/aura.bundle.min.js.map +2 -2
  46. package/x/install/plain.bundle.min.js +11 -6
  47. package/x/install/plain.bundle.min.js.map +2 -2
  48. package/x/shiny.d.ts +2 -2
  49. package/x/themes/aura.css.js +5 -5
  50. package/s/demo/views/demonstration/style.css.ts +0 -124
  51. package/s/demo/views/demonstration/view.ts +0 -57
  52. package/x/demo/views/demonstration/style.css.d.ts +0 -2
  53. package/x/demo/views/demonstration/style.css.js +0 -123
  54. package/x/demo/views/demonstration/style.css.js.map +0 -1
  55. package/x/demo/views/demonstration/view.d.ts +0 -12
  56. package/x/demo/views/demonstration/view.js +0 -44
  57. package/x/demo/views/demonstration/view.js.map +0 -1
package/x/shiny.d.ts CHANGED
@@ -19,7 +19,7 @@ export declare function shiny(context: ShinyContext): {
19
19
  } & typeof import("./index.js").ShinyDrawer;
20
20
  ShinyExample: {
21
21
  new (): import("./index.js").ShinyExample;
22
- view: import("@e280/sly").View<[start: number]>;
22
+ view: import("@e280/sly").View<[start?: any]>;
23
23
  } & typeof import("./index.js").ShinyExample;
24
24
  ShinyTabs: {
25
25
  new (): import("./index.js").ShinyTabs;
@@ -38,7 +38,7 @@ export declare function shiny(context: ShinyContext): {
38
38
  side?: "left" | "right";
39
39
  control?: import("./index.js").DrawerControl;
40
40
  }]>;
41
- ShinyExample: import("@e280/sly").View<[start: number]> & import("@e280/sly").View<[context: ShinyContext, start: number]>;
41
+ ShinyExample: import("@e280/sly").View<[start?: any]> & import("@e280/sly").View<[context: ShinyContext, start?: any]>;
42
42
  ShinyTabs: import("@e280/sly").View<[controlOption?: import("./index.js").TabControl | undefined]> & import("@e280/sly").View<[context: ShinyContext, controlOption?: import("./index.js").TabControl | undefined]>;
43
43
  };
44
44
  };
@@ -58,14 +58,14 @@ export const aura = css `@layer overlay {
58
58
 
59
59
  :host([view="shiny-drawer"]:not([plain])) {
60
60
  display: block;
61
+ --slate-bg: linear-gradient(
62
+ to top right,
63
+ color-mix(in oklab, var(--calm), #222 50%),
64
+ color-mix(in oklab, var(--calm), #888 50%)
65
+ );
61
66
 
62
67
  &::part(slate) {
63
68
  padding: 1em;
64
- background: linear-gradient(
65
- to top right,
66
- #00a9dd69,
67
- #70ffd77a
68
- );
69
69
  }
70
70
  }
71
71
 
@@ -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 "../../viewsets.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")
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
-
@@ -1,2 +0,0 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
@@ -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 "../../viewsets.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")
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,mBAAmB,CAAA;AAC3C,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,CAAC;SACb,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"}