tosijs-ui 1.0.3 → 1.0.6

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 CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <!--{ "pin": "top" }-->
7
7
 
8
- [ui.xinjs.net live demo](https://ui.xinjs.net) | [xinjs](https://xinjs.net) | [discord](https://discord.gg/ramJ9rgky5) | [github](https://github.com/tonioloewald/xinjs-ui#readme) | [npm](https://www.npmjs.com/package/xinjs-ui)
8
+ [ui.xinjs.net live demo](https://ui.xinjs.net) | [xinjs](https://xinjs.net) | [discord](https://discord.gg/ramJ9rgky5) | [github](https://github.com/tonioloewald/tosijs-ui#readme) | [npm](https://www.npmjs.com/package/tosijs-ui)
9
9
 
10
10
  <center>
11
11
  <xin-icon class="logo" icon="tosiUi" size=300></xin-icon>
@@ -54,8 +54,8 @@ as globals which contain all the things exported by `tosijs` and `tosijs-ui`.
54
54
  <script src="https://ui.xinjs.net/iife.js"></script>
55
55
  <button id="menu">Menu <xin-icon icon="chevronDown"></xin-icon></button>
56
56
  <script>
57
- const { elements } = tosijs
58
- const { popMenu, icons } = tosijsui
57
+ import { elements } from 'tosijs'
58
+ import { popMenu, icons } from 'tosijs-ui'
59
59
 
60
60
  const button = { elements }
61
61
 
@@ -109,7 +109,7 @@ document.body.append(markdownViewer('# hello world\nthis is a test'))
109
109
  ```
110
110
 
111
111
  ```js
112
- const { markdownViewer } = tosijsui
112
+ import { markdownViewer } from 'tosijs-ui'
113
113
 
114
114
  preview.append(
115
115
  markdownViewer(`
@@ -0,0 +1,22 @@
1
+ import { Component, PartsMap } from 'tosijs';
2
+ interface DialogParts extends PartsMap {
3
+ dialog: HTMLDialogElement;
4
+ ok: HTMLButtonElement;
5
+ }
6
+ export declare class TosiDialog extends Component<DialogParts> {
7
+ #private;
8
+ static alert(message: string, title?: string): Promise<void>;
9
+ static confirm(message: string, title?: string): Promise<boolean>;
10
+ static prompt(message: string, title?: string, currentValue?: string): Promise<string | null>;
11
+ removeOnClose: boolean;
12
+ closeOnBackgroundClick: boolean;
13
+ constructor();
14
+ dialogWillClose: (reason?: string) => void;
15
+ initialFocus(): void;
16
+ showModal: () => Promise<string | null>;
17
+ close: (reason?: string) => void;
18
+ ok: () => void;
19
+ content: () => HTMLDialogElement;
20
+ }
21
+ export declare const tosiDialog: import("tosijs").ElementCreator<Component<PartsMap>>;
22
+ export {};
@@ -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
- export declare class FilterPart extends WebComponent {
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: () => (SVGElement | HTMLSpanElement)[];
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 declare class FilterBuilder extends WebComponent {
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);
@@ -297,9 +297,13 @@ declare const _default: {
297
297
  alignLeft: string;
298
298
  heart: string;
299
299
  trendingUp: string;
300
+ listBullet: string;
301
+ indent: string;
300
302
  fontBold: string;
301
303
  fontItalic: string;
302
304
  fontUnderline: string;
305
+ outdent: string;
306
+ listNumber: string;
303
307
  resize: string;
304
308
  bug: string;
305
309
  blog: string;