niuma-ui 1.3.0 → 1.3.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/RsButton.css +119 -61
  3. package/dist/components/RsButton.d.ts +3 -3
  4. package/dist/components/RsButton.impl.js +4 -12
  5. package/dist/components/RsButton.js +1 -1
  6. package/dist/components/RsDialog.css +1 -0
  7. package/dist/components/RsDialog.d.ts +5 -0
  8. package/dist/components/RsDialog.impl.js +4 -0
  9. package/dist/components/RsDrawer.css +1 -0
  10. package/dist/components/RsFieldset.css +92 -0
  11. package/dist/components/RsFieldset.d.ts +61 -0
  12. package/dist/components/RsFieldset.impl.js +78 -0
  13. package/dist/components/RsFieldset.js +8 -0
  14. package/dist/components/RsFormItem.css +19 -19
  15. package/dist/components/RsFormItem.d.ts +6 -4
  16. package/dist/components/RsFormItem.impl.js +12 -2
  17. package/dist/components/RsFormItem.js +1 -1
  18. package/dist/components/RsInput.css +78 -69
  19. package/dist/components/RsInput.js +1 -1
  20. package/dist/components/RsLog.css +198 -0
  21. package/dist/components/RsLog.d.ts +126 -0
  22. package/dist/components/RsLog.impl.js +619 -0
  23. package/dist/components/RsLog.js +8 -0
  24. package/dist/components/RsTable.impl.js +2 -1
  25. package/dist/components/RsTextarea.css +126 -0
  26. package/dist/components/RsTextarea.d.ts +114 -0
  27. package/dist/components/RsTextarea.impl.js +385 -0
  28. package/dist/components/RsTextarea.js +8 -0
  29. package/dist/components/RsTooltip.css +4 -3
  30. package/dist/components/RsTooltip.d.ts +2 -0
  31. package/dist/components/RsTooltip.impl.js +5 -2
  32. package/dist/components/RsVirtualList.css +6 -6
  33. package/dist/components/RsVirtualList.d.ts +1 -1
  34. package/dist/components/RsVirtualList.impl.js +9 -4
  35. package/dist/components/RsVirtualList.js +1 -1
  36. package/dist/components/button-utils.d.ts +19 -10
  37. package/dist/components/button-utils.js +22 -7
  38. package/dist/components/dialog-window.d.ts +2 -0
  39. package/dist/components/dialog-window.js +2 -1
  40. package/dist/components/fieldset-utils.d.ts +29 -0
  41. package/dist/components/fieldset-utils.js +12 -0
  42. package/dist/components/log-utils.d.ts +105 -0
  43. package/dist/components/log-utils.js +354 -0
  44. package/dist/components/table/rs-table-props.d.ts +8 -0
  45. package/dist/components/table/rs-table-props.js +1 -0
  46. package/dist/components/table/rs-table.css +7 -0
  47. package/dist/index.d.ts +10 -2
  48. package/dist/index.js +24 -0
  49. package/dist/lib/rs-dayjs.js +1 -1
  50. package/dist/locale/messages.js +42 -0
  51. package/dist/styles.css +37 -0
  52. package/dist/vite-plugins/niuma-ui-host.d.ts +8 -0
  53. package/dist/vite-plugins/niuma-ui-host.js +47 -9
  54. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ import type { RsRadius } from '../theme/types';
