@esportsplus/ui 0.48.6 → 0.49.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 (87) hide show
  1. package/README.md +4 -4
  2. package/build/components/accordion/index.d.ts +16 -16
  3. package/build/components/accordion/index.js +16 -15
  4. package/build/components/alert/index.d.ts +1 -1
  5. package/build/components/alert/index.js +50 -42
  6. package/build/components/back/index.d.ts +8 -9
  7. package/build/components/back/index.js +11 -10
  8. package/build/components/button/index.d.ts +21 -22
  9. package/build/components/button/index.js +24 -24
  10. package/build/components/checkbox/index.d.ts +1 -1
  11. package/build/components/checkbox/index.js +20 -18
  12. package/build/components/clipboard/index.d.ts +1120 -1120
  13. package/build/components/clipboard/onclick.d.ts +1 -1
  14. package/build/components/clipboard/onclick.js +17 -18
  15. package/build/components/counter/index.d.ts +1 -1
  16. package/build/components/counter/index.js +27 -34
  17. package/build/components/ellipsis/index.d.ts +1 -1
  18. package/build/components/ellipsis/index.js +8 -7
  19. package/build/components/form/action.d.ts +1 -1
  20. package/build/components/form/action.js +15 -12
  21. package/build/components/form/index.d.ts +3 -3
  22. package/build/components/form/input.d.ts +1 -1
  23. package/build/components/frame/index.d.ts +10 -10
  24. package/build/components/highlight/index.d.ts +16 -16
  25. package/build/components/highlight/index.js +14 -13
  26. package/build/components/icon/index.d.ts +10 -11
  27. package/build/components/icon/index.js +6 -9
  28. package/build/components/input/index.d.ts +1 -1
  29. package/build/components/input/index.js +17 -16
  30. package/build/components/loader/index.d.ts +16 -16
  31. package/build/components/loader/index.js +44 -37
  32. package/build/components/loading/index.d.ts +1 -1
  33. package/build/components/loading/index.js +9 -7
  34. package/build/components/overlay/index.d.ts +10 -10
  35. package/build/components/radio/index.d.ts +2 -2
  36. package/build/components/range/index.d.ts +1 -1
  37. package/build/components/range/index.js +21 -19
  38. package/build/components/scrollbar/index.d.ts +11 -12
  39. package/build/components/scrollbar/index.js +32 -19
  40. package/build/components/select/index.d.ts +1 -1
  41. package/build/components/select/index.js +88 -83
  42. package/build/components/sidebar/index.d.ts +10 -10
  43. package/build/components/site/index.d.ts +10 -10
  44. package/build/components/switch/index.d.ts +2 -2
  45. package/build/components/template/index.d.ts +1 -1
  46. package/build/components/textarea/index.d.ts +1 -1
  47. package/build/components/textarea/index.js +17 -16
  48. package/build/components/tooltip/index.d.ts +2295 -2295
  49. package/build/components/tooltip/menu.d.ts +11 -12
  50. package/build/components/tooltip/menu.js +33 -29
  51. package/build/components/tooltip/onclick.d.ts +1120 -1121
  52. package/build/components/tooltip/onclick.js +14 -12
  53. package/build/components/tooltip/onhover.d.ts +16 -16
  54. package/build/components/tooltip/onhover.js +16 -14
  55. package/build/components/typewriter/index.d.ts +10 -11
  56. package/build/components/typewriter/index.js +10 -12
  57. package/build/themes/dark/alert.d.ts +3 -3
  58. package/build/themes/dark/back.d.ts +11 -11
  59. package/build/themes/dark/input.d.ts +111 -111
  60. package/build/themes/dark/select.d.ts +1220 -1220
  61. package/build/themes/dark/textarea.d.ts +111 -111
  62. package/package.json +3 -3
  63. package/src/components/accordion/index.ts +1 -1
  64. package/src/components/alert/index.ts +1 -1
  65. package/src/components/back/index.ts +1 -1
  66. package/src/components/button/index.ts +1 -1
  67. package/src/components/checkbox/index.ts +1 -1
  68. package/src/components/clipboard/onclick.ts +1 -1
  69. package/src/components/counter/index.ts +1 -1
  70. package/src/components/ellipsis/index.ts +1 -1
  71. package/src/components/form/action.ts +1 -1
  72. package/src/components/form/input.ts +1 -1
  73. package/src/components/highlight/index.ts +1 -1
  74. package/src/components/icon/index.ts +1 -1
  75. package/src/components/input/index.ts +1 -1
  76. package/src/components/loader/index.ts +1 -1
  77. package/src/components/loading/index.ts +1 -1
  78. package/src/components/range/index.ts +1 -1
  79. package/src/components/scrollbar/index.ts +1 -1
  80. package/src/components/select/index.ts +1 -1
  81. package/src/components/template/index.ts +1 -1
  82. package/src/components/textarea/index.ts +1 -1
  83. package/src/components/tooltip/menu.ts +1 -1
  84. package/src/components/tooltip/onclick.ts +1 -1
  85. package/src/components/tooltip/onhover.ts +1 -1
  86. package/src/components/typewriter/index.ts +1 -1
  87. package/tsconfig.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ pnpm add @esportsplus/ui
