@esportsplus/ui 0.46.0 → 0.48.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 (75) hide show
  1. package/.github/workflows/bump.yml +2 -2
  2. package/.github/workflows/dependabot.yml +1 -1
  3. package/.github/workflows/publish.yml +3 -3
  4. package/README.md +287 -0
  5. package/build/components/accordion/index.d.ts +16 -16
  6. package/build/components/accordion/index.js +15 -17
  7. package/build/components/alert/index.d.ts +1 -1
  8. package/build/components/alert/index.js +45 -51
  9. package/build/components/back/index.d.ts +8 -7
  10. package/build/components/back/index.js +11 -11
  11. package/build/components/button/index.d.ts +21 -20
  12. package/build/components/button/index.js +32 -23
  13. package/build/components/checkbox/index.d.ts +3 -3
  14. package/build/components/checkbox/index.js +18 -21
  15. package/build/components/clipboard/index.d.ts +90 -70
  16. package/build/components/clipboard/onclick.d.ts +1 -1
  17. package/build/components/clipboard/onclick.js +18 -18
  18. package/build/components/counter/index.d.ts +2 -2
  19. package/build/components/counter/index.js +37 -32
  20. package/build/components/ellipsis/index.d.ts +1 -1
  21. package/build/components/ellipsis/index.js +7 -8
  22. package/build/components/form/action.d.ts +1 -1
  23. package/build/components/form/action.js +13 -15
  24. package/build/components/form/index.d.ts +1 -1
  25. package/build/components/highlight/index.d.ts +16 -16
  26. package/build/components/highlight/index.js +13 -15
  27. package/build/components/icon/index.d.ts +11 -10
  28. package/build/components/icon/index.js +9 -6
  29. package/build/components/input/index.d.ts +2 -2
  30. package/build/components/input/index.js +18 -18
  31. package/build/components/loader/index.d.ts +16 -16
  32. package/build/components/loader/index.js +41 -45
  33. package/build/components/loading/index.d.ts +1 -1
  34. package/build/components/loading/index.js +9 -9
  35. package/build/components/radio/index.d.ts +1 -1
  36. package/build/components/range/index.d.ts +2 -2
  37. package/build/components/range/index.js +22 -22
  38. package/build/components/scrollbar/index.d.ts +12 -11
  39. package/build/components/scrollbar/index.js +22 -33
  40. package/build/components/select/index.d.ts +1 -1
  41. package/build/components/select/index.js +86 -80
  42. package/build/components/switch/index.d.ts +1 -1
  43. package/build/components/textarea/index.d.ts +2 -2
  44. package/build/components/textarea/index.js +17 -18
  45. package/build/components/tooltip/index.d.ts +180 -140
  46. package/build/components/tooltip/menu.d.ts +12 -11
  47. package/build/components/tooltip/menu.js +33 -33
  48. package/build/components/tooltip/onclick.d.ts +1121 -1100
  49. package/build/components/tooltip/onclick.js +13 -15
  50. package/build/components/tooltip/onhover.d.ts +16 -16
  51. package/build/components/tooltip/onhover.js +15 -17
  52. package/build/components/typewriter/index.d.ts +11 -10
  53. package/build/components/typewriter/index.js +12 -11
  54. package/build/themes/dark/alert.d.ts +1 -1
  55. package/build/themes/dark/input.d.ts +10 -8
  56. package/build/themes/dark/select.d.ts +90 -70
  57. package/build/themes/dark/textarea.d.ts +10 -8
  58. package/package.json +17 -14
  59. package/src/components/accordion/index.ts +1 -2
  60. package/src/components/alert/index.ts +1 -2
  61. package/src/components/button/index.ts +22 -15
  62. package/src/components/checkbox/index.ts +1 -2
  63. package/src/components/clipboard/onclick.ts +1 -2
  64. package/src/components/counter/index.ts +7 -8
  65. package/src/components/highlight/index.ts +1 -2
  66. package/src/components/input/index.ts +1 -2
  67. package/src/components/loader/index.ts +1 -2
  68. package/src/components/range/index.ts +1 -2
  69. package/src/components/scrollbar/index.ts +1 -2
  70. package/src/components/select/index.ts +14 -3
  71. package/src/components/textarea/index.ts +1 -2
  72. package/src/components/tooltip/onclick.ts +1 -2
  73. package/src/components/tooltip/onhover.ts +1 -2
  74. package/src/components/typewriter/index.ts +1 -2
  75. package/tsconfig.json +6 -1
