@uzum-tech/ui 1.5.2 → 1.5.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.
Files changed (200) hide show
  1. package/README.md +0 -1
  2. package/dist/index.js +1147 -628
  3. package/dist/index.prod.js +3 -3
  4. package/es/_internal/checkbox/src/use-checkbox.js +3 -3
  5. package/es/_internal/radio/src/use-radio.js +3 -3
  6. package/es/_mixins/use-form-item.d.ts +4 -4
  7. package/es/_mixins/use-form-item.js +4 -4
  8. package/es/_styles/common/dark.js +1 -1
  9. package/es/_styles/common/light.d.ts +3 -0
  10. package/es/_styles/common/light.js +1 -1
  11. package/es/_utils/composable/composables.d.ts +11 -0
  12. package/es/_utils/composable/composables.js +40 -0
  13. package/es/_utils/index.d.ts +1 -1
  14. package/es/_utils/index.js +1 -1
  15. package/es/_utils/uzum/index.d.ts +1 -0
  16. package/es/_utils/uzum/index.js +1 -0
  17. package/es/_utils/uzum/value.d.ts +1 -0
  18. package/es/_utils/uzum/value.js +9 -0
  19. package/es/_utils/vue/resolve-slot.d.ts +1 -1
  20. package/es/alert/styles/light.js +6 -6
  21. package/es/auto-complete/src/AutoComplete.js +10 -10
  22. package/es/avatar/src/Avatar.d.ts +6 -0
  23. package/es/avatar/src/Avatar.js +9 -3
  24. package/es/card-list/src/CardList.js +1 -1
  25. package/es/card-list/src/CardListItem.d.ts +13 -0
  26. package/es/card-list/src/CardListItem.js +11 -4
  27. package/es/card-list/src/interface.d.ts +1 -0
  28. package/es/card-list/src/styles/index.cssr.js +6 -6
  29. package/es/card-list/styles/light.js +2 -2
  30. package/es/cascader/src/Cascader.js +7 -7
  31. package/es/checkbox/src/CheckboxGroup.js +9 -9
  32. package/es/collapse/src/Collapse.d.ts +47 -14
  33. package/es/collapse/src/Collapse.js +6 -3
  34. package/es/collapse/src/CollapseItem.js +3 -2
  35. package/es/collapse/src/styles/index.cssr.js +27 -7
  36. package/es/collapse/styles/light.d.ts +4 -1
  37. package/es/collapse/styles/light.js +6 -3
  38. package/es/color-picker/src/ColorPicker.js +6 -6
  39. package/es/components.d.ts +1 -0
  40. package/es/components.js +1 -0
  41. package/es/config-provider/src/internal-interface.d.ts +2 -0
  42. package/es/data-table/src/DataTable.d.ts +7 -0
  43. package/es/data-table/src/DataTable.js +21 -10
  44. package/es/data-table/src/TableParts/Body.d.ts +1 -0
  45. package/es/data-table/src/TableParts/Body.js +8 -6
  46. package/es/data-table/src/TableParts/Cell.js +85 -23
  47. package/es/data-table/src/interface.d.ts +14 -6
  48. package/es/data-table/src/interface.js +1 -1
  49. package/es/data-table/src/styles/index.cssr.js +5 -3
  50. package/es/data-table/src/use-mask.d.ts +3 -6
  51. package/es/data-table/src/utils.d.ts +2 -1
  52. package/es/data-table/src/utils.js +13 -0
  53. package/es/date-picker/src/DatePicker.js +7 -7
  54. package/es/dialog/src/DialogProvider.d.ts +6 -0
  55. package/es/dynamic-tags/src/DynamicTags.d.ts +10 -0
  56. package/es/dynamic-tags/src/DynamicTags.js +3 -3
  57. package/es/dynamic-tags/styles/light.d.ts +1 -0
  58. package/es/input/src/Input.js +8 -8
  59. package/es/input-number/src/InputNumber.js +7 -7
  60. package/es/input-otp/index.d.ts +3 -0
  61. package/es/input-otp/index.js +1 -0
  62. package/es/input-otp/src/InputOtp.d.ts +871 -0
  63. package/es/input-otp/src/InputOtp.js +250 -0
  64. package/es/input-otp/src/public-types.d.ts +25 -0
  65. package/es/input-otp/src/public-types.js +1 -0
  66. package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
  67. package/es/input-otp/src/styles/index.cssr.js +20 -0
  68. package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  69. package/es/input-otp/src/styles/input-otp-rtl.cssr.js +5 -0
  70. package/es/input-otp/styles/dark.d.ts +3 -0
  71. package/es/input-otp/styles/dark.js +12 -0
  72. package/es/input-otp/styles/index.d.ts +4 -0
  73. package/es/input-otp/styles/index.js +3 -0
  74. package/es/input-otp/styles/light.d.ts +83 -0
  75. package/es/input-otp/styles/light.js +22 -0
  76. package/es/input-otp/styles/rtl.d.ts +2 -0
  77. package/es/input-otp/styles/rtl.js +5 -0
  78. package/es/legacy-transfer/src/Transfer.js +3 -3
  79. package/es/list/src/ListItem.js +8 -4
  80. package/es/mention/src/Mention.js +7 -7
  81. package/es/radio/src/RadioGroup.js +5 -5
  82. package/es/rate/src/Rate.js +3 -3
  83. package/es/select/src/Select.js +7 -7
  84. package/es/slider/src/Slider.js +3 -3
  85. package/es/styles.d.ts +1 -0
  86. package/es/styles.js +1 -0
  87. package/es/switch/src/Switch.js +7 -7
  88. package/es/tag/src/Tag.d.ts +27 -13
  89. package/es/tag/src/Tag.js +7 -2
  90. package/es/tag/src/styles/index.cssr.js +13 -3
  91. package/es/tag/styles/light.d.ts +1 -0
  92. package/es/tag/styles/light.js +7 -6
  93. package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
  94. package/es/themes/dark.js +2 -0
  95. package/es/themes/light.js +2 -0
  96. package/es/time-picker/src/TimePicker.js +7 -7
  97. package/es/transfer/src/Transfer.js +3 -3
  98. package/es/tree-select/src/TreeSelect.js +5 -5
  99. package/es/version.d.ts +1 -1
  100. package/es/version.js +1 -1
  101. package/lib/_internal/checkbox/src/use-checkbox.js +3 -3
  102. package/lib/_internal/radio/src/use-radio.js +3 -3
  103. package/lib/_mixins/use-form-item.d.ts +4 -4
  104. package/lib/_mixins/use-form-item.js +4 -4
  105. package/lib/_styles/common/dark.js +1 -1
  106. package/lib/_styles/common/light.d.ts +3 -0
  107. package/lib/_styles/common/light.js +1 -1
  108. package/lib/_utils/composable/composables.d.ts +11 -0
  109. package/lib/_utils/composable/composables.js +47 -0
  110. package/lib/_utils/index.d.ts +1 -1
  111. package/lib/_utils/index.js +2 -1
  112. package/lib/_utils/uzum/index.d.ts +1 -0
  113. package/lib/_utils/uzum/index.js +3 -1
  114. package/lib/_utils/uzum/value.d.ts +1 -0
  115. package/lib/_utils/uzum/value.js +12 -0
  116. package/lib/_utils/vue/resolve-slot.d.ts +1 -1
  117. package/lib/alert/styles/light.js +6 -6
  118. package/lib/auto-complete/src/AutoComplete.js +10 -10
  119. package/lib/avatar/src/Avatar.d.ts +6 -0
  120. package/lib/avatar/src/Avatar.js +9 -3
  121. package/lib/card-list/src/CardList.js +1 -1
  122. package/lib/card-list/src/CardListItem.d.ts +13 -0
  123. package/lib/card-list/src/CardListItem.js +11 -4
  124. package/lib/card-list/src/interface.d.ts +1 -0
  125. package/lib/card-list/src/styles/index.cssr.js +5 -5
  126. package/lib/card-list/styles/light.js +2 -2
  127. package/lib/cascader/src/Cascader.js +7 -7
  128. package/lib/checkbox/src/CheckboxGroup.js +9 -9
  129. package/lib/collapse/src/Collapse.d.ts +47 -14
  130. package/lib/collapse/src/Collapse.js +6 -3
  131. package/lib/collapse/src/CollapseItem.js +3 -2
  132. package/lib/collapse/src/styles/index.cssr.js +27 -7
  133. package/lib/collapse/styles/light.d.ts +4 -1
  134. package/lib/collapse/styles/light.js +6 -3
  135. package/lib/color-picker/src/ColorPicker.js +6 -6
  136. package/lib/components.d.ts +1 -0
  137. package/lib/components.js +1 -0
  138. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  139. package/lib/data-table/src/DataTable.d.ts +7 -0
  140. package/lib/data-table/src/DataTable.js +21 -10
  141. package/lib/data-table/src/TableParts/Body.d.ts +1 -0
  142. package/lib/data-table/src/TableParts/Body.js +8 -6
  143. package/lib/data-table/src/TableParts/Cell.js +84 -22
  144. package/lib/data-table/src/interface.d.ts +14 -6
  145. package/lib/data-table/src/interface.js +1 -1
  146. package/lib/data-table/src/styles/index.cssr.js +5 -3
  147. package/lib/data-table/src/use-mask.d.ts +3 -6
  148. package/lib/data-table/src/utils.d.ts +2 -1
  149. package/lib/data-table/src/utils.js +14 -1
  150. package/lib/date-picker/src/DatePicker.js +7 -7
  151. package/lib/dialog/src/DialogProvider.d.ts +6 -0
  152. package/lib/dynamic-tags/src/DynamicTags.d.ts +10 -0
  153. package/lib/dynamic-tags/src/DynamicTags.js +3 -3
  154. package/lib/dynamic-tags/styles/light.d.ts +1 -0
  155. package/lib/input/src/Input.js +8 -8
  156. package/lib/input-number/src/InputNumber.js +7 -7
  157. package/lib/input-otp/index.d.ts +3 -0
  158. package/lib/input-otp/index.js +9 -0
  159. package/lib/input-otp/src/InputOtp.d.ts +871 -0
  160. package/lib/input-otp/src/InputOtp.js +256 -0
  161. package/lib/input-otp/src/public-types.d.ts +25 -0
  162. package/lib/input-otp/src/public-types.js +2 -0
  163. package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
  164. package/lib/input-otp/src/styles/index.cssr.js +25 -0
  165. package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
  166. package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
  167. package/lib/input-otp/styles/dark.d.ts +3 -0
  168. package/lib/input-otp/styles/dark.js +14 -0
  169. package/lib/input-otp/styles/index.d.ts +4 -0
  170. package/lib/input-otp/styles/index.js +12 -0
  171. package/lib/input-otp/styles/light.d.ts +83 -0
  172. package/lib/input-otp/styles/light.js +25 -0
  173. package/lib/input-otp/styles/rtl.d.ts +2 -0
  174. package/lib/input-otp/styles/rtl.js +11 -0
  175. package/lib/legacy-transfer/src/Transfer.js +3 -3
  176. package/lib/list/src/ListItem.js +8 -4
  177. package/lib/mention/src/Mention.js +7 -7
  178. package/lib/radio/src/RadioGroup.js +5 -5
  179. package/lib/rate/src/Rate.js +3 -3
  180. package/lib/select/src/Select.js +7 -7
  181. package/lib/slider/src/Slider.js +3 -3
  182. package/lib/styles.d.ts +1 -0
  183. package/lib/styles.js +106 -103
  184. package/lib/switch/src/Switch.js +7 -7
  185. package/lib/tag/src/Tag.d.ts +27 -13
  186. package/lib/tag/src/Tag.js +7 -2
  187. package/lib/tag/src/styles/index.cssr.js +13 -3
  188. package/lib/tag/styles/light.d.ts +1 -0
  189. package/lib/tag/styles/light.js +7 -6
  190. package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
  191. package/lib/themes/dark.js +2 -0
  192. package/lib/themes/light.js +2 -0
  193. package/lib/time-picker/src/TimePicker.js +7 -7
  194. package/lib/transfer/src/Transfer.js +3 -3
  195. package/lib/tree-select/src/TreeSelect.js +5 -5
  196. package/lib/version.d.ts +1 -1
  197. package/lib/version.js +1 -1
  198. package/package.json +1 -1
  199. package/volar.d.ts +1 -0
  200. package/web-types.json +131 -4
