godown 2.6.0 → 2.6.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 (109) hide show
  1. package/lib/event-collection.d.ts +1 -1
  2. package/package.json +4 -4
  3. package/react/index.d.ts +0 -1
  4. package/react/index.d.ts.map +1 -1
  5. package/react/index.js +0 -3
  6. package/react/index.js.map +1 -1
  7. package/web-components/a/avatar-a.js +40 -40
  8. package/web-components/a/avatar-a.js.map +1 -1
  9. package/web-components/a/super-a.js +22 -22
  10. package/web-components/a/super-a.js.map +1 -1
  11. package/web-components/button/base-button.js +86 -86
  12. package/web-components/button/base-button.js.map +1 -1
  13. package/web-components/carousel/carousel-slider.d.ts +1 -1
  14. package/web-components/carousel/carousel-slider.d.ts.map +1 -1
  15. package/web-components/carousel/carousel-slider.js +70 -70
  16. package/web-components/carousel/carousel-slider.js.map +1 -1
  17. package/web-components/form/base-form.js +15 -15
  18. package/web-components/form/base-form.js.map +1 -1
  19. package/web-components/group/avatar-group.js +13 -13
  20. package/web-components/group/avatar-group.js.map +1 -1
  21. package/web-components/group/details-group.js +7 -7
  22. package/web-components/group/details-group.js.map +1 -1
  23. package/web-components/group/tab-group.js +45 -45
  24. package/web-components/group/tab-group.js.map +1 -1
  25. package/web-components/index.d.ts +0 -1
  26. package/web-components/index.d.ts.map +1 -1
  27. package/web-components/index.js +0 -1
  28. package/web-components/index.js.map +1 -1
  29. package/web-components/input/base-input.js +73 -73
  30. package/web-components/input/base-input.js.map +1 -1
  31. package/web-components/input/input.js +15 -15
  32. package/web-components/input/input.js.map +1 -1
  33. package/web-components/input/label-input.js +49 -49
  34. package/web-components/input/label-input.js.map +1 -1
  35. package/web-components/input/search-input.js +53 -53
  36. package/web-components/input/search-input.js.map +1 -1
  37. package/web-components/input/select-input.js +88 -88
  38. package/web-components/input/select-input.js.map +1 -1
  39. package/web-components/input/split-input.js +51 -51
  40. package/web-components/input/split-input.js.map +1 -1
  41. package/web-components/input/switch-input.js +36 -36
  42. package/web-components/input/switch-input.js.map +1 -1
  43. package/web-components/items/alert-item.js +32 -33
  44. package/web-components/items/alert-item.js.map +1 -1
  45. package/web-components/items/card-item.js +54 -54
  46. package/web-components/items/card-item.js.map +1 -1
  47. package/web-components/items/drag-box.js +8 -8
  48. package/web-components/items/drag-box.js.map +1 -1
  49. package/web-components/items/time-bar.js +8 -9
  50. package/web-components/items/time-bar.js.map +1 -1
  51. package/web-components/layout/divider-line.js +11 -11
  52. package/web-components/layout/divider-line.js.map +1 -1
  53. package/web-components/layout/flex-flow.js +7 -7
  54. package/web-components/layout/flex-flow.js.map +1 -1
  55. package/web-components/layout/nav-aside.js +14 -14
  56. package/web-components/layout/nav-aside.js.map +1 -1
  57. package/web-components/layout/nav-layout.js +26 -26
  58. package/web-components/layout/nav-layout.js.map +1 -1
  59. package/web-components/loading/loading-progress.d.ts +1 -1
  60. package/web-components/loading/loading-progress.d.ts.map +1 -1
  61. package/web-components/loading/loading-progress.js +28 -28
  62. package/web-components/loading/loading-progress.js.map +1 -1
  63. package/web-components/loading/skeleton-screen.js +19 -19
  64. package/web-components/loading/skeleton-screen.js.map +1 -1
  65. package/web-components/open/open-details.d.ts.map +1 -1
  66. package/web-components/open/open-details.js +73 -22
  67. package/web-components/open/open-details.js.map +1 -1
  68. package/web-components/open/open-dialog.d.ts +5 -16
  69. package/web-components/open/open-dialog.d.ts.map +1 -1
  70. package/web-components/open/open-dialog.js +92 -102
  71. package/web-components/open/open-dialog.js.map +1 -1
  72. package/web-components/open/open-offset.d.ts +0 -1
  73. package/web-components/open/open-offset.d.ts.map +1 -1
  74. package/web-components/open/open-offset.js +50 -53
  75. package/web-components/open/open-offset.js.map +1 -1
  76. package/web-components/open/open-tooltip.d.ts +2 -2
  77. package/web-components/open/open-tooltip.d.ts.map +1 -1
  78. package/web-components/open/open-tooltip.js +14 -15
  79. package/web-components/open/open-tooltip.js.map +1 -1
  80. package/web-components/open/open.d.ts +3 -2
  81. package/web-components/open/open.d.ts.map +1 -1
  82. package/web-components/open/open.js +13 -59
  83. package/web-components/open/open.js.map +1 -1
  84. package/web-components/text/clip-text.js +8 -8
  85. package/web-components/text/clip-text.js.map +1 -1
  86. package/web-components/text/overbreath-text.js +17 -17
  87. package/web-components/text/overbreath-text.js.map +1 -1
  88. package/web-components/text/typewriter-text.js +32 -32
  89. package/web-components/text/typewriter-text.js.map +1 -1
  90. package/web-components/view/route-view.d.ts +2 -2
  91. package/web-components/view/route-view.js +7 -7
  92. package/web-components/view/route-view.js.map +1 -1
  93. package/web-components/view/scroll-x.js +29 -29
  94. package/web-components/view/scroll-x.js.map +1 -1
  95. package/web-components/view/wrap-view.d.ts +1 -1
  96. package/web-components/view/wrap-view.js +15 -15
  97. package/web-components/view/wrap-view.js.map +1 -1
  98. package/open-list.d.ts +0 -2
  99. package/open-list.d.ts.map +0 -1
  100. package/open-list.js +0 -2
  101. package/open-list.js.map +0 -1
  102. package/web-components/layout/index.d.ts +0 -5
  103. package/web-components/layout/index.d.ts.map +0 -1
  104. package/web-components/layout/index.js +0 -6
  105. package/web-components/layout/index.js.map +0 -1
  106. package/web-components/open/open-list.d.ts +0 -20
  107. package/web-components/open/open-list.d.ts.map +0 -1
  108. package/web-components/open/open-list.js +0 -71
  109. package/web-components/open/open-list.js.map +0 -1
@@ -24,76 +24,6 @@ let CarouselSlider = class CarouselSlider extends GodownElement {
24
24
  this.width = "";
25
25
  this._clone = [];
26
26
  }
