@e280/shiny 0.1.0-4 → 0.1.0-5
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 +8 -8
- package/package.json +1 -1
- package/s/components/drawer/component.ts +11 -3
- package/s/components/drawer/style.css.ts +11 -0
- package/s/demo/demo.bundle.ts +13 -7
- package/s/{install.bundle.ts → install/basic.bundle.ts} +2 -2
- package/x/components/drawer/component.d.ts +5 -3
- package/x/components/drawer/component.js +6 -3
- package/x/components/drawer/component.js.map +1 -1
- package/x/components/drawer/style.css.js +11 -0
- package/x/components/drawer/style.css.js.map +1 -1
- package/x/demo/demo.bundle.js +11 -7
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +31 -17
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/index.html +2 -2
- package/x/install/basic.bundle.js +5 -0
- package/x/install/basic.bundle.js.map +1 -0
- package/x/{install.bundle.min.js → install/basic.bundle.min.js} +20 -9
- package/x/{install.bundle.min.js.map → install/basic.bundle.min.js.map} +4 -4
- package/x/shiny.d.ts +8 -6
- package/x/install.bundle.js +0 -5
- package/x/install.bundle.js.map +0 -1
- /package/x/{install.bundle.d.ts → install/basic.bundle.d.ts} +0 -0
package/x/index.html
CHANGED
|
@@ -128,7 +128,7 @@ body > section {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
</style>
|
|
131
|
-
<script type=module src="demo/demo.bundle.min.js?v=
|
|
131
|
+
<script type=module src="demo/demo.bundle.min.js?v=efa1e1272af5"></script>
|
|
132
132
|
<link rel="icon" href="assets/favicon.png?v=0414eeb5fcc2"/>
|
|
133
133
|
|
|
134
134
|
<meta name="theme-color" content="#d068ff">
|
|
@@ -145,7 +145,7 @@ body > section {
|
|
|
145
145
|
|
|
146
146
|
<h1>
|
|
147
147
|
<strong>✨shiny✨</strong>
|
|
148
|
-
<small>v0.1.0-
|
|
148
|
+
<small>v0.1.0-5</small>
|
|
149
149
|
</h1>
|
|
150
150
|
|
|
151
151
|
<section>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic.bundle.js","sourceRoot":"","sources":["../../s/install/basic.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,wBAAwB,CAAA;AAE5C,GAAG,CAAC,QAAQ,CACX,KAAK,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC,UAAU,CAChC,CAAA"}
|
|
@@ -175,6 +175,17 @@ ${q}
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
&[data-side="right"] {
|
|
179
|
+
[part="tray"] {
|
|
180
|
+
right: 0;
|
|
181
|
+
transform: translateX(100%);
|
|
182
|
+
> button {
|
|
183
|
+
left: unset;
|
|
184
|
+
right: 100%;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
178
189
|
slot[name="plate"] {
|
|
179
190
|
display: block;
|
|
180
191
|
width: 100%;
|
|
@@ -192,19 +203,19 @@ ${q}
|
|
|
192
203
|
}
|
|
193
204
|
}
|
|
194
205
|
|
|
195
|
-
`;var Xe=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>`;var Ye=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6l16 0" /><path d="M4 12l16 0" /><path d="M4 18l16 0" /></svg>`;var Wt=class extends v(t=>(e,s
|
|
196
|
-
<div class=shell ?data-open="${
|
|
197
|
-
<slot name=plate ?inert="${
|
|
206
|
+
`;var Xe=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>`;var Ye=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6l16 0" /><path d="M4 12l16 0" /><path d="M4 18l16 0" /></svg>`;var Wt=class extends v(t=>(e,s)=>{t.name("shiny-drawer"),t.styles(e.theme,Fe);let o=s.button,i=s.side??"left",n=t.once(()=>s.drawer??new dt);return t.mount(()=>u.events(window,{keydown:c=>{c.code==="Escape"&&n.close()}})),u.attrs(t.element).booleans.open=n.isOpen,x`
|
|
207
|
+
<div class=shell ?data-open="${n.isOpen}" data-side="${i}">
|
|
208
|
+
<slot name=plate ?inert="${n.isOpen}"></slot>
|
|
198
209
|
|
|
199
210
|
<div class=clipper>
|
|
200
|
-
<div part=blanket @click="${
|
|
211
|
+
<div part=blanket @click="${n.close}" ?inert="${!n.isOpen}"></div>
|
|
201
212
|
|
|
202
213
|
<div part=tray>
|
|
203
|
-
<slot ?inert="${!
|
|
214
|
+
<slot ?inert="${!n.isOpen}"></slot>
|
|
204
215
|
|
|
205
216
|
${o?x`
|
|
206
|
-
<button @click="${
|
|
207
|
-
${
|
|
217
|
+
<button @click="${n.toggle}">
|
|
218
|
+
${n.isOpen?x`
|
|
208
219
|
<slot name=button-x>
|
|
209
220
|
${Xe}
|
|
210
221
|
</slot>
|
|
@@ -218,7 +229,7 @@ ${q}
|
|
|
218
229
|
</div>
|
|
219
230
|
</div>
|
|
220
231
|
</div>
|
|
221
|
-
`}).component(class extends O{attrs=u.attrs(this).spec({open:Boolean,button:Boolean});drawer=new dt(this.attrs.open);get isOpen(){return this.drawer.isOpen}get toggle(){return this.drawer.toggle}get open(){return this.drawer.open}get close(){return this.drawer.close}}).props(t=>[t.context,{drawer:t.drawer,button:t.attrs.button}]){};var Ze=w`
|
|
232
|
+
`}).component(class extends O{attrs=u.attrs(this).spec({open:Boolean,button:Boolean,side:String});drawer=new dt(this.attrs.open);get isOpen(){return this.drawer.isOpen}get toggle(){return this.drawer.toggle}get open(){return this.drawer.open}get close(){return this.drawer.close}}).props(t=>[t.context,{drawer:t.drawer,button:t.attrs.button,side:t.attrs.side==="right"?"right":"left"}]){};var Ze=w`
|
|
222
233
|
|
|
223
234
|
button {
|
|
224
235
|
padding: 1em;
|
|
@@ -264,4 +275,4 @@ lit-html/directive-helpers.js:
|
|
|
264
275
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
265
276
|
*)
|
|
266
277
|
*/
|
|
267
|
-
//# sourceMappingURL=
|
|
278
|
+
//# sourceMappingURL=basic.bundle.min.js.map
|