@esportsplus/ui 0.19.1 → 0.19.3

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 (31) hide show
  1. package/build/components/accordion/index.d.ts +12 -3
  2. package/build/components/field/checkbox.d.ts +46 -15
  3. package/build/components/field/checkbox.js +20 -13
  4. package/build/components/field/description.d.ts +12 -3
  5. package/build/components/field/index.d.ts +10283 -1736
  6. package/build/components/field/input.d.ts +81 -18
  7. package/build/components/field/input.js +15 -28
  8. package/build/components/field/select.d.ts +917 -113
  9. package/build/components/field/select.js +3 -11
  10. package/build/components/field/title.d.ts +809 -110
  11. package/build/components/form/action.d.ts +12 -3
  12. package/build/components/form/index.d.ts +869 -110
  13. package/build/components/frame/index.d.ts +12 -3
  14. package/build/components/highlight/index.d.ts +12 -3
  15. package/build/components/icon/index.d.ts +12 -3
  16. package/build/components/loader/index.d.ts +12 -3
  17. package/build/components/overlay/index.d.ts +12 -3
  18. package/build/components/scrollbar/index.d.ts +12 -3
  19. package/build/components/sidebar/index.d.ts +12 -3
  20. package/build/components/site/index.d.ts +12 -3
  21. package/build/components/template/index.d.ts +5 -5
  22. package/build/components/tooltip/index.d.ts +1708 -223
  23. package/build/components/tooltip/menu.d.ts +12 -3
  24. package/build/components/tooltip/onclick.d.ts +827 -110
  25. package/build/components/tooltip/onhover.d.ts +12 -3
  26. package/build/components/typewriter/index.d.ts +12 -3
  27. package/package.json +3 -3
  28. package/src/components/field/checkbox.ts +23 -20
  29. package/src/components/field/input.ts +23 -31
  30. package/src/components/field/select.ts +4 -15
  31. package/src/components/template/index.ts +6 -6
@@ -1,8 +1,17 @@
1
1
  import { Attributes } from '@esportsplus/template';
2
2
  import './scss/index.scss';
3
3
  declare const _default: {
4
- (): import("@esportsplus/template").Renderable<unknown>;
5
- (content: import("@esportsplus/template").Renderable<unknown>): import("@esportsplus/template").Renderable<unknown>;
6
- (attributes: Attributes, content: import("@esportsplus/template").Renderable<unknown>): import("@esportsplus/template").Renderable<unknown>;
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
+ (content: import("@esportsplus/template").Renderable<any>): 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
+ (attributes: Attributes, content: import("@esportsplus/template").Renderable<any>): 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>>;
7
16
  };
8
17
  export default _default;
@@ -1,27 +1,58 @@
1
1
  import { type Attributes, type Renderable } from '@esportsplus/template';
2
2
  type A = Attributes & {
3
- checked?: boolean;
4
- disabled?: boolean;
5
- name?: string;
6
- required?: boolean;
7
- type?: string;
8
- value?: unknown;
3
+ 'field-mask-tag'?: Attributes;
9
4
  };