27
- static { this.styles = [
28
- css `
29
- :host {
30
- display: block;
31
- transition: all 0.2s;
32
- }
33
-
34
- div {
35
- overflow: hidden;
36
- }
37
-
38
- div,
39
- section {
40
- width: 100%;
41
- display: flex;
42
- position: relative;
43
- transition: inherit;
44
- }
45
-
46
- a {
47
- position: absolute;
48
- height: 100%;
49
- width: fit-content;
50
- z-index: 1;
51
- display: flex;
52
- align-items: center;
53
- }
54
-
55
- .prev {
56
- left: 0;
57
- }
58
-
59
- .prev svg {
60
- transform: rotate(180deg);
61
- }
62
-
63
- .next {
64
- right: 0;
65
- }
66
-
67
- i {
68
- position: relative;
69
- display: flex;
70
- align-items: center;
71
- justify-content: center;
72
- transition: 0.3s;
73
- width: 2em;
74
- height: 100%;
75
- }
76
-
77
- svg {
78
- flex: 1;
79
- max-height: 100%;
80
- max-width: 100%;
81
- }
82
-
83
- a:hover i {
84
- background-color: #0000001a;
85
- width: 2.2em;
86
- }
87
-
88
- i svg path {
89
- stroke-width: 4;
90
- }
91
-
92
- slot::slotted(*) {
93
- flex-shrink: 0 !important;
94
- }
95
- `,
96
- ]; }
97
27
  render() {
98
28
  const style = this.width && `:host{width:${this.width.split(";")[0]};}`;
99
29
  return html `<div>
@@ -169,6 +99,76 @@ let CarouselSlider = class CarouselSlider extends GodownElement {
169
99
  }
170
100
  }
171
101
  };
102
+ CarouselSlider.styles = [
103
+ css `
104
+ :host {
105
+ display: block;
106
+ transition: all 0.2s;
107
+ }
108
+
109
+ div {
110
+ overflow: hidden;
111
+ }
112
+
113
+ div,
114
+ section {
115
+ width: 100%;
116
+ display: flex;
117
+ position: relative;
118
+ transition: inherit;
119
+ }
120
+
121
+ a {
122
+ position: absolute;
123
+ height: 100%;
124
+ width: fit-content;
125
+ z-index: 1;
126
+ display: flex;
127
+ align-items: center;
128
+ }
129
+
130
+ .prev {
131
+ left: 0;
132
+ }
133
+
134
+ .prev svg {
135
+ transform: rotate(180deg);
136
+ }
137
+
138
+ .next {
139
+ right: 0;
140
+ }
141
+
142
+ i {
143
+ position: relative;
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ transition: 0.3s;
148
+ width: 2em;
149
+ height: 100%;
150
+ }
151
+
152
+ svg {
153
+ flex: 1;
154
+ max-height: 100%;
155
+ max-width: 100%;
156
+ }
157
+
158
+ a:hover i {
159
+ background-color: #0000001a;
160
+ width: 2.2em;
161
+ }
162
+
163
+ i svg path {
164
+ stroke-width: 4;
165
+ }
166
+
167
+ slot::slotted(*) {
168
+ flex-shrink: 0 !important;
169
+ }
170
+ `,
171
+ ];
172
172
  __decorate([
173
173
  property({ type: Number })
174
174
  ], CarouselSlider.prototype, "index", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-slider.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACyB,eAAU,GAAG,CAAC,CAAC;QAC3C;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QAIvB,WAAM,GAAkB,EAAE,CAAC;IAwJ7B,CAAC;aAtJQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmEF;KACF,AArEY,CAqEX;IAEQ,MAAM;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,eAAe,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxE,OAAO,IAAI,CAAA;gCACiB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;iBAChD,QAAQ,EAAE;QACnB,SAAS,CAAC,KAAK,CAAC;gCACQ,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,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CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC;YAC9E,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AAnK2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAgB;AAI/B;IAAX,QAAQ,EAAE;6CAAY;AAEL;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAuB;AAd7B,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAwK1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate, svgArrow } from \"../../lib/templates.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\nconst defineName = \"carousel-slider\";\n\n/**\n * CarouselSlider rotates child elements.\n */\n@define(defineName)\nexport class CarouselSlider extends GodownElement {\n /**\n * The index of the element is displayed for the first time.\n */\n @property({ type: Number }) index = 0;\n /**\n * If autochangee > 0, the rotation will be automated.\n */\n @property({ type: Number }) autochange = 0;\n /**\n * Width.\n */\n @property() width = \"\";\n\n @query(\"section\") _section: HTMLElement;\n intervalID: number;\n _clone: HTMLElement[] = [];\n\n static styles = [\n css`\n :host {\n display: block;\n transition: all 0.2s;\n }\n\n div {\n overflow: hidden;\n }\n\n div,\n section {\n width: 100%;\n display: flex;\n position: relative;\n transition: inherit;\n }\n\n a {\n position: absolute;\n height: 100%;\n width: fit-content;\n z-index: 1;\n display: flex;\n align-items: center;\n }\n\n .prev {\n left: 0;\n }\n\n .prev svg {\n transform: rotate(180deg);\n }\n\n .next {\n right: 0;\n }\n\n i {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n width: 2em;\n height: 100%;\n }\n\n svg {\n flex: 1;\n max-height: 100%;\n max-width: 100%;\n }\n\n a:hover i {\n background-color: #0000001a;\n width: 2.2em;\n }\n\n i svg path {\n stroke-width: 4;\n }\n\n slot::slotted(*) {\n flex-shrink: 0 !important;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const style = this.width && `:host{width:${this.width.split(\";\")[0]};}`;\n return html`<div>\n <a class=\"prev\" @click=\"${this.prev}\">${this.renderA(\"pre\")}</a>\n <section>${htmlSlot()}</section>\n ${htmlStyle(style)}\n <a class=\"next\" @click=\"${this.next}\">${this.renderA(\"suf\")}</a>\n </div>`;\n }\n\n private renderA(slot: string): HTMLTemplate {\n if (this.querySelector(`[slot=${slot}]`)) {\n return htmlSlot(slot);\n }\n return html`<i>${svgArrow()}</i>`;\n }\n\n remount(index?: number) {\n super.remount(undefined);\n if (index !== undefined) {\n this.show(index);\n }\n }\n\n protected firstUpdated() {\n if (this.assigned.length) {\n if (!this.width) {\n this.width = `${this.assigned[0].offsetWidth}px`;\n }\n if (this._clone.length) {\n this._clone.forEach((element) => element.remove());\n this._clone = [];\n }\n const last = this.assigned[0].cloneNode(true) as HTMLElement;\n const first = this.assigned[this.assigned.length - 1].cloneNode(true) as HTMLElement;\n first.style.marginLeft = \"-100%\";\n this._clone.push(first, last);\n this.appendChild(last);\n this.insertBefore(first, this.firstElementChild);\n this.show(this.index);\n }\n if (this.autochange) {\n this.intervalID = setInterval(() => {\n this.next();\n }, this.autochange);\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalID);\n }\n\n show(i: number) {\n this.index = i;\n this._section.style.transform = `translateX(-${i}00%)`;\n this._section.style.transition = \"inherit\";\n }\n\n next() {\n if (this.index === this.assigned.length - 3) {\n this._section.style.transform = `translateX(100%)`;\n this._section.style.transition = \"none\";\n this._section.getBoundingClientRect();\n this.show(0);\n } else {\n this.show(this.index + 1);\n }\n }\n\n prev() {\n if (this.index === 0) {\n this._section.style.transform = `translateX(-${this.assigned.length - 2}00%)`;\n this._section.style.transition = `none`;\n this._section.getBoundingClientRect();\n this.show(this.assigned.length - 3);\n } else {\n this.show(this.index - 1);\n }\n }\n}\n\nexport default CarouselSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"rotation-port\": CarouselSlider;\n }\n}\n"]}
1
+ {"version":3,"file":"carousel-slider.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/carousel/carousel-slider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC;;GAEG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,aAAa;IAA1C;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC;QACtC;;WAEG;QACyB,eAAU,GAAG,CAAC,CAAC;QAC3C;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QAIvB,WAAM,GAAkB,EAAE,CAAC;IAwJ7B,CAAC;IA/EW,MAAM;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,eAAe,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC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AAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC;YAC9E,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;;AArJM,qBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmEF;CACF,AArEY,CAqEX;AAnF0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAW;AAIV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAgB;AAI/B;IAAX,QAAQ,EAAE;6CAAY;AAEL;IAAjB,KAAK,CAAC,SAAS,CAAC;gDAAuB;AAd7B,cAAc;IAD1B,MAAM,CAAC,UAAU,CAAC;GACN,cAAc,CAwK1B;;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { css, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate, svgArrow } from \"../../lib/templates.js\";\nimport { define } from \"../../root.js\";\nimport { GodownElement } from \"../../root.js\";\n\nconst defineName = \"carousel-slider\";\n\n/**\n * CarouselSlider rotates child elements.\n */\n@define(defineName)\nexport class CarouselSlider extends GodownElement {\n /**\n * The index of the element is displayed for the first time.\n */\n @property({ type: Number }) index = 0;\n /**\n * If autochangee > 0, the rotation will be automated.\n */\n @property({ type: Number }) autochange = 0;\n /**\n * Width.\n */\n @property() width = \"\";\n\n @query(\"section\") _section: HTMLElement;\n intervalID: number;\n _clone: HTMLElement[] = [];\n\n static styles = [\n css`\n :host {\n display: block;\n transition: all 0.2s;\n }\n\n div {\n overflow: hidden;\n }\n\n div,\n section {\n width: 100%;\n display: flex;\n position: relative;\n transition: inherit;\n }\n\n a {\n position: absolute;\n height: 100%;\n width: fit-content;\n z-index: 1;\n display: flex;\n align-items: center;\n }\n\n .prev {\n left: 0;\n }\n\n .prev svg {\n transform: rotate(180deg);\n }\n\n .next {\n right: 0;\n }\n\n i {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n width: 2em;\n height: 100%;\n }\n\n svg {\n flex: 1;\n max-height: 100%;\n max-width: 100%;\n }\n\n a:hover i {\n background-color: #0000001a;\n width: 2.2em;\n }\n\n i svg path {\n stroke-width: 4;\n }\n\n slot::slotted(*) {\n flex-shrink: 0 !important;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const style = this.width && `:host{width:${this.width.split(\";\")[0]};}`;\n return html`<div>\n <a class=\"prev\" @click=\"${this.prev}\">${this.renderA(\"pre\")}</a>\n <section>${htmlSlot()}</section>\n ${htmlStyle(style)}\n <a class=\"next\" @click=\"${this.next}\">${this.renderA(\"suf\")}</a>\n </div>`;\n }\n\n private renderA(slot: string): HTMLTemplate {\n if (this.querySelector(`[slot=${slot}]`)) {\n return htmlSlot(slot);\n }\n return html`<i>${svgArrow()}</i>`;\n }\n\n remount(index?: number) {\n super.remount(undefined);\n if (index !== undefined) {\n this.show(index);\n }\n }\n\n protected firstUpdated() {\n if (this.assigned.length) {\n if (!this.width) {\n this.width = `${this.assigned[0].offsetWidth}px`;\n }\n if (this._clone.length) {\n this._clone.forEach((element) => element.remove());\n this._clone = [];\n }\n const last = this.assigned[0].cloneNode(true) as HTMLElement;\n const first = this.assigned[this.assigned.length - 1].cloneNode(true) as HTMLElement;\n first.style.marginLeft = \"-100%\";\n this._clone.push(first, last);\n this.appendChild(last);\n this.insertBefore(first, this.firstElementChild);\n this.show(this.index);\n }\n if (this.autochange) {\n this.intervalID = setInterval(() => {\n this.next();\n }, this.autochange);\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalID);\n }\n\n show(i: number) {\n this.index = i;\n this._section.style.transform = `translateX(-${i}00%)`;\n this._section.style.transition = \"inherit\";\n }\n\n next() {\n if (this.index === this.assigned.length - 3) {\n this._section.style.transform = `translateX(100%)`;\n this._section.style.transition = \"none\";\n this._section.getBoundingClientRect();\n this.show(0);\n } else {\n this.show(this.index + 1);\n }\n }\n\n prev() {\n if (this.index === 0) {\n this._section.style.transform = `translateX(-${this.assigned.length - 2}00%)`;\n this._section.style.transition = `none`;\n this._section.getBoundingClientRect();\n this.show(this.assigned.length - 3);\n } else {\n this.show(this.index - 1);\n }\n }\n}\n\nexport default CarouselSlider;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"carousel-slider\": CarouselSlider;\n }\n}\n"]}
@@ -17,21 +17,6 @@ let BaseForm = class BaseForm extends GodownElement {
17
17
  */
18
18
  this.enctype = "multipart/form-data";
19
19
  }
20
- static { this.styles = [
21
- css `
22
- form {
23
- display: flex;
24
- flex-direction: column;
25
- align-items: center;
26
- margin: 0;
27
- }
28
-
29
- main {
30
- display: flex;
31
- flex-direction: column;
32
- }
33
- `,
34
- ]; }
35
20
  render() {
36
21
  return html `<form enctype="${this.enctype}">
37
22
  ${htmlSlot("pre")}
@@ -128,6 +113,21 @@ let BaseForm = class BaseForm extends GodownElement {
128
113
  return formData;
129
114
  }
130
115
  };
116
+ BaseForm.styles = [
117
+ css `
118
+ form {
119
+ display: flex;
120
+ flex-direction: column;
121
+ align-items: center;
122
+ margin: 0;
123
+ }
124
+
125
+ main {
126
+ display: flex;
127
+ flex-direction: column;
128
+ }
129
+ `,
130
+ ];
131
131
  __decorate([
132
132
  property()
133
133
  ], BaseForm.prototype, "name", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"base-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAoC,SAAQ,aAAa;IAA/D;;QACO,SAAI,GAAG,EAAE,CAAC;QACM,UAAK,GAAG,EAAO,CAAC;QAE5C,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACnC;;WAEG;QACS,YAAO,GAA+E,qBAAqB,CAAC;IAoH1H,CAAC;aAhHQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;KAYF;KACgB,AAdN,CAcO;IAEV,MAAM;QACd,OAAO,IAAI,CAAA,kBAAkB,IAAI,CAAC,OAAO;QACrC,QAAQ,CAAC,KAAK,CAAC;cACT,QAAQ,EAAE;QAChB,QAAQ,CAAC,KAAK,CAAC;YACX,CAAC;IACX,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAgC,EAAE,EAAE;YACpD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,G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AAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { each } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\n/**\n * BaseForm gets all the names and actual values of the child element.\n */\n@define(\"base-form\")\nexport class BaseForm<T extends object = object> extends GodownElement {\n @property() name = \"\";\n @property({ type: Object }) value = {} as T;\n\n nameValue = () => this.namevalue();\n /**\n * Form enctype.\n */\n @property() enctype: \"application/x-www-form-urlencoded\" | \"multipart/form-data\" | \"text/plain\" = \"multipart/form-data\";\n\n @query(\"form\") _form: HTMLFormElement;\n\n static styles = [\n css`\n form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0;\n }\n\n main {\n display: flex;\n flex-direction: column;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<form enctype=\"${this.enctype}\">\n ${htmlSlot(\"pre\")}\n <main>${htmlSlot()}</main>\n ${htmlSlot(\"suf\")}\n </form>`;\n }\n\n reset() {\n each(this._form, (node: HTMLFormElement | BaseForm) => {\n if (node.reset) {\n node.reset();\n }\n });\n const form: any = document.createElement(\"form\");\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.reset) {\n i.reset();\n }\n form.appendChild(i.cloneNode(true));\n }\n }\n form.reset();\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.name && form[i.name]) {\n i.value = form[i.name].value;\n }\n }\n }\n form.remove();\n }\n\n namevalue(enctype = this.enctype): [string, Record<string, any>] {\n const result = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = enctype;\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.namevalue) {\n const [name, value] = i.namevalue();\n if (name) {\n result[name] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n for (const [key, value] of formData) {\n result[key] = value;\n }\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n result[name] = value;\n }\n }\n });\n tempForm.remove();\n return [this.name, result];\n }\n\n FormData(): FormData {\n const temp = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = this.enctype;\n for (const slot of this._slots) {\n for (const i of slot.assignedNodes() as any) {\n if (i.FormData) {\n for (const [key, value] of i.FormData()) {\n temp[key] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n formData.append(name, value);\n }\n }\n });\n for (const key in temp) {\n formData.append(key, temp[key]);\n }\n tempForm.remove();\n return formData;\n }\n}\nexport default BaseForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-form\": BaseForm;\n }\n}\n"]}
