@zydon/common 2.0.29 → 2.0.31
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a
|
|
1
|
+
import { a } from '../../chunk-D27ND54J.js';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import d from '@mui/material/Box';
|
|
4
|
-
import { styled, useTheme } from '@mui/material/styles';
|
|
4
|
+
import { styled, lighten, useTheme } from '@mui/material/styles';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var l={root:"mnl__label__root",icon:"mnl__label__icon"};var i=styled(d)(({theme:o,ownerState:{color:r,variant:t}})=>{let e={...r==="default"&&{...t==="filled"&&{color:o.vars.palette.common.white,backgroundColor:o.vars.palette.text.primary,[a.dark]:{color:o.vars.palette.grey[800]}},...t==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette.text.primary,border:`2px solid ${o.vars.palette.text.primary}`},...t==="soft"&&{color:o.vars.palette.text.secondary,
|
|
7
|
+
var l={root:"mnl__label__root",icon:"mnl__label__icon"};var i=styled(d)(({theme:o,ownerState:{color:r,variant:t}})=>{let e={...r==="default"&&{...t==="filled"&&{color:o.vars.palette.common.white,backgroundColor:o.vars.palette.text.primary,[a.dark]:{color:o.vars.palette.grey[800]}},...t==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette.text.primary,border:`2px solid ${o.vars.palette.text.primary}`},...t==="soft"&&{color:o.vars.palette.text.secondary,border:`1px solid ${lighten(o.palette.grey[500],.32)}`},...t==="inverted"&&{color:o.vars.palette.grey[800],backgroundColor:o.vars.palette.grey[300]}}},a$1={...r!=="default"&&{...t==="filled"&&{color:o.vars.palette[r].contrastText,backgroundColor:o.vars.palette[r].main},...t==="outlined"&&{backgroundColor:"transparent",color:o.vars.palette[r].main,border:`2px solid ${o.vars.palette[r].main}`},...t==="soft"&&{color:o.vars.palette[r].dark,backgroundColor:lighten(o.vars.palette[r].main,.84),[a.dark]:{color:o.vars.palette[r].light}},...t==="inverted"&&{color:o.vars.palette[r].darker,backgroundColor:o.vars.palette[r].lighter}}};return {height:24,minWidth:24,lineHeight:0,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",padding:o.spacing(0,.75),fontSize:o.typography.pxToRem(12),fontWeight:o.typography.fontWeightBold,borderRadius:o.shape.borderRadius*.75,transition:o.transitions.create("all",{duration:o.transitions.duration.shorter}),...e,...a$1}});var L=o=>o.charAt(0).toUpperCase()+o.slice(1),f=forwardRef(({children:o,color:r="default",variant:t="soft",startIcon:e,endIcon:a,sx:m,...b},g)=>{let y=useTheme(),p={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return jsxs(i,{ref:g,component:"span",className:l.root,ownerState:{color:r,variant:t},sx:{...e&&{pl:.75},...a&&{pr:.75},...m},theme:y,...b,children:[e&&jsx(d,{component:"span",className:l.icon,sx:{mr:.75,...p},children:e}),typeof o=="string"?L(o):o,a&&jsx(d,{component:"span",className:l.icon,sx:{ml:.75,...p},children:a})]})});f.displayName="Label";var H=f;
|
|
8
8
|
|
|
9
9
|
export { H as default };
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TimePickerProps as TimePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
4
|
+
import { Dayjs } from 'dayjs';
|
|
5
|
+
|
|
6
|
+
type TimePickerProps = Omit<TimePickerProps$1<Dayjs>, 'value' | 'onChange'> & {
|
|
7
|
+
tabIndex?: number;
|
|
8
|
+
helperText?: ReactNode;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
value?: Date | null | undefined;
|
|
11
|
+
onChange(value: Date | null | undefined): void;
|
|
12
|
+
};
|
|
6
13
|
|
|
7
14
|
declare const TimePicker: ({ value, onChange, tabIndex, helperText, required, ...other }: TimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
8
15
|
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { TimePickerProps } from '../../../types/timePickerProps.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@mui/x-date-pickers-pro';
|
|
5
|
+
import 'dayjs';
|
|
6
|
+
import '../../../types/baseField.js';
|
|
6
7
|
import 'react-hook-form';
|
|
7
8
|
|
|
8
|
-
type TimePickerProps = BaseField<Omit<TimePickerProps$1<Dayjs>, 'components' | 'value' | 'onChange'>> & {
|
|
9
|
-
tabIndex?: number;
|
|
10
|
-
helperText?: ReactNode;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
value?: Date | null | undefined;
|
|
13
|
-
onChange?(value: Date | null | undefined): void;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
9
|
declare const TimePicker: ({ name, rules, tabIndex, helperText, required, ...other }: TimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
17
10
|
|
|
18
11
|
export { TimePicker as default };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TimePickerProps as TimePickerProps$1 } from '@mui/x-date-pickers-pro';
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
|
+
import { BaseField } from './baseField.js';
|
|
5
|
+
import 'react-hook-form';
|
|
4
6
|
|
|
5
|
-
type TimePickerProps = Omit<TimePickerProps$1<Dayjs>, 'value' | 'onChange'
|
|
7
|
+
type TimePickerProps = BaseField<Omit<TimePickerProps$1<Dayjs>, 'components' | 'value' | 'onChange'>> & {
|
|
6
8
|
tabIndex?: number;
|
|
7
9
|
helperText?: ReactNode;
|
|
8
10
|
required?: boolean;
|
|
9
11
|
value?: Date | null | undefined;
|
|
10
|
-
onChange(value: Date | null | undefined): void;
|
|
12
|
+
onChange?(value: Date | null | undefined): void;
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
export { TimePickerProps };
|