aq-fe-framework 0.1.304 → 0.1.305

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.
@@ -23,7 +23,7 @@ function MyFlexRow(_a) {
23
23
  return /* @__PURE__ */ jsx2(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
24
24
  }
25
25
 
26
- // src/core/input/DayOfWeekPicker/CoreDayOfWeekPicker.tsx
26
+ // src/core/input/CoreDayOfWeekPicker.tsx
27
27
  import { Badge, Group } from "@mantine/core";
28
28
  import { jsx as jsx3 } from "react/jsx-runtime";
29
29
  var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
@@ -8,7 +8,7 @@ import {
8
8
  CoreDayOfWeekPicker,
9
9
  MyFlexColumn,
10
10
  MyFlexRow
11
- } from "./chunk-RK2XUPT6.mjs";
11
+ } from "./chunk-DRLKXVYU.mjs";
12
12
  import {
13
13
  enum_daysOfWeek
14
14
  } from "./chunk-K6S7R6LU.mjs";
@@ -65,13 +65,13 @@ import {
65
65
  useS_BasicAppShell,
66
66
  useS_ButtonImport,
67
67
  utils_layout_getItemsWithoutLinks
68
- } from "../chunk-EPFONDHC.mjs";
68
+ } from "../chunk-ZSH3QSIH.mjs";
69
69
  import "../chunk-5U2JSHSJ.mjs";
70
70
  import "../chunk-NWBLJ3W3.mjs";
71
71
  import {
72
72
  MyFlexColumn,
73
73
  MyFlexRow
74
- } from "../chunk-RK2XUPT6.mjs";
74
+ } from "../chunk-DRLKXVYU.mjs";
75
75
  import "../chunk-K6S7R6LU.mjs";
76
76
  import "../chunk-KKJ3OEEW.mjs";
77
77
  import "../chunk-7ZCOFATU.mjs";
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { t as type_action } from '../types-B5rmBuXz.mjs';
3
- import { ActionIconProps, ButtonProps, ModalProps } from '@mantine/core';
3
+ import { ActionIconProps, ButtonProps, ModalProps, TextInputProps } from '@mantine/core';
4
4
  import { ReactNode } from 'react';
5
5
  import { M as MyApiResponse } from '../createBaseApi-BAYnbGVT.mjs';
6
6
  import { AxiosResponse } from 'axios';
@@ -49,4 +49,11 @@ interface CoreDayOfWeekPickerProps {
49
49
  }
50
50
  declare function CoreDayOfWeekPicker({ value, onChange }: CoreDayOfWeekPickerProps): react_jsx_runtime.JSX.Element;
51
51
 
52
- export { CoreActionIcon, CoreButton, CoreButtonCreateUpdate, CoreButtonModal, CoreDayOfWeekPicker };
52
+ interface CoreTextInputProps extends TextInputProps {
53
+ label?: string;
54
+ defaultValue?: string;
55
+ isPhoneNumber?: boolean;
56
+ }
57
+ declare function CoreTextInput({ label, isPhoneNumber, ...rest }: CoreTextInputProps): react_jsx_runtime.JSX.Element;
58
+
59
+ export { CoreActionIcon, CoreButton, CoreButtonCreateUpdate, CoreButtonModal, CoreDayOfWeekPicker, CoreTextInput };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CoreDayOfWeekPicker,
3
3
  MyFlexColumn
4
- } from "../chunk-RK2XUPT6.mjs";
4
+ } from "../chunk-DRLKXVYU.mjs";
5
5
  import "../chunk-K6S7R6LU.mjs";
6
6
  import {
7
7
  useMyReactMutation
@@ -282,10 +282,43 @@ function CoreButtonModal({
282
282
  )
283
283
  ] });
284
284
  }
285
+
286
+ // src/core/input/CoreTextInput.tsx
287
+ import { TextInput } from "@mantine/core";
288
+ import { jsx as jsx5 } from "react/jsx-runtime";
289
+ function CoreTextInput(_a) {
290
+ var _b = _a, { label, isPhoneNumber } = _b, rest = __objRest(_b, ["label", "isPhoneNumber"]);
291
+ return /* @__PURE__ */ jsx5(
292
+ TextInput,
293
+ __spreadValues({
294
+ onKeyDown: (e) => {
295
+ if (!isPhoneNumber) return;
296
+ const allowedKeys = [
297
+ "Backspace",
298
+ "Tab",
299
+ "ArrowLeft",
300
+ "ArrowRight",
301
+ "Delete",
302
+ "+",
303
+ "-",
304
+ "(",
305
+ ")",
306
+ " "
307
+ // các ký tự đặc biệt cho số điện thoại
308
+ ];
309
+ if (!/[0-9]/.test(e.key) && !allowedKeys.includes(e.key)) {
310
+ e.preventDefault();
311
+ }
312
+ },
313
+ placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : ""
314
+ }, rest)
315
+ );
316
+ }
285
317
  export {
286
318
  CoreActionIcon,
287
319
  CoreButton,
288
320
  CoreButtonCreateUpdate,
289
321
  CoreButtonModal,
290
- CoreDayOfWeekPicker
322
+ CoreDayOfWeekPicker,
323
+ CoreTextInput
291
324
  };
@@ -30,7 +30,7 @@ import {
30
30
  useS_BasicAppShell,
31
31
  useS_authenticate,
32
32
  utils_layout_getItemsWithoutLinks
33
- } from "../chunk-EPFONDHC.mjs";
33
+ } from "../chunk-ZSH3QSIH.mjs";
34
34
  import "../chunk-5U2JSHSJ.mjs";
35
35
  import {
36
36
  const_object_documentTypes
@@ -38,13 +38,13 @@ import {
38
38
  import {
39
39
  const_object_colors
40
40
  } from "../chunk-NWBLJ3W3.mjs";
41
- import {
42
- MyFlexColumn,
43
- MyFlexRow
44
- } from "../chunk-RK2XUPT6.mjs";
45
41
  import {
46
42
  enum_emailConfigModule
47
43
  } from "../chunk-VH4ZAD6M.mjs";
44
+ import {
45
+ MyFlexColumn,
46
+ MyFlexRow
47
+ } from "../chunk-DRLKXVYU.mjs";
48
48
  import "../chunk-K6S7R6LU.mjs";
49
49
  import {
50
50
  baseAxios_default,
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "types": "./dist/core/index.d.mts"
39
39
  }
40
40
  },
41
- "version": "0.1.304",
41
+ "version": "0.1.305",
42
42
  "private": false,
43
43
  "files": [
44
44
  "dist"