@cwncollab-org/mui-component-kit 0.0.7 → 0.0.9
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/form/TextField.d.ts +5 -0
- package/dist/form/TextField.d.ts.map +1 -1
- package/dist/form/TextField.js +15 -2
- package/dist/form/TextField.js.map +1 -1
- package/dist/form/index.d.ts +12 -0
- package/dist/form/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/form/TextField.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
3
|
export type TextFieldProps = Omit<MuiTextFieldProps, 'name' | 'value'> & {
|
|
3
4
|
labelShrink?: boolean;
|
|
5
|
+
min?: InputHTMLAttributes<HTMLInputElement>['min'];
|
|
6
|
+
max?: InputHTMLAttributes<HTMLInputElement>['max'];
|
|
7
|
+
maxLength?: InputHTMLAttributes<HTMLInputElement>['maxLength'];
|
|
8
|
+
pattern?: InputHTMLAttributes<HTMLInputElement>['pattern'];
|
|
4
9
|
};
|
|
5
10
|
export declare function TextField(props: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
6
11
|
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../src/lib/form/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,IAAI,iBAAiB,EACpC,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../src/lib/form/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,IAAI,iBAAiB,EACpC,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,mBAAmB,EAAW,MAAM,OAAO,CAAA;AAEpD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,GAAG,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,CAAA;IAClD,GAAG,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,CAAA;IAClD,SAAS,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,WAAW,CAAC,CAAA;IAC9D,OAAO,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAA;CAC3D,CAAA;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAwD9C"}
|
package/dist/form/TextField.js
CHANGED
|
@@ -3,7 +3,7 @@ import { TextField as MuiTextField, } from '@mui/material';
|
|
|
3
3
|
import { useFieldContext } from './formContext';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
export function TextField(props) {
|
|
6
|
-
const { label, slotProps,
|
|
6
|
+
const { labelShrink, min, max, maxLength, pattern, label, slotProps, onChange, helperText = '', ...rest } = props;
|
|
7
7
|
const field = useFieldContext();
|
|
8
8
|
const errorText = useMemo(() => {
|
|
9
9
|
if (field.state.meta.errors.length === 0)
|
|
@@ -17,8 +17,21 @@ export function TextField(props) {
|
|
|
17
17
|
field.handleChange(ev.target.value === '' ? null : ev.target.value);
|
|
18
18
|
}
|
|
19
19
|
}, slotProps: {
|
|
20
|
-
inputLabel: { shrink: labelShrink },
|
|
21
20
|
...slotProps,
|
|
21
|
+
inputLabel: { ...slotProps?.inputLabel, shrink: labelShrink },
|
|
22
|
+
input: {
|
|
23
|
+
...slotProps?.input,
|
|
24
|
+
slotProps: {
|
|
25
|
+
...slotProps?.input?.slotProps,
|
|
26
|
+
input: {
|
|
27
|
+
...slotProps?.input?.slotProps?.input,
|
|
28
|
+
min: min,
|
|
29
|
+
max: max,
|
|
30
|
+
maxLength: maxLength,
|
|
31
|
+
pattern: pattern,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
22
35
|
}, error: error, helperText: error ? errorText : helperText, ...rest }));
|
|
23
36
|
}
|
|
24
37
|
//# sourceMappingURL=TextField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../src/lib/form/TextField.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,IAAI,YAAY,GAE1B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../src/lib/form/TextField.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,IAAI,YAAY,GAE1B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAuB,OAAO,EAAE,MAAM,OAAO,CAAA;AAUpD,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EACJ,WAAW,EACX,GAAG,EACH,GAAG,EACH,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,UAAU,GAAG,EAAE,EACf,GAAG,IAAI,EACR,GAAG,KAAK,CAAA;IACT,MAAM,KAAK,GAAG,eAAe,EAA6B,CAAA;IAE1D,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QACrD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IA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ACR,CACH,CAAA;AACH,CAAC"}
|
package/dist/form/index.d.ts
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
export { useAppForm, withForm } from './formHooks';
|
|
2
|
+
export { type CheckboxProps } from './Checkbox';
|
|
3
|
+
export { type DatePickerProps } from './DatePicker';
|
|
4
|
+
export { type MultiSelectProps } from './MultiSelect';
|
|
5
|
+
export { type SelectProps } from './Select';
|
|
6
|
+
export { type TextFieldProps } from './TextField';
|
|
7
|
+
export { type TimePickerProps } from './TimePicker';
|
|
8
|
+
export { type SubscribeCheckboxProps } from './SubscribeCheckbox';
|
|
9
|
+
export { type SubscribeDatePickerProps } from './SubscribeDatePicker';
|
|
10
|
+
export { type SubscribeMultiSelectProps } from './SubscribeMultiSelect';
|
|
11
|
+
export { type SubscribeSelectProps } from './SubscribeSelect';
|
|
12
|
+
export { type SubscribeTextFieldProps } from './SubscribeTextField';
|
|
13
|
+
export { type SubscribeTimePickerProps } from './SubscribeTimePicker';
|
|
2
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DialogsProvider, DialogCloseButton, useDialogs, type DialogProps, type DialogResult, } from './dialogs';
|
|
2
|
-
export { useAppForm, withForm } from './form';
|
|
2
|
+
export { useAppForm, withForm, type CheckboxProps, type DatePickerProps, type MultiSelectProps, type SelectProps, type TextFieldProps, type TimePickerProps, type SubscribeCheckboxProps, type SubscribeDatePickerProps, type SubscribeMultiSelectProps, type SubscribeSelectProps, type SubscribeTextFieldProps, type SubscribeTimePickerProps, } from './form';
|
|
3
3
|
export { RouterTab, TabLabel, useRouterTabsValue } from './tabs';
|
|
4
4
|
export { useMaterialRouterTable, tableSearchSchema } from './table';
|
|
5
5
|
export { useConfirmDialog, useConfirmDeleteDialog } from './common-dialogs';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,UAAU,EACV,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DialogsProvider, DialogCloseButton, useDialogs, } from './dialogs';
|
|
2
|
-
export { useAppForm, withForm } from './form';
|
|
2
|
+
export { useAppForm, withForm, } from './form';
|
|
3
3
|
export { RouterTab, TabLabel, useRouterTabsValue } from './tabs';
|
|
4
4
|
export { useMaterialRouterTable, tableSearchSchema } from './table';
|
|
5
5
|
export { useConfirmDialog, useConfirmDeleteDialog } from './common-dialogs';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,GAGX,MAAM,WAAW,CAAA;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,GAGX,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,UAAU,EACV,QAAQ,GAaT,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA"}
|