10
10
 
11
11
  ## Dependencies
12
12
 
13
- - `@esportsplus/template` - Tagged template literals with compile-time transforms and reactive state management
13
+ - `@esportsplus/frontend` - Tagged template literals with compile-time transforms and reactive state management
14
14
  - `@esportsplus/action` - Response/error handling
15
15
  - `@esportsplus/utilities` - Core utilities
16
16
 
@@ -18,7 +18,7 @@ pnpm add @esportsplus/ui
18
18
 
19
19
  ```typescript
20
20
  import { button, form, input, select } from '@esportsplus/ui';
21
- import { html } from '@esportsplus/template';
21
+ import { html } from '@esportsplus/frontend';
22
22
 
23
23
  // Simple component
24
24
  html`${button({}, 'Click Me')}`;
@@ -123,7 +123,7 @@ component({ class: 'custom' }, html`<span>Content</span>`)
123
123
  Components can accept and return reactive state:
124
124
 
125
125
  ```typescript
126
- import { reactive } from '@esportsplus/template';
126
+ import { reactive } from '@esportsplus/frontend';
127
127
 
128
128
  let state = reactive({ active: false });
129
129
 
@@ -261,7 +261,7 @@ build/
261
261
  Full type safety with zero `any` types:
262
262
 
263
263
  ```typescript
264
- import type { Attributes } from '@esportsplus/template';
264
+ import type { Attributes } from '@esportsplus/frontend';
265
265
 
266
266
  // Components are generic
267
267
  template.factory<A extends Attributes, C>(fn);
@@ -1,21 +1,21 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
1
+ import { Attributes } from '@esportsplus/frontend';
2
2
  import './scss/index.scss';
3
3
  declare const _default: {
4
4
  (): ReturnType<(this: {
5
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
6
- content?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>;
7
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
8
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>(attributes: T): ReturnType<(this: {
9
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
10
- content?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>;
11
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
12
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>(content: T): ReturnType<(this: {
13
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
14
- content?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>;
15
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
16
- (attributes: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>): ReturnType<(this: {
17
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
18
- content?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>;
19
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
5
+ attributes?: Attributes | undefined;
6
+ content?: import("@esportsplus/frontend").Renderable<any>;
7
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
8
+ <T extends Attributes>(attributes: T): ReturnType<(this: {
9
+ attributes?: Attributes | undefined;
10
+ content?: import("@esportsplus/frontend").Renderable<any>;
11
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
12
+ <T extends import("@esportsplus/frontend").Renderable<any>>(content: T): ReturnType<(this: {
13
+ attributes?: Attributes | undefined;
14
+ content?: import("@esportsplus/frontend").Renderable<any>;
15
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
16
+ (attributes: Attributes, content: import("@esportsplus/frontend").Renderable<any>): ReturnType<(this: {
17
+ attributes?: Attributes | undefined;
18
+ content?: import("@esportsplus/frontend").Renderable<any>;
19
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
20
20
  };
21
21
  export default _default;
@@ -1,32 +1,33 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
2
- import { reactive } from '@esportsplus/template';
1
+ import { html, reactive } from '@esportsplus/frontend';
3
2
  import { omit } from '@esportsplus/utilities';
4
3
  import template from '../../components/template/index.js';
5
4
  import './scss/index.scss';
6
- const template_3ea7bdb36b1e42ed846a8dc5465fdb953 = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div><!--$--></div>`);
7
5
  const OMIT = ['state'];
8
6
  let key = Symbol();