1
+ {"version":3,"file":"base-form.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/form/base-form.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAoC,SAAQ,aAAa;IAA/D;;QACO,SAAI,GAAG,EAAE,CAAC;QACM,UAAK,GAAG,EAAO,CAAC;QAE5C,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACnC;;WAEG;QACS,YAAO,GAA+E,qBAAqB,CAAC;IAoH1H,CAA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,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC;QACD,QAAQ,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IAClB,CAAC;;AA/GM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;KAYF;CACgB,AAdN,CAcO;AAzBR;IAAX,QAAQ,EAAE;sCAAW;AACM;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAiB;AAMhC;IAAX,QAAQ,EAAE;yCAA6G;AAEzG;IAAd,KAAK,CAAC,MAAM,CAAC;uCAAwB;AAV3B,QAAQ;IADpB,MAAM,CAAC,WAAW,CAAC;GACP,QAAQ,CA4HpB;;AACD,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, query } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { each } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\n/**\n * BaseForm gets all the names and actual values of the child element.\n */\n@define(\"base-form\")\nexport class BaseForm<T extends object = object> extends GodownElement {\n @property() name = \"\";\n @property({ type: Object }) value = {} as T;\n\n nameValue = () => this.namevalue();\n /**\n * Form enctype.\n */\n @property() enctype: \"application/x-www-form-urlencoded\" | \"multipart/form-data\" | \"text/plain\" = \"multipart/form-data\";\n\n @query(\"form\") _form: HTMLFormElement;\n\n static styles = [\n css`\n form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0;\n }\n\n main {\n display: flex;\n flex-direction: column;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n return html`<form enctype=\"${this.enctype}\">\n ${htmlSlot(\"pre\")}\n <main>${htmlSlot()}</main>\n ${htmlSlot(\"suf\")}\n </form>`;\n }\n\n reset() {\n each(this._form, (node: HTMLFormElement | BaseForm) => {\n if (node.reset) {\n node.reset();\n }\n });\n const form: any = document.createElement(\"form\");\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.reset) {\n i.reset();\n }\n form.appendChild(i.cloneNode(true));\n }\n }\n form.reset();\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.name && form[i.name]) {\n i.value = form[i.name].value;\n }\n }\n }\n form.remove();\n }\n\n namevalue(enctype = this.enctype): [string, Record<string, any>] {\n const result = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = enctype;\n for (const slot of this.shadowRoot.querySelectorAll(\"slot\")) {\n for (const i of slot.assignedNodes() as any) {\n if (i.namevalue) {\n const [name, value] = i.namevalue();\n if (name) {\n result[name] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n for (const [key, value] of formData) {\n result[key] = value;\n }\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n result[name] = value;\n }\n }\n });\n tempForm.remove();\n return [this.name, result];\n }\n\n FormData(): FormData {\n const temp = {};\n const tempForm = document.createElement(\"form\");\n tempForm.enctype = this.enctype;\n for (const slot of this._slots) {\n for (const i of slot.assignedNodes() as any) {\n if (i.FormData) {\n for (const [key, value] of i.FormData()) {\n temp[key] = value;\n }\n } else {\n tempForm.appendChild(i.cloneNode(true));\n }\n }\n }\n const formData = new FormData(tempForm);\n each(this._form, (node: any) => {\n if (node.namevalue) {\n const [name, value] = node.namevalue();\n if (name) {\n formData.append(name, value);\n }\n }\n });\n for (const key in temp) {\n formData.append(key, temp[key]);\n }\n tempForm.remove();\n return formData;\n }\n}\nexport default BaseForm;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"base-form\": BaseForm;\n }\n}\n"]}
@@ -21,19 +21,6 @@ let AvatarGroup = class AvatarGroup extends GodownElement {
21
21
  */
22
22
  this.more = 0;
23
23
  }