10
5
  declare const _default: {
11
6
  checkbox: {
12
- (): Renderable<unknown>;
13
- (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
14
- (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
7
+ (): ReturnType<(this: {
8
+ mask: (attributes: A, state: {
9
+ active: boolean;
10
+ }) => Renderable<unknown>;
11
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
12
+ (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
13
+ mask: (attributes: A, state: {
14
+ active: boolean;
15
+ }) => Renderable<unknown>;
16
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
17
+ (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
18
+ mask: (attributes: A, state: {
19
+ active: boolean;
20
+ }) => Renderable<unknown>;
21
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
15
22
  };
16
23
  radio: {
17
- (): Renderable<unknown>;
18
- (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
19
- (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
24
+ (): ReturnType<(this: {
25
+ mask: (attributes: A, state: {
26
+ active: boolean;
27
+ }) => Renderable<unknown>;
28
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
29
+ (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
30
+ mask: (attributes: A, state: {
31
+ active: boolean;
32
+ }) => Renderable<unknown>;
33
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
34
+ (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
35
+ mask: (attributes: A, state: {
36
+ active: boolean;
37
+ }) => Renderable<unknown>;
38
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
20
39
  };
21
40
  switch: {
22
- (): Renderable<unknown>;
23
- (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
24
- (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): Renderable<unknown>;
41
+ (): ReturnType<(this: {
42
+ mask: (attributes: A, state: {
43
+ active: boolean;
44
+ }) => Renderable<unknown>;
45
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
46
+ (content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
47
+ mask: (attributes: A, state: {
48
+ active: boolean;
49
+ }) => Renderable<unknown>;
50
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
51
+ (attributes: Attributes, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>): ReturnType<(this: {
52
+ mask: (attributes: A, state: {
53
+ active: boolean;
54
+ }) => Renderable<unknown>;
55
+ }, attributes: Readonly<Attributes>, content: (mask: ((attributes: A) => Renderable<unknown>)) => Renderable<unknown>) => Renderable<any>>;
25
56
  };
26
57
  };
27
58
  export default _default;
@@ -1,14 +1,15 @@
1
1
  import { reactive } from '@esportsplus/reactivity';
2
2
  import { html } from '@esportsplus/template';
3
- import { omit, pick } from '@esportsplus/utilities';
3
+ import { omit } from '@esportsplus/utilities';
4
4
  import template from '../../components/template/index.js';
5
5
  const OMIT_FIELD = ['state'];
6
- const TAG = ['checked', 'disabled', 'name', 'required'];
6
+ const OMIT_TAG = ['field-mask-tag'];
7
7
  function mask(attributes, modifier, state) {
8
+ let a = attributes['field-mask-tag'] || {};
8
9
  return html `
9
10
  <div
10
11
  class='field-mask'
11
- ${omit(attributes, TAG)}
12
+ ${omit(attributes, OMIT_TAG)}
12
13
  ${{
13
14
  class: `field-mask--${modifier}`
14
15
  }}
@@ -16,11 +17,11 @@ function mask(attributes, modifier, state) {
16
17
  <input
17
18
  class='field-mask-tag field-mask-tag--hidden'
18
19
  ${{
19
- checked: attributes.checked || attributes.value || state.active,
20
+ checked: a.checked || a.value || state.active,
20
21
  type: modifier === 'radio' ? 'radio' : 'checkbox',
21
- value: attributes.value || 1
22
+ value: a.value || 1
22
23
  }}
23
- ${pick(attributes, TAG)}
24
+ ${a}
24
25
  >
25
26
  </div>
26
27
  `;
@@ -43,18 +44,24 @@ const field = template.factory(function (attributes, content) {
43
44
  }
44
45
  }}
45
46
  >
46
- ${content((attributes) => this(attributes, state))}
47
+ ${content((attributes) => this.mask(attributes, state))}
47
48
  </label>
48
49
  `;
49
50
  });
50
51
  export default {
51
- checkbox: field.bind((attributes, state) => {
52
- return mask(attributes, 'checkbox', state);
52
+ checkbox: field.bind({
53
+ mask: (attributes, state) => {
54
+ return mask(attributes, 'checkbox', state);
55
+ }
53
56
  }),
54
- radio: field.bind((attributes, state) => {
55
- return mask(attributes, 'radio', state);
57
+ radio: field.bind({
58
+ mask: (attributes, state) => {
59
+ return mask(attributes, 'radio', state);
60
+ }
56
61
  }),
57
- switch: field.bind((attributes, state) => {
58
- return mask(attributes, 'switch', state);
62
+ switch: field.bind({
63
+ mask: (attributes, state) => {
64
+ return mask(attributes, 'switch', state);
65
+ }
59
66
  }),
60
67
  };
@@ -1,6 +1,15 @@
1
1
  declare const _default: {
2
- (): import("@esportsplus/template").Renderable<unknown>;
3
- (content: import("@esportsplus/template").Renderable<unknown>): import("@esportsplus/template").Renderable<unknown>;
4
- (attributes: import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<unknown>): import("@esportsplus/template").Renderable<unknown>;
2
+ (): ReturnType<(this: {
3
+ attributes?: import("@esportsplus/template").Attributes | undefined;
4
+ content?: import("@esportsplus/template").Renderable<any>;
5
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
6
+ (content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
7
+ attributes?: import("@esportsplus/template").Attributes | undefined;
8
+ content?: import("@esportsplus/template").Renderable<any>;
9
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
10
+ (attributes: import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
11
+ attributes?: import("@esportsplus/template").Attributes | undefined;
12
+ content?: import("@esportsplus/template").Renderable<any>;
13
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
5
14
  };
6
15
  export default _default;