@yr3/ui 1.0.3 → 1.0.5
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/components/Calendar/calendar.css +5 -3
- package/dist/components/Calendar/calendar.css.map +1 -1
- package/dist/components/Input/input.css +0 -18
- package/dist/components/Input/input.css.map +1 -1
- package/dist/components/Places/places.css +19 -0
- package/dist/components/Places/places.css.map +1 -0
- package/dist/index.cjs +366 -95
- package/dist/index.d.cts +87 -31
- package/dist/index.d.ts +87 -31
- package/dist/index.js +363 -95
- package/dist/styles/index.css +110 -21
- package/dist/styles/index.css.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import { SVGProps, CSSProperties } from 'react';
|
|
3
3
|
import * as csstype from 'csstype';
|
|
4
|
+
import { Place } from '@yr3/autocomplete-places';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
6
|
import { Dayjs } from 'dayjs';
|
|
6
7
|
|
|
@@ -1287,6 +1288,24 @@ type ImageProps = {
|
|
|
1287
1288
|
};
|
|
1288
1289
|
declare const Image: React$1.FC<ImageProps>;
|
|
1289
1290
|
|
|
1291
|
+
type Props = {
|
|
1292
|
+
onChange?: (files: File[]) => void;
|
|
1293
|
+
multiple?: boolean;
|
|
1294
|
+
ui?: UIProps;
|
|
1295
|
+
bordered?: boolean;
|
|
1296
|
+
style?: React$1.CSSProperties;
|
|
1297
|
+
component?: React$1.ReactNode;
|
|
1298
|
+
defaultImage?: string;
|
|
1299
|
+
variant?: 'base' | 'outlined';
|
|
1300
|
+
propsComponent?: {
|
|
1301
|
+
box?: Omit<BoxProps, 'children'>;
|
|
1302
|
+
text?: Omit<TextProps, 'children' | 'as'> & {
|
|
1303
|
+
primary?: string;
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
declare const ImageDropzone: React$1.FC<Props>;
|
|
1308
|
+
|
|
1290
1309
|
type LabelProps = {
|
|
1291
1310
|
display?: boolean;
|
|
1292
1311
|
text?: string;
|
|
@@ -1379,36 +1398,6 @@ type PhoneInputProps = {
|
|
|
1379
1398
|
};
|
|
1380
1399
|
declare const Phone: React$1.FC<PhoneInputProps>;
|
|
1381
1400
|
|
|
1382
|
-
type PlaceData = {
|
|
1383
|
-
name: string;
|
|
1384
|
-
address: string;
|
|
1385
|
-
city: string;
|
|
1386
|
-
country: string;
|
|
1387
|
-
zip: string;
|
|
1388
|
-
lat: number;
|
|
1389
|
-
lng: number;
|
|
1390
|
-
placeId?: string;
|
|
1391
|
-
};
|
|
1392
|
-
|
|
1393
|
-
type ModalContainerProps = {
|
|
1394
|
-
children?: React$1.ReactNode;
|
|
1395
|
-
size?: 'sm' | 'md' | 'lg';
|
|
1396
|
-
ui?: UIProps;
|
|
1397
|
-
style?: React$1.CSSProperties;
|
|
1398
|
-
};
|
|
1399
|
-
declare const ModalContainer: React$1.FC<ModalContainerProps>;
|
|
1400
|
-
|
|
1401
|
-
type ModalProps = {
|
|
1402
|
-
open?: boolean;
|
|
1403
|
-
onClose?: () => void;
|
|
1404
|
-
children?: React$1.ReactNode;
|
|
1405
|
-
propsComponent?: {
|
|
1406
|
-
container?: Omit<ModalContainerProps, 'children'>;
|
|
1407
|
-
close?: React$1.ReactNode;
|
|
1408
|
-
};
|
|
1409
|
-
};
|
|
1410
|
-
declare const Modal: React$1.FC<ModalProps>;
|
|
1411
|
-
|
|
1412
1401
|
declare const bem: (block: string) => (element?: string, modifiers?: Record<string, any>) => string;
|
|
1413
1402
|
declare const bemMerge: (...args: any[]) => string;
|
|
1414
1403
|
|
|
@@ -1453,6 +1442,48 @@ type VariantConfig = {
|
|
|
1453
1442
|
};
|
|
1454
1443
|
declare const createVariants: (config: VariantConfig) => (props?: Record<string, any>) => string;
|
|
1455
1444
|
|
|
1445
|
+
type InputAreaVariant = 'filled' | 'outlined' | 'base' | 'lined';
|
|
1446
|
+
type InputAreaProps = {
|
|
1447
|
+
value?: string;
|
|
1448
|
+
defaultValue?: string;
|
|
1449
|
+
variant?: InputAreaVariant;
|
|
1450
|
+
label?: string;
|
|
1451
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
1452
|
+
onChange?: (e: React$1.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
1453
|
+
rows?: number;
|
|
1454
|
+
color?: keyof Theme['colors'];
|
|
1455
|
+
maxLength?: number;
|
|
1456
|
+
validate?: boolean;
|
|
1457
|
+
rich?: boolean;
|
|
1458
|
+
ui?: UIProps;
|
|
1459
|
+
rounded?: boolean;
|
|
1460
|
+
style?: React$1.CSSProperties;
|
|
1461
|
+
propsComponent?: {
|
|
1462
|
+
label?: LabelProps;
|
|
1463
|
+
helperText?: string;
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1466
|
+
declare const InputArea: React$1.FC<InputAreaProps>;
|
|
1467
|
+
|
|
1468
|
+
type ModalContainerProps = {
|
|
1469
|
+
children?: React$1.ReactNode;
|
|
1470
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1471
|
+
ui?: UIProps;
|
|
1472
|
+
style?: React$1.CSSProperties;
|
|
1473
|
+
};
|
|
1474
|
+
declare const ModalContainer: React$1.FC<ModalContainerProps>;
|
|
1475
|
+
|
|
1476
|
+
type ModalProps = {
|
|
1477
|
+
open?: boolean;
|
|
1478
|
+
onClose?: () => void;
|
|
1479
|
+
children?: React$1.ReactNode;
|
|
1480
|
+
propsComponent?: {
|
|
1481
|
+
container?: Omit<ModalContainerProps, 'children'>;
|
|
1482
|
+
close?: React$1.ReactNode;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
declare const Modal: React$1.FC<ModalProps>;
|
|
1486
|
+
|
|
1456
1487
|
type NotistackAnchorProps = {
|
|
1457
1488
|
vertical: 'top' | 'bottom';
|
|
1458
1489
|
horizontal: 'left' | 'center' | 'right';
|
|
@@ -1492,6 +1523,31 @@ type PendingProps = {
|
|
|
1492
1523
|
};
|
|
1493
1524
|
declare const Pending: React.FC<PendingProps>;
|
|
1494
1525
|
|
|
1526
|
+
interface PlaceData extends Place {
|
|
1527
|
+
placeId: string;
|
|
1528
|
+
}
|
|
1529
|
+
type PropsPlaces = {
|
|
1530
|
+
onSelect: (place: PlaceData) => void;
|
|
1531
|
+
onChangeForm?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
1532
|
+
language?: string;
|
|
1533
|
+
defaultLocation?: string;
|
|
1534
|
+
propsComponent?: {
|
|
1535
|
+
label?: Omit<LabelProps, 'children'> & {
|
|
1536
|
+
display?: boolean;
|
|
1537
|
+
};
|
|
1538
|
+
control?: Omit<ControlProps, 'children'>;
|
|
1539
|
+
input?: Omit<InputProps, 'onChange' | 'value'>;
|
|
1540
|
+
menu?: {
|
|
1541
|
+
ui?: UIProps;
|
|
1542
|
+
style?: React$1.CSSProperties;
|
|
1543
|
+
text?: Omit<TextProps, 'children'>;
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1546
|
+
provider?: 'google' | 'mapbox';
|
|
1547
|
+
keyApi?: string;
|
|
1548
|
+
};
|
|
1549
|
+
declare const PlacesAutocomplete: React$1.FC<PropsPlaces>;
|
|
1550
|
+
|
|
1495
1551
|
type RadioVariant = 'circle' | 'square';
|
|
1496
1552
|
type RadioProps = {
|
|
1497
1553
|
checked?: boolean;
|
|
@@ -1598,4 +1654,4 @@ declare const IconDown: React.FC<IconProps>;
|
|
|
1598
1654
|
|
|
1599
1655
|
declare const useClickAway: (ref: any, callback: any) => void;
|
|
1600
1656
|
|
|
1601
|
-
export { Avatar, type AvatarProps, Backdrop, BackdropContext, type BackdropContextType, BackdropProvider, Box, type BoxProps, Button, type ButtonProps, Calendar, type CalendarComponentProps, type CalendarDayProps, type CalendarProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Collapse, type CollapseProps, Container, type ContainerProps, Control, ControlContext, type ControlProps, type ControlVariants, Divider, type DividerProps, Drawer, type DrawerProps, Fade, type FadeProps, Flex, type FlexProps, Grid, type GridProps, Group, type GroupProps, type GroupsVariant, IconClose, IconDown, IconSearch, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Modal, ModalContainer, type ModalContainerProps, type ModalProps, Notistack, type NotistackAnchorProps, type NotistackProps, NotistackProvider, type Option, Pending, type PendingProps, Phone, type PhoneInputProps, type PlaceData, Radio, type RadioVariant, Select, type SelectChangeEvent, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, Text, type TextProps, type TextVariant, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getMonthCalendar, initTheme, isEmpty, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
|
|
1657
|
+
export { Avatar, type AvatarProps, Backdrop, BackdropContext, type BackdropContextType, BackdropProvider, Box, type BoxProps, Button, type ButtonProps, Calendar, type CalendarComponentProps, type CalendarDayProps, type CalendarProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Collapse, type CollapseProps, Container, type ContainerProps, Control, ControlContext, type ControlProps, type ControlVariants, Divider, type DividerProps, Drawer, type DrawerProps, Fade, type FadeProps, Flex, type FlexProps, Grid, type GridProps, Group, type GroupProps, type GroupsVariant, IconClose, IconDown, IconSearch, Image, ImageDropzone, type ImageProps, Input, InputArea, type InputAreaProps, type InputAreaVariant, type InputProps, Label, type LabelProps, Modal, ModalContainer, type ModalContainerProps, type ModalProps, Notistack, type NotistackAnchorProps, type NotistackProps, NotistackProvider, type Option, Pending, type PendingProps, Phone, type PhoneInputProps, type PlaceData, PlacesAutocomplete, type PropsPlaces, Radio, type RadioVariant, Select, type SelectChangeEvent, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, Text, type TextProps, type TextVariant, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getMonthCalendar, initTheme, isEmpty, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import { SVGProps, CSSProperties } from 'react';
|
|
3
3
|
import * as csstype from 'csstype';
|
|
4
|
+
import { Place } from '@yr3/autocomplete-places';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
6
|
import { Dayjs } from 'dayjs';
|
|
6
7
|
|
|
@@ -1287,6 +1288,24 @@ type ImageProps = {
|
|
|
1287
1288
|
};
|
|
1288
1289
|
declare const Image: React$1.FC<ImageProps>;
|
|
1289
1290
|
|
|
1291
|
+
type Props = {
|
|
1292
|
+
onChange?: (files: File[]) => void;
|
|
1293
|
+
multiple?: boolean;
|
|
1294
|
+
ui?: UIProps;
|
|
1295
|
+
bordered?: boolean;
|
|
1296
|
+
style?: React$1.CSSProperties;
|
|
1297
|
+
component?: React$1.ReactNode;
|
|
1298
|
+
defaultImage?: string;
|
|
1299
|
+
variant?: 'base' | 'outlined';
|
|
1300
|
+
propsComponent?: {
|
|
1301
|
+
box?: Omit<BoxProps, 'children'>;
|
|
1302
|
+
text?: Omit<TextProps, 'children' | 'as'> & {
|
|
1303
|
+
primary?: string;
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
declare const ImageDropzone: React$1.FC<Props>;
|
|
1308
|
+
|
|
1290
1309
|
type LabelProps = {
|
|
1291
1310
|
display?: boolean;
|
|
1292
1311
|
text?: string;
|
|
@@ -1379,36 +1398,6 @@ type PhoneInputProps = {
|
|
|
1379
1398
|
};
|
|
1380
1399
|
declare const Phone: React$1.FC<PhoneInputProps>;
|
|
1381
1400
|
|
|
1382
|
-
type PlaceData = {
|
|
1383
|
-
name: string;
|
|
1384
|
-
address: string;
|
|
1385
|
-
city: string;
|
|
1386
|
-
country: string;
|
|
1387
|
-
zip: string;
|
|
1388
|
-
lat: number;
|
|
1389
|
-
lng: number;
|
|
1390
|
-
placeId?: string;
|
|
1391
|
-
};
|
|
1392
|
-
|
|
1393
|
-
type ModalContainerProps = {
|
|
1394
|
-
children?: React$1.ReactNode;
|
|
1395
|
-
size?: 'sm' | 'md' | 'lg';
|
|
1396
|
-
ui?: UIProps;
|
|
1397
|
-
style?: React$1.CSSProperties;
|
|
1398
|
-
};
|
|
1399
|
-
declare const ModalContainer: React$1.FC<ModalContainerProps>;
|
|
1400
|
-
|
|
1401
|
-
type ModalProps = {
|
|
1402
|
-
open?: boolean;
|
|
1403
|
-
onClose?: () => void;
|
|
1404
|
-
children?: React$1.ReactNode;
|
|
1405
|
-
propsComponent?: {
|
|
1406
|
-
container?: Omit<ModalContainerProps, 'children'>;
|
|
1407
|
-
close?: React$1.ReactNode;
|
|
1408
|
-
};
|
|
1409
|
-
};
|
|
1410
|
-
declare const Modal: React$1.FC<ModalProps>;
|
|
1411
|
-
|
|
1412
1401
|
declare const bem: (block: string) => (element?: string, modifiers?: Record<string, any>) => string;
|
|
1413
1402
|
declare const bemMerge: (...args: any[]) => string;
|
|
1414
1403
|
|
|
@@ -1453,6 +1442,48 @@ type VariantConfig = {
|
|
|
1453
1442
|
};
|
|
1454
1443
|
declare const createVariants: (config: VariantConfig) => (props?: Record<string, any>) => string;
|
|
1455
1444
|
|
|
1445
|
+
type InputAreaVariant = 'filled' | 'outlined' | 'base' | 'lined';
|
|
1446
|
+
type InputAreaProps = {
|
|
1447
|
+
value?: string;
|
|
1448
|
+
defaultValue?: string;
|
|
1449
|
+
variant?: InputAreaVariant;
|
|
1450
|
+
label?: string;
|
|
1451
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
1452
|
+
onChange?: (e: React$1.ChangeEvent<HTMLTextAreaElement>, value: string) => void;
|
|
1453
|
+
rows?: number;
|
|
1454
|
+
color?: keyof Theme['colors'];
|
|
1455
|
+
maxLength?: number;
|
|
1456
|
+
validate?: boolean;
|
|
1457
|
+
rich?: boolean;
|
|
1458
|
+
ui?: UIProps;
|
|
1459
|
+
rounded?: boolean;
|
|
1460
|
+
style?: React$1.CSSProperties;
|
|
1461
|
+
propsComponent?: {
|
|
1462
|
+
label?: LabelProps;
|
|
1463
|
+
helperText?: string;
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1466
|
+
declare const InputArea: React$1.FC<InputAreaProps>;
|
|
1467
|
+
|
|
1468
|
+
type ModalContainerProps = {
|
|
1469
|
+
children?: React$1.ReactNode;
|
|
1470
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1471
|
+
ui?: UIProps;
|
|
1472
|
+
style?: React$1.CSSProperties;
|
|
1473
|
+
};
|
|
1474
|
+
declare const ModalContainer: React$1.FC<ModalContainerProps>;
|
|
1475
|
+
|
|
1476
|
+
type ModalProps = {
|
|
1477
|
+
open?: boolean;
|
|
1478
|
+
onClose?: () => void;
|
|
1479
|
+
children?: React$1.ReactNode;
|
|
1480
|
+
propsComponent?: {
|
|
1481
|
+
container?: Omit<ModalContainerProps, 'children'>;
|
|
1482
|
+
close?: React$1.ReactNode;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
declare const Modal: React$1.FC<ModalProps>;
|
|
1486
|
+
|
|
1456
1487
|
type NotistackAnchorProps = {
|
|
1457
1488
|
vertical: 'top' | 'bottom';
|
|
1458
1489
|
horizontal: 'left' | 'center' | 'right';
|
|
@@ -1492,6 +1523,31 @@ type PendingProps = {
|
|
|
1492
1523
|
};
|
|
1493
1524
|
declare const Pending: React.FC<PendingProps>;
|
|
1494
1525
|
|
|
1526
|
+
interface PlaceData extends Place {
|
|
1527
|
+
placeId: string;
|
|
1528
|
+
}
|
|
1529
|
+
type PropsPlaces = {
|
|
1530
|
+
onSelect: (place: PlaceData) => void;
|
|
1531
|
+
onChangeForm?: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
1532
|
+
language?: string;
|
|
1533
|
+
defaultLocation?: string;
|
|
1534
|
+
propsComponent?: {
|
|
1535
|
+
label?: Omit<LabelProps, 'children'> & {
|
|
1536
|
+
display?: boolean;
|
|
1537
|
+
};
|
|
1538
|
+
control?: Omit<ControlProps, 'children'>;
|
|
1539
|
+
input?: Omit<InputProps, 'onChange' | 'value'>;
|
|
1540
|
+
menu?: {
|
|
1541
|
+
ui?: UIProps;
|
|
1542
|
+
style?: React$1.CSSProperties;
|
|
1543
|
+
text?: Omit<TextProps, 'children'>;
|
|
1544
|
+
};
|
|
1545
|
+
};
|
|
1546
|
+
provider?: 'google' | 'mapbox';
|
|
1547
|
+
keyApi?: string;
|
|
1548
|
+
};
|
|
1549
|
+
declare const PlacesAutocomplete: React$1.FC<PropsPlaces>;
|
|
1550
|
+
|
|
1495
1551
|
type RadioVariant = 'circle' | 'square';
|
|
1496
1552
|
type RadioProps = {
|
|
1497
1553
|
checked?: boolean;
|
|
@@ -1598,4 +1654,4 @@ declare const IconDown: React.FC<IconProps>;
|
|
|
1598
1654
|
|
|
1599
1655
|
declare const useClickAway: (ref: any, callback: any) => void;
|
|
1600
1656
|
|
|
1601
|
-
export { Avatar, type AvatarProps, Backdrop, BackdropContext, type BackdropContextType, BackdropProvider, Box, type BoxProps, Button, type ButtonProps, Calendar, type CalendarComponentProps, type CalendarDayProps, type CalendarProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Collapse, type CollapseProps, Container, type ContainerProps, Control, ControlContext, type ControlProps, type ControlVariants, Divider, type DividerProps, Drawer, type DrawerProps, Fade, type FadeProps, Flex, type FlexProps, Grid, type GridProps, Group, type GroupProps, type GroupsVariant, IconClose, IconDown, IconSearch, Image, type ImageProps, Input, type InputProps, Label, type LabelProps, Modal, ModalContainer, type ModalContainerProps, type ModalProps, Notistack, type NotistackAnchorProps, type NotistackProps, NotistackProvider, type Option, Pending, type PendingProps, Phone, type PhoneInputProps, type PlaceData, Radio, type RadioVariant, Select, type SelectChangeEvent, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, Text, type TextProps, type TextVariant, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getMonthCalendar, initTheme, isEmpty, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
|
|
1657
|
+
export { Avatar, type AvatarProps, Backdrop, BackdropContext, type BackdropContextType, BackdropProvider, Box, type BoxProps, Button, type ButtonProps, Calendar, type CalendarComponentProps, type CalendarDayProps, type CalendarProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Collapse, type CollapseProps, Container, type ContainerProps, Control, ControlContext, type ControlProps, type ControlVariants, Divider, type DividerProps, Drawer, type DrawerProps, Fade, type FadeProps, Flex, type FlexProps, Grid, type GridProps, Group, type GroupProps, type GroupsVariant, IconClose, IconDown, IconSearch, Image, ImageDropzone, type ImageProps, Input, InputArea, type InputAreaProps, type InputAreaVariant, type InputProps, Label, type LabelProps, Modal, ModalContainer, type ModalContainerProps, type ModalProps, Notistack, type NotistackAnchorProps, type NotistackProps, NotistackProvider, type Option, Pending, type PendingProps, Phone, type PhoneInputProps, type PlaceData, PlacesAutocomplete, type PropsPlaces, Radio, type RadioVariant, Select, type SelectChangeEvent, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, Text, type TextProps, type TextVariant, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getMonthCalendar, initTheme, isEmpty, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
|