@@ -4,6 +4,7 @@ const vue_1 = require("vue");
4
4
  const lodash_es_1 = require("lodash-es");
5
5
  const ellipsis_1 = require("../../../ellipsis");
6
6
  const use_mask_1 = require("../use-mask");
7
+ const utils_1 = require("../utils");
7
8
  exports.default = (0, vue_1.defineComponent)({
8
9
  name: 'DataTableCell',
9
10
  emits: ['edit'],
@@ -35,7 +36,10 @@ exports.default = (0, vue_1.defineComponent)({
35
36
  var _a;
36
37
  const { isSummary, column, row, renderCell } = this;
37
38
  let cell;
38
- const { render, key, ellipsis, editable, mask } = column;
39
+ let { mask } = column;
40
+ const { render, key, ellipsis, editable, numeric } = column;
41
+ if (numeric && !mask)
42
+ mask = utils_1.defaultNumericMask;
39
43
  if (render && !isSummary) {
40
44
  let cellValue = render(row, this.index);
41
45
  if (mask && cellValue !== null && cellValue !== undefined) {
@@ -47,37 +51,95 @@ exports.default = (0, vue_1.defineComponent)({
47
51
  }
48
52
  else if (editable && !isSummary) {
49
53
  const { placeholder } = column;
50
- let initialValue = String(row[key] || '');
51
- if (mask && initialValue) {
52
- initialValue = (0, use_mask_1.processMaskedValue)(initialValue, mask);
53
- }
54
+ const rawValue = String(row[key] || '');
55
+ const displayValue = mask ? (0, use_mask_1.processMaskedValue)(rawValue, mask) : rawValue;
56
+ const isEditingRef = { current: false };
54
57
  const inputProps = {
55
58
  class: `${this.clsPrefix}-data-table-editable-input`,
56
- value: initialValue,
59
+ value: displayValue,
57
60
  placeholder: placeholder || '',
61
+ onFocus: (e) => {
62
+ const input = e.target;
63
+ isEditingRef.current = true;
64
+ input.value = rawValue;
65
+ },
66
+ onKeyDown: (e) => {
67
+ if (mask && typeof mask === 'function' && isEditingRef.current) {
68
+ const input = e.target;
69
+ input.value = rawValue;
70
+ }
71
+ },
58
72
  onInput: (e) => {
59
- const value = e.target.value;
60
- if (mask) {
61
- const { processedValue, displayValue } = (0, use_mask_1.processInputWithMask)(value, mask);
62
- setTimeout(() => {
63
- const input = e.target;
64
- if (input.value !== displayValue) {
65
- const cursorPos = input.selectionStart || 0;
66
- input.value = displayValue;
67
- input.setSelectionRange(cursorPos, cursorPos);
73
+ const input = e.target;
74
+ const value = input.value;
75
+ if (mask && typeof mask === 'function' && !isEditingRef.current) {
76
+ isEditingRef.current = true;
77
+ }
78
+ if (mask && typeof mask === 'function' && isEditingRef.current) {
79
+ const rawValue = value.replace(/\$/g, '').replace(/[^\d.,]/g, '');
80
+ input.value = rawValue;
81
+ let processedValue = rawValue;
82
+ if (numeric && rawValue !== '') {
83
+ const cleanValue = rawValue
84
+ .replace(/[^\d.,]/g, '')
85
+ .replace(',', '.');
86
+ const numValue = Number(cleanValue);
87
+ if (!isNaN(numValue)) {
88
+ processedValue = numValue;
68
89
  }
69
- });
90
+ }
70
91
  this.$emit('edit', processedValue, row, key);
92
+ void Promise.resolve().then(() => {
93
+ if (isEditingRef.current && input.value !== rawValue) {
94
+ input.value = rawValue;
95
+ }
96
+ });
97
+ return;
98
+ }
99
+ let processedValue = value;
100
+ if (numeric && value !== '') {
101
+ const cleanValue = value.replace(/[^\d.,]/g, '').replace(',', '.');
102
+ const numValue = Number(cleanValue);
103
+ if (!isNaN(numValue)) {
104
+ processedValue = numValue;
105
+ }
71
106
  }
72
- else {
73
- this.$emit('edit', value, row, key);
107
+ this.$emit('edit', processedValue, row, key);
108
+ },
109
+ onKeyUp: (e) => {
110
+ if (mask && typeof mask === 'function' && isEditingRef.current) {
111
+ const input = e.target;
112
+ input.value = rawValue;
113
+ }
114
+ },
115
+ onChange: (e) => {
116
+ if (mask && typeof mask === 'function' && isEditingRef.current) {
117
+ const input = e.target;
118
+ setTimeout(() => {
119
+ if (isEditingRef.current && input.value !== rawValue) {
120
+ input.value = rawValue;
121
+ }
122
+ }, 0);
123
+ setTimeout(() => {
124
+ if (isEditingRef.current && input.value !== rawValue) {
125
+ input.value = rawValue;
126
+ }
127
+ }, 10);
128
+ }
129
+ },
130
+ onBlur: (e) => {
131
+ isEditingRef.current = false;
132
+ if (mask) {
133
+ const input = e.target;
134
+ let currentValue = input.value;
135
+ if (numeric && currentValue !== '') {
136
+ currentValue = currentValue.replace(',', '.');
137
+ }
138
+ const maskedValue = (0, use_mask_1.processMaskedValue)(currentValue, mask);
139
+ input.value = maskedValue;
74
140
  }
75
141
  }
76
142
  };
77
- if (mask) {
78
- inputProps['data-mask'] =
79
- typeof mask === 'string' ? mask : JSON.stringify(mask);
80
- }
81
143
  cell = (0, vue_1.h)('input', inputProps);
82
144
  }
83
145
  else {
@@ -9,6 +9,7 @@ import type { PaginationProps } from '../../pagination';
9
9
  import type { DataTableTheme } from '../styles';
10
10
  import type { RowItem, ColItem } from './use-group-header';
11
11
  import type { BaseLoadingExposedProps } from '../../_internal';
12
+ import type { EmptyProps } from '../../empty';
12
13
  export declare const dataTableProps: {
13
14
  readonly onUnstableColumnResize: PropType<(resizedWidth: number, limitedWidth: number, column: TableBaseColumn, getColumnWidth: (key: ColumnKey) => number | undefined) => void>;
14
15
  readonly pagination: {
@@ -101,6 +102,7 @@ export declare const dataTableProps: {
101
102
  readonly type: PropType<BaseLoadingExposedProps>;
102
103
  readonly default: {};
103
104
  };
105
+ readonly emptyProps: PropType<Partial<EmptyProps>>;
104
106
  readonly onLoad: PropType<DataTableOnLoad>;
105
107
  readonly 'onUpdate:page': PropType<PaginationProps["onUpdate:page"]>;
106
108
  readonly onUpdatePage: PropType<PaginationProps["onUpdate:page"]>;
@@ -2913,6 +2915,10 @@ export interface CommonColumnInfo<T = InternalRowData> {
2913
2915
  cellProps?: (rowData: T, rowIndex: number) => HTMLAttributes;
2914
2916
  visible?: boolean;
2915
2917
  }
2918
+ export interface TableColumnMaskObject {
2919
+ postProcess: (value: string) => string;
2920
+ }
2921
+ export type TableColumnMask = string | ((value: string) => string) | TableColumnMaskObject;
2916
2922
  export type TableColumnTitle = string | ((column: TableBaseColumn) => VNodeChild);
2917
2923
  export type TableExpandColumnTitle = string | ((column: TableExpandColumn) => VNodeChild);
2918
2924
  export type TableColumnGroupTitle = string | ((column: TableColumnGroup) => VNodeChild);
@@ -2932,18 +2938,14 @@ export type TableBaseColumn<T = InternalRowData> = {
2932
2938
  type?: never;
2933
2939
  key: ColumnKey;
2934
2940
  editable?: boolean;
2935
- mask?: string | ((value: string) => string) | {
2936
- postProcess: (value: string) => string;
2937
- };
2941
+ mask?: TableColumnMask;
2942
+ numeric?: boolean;
2938
2943
  placeholder?: string;
2939
2944
  totalRow?: {
2940
2945
  type: 'sum' | 'default' | 'diff' | 'multiply' | 'divide' | 'percentage' | 'function';
2941
2946
  value?: string;
2942
2947
  fields?: string[];
2943
2948
  function?: (values: number[]) => number;
2944
- mask?: string | ((value: string) => string) | {
2945
- postProcess: (value: string) => string;
2946
- };
2947
2949
  };
2948
2950
  tree?: boolean;
2949
2951
  sorter?: boolean | Sorter<T> | 'default';
@@ -3083,6 +3085,7 @@ export interface DataTableInjection {
3083
3085
  syncScrollState: (deltaX?: number, deltaY?: number) => void;
3084
3086
  setHeaderScrollLeft: (scrollLeft: number) => void;
3085
3087
  renderCell: Ref<undefined | ((value: any, rowData: object, column: TableBaseColumn) => VNodeChild)>;
3088
+ emptyPropsRef: Ref<Partial<EmptyProps> | undefined>;
3086
3089
  handleEdit: (value: any, row: any, key: string) => void;
3087
3090
  }
3088
3091
  export declare const dataTableInjectionKey: import("vue").InjectionKey<DataTableInjection>;
@@ -3138,6 +3141,11 @@ export interface DataTableInst {
3138
3141
  page: (page: number) => void;
3139
3142
  sort: (columnKey: ColumnKey, order: SortOrder) => void;
3140
3143
  scrollTo: ScrollTo;
3144
+ getData: () => {
3145
+ data: InternalRowData[];
3146
+ totalRows: InternalRowData | null;
3147
+ };
3148
+ getTotalRowData: () => InternalRowData | null;
3141
3149
  /** @deprecated it but just leave it here, it does no harm */
3142
3150
  clearFilter: () => void;
3143
3151
  }
@@ -53,7 +53,7 @@ exports.dataTableProps = Object.assign(Object.assign({}, _mixins_1.useTheme.prop
53
53
  }, paginationBehaviorOnFilter: {
54
54
  type: String,
55
55
  default: 'current'
56
- }, scrollbarProps: Object, renderCell: Function, renderExpandIcon: Function, spinProps: { type: Object, default: {} }, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function,
56
+ }, scrollbarProps: Object, renderCell: Function, renderExpandIcon: Function, spinProps: { type: Object, default: {} }, emptyProps: Object, onLoad: Function, 'onUpdate:page': [Function, Array], onUpdatePage: [Function, Array], 'onUpdate:pageSize': [Function, Array], onUpdatePageSize: [Function, Array], 'onUpdate:sorter': [Function, Array], onUpdateSorter: [Function, Array], 'onUpdate:filters': [Function, Array], onUpdateFilters: [Function, Array], 'onUpdate:checkedRowKeys': [Function, Array], onUpdateCheckedRowKeys: [Function, Array], 'onUpdate:expandedRowKeys': [Function, Array], onUpdateExpandedRowKeys: [Function, Array], onScroll: Function,
57
57
  // deprecated
58
58
  onPageChange: [Function, Array], onPageSizeChange: [Function, Array], onSorterChange: [Function, Array], onFiltersChange: [Function, Array], onCheckedRowKeysChange: [Function, Array] });
59
59
  exports.dataTableInjectionKey = (0, _utils_1.createInjectionKey)('u-data-table');
@@ -301,19 +301,21 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
301
301
  `), (0, cssr_1.cM)('editable', `
302
302
  cursor: pointer;
303
303
  position: relative;
304
-
304
+ padding: 0;
305
305
  .u-data-table-editable-input {
306
306
  appearance: none;
307
307
  text-align: right;
308
308
  border: none;
309
309
  background: none;
310
310
  outline: none;
311
- padding: 0;
311
+ box-sizing: border-box;
312
+ padding: var(--u-td-padding);
312
313
  margin: 0;
313
314
  font: inherit;
314
315
  color: inherit;
315
316
  box-shadow: none;
316
- width: '100%';
317
+ height: 100%;
318
+ width: 100%;
317
319
  }
318
320
  `), fixedColumnStyle]), (0, cssr_1.cB)('data-table-empty', `
319
321
  box-sizing: border-box;
@@ -1,10 +1,7 @@
1
+ import { TableColumnMask } from './interface';
1
2
  export declare function applyMask(value: string, mask: string): string;
2
- export declare function processMaskedValue(value: string | number, mask: string | ((value: string) => string) | {
3
- postProcess: (value: string) => string;
4
- }): string;
5
- export declare function processInputWithMask(value: string, mask: string | ((value: string) => string) | {
6
- postProcess: (value: string) => string;
7
- }): {
3
+ export declare function processMaskedValue(value: string | number, mask: TableColumnMask): string;
4
+ export declare function processInputWithMask(value: string, mask: TableColumnMask): {
8
5
  processedValue: string | number;
9
6
  displayValue: string;
10
7
  };
@@ -1,11 +1,12 @@
1
1
  import type { CSSProperties } from 'vue';
2
- import type { SortOrder, TableBaseColumn, InternalRowData, SortOrderFlag, SortState, CreateRowClassName, TableSelectionColumn, TableColumn, TableExpandColumn } from './interface';
2
+ import type { SortOrder, TableBaseColumn, InternalRowData, SortOrderFlag, SortState, CreateRowClassName, TableSelectionColumn, TableColumn, TableExpandColumn, TableColumnMaskObject } from './interface';
3
3
  export declare const SELECTION_COL_WIDTH = 40;
4
4
  export declare const EXPAND_COL_WIDTH = 40;
5
5
  export declare const REGEX: {
6
6
  ONLY_DIGITS: RegExp;
7
7
  ONLY_NUMERIC_AND_DOT: RegExp;
8
8
  };
9
+ export declare const defaultNumericMask: TableColumnMaskObject;
9
10
  export declare function getNumberColWidth(col: TableColumn): number | undefined;
10
11
  export declare function getStringColWidth(col: TableColumn): string | undefined;
11
12
  export declare function getColKey(col: TableColumn): string | number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REGEX = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
3
+ exports.defaultNumericMask = exports.REGEX = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
4
4
  exports.getNumberColWidth = getNumberColWidth;
5
5
  exports.getStringColWidth = getStringColWidth;
6
6
  exports.getColKey = getColKey;
@@ -23,6 +23,19 @@ exports.REGEX = {
23
23
  ONLY_DIGITS: /\D/g,
24
24
  ONLY_NUMERIC_AND_DOT: /[^\d.]/g
25
25
  };
26
+ exports.defaultNumericMask = {
27
+ postProcess: (value) => {
28
+ if (!value)
29
+ return '';
30
+ const isNegative = value.trim().startsWith('-');
31
+ const cleaned = value.replace(/[^\d.]/g, '');
32
+ const [intPartRaw, decimalPartRaw = ''] = cleaned.split('.', 2);
33
+ const intPart = intPartRaw.replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
34
+ const decimalPart = decimalPartRaw.slice(0, 2);
35
+ const result = cleaned.includes('.') ? `${intPart}.${decimalPart}` : intPart;
36
+ return isNegative ? `-${result}` : result;
37
+ }
38
+ };
26
39
  function getNumberColWidth(col) {
27
40
  if (col.type === 'selection') {
28
41
  return col.width === undefined ? exports.SELECTION_COL_WIDTH : (0, seemly_1.depx)(col.width);
@@ -287,7 +287,7 @@ exports.default = (0, vue_1.defineComponent)({
287
287
  return;
288
288
  }
289
289
  const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props;
290
- const { nTriggerFormChange, nTriggerFormInput } = formItem;
290
+ const { triggerFormChange, triggerFormInput } = formItem;
291
291
  const formattedValue = getFormattedValue(value);
292
292
  if (options.doConfirm) {
293
293
  doConfirm(value, formattedValue);
@@ -302,8 +302,8 @@ exports.default = (0, vue_1.defineComponent)({
302
302
  (0, _utils_1.call)(onChange, value, formattedValue);
303
303
  uncontrolledValueRef.value = value;
304
304
  doUpdateFormattedValue(formattedValue, value);
305
- nTriggerFormChange();
306
- nTriggerFormInput();
305
+ triggerFormChange();
306
+ triggerFormInput();
307
307
  }
308
308
  function doClear() {
309
309
  const { onClear } = props;
@@ -316,17 +316,17 @@ exports.default = (0, vue_1.defineComponent)({
316
316
  }
317
317
  function doFocus(e) {
318
318
  const { onFocus } = props;
319
- const { nTriggerFormFocus } = formItem;
319
+ const { triggerFormFocus } = formItem;
320
320
  if (onFocus)
321
321
  (0, _utils_1.call)(onFocus, e);
322
- nTriggerFormFocus();
322
+ triggerFormFocus();
323
323
  }
324
324
  function doBlur(e) {
325
325
  const { onBlur } = props;
326
- const { nTriggerFormBlur } = formItem;
326
+ const { triggerFormBlur } = formItem;
327
327
  if (onBlur)
328
328
  (0, _utils_1.call)(onBlur, e);
329
- nTriggerFormBlur();
329
+ triggerFormBlur();
330
330
  }
331
331
  function doUpdateShow(show) {
332
332
  const { 'onUpdate:show': _onUpdateShow, onUpdateShow } = props;
@@ -283,6 +283,9 @@ export declare const UDialogProvider: import("vue").DefineComponent<{
283
283
  scrollbarHeight: string;
284
284
  scrollbarBorderRadius: string;
285
285
  opacityDisabled: string;
286
+ brand150: string;
287
+ brand350: string;
288
+ brand550: string;
286
289
  brandPrimary50: string;
287
290
  brandPrimary100: string;
288
291
  brandPrimary200: string;
@@ -639,6 +642,9 @@ export declare const UDialogProvider: import("vue").DefineComponent<{
639
642
  scrollbarHeight: string;
640
643
  scrollbarBorderRadius: string;
641
644
  opacityDisabled: string;
645
+ brand150: string;
646
+ brand350: string;
647
+ brand550: string;
642
648
  brandPrimary50: string;
643
649
  brandPrimary100: string;
644
650
  brandPrimary200: string;
@@ -349,6 +349,7 @@ export declare const dynamicTagsProps: {
349
349
  textColorPressedCheckable: string;
350
350
  textColorChecked: string;
351
351
  colorCheckable: string;
352
+ colorCheckableOutline: string;
352
353
  colorHoverCheckable: string;
353
354
  colorPressedCheckable: string;
354
355
  colorChecked: string;
@@ -736,6 +737,7 @@ export declare const dynamicTagsProps: {
736
737
  textColorPressedCheckable: string;
737
738
  textColorChecked: string;
738
739
  colorCheckable: string;
740
+ colorCheckableOutline: string;
739
741
  colorHoverCheckable: string;
740
742
  colorPressedCheckable: string;
741
743
  colorChecked: string;
@@ -1123,6 +1125,7 @@ export declare const dynamicTagsProps: {
1123
1125
  textColorPressedCheckable: string;
1124
1126
  textColorChecked: string;
1125
1127
  colorCheckable: string;
1128
+ colorCheckableOutline: string;
1126
1129
  colorHoverCheckable: string;
1127
1130
  colorPressedCheckable: string;
1128
1131
  colorChecked: string;
@@ -1548,6 +1551,7 @@ declare const _default: import("vue").DefineComponent<{
1548
1551
  textColorPressedCheckable: string;
1549
1552
  textColorChecked: string;
1550
1553
  colorCheckable: string;
1554
+ colorCheckableOutline: string;
1551
1555
  colorHoverCheckable: string;
1552
1556
  colorPressedCheckable: string;
1553
1557
  colorChecked: string;
@@ -1935,6 +1939,7 @@ declare const _default: import("vue").DefineComponent<{
1935
1939
  textColorPressedCheckable: string;
1936
1940
  textColorChecked: string;
1937
1941
  colorCheckable: string;
1942
+ colorCheckableOutline: string;
1938
1943
  colorHoverCheckable: string;
1939
1944
  colorPressedCheckable: string;
1940
1945
  colorChecked: string;
@@ -2322,6 +2327,7 @@ declare const _default: import("vue").DefineComponent<{
2322
2327
  textColorPressedCheckable: string;
2323
2328
  textColorChecked: string;
2324
2329
  colorCheckable: string;
2330
+ colorCheckableOutline: string;
2325
2331
  colorHoverCheckable: string;
2326
2332
  colorPressedCheckable: string;
2327
2333
  colorChecked: string;
@@ -2742,6 +2748,7 @@ declare const _default: import("vue").DefineComponent<{
2742
2748
  textColorPressedCheckable: string;
2743
2749
  textColorChecked: string;
2744
2750
  colorCheckable: string;
2751
+ colorCheckableOutline: string;
2745
2752
  colorHoverCheckable: string;
2746
2753
  colorPressedCheckable: string;
2747
2754
  colorChecked: string;
@@ -3194,6 +3201,7 @@ declare const _default: import("vue").DefineComponent<{
3194
3201
  textColorPressedCheckable: string;
3195
3202
  textColorChecked: string;
3196
3203
  colorCheckable: string;
3204
+ colorCheckableOutline: string;
3197
3205
  colorHoverCheckable: string;
3198
3206
  colorPressedCheckable: string;
3199
3207
  colorChecked: string;
@@ -3581,6 +3589,7 @@ declare const _default: import("vue").DefineComponent<{
3581
3589
  textColorPressedCheckable: string;
3582
3590
  textColorChecked: string;
3583
3591
  colorCheckable: string;
3592
+ colorCheckableOutline: string;
3584
3593
  colorHoverCheckable: string;
3585
3594
  colorPressedCheckable: string;
3586
3595
  colorChecked: string;
@@ -3968,6 +3977,7 @@ declare const _default: import("vue").DefineComponent<{
3968
3977
  textColorPressedCheckable: string;
3969
3978
  textColorChecked: string;
3970
3979
  colorCheckable: string;
3980
+ colorCheckableOutline: string;
3971
3981
  colorHoverCheckable: string;
3972
3982
  colorPressedCheckable: string;
3973
3983
  colorChecked: string;
@@ -67,7 +67,7 @@ exports.default = (0, vue_1.defineComponent)({
67
67
  });
68
68
  function doChange(value) {
69
69
  const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
70
- const { nTriggerFormInput, nTriggerFormChange } = formItem;
70
+ const { triggerFormInput, triggerFormChange } = formItem;
71
71
  if (onChange)
72
72
  (0, _utils_1.call)(onChange, value);
73
73
  if (onUpdateValue)
@@ -75,8 +75,8 @@ exports.default = (0, vue_1.defineComponent)({
75
75
  if (_onUpdateValue)
76
76
  (0, _utils_1.call)(_onUpdateValue, value);
77
77
  uncontrolledValueRef.value = value;
78
- nTriggerFormInput();
79
- nTriggerFormChange();
78
+ triggerFormInput();
79
+ triggerFormChange();
80
80
  }
81
81
  function handleCloseClick(index) {
82
82
  const tags = mergedValueRef.value.slice(0);
@@ -309,6 +309,7 @@ declare const dynamicTagsLight: import("../../_mixins").Theme<"DynamicTags", {
309
309
  textColorPressedCheckable: string;
310
310
  textColorChecked: string;
311
311
  colorCheckable: string;
312
+ colorCheckableOutline: string;
312
313
  colorHoverCheckable: string;
313
314
  colorPressedCheckable: string;
314
315
  colorChecked: string;
@@ -273,7 +273,7 @@ exports.default = (0, vue_1.defineComponent)({
273
273
  const vm = (0, vue_1.getCurrentInstance)().proxy;
274
274
  function doUpdateValue(value) {
275
275
  const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onInput } = props;
276
- const { nTriggerFormInput } = formItem;
276
+ const { triggerFormInput } = formItem;
277
277
  if (onUpdateValue)
278
278
  (0, _utils_1.call)(onUpdateValue, value);
279
279
  if (_onUpdateValue)
@@ -281,30 +281,30 @@ exports.default = (0, vue_1.defineComponent)({
281
281
  if (onInput)
282
282
  (0, _utils_1.call)(onInput, value);
283
283
  uncontrolledValueRef.value = value;
284
- nTriggerFormInput();
284
+ triggerFormInput();
285
285
  emitDebouncedInput(value);
286
286
  }
287
287
  function doChange(value) {
288
288
  const { onChange } = props;
289
- const { nTriggerFormChange } = formItem;
289
+ const { triggerFormChange } = formItem;
290
290
  if (onChange)
291
291
  (0, _utils_1.call)(onChange, value);
292
292
  uncontrolledValueRef.value = value;
293
- nTriggerFormChange();
293
+ triggerFormChange();
294
294
  }
295
295
  function doBlur(e) {
296
296
  const { onBlur } = props;
297
- const { nTriggerFormBlur } = formItem;
297
+ const { triggerFormBlur } = formItem;
298
298
  if (onBlur)
299
299
  (0, _utils_1.call)(onBlur, e);
300
- nTriggerFormBlur();
300
+ triggerFormBlur();
301
301
  }
302
302
  function doFocus(e) {
303
303
  const { onFocus } = props;
304
- const { nTriggerFormFocus } = formItem;
304
+ const { triggerFormFocus } = formItem;
305
305
  if (onFocus)
306
306
  (0, _utils_1.call)(onFocus, e);
307
- nTriggerFormFocus();
307
+ triggerFormFocus();
308
308
  }
309
309
  function doClear(e) {
310
310
  const { onClear } = props;
@@ -120,7 +120,7 @@ exports.default = (0, vue_1.defineComponent)({
120
120
  return;
121
121
  }
122
122
  const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props;
123
- const { nTriggerFormInput, nTriggerFormChange } = formItem;
123
+ const { triggerFormInput, triggerFormChange } = formItem;
124
124
  if (onChange)
125
125
  (0, _utils_1.call)(onChange, value);
126
126
  if (onUpdateValue)
@@ -128,8 +128,8 @@ exports.default = (0, vue_1.defineComponent)({
128
128
  if (_onUpdateValue)
129
129
  (0, _utils_1.call)(_onUpdateValue, value);
130
130
  uncontrolledValueRef.value = value;
131
- nTriggerFormInput();
132
- nTriggerFormChange();
131
+ triggerFormInput();
132
+ triggerFormChange();
133
133
  };
134
134
  const deriveValueFromDisplayedValue = ({ offset, doUpdateIfValid, fixPrecision, isInputing }) => {
135
135
  const { value: displayedValue } = displayedValueRef;
@@ -240,10 +240,10 @@ exports.default = (0, vue_1.defineComponent)({
240
240
  });
241
241
  function doFocus(e) {
242
242
  const { onFocus } = props;
243
- const { nTriggerFormFocus } = formItem;
243
+ const { triggerFormFocus } = formItem;
244
244
  if (onFocus)
245
245
  (0, _utils_1.call)(onFocus, e);
246
- nTriggerFormFocus();
246
+ triggerFormFocus();
247
247
  }
248
248
  function doBlur(e) {
249
249
  var _a, _b;
@@ -278,10 +278,10 @@ exports.default = (0, vue_1.defineComponent)({
278
278
  deriveDisplayedValueFromValue();
279
279
  }
280
280
  const { onBlur } = props;
281
- const { nTriggerFormBlur } = formItem;
281
+ const { triggerFormBlur } = formItem;
282
282
  if (onBlur)
283
283
  (0, _utils_1.call)(onBlur, e);
284
- nTriggerFormBlur();
284
+ triggerFormBlur();
285
285
  // User may change value in blur callback, we make sure it will be
286
286
  // displayed. Sometimes mergedValue won't be viewed as changed
287
287
  void (0, vue_1.nextTick)(() => {
@@ -0,0 +1,3 @@
1
+ export { inputOtpProps, default as UInputOtp } from './src/InputOtp';
2
+ export type { InputOtpProps } from './src/InputOtp';
3
+ export type * from './src/public-types';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UInputOtp = exports.inputOtpProps = void 0;
7
+ var InputOtp_1 = require("./src/InputOtp");
8
+ Object.defineProperty(exports, "inputOtpProps", { enumerable: true, get: function () { return InputOtp_1.inputOtpProps; } });
9
+ Object.defineProperty(exports, "UInputOtp", { enumerable: true, get: function () { return __importDefault(InputOtp_1).default; } });