tinkiet 0.8.20 → 0.9.1

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 (68) hide show
  1. package/accordion/accordion.scss.js +2 -2
  2. package/badge/badge.d.ts +5 -3
  3. package/badge/badge.js +15 -11
  4. package/badge/badge.scss.js +2 -2
  5. package/box/box.d.ts +1 -1
  6. package/box/box.js +5 -5
  7. package/box/box.scss.js +2 -2
  8. package/button/button.d.ts +4 -0
  9. package/button/button.js +31 -15
  10. package/button/button.scss.js +2 -2
  11. package/checkbox/checkbox.d.ts +1 -0
  12. package/checkbox/checkbox.js +13 -7
  13. package/checkbox/checkbox.scss.js +2 -2
  14. package/{tag/tag.d.ts → chip/chip.d.ts} +3 -3
  15. package/chip/chip.js +20 -0
  16. package/{tag/tag.scss.js → chip/chip.scss.js} +2 -2
  17. package/chip/index.d.ts +1 -0
  18. package/chip/index.js +1 -0
  19. package/drawer/drawer.d.ts +6 -1
  20. package/drawer/drawer.js +61 -45
  21. package/drawer/drawer.scss.js +2 -2
  22. package/form/form.d.ts +0 -1
  23. package/form/form.js +0 -3
  24. package/index.d.ts +3 -2
  25. package/index.d.ts.map +1 -1
  26. package/index.js +7 -4
  27. package/list-item/list-item.d.ts +1 -0
  28. package/list-item/list-item.js +10 -1
  29. package/list-item/list-item.scss.js +2 -2
  30. package/loading/loading.scss.js +2 -2
  31. package/navigation/index.d.ts +2 -0
  32. package/navigation/index.js +2 -0
  33. package/navigation/navigation-bar.d.ts +11 -0
  34. package/navigation/navigation-bar.js +20 -0
  35. package/navigation/navigation-bar.scss.js +4 -0
  36. package/navigation/navigation-item.d.ts +15 -0
  37. package/navigation/navigation-item.js +51 -0
  38. package/navigation/navigation-item.scss.js +4 -0
  39. package/notie/notie.scss.js +2 -2
  40. package/package.json +2 -3
  41. package/radio/radio.js +10 -3
  42. package/radio/radio.scss.js +2 -2
  43. package/select/select.scss.js +2 -2
  44. package/slider/slider.scss.js +2 -2
  45. package/switch/switch.js +3 -1
  46. package/switch/switch.scss.js +2 -2
  47. package/tab-group/tab-group.d.ts +1 -1
  48. package/tab-group/tab-group.js +5 -16
  49. package/tab-group/tab-group.scss.js +2 -2
  50. package/textarea/textarea.scss.js +2 -2
  51. package/textfield/textfield.scss.js +2 -2
  52. package/theme/theme.d.ts +12 -17
  53. package/theme/theme.js +60 -110
  54. package/theme/theme.scss.js +2 -2
  55. package/topbar/index.d.ts +1 -0
  56. package/topbar/index.js +1 -0
  57. package/{navbar/navbar.d.ts → topbar/topbar.d.ts} +3 -3
  58. package/{navbar/navbar.js → topbar/topbar.js} +6 -6
  59. package/topbar/topbar.scss.js +4 -0
  60. package/umd/tinkiet.min.d.ts +63 -34
  61. package/umd/tinkiet.min.d.ts.map +1 -1
  62. package/umd/tinkiet.min.js +1 -1
  63. package/navbar/index.d.ts +0 -1
  64. package/navbar/index.js +0 -1
  65. package/navbar/navbar.scss.js +0 -4
  66. package/tag/index.d.ts +0 -1
  67. package/tag/index.js +0 -1
  68. package/tag/tag.js +0 -20