@@ -1,4 +1,4 @@
1
- import { type Attributes, type Renderable } from '@esportsplus/template';
1
+ import { Attributes, Renderable } from '@esportsplus/template';
2
2
  type A = {
3
3
  timeout?: number;
4
4
  value: string;
@@ -1,28 +1,28 @@
1
- import { reactive } from '@esportsplus/reactivity';
2
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { reactive } from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
4
  import template from '../../components/template/index.js';
5
5
  import write from './write.js';
6
+ const template_ed8f776bb07a460eadcbcfe445975fdf13 = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div><!--$--></div>`);
6
7
  const OMIT = ['timeout', 'value'];
7
8
  export default template.factory(function (attributes, content) {
8
9
  let state = reactive({
9
10
  copied: false
10
11
  }), timeout = attributes.timeout || 1000 * 2;
11
- return html `
12
- <div
13
- ${omit(attributes, OMIT)}
14
- onclick=${(e) => {
15
- e.preventDefault();
16
- e.stopPropagation();
17
- write(attributes.value).then(() => {
18
- state.copied = true;
19
- setTimeout(() => {
20
- state.copied = false;
21
- }, timeout);
12
+ return (() => {
13
+ let root_ed8f776bb07a460eadcbcfe445975fdf12 = template_ed8f776bb07a460eadcbcfe445975fdf13(), element_ed8f776bb07a460eadcbcfe445975fdf14 = root_ed8f776bb07a460eadcbcfe445975fdf12.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf15 = element_ed8f776bb07a460eadcbcfe445975fdf14.firstChild;
14
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf14, omit(attributes, OMIT));
15
+ template_ed8f776bb07a460eadcbcfe445975fdf1.delegate(element_ed8f776bb07a460eadcbcfe445975fdf14, 'click', (e) => {
16
+ e.preventDefault();
17
+ e.stopPropagation();
18
+ write(attributes.value).then(() => {
19
+ state.copied = true;
20
+ setTimeout(() => {
21
+ state.copied = false;
22
+ }, timeout);
23
+ });
22
24
  });
23
- }}
24
- >
25
- ${() => content(state)}
26
- </div>
27
- `;
25
+ new template_ed8f776bb07a460eadcbcfe445975fdf1.EffectSlot(element_ed8f776bb07a460eadcbcfe445975fdf15, () => content(state));
26
+ return root_ed8f776bb07a460eadcbcfe445975fdf12;
27
+ })();
28
28
  });
@@ -1,4 +1,4 @@
1
- import { type Attributes } from '@esportsplus/template';
1
+ import { Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  declare const _default: (attributes: Attributes & {
4
4
  currency?: "IGNORE" | "EUR" | "GBP" | "USD";
@@ -10,5 +10,5 @@ declare const _default: (attributes: Attributes & {
10
10
  };
11
11
  suffix?: string;
12
12
  value: number;
13
- }) => Node;
13
+ }) => DocumentFragment;
14
14
  export default _default;
@@ -1,7 +1,11 @@
1
- import { effect, reactive } from '@esportsplus/reactivity';
2
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { effect, reactive } from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
4
  import './scss/index.scss';
5
+ const template_ed8f776bb07a460eadcbcfe445975fdf17 = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<span class='counter-character counter-character--symbol'><!--$--></span>`);
6
+ const template_ed8f776bb07a460eadcbcfe445975fdf1a = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<span><!--$--></span>`);
7
+ const template_ed8f776bb07a460eadcbcfe445975fdf1d = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class=' counter-character'><div class='counter-character-track'><span>9</span><!--$--><span>0</span></div></div>`);
8
+ const template_ed8f776bb07a460eadcbcfe445975fdf1h = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class='counter'><!--$--></div>`);
5
9
  const OMIT = ['currency', 'decimals', 'delay', 'max', 'state', 'suffix', 'value'];
6
10
  let formatters = {};
7
11
  export default (attributes) => {
@@ -12,8 +16,9 @@ export default (attributes) => {
12
16
  currency: currency || 'USD'
13
17
  }), rendering = true, state = reactive({
14
18
  length: 0,
19
+ test: () => 'sds',
15
20
  render: []
16
- });
21
+ }), render = reactive([]);
17
22
  decimals ??= 2;
18
23
  effect(() => {
19
24
  if (api.value !== -1) {
@@ -40,41 +45,41 @@ export default (attributes) => {
40
45
  padding--;
41
46
  value = '0';
42
47
  }
43
- state.render[i] = value;
48
+ render[i] = value;
44
49
  }
45
50
  if (rendering === true) {
46
51
  rendering = false;
47
52
  setTimeout(() => api.value = value, delay || 1000);
48
53
  }
49
54
  });
50
- return html `
51
- <div class='counter' ${omit(attributes, OMIT)}>
52
- ${() => {
53
- let n = state.length;
54
- if (n === 0) {
55
- return '';
56
- }
57
- return html.reactive(state.render, function (value, i) {
58
- if (isNaN(parseInt(value, 10))) {
59
- return html `
60
- <span class='counter-character counter-character--symbol'>
61
- ${value}
62
- </span>
63
- `;
55
+ return (() => {
56
+ let root_ed8f776bb07a460eadcbcfe445975fdf1g = template_ed8f776bb07a460eadcbcfe445975fdf1h(), element_ed8f776bb07a460eadcbcfe445975fdf1i = root_ed8f776bb07a460eadcbcfe445975fdf1g.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf1j = element_ed8f776bb07a460eadcbcfe445975fdf1i.firstChild;
57
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf1i, omit(attributes, OMIT));
58
+ new template_ed8f776bb07a460eadcbcfe445975fdf1.EffectSlot(element_ed8f776bb07a460eadcbcfe445975fdf1j, () => {
59
+ let n = state.length;
60
+ if (n === 0) {
61
+ return '';
64
62
  }
65
- return html `
66
- <div class=' counter-character' ${{
67
- class: i > n - 3 && 'counter-character--fraction'
68
- }}>
69
- <div class='counter-character-track' style='${`--value: ${value}`}'>
70
- <span>9</span>
71
- ${[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => html `<span>${value}</span>`)}
72
- <span>0</span>
73
- </div>
74
- </div>
75
- `;
63
+ return new template_ed8f776bb07a460eadcbcfe445975fdf1.ArraySlot(render, function (value) {
64
+ if (isNaN(parseInt(value, 10))) {
65
+ return (() => {
66
+ let root_ed8f776bb07a460eadcbcfe445975fdf16 = template_ed8f776bb07a460eadcbcfe445975fdf17(), element_ed8f776bb07a460eadcbcfe445975fdf18 = root_ed8f776bb07a460eadcbcfe445975fdf16.firstChild.firstChild;
67
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf18, value);
68
+ return root_ed8f776bb07a460eadcbcfe445975fdf16;
69
+ })();
70
+ }
71
+ return (() => {
72
+ let root_ed8f776bb07a460eadcbcfe445975fdf1c = template_ed8f776bb07a460eadcbcfe445975fdf1d(), element_ed8f776bb07a460eadcbcfe445975fdf1e = root_ed8f776bb07a460eadcbcfe445975fdf1c.firstChild.firstElementChild, element_ed8f776bb07a460eadcbcfe445975fdf1f = element_ed8f776bb07a460eadcbcfe445975fdf1e.firstChild.nextSibling;
73
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setStyle(element_ed8f776bb07a460eadcbcfe445975fdf1e, ';', `--value: ${value}`);
74
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf1f, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => {
75
+ let root_ed8f776bb07a460eadcbcfe445975fdf19 = template_ed8f776bb07a460eadcbcfe445975fdf1a(), element_ed8f776bb07a460eadcbcfe445975fdf1b = root_ed8f776bb07a460eadcbcfe445975fdf19.firstChild.firstChild;
76
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf1b, value);
77
+ return root_ed8f776bb07a460eadcbcfe445975fdf19;
78
+ }));
79
+ return root_ed8f776bb07a460eadcbcfe445975fdf1c;
80
+ })();
81
+ });
76
82
  });
77
- }}
78
- </div>
79
- `;
83
+ return root_ed8f776bb07a460eadcbcfe445975fdf1g;
84
+ })();
80
85
  };
@@ -1,4 +1,4 @@
1
1
  import { Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
- declare const _default: (attributes?: Attributes) => Node;
3
+ declare const _default: (attributes?: Attributes) => DocumentFragment;
4
4
  export default _default;
@@ -1,9 +1,8 @@
1
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
- export default (attributes) => html `
4
- <div class='ellipsis' ${attributes}>
5
- <span></span>
6
- <span></span>
7
- <span></span>
8
- </div>
9
- `;
3
+ const template_ed8f776bb07a460eadcbcfe445975fdf1l = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class='ellipsis'><span></span><span></span><span></span></div>`);
4
+ export default (attributes) => {
5
+ let root_ed8f776bb07a460eadcbcfe445975fdf1k = template_ed8f776bb07a460eadcbcfe445975fdf1l(), element_ed8f776bb07a460eadcbcfe445975fdf1m = root_ed8f776bb07a460eadcbcfe445975fdf1k.firstChild;
6
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf1m, attributes);
7
+ return root_ed8f776bb07a460eadcbcfe445975fdf1k;
8
+ };
@@ -11,5 +11,5 @@ declare const _default: <T extends Record<string, any>>(attributes: {
11
11
  state?: {
12
12
  processing: boolean;
13
13
  };
14
- } & Attributes, content: Renderable<any>) => Node;
14
+ } & Attributes, content: Renderable<any>) => DocumentFragment;
15
15
  export default _default;
