@esportsplus/ui 0.51.6 → 0.53.0

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 (183) hide show
  1. package/.github/workflows/bump.yml +4 -1
  2. package/.github/workflows/publish.yml +4 -0
  3. package/README.md +2 -3
  4. package/build/components/accordion/index.d.ts +22 -16
  5. package/build/components/accordion/index.js +10 -36
  6. package/build/components/accordion/scss/index.scss +1 -1
  7. package/build/components/back/index.d.ts +16 -13
  8. package/build/components/back/index.js +11 -11
  9. package/build/components/button/index.d.ts +22 -22
  10. package/build/components/button/index.js +25 -25
  11. package/build/components/checkbox/index.d.ts +1 -1
  12. package/build/components/checkbox/index.js +27 -23
  13. package/build/components/clipboard/index.d.ts +23 -20
  14. package/build/components/clipboard/index.js +1 -0
  15. package/build/components/clipboard/onclick.d.ts +1 -1
  16. package/build/components/clipboard/onclick.js +16 -16
  17. package/build/components/clipboard/write.d.ts +1 -1
  18. package/build/components/counter/index.d.ts +5 -5
  19. package/build/components/counter/index.js +34 -34
  20. package/build/components/ellipsis/index.d.ts +1 -1
  21. package/build/components/ellipsis/index.js +5 -5
  22. package/build/components/form/action.d.ts +3 -3
  23. package/build/components/form/action.js +8 -8
  24. package/build/components/form/index.d.ts +2 -2
  25. package/build/components/form/input.d.ts +8 -6
  26. package/build/components/form/input.js +3 -3
  27. package/build/components/frame/index.d.ts +16 -15
  28. package/build/components/frame/index.js +11 -5
  29. package/build/components/highlight/index.d.ts +17 -16
  30. package/build/components/highlight/index.js +16 -16
  31. package/build/components/icon/index.d.ts +11 -11
  32. package/build/components/icon/index.js +8 -8
  33. package/build/components/index.d.ts +1 -4
  34. package/build/components/index.js +1 -4
  35. package/build/components/input/index.d.ts +1 -1
  36. package/build/components/input/index.js +21 -21
  37. package/build/components/json/download.d.ts +1 -1
  38. package/build/components/loader/index.d.ts +17 -16
  39. package/build/components/loader/index.js +35 -35
  40. package/build/components/loader/scss/index.scss +1 -1
  41. package/build/components/loading/index.d.ts +1 -1
  42. package/build/components/loading/index.js +5 -5
  43. package/build/components/overlay/index.d.ts +16 -15
  44. package/build/components/overlay/index.js +11 -5
  45. package/build/components/overlay/scss/index.scss +1 -1
  46. package/build/components/page/scss/index.scss +1 -1
  47. package/build/components/radio/index.js +1 -1
  48. package/build/components/range/index.d.ts +1 -1
  49. package/build/components/range/index.js +26 -26
  50. package/build/components/root/index.d.ts +1 -4
  51. package/build/components/root/onclick.d.ts +4 -4
  52. package/build/components/root/scss/index.scss +1 -1
  53. package/build/components/select/index.d.ts +4 -7
  54. package/build/components/select/index.js +92 -98
  55. package/build/components/sidebar/index.d.ts +16 -15
  56. package/build/components/sidebar/index.js +11 -5
  57. package/build/components/sidebar/scss/index.scss +1 -1
  58. package/build/components/switch/index.js +1 -1
  59. package/build/components/textarea/index.d.ts +1 -1
  60. package/build/components/textarea/index.js +21 -21
  61. package/build/components/toast/index.d.ts +9 -0
  62. package/build/components/toast/index.js +157 -0
  63. package/build/components/toast/manager.d.ts +60 -0
  64. package/build/components/toast/manager.js +203 -0
  65. package/build/components/toast/scss/index.scss +2 -0
  66. package/build/components/toast/svg/check.svg +1 -0
  67. package/build/components/toast/svg/chevron.svg +1 -0
  68. package/build/components/toast/svg/close.svg +1 -0
  69. package/build/components/toast/svg/copy.svg +1 -0
  70. package/build/components/toast/svg/error.svg +1 -0
  71. package/build/components/toast/svg/info.svg +1 -0
  72. package/build/components/toast/svg/loading.svg +1 -0
  73. package/build/components/toast/svg/success.svg +1 -0
  74. package/build/components/toast/svg/warning.svg +1 -0
  75. package/build/components/tooltip/index.d.ts +40 -40
  76. package/build/components/tooltip/menu.d.ts +11 -12
  77. package/build/components/tooltip/menu.js +38 -24
  78. package/build/components/tooltip/onclick.d.ts +1151 -1151
  79. package/build/components/tooltip/onclick.js +17 -17
  80. package/build/components/tooltip/onhover.d.ts +17 -16
  81. package/build/components/tooltip/onhover.js +17 -17
  82. package/build/components/typewriter/index.d.ts +11 -11
  83. package/build/components/typewriter/index.js +16 -16
  84. package/build/css-utilities/index.scss +1 -1
  85. package/build/css-utilities/scroll-fade/scss/index.scss +2 -0
  86. package/build/css-utilities/scrollbar/scss/index.scss +2 -0
  87. package/build/themes/dark/back.d.ts +8 -4
  88. package/build/themes/dark/index.d.ts +0 -1
  89. package/build/themes/dark/index.js +0 -1
  90. package/build/themes/dark/input.d.ts +2 -2
  91. package/build/themes/dark/select.d.ts +60 -110
  92. package/build/themes/dark/textarea.d.ts +2 -2
  93. package/package.json +15 -15
  94. package/pnpm-workspace.yaml +11 -0
  95. package/src/components/accordion/index.ts +7 -30
  96. package/src/components/accordion/scss/index.scss +9 -12
  97. package/src/components/back/index.ts +4 -5
  98. package/src/components/button/index.ts +2 -3
  99. package/src/components/checkbox/index.ts +7 -2
  100. package/src/components/clipboard/index.ts +2 -1
  101. package/src/components/clipboard/onclick.ts +3 -4
  102. package/src/components/form/input.ts +4 -4
  103. package/src/components/frame/index.ts +9 -5
  104. package/src/components/highlight/index.ts +2 -3
  105. package/src/components/icon/index.ts +2 -3
  106. package/src/components/index.ts +1 -4
  107. package/src/components/loader/index.ts +5 -6
  108. package/src/components/loader/scss/index.scss +1 -1
  109. package/src/components/overlay/index.ts +9 -5
  110. package/src/components/overlay/scss/index.scss +0 -1
  111. package/src/components/page/scss/index.scss +1 -1
  112. package/src/components/root/scss/index.scss +35 -4
  113. package/src/components/root/scss/variables.scss +1 -2
  114. package/src/components/select/index.ts +71 -83
  115. package/src/components/sidebar/index.ts +9 -5
  116. package/src/components/sidebar/scss/index.scss +0 -1
  117. package/src/components/toast/index.ts +188 -0
  118. package/src/components/toast/manager.ts +312 -0
  119. package/src/components/toast/scss/index.scss +276 -0
  120. package/src/components/toast/scss/variables.scss +19 -0
  121. package/src/components/toast/svg/check.svg +1 -0
  122. package/src/components/toast/svg/chevron.svg +1 -0
  123. package/src/components/toast/svg/close.svg +1 -0
  124. package/src/components/toast/svg/copy.svg +1 -0
  125. package/src/components/toast/svg/error.svg +1 -0
  126. package/src/components/toast/svg/info.svg +1 -0
  127. package/src/components/toast/svg/loading.svg +1 -0
  128. package/src/components/toast/svg/success.svg +1 -0
  129. package/src/components/toast/svg/warning.svg +1 -0
  130. package/src/components/tooltip/menu.ts +8 -4
  131. package/src/components/tooltip/onclick.ts +3 -4
  132. package/src/components/tooltip/onhover.ts +2 -3
  133. package/src/components/typewriter/index.ts +2 -3
  134. package/src/css-utilities/index.scss +3 -2
  135. package/src/css-utilities/scroll-fade/scss/index.scss +47 -0
  136. package/src/css-utilities/scroll-fade/scss/variables.scss +3 -0
  137. package/src/css-utilities/scrollbar/scss/index.scss +53 -0
  138. package/src/css-utilities/scrollbar/scss/variables.scss +5 -0
  139. package/src/themes/dark/index.ts +0 -1
  140. package/src/tokens/scss/color.scss +14 -14
  141. package/src/tokens/scss/font-size.scss +12 -11
  142. package/src/tokens/scss/line-height.scss +7 -4
  143. package/src/tokens/scss/scale.scss +22 -0
  144. package/src/tokens/scss/size.scss +12 -9
  145. package/src/tokens/scss/spacer.scss +9 -9
  146. package/storage/svg/bolt.svg +1 -0
  147. package/storage/svg/star.svg +1 -0
  148. package/tsconfig.json +6 -2
  149. package/vite-env.d.ts +1 -0
  150. package/vite.config.ts +73 -72
  151. package/build/components/alert/index.d.ts +0 -19
  152. package/build/components/alert/index.js +0 -151
  153. package/build/components/alert/scss/index.scss +0 -2
  154. package/build/components/alert/svg/check.svg +0 -11
  155. package/build/components/alert/svg/close.svg +0 -12
  156. package/build/components/alert/svg/error.svg +0 -18
  157. package/build/components/scrollbar/index.d.ts +0 -27
  158. package/build/components/scrollbar/index.js +0 -56
  159. package/build/components/scrollbar/scss/index.scss +0 -2
  160. package/build/components/site/index.d.ts +0 -20
  161. package/build/components/site/index.js +0 -9
  162. package/build/components/site/scss/index.scss +0 -2
  163. package/build/components/template/index.d.ts +0 -13
  164. package/build/components/template/index.js +0 -21
  165. package/build/css-utilities/scroller/scss/index.scss +0 -2
  166. package/build/themes/dark/alert.d.ts +0 -11
  167. package/build/themes/dark/alert.js +0 -20
  168. package/src/components/accordion/scss/variables.scss +0 -9
  169. package/src/components/alert/index.ts +0 -165
  170. package/src/components/alert/scss/index.scss +0 -25
  171. package/src/components/alert/scss/variables.scss +0 -3
  172. package/src/components/alert/svg/check.svg +0 -11
  173. package/src/components/alert/svg/close.svg +0 -12
  174. package/src/components/alert/svg/error.svg +0 -18
  175. package/src/components/scrollbar/index.ts +0 -70
  176. package/src/components/scrollbar/scss/index.scss +0 -82
  177. package/src/components/scrollbar/scss/variables.scss +0 -6
  178. package/src/components/site/index.ts +0 -11
  179. package/src/components/site/scss/index.scss +0 -3
  180. package/src/components/template/index.ts +0 -40
  181. package/src/css-utilities/scroller/scss/index.scss +0 -8
  182. package/src/css-utilities/scroller/scss/variables.scss +0 -4
  183. package/src/themes/dark/alert.ts +0 -23