9
7
  export default template.factory(function (attributes, content) {
10
8
  let ref, state = attributes.state || reactive({
11
9
  active: 0
12
10
  });
13
- return (() => {
14
- let root_3ea7bdb36b1e42ed846a8dc5465fdb952 = template_3ea7bdb36b1e42ed846a8dc5465fdb953(), element_3ea7bdb36b1e42ed846a8dc5465fdb954 = root_3ea7bdb36b1e42ed846a8dc5465fdb952.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb955 = element_3ea7bdb36b1e42ed846a8dc5465fdb954.firstChild;
15
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb954, omit(attributes, OMIT), {});
16
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb954, 'class', '', () => {
11
+ return html `
12
+ <div
13
+ ${omit(attributes, OMIT)}
14
+ ${{
15
+ class: () => {
17
16
  return state.active && '--active';
18
- });
19
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.onrender(element_3ea7bdb36b1e42ed846a8dc5465fdb954, (element) => {
17
+ },
18
+ onrender: (element) => {
20
19
  (ref = element)[key] = state;
21
- });
22
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb954, 'style', '', () => {
20
+ },
21
+ style: () => {
23
22
  let parent = ref.closest('accordion');
24
23
  if (parent && key in parent) {
25
24
  parent[key].active = (+parent[key].active) + 1;
26
25
  }
27
26
  return state.active && `--max-height: ${ref.scrollHeight}`;
28
- });
29
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb955, content);
30
- return root_3ea7bdb36b1e42ed846a8dc5465fdb952;
31
- })();
27
+ }
28
+ }}
29
+ >
30
+ ${content}
31
+ </div>
32
+ `;
32
33
  });
@@ -1,6 +1,6 @@
1
1
  import '@esportsplus/vite/global.d.ts';
2
2
  import { Response } from '@esportsplus/action';
3
- import { Attributes, Renderable } from '@esportsplus/template';
3
+ import { Attributes, Renderable } from '@esportsplus/frontend';
4
4
  import './scss/index.scss';
5
5
  declare const _default: (attributes: Attributes & {
6
6
  "alert-close"?: Attributes;
@@ -1,16 +1,11 @@
1
1
  import '@esportsplus/vite/global.d.ts';
2
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
3
- import { reactive, svg } from '@esportsplus/template';
2
+ import { html, reactive, svg } from '@esportsplus/frontend';
4
3
  import { omit } from '@esportsplus/utilities';
5
4
  import { icon } from '@esportsplus/ui';
6
5
  import check from './svg/check.svg';
7
6
  import close from './svg/close.svg';
8
7
  import e from './svg/error.svg';
9
8
  import './scss/index.scss';
10
- const template_3ea7bdb36b1e42ed846a8dc5465fdb957 = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div class='--flex-vertical'><!--$--></div>`);
11
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95b = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<p><!--$--></p>`);
12
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95f = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div class='--flex-start'><!--$--></div>`);
13
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95i = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div class='alert anchor anchor--n --flex-row'><!--$--><div class='alert-messages --flex-column --flex-fill'><!--$--></div><div class="--flex-vertical"><div class='alert-close button --padding-300'><div class="icon" style='--size: 14px;'><!--$--></div></div></div></div>`);
14
9
  const OMIT = ['alert-close', 'alert-messages', 'alert-message'];
15
10
  let modifiers = {
16
11
  error: 'red',
@@ -76,43 +71,56 @@ export default (attributes) => {
76
71
  }), 5);
77
72
  };
