@1337exp/taoui 5.4.0 → 5.6.0

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/dist/index.d.ts CHANGED
@@ -138,9 +138,9 @@ onRestart?: (() => any) | undefined;
138
138
  onSeek?: ((time: number) => any) | undefined;
139
139
  }>, {
140
140
  disabled: boolean;
141
+ playing: boolean;
141
142
  variant: "bar" | "thin";
142
143
  step: number;
143
- playing: boolean;
144
144
  marksSide: "start" | "end";
145
145
  pauseOnScrub: boolean;
146
146
  showRestart: boolean;
@@ -1206,8 +1206,8 @@ onSelect?: ((node: TaoTreeNode) => any) | undefined;
1206
1206
  "onLoad-error"?: ((node: TaoTreeNode, error: unknown) => any) | undefined;
1207
1207
  }>, {
1208
1208
  size: TaoSize;
1209
- ariaLabel: string;
1210
1209
  load: (node: TaoTreeNode) => Promise<TaoTreeNode[]>;
1210
+ ariaLabel: string;
1211
1211
  checked: string[];
1212
1212
  selected: string | string[] | null;
1213
1213
  expanded: string[];
@@ -1715,12 +1715,32 @@ todayText?: string;
1715
1715
  clearText?: string;
1716
1716
  prevMonthLabel?: string;
1717
1717
  nextMonthLabel?: string;
1718
+ /**
1719
+ * A text field you can type into: `5`, `5.3`, `05.03.26`, in the locale's order of day and month; the calendar
1720
+ * opens from the button next to it or with ↓. Enter or leaving the field applies the text; one that is not a date
1721
+ * or is outside min / max puts the value back; Esc drops the typing.
1722
+ * Текстовое поле, в которое можно набрать дату: `5`, `5.3`, `05.03.26`, в порядке дня и месяца языка; календарь
1723
+ * открывается кнопкой рядом или ↓. Enter или уход из поля применяют текст; не дата или дата вне min / max
1724
+ * возвращает значение; Esc отменяет набор.
1725
+ */
1726
+ editable?: boolean;
1727
+ /** Your own reading of the typed text → ISO or null. / Своё чтение набранного текста → ISO или null. */
1728
+ parse?: (text: string, context: {
1729
+ locale: string;
1730
+ reference: string;
1731
+ }) => string | null;
1732
+ /** Your own text of a value in the field. / Свой текст значения в поле. */
1733
+ format?: (iso: string, locale: string) => string;
1734
+ calendarLabel?: string;
1718
1735
  }>, {
1719
1736
  modelValue: null;
1720
1737
  disabled: boolean;
1721
1738
  error: boolean;
1722
1739
  min: undefined;
1723
1740
  max: undefined;
1741
+ editable: boolean;
1742
+ parse: undefined;
1743
+ format: undefined;
1724
1744
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1725
1745
  change: (value: string | null) => void;
1726
1746
  "update:modelValue": (value: string | null) => void;
@@ -1738,12 +1758,32 @@ todayText?: string;
1738
1758
  clearText?: string;
1739
1759
  prevMonthLabel?: string;
1740
1760
  nextMonthLabel?: string;
1761
+ /**
1762
+ * A text field you can type into: `5`, `5.3`, `05.03.26`, in the locale's order of day and month; the calendar
1763
+ * opens from the button next to it or with ↓. Enter or leaving the field applies the text; one that is not a date
1764
+ * or is outside min / max puts the value back; Esc drops the typing.
1765
+ * Текстовое поле, в которое можно набрать дату: `5`, `5.3`, `05.03.26`, в порядке дня и месяца языка; календарь
1766
+ * открывается кнопкой рядом или ↓. Enter или уход из поля применяют текст; не дата или дата вне min / max
1767
+ * возвращает значение; Esc отменяет набор.
1768
+ */
1769
+ editable?: boolean;
1770
+ /** Your own reading of the typed text → ISO or null. / Своё чтение набранного текста → ISO или null. */
1771
+ parse?: (text: string, context: {
1772
+ locale: string;
1773
+ reference: string;
1774
+ }) => string | null;
1775
+ /** Your own text of a value in the field. / Свой текст значения в поле. */
1776
+ format?: (iso: string, locale: string) => string;
1777
+ calendarLabel?: string;
1741
1778
  }>, {
1742
1779
  modelValue: null;
1743
1780
  disabled: boolean;
1744
1781
  error: boolean;
1745
1782
  min: undefined;
1746
1783
  max: undefined;
1784
+ editable: boolean;
1785
+ parse: undefined;
1786
+ format: undefined;
1747
1787
  }>>> & Readonly<{
1748
1788
  onChange?: ((value: string | null) => any) | undefined;
1749
1789
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
@@ -1753,6 +1793,12 @@ max: string;
1753
1793
  error: boolean;
1754
1794
  modelValue: string | null;
1755
1795
  min: string;
1796
+ format: (iso: string, locale: string) => string;
1797
+ editable: boolean;
1798
+ parse: (text: string, context: {
1799
+ locale: string;
1800
+ reference: string;
1801
+ }) => string | null;
1756
1802
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1757
1803
 
1758
1804
  declare const __VLS_component_52: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_54<__VLS_TypePropsToRuntimeProps_59<{
@@ -2443,7 +2489,13 @@ actionAlways: boolean;
2443
2489
  declare const __VLS_component_64: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_67<__VLS_TypePropsToRuntimeProps_72<{
2444
2490
  modelValue: boolean;
2445
2491
  title?: string;
2446
- side?: "left" | "right";
2492
+ /**
2493
+ * `bottom` is a sheet: it rises from the bottom edge, as wide as the screen up to 640px, as tall as its content up
2494
+ * to 90% of the screen, above the safe area. The phone's own way to show options and a form.
2495
+ * `bottom` — нижний лист: поднимается от нижнего края, во всю ширину до 640px, по высоте содержимого до 90%
2496
+ * экрана, над безопасной зоной. Телефонный способ показать параметры и форму.
2497
+ */
2498
+ side?: "left" | "right" | "bottom";
2447
2499
  closable?: boolean;
2448
2500
  closeLabel?: string;
2449
2501
  }>, {
@@ -2456,7 +2508,13 @@ close: (...args: any[]) => void;
2456
2508
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_67<__VLS_TypePropsToRuntimeProps_72<{
2457
2509
  modelValue: boolean;
2458
2510
  title?: string;
2459
- side?: "left" | "right";
2511
+ /**
2512
+ * `bottom` is a sheet: it rises from the bottom edge, as wide as the screen up to 640px, as tall as its content up
2513
+ * to 90% of the screen, above the safe area. The phone's own way to show options and a form.
2514
+ * `bottom` — нижний лист: поднимается от нижнего края, во всю ширину до 640px, по высоте содержимого до 90%
2515
+ * экрана, над безопасной зоной. Телефонный способ показать параметры и форму.
2516
+ */
2517
+ side?: "left" | "right" | "bottom";
2460
2518
  closable?: boolean;
2461
2519
  closeLabel?: string;
2462
2520
  }>, {
@@ -2469,7 +2527,7 @@ onClose?: ((...args: any[]) => any) | undefined;
2469
2527
  }>, {
2470
2528
  title: string;
2471
2529
  closable: boolean;
2472
- side: "left" | "right";
2530
+ side: "left" | "right" | "bottom";
2473
2531
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2474
2532
 
2475
2533
  declare const __VLS_component_65: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_71<__VLS_TypePropsToRuntimeProps_76<{
@@ -2639,18 +2697,21 @@ flush: boolean;
2639
2697
  declare const __VLS_component_8: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_8<Props_5>, {
2640
2698
  title: string;
2641
2699
  closable: boolean;
2700
+ fullscreen: boolean;
2642
2701
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2643
2702
  close: (...args: any[]) => void;
2644
2703
  "update:modelValue": (...args: any[]) => void;
2645
2704
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_8<Props_5>, {
2646
2705
  title: string;
2647
2706
  closable: boolean;
2707
+ fullscreen: boolean;
2648
2708
  }>>> & Readonly<{
2649
2709
  onClose?: ((...args: any[]) => any) | undefined;
2650
2710
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
2651
2711
  }>, {
2652
2712
  title: string;
2653
2713
  closable: boolean;
2714
+ fullscreen: boolean | "narrow";
2654
2715
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2655
2716
 
2656
2717
  declare const __VLS_component_9: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_8<__VLS_TypePropsToRuntimeProps_9<{
@@ -5333,6 +5394,12 @@ export declare function formatTaoDateLabel(iso: string, locale?: string): string
5333
5394
 
5334
5395
  export declare function formatTaoDateRangeLabel(start: string, end: string, locale?: string): string;
5335
5396
 
5397
+ /**
5398
+ * A date in the field as the locale writes it in numbers: `05.03.2026` (ru-RU), `03/05/2026` (en-US).
5399
+ * Дата в поле так, как язык пишет её цифрами.
5400
+ */
5401
+ export declare function formatTaoDateShort(iso: string, locale?: string): string;
5402
+
5336
5403
  /** HSL в RGB (0…255, целые). */
5337
5404
  export declare function hslToRgb(h: number, s: number, l: number): {
5338
5405
  r: number;
@@ -5391,6 +5458,17 @@ export declare function parseColor(input: string): Rgba | null;
5391
5458
 
5392
5459
  export declare function parseTaoDate(value: string | null | undefined): TaoDateParts | null;
5393
5460
 
5461
+ /**
5462
+ * Reads a typed date, in the locale's order of day and month. `5` is the 5th of the reference month, `5.3` the 5th of
5463
+ * March of the reference year (`3/5` in en-US), `05.03.26` and `5.3.2026` full dates; any of `. / - ,` or a space
5464
+ * separates, and digits alone split as 2 + 2 (+ 2 or 4): `0503`, `050326`. ISO `2026-03-05` is read too. Null when it
5465
+ * is not a real date (`31.02`).
5466
+ * Читает набранную дату в порядке дня и месяца языка. `5` — 5-е число опорного месяца, `5.3` — 5 марта опорного года
5467
+ * (`3/5` в en-US), `05.03.26` и `5.3.2026` — полные даты; разделяет любой из `. / - ,` или пробел, а одни цифры делятся
5468
+ * как 2 + 2 (+ 2 или 4). Читается и ISO. Null, если это не настоящая дата (`31.02`).
5469
+ */
5470
+ export declare function parseTaoDateInput(text: string, options?: TaoDateInputOptions): string | null;
5471
+
5394
5472
  export declare function parseTaoDateRange(value: TaoDateRangeValue | null | undefined): TaoDateRangeValue | null;
5395
5473
 
5396
5474
  declare function play(): void;
@@ -5588,6 +5666,13 @@ declare interface Props_5 {
5588
5666
  title?: string;
5589
5667
  closable?: boolean;
5590
5668
  closeLabel?: string;
5669
+ /**
5670
+ * `true` — the whole screen, square corners, the header and the footer stay while the content scrolls, the safe
5671
+ * areas kept. `'narrow'` — only on a screen narrower than 600px: a dialog on a computer, a page on a phone.
5672
+ * `true` — весь экран, прямые углы, шапка и подвал на месте, прокручивается содержимое, безопасные зоны учтены.
5673
+ * `'narrow'` — только на экране уже 600px: окно на компьютере, страница на телефоне.
5674
+ */
5675
+ fullscreen?: boolean | 'narrow';
5591
5676
  }
5592
5677
 
5593
5678
  declare interface Props_6 {
@@ -6025,6 +6110,21 @@ export declare interface TaoDateCell {
6025
6110
  currentMonth: boolean;
6026
6111
  }
6027
6112
 
6113
+ export declare type TaoDateField = 'd' | 'm' | 'y';
6114
+
6115
+ export declare interface TaoDateInputOptions {
6116
+ locale?: string;
6117
+ /** What a partial date is completed from (the month and the year of `5`); today by default. / От чего дополняется неполная дата; по умолчанию сегодня. */
6118
+ reference?: string;
6119
+ }
6120
+
6121
+ /**
6122
+ * The order of day, month and year in a locale's short date: `['d', 'm', 'y']` for ru-RU and en-GB, `['m', 'd', 'y']`
6123
+ * for en-US, `['y', 'm', 'd']` for ja-JP and sv-SE.
6124
+ * Порядок дня, месяца и года в короткой дате языка.
6125
+ */
6126
+ export declare function taoDateOrder(locale?: string): TaoDateField[];
6127
+
6028
6128
  export declare interface TaoDateParts {
6029
6129
  y: number;
6030
6130
  m: number;
@@ -6227,6 +6327,12 @@ export declare interface TaoLocale {
6227
6327
  clearText: string;
6228
6328
  prevMonthLabel: string;
6229
6329
  nextMonthLabel: string;
6330
+ /**
6331
+ * The calendar button of an `editable` TaoDate (5.6). Optional, so a locale written before it still type-checks;
6332
+ * without it the English text is used.
6333
+ * Кнопка календаря у `editable` TaoDate (5.6). Необязательна, чтобы локаль, написанная раньше, проходила типы.
6334
+ */
6335
+ calendarLabel?: string;
6230
6336
  };
6231
6337
  dateRange: {
6232
6338
  placeholder: string;
@@ -7037,10 +7143,10 @@ onKeydown?: ((...args: any[]) => any) | undefined;
7037
7143
  }>, {
7038
7144
  disabled: boolean;
7039
7145
  placeholder: string;
7040
- variant: TaoTextareaVariant;
7041
- count: boolean;
7042
7146
  error: boolean;
7043
7147
  resize: boolean;
7148
+ variant: TaoTextareaVariant;
7149
+ count: boolean;
7044
7150
  modelValue: string;
7045
7151
  align: "start" | "center" | "end";
7046
7152
  autocomplete: string;