24
- static { this.styles = [
25
- css `
26
- :host {
27
- display: flex;
28
- width: 100%;
29
- height: 100%;
30
- }
31
-
32
- div {
33
- display: contents;
34
- }
35
- `,
36
- ]; }
37
24
  render() {
38
25
  const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;
39
26
  return html `${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;
@@ -73,6 +60,19 @@ let AvatarGroup = class AvatarGroup extends GodownElement {
73
60
  }
74
61
  }
75
62
  };
63
+ AvatarGroup.styles = [
64
+ css `
65
+ :host {
66
+ display: flex;
67
+ width: 100%;
68
+ height: 100%;
69
+ }
70
+
71
+ div {
72
+ display: contents;
73
+ }
74
+ `,
75
+ ];
76
76
  __decorate([
77
77
  property({ type: Number })
78
78
  ], AvatarGroup.prototype, "max", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,UAAU,GAAG,cAAc,CAAC;AAElC;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,aAAa;IAAvC;;QACL;;WAEG;QACyB,QAAG,GAAG,EAAE,CAAC;QACrC;;WAEG;QACyB,SAAI,GAAG,CAAC,CAAC;IAsDvC,CAAC;aApDQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;KAUF;KACF,AAZY,CAYX;IAEQ,MAAM;Q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C;YAC3C,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,OAAO;QACT,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;QACjB,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;;AAzD2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAU;AAIT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAU;AAR1B,WAAW;IADvB,MAAM,CAAC,UAAU,CAAC;GACN,WAAW,CA8DvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { css, html, nothing, property } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, htmlStyle, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { append } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\nimport AvatarA from \"../a/avatar-a.js\";\n\nconst defineName = \"avatar-group\";\n\n/**\n * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.\n */\n@define(defineName)\nexport class AvatarGroup extends GodownElement {\n /**\n * The maximum number of elements that can be accepted for this element.\n */\n @property({ type: Number }) max = 99;\n /**\n * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.\n */\n @property({ type: Number }) more = 0;\n\n static styles = [\n css`\n :host {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n div {\n display: contents;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;\n return html`${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;\n }\n\n protected firstUpdated() {\n if (!this.more && this.assigned.length > this.max) {\n this.more = this.assigned.length - this.max;\n }\n }\n\n append(args = new AvatarA()) {\n if (this.max && this.assigned.length === this.max) {\n this.assigned.pop().style.display = \"none\";\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more = 2;\n } else if (this.max && this.assigned.length > this.max) {\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more += 1;\n } else {\n append(this, args);\n }\n }\n\n subtract() {\n if (this.more === 2) {\n this.assigned.pop().style.display = \"\";\n this.more = 0;\n return;\n } else if (this.more > 0) {\n this.more -= 1;\n }\n if (this.assigned.length) {\n this.assigned.pop().remove();\n }\n }\n}\n\nexport default AvatarGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"avatar-group\": AvatarGroup;\n }\n}\n"]}
1
+ {"version":3,"file":"avatar-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/avatar-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAqB,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OA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port { htmlSlot, htmlStyle, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { append } from \"../../lib/utils.js\";\nimport { define, GodownElement } from \"../../root.js\";\nimport AvatarA from \"../a/avatar-a.js\";\n\nconst defineName = \"avatar-group\";\n\n/**\n * AvatarGroup ensure that the display content does not exceed the maximum value, and display the excess quantity.\n */\n@define(defineName)\nexport class AvatarGroup extends GodownElement {\n /**\n * The maximum number of elements that can be accepted for this element.\n */\n @property({ type: Number }) max = 99;\n /**\n * When the content overflows, create an {@linkcode AvatarA} with the same {@linkcode AvatarA.more} attribute as more.\n */\n @property({ type: Number }) more = 0;\n\n static styles = [\n css`\n :host {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n div {\n display: contents;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n const cssStr = `slot::slotted(:nth-of-type(n + ${(this.max || 0) + 1})) {display: none;}`;\n return html`${htmlSlot()} ${htmlStyle(cssStr)} ${ifValue(this.more > 0, new AvatarA({ more: this.more }), nothing)}`;\n }\n\n protected firstUpdated() {\n if (!this.more && this.assigned.length > this.max) {\n this.more = this.assigned.length - this.max;\n }\n }\n\n append(args = new AvatarA()) {\n if (this.max && this.assigned.length === this.max) {\n this.assigned.pop().style.display = \"none\";\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more = 2;\n } else if (this.max && this.assigned.length > this.max) {\n append(this, args);\n this.assigned.pop().style.display = \"none\";\n this.more += 1;\n } else {\n append(this, args);\n }\n }\n\n subtract() {\n if (this.more === 2) {\n this.assigned.pop().style.display = \"\";\n this.more = 0;\n return;\n } else if (this.more > 0) {\n this.more -= 1;\n }\n if (this.assigned.length) {\n this.assigned.pop().remove();\n }\n }\n}\n\nexport default AvatarGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"avatar-group\": AvatarGroup;\n }\n}\n"]}
@@ -18,13 +18,6 @@ let DetailsGroup = class DetailsGroup extends GodownElement {
18
18
  */
19
19
  this.only = false;
20
20
  }
21
- static { this.styles = [
22
- css `
23
- :host {
24
- display: block;
25
- }
26
- `,
27
- ]; }
28
21
  render() {
29
22
  return htmlSlot();
30
23
  }
@@ -44,6 +37,13 @@ let DetailsGroup = class DetailsGroup extends GodownElement {
44
37
  this.index = this.assigned.indexOf(e.target);
45
38
  }
46
39
  };
40
+ DetailsGroup.styles = [
41
+ css `
42
+ :host {
43
+ display: block;
44
+ }
45
+ `,
46
+ ];
47
47
  __decorate([
48
48
  property({ type: Number })
49
49
  ], DetailsGroup.prototype, "index", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"details-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC;;GAEG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,aAAa;IAAxC;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC,CAAC;QACvC;;WAEG;QAC0B,SAAI,GAAG,KAAK,CAAC;IA+B5C,CAAC;aA7BQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;KAIF;KACF,AANY,CAMX;IAEQ,MAAM;QACd,OAAO,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAClB,CAAC;IAES,YAAY,CAAC,CAAa;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAqB,CAAC,CAAC;IAC9D,CAAC;;AAlC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAIV;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAc;AAR/B,YAAY;IADxB,MAAM,CAAC,UAAU,CAAC;GACN,YAAY,CAuCxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["import { css, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"details-group\";\n\n/**\n * DetailsGroup used to support multiple details like.\n */\n@define(defineName)\nexport class DetailsGroup extends GodownElement {\n /**\n * Default open element index.\n */\n @property({ type: Number }) index = -1;\n /**\n * If true, close the previous element when switching index.\n */\n @property({ type: Boolean }) only = false;\n\n static styles = [\n css`\n :host {\n display: block;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return htmlSlot();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.only) {\n this.addEvent(this, \"click\", this._handleClick);\n }\n this.children[this.index]?.setAttribute(\"open\", \"\");\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.index = -1;\n }\n\n protected _handleClick(e: MouseEvent) {\n this.children[this.index]?.removeAttribute(\"open\");\n this.index = this.assigned.indexOf(e.target as HTMLElement);\n }\n}\n\nexport default DetailsGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"details-group\": DetailsGroup;\n }\n}\n"]}
1
+ {"version":3,"file":"details-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/details-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC;;GAEG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,aAAa;IAAxC;;QACL;;WAEG;QACyB,UAAK,GAAG,CAAC,CAAC,CAAC;QACvC;;WAEG;QAC0B,SAAI,GAAG,KAAK,CAAC;IA+B5C,CAAC;IArBW,MAAM;QACd,OAAO,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAClB,CAAC;IAES,YAAY,CAAC,CAAa;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAqB,CAAC,CAAC;IAC9D,CAAC;;AA5BM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;KAIF;CACF,AANY,CAMX;AAZ0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAIV;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAc;AAR/B,YAAY;IADxB,MAAM,CAAC,UAAU,CAAC;GACN,YAAY,CAuCxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["import { css, property } from \"../../deps.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"details-group\";\n\n/**\n * DetailsGroup used to support multiple details like.\n */\n@define(defineName)\nexport class DetailsGroup extends GodownElement {\n /**\n * Default open element index.\n */\n @property({ type: Number }) index = -1;\n /**\n * If true, close the previous element when switching index.\n */\n @property({ type: Boolean }) only = false;\n\n static styles = [\n css`\n :host {\n display: block;\n }\n `,\n ];\n\n protected render(): HTMLTemplate {\n return htmlSlot();\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (this.only) {\n this.addEvent(this, \"click\", this._handleClick);\n }\n this.children[this.index]?.setAttribute(\"open\", \"\");\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.index = -1;\n }\n\n protected _handleClick(e: MouseEvent) {\n this.children[this.index]?.removeAttribute(\"open\");\n this.index = this.assigned.indexOf(e.target as HTMLElement);\n }\n}\n\nexport default DetailsGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"details-group\": DetailsGroup;\n }\n}\n"]}
@@ -27,52 +27,9 @@ let TabGroup = class TabGroup extends GodownElement {
27
27
  */
28
28
  this.align = "start";
29
29
  }
30
- static { this.styles = [
31
- GodownElement.styles,
32
- css `
33
- :host {
34
- ${cssvarScope}--background: var(${cssvarValues.main});
35
- ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
36
- ${cssvarScope}--radius: .25em;
37
- ${cssvarScope}--cursor: default;
38
- background: var(${cssvarScope}--background);
39
- display: block;
40
- }
41
-
42
- nav {
43
- display: grid;
44
- grid-auto-flow: column;
45
- gap: 0.5em;
46
- position: relative;
47
- border-radius: inherit;
48
- }
49
-
50
- section {
51
- white-space: nowrap;
52
- min-width: 2em;
53
- border-radius: inherit;
54
- padding: 0 0.2em;
55
- cursor: var(${cssvarScope}--cursor);
56
- z-index: 1;
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- }
61
-
62
- #slider {
63
- height: 100%;
64
- position: absolute;
65
- padding: 0;
66
- background: var(${cssvarScope}--background-active);
67
- transform: translateX(-50%);
68
- transition: all 0.25s ease 0s;
69
- z-index: 0;
70
- }
71
- `,
72
- ]; }
73
30
  render() {
74
31
  const headers = (this.headers || this.contents).map((value) => {
75
- return html ` <section
32
+ return html `<section
76
33
  class="${ifValue(this.index === value, "active")}"
77
34
  @click="${() => {
78
35
  this.select(value, true);
@@ -98,7 +55,7 @@ let TabGroup = class TabGroup extends GodownElement {
98
55
  this.dispatchEvent(new CustomEvent("select", { detail: this.index }));
99
56
  slider.style.width = `${active.clientWidth}px`;
100
57
  slider.animate([{ left: `${active.offsetLeft + active.clientWidth / 2}px` }], {
101
- duration: 250,
58
+ duration: 180,
102
59
  fill: "forwards",
103
60
  });
104
61
  }
@@ -141,6 +98,49 @@ let TabGroup = class TabGroup extends GodownElement {
141
98
  this.contents = this.slottedNames;
142
99
  }
143
100
  };
101
+ TabGroup.styles = [
102
+ GodownElement.styles,
103
+ css `
104
+ :host {
105
+ ${cssvarScope}--background: var(${cssvarValues.main});
106
+ ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);
107
+ ${cssvarScope}--radius: .25em;
108
+ ${cssvarScope}--cursor: default;
109
+ background: var(${cssvarScope}--background);
110
+ display: block;
111
+ color: var(${cssvarValues.text});
112
+ }
113
+
114
+ nav {
115
+ display: grid;
116
+ grid-auto-flow: column;
117
+ gap: 0.25em;
118
+ position: relative;
119
+ border-radius: inherit;
120
+ }
121
+
122
+ section {
123
+ white-space: nowrap;
124
+ border-radius: inherit;
125
+ padding: 0.15em 0.2em;
126
+ cursor: var(${cssvarScope}--cursor);
127
+ z-index: 1;
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ }
132
+
133
+ #slider {
134
+ height: 100%;
135
+ position: absolute;
136
+ padding: 0;
137
+ background: var(${cssvarScope}--background-active);
138
+ transform: translateX(-50%);
139
+ transition: all 180ms ease 0s;
140
+ z-index: 0;
141
+ }
142
+ `,
143
+ ];
144
144
  __decorate([
145
145
  property()
146
146
  ], TabGroup.prototype, "index", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"tab-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjF,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QACvB;;WAEG;QACS,QAAG,GAAG,EAAE,CAAC;QACrB;;WAEG;QACS,UAAK,GAAG,OAAO,CAAC;IA+H9B,CAAC;aArHQ,WAAM,GAAG;QACd,aAAa,CAAC,MAAM;QACpB,GAAG,CAAA;;UAEG,WAAW,qBAAqB,YAAY,CAAC,IAA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ED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC;IACpC,CAAC;;AAtIW;IAAX,QAAQ,EAAE;uCAAY;AAIX;IAAX,QAAQ,EAAE;qCAAU;AAIT;IAAX,QAAQ,EAAE;uCAAiB;AAInB;IAAR,KAAK,EAAE;yCAA0B;AAIzB;IAAR,KAAK,EAAE;0CAAoB;AApBjB,QAAQ;IADpB,MAAM,CAAC,UAAU,CAAC;GACN,QAAQ,CA2IpB;;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import { css, type CSSResultGroup, html, property, type PropertyValueMap, state } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { deepQuerySelectorAll } from \"../../lib/utils.js\";\nimport { createScope, cssvarValues, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"tab-group\";\n\nconst cssvarScope = createScope(defineName);\n\n/**\n * TabGroup used to support multiple tabs.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class TabGroup extends GodownElement {\n /**\n * Active slot name.\n */\n @property() index = \"\";\n /**\n * Default slot name.\n */\n @property() def = \"\";\n /**\n * Align type.\n */\n @property() align = \"start\";\n /**\n * Header texts or slot names, if headers is a zero value, it is taken from the {@linkcode TabGroup.contents}.\n */\n @state() headers: string[] | void;\n /**\n * Contents slot names.\n */\n @state() contents: string[];\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--background: var(${cssvarValues.main});\n ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);\n ${cssvarScope}--radius: .25em;\n ${cssvarScope}--cursor: default;\n background: var(${cssvarScope}--background);\n display: block;\n }\n\n nav {\n display: grid;\n grid-auto-flow: column;\n gap: 0.5em;\n position: relative;\n border-radius: inherit;\n }\n\n section {\n white-space: nowrap;\n min-width: 2em;\n border-radius: inherit;\n padding: 0 0.2em;\n cursor: var(${cssvarScope}--cursor);\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n #slider {\n height: 100%;\n position: absolute;\n padding: 0;\n background: var(${cssvarScope}--background-active);\n transform: translateX(-50%);\n transition: all 0.25s ease 0s;\n z-index: 0;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const headers = (this.headers || this.contents).map((value) => {\n return html` <section\n class=\"${ifValue(this.index === value, \"active\")}\"\n @click=\"${() => {\n this.select(value, true);\n }}\"\n >\n ${this.headers ? htmlSlot(value) : value}\n </section>`;\n });\n return html`\n <nav style=\"justify-content:${this.align}\">\n ${headers}\n <section id=\"slider\"></section>\n </nav>\n ${htmlSlot(this.index || this.def)}\n `;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n if (changedProperties.has(\"index\")) {\n // Move slider.\n const active = this.shadowRoot.querySelector<HTMLElement>(\"section.active\");\n const slider = this.shadowRoot.querySelector<HTMLElement>(\"#slider\");\n if (active) {\n this.dispatchEvent(new CustomEvent(\"select\", { detail: this.index }));\n slider.style.width = `${active.clientWidth}px`;\n slider.animate([{ left: `${active.offsetLeft + active.clientWidth / 2}px` }], {\n duration: 250,\n fill: \"forwards\",\n });\n } else {\n slider.style.width = \"0\";\n }\n }\n }\n\n /**\n * Select one tab.\n * @param s New index.\n * @param callSync if true, update all same elements (headers contains s).\n */\n select(s: string, callSync = false) {\n if (callSync) {\n const elements = deepQuerySelectorAll<this>(this.tagName, document.body);\n for (const e of elements) {\n if ((e.headers || e.contents).includes(s)) {\n e.select(s);\n }\n }\n return;\n }\n this.index = s;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.slottedNames[0] || \"\";\n }\n if (!this.index && this.def) {\n this.index = this.def;\n }\n this.getTabs();\n }\n\n /**\n * Update content controls (this.headers, this.contents).\n */\n getTabs() {\n this.contents = this.slottedNames;\n }\n}\n\nexport default TabGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"tab-group\": TabGroup;\n }\n}\n"]}
1
+ {"version":3,"file":"tab-group.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/group/tab-group.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAuB,IAAI,EAAE,QAAQ,EAAyB,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjF,MAAM,UAAU,GAAG,WAAW,CAAC;AAE/B,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C;;;;GAIG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,aAAa;IAApC;;QACL;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QACvB;;WAEG;QACS,QAAG,GAAG,EAAE,CAAC;QACrB;;WAEG;QACS,UAAK,GAAG,OAAO,CAAC;IA+H9B,CAAC;IAzEW,MAAM;QACd,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC5D,OAAO,IAAI,CAAA;iBACA,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE,QAAQ,CAAC;kBACtC,GAAG,EAAE;gBACb,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,CAAC;;UAEC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;iBAC/B,CAAC;QACd,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAA;oCACqB,I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type CSSResultGroup, html, property, type PropertyValueMap, state } from \"../../deps.js\";\nimport { ifValue } from \"../../lib/directives.js\";\nimport { htmlSlot, type HTMLTemplate } from \"../../lib/templates.js\";\nimport { deepQuerySelectorAll } from \"../../lib/utils.js\";\nimport { createScope, cssvarValues, define, GodownElement } from \"../../root.js\";\n\nconst defineName = \"tab-group\";\n\nconst cssvarScope = createScope(defineName);\n\n/**\n * TabGroup used to support multiple tabs.\n *\n * Inspired by Next-ui.\n */\n@define(defineName)\nexport class TabGroup extends GodownElement {\n /**\n * Active slot name.\n */\n @property() index = \"\";\n /**\n * Default slot name.\n */\n @property() def = \"\";\n /**\n * Align type.\n */\n @property() align = \"start\";\n /**\n * Header texts or slot names, if headers is a zero value, it is taken from the {@linkcode TabGroup.contents}.\n */\n @state() headers: string[] | void;\n /**\n * Contents slot names.\n */\n @state() contents: string[];\n\n static styles = [\n GodownElement.styles,\n css`\n :host {\n ${cssvarScope}--background: var(${cssvarValues.main});\n ${cssvarScope}--background-active: rgb(var(${cssvarValues.textRGB}) / 18%);\n ${cssvarScope}--radius: .25em;\n ${cssvarScope}--cursor: default;\n background: var(${cssvarScope}--background);\n display: block;\n color: var(${cssvarValues.text});\n }\n\n nav {\n display: grid;\n grid-auto-flow: column;\n gap: 0.25em;\n position: relative;\n border-radius: inherit;\n }\n\n section {\n white-space: nowrap;\n border-radius: inherit;\n padding: 0.15em 0.2em;\n cursor: var(${cssvarScope}--cursor);\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n #slider {\n height: 100%;\n position: absolute;\n padding: 0;\n background: var(${cssvarScope}--background-active);\n transform: translateX(-50%);\n transition: all 180ms ease 0s;\n z-index: 0;\n }\n `,\n ] as CSSResultGroup;\n\n protected render(): HTMLTemplate {\n const headers = (this.headers || this.contents).map((value) => {\n return html`<section\n class=\"${ifValue(this.index === value, \"active\")}\"\n @click=\"${() => {\n this.select(value, true);\n }}\"\n >\n ${this.headers ? htmlSlot(value) : value}\n </section>`;\n });\n return html`\n <nav style=\"justify-content:${this.align}\">\n ${headers}\n <section id=\"slider\"></section>\n </nav>\n ${htmlSlot(this.index || this.def)}\n `;\n }\n\n protected updated(changedProperties: PropertyValueMap<this>) {\n if (changedProperties.has(\"index\")) {\n // Move slider.\n const active = this.shadowRoot.querySelector<HTMLElement>(\"section.active\");\n const slider = this.shadowRoot.querySelector<HTMLElement>(\"#slider\");\n if (active) {\n this.dispatchEvent(new CustomEvent(\"select\", { detail: this.index }));\n slider.style.width = `${active.clientWidth}px`;\n slider.animate([{ left: `${active.offsetLeft + active.clientWidth / 2}px` }], {\n duration: 180,\n fill: \"forwards\",\n });\n } else {\n slider.style.width = \"0\";\n }\n }\n }\n\n /**\n * Select one tab.\n * @param s New index.\n * @param callSync if true, update all same elements (headers contains s).\n */\n select(s: string, callSync = false) {\n if (callSync) {\n const elements = deepQuerySelectorAll<this>(this.tagName, document.body);\n for (const e of elements) {\n if ((e.headers || e.contents).includes(s)) {\n e.select(s);\n }\n }\n return;\n }\n this.index = s;\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.def) {\n this.def = this.slottedNames[0] || \"\";\n }\n if (!this.index && this.def) {\n this.index = this.def;\n }\n this.getTabs();\n }\n\n /**\n * Update content controls (this.headers, this.contents).\n */\n getTabs() {\n this.contents = this.slottedNames;\n }\n}\n\nexport default TabGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"tab-group\": TabGroup;\n }\n}\n"]}
@@ -26,7 +26,6 @@ export { LoadingProgress } from "./loading/loading-progress.js";
26
26
  export { SkeletonScreen } from "./loading/skeleton-screen.js";
27
27
  export { OpenDetails } from "./open/open-details.js";
28
28
  export { OpenDialog } from "./open/open-dialog.js";
29
- export { OpenList } from "./open/open-list.js";
30
29
  export { OpenOffset } from "./open/open-offset.js";
31
30
  export { OpenTooltip } from "./open/open-tooltip.js";
32
31
  export { ClipText } from "./text/clip-text.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"https://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AE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
@@ -27,7 +27,6 @@ export { LoadingProgress } from "./loading/loading-progress.js";
27
27
  export { SkeletonScreen } from "./loading/skeleton-screen.js";
28
28
  export { OpenDetails } from "./open/open-details.js";
29
29
  export { OpenDialog } from "./open/open-dialog.js";
30
- export { OpenList } from "./open/open-list.js";
31
30
  export { OpenOffset } from "./open/open-offset.js";
32
31
  export { OpenTooltip } from "./open/open-tooltip.js";
33
32
  export { ClipText } from "./text/clip-text.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-components/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,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AC","sourcesContent":["/// script generated\nexport { AvatarA } from \"./a/avatar-a.js\";\nexport { LinkA } from \"./a/link-a.js\";\nexport { SuperA } from \"./a/super-a.js\";\nexport { BaseButton } from \"./button/base-button.js\";\nexport { CarouselSlider } from \"./carousel/carousel-slider.js\";\nexport { BaseForm } from \"./form/base-form.js\";\nexport { SignForm } from \"./form/sign-form.js\";\nexport { AvatarGroup } from \"./group/avatar-group.js\";\nexport { DetailsGroup } from \"./group/details-group.js\";\nexport { TabGroup } from \"./group/tab-group.js\";\nexport { BaseInput } from \"./input/base-input.js\";\nexport { LabelInput } from \"./input/label-input.js\";\nexport { SearchInput } from \"./input/search-input.js\";\nexport { SelectInput } from \"./input/select-input.js\";\nexport { SplitInput } from \"./input/split-input.js\";\nexport { SwitchInput } from \"./input/switch-input.js\";\nexport { AlertItem } from \"./items/alert-item.js\";\nexport { CardItem } from \"./items/card-item.js\";\nexport { DragBox } from \"./items/drag-box.js\";\nexport { TimeBar } from \"./items/time-bar.js\";\nexport { DividerLine } from \"./layout/divider-line.js\";\nexport { FlexFlow } from \"./layout/flex-flow.js\";\nexport { NavAside } from \"./layout/nav-aside.js\";\nexport { NavLayout } from \"./layout/nav-layout.js\";\nexport { LoadingProgress } from \"./loading/loading-progress.js\";\nexport { SkeletonScreen } from \"./loading/skeleton-screen.js\";\nexport { OpenDetails } from \"./open/open-details.js\";\nexport { OpenDialog } from \"./open/open-dialog.js\";\nexport { OpenList } from \"./open/open-list.js\";\nexport { OpenOffset } from \"./open/open-offset.js\";\nexport { OpenTooltip } from \"./open/open-tooltip.js\";\nexport { ClipText } from \"./text/clip-text.js\";\nexport { OverbreathText } from \"./text/overbreath-text.js\";\nexport { TypewriterText } from \"./text/typewriter-text.js\";\nexport { RouteView } from \"./view/route-view.js\";\nexport { ScrollX } from \"./view/scroll-x.js\";\nexport { WrapView } from \"./view/wrap-view.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"https://github.com/startracex/godown/tree/main/src/","sources":["web-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AS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/// script generated\nexport { AvatarA } from \"./a/avatar-a.js\";\nexport { LinkA } from \"./a/link-a.js\";\nexport { SuperA } from \"./a/super-a.js\";\nexport { BaseButton } from \"./button/base-button.js\";\nexport { CarouselSlider } from \"./carousel/carousel-slider.js\";\nexport { BaseForm } from \"./form/base-form.js\";\nexport { SignForm } from \"./form/sign-form.js\";\nexport { AvatarGroup } from \"./group/avatar-group.js\";\nexport { DetailsGroup } from \"./group/details-group.js\";\nexport { TabGroup } from \"./group/tab-group.js\";\nexport { BaseInput } from \"./input/base-input.js\";\nexport { LabelInput } from \"./input/label-input.js\";\nexport { SearchInput } from \"./input/search-input.js\";\nexport { SelectInput } from \"./input/select-input.js\";\nexport { SplitInput } from \"./input/split-input.js\";\nexport { SwitchInput } from \"./input/switch-input.js\";\nexport { AlertItem } from \"./items/alert-item.js\";\nexport { CardItem } from \"./items/card-item.js\";\nexport { DragBox } from \"./items/drag-box.js\";\nexport { TimeBar } from \"./items/time-bar.js\";\nexport { DividerLine } from \"./layout/divider-line.js\";\nexport { FlexFlow } from \"./layout/flex-flow.js\";\nexport { NavAside } from \"./layout/nav-aside.js\";\nexport { NavLayout } from \"./layout/nav-layout.js\";\nexport { LoadingProgress } from \"./loading/loading-progress.js\";\nexport { SkeletonScreen } from \"./loading/skeleton-screen.js\";\nexport { OpenDetails } from \"./open/open-details.js\";\nexport { OpenDialog } from \"./open/open-dialog.js\";\nexport { OpenOffset } from \"./open/open-offset.js\";\nexport { OpenTooltip } from \"./open/open-tooltip.js\";\nexport { ClipText } from \"./text/clip-text.js\";\nexport { OverbreathText } from \"./text/overbreath-text.js\";\nexport { TypewriterText } from \"./text/typewriter-text.js\";\nexport { RouteView } from \"./view/route-view.js\";\nexport { ScrollX } from \"./view/scroll-x.js\";\nexport { WrapView } from \"./view/wrap-view.js\";\n"]}