@@ -1,7 +1,9 @@
1
1
  import response from '@esportsplus/action';
2
- import { html } from '@esportsplus/template';
2
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
4
  import input from './input.js';
5
+ const template_ed8f776bb07a460eadcbcfe445975fdf1o = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<form
6
+ class='form'><!--$--></form>`);
5
7
  const OMIT = ['action', 'state'];
6
8
  function parse(input) {
7
9
  let data = {};
@@ -27,20 +29,18 @@ function parse(input) {
27
29
  ;
28
30
  export default (attributes, content) => {
29
31
  let { action, state } = attributes;
30
- return html `
31
- <form
32
- class='form'
33
- ${omit(attributes, OMIT)}
34
- ${{
35
- onclick: function (event) {
32
+ return (() => {
33
+ let root_ed8f776bb07a460eadcbcfe445975fdf1n = template_ed8f776bb07a460eadcbcfe445975fdf1o(), element_ed8f776bb07a460eadcbcfe445975fdf1p = root_ed8f776bb07a460eadcbcfe445975fdf1n.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf1q = element_ed8f776bb07a460eadcbcfe445975fdf1p.firstChild;
34
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf1p, omit(attributes, OMIT));
35
+ template_ed8f776bb07a460eadcbcfe445975fdf1.delegate(element_ed8f776bb07a460eadcbcfe445975fdf1p, 'click', function (event) {
36
36
  let trigger = event.target;
37
37
  if (trigger?.type !== 'submit') {
38
38
  return;
39
39
  }
40
40
  event.preventDefault();
41
41
  this.dispatchEvent(new SubmitEvent('submit', { cancelable: true, bubbles: true, submitter: trigger }));
42
- },
43
- onsubmit: async function (event) {
42
+ });
43
+ template_ed8f776bb07a460eadcbcfe445975fdf1.on(element_ed8f776bb07a460eadcbcfe445975fdf1p, 'submit', async function (event) {
44
44
  event.preventDefault();
45
45
  if (state) {
46
46
  state.processing = true;
@@ -59,10 +59,8 @@ export default (attributes, content) => {
59
59
  if (state) {
60
60
  state.processing = false;
61
61
  }
62
- }
63
- }}
64
- >
65
- ${content}
66
- </form>
67
- `;
62
+ });
63
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf1q, content);
64
+ return root_ed8f776bb07a460eadcbcfe445975fdf1n;
65
+ })();
68
66
  };
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  state?: {
13
13
  processing: boolean;
14
14
  };
15
- } & import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>) => Node;
15
+ } & import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>) => DocumentFragment;
16
16
  input: {
17
17
  get: (element?: import("@esportsplus/template").Element) => {
18
18
  error: string;
@@ -1,21 +1,21 @@
1
- import { Attributes } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  declare const _default: {
4
4
  (): ReturnType<(this: {
5
- attributes?: Attributes | undefined;
6
- content?: import("@esportsplus/template").Renderable<any>;
7
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
8
- <T extends Attributes>(attributes: T): ReturnType<(this: {
9
- attributes?: Attributes | undefined;
10
- content?: import("@esportsplus/template").Renderable<any>;
11
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
12
- <T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
13
- attributes?: Attributes | undefined;
14
- content?: import("@esportsplus/template").Renderable<any>;
15
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
16
- (attributes: Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
17
- attributes?: Attributes | undefined;
18
- content?: import("@esportsplus/template").Renderable<any>;
19
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
5
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
6
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
7
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
8
+ <T extends template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>(attributes: T): ReturnType<(this: {
9
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
10
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
11
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
12
+ <T extends template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>(content: T): ReturnType<(this: {
13
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
14
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
15
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
16
+ (attributes: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>): ReturnType<(this: {
17
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
18
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
19
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
20
20
  };
21
21
  export default _default;
@@ -1,8 +1,9 @@
1
- import { reactive } from '@esportsplus/reactivity';
2
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { reactive } from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
4
  import template from '../../components/template/index.js';
5
5
  import './scss/index.scss';
6
+ const template_ed8f776bb07a460eadcbcfe445975fdf1s = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class='highlight'><!--$--></div>`);
6
7
  const OMIT = ['background'];
7
8
  let key = Symbol(), observer = null;
8
9
  export default template.factory((attributes, content) => {
@@ -28,21 +29,18 @@ export default template.factory((attributes, content) => {
28
29
  let state = reactive({
29
30
  highlight: 0
30
31
  });
31
- return html `
32
- <div class='highlight'
33
- ${omit(attributes, OMIT)}
34
- ${{
35
- onrender: (element) => {
32
+ return (() => {
33
+ let root_ed8f776bb07a460eadcbcfe445975fdf1r = template_ed8f776bb07a460eadcbcfe445975fdf1s(), element_ed8f776bb07a460eadcbcfe445975fdf1t = root_ed8f776bb07a460eadcbcfe445975fdf1r.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf1u = element_ed8f776bb07a460eadcbcfe445975fdf1t.firstChild;
34
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf1t, omit(attributes, OMIT));
35
+ template_ed8f776bb07a460eadcbcfe445975fdf1.onrender(element_ed8f776bb07a460eadcbcfe445975fdf1t, (element) => {
36
36
  element[key] = state;
37
37
  observer.observe(element);
38
- },
39
- style: [
38
+ });
39
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setStyle(element_ed8f776bb07a460eadcbcfe445975fdf1t, '', [
40
40
  () => `--highlight: ${state.highlight}`,
41
41
  `--background: ${attributes.background}`,
42
- ]
43
- }}
44
- >
45
- ${content}
46
- </div>
47
- `;
42
+ ]);
43
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf1u, content);
44
+ return root_ed8f776bb07a460eadcbcfe445975fdf1r;
45
+ })();
48
46
  });
@@ -1,20 +1,21 @@
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
1
2
  import './scss/index.scss';
2
3
  declare const _default: {
3
4
  (): ReturnType<(this: {
4
- attributes?: import("@esportsplus/template").Attributes | undefined;
5
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
5
6
  content?: string | undefined;
6
- }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string) => import("@esportsplus/template").Renderable<any>>;
7
- <T extends import("@esportsplus/template").Attributes>(attributes: T): ReturnType<(this: {
8
- attributes?: import("@esportsplus/template").Attributes | undefined;
7
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: string) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
8
+ <T extends template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>(attributes: T): ReturnType<(this: {
9
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
9
10
  content?: string | undefined;
10
- }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string) => import("@esportsplus/template").Renderable<any>>;
11
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: string) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
11
12
  <T extends string>(content: T): ReturnType<(this: {
12
- attributes?: import("@esportsplus/template").Attributes | undefined;
13
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
13
14
  content?: string | undefined;
14
- }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string) => import("@esportsplus/template").Renderable<any>>;
15
- (attributes: import("@esportsplus/template").Attributes, content: string): ReturnType<(this: {
16
- attributes?: import("@esportsplus/template").Attributes | undefined;
15
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: string) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
16
+ (attributes: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes, content: string): ReturnType<(this: {
17
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
17
18
  content?: string | undefined;
18
- }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: string) => import("@esportsplus/template").Renderable<any>>;
19
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: string) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
19
20
  };
20
21
  export default _default;
@@ -1,10 +1,13 @@
1
- import { html, svg } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { svg } from '@esportsplus/template';
2
3
  import template from '../../components/template/index.js';
3
4
  import './scss/index.scss';
5
+ const template_ed8f776bb07a460eadcbcfe445975fdf1w = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class='icon'><!--$--></div>`);
4
6
  export default template.factory((attributes, icon) => {
5
- return html `
6
- <div class='icon' ${attributes}>
7
- ${svg.sprite(icon)}
8
- </div>
9
- `;
7
+ return (() => {
8
+ let root_ed8f776bb07a460eadcbcfe445975fdf1v = template_ed8f776bb07a460eadcbcfe445975fdf1w(), element_ed8f776bb07a460eadcbcfe445975fdf1x = root_ed8f776bb07a460eadcbcfe445975fdf1v.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf1y = element_ed8f776bb07a460eadcbcfe445975fdf1x.firstChild;
9
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf1x, attributes);
10
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf1y, svg.sprite(icon));
11
+ return root_ed8f776bb07a460eadcbcfe445975fdf1v;
12
+ })();
10
13
  });
@@ -1,4 +1,4 @@
1
- import { type Attributes } from '@esportsplus/template';
1
+ import { Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  export default function (this: {
4
4
  attributes?: Attributes;
@@ -7,4 +7,4 @@ export default function (this: {
7
7
  active: boolean;
8
8
  error: string;
9
9
  };
10
- }): Node;
10
+ }): DocumentFragment;
@@ -1,29 +1,29 @@
1
- import { reactive } from '@esportsplus/reactivity';
2
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { reactive } from '@esportsplus/template';
3
3
  import form from '../../components/form/index.js';
4
4
  import './scss/index.scss';
5
+ const template_ed8f776bb07a460eadcbcfe445975fdf20 = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<input
6
+ class='input'
7
+ />`);
5
8
  export default function (attributes) {
6
9
  let state = attributes.state || reactive({
7
10
  active: false,
8
11
  error: ''
9
12
  });
10
- return html `
11
- <input
12
- class='input'
13
- ${this?.attributes}
14
- ${attributes}
15
- ${{
16
- class: () => state.active && '--active',
17
- onfocusin: () => {
13
+ return (() => {
14
+ let root_ed8f776bb07a460eadcbcfe445975fdf1z = template_ed8f776bb07a460eadcbcfe445975fdf20(), element_ed8f776bb07a460eadcbcfe445975fdf21 = root_ed8f776bb07a460eadcbcfe445975fdf1z.firstChild;
15
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf21, this?.attributes);
16
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf21, attributes);
17
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setClass(element_ed8f776bb07a460eadcbcfe445975fdf21, '', () => state.active && '--active');
18
+ template_ed8f776bb07a460eadcbcfe445975fdf1.on(element_ed8f776bb07a460eadcbcfe445975fdf21, 'focusin', () => {
18
19
  state.active = true;
19
- },
20
- onfocusout: () => {
20
+ });
21
+ template_ed8f776bb07a460eadcbcfe445975fdf1.on(element_ed8f776bb07a460eadcbcfe445975fdf21, 'focusout', () => {
21
22
  state.active = false;
22
- },
23
- onrender: form.input.onrender(state),
24
- type: (attributes.type || 'text')
25
- }}
26
- />
27
- `;
23
+ });
24
+ template_ed8f776bb07a460eadcbcfe445975fdf1.onrender(element_ed8f776bb07a460eadcbcfe445975fdf21, form.input.onrender(state));
25
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperty(element_ed8f776bb07a460eadcbcfe445975fdf21, 'type', (attributes.type || 'text'));
26
+ return root_ed8f776bb07a460eadcbcfe445975fdf1z;
27
+ })();
28
28
  }
