tosijs-ui 1.0.4 → 1.0.7
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/README.md +19 -4
- package/dist/ab-test.d.ts +1 -1
- package/dist/code-editor.d.ts +3 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/editable-rect.d.ts +1 -1
- package/dist/filter-builder.d.ts +15 -4
- package/dist/icons.d.ts +2 -2
- package/dist/iife.js +45 -42
- package/dist/iife.js.map +21 -21
- package/dist/index.js +6 -7
- package/dist/index.js.map +19 -19
- package/dist/live-example.d.ts +0 -1
- package/dist/localize.d.ts +28 -8
- package/dist/menu.d.ts +1 -1
- package/dist/month.d.ts +1 -1
- package/dist/password-strength.d.ts +1 -1
- package/dist/segmented.d.ts +8 -0
- package/dist/side-nav.d.ts +4 -3
- package/dist/version.d.ts +1 -1
- package/package.json +11 -9
package/README.md
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
<!--{ "pin": "top" }-->
|
|
7
7
|
|
|
8
|
-
[ui.
|
|
8
|
+
[ui.tosijs.net live demo](https://ui.tosijs.net) | [tosijs](https://tosijs.net) | [discord](https://discord.gg/ramJ9rgky5) | [github](https://github.com/tonioloewald/tosijs-ui#readme) | [npm](https://www.npmjs.com/package/tosijs-ui)
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/tosijs-ui)
|
|
11
|
+
[](https://bundlejs.com/?q=tosijs-ui&badge=)
|
|
12
|
+
[](https://www.jsdelivr.com/package/npm/tosijs-ui)
|
|
9
13
|
|
|
10
14
|
<center>
|
|
11
|
-
<xin-
|
|
15
|
+
<xin-lottie
|
|
16
|
+
style="width: 280px; height: 280px; background: #da1167; border-radius: 40px;"
|
|
17
|
+
src="/tosi-ui.json"
|
|
18
|
+
></xin-lottie>
|
|
12
19
|
</center>
|
|
13
20
|
|
|
14
21
|
Copyright ©2023-2025 Tonio Loewald
|
|
@@ -27,7 +34,7 @@ It works beautifully with other web-component libraries, such as [shoelace.style
|
|
|
27
34
|
|
|
28
35
|
Add xinjs-ui to your project, e.g.
|
|
29
36
|
|
|
30
|
-
```
|
|
37
|
+
```bash
|
|
31
38
|
npm add xinjs-ui
|
|
32
39
|
```
|
|
33
40
|
|
|
@@ -35,7 +42,7 @@ Then you can import the component `elementCreator` and create the element any wa
|
|
|
35
42
|
like, the easiest way being to use the `elementCreator` itself. A `tosijs` `elementCreator`
|
|
36
43
|
is syntax sugar around `document.createElement()`.
|
|
37
44
|
|
|
38
|
-
```
|
|
45
|
+
```ts
|
|
39
46
|
import { dataTable } from 'xinjs-ui'
|
|
40
47
|
|
|
41
48
|
document.body.append(dataTable())
|
|
@@ -166,3 +173,11 @@ for an `<input>` or `<textarea>` (while mitigating the historical pathologies of
|
|
|
166
173
|
`<select>` and `<input type="radio">`). E.g. the `<xin-select>` does not suffer from a
|
|
167
174
|
race-condition between having its value set and being given an `<option>` with the intended value
|
|
168
175
|
and you can differentiate between the user picking a value (`action`) and the value changing (`change`).
|
|
176
|
+
|
|
177
|
+
## Credits
|
|
178
|
+
|
|
179
|
+
`tosijs-ui` is being developed using [bun](https://bun.sh/).
|
|
180
|
+
`bun` is crazy fast (based on Webkit's JS engine, vs. V8), does a lot of stuff
|
|
181
|
+
natively, and runs TypeScript (with import and require) directly.
|
|
182
|
+
|
|
183
|
+
Logo animations by [@anicoremotion](https://pro.fiverr.com/freelancers/anicoremotion).
|
package/dist/ab-test.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export declare class AbTest extends Component {
|
|
|
11
11
|
disconnectedCallback(): void;
|
|
12
12
|
render(): void;
|
|
13
13
|
}
|
|
14
|
-
export declare const abTest: import("tosijs").ElementCreator<
|
|
14
|
+
export declare const abTest: import("tosijs").ElementCreator<AbTest>;
|
package/dist/code-editor.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ export declare class CodeEditor extends WebComponent {
|
|
|
6
6
|
mode: string;
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
role: string;
|
|
9
|
-
|
|
9
|
+
private _ace;
|
|
10
10
|
private _editor;
|
|
11
11
|
private _editorPromise;
|
|
12
12
|
options: any;
|
|
13
13
|
theme: string;
|
|
14
|
+
get ace(): any;
|
|
15
|
+
get editor(): any;
|
|
14
16
|
static styleSpec: {
|
|
15
17
|
':host': {
|
|
16
18
|
display: string;
|
package/dist/dialog.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export declare class TosiDialog extends Component<DialogParts> {
|
|
|
18
18
|
ok: () => void;
|
|
19
19
|
content: () => HTMLDialogElement;
|
|
20
20
|
}
|
|
21
|
-
export declare const tosiDialog: import("tosijs").ElementCreator<
|
|
21
|
+
export declare const tosiDialog: import("tosijs").ElementCreator<TosiDialog>;
|
|
22
22
|
export {};
|
package/dist/editable-rect.d.ts
CHANGED
|
@@ -93,5 +93,5 @@ export declare class EditableRect extends Component {
|
|
|
93
93
|
connectedCallback(): void;
|
|
94
94
|
render(): void;
|
|
95
95
|
}
|
|
96
|
-
export declare const editableRect: import("tosijs").ElementCreator<
|
|
96
|
+
export declare const editableRect: import("tosijs").ElementCreator<EditableRect>;
|
|
97
97
|
export {};
|
package/dist/filter-builder.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Component as WebComponent, ElementCreator } from 'tosijs';
|
|
1
|
+
import { Component as WebComponent, ElementCreator, PartsMap } from 'tosijs';
|
|
2
|
+
import { XinSelect } from './select';
|
|
2
3
|
type ObjectTest = (obj: any) => boolean;
|
|
3
4
|
type ArrayFilter = (array: any[]) => any[];
|
|
4
5
|
interface FilterMaker {
|
|
@@ -23,7 +24,13 @@ export interface FilterPartState {
|
|
|
23
24
|
condition: string;
|
|
24
25
|
needle: string;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
interface FilterPartParts extends PartsMap {
|
|
28
|
+
haystack: XinSelect;
|
|
29
|
+
condition: XinSelect;
|
|
30
|
+
needle: HTMLInputElement;
|
|
31
|
+
remove: HTMLButtonElement;
|
|
32
|
+
}
|
|
33
|
+
export declare class FilterPart extends WebComponent<FilterPartParts> {
|
|
27
34
|
fields: Fields;
|
|
28
35
|
filters: {
|
|
29
36
|
[key: string]: FilterMaker;
|
|
@@ -31,7 +38,7 @@ export declare class FilterPart extends WebComponent {
|
|
|
31
38
|
haystack: string;
|
|
32
39
|
condition: string;
|
|
33
40
|
needle: string;
|
|
34
|
-
content: () =>
|
|
41
|
+
content: () => HTMLSpanElement[];
|
|
35
42
|
filter: Filter;
|
|
36
43
|
constructor();
|
|
37
44
|
get state(): FilterPartState;
|
|
@@ -42,7 +49,11 @@ export declare class FilterPart extends WebComponent {
|
|
|
42
49
|
}
|
|
43
50
|
export declare const filterPart: ElementCreator<FilterPart>;
|
|
44
51
|
export type FilterState = FilterPartState[];
|
|
45
|
-
export
|
|
52
|
+
export interface FilterBuilderParts extends PartsMap {
|
|
53
|
+
add: HTMLButtonElement;
|
|
54
|
+
resent: HTMLButtonElement;
|
|
55
|
+
}
|
|
56
|
+
export declare class FilterBuilder extends WebComponent<FilterBuilderParts> {
|
|
46
57
|
private _fields;
|
|
47
58
|
get fields(): Fields;
|
|
48
59
|
set fields(_fields: Fields);
|
package/dist/icons.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { SVGIconMap } from './icon-types';
|
|
|
3
3
|
export declare const defineIcons: (newIcons: {
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
}) => void;
|
|
6
|
-
export declare const svg2DataUrl: (svg: SVGElement, fill?: string
|
|
6
|
+
export declare const svg2DataUrl: (svg: SVGElement, fill?: string, stroke?: string, strokeWidth?: number) => string;
|
|
7
7
|
export declare const icons: SVGIconMap;
|
|
8
8
|
export declare class SvgIcon extends WebComponent {
|
|
9
9
|
icon: string;
|
|
@@ -14,4 +14,4 @@ export declare class SvgIcon extends WebComponent {
|
|
|
14
14
|
constructor();
|
|
15
15
|
render(): void;
|
|
16
16
|
}
|
|
17
|
-
export declare const svgIcon: ElementCreator<
|
|
17
|
+
export declare const svgIcon: ElementCreator<SvgIcon>;
|