@@ -4,6 +4,9 @@ on:
4
4
  push:
5
5
  branches: '**' # only trigger on branches, not on tags
6
6
 
7
+ permissions:
8
+ contents: write
9
+
7
10
  jobs:
8
11
  bump:
9
- uses: esportsplus/typescript/.github/workflows/bump.yml@main
12
+ uses: esportsplus/typescript/.github/workflows/bump.yml@main
@@ -9,6 +9,10 @@ on:
9
9
  types:
10
10
  - completed
11
11
 
12
+ permissions:
13
+ contents: read
14
+ id-token: write
15
+
12
16
  jobs:
13
17
  publish:
14
18
  secrets:
package/README.md CHANGED
@@ -85,10 +85,9 @@ html`
85
85
  ### Layout
86
86
  | Component | Description |
87
87
  |-----------|-------------|
88
- | `scrollbar` | Custom scrollbar container |
88
+ | `scrollbar` | Native scrollbar styling |
89
89
  | `frame` | Scrollable frame |
90
90
  | `sidebar` | Side navigation |
91
- | `site` | Site wrapper |
92
91
  | `overlay` | Modal/overlay container |
93
92
 
94
93
  ### Utility
@@ -212,7 +211,7 @@ Each component exposes CSS custom properties:
212
211
  ```scss
