tosijs-ui 1.0.2 → 1.0.4

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.
@@ -41,6 +41,7 @@ export declare class LiveExample extends Component<ExampleParts> {
41
41
  get isMaximized(): boolean;
42
42
  flipLayout: () => void;
43
43
  exampleMenu: () => void;
44
+ handleShortcuts: (event: KeyboardEvent) => void;
44
45
  content: () => any[];
45
46
  connectedCallback(): void;
46
47
  disconnectedCallback(): void;
@@ -53,7 +54,7 @@ export declare class LiveExample extends Component<ExampleParts> {
53
54
  openEditorWindow: () => void;
54
55
  refreshRemote: () => void;
55
56
  updateSources: () => void;
56
- refresh: () => void;
57
+ refresh: () => Promise<void>;
57
58
  initFromElements(elements: HTMLElement[]): void;
58
59
  showDefaultTab(): void;
59
60
  render(): void;
package/dist/menu.d.ts CHANGED
@@ -39,6 +39,7 @@ export interface PopMenuOptions {
39
39
  y: number;
40
40
  };
41
41
  localized?: boolean;
42
+ showChecked?: boolean;
42
43
  }
43
44
  export declare const popMenu: (options: PopMenuOptions) => void;
44
45
  interface XinMenuParts extends PartsMap {
@@ -0,0 +1,61 @@
1
+ import { Component, PartsMap } from 'tosijs';
2
+ import { XinSelect } from './select';
3
+ import { MenuItem } from './menu';
4
+ interface MonthParts extends PartsMap {
5
+ jump: HTMLButtonElement;
6
+ month: XinSelect;
7
+ year: XinSelect;
8
+ previous: HTMLButtonElement;
9
+ next: HTMLButtonElement;
10
+ }
11
+ export declare class TosiMonth extends Component<MonthParts> {
12
+ #private;
13
+ month: number;
14
+ year: number;
15
+ minDate: string;
16
+ maxDate: string;
17
+ weekStart: number;
18
+ selectable: boolean;
19
+ multiple: boolean;
20
+ range: boolean;
21
+ disabled: boolean;
22
+ readonly: boolean;
23
+ selectedDays: string[];
24
+ value: string;
25
+ get endDay(): number;
26
+ get months(): {
27
+ caption: string;
28
+ value: string;
29
+ }[];
30
+ get years(): string[];
31
+ monthChanged: (year: number, month: number) => void;
32
+ gotoMonth(year: number, month: number): void;
33
+ setMonth: () => void;
34
+ get to(): string;
35
+ set to(dateString: string);
36
+ get from(): string;
37
+ set from(dateString: string);
38
+ clickDate: (event: Event) => void;
39
+ keyDate: (event: KeyboardEvent) => void;
40
+ selectDate: (dateString: string) => void;
41
+ nextMonth: () => void;
42
+ previousMonth: () => void;
43
+ checkDay: (dateString: string) => boolean | "";
44
+ dateMenuItem: (dateString: string, caption?: string) => MenuItem;
45
+ jumpMenu: () => void;
46
+ content: () => HTMLDivElement[];
47
+ gotoDate(dateString: string): void;
48
+ constructor();
49
+ connectedCallback(): void;
50
+ days: Array<{
51
+ date: Date;
52
+ selected: boolean;
53
+ inRange: boolean;
54
+ inMonth: boolean;
55
+ isWeekend: boolean;
56
+ isToday: boolean;
57
+ }>;
58
+ render(): void;
59
+ }
60
+ export declare const tosiMonth: import("tosijs").ElementCreator<Component<PartsMap>>;
61
+ export {};
@@ -6,6 +6,7 @@ interface NotificationSpec {
6
6
  duration?: number;
7
7
  progress?: () => number;
8
8
  close?: () => void;
9
+ color?: string;
9
10
  }
10
11
  type callback = () => void;
11
12
  export declare class XinNotification extends Component {
@@ -5,6 +5,8 @@ export interface PopFloatOptions {
5
5
  content: HTMLElement | ElementPart[];
6
6
  target: HTMLElement;
7
7
  position?: FloatPosition;
8
+ remainOnScroll?: 'hide' | 'remove' | 'remain';
9
+ remainOnResize?: 'hide' | 'remove' | 'remain';
8
10
  }
9
11
  export declare const popFloat: (options: PopFloatOptions) => XinFloat;
10
- export declare const positionFloat: (element: HTMLElement, target: HTMLElement, position?: FloatPosition) => void;
12
+ export declare const positionFloat: (element: XinFloat, target: HTMLElement, position?: FloatPosition, remainOnScroll?: "hide" | "remove" | "remain", remainOnResize?: "hide" | "remove" | "remain") => void;
package/dist/select.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Component as WebComponent, ElementCreator } from 'tosijs';
1
+ import { Component, ElementCreator, PartsMap } from 'tosijs';
2
2
  import { MenuItem } from './menu';
3
3
  type OptionRequest = () => Promise<string | undefined>;
4
4
  export interface SelectOption {
@@ -12,7 +12,11 @@ export interface SelectOptionSubmenu {
12
12
  options: SelectOptions;
13
13
  }
14
14
  export type SelectOptions = Array<string | null | SelectOption | SelectOptionSubmenu>;
15
- export declare class XinSelect extends WebComponent {
15
+ interface SelectParts extends PartsMap {
16
+ button: HTMLButtonElement;
17
+ value: HTMLInputElement;
18
+ }
19
+ export declare class XinSelect extends Component<SelectParts> {
16
20
  editable: boolean;
17
21
  showIcon: boolean;
18
22
  hideCaption: boolean;
@@ -21,6 +25,7 @@ export declare class XinSelect extends WebComponent {
21
25
  placeholder: string;
22
26
  filter: string;
23
27
  localized: boolean;
28
+ disabled: boolean;
24
29
  private setValue;
25
30
  private getValue;
26
31
  get selectOptions(): SelectOptions;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.0.2";
1
+ export declare const version = "1.0.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tosijs-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "simple robust web-components for use with xinjs or anything else",
5
5
  "scripts": {
6
6
  "start": "bun --watch bin/dev.ts",
@@ -25,18 +25,18 @@
25
25
  "url": "https://github.com/tonioloewald/xinjs-ui.git"
26
26
  },
27
27
  "devDependencies": {
28
- "@playwright/test": "^1.54.1",
28
+ "@playwright/test": "^1.55.0",
29
29
  "@types/jsdom": "^21.1.7",
30
- "@types/node": "^22.16.4",
31
- "@types/react": "^19.1.8",
30
+ "@types/node": "^22.18.0",
31
+ "@types/react": "^19.1.12",
32
32
  "@typescript-eslint/eslint-plugin": "^5.62.0",
33
33
  "@typescript-eslint/parser": "^5.62.0",
34
34
  "bun-types": "latest",
35
- "caniuse-lite": "^1.0.30001727",
35
+ "caniuse-lite": "^1.0.30001739",
36
36
  "chokidar": "^4.0.3",
37
37
  "eslint": "^8.57.1",
38
38
  "prettier": "^2.8.8",
39
- "typescript": "^5.8.3"
39
+ "typescript": "^5.9.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "marked": "^16.0.0",