tinkiet 0.7.2 → 0.7.6

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 (126) hide show
  1. package/package.json +1 -1
  2. package/umd/tinkiet.min.d.ts.map +1 -1
  3. package/umd/tinkiet.min.js +1 -1
  4. package/tinkiet/accordion/accordion.d.ts +0 -18
  5. package/tinkiet/accordion/accordion.js +0 -94
  6. package/tinkiet/accordion/accordion.scss.js +0 -4
  7. package/tinkiet/accordion/index.d.ts +0 -1
  8. package/tinkiet/accordion/index.js +0 -1
  9. package/tinkiet/badge/badge.d.ts +0 -15
  10. package/tinkiet/badge/badge.js +0 -27
  11. package/tinkiet/badge/badge.scss.js +0 -4
  12. package/tinkiet/badge/index.d.ts +0 -1
  13. package/tinkiet/badge/index.js +0 -1
  14. package/tinkiet/box/box.d.ts +0 -56
  15. package/tinkiet/box/box.js +0 -182
  16. package/tinkiet/box/box.scss.js +0 -4
  17. package/tinkiet/box/focusable-box.d.ts +0 -13
  18. package/tinkiet/box/focusable-box.js +0 -30
  19. package/tinkiet/box/index.d.ts +0 -1
  20. package/tinkiet/box/index.js +0 -1
  21. package/tinkiet/button/button.d.ts +0 -39
  22. package/tinkiet/button/button.js +0 -125
  23. package/tinkiet/button/button.scss.js +0 -4
  24. package/tinkiet/button/index.d.ts +0 -1
  25. package/tinkiet/button/index.js +0 -1
  26. package/tinkiet/checkbox/checkbox.d.ts +0 -21
  27. package/tinkiet/checkbox/checkbox.js +0 -83
  28. package/tinkiet/checkbox/checkbox.scss.js +0 -4
  29. package/tinkiet/checkbox/index.d.ts +0 -1
  30. package/tinkiet/checkbox/index.js +0 -1
  31. package/tinkiet/dialog/dialog.d.ts +0 -18
  32. package/tinkiet/dialog/dialog.js +0 -58
  33. package/tinkiet/dialog/dialog.scss.js +0 -4
  34. package/tinkiet/dialog/index.d.ts +0 -1
  35. package/tinkiet/dialog/index.js +0 -1
  36. package/tinkiet/drawer/drawer.d.ts +0 -29
  37. package/tinkiet/drawer/drawer.js +0 -152
  38. package/tinkiet/drawer/drawer.scss.js +0 -4
  39. package/tinkiet/drawer/index.d.ts +0 -1
  40. package/tinkiet/drawer/index.js +0 -1
  41. package/tinkiet/form/form.d.ts +0 -15
  42. package/tinkiet/form/form.js +0 -57
  43. package/tinkiet/form/index.d.ts +0 -1
  44. package/tinkiet/form/index.js +0 -1
  45. package/tinkiet/icon/icon.d.ts +0 -17
  46. package/tinkiet/icon/icon.js +0 -75
  47. package/tinkiet/icon/icon.scss.js +0 -4
  48. package/tinkiet/icon/icons.d.ts +0 -7
  49. package/tinkiet/icon/icons.js +0 -24
  50. package/tinkiet/icon/index.d.ts +0 -2
  51. package/tinkiet/icon/index.js +0 -2
  52. package/tinkiet/index.d.ts +0 -24
  53. package/tinkiet/index.d.ts.map +0 -1
  54. package/tinkiet/index.js +0 -47
  55. package/tinkiet/list-item/index.d.ts +0 -1
  56. package/tinkiet/list-item/index.js +0 -1
  57. package/tinkiet/list-item/list-item.d.ts +0 -20
  58. package/tinkiet/list-item/list-item.js +0 -72
  59. package/tinkiet/list-item/list-item.scss.js +0 -4
  60. package/tinkiet/loading/index.d.ts +0 -1
  61. package/tinkiet/loading/index.js +0 -1
  62. package/tinkiet/loading/loading.d.ts +0 -14
  63. package/tinkiet/loading/loading.js +0 -64
  64. package/tinkiet/loading/loading.scss.js +0 -4
  65. package/tinkiet/navbar/index.d.ts +0 -1
  66. package/tinkiet/navbar/index.js +0 -1
  67. package/tinkiet/navbar/navbar.d.ts +0 -11
  68. package/tinkiet/navbar/navbar.js +0 -33
  69. package/tinkiet/navbar/navbar.scss.js +0 -4
  70. package/tinkiet/notie/index.d.ts +0 -1
  71. package/tinkiet/notie/index.js +0 -1
  72. package/tinkiet/notie/notie.d.ts +0 -69
  73. package/tinkiet/notie/notie.js +0 -193
  74. package/tinkiet/notie/notie.scss.js +0 -4
  75. package/tinkiet/pages/index.d.ts +0 -1
  76. package/tinkiet/pages/index.js +0 -1
  77. package/tinkiet/pages/pages.d.ts +0 -18
  78. package/tinkiet/pages/pages.js +0 -75
  79. package/tinkiet/pages/pages.scss.js +0 -4
  80. package/tinkiet/radio/index.d.ts +0 -1
  81. package/tinkiet/radio/index.js +0 -1
  82. package/tinkiet/radio/radio.d.ts +0 -24
  83. package/tinkiet/radio/radio.js +0 -98
  84. package/tinkiet/radio/radio.scss.js +0 -4
  85. package/tinkiet/select/index.d.ts +0 -1
  86. package/tinkiet/select/index.js +0 -1
  87. package/tinkiet/select/select.d.ts +0 -32
  88. package/tinkiet/select/select.js +0 -132
  89. package/tinkiet/select/select.scss.js +0 -4
  90. package/tinkiet/slider/index.d.ts +0 -1
  91. package/tinkiet/slider/index.js +0 -1
  92. package/tinkiet/slider/slider.d.ts +0 -30
  93. package/tinkiet/slider/slider.js +0 -135
  94. package/tinkiet/slider/slider.scss.js +0 -4
  95. package/tinkiet/switch/index.d.ts +0 -1
  96. package/tinkiet/switch/index.js +0 -1
  97. package/tinkiet/switch/switch.d.ts +0 -24
  98. package/tinkiet/switch/switch.js +0 -99
  99. package/tinkiet/switch/switch.scss.js +0 -4
  100. package/tinkiet/tab-group/index.d.ts +0 -1
  101. package/tinkiet/tab-group/index.js +0 -1
  102. package/tinkiet/tab-group/tab-group.d.ts +0 -21
  103. package/tinkiet/tab-group/tab-group.js +0 -97
  104. package/tinkiet/tab-group/tab-group.scss.js +0 -4
  105. package/tinkiet/tag/index.d.ts +0 -1
  106. package/tinkiet/tag/index.js +0 -1
  107. package/tinkiet/tag/tag.d.ts +0 -11
  108. package/tinkiet/tag/tag.js +0 -20
  109. package/tinkiet/tag/tag.scss.js +0 -4
  110. package/tinkiet/textarea/index.d.ts +0 -1
  111. package/tinkiet/textarea/index.js +0 -1
  112. package/tinkiet/textarea/textarea.d.ts +0 -33
  113. package/tinkiet/textarea/textarea.js +0 -133
  114. package/tinkiet/textarea/textarea.scss.js +0 -4
  115. package/tinkiet/textfield/index.d.ts +0 -1
  116. package/tinkiet/textfield/index.js +0 -1
  117. package/tinkiet/textfield/textfield.d.ts +0 -34
  118. package/tinkiet/textfield/textfield.js +0 -136
  119. package/tinkiet/textfield/textfield.scss.js +0 -4
  120. package/tinkiet/theme/index.d.ts +0 -1
  121. package/tinkiet/theme/index.js +0 -1
  122. package/tinkiet/theme/theme.d.ts +0 -33
  123. package/tinkiet/theme/theme.js +0 -187
  124. package/tinkiet/theme/theme.scss.js +0 -4
  125. package/tinkiet/utils/unique.d.ts +0 -7
  126. package/tinkiet/utils/unique.js +0 -12