78
73
  return {
79
- content: (() => {
80
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95h = template_3ea7bdb36b1e42ed846a8dc5465fdb95i(), element_3ea7bdb36b1e42ed846a8dc5465fdb95j = root_3ea7bdb36b1e42ed846a8dc5465fdb95h.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95k = element_3ea7bdb36b1e42ed846a8dc5465fdb95j.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95l = element_3ea7bdb36b1e42ed846a8dc5465fdb95j.firstElementChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95m = element_3ea7bdb36b1e42ed846a8dc5465fdb95l.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95n = element_3ea7bdb36b1e42ed846a8dc5465fdb95l.nextElementSibling.firstElementChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95o = element_3ea7bdb36b1e42ed846a8dc5465fdb95n.firstElementChild.firstChild;
81
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb95j, 'class', '--flex-row', () => state.active && '--active');
82
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95j, omit(attributes, OMIT), { "class": "--flex-row" });
83
- new template_3ea7bdb36b1e42ed846a8dc5465fdb951.EffectSlot(element_3ea7bdb36b1e42ed846a8dc5465fdb95k, () => {
84
- let type = state.type;
85
- return (() => {
86
- let root_3ea7bdb36b1e42ed846a8dc5465fdb956 = template_3ea7bdb36b1e42ed846a8dc5465fdb957(), element_3ea7bdb36b1e42ed846a8dc5465fdb958 = root_3ea7bdb36b1e42ed846a8dc5465fdb956.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb959 = element_3ea7bdb36b1e42ed846a8dc5465fdb958.firstChild;
87
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb958, 'style', '', `--color: var(--color-${modifiers[type]}-400);`);
88
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb959, icon({ class: '--size-500' }, type === 'error' ? e : check));
89
- return root_3ea7bdb36b1e42ed846a8dc5465fdb956;
90
- })();
74
+ content: html `
75
+ <div
76
+ class='alert anchor anchor--n ${() => state.active && '--active'} --flex-row'
77
+ ${omit(attributes, OMIT)}
78
+ >
79
+ ${() => {
80
+ let type = state.type;
81
+ return html `
82
+ <div class='--flex-vertical' style='${`--color: var(--color-${modifiers[type]}-400);`}'>
83
+ ${icon({ class: '--size-500' }, type === 'error' ? e : check)}
84
+ </div>
85
+ `;
86
+ }}
87
+
88
+ <div
89
+ class='alert-messages --flex-column --flex-fill'
90
+ ${attributes['alert-messages']}
91
+ >
92
+ ${() => {
93
+ let message = attributes['alert-message'];
94
+ return state.rerender && [...state.messages].map((content) => {
95
+ if (typeof content === 'string') {
96
+ return html `
97
+ <p ${message}>
98
+ ${content}
99
+ </p>
100
+ `;
101
+ }
102
+ return html `
103
+ <div class='--flex-start'>
104
+ ${content}
105
+ </div>
106
+ `;
91
107
  });
92
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95l, attributes['alert-messages'], { "class": "--flex-fill" });
93
- new template_3ea7bdb36b1e42ed846a8dc5465fdb951.EffectSlot(element_3ea7bdb36b1e42ed846a8dc5465fdb95m, () => {
94
- let message = attributes['alert-message'];
95
- return state.rerender && [...state.messages].map((content) => {
96
- if (typeof content === 'string') {
97
- return (() => {
98
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95a = template_3ea7bdb36b1e42ed846a8dc5465fdb95b(), element_3ea7bdb36b1e42ed846a8dc5465fdb95c = root_3ea7bdb36b1e42ed846a8dc5465fdb95a.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95d = element_3ea7bdb36b1e42ed846a8dc5465fdb95c.firstChild;
99
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95c, message, {});
100
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb95d, content);
101
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95a;
102
- })();
103
- }
104
- return (() => {
105
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95e = template_3ea7bdb36b1e42ed846a8dc5465fdb95f(), element_3ea7bdb36b1e42ed846a8dc5465fdb95g = root_3ea7bdb36b1e42ed846a8dc5465fdb95e.firstChild.firstChild;
106
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb95g, content);
107
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95e;
108
- })();
109
- });
110
- });
111
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95n, 'click', () => deactivate(state));
112
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95n, attributes['alert-close'], { "class": "--padding-300" });
113
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb95o, svg.sprite(close));
114
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95h;
115
- })(),
108
+ }}
109
+ </div>
110
+
111
+ <div class="--flex-vertical">
112
+ <div
113
+ class='alert-close button --padding-300'
114
+ onclick='${() => deactivate(state)}'
115
+ ${attributes['alert-close']}
116
+ >
117
+ <div class="icon" style='--size: 14px;'>
118
+ ${svg.sprite(close)}
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ `,
116
124
  deactivate: () => deactivate(state),
117
125
  error,
118
126
  info: (messages, seconds = 0) => activate('info', messages, seconds, state),
@@ -1,18 +1,17 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
2
- import { Attributes } from '@esportsplus/template';
1
+ import { Attributes } from '@esportsplus/frontend';
3
2
  import './scss/index.scss';
4
3
  declare const _default: {
5
4
  (): ReturnType<(this: {
6
5
  attributes?: Attributes;
7
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
8
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>(attributes: T): ReturnType<(this: {
6
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
7
+ <T extends Attributes>(attributes: T): ReturnType<(this: {
9
8
  attributes?: Attributes;
10
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
11
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>(content: T): ReturnType<(this: {
9
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
10
+ <T extends import("@esportsplus/frontend").Renderable<any>>(content: T): ReturnType<(this: {
12
11
  attributes?: Attributes;
13
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
14
- (attributes: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>): ReturnType<(this: {
12
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
13
+ (attributes: Attributes, content: import("@esportsplus/frontend").Renderable<any>): ReturnType<(this: {
15
14
  attributes?: Attributes;
16
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>) => template_3ea7bdb36b1e42ed846a8dc5465fdb951.Renderable<any>>;
15
+ }, attributes: Readonly<Attributes>, content: import("@esportsplus/frontend").Renderable<any>) => import("@esportsplus/frontend").Renderable<any>>;
17
16
  };
18
17
  export default _default;
@@ -1,16 +1,17 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
1
+ import { html } from '@esportsplus/frontend';
2
2
  import icon from '../../components/icon/index.js';
3
3
  import template from '../../components/template/index.js';
4
4
  import arrow from './svg/arrow.svg';
5
5
  import './scss/index.scss';
6
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95q = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<a class='back link --padding-0px --flex-vertical'><!--$--><!--$--></a>`);
7
6
  export default template.factory(function (attributes, content) {
8
- return (() => {
9
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95p = template_3ea7bdb36b1e42ed846a8dc5465fdb95q(), element_3ea7bdb36b1e42ed846a8dc5465fdb95r = root_3ea7bdb36b1e42ed846a8dc5465fdb95p.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95s = element_3ea7bdb36b1e42ed846a8dc5465fdb95r.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95t = element_3ea7bdb36b1e42ed846a8dc5465fdb95s.nextSibling;
10
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95r, this.attributes, { "class": "--flex-vertical" });
11
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95r, attributes, { "class": "--flex-vertical" });
12
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb95s, icon({ class: 'back-arrow --margin-right --margin-200' }, arrow));
13
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.slot(element_3ea7bdb36b1e42ed846a8dc5465fdb95t, content);
14
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95p;
15
- })();
7
+ return html `
8
+ <a
9
+ class='back link --padding-0px --flex-vertical'
10
+ ${this.attributes}
11
+ ${attributes}
12
+ >
13
+ ${icon({ class: 'back-arrow --margin-right --margin-200' }, arrow)}
14
+ ${content}
15
+ </a>
16
+ `;
16
17
  });
@@ -1,24 +1,23 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
2
- import { Renderable } from '@esportsplus/template';
1
+ import { type Renderable } from '@esportsplus/frontend';
3
2
  import './scss/index.scss';
4
3
  declare const hold: {
5
4
  (): ReturnType<(this: {
6
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
5
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
7
6
  content?: ((state: {
8
7
  holding: boolean;
9
8
  complete: boolean;
10
9
  }) => Renderable<any>) | undefined;
11
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
10
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
12
11
  holding: boolean;
13
12
  complete: boolean;
14
13
  }) => Renderable<any>) => Renderable<any>>;
15
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>(attributes: T): ReturnType<(this: {
16
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
14
+ <T extends import("@esportsplus/frontend").Attributes>(attributes: T): ReturnType<(this: {
15
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
17
16
  content?: ((state: {
18
17
  holding: boolean;
19
18
  complete: boolean;
20
19
  }) => Renderable<any>) | undefined;
21
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
20
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
22
21
  holding: boolean;
23
22
  complete: boolean;
24
23
  }) => Renderable<any>) => Renderable<any>>;
@@ -26,25 +25,25 @@ declare const hold: {
26
25
  holding: boolean;
27
26
  complete: boolean;
28
27
  }) => Renderable<any>>(content: T): ReturnType<(this: {
29
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
28
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
30
29
  content?: ((state: {
31
30
  holding: boolean;
32
31
  complete: boolean;
33
32
  }) => Renderable<any>) | undefined;
34
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
33
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
35
34
  holding: boolean;
36
35
  complete: boolean;
37
36
  }) => Renderable<any>) => Renderable<any>>;
38
- (attributes: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes, content: (state: {
37
+ (attributes: import("@esportsplus/frontend").Attributes, content: (state: {
39
38
  holding: boolean;
40
39
  complete: boolean;
41
40
  }) => Renderable<any>): ReturnType<(this: {
42
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
41
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
43
42
  content?: ((state: {
44
43
  holding: boolean;
45
44
  complete: boolean;
46
45
  }) => Renderable<any>) | undefined;
47
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
46
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
48
47
  holding: boolean;
49
48
  complete: boolean;
50
49
  }) => Renderable<any>) => Renderable<any>>;
@@ -52,22 +51,22 @@ declare const hold: {
52
51
  declare const _default: {
53
52
  hold: {
54
53
  (): ReturnType<(this: {
55
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
54
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
56
55
  content?: ((state: {
57
56
  holding: boolean;
58
57
  complete: boolean;
59
58
  }) => Renderable<any>) | undefined;
60
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
59
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
61
60
  holding: boolean;
62
61
  complete: boolean;
63
62
  }) => Renderable<any>) => Renderable<any>>;
64
- <T extends template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>(attributes: T): ReturnType<(this: {
65
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
63
+ <T extends import("@esportsplus/frontend").Attributes>(attributes: T): ReturnType<(this: {
64
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
66
65
  content?: ((state: {
67
66
  holding: boolean;
68
67
  complete: boolean;
69
68
  }) => Renderable<any>) | undefined;
70
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
69
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
71
70
  holding: boolean;
72
71
  complete: boolean;
73
72
  }) => Renderable<any>) => Renderable<any>>;
@@ -75,25 +74,25 @@ declare const _default: {
75
74
  holding: boolean;
76
75
  complete: boolean;
77
76
  }) => Renderable<any>>(content: T): ReturnType<(this: {
78
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
77
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
79
78
  content?: ((state: {
80
79
  holding: boolean;
81
80
  complete: boolean;
82
81
  }) => Renderable<any>) | undefined;
83
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
82
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
84
83
  holding: boolean;
85
84
  complete: boolean;
86
85
  }) => Renderable<any>) => Renderable<any>>;
87
- (attributes: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes, content: (state: {
86
+ (attributes: import("@esportsplus/frontend").Attributes, content: (state: {
88
87
  holding: boolean;
89
88
  complete: boolean;
90
89
  }) => Renderable<any>): ReturnType<(this: {
91
- attributes?: template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes | undefined;
90
+ attributes?: import("@esportsplus/frontend").Attributes | undefined;
92
91
  content?: ((state: {
93
92
  holding: boolean;
94
93
  complete: boolean;
95
94
  }) => Renderable<any>) | undefined;
96
- }, attributes: Readonly<template_3ea7bdb36b1e42ed846a8dc5465fdb951.Attributes>, content: (state: {
95
+ }, attributes: Readonly<import("@esportsplus/frontend").Attributes>, content: (state: {
97
96
  holding: boolean;
98
97
  complete: boolean;
99
98
  }) => Renderable<any>) => Renderable<any>>;
@@ -1,8 +1,6 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
2
- import { reactive } from '@esportsplus/template';
1
+ import { html, reactive } from '@esportsplus/frontend';
3
2
  import template from '../template/index.js';
4
3
  import './scss/index.scss';
5
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95v = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div class='button '><!--$--></div>`);
6
4
  const hold = template.factory(function (attributes, content) {
7
5
  let end = () => {
8
6
  if (!state.complete) {
@@ -12,34 +10,36 @@ const hold = template.factory(function (attributes, content) {
12
10
  complete: false,
13
11
  holding: false
14
12
  });
15
- return (() => {
16
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95u = template_3ea7bdb36b1e42ed846a8dc5465fdb95v(), element_3ea7bdb36b1e42ed846a8dc5465fdb95w = root_3ea7bdb36b1e42ed846a8dc5465fdb95u.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb95x = element_3ea7bdb36b1e42ed846a8dc5465fdb95w.firstChild;
17
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'class', '', () => state.holding && 'button--holding');
18
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'class', '', () => state.complete && '--active');
19
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'mousedown', (e) => {
20
- e.preventDefault();
21
- state.holding = true;
22
- });
23
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, attributes, { "class": "" });
24
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'animationend', (e) => {
13
+ return html `
14
+ <div
15
+ class='button ${() => state.holding && 'button--holding'} ${() => state.complete && '--active'}'
16
+ onmousedown='${(e) => {
17
+ e.preventDefault();
18
+ state.holding = true;
19
+ }}'
20
+ ${attributes}
21
+ ${{
22
+ onanimationend: (e) => {
25
23
  if (e.animationName === 'buttonHolding') {
26
24
  state.complete = true;
27
25
  }
28
- });
29
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'click', () => { });
30
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'mousedown', (e) => {
26
+ },
27
+ onclick: () => { },
28
+ onmousedown: (e) => {
31
29
  e.preventDefault();
32
30
  state.holding = true;
33
- });
34
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'mouseup', end);
35
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'touchend', end);
36
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb95w, 'touchstart', (e) => {
31
+ },
32
+ onmouseup: end,
33
+ ontouchend: end,
34
+ ontouchstart: (e) => {
37
35
  e.preventDefault();
38
36
  state.holding = true;
39
- });
40
- new template_3ea7bdb36b1e42ed846a8dc5465fdb951.EffectSlot(element_3ea7bdb36b1e42ed846a8dc5465fdb95x, () => content(state));
41
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95u;
42
- })();
37
+ }
38
+ }}
39
+ >
40
+ ${() => content(state)}
41
+ </div>
42
+ `;
43
43
  });
44
44
  export default { hold };
45
45
  export { hold };
@@ -1,4 +1,4 @@
1
- import { Attributes } from '@esportsplus/template';
1
+ import { type Attributes } from '@esportsplus/frontend';
2
2
  import './scss/index.scss';
3
3
  declare const factory: (type: string) => (this: {
4
4
  attributes?: Attributes;
@@ -1,9 +1,7 @@
1
- import * as template_3ea7bdb36b1e42ed846a8dc5465fdb951 from '@esportsplus/template';
2
- import { reactive, root } from '@esportsplus/template';
1
+ import { html, reactive, root } from '@esportsplus/frontend';
3
2
  import { omit } from '@esportsplus/utilities';
4
3
  import form from '../../components/form/index.js';
5
4
  import './scss/index.scss';
6
- const template_3ea7bdb36b1e42ed846a8dc5465fdb95z = template_3ea7bdb36b1e42ed846a8dc5465fdb951.template(`<div><input></div>`);
7
5
  const OMIT = ['checked', 'value'];
8
6
  const factory = (type) => {
9
7
  function template(attributes) {
@@ -14,22 +12,26 @@ const factory = (type) => {
14
12
  if (attributes?.checked) {
15
13
  state.active = true;
16
14
  }
17
- return (() => {
18
- let root_3ea7bdb36b1e42ed846a8dc5465fdb95y = template_3ea7bdb36b1e42ed846a8dc5465fdb95z(), element_3ea7bdb36b1e42ed846a8dc5465fdb9510 = root_3ea7bdb36b1e42ed846a8dc5465fdb95y.firstChild, element_3ea7bdb36b1e42ed846a8dc5465fdb9511 = element_3ea7bdb36b1e42ed846a8dc5465fdb9510.firstElementChild;
19
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb9510, 'class', '', type);
20
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb9510, 'class', '', () => state.active && '--active');
21
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb9510, this?.attributes && omit(this.attributes, OMIT), { "class": "" });
22
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperties(element_3ea7bdb36b1e42ed846a8dc5465fdb9510, attributes && omit(attributes, OMIT), { "class": "" });
23
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperty(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, 'checked', attributes?.checked || root(() => state.active));
24
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setList(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, 'class', '', `${type}-tag`);
25
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.delegate(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, 'change', (e) => {
15
+ return html `
16
+ <div
17
+ class='${type} ${() => state.active && '--active'}'
18
+ ${this?.attributes && omit(this.attributes, OMIT)}
19
+ ${attributes && omit(attributes, OMIT)}
20
+ >
21
+ <input
22
+ ${{
23
+ checked: attributes?.checked || root(() => state.active),
24
+ class: `${type}-tag`,
25
+ onchange: (e) => {
26
26
  state.active = e.target.checked;
27
- });
28
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.onrender(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, form.input.onrender(state));
29
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperty(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, 'type', type === 'radio' ? 'radio' : 'checkbox');
30
- template_3ea7bdb36b1e42ed846a8dc5465fdb951.setProperty(element_3ea7bdb36b1e42ed846a8dc5465fdb9511, 'value', attributes?.value || 1);
31
- return root_3ea7bdb36b1e42ed846a8dc5465fdb95y;
32
- })();
27
+ },
28
+ onrender: form.input.onrender(state),
29
+ type: type === 'radio' ? 'radio' : 'checkbox',
30
+ value: attributes?.value || 1
31
+ }}
32
+ >
33
+ </div>
34
+ `;
33
35
  }
34
36
  return template;
35
37
  };