213
212
  .ui-button {
214
213
  --background: var(--color-blue-400);
215
- --color: var(--color-white);
214
+ --color: var(--color-white-400);
216
215
  --border-radius: var(--border-radius-300);
217
216
  --padding-horizontal: 16px;
218
217
  --padding-vertical: 8px;
@@ -1,21 +1,27 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import { Attributes } from '@esportsplus/template';
2
3
  import './scss/index.scss';
4
+ type A = Attributes & {
5
+ state: {
6
+ active: boolean | number;
7
+ };
8
+ };
3
9
  declare const _default: {
4
10
  (): ReturnType<(this: {
5
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
6
- content?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>;
7
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
8
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>(attributes: T): ReturnType<(this: {
9
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
10
- content?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>;
11
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
12
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>(content: T): ReturnType<(this: {
13
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
14
- content?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>;
15
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
16
- (attributes: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>): ReturnType<(this: {
17
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
18
- content?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>;
19
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
11
+ attributes?: A | undefined;
12
+ content?: template_u1.Renderable<any>;
13
+ }, attributes: Readonly<A>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
14
+ <T extends A>(attributes: T): ReturnType<(this: {
15
+ attributes?: A | undefined;
16
+ content?: template_u1.Renderable<any>;
17
+ }, attributes: Readonly<A>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
18
+ <T extends template_u1.Renderable<any>>(content: T): ReturnType<(this: {
19
+ attributes?: A | undefined;
20
+ content?: template_u1.Renderable<any>;
21
+ }, attributes: Readonly<A>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
22
+ (attributes: A, content: template_u1.Renderable<any>): ReturnType<(this: {
23
+ attributes?: A | undefined;
24
+ content?: template_u1.Renderable<any>;
25
+ }, attributes: Readonly<A>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
20
26
  };
21
27
  export default _default;
@@ -1,42 +1,16 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import * as reactivity_0ff113fe0a6246fbbfe92857b2a0303c0 from '@esportsplus/reactivity';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import { component } from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
- import template from '../../components/template/index.js';
5
4
  import './scss/index.scss';
6
- const template_0ff113fe0a6246fbbfe92857b2a0303c4 = template_0ff113fe0a6246fbbfe92857b2a0303c1.template(`<div>`);
7
- class ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303c2 extends reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.ReactiveObject {
8
- #active = this[reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.SIGNAL](0);
9
- constructor() {
10
- super(null);
11
- }
12
- get active() {
13
- return reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.read(this.#active);
14
- }
15
- set active(_v0) {
16
- reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.write(this.#active, _v0);
17
- }
18
- }
5
+ const template_04mlrpv1 = template_u1.template(`<div class='accordion' ><div class='accordion-content'>`);
19
6
  const OMIT = ['state'];
20
- let key = Symbol();
21
- export default template.factory(function (attributes, content) {
22
- let ref, state = attributes.state || new ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303c2();
7
+ export default component(function (attributes, content) {
8
+ let state = attributes.state;
23
9
  return (() => {
24
- let root_0ff113fe0a6246fbbfe92857b2a0303c3 = template_0ff113fe0a6246fbbfe92857b2a0303c4(), element_0ff113fe0a6246fbbfe92857b2a0303c5 = root_0ff113fe0a6246fbbfe92857b2a0303c3.firstChild;
25
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303c5, omit(attributes, OMIT));
26
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setList(element_0ff113fe0a6246fbbfe92857b2a0303c5, 'class', () => {
27
- return state.active && '--active';
28
- });
29
- template_0ff113fe0a6246fbbfe92857b2a0303c1.onrender(element_0ff113fe0a6246fbbfe92857b2a0303c5, (element) => {
30
- (ref = element)[key] = state;
31
- });
32
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setList(element_0ff113fe0a6246fbbfe92857b2a0303c5, 'style', () => {
33
- let parent = ref.closest('accordion');
34
- if (parent && key in parent) {
35
- parent[key].active = (+parent[key].active) + 1;
36
- }
37
- return state.active && `--max-height: ${ref.scrollHeight}`;
38
- });
39
- template_0ff113fe0a6246fbbfe92857b2a0303c1.slot(element_0ff113fe0a6246fbbfe92857b2a0303c5, content, 1);
40
- return root_0ff113fe0a6246fbbfe92857b2a0303c3;
10
+ let root_04mlrpv0 = template_04mlrpv1(), element_04mlrpv2 = root_04mlrpv0.firstChild, element_04mlrpv3 = element_04mlrpv2.firstElementChild;
11
+ template_u1.setProperties(element_04mlrpv2, omit(attributes, OMIT));
12
+ template_u1.setProperty(element_04mlrpv2, 'inert', () => !state.active);
13
+ template_u1.slot(element_04mlrpv3, content, 1);
14
+ return root_04mlrpv0;
41
15
  })();
42
16
  });
@@ -1,2 +1,2 @@
1
- @layer components {.accordion,.accordion:not(.--active){--max-height:0}.accordion{max-height:var(--max-height);opacity:0;pointer-events:none;transition:max-height var(--transition-duration) ease-in-out, opacity var(--transition-duration) ease-in-out}.accordion.--active{opacity:1;pointer-events:auto}}
1
+ @layer components {.accordion{grid-template-rows:1fr;transition:grid-template-rows .3s;display:grid}.accordion[inert]{grid-template-rows:0fr}.accordion-content{min-height:0;overflow:hidden}}
2
2
  /*$vite$:1*/
@@ -1,18 +1,21 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import { Attributes } from '@esportsplus/template';
1
+ import * as template_u1 from '@esportsplus/template';
3
2
  import './scss/index.scss';
4
3
  declare const _default: {
5
4
  (): ReturnType<(this: {
6
- attributes?: Attributes;
7
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
8
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>(attributes: T): ReturnType<(this: {
9
- attributes?: Attributes;
10
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
11
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>(content: T): ReturnType<(this: {
12
- attributes?: Attributes;
13
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
14
- (attributes: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>): ReturnType<(this: {
15
- attributes?: Attributes;
16
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>) => template_0ff113fe0a6246fbbfe92857b2a0303c1.Renderable<any>>;
5
+ attributes?: template_u1.Attributes | undefined;
6
+ content?: template_u1.Renderable<any>;
7
+ }, attributes: Readonly<template_u1.Attributes>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
8
+ <T extends template_u1.Attributes>(attributes: T): ReturnType<(this: {
9
+ attributes?: template_u1.Attributes | undefined;
10
+ content?: template_u1.Renderable<any>;
11
+ }, attributes: Readonly<template_u1.Attributes>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
12
+ <T extends template_u1.Renderable<any>>(content: T): ReturnType<(this: {
13
+ attributes?: template_u1.Attributes | undefined;
14
+ content?: template_u1.Renderable<any>;
15
+ }, attributes: Readonly<template_u1.Attributes>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
16
+ (attributes: template_u1.Attributes, content: template_u1.Renderable<any>): ReturnType<(this: {
17
+ attributes?: template_u1.Attributes | undefined;
18
+ content?: template_u1.Renderable<any>;
19
+ }, attributes: Readonly<template_u1.Attributes>, content: template_u1.Renderable<any>) => template_u1.Renderable<any>>;
17
20
  };
18
21
  export default _default;
@@ -1,16 +1,16 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import icon from '../../components/icon/index.js';
3
- import template from '../../components/template/index.js';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import { component } from '@esportsplus/template';
3
+ import icon from '../icon/index.js';
4
4
  import arrow from './svg/arrow.svg';
5
5
  import './scss/index.scss';
6
- const template_0ff113fe0a6246fbbfe92857b2a0303cn = template_0ff113fe0a6246fbbfe92857b2a0303c1.template(`<a class='back link --padding-0px --flex-vertical'><!--$-->`);
7
- export default template.factory(function (attributes, content) {
6
+ const template_1hhpvdm1 = template_u1.template(`<a class='back link --padding-0px --flex-vertical' ><!--$-->`);
7
+ export default component(function (attributes, content) {
8
8
  return (() => {
9
- let root_0ff113fe0a6246fbbfe92857b2a0303cm = template_0ff113fe0a6246fbbfe92857b2a0303cn(), element_0ff113fe0a6246fbbfe92857b2a0303co = root_0ff113fe0a6246fbbfe92857b2a0303cm.firstChild, element_0ff113fe0a6246fbbfe92857b2a0303cp = element_0ff113fe0a6246fbbfe92857b2a0303co.firstChild;
10
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303co, this.attributes);
11
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303co, attributes);
12
- template_0ff113fe0a6246fbbfe92857b2a0303c1.slot(element_0ff113fe0a6246fbbfe92857b2a0303cp, icon({ class: 'back-arrow --margin-right --margin-200' }, arrow));
13
- template_0ff113fe0a6246fbbfe92857b2a0303c1.slot(element_0ff113fe0a6246fbbfe92857b2a0303co, content, 2);
14
- return root_0ff113fe0a6246fbbfe92857b2a0303cm;
9
+ let root_1hhpvdm0 = template_1hhpvdm1(), element_1hhpvdm2 = root_1hhpvdm0.firstChild, element_1hhpvdm3 = element_1hhpvdm2.firstChild;
10
+ template_u1.setProperties(element_1hhpvdm2, this?.attributes);
11
+ template_u1.setProperties(element_1hhpvdm2, attributes);
12
+ template_u1.slot(element_1hhpvdm3, icon({ class: 'back-arrow --margin-right --margin-200' }, arrow));
13
+ template_u1.slot(element_1hhpvdm2, content, 2);
14
+ return root_1hhpvdm0;
15
15
  })();
16
16
  });
@@ -1,24 +1,24 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import { Renderable } from '@esportsplus/template';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import { type Renderable } from '@esportsplus/template';
3
3
  import './scss/index.scss';
4
4
  declare const hold: {
5
5
  (): ReturnType<(this: {
6
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
6
+ attributes?: template_u1.Attributes | undefined;
7
7
  content?: ((state: {
8
8
  holding: boolean;
9
9
  complete: boolean;
10
10
  }) => Renderable<any>) | undefined;
11
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
11
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
12
12
  holding: boolean;
13
13
  complete: boolean;
14
14
  }) => Renderable<any>) => Renderable<any>>;
15
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>(attributes: T): ReturnType<(this: {
16
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
15
+ <T extends template_u1.Attributes>(attributes: T): ReturnType<(this: {
16
+ attributes?: template_u1.Attributes | undefined;
17
17
  content?: ((state: {
18
18
  holding: boolean;
19
19
  complete: boolean;
20
20
  }) => Renderable<any>) | undefined;
21
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
21
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
22
22
  holding: boolean;
23
23
  complete: boolean;
24
24
  }) => Renderable<any>) => Renderable<any>>;
@@ -26,25 +26,25 @@ declare const hold: {
26
26
  holding: boolean;
27
27
  complete: boolean;
28
28
  }) => Renderable<any>>(content: T): ReturnType<(this: {
29
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
29
+ attributes?: template_u1.Attributes | undefined;
30
30
  content?: ((state: {
31
31
  holding: boolean;
32
32
  complete: boolean;
33
33
  }) => Renderable<any>) | undefined;
34
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
34
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
35
35
  holding: boolean;
36
36
  complete: boolean;
37
37
  }) => Renderable<any>) => Renderable<any>>;
38
- (attributes: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes, content: (state: {
38
+ (attributes: template_u1.Attributes, content: (state: {
39
39
  holding: boolean;
40
40
  complete: boolean;
41
41
  }) => Renderable<any>): ReturnType<(this: {
42
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
42
+ attributes?: template_u1.Attributes | undefined;
43
43
  content?: ((state: {
44
44
  holding: boolean;
45
45
  complete: boolean;
46
46
  }) => Renderable<any>) | undefined;
47
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
47
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
48
48
  holding: boolean;
49
49
  complete: boolean;
50
50
  }) => Renderable<any>) => Renderable<any>>;
@@ -52,22 +52,22 @@ declare const hold: {
52
52
  declare const _default: {
53
53
  hold: {
54
54
  (): ReturnType<(this: {
55
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
55
+ attributes?: template_u1.Attributes | undefined;
56
56
  content?: ((state: {
57
57
  holding: boolean;
58
58
  complete: boolean;
59
59
  }) => Renderable<any>) | undefined;
60
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
60
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
61
61
  holding: boolean;
62
62
  complete: boolean;
63
63
  }) => Renderable<any>) => Renderable<any>>;
64
- <T extends template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>(attributes: T): ReturnType<(this: {
65
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
64
+ <T extends template_u1.Attributes>(attributes: T): ReturnType<(this: {
65
+ attributes?: template_u1.Attributes | undefined;
66
66
  content?: ((state: {
67
67
  holding: boolean;
68
68
  complete: boolean;
69
69
  }) => Renderable<any>) | undefined;
70
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
70
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
71
71
  holding: boolean;
72
72
  complete: boolean;
73
73
  }) => Renderable<any>) => Renderable<any>>;
@@ -75,25 +75,25 @@ declare const _default: {
75
75
  holding: boolean;
76
76
  complete: boolean;
77
77
  }) => Renderable<any>>(content: T): ReturnType<(this: {
78
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
78
+ attributes?: template_u1.Attributes | undefined;
79
79
  content?: ((state: {
80
80
  holding: boolean;
81
81
  complete: boolean;
82
82
  }) => Renderable<any>) | undefined;
83
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
83
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
84
84
  holding: boolean;
85
85
  complete: boolean;
86
86
  }) => Renderable<any>) => Renderable<any>>;
87
- (attributes: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes, content: (state: {
87
+ (attributes: template_u1.Attributes, content: (state: {
88
88
  holding: boolean;
89
89
  complete: boolean;
90
90
  }) => Renderable<any>): ReturnType<(this: {
91
- attributes?: template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes | undefined;
91
+ attributes?: template_u1.Attributes | undefined;
92
92
  content?: ((state: {
93
93
  holding: boolean;
94
94
  complete: boolean;
95
95
  }) => Renderable<any>) | undefined;
96
- }, attributes: Readonly<template_0ff113fe0a6246fbbfe92857b2a0303c1.Attributes>, content: (state: {
96
+ }, attributes: Readonly<template_u1.Attributes>, content: (state: {
97
97
  holding: boolean;
98
98
  complete: boolean;
99
99
  }) => Renderable<any>) => Renderable<any>>;
@@ -1,59 +1,59 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import * as reactivity_0ff113fe0a6246fbbfe92857b2a0303c0 from '@esportsplus/reactivity';
3
- import template from '../template/index.js';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import { component } from '@esportsplus/template';
3
+ import * as reactivity_u0 from '@esportsplus/reactivity';
4
4
  import './scss/index.scss';
5
- const template_0ff113fe0a6246fbbfe92857b2a0303cs = template_0ff113fe0a6246fbbfe92857b2a0303c1.template(`<div class='button '>`);
6
- class ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303cq extends reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.ReactiveObject {
7
- #complete = this[reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.SIGNAL](false);
8
- #holding = this[reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.SIGNAL](false);
5
+ const template_1u9ndnf2 = template_u1.template(`<div class='button ' >`);
6
+ class ReactiveObject_1u9ndnf0 extends reactivity_u0.ReactiveObject {
7
+ #complete = this[reactivity_u0.SIGNAL](false);
8
+ #holding = this[reactivity_u0.SIGNAL](false);
9
9
  constructor() {
10
10
  super(null);
11
11
  }
12
12
  get complete() {
13
- return reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.read(this.#complete);
13
+ return reactivity_u0.read(this.#complete);
14
14
  }
15
15
  set complete(_v0) {
16
- reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.write(this.#complete, _v0);
16
+ reactivity_u0.write(this.#complete, _v0);
17
17
  }
18
18
  get holding() {
19
- return reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.read(this.#holding);
19
+ return reactivity_u0.read(this.#holding);
20
20
  }
21
21
  set holding(_v1) {
22
- reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.write(this.#holding, _v1);
22
+ reactivity_u0.write(this.#holding, _v1);
23
23
  }
24
24
  }
25
- const hold = template.factory(function (attributes, content) {
25
+ const hold = component(function (attributes, content) {
26
26
  let end = () => {
27
27
  if (!state.complete) {
28
28
  state.holding = false;
29
29
  }
30
- }, state = new ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303cq();
30
+ }, state = new ReactiveObject_1u9ndnf0();
31
31
  return (() => {
32
- let root_0ff113fe0a6246fbbfe92857b2a0303cr = template_0ff113fe0a6246fbbfe92857b2a0303cs(), element_0ff113fe0a6246fbbfe92857b2a0303ct = root_0ff113fe0a6246fbbfe92857b2a0303cr.firstChild;
33
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setList(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'class', () => state.holding && 'button--holding');
34
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'mousedown', (e) => {
32
+ let root_1u9ndnf1 = template_1u9ndnf2(), element_1u9ndnf3 = root_1u9ndnf1.firstChild;
33
+ template_u1.setList(element_1u9ndnf3, 'class', () => state.holding && 'button--holding');
34
+ template_u1.delegate(element_1u9ndnf3, 'mousedown', (e) => {
35
35
  e.preventDefault();
36
36
  state.holding = true;
37
37
  });
38
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303ct, attributes);
39
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'animationend', (e) => {
38
+ template_u1.setProperties(element_1u9ndnf3, attributes);
39
+ template_u1.delegate(element_1u9ndnf3, 'animationend', (e) => {
40
40
  if (e.animationName === 'buttonHolding') {
41
41
  state.complete = true;
42
42
  }
43
43
  });
44
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'click', () => { });
45
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'mousedown', (e) => {
44
+ template_u1.delegate(element_1u9ndnf3, 'click', () => { });
45
+ template_u1.delegate(element_1u9ndnf3, 'mousedown', (e) => {
46
46
  e.preventDefault();
47
47
  state.holding = true;
48
48
  });
49
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'mouseup', end);
50
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'touchend', end);
51
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303ct, 'touchstart', (e) => {
49
+ template_u1.delegate(element_1u9ndnf3, 'mouseup', end);
50
+ template_u1.delegate(element_1u9ndnf3, 'touchend', end);
51
+ template_u1.delegate(element_1u9ndnf3, 'touchstart', (e) => {
52
52
  e.preventDefault();
53
53
  state.holding = true;
54
54
  });
55
- new template_0ff113fe0a6246fbbfe92857b2a0303c1.EffectSlot(element_0ff113fe0a6246fbbfe92857b2a0303ct, () => content(state), 1);
56
- return root_0ff113fe0a6246fbbfe92857b2a0303cr;
55
+ new template_u1.EffectSlot(element_1u9ndnf3, () => content(state), 1);
56
+ return root_1u9ndnf1;
57
57
  })();
58
58
  });
59
59
  export default { hold };
@@ -1,4 +1,4 @@
1
- import { Attributes } from '@esportsplus/template';
1
+ import { type Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  declare const factory: (type: string) => (this: {
4
4
  attributes?: Attributes;
@@ -1,50 +1,54 @@
1
- import * as template_0ff113fe0a6246fbbfe92857b2a0303c1 from '@esportsplus/template';
2
- import * as reactivity_0ff113fe0a6246fbbfe92857b2a0303c0 from '@esportsplus/reactivity';
1
+ import * as template_u1 from '@esportsplus/template';
2
+ import * as reactivity_u0 from '@esportsplus/reactivity';
3
3
  import { root } from '@esportsplus/reactivity';
4
4
  import { omit } from '@esportsplus/utilities';
5
- import form from '../../components/form/index.js';
5
+ import form from '../form/index.js';
6
6
  import './scss/index.scss';
7
- const template_0ff113fe0a6246fbbfe92857b2a0303cw = template_0ff113fe0a6246fbbfe92857b2a0303c1.template(`<div><input>`);
8
- class ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303cu extends reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.ReactiveObject {
9
- #active = this[reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.SIGNAL](false);
10
- #error = this[reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.SIGNAL]('');
7
+ const template_0l38kpg2 = template_u1.template(`<div><input >`);
8
+ class ReactiveObject_0l38kpg0 extends reactivity_u0.ReactiveObject {
9
+ #active = this[reactivity_u0.SIGNAL](false);
10
+ #error = this[reactivity_u0.SIGNAL]('');
11
11
  constructor() {
12
12
  super(null);
13
13
  }
14
14
  get active() {
15
- return reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.read(this.#active);
15
+ return reactivity_u0.read(this.#active);
16
16
  }
17
17
  set active(_v0) {
18
- reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.write(this.#active, _v0);
18
+ reactivity_u0.write(this.#active, _v0);
19
19
  }
20
20
  get error() {
21
- return reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.read(this.#error);
21
+ return reactivity_u0.read(this.#error);
22
22
  }
23
23
  set error(_v1) {
24
- reactivity_0ff113fe0a6246fbbfe92857b2a0303c0.write(this.#error, _v1);
24
+ reactivity_u0.write(this.#error, _v1);
25
25
  }
26
26
  }
27
27
  const OMIT = ['checked', 'value'];
28
28
  const factory = (type) => {
29
29
  function template(attributes) {
30
- let state = attributes?.state || new ReactiveObject_0ff113fe0a6246fbbfe92857b2a0303cu();
30
+ let ref, state = attributes?.state || new ReactiveObject_0l38kpg0();
31
31
  if (attributes?.checked) {
32
32
  state.active = true;
33
33
  }
34
34
  return (() => {
35
- let root_0ff113fe0a6246fbbfe92857b2a0303cv = template_0ff113fe0a6246fbbfe92857b2a0303cw(), element_0ff113fe0a6246fbbfe92857b2a0303cx = root_0ff113fe0a6246fbbfe92857b2a0303cv.firstChild, element_0ff113fe0a6246fbbfe92857b2a0303cy = element_0ff113fe0a6246fbbfe92857b2a0303cx.firstElementChild;
36
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setList(element_0ff113fe0a6246fbbfe92857b2a0303cx, 'class', (type) + (() => state.active && '--active'));
37
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303cx, this?.attributes && omit(this.attributes, OMIT));
38
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperties(element_0ff113fe0a6246fbbfe92857b2a0303cx, attributes && omit(attributes, OMIT));
39
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperty(element_0ff113fe0a6246fbbfe92857b2a0303cy, 'checked', attributes?.checked || root(() => state.active));
40
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setList(element_0ff113fe0a6246fbbfe92857b2a0303cy, 'class', `${type}-tag`);
41
- template_0ff113fe0a6246fbbfe92857b2a0303c1.delegate(element_0ff113fe0a6246fbbfe92857b2a0303cy, 'change', (e) => {
35
+ let root_0l38kpg1 = template_0l38kpg2(), element_0l38kpg3 = root_0l38kpg1.firstChild, element_0l38kpg4 = element_0l38kpg3.firstElementChild;
36
+ template_u1.setList(element_0l38kpg3, 'class', () => state.active ? type + " --active" : type);
37
+ template_u1.setProperties(element_0l38kpg3, this?.attributes && omit(this.attributes, OMIT));
38
+ template_u1.setProperties(element_0l38kpg3, attributes && omit(attributes, OMIT));
39
+ template_u1.delegate(element_0l38kpg3, 'click', () => ref.click());
40
+ template_u1.setProperty(element_0l38kpg4, 'checked', attributes?.checked || root(() => state.active));
41
+ template_u1.setList(element_0l38kpg4, 'class', `${type}-tag`);
42
+ template_u1.delegate(element_0l38kpg4, 'change', (e) => {
42
43
  state.active = e.target.checked;
43
44
  });
44
- template_0ff113fe0a6246fbbfe92857b2a0303c1.onrender(element_0ff113fe0a6246fbbfe92857b2a0303cy, form.input.onrender(state));
45
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperty(element_0ff113fe0a6246fbbfe92857b2a0303cy, 'type', type === 'radio' ? 'radio' : 'checkbox');
46
- template_0ff113fe0a6246fbbfe92857b2a0303c1.setProperty(element_0ff113fe0a6246fbbfe92857b2a0303cy, 'value', attributes?.value || 1);
47
- return root_0ff113fe0a6246fbbfe92857b2a0303cv;
45
+ template_u1.onconnect(element_0l38kpg4, (input) => {
46
+ ref = input;
47
+ });
48
+ template_u1.onrender(element_0l38kpg4, form.input.onrender(state));
49
+ template_u1.setProperty(element_0l38kpg4, 'type', type === 'radio' ? 'radio' : 'checkbox');
50
+ template_u1.setProperty(element_0l38kpg4, 'value', attributes?.value || 1);
51
+ return root_0l38kpg1;
48
52
  })();
49
53
  }
50
54
  return template;