29
29
  ;
@@ -1,21 +1,21 @@
1
- import { Attributes } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  declare const _default: {
4
4
  (): ReturnType<(this: {
5
- attributes?: Attributes | undefined;
6
- content?: import("@esportsplus/template").Renderable<any>;
7
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
8
- <T extends Attributes>(attributes: T): ReturnType<(this: {
9
- attributes?: Attributes | undefined;
10
- content?: import("@esportsplus/template").Renderable<any>;
11
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
12
- <T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
13
- attributes?: Attributes | undefined;
14
- content?: import("@esportsplus/template").Renderable<any>;
15
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
16
- (attributes: Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
17
- attributes?: Attributes | undefined;
18
- content?: import("@esportsplus/template").Renderable<any>;
19
- }, attributes: Readonly<Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
5
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
6
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
7
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
8
+ <T extends template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>(attributes: T): ReturnType<(this: {
9
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
10
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
11
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
12
+ <T extends template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>(content: T): ReturnType<(this: {
13
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
14
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
15
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
16
+ (attributes: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>): ReturnType<(this: {
17
+ attributes?: template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes | undefined;
18
+ content?: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>;
19
+ }, attributes: Readonly<template_ed8f776bb07a460eadcbcfe445975fdf1.Attributes>, content: template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>) => template_ed8f776bb07a460eadcbcfe445975fdf1.Renderable<any>>;
20
20
  };
21
21
  export default _default;
@@ -1,8 +1,14 @@
1
- import { reactive } from '@esportsplus/reactivity';
2
- import { html } from '@esportsplus/template';
1
+ import * as template_ed8f776bb07a460eadcbcfe445975fdf1 from '@esportsplus/template';
2
+ import { reactive } from '@esportsplus/template';
3
3
  import { omit } from '@esportsplus/utilities';
4
4
  import template from '../../components/template/index.js';
5
5
  import './scss/index.scss';
6
+ const template_ed8f776bb07a460eadcbcfe445975fdf23 = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div class='loader-content'><div
7
+ class='loader-logo text --flex-center --text-uppercase --text-600'
8
+ style='color: var(--color-grey-500);'><!--$--></div></div>`);
9
+ const template_ed8f776bb07a460eadcbcfe445975fdf28 = template_ed8f776bb07a460eadcbcfe445975fdf1.template(`<div
10
+ class='loader '><div
11
+ class='loader '><!--$--></div></div>`);
6
12
  const OMIT = ['loader-content', 'loader-logo'];
7
13
  export default template.factory((attributes, content) => {
8
14
  let state = reactive({
@@ -15,50 +21,40 @@ export default template.factory((attributes, content) => {
15
21
  return;
16
22
  }
17
23
  let i = 0;
18
- return html `
19
- <div
20
- class='loader ${() => state.load && 'loader--load'}'
21
- onanimationend=${(e) => {
22
- i++;
23
- if (e.animationName === 'move' && i > 1) {
24
- state.remove = true;
25
- }
26
- }}
27
- ${omit(attributes, OMIT)}
28
- >
29
- <div
30
- class='loader ${() => state.load && 'loader--load'}'
31
- ${!content && {
32
- onconnect: () => {
33
- state.load = true;
34
- }
35
- }}
36
- ${attributes.loader}
37
- >
38
- ${content && html `
39
- <div class='loader-content' ${attributes['loader-content']}>
40
- <div
41
- class='loader-logo text --flex-center --text-uppercase --text-600'
42
- style='color: var(--color-grey-500);'
43
- ${attributes['loader-logo']}
44
- ${{
45
- class: () => state.scale && 'loader-logo--scale',
46
- onanimationend: ({ animationName: name }) => {
47
- if (name === 'scale') {
24
+ return (() => {
25
+ let root_ed8f776bb07a460eadcbcfe445975fdf27 = template_ed8f776bb07a460eadcbcfe445975fdf28(), element_ed8f776bb07a460eadcbcfe445975fdf29 = root_ed8f776bb07a460eadcbcfe445975fdf27.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf2a = element_ed8f776bb07a460eadcbcfe445975fdf29.firstElementChild, element_ed8f776bb07a460eadcbcfe445975fdf2b = element_ed8f776bb07a460eadcbcfe445975fdf2a.firstChild;
26
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setClass(element_ed8f776bb07a460eadcbcfe445975fdf29, ' ', () => state.load && 'loader--load');
27
+ template_ed8f776bb07a460eadcbcfe445975fdf1.delegate(element_ed8f776bb07a460eadcbcfe445975fdf29, 'animationend', (e) => {
28
+ i++;
29
+ if (e.animationName === 'move' && i > 1) {
30
+ state.remove = true;
31
+ }
32
+ });
33
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf29, omit(attributes, OMIT));
34
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setClass(element_ed8f776bb07a460eadcbcfe445975fdf2a, ' ', () => state.load && 'loader--load');
35
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf2a, !content && {
36
+ onconnect: () => {
48
37
  state.load = true;
49
38
  }
50
- },
51
- onconnect: () => {
52
- state.scale = true;
53
- }
54
- }}
55
- >
56
- ${content}
57
- </div>
58
- </div>
59
- `}
60
- </div>
61
- </div>
62
- `;
39
+ });
40
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf2a, attributes.loader);
41
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf2b, content && (() => {
42
+ let root_ed8f776bb07a460eadcbcfe445975fdf22 = template_ed8f776bb07a460eadcbcfe445975fdf23(), element_ed8f776bb07a460eadcbcfe445975fdf24 = root_ed8f776bb07a460eadcbcfe445975fdf22.firstChild, element_ed8f776bb07a460eadcbcfe445975fdf25 = element_ed8f776bb07a460eadcbcfe445975fdf24.firstElementChild, element_ed8f776bb07a460eadcbcfe445975fdf26 = element_ed8f776bb07a460eadcbcfe445975fdf25.firstChild;
43
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf24, attributes['loader-content']);
44
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setProperties(element_ed8f776bb07a460eadcbcfe445975fdf25, attributes['loader-logo']);
45
+ template_ed8f776bb07a460eadcbcfe445975fdf1.setClass(element_ed8f776bb07a460eadcbcfe445975fdf25, '', () => state.scale && 'loader-logo--scale');
46
+ template_ed8f776bb07a460eadcbcfe445975fdf1.delegate(element_ed8f776bb07a460eadcbcfe445975fdf25, 'animationend', ({ animationName: name }) => {
47
+ if (name === 'scale') {
48
+ state.load = true;
49
+ }
50
+ });
51
+ template_ed8f776bb07a460eadcbcfe445975fdf1.onconnect(element_ed8f776bb07a460eadcbcfe445975fdf25, () => {
52
+ state.scale = true;
53
+ });
54
+ template_ed8f776bb07a460eadcbcfe445975fdf1.slot(element_ed8f776bb07a460eadcbcfe445975fdf26, content);
55
+ return root_ed8f776bb07a460eadcbcfe445975fdf22;
56
+ })());
57
+ return root_ed8f776bb07a460eadcbcfe445975fdf27;
58
+ })();
63
59
  };
64
60
  });
@@ -1,4 +1,4 @@
1
1
  import { Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
- declare const _default: (attributes?: Attributes) => Node;
3
+ declare const _default: (attributes?: Attributes) => DocumentFragment;
4
4
  export default _default;