2
+ import { type RsLogCopySource, type RsLogHighlightPart, type RsLogInferMarkers, type RsLogLevel, type RsLogLine, type RsLogLineInput, type RsLogSeverityScale, type RsNormalizedLogLine } from './log-utils';
3
+ export type { RsLogLevel, RsLogLine, RsLogLineInput, RsNormalizedLogLine };
4
+ export interface RsLogExpose {
5
+ append: (input: string | RsLogLineInput | RsLogLineInput[]) => void;
6
+ clear: () => void;
7
+ scrollToBottom: () => void;
8
+ scrollToTop: () => void;
9
+ copy: () => Promise<boolean>;
10
+ copyAll: () => Promise<boolean>;
11
+ getLines: () => RsNormalizedLogLine[];
12
+ getVisibleLines: () => RsNormalizedLogLine[];
13
+ focus: () => void;
14
+ focusSearch: () => void;
15
+ }
16
+ export type RsLogLive = boolean | 'off' | 'polite' | 'assertive';
17
+ type __VLS_Props = {
18
+ text?: string;
19
+ height?: number | string;
20
+ itemSize?: number;
21
+ overscan?: number;
22
+ follow?: boolean;
23
+ wrap?: boolean;
24
+ showTime?: boolean;
25
+ showLevel?: boolean;
26
+ inferLevel?: boolean;
27
+ /** 未写 level 时,在内置扫描之后匹配这些成功 / 失败标识。 */
28
+ inferMarkers?: RsLogInferMarkers;
29
+ maxLines?: number;
30
+ zebra?: boolean;
31
+ emptyText?: string;
32
+ radius?: RsRadius;
33
+ ariaLabel?: string;
34
+ /** 默认 off:虚拟回收不要当 live region 播报。true 视为 polite。 */
35
+ live?: RsLogLive;
36
+ busy?: boolean;
37
+ showSearch?: boolean;
38
+ showCopy?: boolean;
39
+ showFilter?: boolean;
40
+ showLineNo?: boolean;
41
+ /** auto:折行关虚拟,单行开虚拟。折行没有变高虚拟。 */
42
+ virtual?: boolean | 'auto';
43
+ dir?: 'ltr' | 'rtl' | 'auto';
44
+ severityScale?: RsLogSeverityScale;
45
+ timeFormat?: Intl.DateTimeFormatOptions;
46
+ };
47
+ type __VLS_ModelProps = {
48
+ 'lines'?: string | RsLogLineInput[];
49
+ 'search'?: string;
50
+ 'levels'?: RsLogLevel[];
51
+ };
52
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
53
+ declare var __VLS_1: {}, __VLS_15: {}, __VLS_33: {
54
+ item: RsNormalizedLogLine;
55
+ index: number;
56
+ levelLabel: string;
57
+ parts: RsLogHighlightPart[];
58
+ }, __VLS_35: {
59
+ item: RsNormalizedLogLine;
60
+ index: number;
61
+ levelLabel: string;
62
+ parts: RsLogHighlightPart[];
63
+ };
64
+ type __VLS_Slots = {} & {
65
+ toolbar?: (props: typeof __VLS_1) => any;
66
+ } & {
67
+ empty?: (props: typeof __VLS_15) => any;
68
+ } & {
69
+ row?: (props: typeof __VLS_33) => any;
70
+ } & {
71
+ row?: (props: typeof __VLS_35) => any;
72
+ };
73
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, RsLogExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
74
+ copy: (payload: {
75
+ text: string;
76
+ source: RsLogCopySource;
77
+ }) => any;
78
+ overflow: (payload: {
79
+ dropped: number;
80
+ kept: number;
81
+ }) => any;
82
+ followChange: (following: boolean) => any;
83
+ "update:lines": (value: string | RsLogLineInput[]) => any;
84
+ "update:search": (value: string) => any;
85
+ "update:levels": (value: RsLogLevel[]) => any;
86
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
87
+ onCopy?: ((payload: {
88
+ text: string;
89
+ source: RsLogCopySource;
90
+ }) => any) | undefined;
91
+ onOverflow?: ((payload: {
92
+ dropped: number;
93
+ kept: number;
94
+ }) => any) | undefined;
95
+ onFollowChange?: ((following: boolean) => any) | undefined;
96
+ "onUpdate:lines"?: ((value: string | RsLogLineInput[]) => any) | undefined;
97
+ "onUpdate:search"?: ((value: string) => any) | undefined;
98
+ "onUpdate:levels"?: ((value: RsLogLevel[]) => any) | undefined;
99
+ }>, {
100
+ height: number | string;
101
+ dir: "ltr" | "rtl" | "auto";
102
+ virtual: boolean | "auto";
103
+ overscan: number;
104
+ wrap: boolean;
105
+ itemSize: number;
106
+ follow: boolean;
107
+ showTime: boolean;
108
+ showLevel: boolean;
109
+ inferLevel: boolean;
110
+ zebra: boolean;
111
+ live: RsLogLive;
112
+ busy: boolean;
113
+ showSearch: boolean;
114
+ showCopy: boolean;
115
+ showFilter: boolean;
116
+ showLineNo: boolean;
117
+ severityScale: RsLogSeverityScale;
118
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
119
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
120
+ declare const _default: typeof __VLS_export;
121
+ export default _default;
122
+ type __VLS_WithSlots<T, S> = T & {
123
+ new (): {
124
+ $slots: S;
125
+ };
126
+ };