@styleon/foundation 0.0.0-next.1 → 0.0.0-next.3

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.
@@ -1,6 +1,18 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
- export declare class FlashButton extends LitElement {
2
+ export declare class StyleonButton extends LitElement {
3
3
  static styles: import('lit').CSSResult;
4
- variant: 'primary' | 'secondary';
4
+ static shadowRootOptions: {
5
+ delegatesFocus: boolean;
6
+ mode: ShadowRootMode;
7
+ serializable?: boolean;
8
+ slotAssignment?: SlotAssignmentMode;
9
+ };
10
+ variant: 'primary' | 'secondary' | 'tertiary';
11
+ /**
12
+ * @type {'normal' | 'mini'}
13
+ * @default 'normal'
14
+ */
15
+ scale: 'normal' | 'mini';
16
+ href: string;
5
17
  render(): TemplateResult;
6
18
  }
@@ -1,32 +1,40 @@
1
1
  import "../node_modules/@lit/reactive-element/reactive-element.js";
2
- import { html as i } from "../node_modules/lit-html/lit-html.js";
3
- import { LitElement as l } from "../node_modules/lit-element/lit-element.js";
2
+ import { html as f } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as m } from "../node_modules/lit-element/lit-element.js";
4
4
  import u from "./button.scss.js";
5
- import { customElement as f } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
6
- import { property as v } from "../node_modules/@lit/reactive-element/decorators/property.js";
7
- import { unsafeCSS as c, css as b } from "../node_modules/@lit/reactive-element/css-tag.js";
8
- var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, m = (p, r, s, e) => {
9
- for (var t = e > 1 ? void 0 : e ? _(r, s) : r, a = p.length - 1, n; a >= 0; a--)
10
- (n = p[a]) && (t = (e ? n(r, s, t) : n(t)) || t);
11
- return e && t && y(r, s, t), t;
5
+ import { customElement as h } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
6
+ import { property as i } from "../node_modules/@lit/reactive-element/decorators/property.js";
7
+ import { unsafeCSS as c, css as y } from "../node_modules/@lit/reactive-element/css-tag.js";
8
+ var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, s = (l, e, p, o) => {
9
+ for (var t = o > 1 ? void 0 : o ? b(e, p) : e, a = l.length - 1, n; a >= 0; a--)
10
+ (n = l[a]) && (t = (o ? n(e, p, t) : n(t)) || t);
11
+ return o && t && v(e, p, t), t;
12
12
  };
13
- let o = class extends l {
13
+ let r = class extends m {
14
14
  constructor() {
15
- super(...arguments), this.variant = "primary";
15
+ super(...arguments), this.variant = "primary", this.scale = "normal", this.href = "";
16
16
  }
17
17
  render() {
18
- return i`<button>
19
- <slot></slot>
20
- </button>`;
18
+ return this.href ? f`<a href=${this.href}><slot></slot></a>` : f`<button><slot></slot></button>`;
21
19
  }
22
20
  };
23
- o.styles = b`${c(u)}`;
24
- m([
25
- v({ type: String, reflect: !0, attribute: "variant" })
26
- ], o.prototype, "variant", 2);
27
- o = m([
28
- f("flash-button")
29
- ], o);
21
+ r.styles = y`${c(u)}`;
22
+ r.shadowRootOptions = {
23
+ ...m.shadowRootOptions,
24
+ delegatesFocus: !0
25
+ };
26
+ s([
27
+ i({ type: String, reflect: !0, attribute: "variant" })
28
+ ], r.prototype, "variant", 2);
29
+ s([
30
+ i({ reflect: !0 })
31
+ ], r.prototype, "scale", 2);
32
+ s([
33
+ i({ type: String, reflect: !0 })
34
+ ], r.prototype, "href", 2);
35
+ r = s([
36
+ h("styleon-button")
37
+ ], r);
30
38
  export {
31
- o as FlashButton
39
+ r as StyleonButton
32
40
  };