@esportsplus/ui 0.46.0 → 0.47.2
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.
- package/.github/workflows/bump.yml +2 -2
- package/.github/workflows/dependabot.yml +1 -1
- package/.github/workflows/publish.yml +3 -3
- package/README.md +288 -0
- package/build/components/accordion/index.d.ts +16 -16
- package/build/components/accordion/index.js +28 -20
- package/build/components/alert/index.d.ts +1 -1
- package/build/components/alert/index.js +82 -57
- package/build/components/back/index.d.ts +8 -7
- package/build/components/back/index.js +11 -11
- package/build/components/button/index.d.ts +21 -20
- package/build/components/button/index.js +52 -27
- package/build/components/checkbox/index.d.ts +3 -3
- package/build/components/checkbox/index.js +39 -25
- package/build/components/clipboard/index.d.ts +90 -70
- package/build/components/clipboard/onclick.d.ts +1 -1
- package/build/components/clipboard/onclick.js +31 -21
- package/build/components/counter/index.d.ts +2 -2
- package/build/components/counter/index.js +72 -36
- package/build/components/ellipsis/index.d.ts +1 -1
- package/build/components/ellipsis/index.js +7 -8
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +13 -15
- package/build/components/form/index.d.ts +1 -1
- package/build/components/highlight/index.d.ts +16 -16
- package/build/components/highlight/index.js +26 -18
- package/build/components/icon/index.d.ts +11 -10
- package/build/components/icon/index.js +9 -6
- package/build/components/input/index.d.ts +2 -2
- package/build/components/input/index.js +38 -22
- package/build/components/loader/index.d.ts +16 -16
- package/build/components/loader/index.js +68 -50
- package/build/components/loading/index.d.ts +1 -1
- package/build/components/loading/index.js +9 -9
- package/build/components/radio/index.d.ts +1 -1
- package/build/components/range/index.d.ts +2 -2
- package/build/components/range/index.js +50 -27
- package/build/components/scrollbar/index.d.ts +12 -11
- package/build/components/scrollbar/index.js +42 -37
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +121 -86
- package/build/components/switch/index.d.ts +1 -1
- package/build/components/textarea/index.d.ts +2 -2
- package/build/components/textarea/index.js +37 -22
- package/build/components/tooltip/index.d.ts +180 -140
- package/build/components/tooltip/menu.d.ts +12 -11
- package/build/components/tooltip/menu.js +33 -33
- package/build/components/tooltip/onclick.d.ts +1121 -1100
- package/build/components/tooltip/onclick.js +26 -16
- package/build/components/tooltip/onhover.d.ts +16 -16
- package/build/components/tooltip/onhover.js +28 -18
- package/build/components/typewriter/index.d.ts +11 -10
- package/build/components/typewriter/index.js +25 -12
- package/build/themes/dark/alert.d.ts +1 -1
- package/build/themes/dark/input.d.ts +10 -8
- package/build/themes/dark/select.d.ts +90 -70
- package/build/themes/dark/textarea.d.ts +10 -8
- package/package.json +18 -14
- package/src/components/button/index.ts +21 -13
- package/src/components/counter/index.ts +6 -6
- package/src/components/select/index.ts +13 -1
- package/tsconfig.json +6 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
declare const _default: (attributes: {
|
|
2
2
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
3
3
|
[key: `data-${string}`]: string | undefined;
|
|
4
|
-
class?: import("
|
|
4
|
+
class?: import("node_modules/@esportsplus/template/build/types").Attribute | import("node_modules/@esportsplus/template/build/types").Attribute[];
|
|
5
5
|
onconnect?: ((element: import("@esportsplus/template").Element) => void) | undefined;
|
|
6
6
|
ondisconnect?: ((element: import("@esportsplus/template").Element) => void) | undefined;
|
|
7
7
|
onrender?: ((element: import("@esportsplus/template").Element) => void) | undefined;
|
|
8
8
|
ontick?: ((dispose: VoidFunction, element: import("@esportsplus/template").Element) => void) | undefined;
|
|
9
|
-
style?: import("
|
|
9
|
+
style?: import("node_modules/@esportsplus/template/build/types").Attribute | import("node_modules/@esportsplus/template/build/types").Attribute[];
|
|
10
10
|
} & {
|
|
11
11
|
onabort?: ((this: import("@esportsplus/template").Element, event: UIEvent) => void) | undefined;
|
|
12
12
|
onanimationcancel?: ((this: import("@esportsplus/template").Element, event: AnimationEvent) => void) | undefined;
|
|
13
13
|
onanimationend?: ((this: import("@esportsplus/template").Element, event: AnimationEvent) => void) | undefined;
|
|
14
14
|
onanimationiteration?: ((this: import("@esportsplus/template").Element, event: AnimationEvent) => void) | undefined;
|
|
15
15
|
onanimationstart?: ((this: import("@esportsplus/template").Element, event: AnimationEvent) => void) | undefined;
|
|
16
|
-
onauxclick?: ((this: import("@esportsplus/template").Element, event:
|
|
16
|
+
onauxclick?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
17
17
|
onbeforeinput?: ((this: import("@esportsplus/template").Element, event: InputEvent) => void) | undefined;
|
|
18
|
-
|
|
18
|
+
onbeforematch?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
19
|
+
onbeforetoggle?: ((this: import("@esportsplus/template").Element, event: ToggleEvent) => void) | undefined;
|
|
19
20
|
onblur?: ((this: import("@esportsplus/template").Element, event: FocusEvent) => void) | undefined;
|
|
20
21
|
oncancel?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
21
22
|
oncanplay?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
22
23
|
oncanplaythrough?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
23
24
|
onchange?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
24
|
-
onclick?: ((this: import("@esportsplus/template").Element, event:
|
|
25
|
+
onclick?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
25
26
|
onclose?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
26
27
|
oncompositionend?: ((this: import("@esportsplus/template").Element, event: CompositionEvent) => void) | undefined;
|
|
27
28
|
oncompositionstart?: ((this: import("@esportsplus/template").Element, event: CompositionEvent) => void) | undefined;
|
|
28
29
|
oncompositionupdate?: ((this: import("@esportsplus/template").Element, event: CompositionEvent) => void) | undefined;
|
|
29
30
|
oncontextlost?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
30
|
-
oncontextmenu?: ((this: import("@esportsplus/template").Element, event:
|
|
31
|
+
oncontextmenu?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
31
32
|
oncontextrestored?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
32
33
|
oncopy?: ((this: import("@esportsplus/template").Element, event: ClipboardEvent) => void) | undefined;
|
|
33
34
|
oncuechange?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
@@ -77,6 +78,7 @@ declare const _default: (attributes: {
|
|
|
77
78
|
onpointermove?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
78
79
|
onpointerout?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
79
80
|
onpointerover?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
81
|
+
onpointerrawupdate?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
80
82
|
onpointerup?: ((this: import("@esportsplus/template").Element, event: PointerEvent) => void) | undefined;
|
|
81
83
|
onprogress?: ((this: import("@esportsplus/template").Element, event: ProgressEvent<EventTarget>) => void) | undefined;
|
|
82
84
|
onratechange?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
@@ -95,7 +97,7 @@ declare const _default: (attributes: {
|
|
|
95
97
|
onsubmit?: ((this: import("@esportsplus/template").Element, event: SubmitEvent) => void) | undefined;
|
|
96
98
|
onsuspend?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
97
99
|
ontimeupdate?: ((this: import("@esportsplus/template").Element, event: Event) => void) | undefined;
|
|
98
|
-
ontoggle?: ((this: import("@esportsplus/template").Element, event:
|
|
100
|
+
ontoggle?: ((this: import("@esportsplus/template").Element, event: ToggleEvent) => void) | undefined;
|
|
99
101
|
ontouchcancel?: ((this: import("@esportsplus/template").Element, event: TouchEvent) => void) | undefined;
|
|
100
102
|
ontouchend?: ((this: import("@esportsplus/template").Element, event: TouchEvent) => void) | undefined;
|
|
101
103
|
ontouchmove?: ((this: import("@esportsplus/template").Element, event: TouchEvent) => void) | undefined;
|
|
@@ -116,5 +118,5 @@ declare const _default: (attributes: {
|
|
|
116
118
|
active: boolean;
|
|
117
119
|
error: string;
|
|
118
120
|
};
|
|
119
|
-
}) =>
|
|
121
|
+
}) => DocumentFragment;
|
|
120
122
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "ICJR",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@esportsplus/action": "^0.
|
|
5
|
-
"@esportsplus/queue": "^0.
|
|
6
|
-
"@esportsplus/reactivity": "^0.
|
|
7
|
-
"@esportsplus/template": "^0.
|
|
8
|
-
"@esportsplus/utilities": "^0.
|
|
9
|
-
"@esportsplus/vite": "^0.
|
|
4
|
+
"@esportsplus/action": "^0.1.3",
|
|
5
|
+
"@esportsplus/queue": "^0.2.0",
|
|
6
|
+
"@esportsplus/reactivity": "^0.29.12",
|
|
7
|
+
"@esportsplus/template": "^0.40.4",
|
|
8
|
+
"@esportsplus/utilities": "^0.27.2",
|
|
9
|
+
"@esportsplus/vite": "^0.12.3",
|
|
10
10
|
"modern-normalize": "^3.0.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@esportsplus/typescript": "^0.
|
|
14
|
-
"@types/node": "^
|
|
15
|
-
"@types/shelljs": "^0.
|
|
16
|
-
"autoprefixer": "^10.4.
|
|
13
|
+
"@esportsplus/typescript": "^0.27.3",
|
|
14
|
+
"@types/node": "^25.0.3",
|
|
15
|
+
"@types/shelljs": "^0.10.0",
|
|
16
|
+
"autoprefixer": "^10.4.23",
|
|
17
17
|
"glob": "^13.0.0",
|
|
18
18
|
"lightningcss": "^1.30.2",
|
|
19
19
|
"npm-run-all": "^4.1.5",
|
|
20
|
-
"sass": "^1.
|
|
20
|
+
"sass": "^1.97.2",
|
|
21
21
|
"shelljs": "^0.10.0",
|
|
22
|
-
"vite": "^7.
|
|
22
|
+
"vite": "^7.3.1"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./css-utilities.scss": "./build/css-utilities/index.scss",
|
|
@@ -53,12 +53,16 @@
|
|
|
53
53
|
},
|
|
54
54
|
"name": "@esportsplus/ui",
|
|
55
55
|
"private": false,
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "https://github.com/esportsplus/ui"
|
|
59
|
+
},
|
|
56
60
|
"sideEffects": false,
|
|
57
61
|
"type": "module",
|
|
58
|
-
"version": "0.
|
|
62
|
+
"version": "0.47.2",
|
|
59
63
|
"scripts": {
|
|
60
64
|
"build": "run-s build:vite build:ts",
|
|
61
|
-
"build:ts": "tsc
|
|
65
|
+
"build:ts": "tsc",
|
|
62
66
|
"build:vite": "vite build",
|
|
63
67
|
"-": "-"
|
|
64
68
|
}
|
|
@@ -11,10 +11,6 @@ const hold = template.factory(
|
|
|
11
11
|
state.holding = false;
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
start = (e: MouseEvent) => {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
state.holding = true;
|
|
17
|
-
},
|
|
18
14
|
state = reactive({
|
|
19
15
|
complete: false,
|
|
20
16
|
holding: false
|
|
@@ -23,17 +19,29 @@ const hold = template.factory(
|
|
|
23
19
|
return html`
|
|
24
20
|
<div
|
|
25
21
|
class='button ${() => state.holding && 'button--holding'} ${() => state.complete && '--active'}'
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
onmousedown='${(e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
state.holding = true;
|
|
25
|
+
}}'
|
|
26
|
+
${attributes}
|
|
27
|
+
${{
|
|
28
|
+
onanimationend: (e: AnimationEvent) => {
|
|
29
|
+
if (e.animationName === 'buttonHolding') {
|
|
30
|
+
state.complete = true;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
onclick: () => {},
|
|
34
|
+
onmousedown: (e) => {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
state.holding = true;
|
|
37
|
+
},
|
|
38
|
+
onmouseup: end,
|
|
39
|
+
ontouchend: end,
|
|
40
|
+
ontouchstart: (e) => {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
state.holding = true;
|
|
29
43
|
}
|
|
30
44
|
}}
|
|
31
|
-
onclick=${() => {}}
|
|
32
|
-
onmousedown=${start}
|
|
33
|
-
onmouseup=${end}
|
|
34
|
-
ontouchstart=${start}
|
|
35
|
-
ontouchend=${end}
|
|
36
|
-
${attributes}
|
|
37
45
|
>
|
|
38
46
|
${() => content(state)}
|
|
39
47
|
</div>
|
|
@@ -30,8 +30,10 @@ export default (attributes: Attributes & {
|
|
|
30
30
|
rendering = true,
|
|
31
31
|
state = reactive({
|
|
32
32
|
length: 0,
|
|
33
|
+
test: () => 'sds',
|
|
33
34
|
render: [] as string[]
|
|
34
|
-
})
|
|
35
|
+
}),
|
|
36
|
+
render = reactive([] as string[]);
|
|
35
37
|
|
|
36
38
|
decimals ??= 2;
|
|
37
39
|
|
|
@@ -69,7 +71,7 @@ export default (attributes: Attributes & {
|
|
|
69
71
|
value = '0';
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
render[i] = value;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
if (rendering === true) {
|
|
@@ -87,7 +89,7 @@ export default (attributes: Attributes & {
|
|
|
87
89
|
return '';
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
return html.reactive(
|
|
92
|
+
return html.reactive(render, function (value) {
|
|
91
93
|
if (isNaN(parseInt(value, 10))) {
|
|
92
94
|
return html`
|
|
93
95
|
<span class='counter-character counter-character--symbol'>
|
|
@@ -97,9 +99,7 @@ export default (attributes: Attributes & {
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
return html`
|
|
100
|
-
<div class=' counter-character'
|
|
101
|
-
class: i > n - 3 && 'counter-character--fraction'
|
|
102
|
-
}}>
|
|
102
|
+
<div class=' counter-character'>
|
|
103
103
|
<div class='counter-character-track' style='${`--value: ${value}`}'>
|
|
104
104
|
<span>9</span>
|
|
105
105
|
${[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => html`<span>${value}</span>`)}
|
|
@@ -96,7 +96,19 @@ const select = template.factory<A, (state: { active: boolean, selected?: string
|
|
|
96
96
|
state.render = true;
|
|
97
97
|
}}
|
|
98
98
|
>
|
|
99
|
-
${content ? (() => content(state)) : (() =>
|
|
99
|
+
${content ? (() => content(state)) : (() => {
|
|
100
|
+
let selected = options[state.selected!];
|
|
101
|
+
|
|
102
|
+
if (!selected) {
|
|
103
|
+
return '-';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (selected !== null && typeof selected === 'object' && 'content' in selected) {
|
|
107
|
+
return selected.content;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return selected;
|
|
111
|
+
})}
|
|
100
112
|
|
|
101
113
|
<div class='select-arrow' ${this?.attributes?.arrow} ${attributes.arrow}></div>
|
|
102
114
|
|