@@ -1,18 +0,0 @@
1
- import { TkFocusableBox } from "../box/focusable-box";
2
- declare class TkAccordion extends TkFocusableBox {
3
- static get styles(): import("lit").CSSResult[];
4
- name: string;
5
- checked: boolean;
6
- rippleHeader: boolean;
7
- protected $input: HTMLInputElement;
8
- render(): import("lit-html").TemplateResult<1>;
9
- firstUpdated(): void;
10
- protected onKeyDown(e: KeyboardEvent): void;
11
- protected handleClick(): void;
12
- }
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- "tk-accordion": TkAccordion;
16
- }
17
- }
18
- export { TkAccordion };
@@ -1,94 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { css, unsafeCSS, html } from 'lit';
3
- import { property, query, customElement } from 'lit/decorators.js';
4
- import { ifDefined } from 'lit/directives/if-defined.js';
5
- import '../box/index.js';
6
- import { TkFocusableBox } from '../box/focusable-box.js';
7
- import css_248z from './accordion.scss.js';
8
- import { TkBox } from '../box/box.js';
9
-
10
- let TkAccordion = class TkAccordion extends TkFocusableBox {
11
- constructor() {
12
- super(...arguments);
13
- this.checked = false;
14
- this.rippleHeader = false;
15
- }
16
- static get styles() {
17
- return [
18
- ...TkBox.styles,
19
- css `
20
- ${unsafeCSS(css_248z)}
21
- `
22
- ];
23
- }
24
- render() {
25
- return html `
26
- <tk-box margin="small">
27
- <tk-box
28
- @click=${this.handleClick.bind(this)}
29
- ?ripple=${this.rippleHeader}
30
- class="header"
31
- direction="row"
32
- align-items="center"
33
- >
34
- <tk-box class="before">
35
- <slot name="before"></slot>
36
- </tk-box>
37
- <tk-box class="header-content">
38
- <h3 class="title"><slot name="title"></slot></h3>
39
- <h5><slot name="description"></slot></h5>
40
- </tk-box>
41
- </tk-box>
42
- <tk-box class="content">
43
- <slot></slot>
44
- </tk-box>
45
- </tk-box>
46
- <input
47
- id=${this.id}
48
- slot="none"
49
- style="display: none;"
50
- type="radio"
51
- ?checked="${this.checked}"
52
- ?disabled="${this.disabled}"
53
- name="${ifDefined(this.name)}"
54
- aria-hidden="true"
55
- tabindex="-1"
56
- />
57
- `;
58
- }
59
- firstUpdated() {
60
- this.appendChild(this.$input);
61
- }
62
- onKeyDown(e) {
63
- if (e.code === "Space" || e.code === "Enter") {
64
- e.preventDefault();
65
- e.stopPropagation();
66
- this.click();
67
- }
68
- }
69
- handleClick() {
70
- this.checked = !this.checked;
71
- if (this.checked && this.name)
72
- this.getRootNode()
73
- .querySelectorAll(`tk-accordion[name="${this.name}"]`)
74
- .forEach(el => (el != this ? (el.checked = false) : null));
75
- this.dispatchEvent(new Event("change"));
76
- }
77
- };
78
- __decorate([
79
- property({ attribute: true, type: String })
80
- ], TkAccordion.prototype, "name", void 0);
81
- __decorate([
82
- property({ attribute: true, type: Boolean, reflect: true })
83
- ], TkAccordion.prototype, "checked", void 0);
84
- __decorate([
85
- property({ attribute: "ripple-header", type: Boolean })
86
- ], TkAccordion.prototype, "rippleHeader", void 0);
87
- __decorate([
88
- query("input")
89
- ], TkAccordion.prototype, "$input", void 0);
90
- TkAccordion = __decorate([
91
- customElement("tk-accordion")
92
- ], TkAccordion);
93
-
94
- export { TkAccordion };
@@ -1,4 +0,0 @@
1
- var css_248z = "@charset \"UTF-8\";*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host .header{border:1px solid var(--shade-lighter);border-radius:10px;color:var(--primary);cursor:pointer;padding:.6em}:host .header>*{margin:0 10px}:host .header:after{content:\"▼\";display:inline-block;font-size:12px;transition:transform .3s}:host .header .before{width:fit-content}:host .header .header-content{flex:1}:host .content{height:0;margin:0 auto;opacity:0;transition:all .2s;visibility:hidden;width:95%}:host h3,:host h5{margin:0}:host([checked]) .header{background-color:var(--primary);color:var(--on-primary)}:host([checked]) .header:after{transform:rotate(180deg)}:host([checked]) .content{height:auto;opacity:1;transition:all .3s,opacity .7s;visibility:visible}:host([pill]) .header{border-radius:9999px}";
2
- var stylesheet="@charset \"UTF-8\";*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host .header{border:1px solid var(--shade-lighter);border-radius:10px;color:var(--primary);cursor:pointer;padding:.6em}:host .header>*{margin:0 10px}:host .header:after{content:\"▼\";display:inline-block;font-size:12px;transition:transform .3s}:host .header .before{width:fit-content}:host .header .header-content{flex:1}:host .content{height:0;margin:0 auto;opacity:0;transition:all .2s;visibility:hidden;width:95%}:host h3,:host h5{margin:0}:host([checked]) .header{background-color:var(--primary);color:var(--on-primary)}:host([checked]) .header:after{transform:rotate(180deg)}:host([checked]) .content{height:auto;opacity:1;transition:all .3s,opacity .7s;visibility:visible}:host([pill]) .header{border-radius:9999px}";
3
-
4
- export { css_248z as default, stylesheet };
@@ -1 +0,0 @@
1
- export * from "./accordion";
@@ -1 +0,0 @@
1
- export { TkAccordion } from './accordion.js';
@@ -1,15 +0,0 @@
1
- import { TkBox } from "../box/index";
2
- /**
3
- * A badge WebComponent
4
- * @cssprop --tk-badge-color - Color of widget default to --primary
5
- * @cssprop --tk-badge-text-color - Text color of widget to --on-primary
6
- */
7
- declare class TkBadge extends TkBox {
8
- static get styles(): import("lit").CSSResult[];
9
- }
10
- declare global {
11
- interface HTMLElementTagNameMap {
12
- "tk-badge": TkBadge;
13
- }
14
- }
15
- export { TkBadge };
@@ -1,27 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { css, unsafeCSS } from 'lit';
3
- import { customElement } from 'lit/decorators.js';
4
- import '../box/index.js';
5
- import css_248z from './badge.scss.js';
6
- import { TkBox } from '../box/box.js';
7
-
8
- /**
9
- * A badge WebComponent
10
- * @cssprop --tk-badge-color - Color of widget default to --primary
11
- * @cssprop --tk-badge-text-color - Text color of widget to --on-primary
12
- */
13
- let TkBadge = class TkBadge extends TkBox {
14
- static get styles() {
15
- return [
16
- ...TkBox.styles,
17
- css `
18
- ${unsafeCSS(css_248z)}
19
- `
20
- ];
21
- }
22
- };
23
- TkBadge = __decorate([
24
- customElement("tk-badge")
25
- ], TkBadge);
26
-
27
- export { TkBadge };
@@ -1,4 +0,0 @@
1
- var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--tk-badge-color,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))));--text:var(--tk-badge-text-color,var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%))));align-items:center;background-color:var(--color);border-radius:9999px;color:var(--text);cursor:inherit;display:inline-flex;height:1.375em;justify-content:center;padding:0 .5em;user-select:none;white-space:nowrap}:host([accent]){--color:var(--accent,hsl(var(--accent-h,8.76404),var(--accent-s,64.0288%),var(--accent-l,72.7451%)));--text:var(--on-accent,hsl(var(--on-accent-h,0),var(--on-accent-s,0%),var(--on-accent-l,100%)))}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--tk-badge-color,var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%))));--text:var(--tk-badge-text-color,var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%))));align-items:center;background-color:var(--color);border-radius:9999px;color:var(--text);cursor:inherit;display:inline-flex;height:1.375em;justify-content:center;padding:0 .5em;user-select:none;white-space:nowrap}:host([accent]){--color:var(--accent,hsl(var(--accent-h,8.76404),var(--accent-s,64.0288%),var(--accent-l,72.7451%)));--text:var(--on-accent,hsl(var(--on-accent-h,0),var(--on-accent-s,0%),var(--on-accent-l,100%)))}";
3
-
4
- export { css_248z as default, stylesheet };
@@ -1 +0,0 @@
1
- export * from "./badge";
@@ -1 +0,0 @@
1
- export { TkBadge } from './badge.js';
@@ -1,56 +0,0 @@
1
- import { LitElement } from "lit";
2
- declare const colors: readonly ["primary-lighter", "primary-light", "primary", "primary-dark", "primary-darker", "on-primary-lighter", "on-primary-light", "on-primary", "on-primary-dark", "on-primary-darker", "accent-lighter", "accent-light", "accent", "accent-dark", "accent-darker", "on-accent-lighter", "on-accent-light", "on-accent", "on-accent-dark", "on-accent-darker", "error-lighter", "error-light", "error", "error-dark", "error-darker", "on-error-lighter", "on-error-light", "on-error", "on-error-dark", "on-error-darker", "shade-lighter", "shade-light", "shade", "shade-dark", "shade-darker", "on-shade-lighter", "on-shade-light", "on-shade", "on-shade-dark", "on-shade-darker"];
3
- type Color = typeof colors;
4
- /**
5
- * A container that lays out its contents in one direction
6
- *
7
- * @attr {"none" | "small" | "medium" | "large" | "xlarge" | "circle" | "pill" } radius - border radius
8
- * @attr {"around" | "between" | "center" | "end" | "start" | "stretch"} align-content - How to align the contents when there is extra space in the cross axis.
9
- * @attr [align-content="stretch"]
10
- * @attr {"baseline" | "center" | "end" | "start" | "stretch"} align-items - How to align the contents along the cross axis.
11
- * @attr {"center" | "end" | "start" | "stretch"} align-self - How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.
12
- * @attr {"row" | "column"} direction - The orientation to layout the child components in.
13
- * @attr [direction="column"]
14
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} elevation - Elevated height above the underlying context, indicated via a drop shadow.
15
- * @attr {"horizontal" | "vertical" | "true" | "false"} fill - Whether the width and/or height should fill the container.
16
- * @attr {"grow" | "shrink" | "true" | "false"} flex - flex-grow and/or flex-shrink
17
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} gap - The amount of spacing between child elements. This should not be used in conjunction with 'wrap' as the gap elements will not wrap gracefully. If a child is a Fragment, Box will not add a gap between the children of the Fragment.
18
- * @attr {"around" | "between" | "center" | "end" | "evenly" | "start" | "stretch"} justify - How to align the contents along the main axis.
19
- * @attr [justify="stretch"]
20
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} margin - The amount of margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
21
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} padding - The amount of padding around the box contents. An object can be specified to distinguish horizontal padding, vertical padding, and padding on a particular side of the box.
22
- * @attr {"center" | "justify" | "left" | "right"} text - Text align
23
- * @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} width - A fixed width.
24
- * @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} height - A fixed height.
25
- * @attr {"auto" | "hidden" | "scroll" | "visible"} overflow - box overflow.
26
- * @attr { "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "lighter" | "bold" | "bolder"} weight - Font weight.
27
- * @attr {"true" | "false" | "reverse"} wrap - Whether children can wrap if they can't all fit.
28
- * @attr [wrap="false"]
29
- */
30
- declare class TkBox extends LitElement {
31
- static get styles(): import("lit").CSSResult[];
32
- /**
33
- * Activate ripple
34
- */
35
- ripple: boolean;
36
- /**
37
- * Set background color.
38
- */
39
- background: Color | string;
40
- /**
41
- * Set color.
42
- */
43
- color: Color | "foreground" | "background" | string;
44
- render(): import("lit-html").TemplateResult<1>;
45
- connectedCallback(): void;
46
- disconnectedCallback(): void;
47
- updated(props: any): void;
48
- private showRipple;
49
- private hideRipple;
50
- }
51
- declare global {
52
- interface HTMLElementTagNameMap {
53
- "tk-box": TkBox;
54
- }
55
- }
56
- export { TkBox };
@@ -1,182 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { LitElement, css, unsafeCSS, html } from 'lit';
3
- import { property, customElement } from 'lit/decorators.js';
4
- import css_248z from './box.scss.js';
5
-
6
- const colors = [
7
- "primary-lighter",
8
- "primary-light",
9
- "primary",
10
- "primary-dark",
11
- "primary-darker",
12
- "on-primary-lighter",
13
- "on-primary-light",
14
- "on-primary",
15
- "on-primary-dark",
16
- "on-primary-darker",
17
- "accent-lighter",
18
- "accent-light",
19
- "accent",
20
- "accent-dark",
21
- "accent-darker",
22
- "on-accent-lighter",
23
- "on-accent-light",
24
- "on-accent",
25
- "on-accent-dark",
26
- "on-accent-darker",
27
- "error-lighter",
28
- "error-light",
29
- "error",
30
- "error-dark",
31
- "error-darker",
32
- "on-error-lighter",
33
- "on-error-light",
34
- "on-error",
35
- "on-error-dark",
36
- "on-error-darker",
37
- "shade-lighter",
38
- "shade-light",
39
- "shade",
40
- "shade-dark",
41
- "shade-darker",
42
- "on-shade-lighter",
43
- "on-shade-light",
44
- "on-shade",
45
- "on-shade-dark",
46
- "on-shade-darker"
47
- ];
48
- /**
49
- * A container that lays out its contents in one direction
50
- *
51
- * @attr {"none" | "small" | "medium" | "large" | "xlarge" | "circle" | "pill" } radius - border radius
52
- * @attr {"around" | "between" | "center" | "end" | "start" | "stretch"} align-content - How to align the contents when there is extra space in the cross axis.
53
- * @attr [align-content="stretch"]
54
- * @attr {"baseline" | "center" | "end" | "start" | "stretch"} align-items - How to align the contents along the cross axis.
55
- * @attr {"center" | "end" | "start" | "stretch"} align-self - How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.
56
- * @attr {"row" | "column"} direction - The orientation to layout the child components in.
57
- * @attr [direction="column"]
58
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} elevation - Elevated height above the underlying context, indicated via a drop shadow.
59
- * @attr {"horizontal" | "vertical" | "true" | "false"} fill - Whether the width and/or height should fill the container.
60
- * @attr {"grow" | "shrink" | "true" | "false"} flex - flex-grow and/or flex-shrink
61
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} gap - The amount of spacing between child elements. This should not be used in conjunction with 'wrap' as the gap elements will not wrap gracefully. If a child is a Fragment, Box will not add a gap between the children of the Fragment.
62
- * @attr {"around" | "between" | "center" | "end" | "evenly" | "start" | "stretch"} justify - How to align the contents along the main axis.
63
- * @attr [justify="stretch"]
64
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} margin - The amount of margin around the component. An object can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
65
- * @attr {"xsmall" | "small" | "medium" | "large" | "xlarge"} padding - The amount of padding around the box contents. An object can be specified to distinguish horizontal padding, vertical padding, and padding on a particular side of the box.
66
- * @attr {"center" | "justify" | "left" | "right"} text - Text align
67
- * @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} width - A fixed width.
68
- * @attr {"xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge"} height - A fixed height.
69
- * @attr {"auto" | "hidden" | "scroll" | "visible"} overflow - box overflow.
70
- * @attr { "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "lighter" | "bold" | "bolder"} weight - Font weight.
71
- * @attr {"true" | "false" | "reverse"} wrap - Whether children can wrap if they can't all fit.
72
- * @attr [wrap="false"]
73
- */
74
- let TkBox = class TkBox extends LitElement {
75
- constructor() {
76
- super(...arguments);
77
- /**
78
- * Activate ripple
79
- */
80
- this.ripple = false;
81
- }
82
- static get styles() {
83
- return [
84
- css `
85
- ${unsafeCSS(css_248z)}
86
- `
87
- ];
88
- }
89
- render() {
90
- return html `
91
- <slot></slot>
92
- `;
93
- }
94
- connectedCallback() {
95
- if (this.ripple) {
96
- this.addEventListener("mousedown", this.showRipple.bind(this), { passive: true });
97
- this.addEventListener("mouseup", this.hideRipple.bind(this), { passive: true });
98
- }
99
- super.connectedCallback();
100
- }
101
- disconnectedCallback() {
102
- this.removeEventListener("mousedown", this.showRipple);
103
- this.addEventListener("mouseup", this.hideRipple);
104
- super.disconnectedCallback();
105
- }
106
- updated(props) {
107
- if (props.has("background") && ![...colors, "background", "foreground"].includes(this.background))
108
- this.style.setProperty("background-color", this.background.toString());
109
- if (props.has("color") && ![...colors, "background", "foreground"].includes(this.color))
110
- this.style.setProperty("color", this.color.toString());
111
- super.updated(props);
112
- }
113
- showRipple(event) {
114
- const x = event.clientX;
115
- const y = event.clientY;
116
- const { offsetWidth, offsetHeight } = this;
117
- const container = document.createElement("span");
118
- container.classList.add("ripple", "open");
119
- const element = document.createElement("span");
120
- container.appendChild(element);
121
- this.shadowRoot.appendChild(container);
122
- const rect = this.getBoundingClientRect();
123
- const diameter = Math.max(offsetWidth, offsetWidth) * 2;
124
- element.style.width = element.style.height = diameter + "px";
125
- element.style.left = x - rect.left - diameter / 2 + "px";
126
- element.style.top = y - rect.top - diameter / 2 + "px";
127
- const inAnimation = element.animate({
128
- transform: [`scale(0)`, `scale(1)`]
129
- }, {
130
- easing: "ease-out",
131
- fill: "both",
132
- duration: 500
133
- });
134
- inAnimation.onfinish = () => {
135
- container.classList.remove("open");
136
- const outAnimation = element.animate({
137
- opacity: ["0.5", "0"]
138
- }, {
139
- easing: "ease-in",
140
- fill: "both",
141
- duration: 300
142
- });
143
- outAnimation.onfinish = () => {
144
- requestAnimationFrame(() => {
145
- container.remove();
146
- });
147
- };
148
- };
149
- }
150
- hideRipple(event) {
151
- var _a;
152
- (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".ripple:not([open])").forEach(container => {
153
- const element = container.querySelector("span");
154
- const outAnimation = element.animate({
155
- opacity: ["0.5", "0"]
156
- }, {
157
- easing: "ease-out",
158
- fill: "both",
159
- duration: 300
160
- });
161
- outAnimation.onfinish = () => {
162
- requestAnimationFrame(() => {
163
- container.remove();
164
- });
165
- };
166
- });
167
- }
168
- };
169
- __decorate([
170
- property({ type: Boolean })
171
- ], TkBox.prototype, "ripple", void 0);
172
- __decorate([
173
- property()
174
- ], TkBox.prototype, "background", void 0);
175
- __decorate([
176
- property()
177
- ], TkBox.prototype, "color", void 0);
178
- TkBox = __decorate([
179
- customElement("tk-box")
180
- ], TkBox);
181
-
182
- export { TkBox };
@@ -1,4 +0,0 @@
1
- var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:background var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease),color var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease)}:host([hidden]){display:none}.ripple{bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.ripple span{background-color:currentColor;border-radius:50%;opacity:.5;position:absolute}:host([align-content=start]){align-content:flex-start}:host([align-content=end]){align-content:flex-end}:host([align-content=stretch]){align-content:stretch}:host([align-content=center]){align-content:center}:host([align-content=around]){align-content:space-around}:host([align-content=between]){align-content:space-between}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([align-items=stretch]){align-items:stretch}:host([align-items=center]){align-items:center}:host([align-items=baseline]){align-items:baseline}:host([align-self=start]){align-self:flex-start}:host([align-self=end]){align-self:flex-end}:host([align-self=stretch]){align-self:stretch}:host([align-self=center]){align-self:center}:host([background=primary-lighter]){background-color:var(--primary-lighter)}:host([color=primary-lighter]){color:var(--primary-lighter)}:host([background=primary-light]){background-color:var(--primary-light)}:host([color=primary-light]){color:var(--primary-light)}:host([background=primary]){background-color:var(--primary)}:host([color=primary]){color:var(--primary)}:host([background=primary-dark]){background-color:var(--primary-dark)}:host([color=primary-dark]){color:var(--primary-dark)}:host([background=primary-darker]){background-color:var(--primary-darker)}:host([color=primary-darker]){color:var(--primary-darker)}:host([background=on-primary-lighter]){background-color:var(--on-primary-lighter)}:host([color=on-primary-lighter]){color:var(--on-primary-lighter)}:host([background=on-primary-light]){background-color:var(--on-primary-light)}:host([color=on-primary-light]){color:var(--on-primary-light)}:host([background=on-primary]){background-color:var(--on-primary)}:host([color=on-primary]){color:var(--on-primary)}:host([background=on-primary-dark]){background-color:var(--on-primary-dark)}:host([color=on-primary-dark]){color:var(--on-primary-dark)}:host([background=on-primary-darker]){background-color:var(--on-primary-darker)}:host([color=on-primary-darker]){color:var(--on-primary-darker)}:host([background=accent-lighter]){background-color:var(--accent-lighter)}:host([color=accent-lighter]){color:var(--accent-lighter)}:host([background=accent-light]){background-color:var(--accent-light)}:host([color=accent-light]){color:var(--accent-light)}:host([background=accent]){background-color:var(--accent)}:host([color=accent]){color:var(--accent)}:host([background=accent-dark]){background-color:var(--accent-dark)}:host([color=accent-dark]){color:var(--accent-dark)}:host([background=accent-darker]){background-color:var(--accent-darker)}:host([color=accent-darker]){color:var(--accent-darker)}:host([background=on-accent-lighter]){background-color:var(--on-accent-lighter)}:host([color=on-accent-lighter]){color:var(--on-accent-lighter)}:host([background=on-accent-light]){background-color:var(--on-accent-light)}:host([color=on-accent-light]){color:var(--on-accent-light)}:host([background=on-accent]){background-color:var(--on-accent)}:host([color=on-accent]){color:var(--on-accent)}:host([background=on-accent-dark]){background-color:var(--on-accent-dark)}:host([color=on-accent-dark]){color:var(--on-accent-dark)}:host([background=on-accent-darker]){background-color:var(--on-accent-darker)}:host([color=on-accent-darker]){color:var(--on-accent-darker)}:host([background=error-lighter]){background-color:var(--error-lighter)}:host([color=error-lighter]){color:var(--error-lighter)}:host([background=error-light]){background-color:var(--error-light)}:host([color=error-light]){color:var(--error-light)}:host([background=error]){background-color:var(--error)}:host([color=error]){color:var(--error)}:host([background=error-dark]){background-color:var(--error-dark)}:host([color=error-dark]){color:var(--error-dark)}:host([background=error-darker]){background-color:var(--error-darker)}:host([color=error-darker]){color:var(--error-darker)}:host([background=on-error-lighter]){background-color:var(--on-error-lighter)}:host([color=on-error-lighter]){color:var(--on-error-lighter)}:host([background=on-error-light]){background-color:var(--on-error-light)}:host([color=on-error-light]){color:var(--on-error-light)}:host([background=on-error]){background-color:var(--on-error)}:host([color=on-error]){color:var(--on-error)}:host([background=on-error-dark]){background-color:var(--on-error-dark)}:host([color=on-error-dark]){color:var(--on-error-dark)}:host([background=on-error-darker]){background-color:var(--on-error-darker)}:host([color=on-error-darker]){color:var(--on-error-darker)}:host([background=shade-lighter]){background-color:var(--shade-lighter)}:host([color=shade-lighter]){color:var(--shade-lighter)}:host([background=shade-light]){background-color:var(--shade-light)}:host([color=shade-light]){color:var(--shade-light)}:host([background=shade]){background-color:var(--shade)}:host([color=shade]){color:var(--shade)}:host([background=shade-dark]){background-color:var(--shade-dark)}:host([color=shade-dark]){color:var(--shade-dark)}:host([background=shade-darker]){background-color:var(--shade-darker)}:host([color=shade-darker]){color:var(--shade-darker)}:host([background=on-shade-lighter]){background-color:var(--on-shade-lighter)}:host([color=on-shade-lighter]){color:var(--on-shade-lighter)}:host([background=on-shade-light]){background-color:var(--on-shade-light)}:host([color=on-shade-light]){color:var(--on-shade-light)}:host([background=on-shade]){background-color:var(--on-shade)}:host([color=on-shade]){color:var(--on-shade)}:host([background=on-shade-dark]){background-color:var(--on-shade-dark)}:host([color=on-shade-dark]){color:var(--on-shade-dark)}:host([background=on-shade-darker]){background-color:var(--on-shade-darker)}:host([color=on-shade-darker]){color:var(--on-shade-darker)}:host([background=foreground]){background-color:var(--foreground)}:host([color=foreground]){color:var(--foreground)}:host([background=background]){background-color:var(--background)}:host([color=background]){color:var(--background)}:host([direction=column]){flex-direction:column}:host([direction=row-reverse]){flex-direction:row-reverse}:host([direction=column-reverse]){flex-direction:column-reverse}:host([text=center]){text-align:center}:host([text=justify]){text-align:justify}:host([text=left]){text-align:left}:host([text=right]){text-align:right}:host([weight=\"100\"]){font-weight:100}:host([weight=\"200\"]){font-weight:200}:host([weight=\"300\"]){font-weight:300}:host([weight=\"400\"]){font-weight:400}:host([weight=\"500\"]){font-weight:500}:host([weight=\"600\"]){font-weight:600}:host([weight=\"700\"]){font-weight:700}:host([weight=\"800\"]){font-weight:800}:host([weight=\"900\"]){font-weight:900}:host([weight=lighter]){font-weight:lighter}:host([weight=bold]){font-weight:700}:host([weight=bolder]){font-weight:bolder}:host([direction=row]){flex-direction:row}:host([direction=row-reverse]){flex-direction:row}:host([elevation=xsmall]){box-shadow:var(--box-elevation,var(--elevation-1,0 1px 2px var(--shadow)))}:host([elevation=small]){box-shadow:var(--box-elevation,var(--elevation-2,0 2px 4px var(--shadow)))}:host([elevation=medium]){box-shadow:var(--box-elevation,var(--elevation-3,0 4px 8px var(--shadow)))}:host([elevation=large]){box-shadow:var(--box-elevation,var(--elevation-4,0 8px 16px var(--shadow)))}:host([elevation=xlarge]){box-shadow:var(--box-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}:host([fill=horizontal]){width:100%}:host([fill=vertical]){height:100%}:host([fill=true]){height:100%;width:100%}:host([flex=grow]){flex:1 0}:host([flex=shrink]){flex:0 1}:host([flex=true]){flex:1 1}:host([flex=false]){flex:0 0}:host([gap=xsmall]) ::slotted(*),:host([gap=xsmall][direction=column]) ::slotted(*){margin:var(--spacing-xs,.25rem) 0}:host([gap=xsmall][direction=row]) ::slotted(*){margin:0 var(--spacing-xs,.25rem)}:host([margin=xsmall]){margin:var(--box-margin,var(--spacing-xs,.25rem))}:host([margin=\"xsmall auto\"]){margin:var(--box-margin,var(--spacing-xs,.25rem)) auto}:host([margin=\"auto xsmall\"]){margin:auto var(--box-margin,var(--spacing-xs,.25rem))}:host([padding=xsmall]){padding:var(--box-padding,var(--spacing-xs,.25rem))}:host([gap=small]) ::slotted(*),:host([gap=small][direction=column]) ::slotted(*){margin:var(--spacing-s,.5rem) 0}:host([gap=small][direction=row]) ::slotted(*){margin:0 var(--spacing-s,.5rem)}:host([margin=small]){margin:var(--box-margin,var(--spacing-s,.5rem))}:host([margin=\"small auto\"]){margin:var(--box-margin,var(--spacing-s,.5rem)) auto}:host([margin=\"auto small\"]){margin:auto var(--box-margin,var(--spacing-s,.5rem))}:host([padding=small]){padding:var(--box-padding,var(--spacing-s,.5rem))}:host([gap=medium]) ::slotted(*),:host([gap=medium][direction=column]) ::slotted(*){margin:var(--spacing-m,1rem) 0}:host([gap=medium][direction=row]) ::slotted(*){margin:0 var(--spacing-m,1rem)}:host([margin=medium]){margin:var(--box-margin,var(--spacing-m,1rem))}:host([margin=\"medium auto\"]){margin:var(--box-margin,var(--spacing-m,1rem)) auto}:host([margin=\"auto medium\"]){margin:auto var(--box-margin,var(--spacing-m,1rem))}:host([padding=medium]){padding:var(--box-padding,var(--spacing-m,1rem))}:host([gap=large]) ::slotted(*),:host([gap=large][direction=column]) ::slotted(*){margin:var(--spacing-l,1.25rem) 0}:host([gap=large][direction=row]) ::slotted(*){margin:0 var(--spacing-l,1.25rem)}:host([margin=large]){margin:var(--box-margin,var(--spacing-l,1.25rem))}:host([margin=\"large auto\"]){margin:var(--box-margin,var(--spacing-l,1.25rem)) auto}:host([margin=\"auto large\"]){margin:auto var(--box-margin,var(--spacing-l,1.25rem))}:host([padding=large]){padding:var(--box-padding,var(--spacing-l,1.25rem))}:host([gap=xlarge]) ::slotted(*),:host([gap=xlarge][direction=column]) ::slotted(*){margin:var(--spacing-xl,2rem) 0}:host([gap=xlarge][direction=row]) ::slotted(*){margin:0 var(--spacing-xl,2rem)}:host([margin=xlarge]){margin:var(--box-margin,var(--spacing-xl,2rem))}:host([margin=\"xlarge auto\"]){margin:var(--box-margin,var(--spacing-xl,2rem)) auto}:host([margin=\"auto xlarge\"]){margin:auto var(--box-margin,var(--spacing-xl,2rem))}:host([padding=xlarge]){padding:var(--box-padding,var(--spacing-xl,2rem))}:host([font=xsmall]),:host([size=xsmall]){font-size:var(--box-font-size,var(--font-size-xs,.625rem))}:host([font=small]),:host([size=small]){font-size:var(--box-font-size,var(--font-size-s,.875rem))}:host([font=medium]),:host([size=medium]){font-size:var(--box-font-size,var(--font-size-m,1rem))}:host([font=large]),:host([size=large]){font-size:var(--box-font-size,var(--font-size-l,1.25rem))}:host([font=xlarge]),:host([size=xlarge]){font-size:var(--box-font-size,var(--font-size-xl,1.5rem))}:host([font=xxlarge]),:host([size=xxlarge]){font-size:var(--box-font-size,var(--font-size-xxl,2.25rem))}:host([justify=start]){justify-content:flex-start}:host([justify=end]){justify-content:flex-end}:host([justify=stretch]){justify-content:stretch}:host([justify=baseline]){justify-content:baseline}:host([justify=center]){justify-content:center}:host([justify=around]){justify-content:space-around}:host([justify=between]){justify-content:space-between}:host([justify=evenly]){justify-content:space-evenly}:host([overflow=auto]){overflow:auto}:host([overflow=hidden]){overflow:hidden}:host([overflow=scroll]){overflow:scroll}:host([overflow=visible]){overflow:visible}:host([radius=none]){border-radius:var(--box-border-radius,0)}:host([radius=small]){border-radius:var(--box-border-radius,var(--border-radius-small,.125rem))}:host([radius=medium]){border-radius:var(--box-border-radius,var(--border-radius-medium,.25rem))}:host([radius=large]){border-radius:var(--box-border-radius,var(--border-radius-large,.5rem))}:host([radius=xlarge]){border-radius:var(--box-border-radius,var(--border-radius-x-large,1rem))}:host([radius=circle]){border-radius:var(--box-border-radius,var(--border-radius-circle,50%))}:host([radius=pill]){border-radius:var(--box-border-radius,var(--border-radius-pill,9999px))}:host([max-width=xxsmall]){max-width:var(--box-max-width,var(--size-xxs,2rem))}:host([width=xxsmall]){width:var(--box-width,var(--size-xxs,2rem))}:host([max-height=xxsmall]){max-height:var(--box-max-height,var(--size-xxs,2rem))}:host([height=xxsmall]){height:var(--box-height,var(--size-xxs,2rem))}:host([max-width=xsmall]){max-width:var(--box-max-width,var(--size-xs,4rem))}:host([width=xsmall]){width:var(--box-width,var(--size-xs,4rem))}:host([max-height=xsmall]){max-height:var(--box-max-height,var(--size-xs,4rem))}:host([height=xsmall]){height:var(--box-height,var(--size-xs,4rem))}:host([max-width=small]){max-width:var(--box-max-width,var(--size-s,8rem))}:host([width=small]){width:var(--box-width,var(--size-s,8rem))}:host([max-height=small]){max-height:var(--box-max-height,var(--size-s,8rem))}:host([height=small]){height:var(--box-height,var(--size-s,8rem))}:host([max-width=medium]){max-width:var(--box-max-width,var(--size-m,16rem))}:host([width=medium]){width:var(--box-width,var(--size-m,16rem))}:host([max-height=medium]){max-height:var(--box-max-height,var(--size-m,16rem))}:host([height=medium]){height:var(--box-height,var(--size-m,16rem))}:host([max-width=large]){max-width:var(--box-max-width,var(--size-l,32rem))}:host([width=large]){width:var(--box-width,var(--size-l,32rem))}:host([max-height=large]){max-height:var(--box-max-height,var(--size-l,32rem))}:host([height=large]){height:var(--box-height,var(--size-l,32rem))}:host([max-width=xlarge]){max-width:var(--box-max-width,var(--size-xl,48rem))}:host([width=xlarge]){width:var(--box-width,var(--size-xl,48rem))}:host([max-height=xlarge]){max-height:var(--box-max-height,var(--size-xl,48rem))}:host([height=xlarge]){height:var(--box-height,var(--size-xl,48rem))}:host([max-width=xxlarge]){max-width:var(--box-max-width,var(--size-xxl,64rem))}:host([width=xxlarge]){width:var(--box-width,var(--size-xxl,64rem))}:host([max-height=xxlarge]){max-height:var(--box-max-height,var(--size-xxl,64rem))}:host([height=xxlarge]){height:var(--box-height,var(--size-xxl,64rem))}:host([wrap=true]){flex-wrap:wrap}:host([wrap=reverse]){flex-wrap:wrap-reverse}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{box-sizing:border-box;display:flex;flex-direction:column;position:relative;transition:background var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease),color var(--transition-duration-medium,.18s) var(--transition-timing-function-ease,ease)}:host([hidden]){display:none}.ripple{bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}.ripple span{background-color:currentColor;border-radius:50%;opacity:.5;position:absolute}:host([align-content=start]){align-content:flex-start}:host([align-content=end]){align-content:flex-end}:host([align-content=stretch]){align-content:stretch}:host([align-content=center]){align-content:center}:host([align-content=around]){align-content:space-around}:host([align-content=between]){align-content:space-between}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([align-items=stretch]){align-items:stretch}:host([align-items=center]){align-items:center}:host([align-items=baseline]){align-items:baseline}:host([align-self=start]){align-self:flex-start}:host([align-self=end]){align-self:flex-end}:host([align-self=stretch]){align-self:stretch}:host([align-self=center]){align-self:center}:host([background=primary-lighter]){background-color:var(--primary-lighter)}:host([color=primary-lighter]){color:var(--primary-lighter)}:host([background=primary-light]){background-color:var(--primary-light)}:host([color=primary-light]){color:var(--primary-light)}:host([background=primary]){background-color:var(--primary)}:host([color=primary]){color:var(--primary)}:host([background=primary-dark]){background-color:var(--primary-dark)}:host([color=primary-dark]){color:var(--primary-dark)}:host([background=primary-darker]){background-color:var(--primary-darker)}:host([color=primary-darker]){color:var(--primary-darker)}:host([background=on-primary-lighter]){background-color:var(--on-primary-lighter)}:host([color=on-primary-lighter]){color:var(--on-primary-lighter)}:host([background=on-primary-light]){background-color:var(--on-primary-light)}:host([color=on-primary-light]){color:var(--on-primary-light)}:host([background=on-primary]){background-color:var(--on-primary)}:host([color=on-primary]){color:var(--on-primary)}:host([background=on-primary-dark]){background-color:var(--on-primary-dark)}:host([color=on-primary-dark]){color:var(--on-primary-dark)}:host([background=on-primary-darker]){background-color:var(--on-primary-darker)}:host([color=on-primary-darker]){color:var(--on-primary-darker)}:host([background=accent-lighter]){background-color:var(--accent-lighter)}:host([color=accent-lighter]){color:var(--accent-lighter)}:host([background=accent-light]){background-color:var(--accent-light)}:host([color=accent-light]){color:var(--accent-light)}:host([background=accent]){background-color:var(--accent)}:host([color=accent]){color:var(--accent)}:host([background=accent-dark]){background-color:var(--accent-dark)}:host([color=accent-dark]){color:var(--accent-dark)}:host([background=accent-darker]){background-color:var(--accent-darker)}:host([color=accent-darker]){color:var(--accent-darker)}:host([background=on-accent-lighter]){background-color:var(--on-accent-lighter)}:host([color=on-accent-lighter]){color:var(--on-accent-lighter)}:host([background=on-accent-light]){background-color:var(--on-accent-light)}:host([color=on-accent-light]){color:var(--on-accent-light)}:host([background=on-accent]){background-color:var(--on-accent)}:host([color=on-accent]){color:var(--on-accent)}:host([background=on-accent-dark]){background-color:var(--on-accent-dark)}:host([color=on-accent-dark]){color:var(--on-accent-dark)}:host([background=on-accent-darker]){background-color:var(--on-accent-darker)}:host([color=on-accent-darker]){color:var(--on-accent-darker)}:host([background=error-lighter]){background-color:var(--error-lighter)}:host([color=error-lighter]){color:var(--error-lighter)}:host([background=error-light]){background-color:var(--error-light)}:host([color=error-light]){color:var(--error-light)}:host([background=error]){background-color:var(--error)}:host([color=error]){color:var(--error)}:host([background=error-dark]){background-color:var(--error-dark)}:host([color=error-dark]){color:var(--error-dark)}:host([background=error-darker]){background-color:var(--error-darker)}:host([color=error-darker]){color:var(--error-darker)}:host([background=on-error-lighter]){background-color:var(--on-error-lighter)}:host([color=on-error-lighter]){color:var(--on-error-lighter)}:host([background=on-error-light]){background-color:var(--on-error-light)}:host([color=on-error-light]){color:var(--on-error-light)}:host([background=on-error]){background-color:var(--on-error)}:host([color=on-error]){color:var(--on-error)}:host([background=on-error-dark]){background-color:var(--on-error-dark)}:host([color=on-error-dark]){color:var(--on-error-dark)}:host([background=on-error-darker]){background-color:var(--on-error-darker)}:host([color=on-error-darker]){color:var(--on-error-darker)}:host([background=shade-lighter]){background-color:var(--shade-lighter)}:host([color=shade-lighter]){color:var(--shade-lighter)}:host([background=shade-light]){background-color:var(--shade-light)}:host([color=shade-light]){color:var(--shade-light)}:host([background=shade]){background-color:var(--shade)}:host([color=shade]){color:var(--shade)}:host([background=shade-dark]){background-color:var(--shade-dark)}:host([color=shade-dark]){color:var(--shade-dark)}:host([background=shade-darker]){background-color:var(--shade-darker)}:host([color=shade-darker]){color:var(--shade-darker)}:host([background=on-shade-lighter]){background-color:var(--on-shade-lighter)}:host([color=on-shade-lighter]){color:var(--on-shade-lighter)}:host([background=on-shade-light]){background-color:var(--on-shade-light)}:host([color=on-shade-light]){color:var(--on-shade-light)}:host([background=on-shade]){background-color:var(--on-shade)}:host([color=on-shade]){color:var(--on-shade)}:host([background=on-shade-dark]){background-color:var(--on-shade-dark)}:host([color=on-shade-dark]){color:var(--on-shade-dark)}:host([background=on-shade-darker]){background-color:var(--on-shade-darker)}:host([color=on-shade-darker]){color:var(--on-shade-darker)}:host([background=foreground]){background-color:var(--foreground)}:host([color=foreground]){color:var(--foreground)}:host([background=background]){background-color:var(--background)}:host([color=background]){color:var(--background)}:host([direction=column]){flex-direction:column}:host([direction=row-reverse]){flex-direction:row-reverse}:host([direction=column-reverse]){flex-direction:column-reverse}:host([text=center]){text-align:center}:host([text=justify]){text-align:justify}:host([text=left]){text-align:left}:host([text=right]){text-align:right}:host([weight=\"100\"]){font-weight:100}:host([weight=\"200\"]){font-weight:200}:host([weight=\"300\"]){font-weight:300}:host([weight=\"400\"]){font-weight:400}:host([weight=\"500\"]){font-weight:500}:host([weight=\"600\"]){font-weight:600}:host([weight=\"700\"]){font-weight:700}:host([weight=\"800\"]){font-weight:800}:host([weight=\"900\"]){font-weight:900}:host([weight=lighter]){font-weight:lighter}:host([weight=bold]){font-weight:700}:host([weight=bolder]){font-weight:bolder}:host([direction=row]){flex-direction:row}:host([direction=row-reverse]){flex-direction:row}:host([elevation=xsmall]){box-shadow:var(--box-elevation,var(--elevation-1,0 1px 2px var(--shadow)))}:host([elevation=small]){box-shadow:var(--box-elevation,var(--elevation-2,0 2px 4px var(--shadow)))}:host([elevation=medium]){box-shadow:var(--box-elevation,var(--elevation-3,0 4px 8px var(--shadow)))}:host([elevation=large]){box-shadow:var(--box-elevation,var(--elevation-4,0 8px 16px var(--shadow)))}:host([elevation=xlarge]){box-shadow:var(--box-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}:host([fill=horizontal]){width:100%}:host([fill=vertical]){height:100%}:host([fill=true]){height:100%;width:100%}:host([flex=grow]){flex:1 0}:host([flex=shrink]){flex:0 1}:host([flex=true]){flex:1 1}:host([flex=false]){flex:0 0}:host([gap=xsmall]) ::slotted(*),:host([gap=xsmall][direction=column]) ::slotted(*){margin:var(--spacing-xs,.25rem) 0}:host([gap=xsmall][direction=row]) ::slotted(*){margin:0 var(--spacing-xs,.25rem)}:host([margin=xsmall]){margin:var(--box-margin,var(--spacing-xs,.25rem))}:host([margin=\"xsmall auto\"]){margin:var(--box-margin,var(--spacing-xs,.25rem)) auto}:host([margin=\"auto xsmall\"]){margin:auto var(--box-margin,var(--spacing-xs,.25rem))}:host([padding=xsmall]){padding:var(--box-padding,var(--spacing-xs,.25rem))}:host([gap=small]) ::slotted(*),:host([gap=small][direction=column]) ::slotted(*){margin:var(--spacing-s,.5rem) 0}:host([gap=small][direction=row]) ::slotted(*){margin:0 var(--spacing-s,.5rem)}:host([margin=small]){margin:var(--box-margin,var(--spacing-s,.5rem))}:host([margin=\"small auto\"]){margin:var(--box-margin,var(--spacing-s,.5rem)) auto}:host([margin=\"auto small\"]){margin:auto var(--box-margin,var(--spacing-s,.5rem))}:host([padding=small]){padding:var(--box-padding,var(--spacing-s,.5rem))}:host([gap=medium]) ::slotted(*),:host([gap=medium][direction=column]) ::slotted(*){margin:var(--spacing-m,1rem) 0}:host([gap=medium][direction=row]) ::slotted(*){margin:0 var(--spacing-m,1rem)}:host([margin=medium]){margin:var(--box-margin,var(--spacing-m,1rem))}:host([margin=\"medium auto\"]){margin:var(--box-margin,var(--spacing-m,1rem)) auto}:host([margin=\"auto medium\"]){margin:auto var(--box-margin,var(--spacing-m,1rem))}:host([padding=medium]){padding:var(--box-padding,var(--spacing-m,1rem))}:host([gap=large]) ::slotted(*),:host([gap=large][direction=column]) ::slotted(*){margin:var(--spacing-l,1.25rem) 0}:host([gap=large][direction=row]) ::slotted(*){margin:0 var(--spacing-l,1.25rem)}:host([margin=large]){margin:var(--box-margin,var(--spacing-l,1.25rem))}:host([margin=\"large auto\"]){margin:var(--box-margin,var(--spacing-l,1.25rem)) auto}:host([margin=\"auto large\"]){margin:auto var(--box-margin,var(--spacing-l,1.25rem))}:host([padding=large]){padding:var(--box-padding,var(--spacing-l,1.25rem))}:host([gap=xlarge]) ::slotted(*),:host([gap=xlarge][direction=column]) ::slotted(*){margin:var(--spacing-xl,2rem) 0}:host([gap=xlarge][direction=row]) ::slotted(*){margin:0 var(--spacing-xl,2rem)}:host([margin=xlarge]){margin:var(--box-margin,var(--spacing-xl,2rem))}:host([margin=\"xlarge auto\"]){margin:var(--box-margin,var(--spacing-xl,2rem)) auto}:host([margin=\"auto xlarge\"]){margin:auto var(--box-margin,var(--spacing-xl,2rem))}:host([padding=xlarge]){padding:var(--box-padding,var(--spacing-xl,2rem))}:host([font=xsmall]),:host([size=xsmall]){font-size:var(--box-font-size,var(--font-size-xs,.625rem))}:host([font=small]),:host([size=small]){font-size:var(--box-font-size,var(--font-size-s,.875rem))}:host([font=medium]),:host([size=medium]){font-size:var(--box-font-size,var(--font-size-m,1rem))}:host([font=large]),:host([size=large]){font-size:var(--box-font-size,var(--font-size-l,1.25rem))}:host([font=xlarge]),:host([size=xlarge]){font-size:var(--box-font-size,var(--font-size-xl,1.5rem))}:host([font=xxlarge]),:host([size=xxlarge]){font-size:var(--box-font-size,var(--font-size-xxl,2.25rem))}:host([justify=start]){justify-content:flex-start}:host([justify=end]){justify-content:flex-end}:host([justify=stretch]){justify-content:stretch}:host([justify=baseline]){justify-content:baseline}:host([justify=center]){justify-content:center}:host([justify=around]){justify-content:space-around}:host([justify=between]){justify-content:space-between}:host([justify=evenly]){justify-content:space-evenly}:host([overflow=auto]){overflow:auto}:host([overflow=hidden]){overflow:hidden}:host([overflow=scroll]){overflow:scroll}:host([overflow=visible]){overflow:visible}:host([radius=none]){border-radius:var(--box-border-radius,0)}:host([radius=small]){border-radius:var(--box-border-radius,var(--border-radius-small,.125rem))}:host([radius=medium]){border-radius:var(--box-border-radius,var(--border-radius-medium,.25rem))}:host([radius=large]){border-radius:var(--box-border-radius,var(--border-radius-large,.5rem))}:host([radius=xlarge]){border-radius:var(--box-border-radius,var(--border-radius-x-large,1rem))}:host([radius=circle]){border-radius:var(--box-border-radius,var(--border-radius-circle,50%))}:host([radius=pill]){border-radius:var(--box-border-radius,var(--border-radius-pill,9999px))}:host([max-width=xxsmall]){max-width:var(--box-max-width,var(--size-xxs,2rem))}:host([width=xxsmall]){width:var(--box-width,var(--size-xxs,2rem))}:host([max-height=xxsmall]){max-height:var(--box-max-height,var(--size-xxs,2rem))}:host([height=xxsmall]){height:var(--box-height,var(--size-xxs,2rem))}:host([max-width=xsmall]){max-width:var(--box-max-width,var(--size-xs,4rem))}:host([width=xsmall]){width:var(--box-width,var(--size-xs,4rem))}:host([max-height=xsmall]){max-height:var(--box-max-height,var(--size-xs,4rem))}:host([height=xsmall]){height:var(--box-height,var(--size-xs,4rem))}:host([max-width=small]){max-width:var(--box-max-width,var(--size-s,8rem))}:host([width=small]){width:var(--box-width,var(--size-s,8rem))}:host([max-height=small]){max-height:var(--box-max-height,var(--size-s,8rem))}:host([height=small]){height:var(--box-height,var(--size-s,8rem))}:host([max-width=medium]){max-width:var(--box-max-width,var(--size-m,16rem))}:host([width=medium]){width:var(--box-width,var(--size-m,16rem))}:host([max-height=medium]){max-height:var(--box-max-height,var(--size-m,16rem))}:host([height=medium]){height:var(--box-height,var(--size-m,16rem))}:host([max-width=large]){max-width:var(--box-max-width,var(--size-l,32rem))}:host([width=large]){width:var(--box-width,var(--size-l,32rem))}:host([max-height=large]){max-height:var(--box-max-height,var(--size-l,32rem))}:host([height=large]){height:var(--box-height,var(--size-l,32rem))}:host([max-width=xlarge]){max-width:var(--box-max-width,var(--size-xl,48rem))}:host([width=xlarge]){width:var(--box-width,var(--size-xl,48rem))}:host([max-height=xlarge]){max-height:var(--box-max-height,var(--size-xl,48rem))}:host([height=xlarge]){height:var(--box-height,var(--size-xl,48rem))}:host([max-width=xxlarge]){max-width:var(--box-max-width,var(--size-xxl,64rem))}:host([width=xxlarge]){width:var(--box-width,var(--size-xxl,64rem))}:host([max-height=xxlarge]){max-height:var(--box-max-height,var(--size-xxl,64rem))}:host([height=xxlarge]){height:var(--box-height,var(--size-xxl,64rem))}:host([wrap=true]){flex-wrap:wrap}:host([wrap=reverse]){flex-wrap:wrap-reverse}";
3
-
4
- export { css_248z as default, stylesheet };
@@ -1,13 +0,0 @@
1
- import { TkBox } from "./box";
2
- declare class TkFocusableBox extends TkBox {
3
- /**
4
- * Element random id
5
- */
6
- protected _id: string;
7
- /**
8
- * disabled atribute
9
- */
10
- disabled: boolean;
11
- updated(props: any): void;
12
- }
13
- export { TkFocusableBox };
@@ -1,30 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { property } from 'lit/decorators.js';
3
- import { uniqueID } from '../utils/unique.js';
4
- import { TkBox } from './box.js';
5
-
6
- class TkFocusableBox extends TkBox {
7
- constructor() {
8
- super(...arguments);
9
- /**
10
- * Element random id
11
- */
12
- this._id = uniqueID();
13
- /**
14
- * disabled atribute
15
- */
16
- this.disabled = false;
17
- }
18
- updated(props) {
19
- this.tabIndex = this.disabled ? -1 : 0;
20
- super.updated(props);
21
- }
22
- }
23
- __decorate([
24
- property({ type: Boolean })
25
- ], TkFocusableBox.prototype, "_id", void 0);
26
- __decorate([
27
- property({ type: Boolean })
28
- ], TkFocusableBox.prototype, "disabled", void 0);
29
-
30
- export { TkFocusableBox };
@@ -1 +0,0 @@
1
- export * from "./box";
@@ -1 +0,0 @@
1
- export { TkBox } from './box.js';
@@ -1,39 +0,0 @@
1
- import { TkBox } from "../box/index";
2
- /**
3
- * A button web component
4
- *
5
- * @cssprop --tk-badge-color - Color of widget
6
- * @cssprop [--tk-badge-color=--primary]
7
- * @cssprop --tk-badge-text-color - Text color of widget to --on-primary-color
8
- *
9
- * @attr {Boolean} accent - accent colors
10
- * @attr {Boolean} disabled - Disable this element
11
- * @attr {Boolean} inverted - color and text-color are inverted
12
- * @attr {Boolean} outlined - outlined
13
- * @attr {Boolean} pill - rounded corner
14
- * @attr {Boolean} ripple - display ripple when active
15
- * @attr {Boolean} small - mini button
16
- */
17
- declare class TkButton extends TkBox {
18
- static get styles(): import("lit").CSSResult[];
19
- private _id;
20
- href: string | null;
21
- target: "_blank" | "_parent" | "_self" | "_top";
22
- type: "submit" | "reset" | "button";
23
- disabled: boolean;
24
- protected $ahref: HTMLAnchorElement;
25
- protected $button: HTMLButtonElement;
26
- render(): import("lit-html").TemplateResult<1>;
27
- connectedCallback(): void;
28
- disconnectedCallback(): void;
29
- updated(props: any): void;
30
- protected onKeyDown(e: KeyboardEvent): void;
31
- firstUpdated(): void;
32
- protected handleClick(e: Event): void;
33
- }
34
- declare global {
35
- interface HTMLElementTagNameMap {
36
- "tk-button": TkButton;
37
- }
38
- }
39
- export { TkButton };