package/chip/chip.js ADDED
@@ -0,0 +1,20 @@
1
+ import { __decorate } from 'tslib';
2
+ import { LitElement, html, css, unsafeCSS } from 'lit';
3
+ import { customElement } from 'lit/decorators.js';
4
+ import css_248z from './chip.scss.js';
5
+
6
+ let TkChip = class TkChip extends LitElement {
7
+ render() {
8
+ return html `
9
+ <div class="chip"><slot></slot></div>
10
+ `;
11
+ }
12
+ };
13
+ TkChip.styles = css `
14
+ ${unsafeCSS(css_248z)}
15
+ `;
16
+ TkChip = __decorate([
17
+ customElement("tk-chip")
18
+ ], TkChip);
19
+
20
+ export { TkChip };
@@ -1,4 +1,4 @@
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(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));font-weight:var(--nav-title-font-weight,var(--font-weight-regular,500));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,var(--elevation-5,0 12px 24px var(--shadow)))}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));font-weight:var(--nav-title-font-weight,var(--font-weight-regular,500));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
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(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,0 1px 3px 0 #0000004d,0 4px 8px 3px #00000026)}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:var(--primary);--text:var(--on-primary);background:var(--color);box-sizing:border-box;color:var(--text);display:flex;flex-grow:1;height:var(--navbar-height,48px);justify-content:space-between;padding:var(--navbar-padding,var(--spacing-s,.5rem));position:relative;transition:var(--nav-transition,background var(--transition-duration-fast,.12s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),transform var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)),box-shadow var(--transition-duration-medium,.18s) var(--transition-timing-function-deceleration-curve,cubic-bezier(0,0,.2,1)));z-index:var(--navbar-z-index,100)}:host([inverted]){--color:var(--on-primary);--text:var(--primary)}:host([fixed]){left:0;position:fixed;top:0;width:100%}:host([shadow]){box-shadow:var(--nav-elevation,0 1px 3px 0 #0000004d,0 4px 8px 3px #00000026)}#left,#right,#title,::slotted([slot=left]),::slotted([slot=right]),::slotted([slot=title]){align-items:center;display:flex;height:100%}#title,::slotted([slot=title]){font-size:var(--nav-title-font-size,var(--font-size-l,1.25rem));margin:var(--nav-title-margin,0 0 0 var(--spacing-l,1.25rem))}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
@@ -0,0 +1 @@
1
+ export * from "./chip.js";
package/chip/index.js ADDED
@@ -0,0 +1 @@
1
+ export { TkChip } from './chip.js';
@@ -11,7 +11,6 @@ declare class TkDrawer extends LitElement {
11
11
  swipeable: boolean;
12
12
  private $drawer;
13
13
  private mql;
14
- private pointerListener;
15
14
  render(): import("lit-html").TemplateResult<1>;
16
15
  updated(props: any): void;
17
16
  protected overMediaQuery(): void;
@@ -20,6 +19,12 @@ declare class TkDrawer extends LitElement {
20
19
  show(): void;
21
20
  hide(): void;
22
21
  toggle(): void;
22
+ swipeX: number;
23
+ swipeY: number;
24
+ isHorizontalSwipe: boolean;
25
+ touchStart(event: TouchEvent): void;
26
+ touchMove(event: TouchEvent): void;
27
+ touchEnd(event: TouchEvent): void;
23
28
  }
24
29
  declare global {
25
30
  interface HTMLElementTagNameMap {
package/drawer/drawer.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import { LitElement, html, css, unsafeCSS } from 'lit';
3
- import { property, query, customElement } from 'lit/decorators.js';
3
+ import { property, query, eventOptions, customElement } from 'lit/decorators.js';
4
4
  import css_248z from './drawer.scss.js';
5
- import { Direction, Pan, PointerListener, Tap } from 'contactjs';
6
5
 
7
6
  let TkDrawer = class TkDrawer extends LitElement {
8
7
  constructor() {
@@ -11,6 +10,9 @@ let TkDrawer = class TkDrawer extends LitElement {
11
10
  this.over = false;
12
11
  this.right = false;
13
12
  this.swipeable = false;
13
+ this.swipeX = 0;
14
+ this.swipeY = 0;
15
+ this.isHorizontalSwipe = false;
14
16
  }
15
17
  set open(value) {
16
18
  if (value === this._open)
@@ -28,11 +30,11 @@ let TkDrawer = class TkDrawer extends LitElement {
28
30
  }
29
31
  render() {
30
32
  return html `
31
- <div class="container fi">
33
+ <div class="container">
32
34
  <slot name="drawer-container"></slot>
33
35
  </div>
34
36
  <div class="overlay" @click=${() => (this.open = false)}></div>
35
- <div class="drawer">
37
+ <div class="drawer" @touchstart=${this.touchStart} @touchmove=${this.touchMove} @touchend=${this.touchEnd}>
36
38
  <div class="drawer-header">
37
39
  <slot name="drawer-header"></slot>
38
40
  </div>
@@ -42,7 +44,9 @@ let TkDrawer = class TkDrawer extends LitElement {
42
44
  <div class="drawer-footer">
43
45
  <slot name="drawer-footer"></slot>
44
46
  </div>
47
+ <div class="drawer-swipe"></div>
45
48
  </div>
49
+
46
50
  `;
47
51
  }
48
52
  updated(props) {
@@ -52,49 +56,11 @@ let TkDrawer = class TkDrawer extends LitElement {
52
56
  if (window.matchMedia(this.openQuery).matches)
53
57
  this.show();
54
58
  }
55
- if (props.has("swipeable") && this.swipeable) {
56
- var panOptions = {
57
- supportedDirections: [Direction.Left, Direction.Right],
58
- bubbles: false
59
- };
60
- var panRecognizer = new Pan(this.$drawer, panOptions);
61
- this.pointerListener = new PointerListener(this.$drawer, {
62
- DEBUG: true,
63
- DEBUG_GESTURES: true,
64
- // handleTouchEvents : false,
65
- supportedGestures: [Tap, panRecognizer],
66
- bubbles: false
67
- });
68
- this.$drawer.addEventListener("tap", (event) => {
69
- var _a;
70
- const { x, y } = event.detail.live.srcEvent;
71
- const el = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.elementFromPoint(x, y);
72
- if (el)
73
- el.click();
74
- });
75
- this.$drawer.addEventListener("panstart", (event) => {
76
- this.$drawer.style.transition = "transform 0ms ease";
77
- });
78
- this.$drawer.addEventListener("pan", (event) => {
79
- var x = event.detail.global.deltaX > 0 ? 0 : event.detail.global.deltaX;
80
- var y = 0;
81
- var transformString = "translate3d(" + x + "px, " + y + "px, 0)";
82
- requestAnimationFrame(_ => {
83
- this.$drawer.style.transform = transformString;
84
- });
85
- });
86
- this.$drawer.addEventListener("panend", (event) => {
87
- requestAnimationFrame(_ => {
88
- this.$drawer.style.transition = "";
89
- this.$drawer.style.transform = "";
90
- this.open = event.detail.global.deltaX < -50 ? false : true;
91
- });
59
+ if (props.has("open") && this.swipeable) {
60
+ requestAnimationFrame(_ => {
61
+ this.$drawer.removeAttribute('style');
92
62
  });
93
63
  }
94
- if (props.has("swipeable") && !this.swipeable) {
95
- this.pointerListener && this.pointerListener.destroy();
96
- this.pointerListener = null;
97
- }
98
64
  }
99
65
  overMediaQuery() {
100
66
  if (this.mql)
@@ -120,6 +86,47 @@ let TkDrawer = class TkDrawer extends LitElement {
120
86
  toggle() {
121
87
  this.open = !this.open;
122
88
  }
89
+ touchStart(event) {
90
+ if (!this.swipeable)
91
+ return;
92
+ this.$drawer.style.transition = "transform 0ms ease";
93
+ this.swipeX = event.touches[0].clientX;
94
+ this.swipeY = event.touches[0].clientY;
95
+ }
96
+ touchMove(event) {
97
+ if (!this.swipeable)
98
+ return;
99
+ const deltaX = event.touches[0].clientX - this.swipeX;
100
+ const deltaY = event.touches[0].clientY - this.swipeY;
101
+ this.isHorizontalSwipe = Math.abs(deltaX) > Math.abs(deltaY);
102
+ if (!this.isHorizontalSwipe)
103
+ return;
104
+ var x = this.open ?
105
+ deltaX > 0 ? 0 : deltaX :
106
+ deltaX < 0 ? 0 : deltaX;
107
+ var transformString;
108
+ this.open ?
109
+ transformString = "translateX(" + x + "px)" :
110
+ transformString = `translateX(min(calc(-100% + 10px + ${x}px), 0px)`;
111
+ requestAnimationFrame(_ => {
112
+ this.$drawer.style.transform = transformString;
113
+ });
114
+ }
115
+ touchEnd(event) {
116
+ if (!this.swipeable)
117
+ return;
118
+ requestAnimationFrame(_ => {
119
+ this.$drawer.removeAttribute('style');
120
+ });
121
+ const deltaX = event.changedTouches[0].clientX - this.swipeX;
122
+ if (this.isHorizontalSwipe && this.open)
123
+ this.open = -50 > deltaX ? false : true;
124
+ else if (this.isHorizontalSwipe && !this.open) {
125
+ console.log("bbb", deltaX, 50 < Math.abs(deltaX) ? true : false);
126
+ this.open = 50 < deltaX ? true : false;
127
+ }
128
+ this.isHorizontalSwipe = false;
129
+ }
123
130
  };
124
131
  TkDrawer.styles = css `
125
132
  ${unsafeCSS(css_248z)}
@@ -145,6 +152,15 @@ __decorate([
145
152
  __decorate([
146
153
  query("div.drawer")
147
154
  ], TkDrawer.prototype, "$drawer", void 0);
155
+ __decorate([
156
+ eventOptions({ passive: true })
157
+ ], TkDrawer.prototype, "touchStart", null);
158
+ __decorate([
159
+ eventOptions({ passive: true })
160
+ ], TkDrawer.prototype, "touchMove", null);
161
+ __decorate([
162
+ eventOptions({ passive: true })
163
+ ], TkDrawer.prototype, "touchEnd", null);
148
164
  TkDrawer = __decorate([
149
165
  customElement("tk-drawer")
150
166
  ], TkDrawer);
@@ -1,4 +1,4 @@
1
- var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:var(--background,#f7f7f7);color:var(--foreground,#454545);display:flex;flex-direction:column;height:100%;overflow:hidden;position:absolute;top:0;touch-action:pan-y;transform:translateX(-100%);transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);width:var(--drawer-width,256px);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-content{flex:1;overflow-y:auto}:host([right]) .drawer{right:0;transform:translateX(100%)}.overlay{background-color:rgba(0,0,0,.502);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{background-color:var(--background,#f7f7f7);height:100%;overflow:auto;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:var(--background,#f7f7f7);color:var(--foreground,#454545);display:flex;flex-direction:column;height:100%;overflow:hidden;position:absolute;top:0;touch-action:pan-y;transform:translateX(-100%);transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);width:var(--drawer-width,256px);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-content{flex:1;overflow-y:auto}:host([right]) .drawer{right:0;transform:translateX(100%)}.overlay{background-color:rgba(0,0,0,.502);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{background-color:var(--background,#f7f7f7);height:100%;overflow:auto;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
1
+ var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{background-color:hsl(var(--surface));display:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:hsl(var(--surface));bottom:0;display:grid;grid-template-areas:\"header swipe\" \"content swipe\" \"footer swipe\";grid-template-columns:var(--drawer-width,256px) 10px;grid-template-rows:auto 1fr auto;overflow:hidden;position:absolute;top:0;touch-action:pan-y;transform:translateX(calc(-100% + 10px));transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-header{grid-area:header}.drawer .drawer-content{grid-area:content;overflow:auto;padding:12px}.drawer .drawer-footer{grid-area:footer}.drawer .drawer-swipe{background-color:initial;grid-area:swipe}:host([right]) .drawer{right:0;transform:translateX(calc(100% + 10px))}.overlay{background-color:#00000080;bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{height:100%;overflow:auto;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .drawer{background-color:hsl(var(--surface-container-low));box-shadow:0 1px 2px 0 #0000004d,0 1px 3px 1px #00000026}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{background-color:hsl(var(--surface));display:block;height:100%;overflow:hidden;position:relative;width:100%}.drawer{background-color:hsl(var(--surface));bottom:0;display:grid;grid-template-areas:\"header swipe\" \"content swipe\" \"footer swipe\";grid-template-columns:var(--drawer-width,256px) 10px;grid-template-rows:auto 1fr auto;overflow:hidden;position:absolute;top:0;touch-action:pan-y;transform:translateX(calc(-100% + 10px));transition:transform cubic-bezier(.4,0,.2,1) var(--transition-duration-medium,.18s);will-change:transform;z-index:var(--drawer-z-index,200)}.drawer .drawer-header{grid-area:header}.drawer .drawer-content{grid-area:content;overflow:auto;padding:12px}.drawer .drawer-footer{grid-area:footer}.drawer .drawer-swipe{background-color:initial;grid-area:swipe}:host([right]) .drawer{right:0;transform:translateX(calc(100% + 10px))}.overlay{background-color:#00000080;bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:var(--drawer-overlay-z-index,200)}.container{height:100%;overflow:auto;transition:padding cubic-bezier(.4,0,.2,1) var(--transition-duration-slow,.25s)}:host([open]) .drawer{transform:none}:host([open]) .container{padding-left:var(--drawer-width,256px)}:host([open][over]) .drawer{background-color:hsl(var(--surface-container-low));box-shadow:0 1px 2px 0 #0000004d,0 1px 3px 1px #00000026}:host([open][over]) .container{padding-left:0}:host([open][over]) .overlay{display:block}@media (max-width:var(--drawer-trigger-width,400px)){:host([open]) .container{padding-left:0}:host([open]) .overlay{display:block}}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
package/form/form.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { LitElement } from "lit";
2
2
  declare class TkForm extends LitElement {
3
3
  value: any;
4
- protected createRenderRoot(): Element | ShadowRoot;
5
4
  connectedCallback(): void;
6
5
  disconnectedCallback(): void;
7
6
  submit(e: Event): void;
package/form/form.js CHANGED
@@ -3,9 +3,6 @@ import { LitElement } from 'lit';
3
3
  import { property, customElement } from 'lit/decorators.js';
4
4
 
5
5
  let TkForm = class TkForm extends LitElement {
6
- createRenderRoot() {
7
- return this;
8
- }
9
6
  connectedCallback() {
10
7
  super.connectedCallback();
11
8
  this.addEventListener("submit", this.submit);
package/index.d.ts CHANGED
@@ -3,13 +3,15 @@ export * from "./badge/index.js";
3
3
  export * from "./box/index.js";
4
4
  export * from "./button/index.js";
5
5
  export * from "./checkbox/index.js";
6
+ export * from "./chip/index.js";
6
7
  export * from "./dialog/index.js";
7
8
  export * from "./drawer/index.js";
8
9
  export * from "./form/index.js";
9
10
  export * from "./icon/index.js";
10
11
  export * from "./list-item/index.js";
11
12
  export * from "./loading/index.js";
12
- export * from "./navbar/index.js";
13
+ export * from "./navigation/index.js";
14
+ export * from "./topbar/index.js";
13
15
  export * from "./notie/index.js";
14
16
  export * from "./pages/index.js";
15
17
  export * from "./radio/index.js";
@@ -17,7 +19,6 @@ export * from "./select/index.js";
17
19
  export * from "./slider/index.js";
18
20
  export * from "./switch/index.js";
19
21
  export * from "./tab-group/index.js";
20
- export * from "./tag/index.js";
21
22
  export * from "./textarea/index.js";
22
23
  export * from "./textfield/index.js";
23
24
  export * from "./theme/index.js";
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../tinkiet/index.ts"],"names":[],"mappings":"AAAA,qCAA4B;AAC5B,iCAAwB;AACxB,+BAAsB;AACtB,kCAAyB;AACzB,oCAA2B;AAC3B,kCAAyB;AACzB,kCAAyB;AACzB,gCAAuB;AACvB,gCAAuB;AACvB,qCAA4B;AAC5B,mCAA0B;AAC1B,kCAAyB;AACzB,iCAAwB;AACxB,iCAAwB;AACxB,iCAAwB;AACxB,kCAAyB;AACzB,kCAAyB;AACzB,kCAAyB;AACzB,qCAA4B;AAC5B,+BAAsB;AACtB,oCAA2B;AAC3B,qCAA4B;AAC5B,iCAAwB;AACxB,mCAA0B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../tinkiet/index.ts"],"names":[],"mappings":"AAAA,qCAA4B;AAC5B,iCAAwB;AACxB,+BAAsB;AACtB,kCAAyB;AACzB,oCAA2B;AAC3B,gCAAuB;AACvB,kCAAyB;AACzB,kCAAyB;AACzB,gCAAuB;AACvB,gCAAuB;AACvB,qCAA4B;AAC5B,mCAA0B;AAC1B,sCAA6B;AAC7B,kCAAyB;AACzB,iCAAwB;AACxB,iCAAwB;AACxB,iCAAwB;AACxB,kCAAyB;AACzB,kCAAyB;AACzB,kCAAyB;AACzB,qCAA4B;AAC5B,oCAA2B;AAC3B,qCAA4B;AAC5B,iCAAwB;AACxB,mCAA0B"}
package/index.js CHANGED
@@ -3,13 +3,15 @@ import './badge/index.js';
3
3
  import './box/index.js';
4
4
  import './button/index.js';
5
5
  import './checkbox/index.js';
6
+ import './chip/index.js';
6
7
  import './dialog/index.js';
7
8
  import './drawer/index.js';
8
9
  import './form/index.js';
9
10
  import './icon/index.js';
10
11
  import './list-item/index.js';
11
12
  import './loading/index.js';
12
- import './navbar/index.js';
13
+ import './navigation/index.js';
14
+ import './topbar/index.js';
13
15
  import './notie/index.js';
14
16
  import './pages/index.js';
15
17
  import './radio/index.js';
@@ -17,7 +19,6 @@ import './select/index.js';
17
19
  import './slider/index.js';
18
20
  import './switch/index.js';
19
21
  import './tab-group/index.js';
20
- import './tag/index.js';
21
22
  import './textarea/index.js';
22
23
  import './textfield/index.js';
23
24
  import './theme/index.js';
@@ -27,6 +28,7 @@ export { TkBadge } from './badge/badge.js';
27
28
  export { TkBox } from './box/box.js';
28
29
  export { TkButton } from './button/button.js';
29
30
  export { TkCheckbox } from './checkbox/checkbox.js';
31
+ export { TkChip } from './chip/chip.js';
30
32
  export { TkDialog } from './dialog/dialog.js';
31
33
  export { TkDrawer } from './drawer/drawer.js';
32
34
  export { TkForm } from './form/form.js';
@@ -34,7 +36,9 @@ export { TkIcon } from './icon/icon.js';
34
36
  export { TkIcons } from './icon/icons.js';
35
37
  export { TkListItem } from './list-item/list-item.js';
36
38
  export { TkLoading } from './loading/loading.js';
37
- export { TkNavbar } from './navbar/navbar.js';
39
+ export { TkNavigationBar } from './navigation/navigation-bar.js';
40
+ export { TkNavigationItem } from './navigation/navigation-item.js';
41
+ export { TkTopbar } from './topbar/topbar.js';
38
42
  export { NotieLevel, TkNotie } from './notie/notie.js';
39
43
  export { TkPages } from './pages/pages.js';
40
44
  export { TkRadio } from './radio/radio.js';
@@ -42,7 +46,6 @@ export { TkSelect } from './select/select.js';
42
46
  export { TkSlider } from './slider/slider.js';
43
47
  export { TkSwitch } from './switch/switch.js';
44
48
  export { TkTabGroup } from './tab-group/tab-group.js';
45
- export { TkTag } from './tag/tag.js';
46
49
  export { TkTextarea } from './textarea/textarea.js';
47
50
  export { TkTextfield } from './textfield/textfield.js';
48
51
  export { TkTheme } from './theme/theme.js';
@@ -10,6 +10,7 @@ declare class TkListItem extends TkBox {
10
10
  firstUpdated(): void;
11
11
  connectedCallback(): void;
12
12
  disconnectedCallback(): void;
13
+ protected onKeyDown(e: KeyboardEvent): void;
13
14
  protected handleClick(e: Event): void;
14
15
  }
15
16
  declare global {
@@ -39,11 +39,20 @@ let TkListItem = class TkListItem extends TkBox {
39
39
  }
40
40
  connectedCallback() {
41
41
  super.connectedCallback();
42
+ this.addEventListener("keydown", this.onKeyDown.bind(this));
42
43
  this.addEventListener("click", this.handleClick.bind(this));
43
44
  }
44
45
  disconnectedCallback() {
45
- this.removeEventListener("click", this.handleClick);
46
46
  super.disconnectedCallback();
47
+ this.removeEventListener("click", this.handleClick);
48
+ this.removeEventListener("keydown", this.onKeyDown);
49
+ }
50
+ onKeyDown(e) {
51
+ if (e.code === "Space" || e.code === "Enter") {
52
+ e.preventDefault();
53
+ e.stopPropagation();
54
+ this.click();
55
+ }
47
56
  }
48
57
  handleClick(e) {
49
58
  const target = e.target;
@@ -1,4 +1,4 @@
1
- var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--text:var(--list-item-color,var(--foreground,#454545));--color:var(--list-item-bg,var(--background,#f7f7f7));align-items:center;background:var(--color);border-radius:var(--list-item-border-radius,var(--border-radius-large,.5rem));color:var(--text);display:flex;flex-direction:row;outline:none;overflow:hidden;padding:var(--spacing-m,1rem) var(--spacing-m,1rem);position:relative;text-align:left;transition:var(--list-item-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([clickable]),:host([href]){user-select:none}:host([clickable]:not([active]):not([disabled])),:host([href]:not([active]):not([disabled])){cursor:pointer}:host(:focus),:host(:hover){--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)));will-change:background,color}:host([active]:focus),:host([active]:hover){--text:var(--primary-darker,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*0.7)));--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)))}:host([disabled]){--text:var(--shade-dark,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*0.85)));--color:var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%)));opacity:.4;pointer-events:none}:host([active]){--text:var(--primary-darker,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*0.7)));--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)))}::slotted([slot=after]),::slotted([slot=before]){flex-shrink:0}::slotted([slot=before]){align-self:var(--list-item-left-align-self,center);margin:0 var(--spacing-m,1rem) 0 0}::slotted([slot=after]){align-self:var(--list-item-left-align-self,center);margin:0 0 0 var(--spacing-m,1rem)}#content{display:flex;flex-direction:column;flex-grow:1}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--text:var(--list-item-color,var(--foreground,#454545));--color:var(--list-item-bg,var(--background,#f7f7f7));align-items:center;background:var(--color);border-radius:var(--list-item-border-radius,var(--border-radius-large,.5rem));color:var(--text);display:flex;flex-direction:row;outline:none;overflow:hidden;padding:var(--spacing-m,1rem) var(--spacing-m,1rem);position:relative;text-align:left;transition:var(--list-item-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([clickable]),:host([href]){user-select:none}:host([clickable]:not([active]):not([disabled])),:host([href]:not([active]):not([disabled])){cursor:pointer}:host(:focus),:host(:hover){--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)));will-change:background,color}:host([active]:focus),:host([active]:hover){--text:var(--primary-darker,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*0.7)));--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)))}:host([disabled]){--text:var(--shade-dark,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*0.85)));--color:var(--shade,hsl(var(--shade-h,0),var(--shade-s,0%),var(--shade-l,66.6667%)));opacity:.4;pointer-events:none}:host([active]){--text:var(--primary-darker,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),calc(var(--primary-l, 59.4118%)*0.7)));--color:var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3)))}::slotted([slot=after]),::slotted([slot=before]){flex-shrink:0}::slotted([slot=before]){align-self:var(--list-item-left-align-self,center);margin:0 var(--spacing-m,1rem) 0 0}::slotted([slot=after]){align-self:var(--list-item-left-align-self,center);margin:0 0 0 var(--spacing-m,1rem)}#content{display:flex;flex-direction:column;flex-grow:1}";
1
+ var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{align-items:center;border-radius:28px;color:hsl(var(--on-surface-variant));display:flex;flex-direction:row;height:56px;outline:none;overflow:hidden;padding:0 24px 0 16px;position:relative;text-align:left}:host([clickable]),:host([href]){user-select:none}:host([clickable]:not([active]):not([disabled])),:host([href]:not([active]):not([disabled])){cursor:pointer}:host(:focus),:host(:hover){background-color:hsla(var(--on-surface),.08);color:hsl(var(--on-surface));will-change:background,color}:host([active]){background-color:hsla(var(--secondary-container),1);color:hsl(var(--on-secondary-container))}:host([active]:focus),:host([active]:hover){background-color:hsla(var(--secondary-container),1);color:hsl(var(--on-secondary-container))}:host([disabled]){background:hsla(var(--surface-container-highest),.12);color:hsl(var(--on-surface-variant));opacity:.4;pointer-events:none}::slotted([slot=after]),::slotted([slot=before]){flex-shrink:0}::slotted([slot=before]){align-self:var(--list-item-left-align-self,center);margin:0 var(--spacing-m,1rem) 0 0}::slotted([slot=after]){align-self:var(--list-item-left-align-self,center);margin:0 0 0 var(--spacing-m,1rem)}#content{display:flex;flex-direction:column;flex-grow:1;max-width:100%}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{align-items:center;border-radius:28px;color:hsl(var(--on-surface-variant));display:flex;flex-direction:row;height:56px;outline:none;overflow:hidden;padding:0 24px 0 16px;position:relative;text-align:left}:host([clickable]),:host([href]){user-select:none}:host([clickable]:not([active]):not([disabled])),:host([href]:not([active]):not([disabled])){cursor:pointer}:host(:focus),:host(:hover){background-color:hsla(var(--on-surface),.08);color:hsl(var(--on-surface));will-change:background,color}:host([active]){background-color:hsla(var(--secondary-container),1);color:hsl(var(--on-secondary-container))}:host([active]:focus),:host([active]:hover){background-color:hsla(var(--secondary-container),1);color:hsl(var(--on-secondary-container))}:host([disabled]){background:hsla(var(--surface-container-highest),.12);color:hsl(var(--on-surface-variant));opacity:.4;pointer-events:none}::slotted([slot=after]),::slotted([slot=before]){flex-shrink:0}::slotted([slot=before]){align-self:var(--list-item-left-align-self,center);margin:0 var(--spacing-m,1rem) 0 0}::slotted([slot=after]){align-self:var(--list-item-left-align-self,center);margin:0 0 0 var(--spacing-m,1rem)}#content{display:flex;flex-direction:column;flex-grow:1;max-width:100%}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
@@ -1,4 +1,4 @@
1
- var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:currentColor;--background-color:var(--tk-loading-background-color,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))))}:host([accent]){--color:var(--accent)}:host([error]){--color:var(--error)}.circle{animation:rotator 3s linear infinite;display:inline-flex;height:2em;width:2em}.circle,.circle .path{transform-origin:center}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}to{stroke-dashoffset:265;transform:rotate(1turn)}}.line{background-color:var(--background-color);height:.4em;overflow:hidden;position:relative}.line .progress{height:100%}.line .indeterminate,.line .progress{background-color:var(--color)}.line .indeterminate:before{animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.line .indeterminate:after,.line .indeterminate:before{background-color:inherit;bottom:0;content:\"\";left:0;position:absolute;top:0;will-change:left,right}.line .indeterminate:after{animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}";
2
- var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:currentColor;--background-color:var(--tk-loading-background-color,var(--shade-lighter,hsl(var(--shade-h,0),var(--shade-s,0%),calc(var(--shade-l, 66.6667%)*1.3))))}:host([accent]){--color:var(--accent)}:host([error]){--color:var(--error)}.circle{animation:rotator 3s linear infinite;display:inline-flex;height:2em;width:2em}.circle,.circle .path{transform-origin:center}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}to{stroke-dashoffset:265;transform:rotate(1turn)}}.line{background-color:var(--background-color);height:.4em;overflow:hidden;position:relative}.line .progress{height:100%}.line .indeterminate,.line .progress{background-color:var(--color)}.line .indeterminate:before{animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.line .indeterminate:after,.line .indeterminate:before{background-color:inherit;bottom:0;content:\"\";left:0;position:absolute;top:0;will-change:left,right}.line .indeterminate:after{animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}";
1
+ var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:hsl(var(--primary));--background-color:var(--tk-loading-background-color,hsl(var(--surface-dim)))}:host([secondary]){--color:hsl(var(--secondary))}:host([error]){--color:hsl(var(--error))}.circle{animation:rotator 3s linear infinite;display:inline-flex;height:56px;width:56px}.circle,.circle .path{transform-origin:center}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}to{stroke-dashoffset:265;transform:rotate(1turn)}}:host([small]) .circle{height:20px;width:20px}:host([small]) .line{height:2px}:host([large]) .circle{height:96px;width:96px}:host([large]) .line{height:14px}.line{background-color:var(--background-color);height:6px;overflow:hidden;position:relative}.line .progress{height:100%}.line .indeterminate,.line .progress{background-color:var(--color)}.line .indeterminate:before{animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.line .indeterminate:after,.line .indeterminate:before{background-color:inherit;bottom:0;content:\"\";left:0;position:absolute;top:0;will-change:left,right}.line .indeterminate:after{animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{--color:hsl(var(--primary));--background-color:var(--tk-loading-background-color,hsl(var(--surface-dim)))}:host([secondary]){--color:hsl(var(--secondary))}:host([error]){--color:hsl(var(--error))}.circle{animation:rotator 3s linear infinite;display:inline-flex;height:56px;width:56px}.circle,.circle .path{transform-origin:center}.circle .path{stroke-dasharray:265;stroke-dashoffset:0;stroke:var(--color);animation:dash 3s ease-in-out infinite}@keyframes rotator{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes dash{0%{stroke-dashoffset:265}50%{stroke-dashoffset:65;transform:rotate(90deg)}to{stroke-dashoffset:265;transform:rotate(1turn)}}:host([small]) .circle{height:20px;width:20px}:host([small]) .line{height:2px}:host([large]) .circle{height:96px;width:96px}:host([large]) .line{height:14px}.line{background-color:var(--background-color);height:6px;overflow:hidden;position:relative}.line .progress{height:100%}.line .indeterminate,.line .progress{background-color:var(--color)}.line .indeterminate:before{animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.line .indeterminate:after,.line .indeterminate:before{background-color:inherit;bottom:0;content:\"\";left:0;position:absolute;top:0;will-change:left,right}.line .indeterminate:after{animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
@@ -0,0 +1,2 @@
1
+ export * from "./navigation-bar.js";
2
+ export * from "./navigation-item.js";
@@ -0,0 +1,2 @@
1
+ export { TkNavigationBar } from './navigation-bar.js';
2
+ export { TkNavigationItem } from './navigation-item.js';
@@ -0,0 +1,11 @@
1
+ import { LitElement } from "lit";
2
+ declare class TkNavigationBar extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
6
+ declare global {
7
+ interface HTMLElementTagNameMap {
8
+ "tk-navigation-bar": TkNavigationBar;
9
+ }
10
+ }
11
+ export { TkNavigationBar };
@@ -0,0 +1,20 @@
1
+ import { __decorate } from 'tslib';
2
+ import { LitElement, html, css, unsafeCSS } from 'lit';
3
+ import { customElement } from 'lit/decorators.js';
4
+ import css_248z from './navigation-bar.scss.js';
5
+
6
+ let TkNavigationBar = class TkNavigationBar extends LitElement {
7
+ render() {
8
+ return html `
9
+ <slot></slot>
10
+ `;
11
+ }
12
+ };
13
+ TkNavigationBar.styles = css `
14
+ ${unsafeCSS(css_248z)}
15
+ `;
16
+ TkNavigationBar = __decorate([
17
+ customElement("tk-navigation-bar")
18
+ ], TkNavigationBar);
19
+
20
+ export { TkNavigationBar };
@@ -0,0 +1,4 @@
1
+ var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host slot{display:flex;justify-content:space-between}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host slot{display:flex;justify-content:space-between}";
3
+
4
+ export { css_248z as default, stylesheet };
@@ -0,0 +1,15 @@
1
+ import { LitElement } from "lit";
2
+ declare class TkNavigationItem extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ label: string;
5
+ iconPath: string;
6
+ activeIconPath: string;
7
+ active: boolean;
8
+ render(): import("lit-html").TemplateResult<1>;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ "tk-navigation-item": TkNavigationItem;
13
+ }
14
+ }
15
+ export { TkNavigationItem };
@@ -0,0 +1,51 @@
1
+ import { __decorate } from 'tslib';
2
+ import { LitElement, html, css, unsafeCSS } from 'lit';
3
+ import { property, customElement } from 'lit/decorators.js';
4
+ import css_248z from './navigation-item.scss.js';
5
+
6
+ let TkNavigationItem = class TkNavigationItem extends LitElement {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.label = "";
10
+ this.iconPath = "";
11
+ this.activeIconPath = "";
12
+ this.active = false;
13
+ }
14
+ render() {
15
+ return html `
16
+ <tk-box align-items="center">
17
+ <tk-box ripple overflow="hidden" tabindex="0" class="indicator">
18
+ <tk-icon path=${this.active && this.activeIconPath ? this.activeIconPath : this.iconPath}></tk-icon>
19
+ <span class="badge">
20
+ <slot name="badge"></slot>
21
+ </span>
22
+ </tk-box>
23
+ ${this.label
24
+ ? html `
25
+ <span class="label">${this.label}</span>
26
+ `
27
+ : ""}
28
+ </tk-box>
29
+ `;
30
+ }
31
+ };
32
+ TkNavigationItem.styles = css `
33
+ ${unsafeCSS(css_248z)}
34
+ `;
35
+ __decorate([
36
+ property()
37
+ ], TkNavigationItem.prototype, "label", void 0);
38
+ __decorate([
39
+ property()
40
+ ], TkNavigationItem.prototype, "iconPath", void 0);
41
+ __decorate([
42
+ property()
43
+ ], TkNavigationItem.prototype, "activeIconPath", void 0);
44
+ __decorate([
45
+ property({ type: Boolean })
46
+ ], TkNavigationItem.prototype, "active", void 0);
47
+ TkNavigationItem = __decorate([
48
+ customElement("tk-navigation-item")
49
+ ], TkNavigationItem);
50
+
51
+ export { TkNavigationItem };
@@ -0,0 +1,4 @@
1
+ var css_248z = "*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{cursor:pointer}:host .indicator{align-items:center;border-radius:16px;display:flex;height:32px;justify-content:center;margin-bottom:4px;outline:none;position:relative;width:64px}:host .indicator tk-icon{height:24px;width:24px}:host .indicator .badge{display:flex;left:35px;position:absolute;top:4px}:host .label{font-size:12px;font-weight:500;line-height:16px;margin-top:4px}:host([active]){color:hsl(var(--on-secondary-container))}:host([active]) .indicator{background-color:hsl(var(--secondary-container))}:host(:hover){color:hsl(var(--on-surface-variant))}:host(:hover) .indicator{background-color:hsla(var(--on-surface-variant),.08)}:host(:focus){color:hsl(var(--on-surface-variant))}:host(:focus) .indicator{background-color:hsla(var(--on-surface-variant),.12)}:host([active]:hover){color:hsl(var(--on-surface))}:host([active]:hover) .indicator{background-color:hsla(var(--on-surface),.08)}:host([active]:focus){color:hsl(var(--on-surface))}:host([active]:focus) .indicator{background-color:hsl(var(--on-surface),.12)}";
2
+ var stylesheet="*{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box}:host{cursor:pointer}:host .indicator{align-items:center;border-radius:16px;display:flex;height:32px;justify-content:center;margin-bottom:4px;outline:none;position:relative;width:64px}:host .indicator tk-icon{height:24px;width:24px}:host .indicator .badge{display:flex;left:35px;position:absolute;top:4px}:host .label{font-size:12px;font-weight:500;line-height:16px;margin-top:4px}:host([active]){color:hsl(var(--on-secondary-container))}:host([active]) .indicator{background-color:hsl(var(--secondary-container))}:host(:hover){color:hsl(var(--on-surface-variant))}:host(:hover) .indicator{background-color:hsla(var(--on-surface-variant),.08)}:host(:focus){color:hsl(var(--on-surface-variant))}:host(:focus) .indicator{background-color:hsla(var(--on-surface-variant),.12)}:host([active]:hover){color:hsl(var(--on-surface))}:host([active]:hover) .indicator{background-color:hsla(var(--on-surface),.08)}:host([active]:focus){color:hsl(var(--on-surface))}:host([active]:focus) .indicator{background-color:hsl(var(--on-surface),.12)}";
3
+
4
+ export { css_248z as default, stylesheet };
@@ -1,4 +1,4 @@
1
- var css_248z = ":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.force{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
2
- var stylesheet=":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:var(--primary,hsl(var(--primary-h,258.987),var(--primary-s,38.1643%),var(--primary-l,59.4118%)));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:var(--on-primary,hsl(var(--on-primary-h,0),var(--on-primary-s,0%),var(--on-primary-l,100%)));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.force{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
1
+ var css_248z = ":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:hsl(var(--primary));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:hsl(var(--on-primary));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.force{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
2
+ var stylesheet=":host{bottom:0;display:none;font-size:1.6rem;left:0;margin:0;position:fixed;right:0;top:0}:host .overlay{background-color:rgba(0,0,0,.502);bottom:0;left:0;position:fixed;right:0;top:0;z-index:var(--notie-z-index,400)}:host .container{background-color:hsl(var(--primary));bottom:0;box-shadow:10px 10px 10px 10px var(--shadow);color:hsl(var(--on-primary));height:fit-content;left:0;position:fixed;right:0;text-align:center;transform:translateY(100%);transition:all .15s ease-in;z-index:calc(var(--notie-z-index, 400) + 1)}:host .container.info{background-color:#4d82d6}:host .container.error{background-color:#e1715b}:host .container.warning{background-color:#d6a14d}:host .container.success{background-color:#57bf57}:host .text{padding:.5em}:host .input{--input-font-size:$font-size-widescreen;background-color:var(--background,#fff);color:var(--foreground,#000);text-align:center}:host .button{cursor:pointer;padding:.5em}:host .button.confirm,:host .button.force{background-color:#57bf57;color:#fff}:host .button.cancel{background-color:var(--error,#e1715b);color:var(--on-error,#fff)}@media screen and (max-width:900px){:host{font-size:1.4rem}}@media screen and (max-width:750px){:host{font-size:1.2rem}}@media screen and (max-width:400px){:host{font-size:1rem}}:host([position=top]) .container{bottom:inherit;position:fixed;top:0;transform:translateY(-100%)}:host([open]) .container{transform:translateY(0)}";
3
3
 
4
4
  export { css_248z as default, stylesheet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinkiet",
3
- "version": "0.8.20",
3
+ "version": "0.9.1",
4
4
  "description": "Pragmatic UI Web Components",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -23,8 +23,7 @@
23
23
  "license": "MIT",
24
24
  "homepage": "https://tinkiet.educ.cloud",
25
25
  "dependencies": {
26
- "contactjs": "^2.1.7",
27
- "lit": "^2.7.5",
26
+ "lit": "^3.1.2",
28
27
  "tslib": "^2.5.3"
29
28
  },
30
29
  "contributors": [
package/radio/radio.js CHANGED
@@ -18,13 +18,16 @@ let TkRadio = class TkRadio extends LitElement {
18
18
  render() {
19
19
  return html `
20
20
  <tk-box direction="row" align-items="center">
21
- <div tabindex="0" class="radio">
22
- <div id="dot"></div>
23
- </div>
21
+ <tk-box ripple tabindex="${this.disabled ? -1 : 0}" class="state">
22
+ <div class="radio">
23
+ <div id="dot"></div>
24
+ </div>
25
+ </tk-box>
24
26
  <span class="label"><slot></slot></span>
25
27
  </tk-box>
26
28
  <input
27
29
  id=${this._id}
30
+ hidden
28
31
  type="radio"
29
32
  style="position: absolute;left: 0;z-index: -1;"
30
33
  ?checked="${this.checked}"
@@ -52,6 +55,8 @@ let TkRadio = class TkRadio extends LitElement {
52
55
  this.appendChild(this.$input);
53
56
  }
54
57
  onKeyDown(e) {
58
+ if (this.disabled)
59
+ return;
55
60
  if (e.code === "Space" || e.code === "Enter") {
56
61
  e.preventDefault();
57
62
  e.stopPropagation();
@@ -59,6 +64,8 @@ let TkRadio = class TkRadio extends LitElement {
59
64
  }
60
65
  }
61
66
  handleClick() {
67
+ if (this.disabled)
68
+ return;
62
69
  this.checked = !this.checked;
63
70
  if (this.checked && this.name)
64
71
  this.getRootNode()