@yr3/ui 1.0.6 → 1.0.8

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/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { Place } from '@yr3/autocomplete-places';
2
- export * from '@yr3/autocomplete-places';
3
1
  import * as React$1 from 'react';
4
2
  import { SVGProps, CSSProperties } from 'react';
5
3
  import * as csstype from 'csstype';
4
+ import * as _yr3_autocomplete_places from '@yr3/autocomplete-places';
5
+ import { Place, Provider } from '@yr3/autocomplete-places';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { Dayjs } from 'dayjs';
8
8
 
@@ -1012,11 +1012,12 @@ type BoxProps = {
1012
1012
  declare const Box: React$1.FC<BoxProps>;
1013
1013
 
1014
1014
  type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'title' | 'subtitle' | 'body1' | 'body2' | 'caption' | 'button' | 'helper' | 'inherit' | 'code';
1015
+ type TextWeight = 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black' | 'thin';
1015
1016
  type TextProps = {
1016
1017
  children?: React$1.ReactNode;
1017
1018
  variant?: TextVariant;
1018
1019
  color?: keyof Theme['colors'];
1019
- weight?: 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black' | 'thin';
1020
+ weight?: TextWeight;
1020
1021
  as?: keyof React$1.JSX.IntrinsicElements;
1021
1022
  gutters?: number[];
1022
1023
  ui?: UIProps;
@@ -1101,6 +1102,7 @@ type CalendarProps = {
1101
1102
  bordered?: boolean;
1102
1103
  ui?: UIProps;
1103
1104
  style?: React$1.CSSProperties;
1105
+ component?: React$1.ReactNode;
1104
1106
  };
1105
1107
  month?: {
1106
1108
  color?: keyof Theme['colors'];
@@ -1182,6 +1184,7 @@ type ControlProps = {
1182
1184
  variant?: ControlVariants;
1183
1185
  label?: boolean;
1184
1186
  ui?: UIProps;
1187
+ size?: 'auto' | 'full';
1185
1188
  color?: keyof Theme['colors'];
1186
1189
  };
1187
1190
  declare const Control: React$1.FC<ControlProps>;
@@ -1329,6 +1332,7 @@ type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'onChange'
1329
1332
  ui?: UIProps;
1330
1333
  style?: React$1.CSSProperties;
1331
1334
  propsComponent?: {
1335
+ control?: Omit<ControlProps, 'children'>;
1332
1336
  label?: LabelProps & {
1333
1337
  display?: boolean;
1334
1338
  };
@@ -1345,6 +1349,7 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
1345
1349
  ui?: UIProps;
1346
1350
  style?: React$1.CSSProperties;
1347
1351
  propsComponent?: {
1352
+ control?: Omit<ControlProps, "children">;
1348
1353
  label?: LabelProps & {
1349
1354
  display?: boolean;
1350
1355
  };
@@ -1517,6 +1522,10 @@ type SelectorProps = {
1517
1522
  icon?: React$1.ReactNode;
1518
1523
  propsComponent?: {
1519
1524
  text?: Omit<TextProps, ''>;
1525
+ menu?: {
1526
+ ui?: UIProps;
1527
+ style?: React$1.CSSProperties;
1528
+ };
1520
1529
  };
1521
1530
  onChange?: (e: SelectorChangeEvent, value: string) => void;
1522
1531
  };
@@ -1586,6 +1595,10 @@ type RadioProps = {
1586
1595
  };
1587
1596
  declare const Radio: React$1.FC<RadioProps>;
1588
1597
 
1598
+ type SelectOptionsProps = {
1599
+ value: string;
1600
+ label: string;
1601
+ };
1589
1602
  type SelectChangeEvent = {
1590
1603
  event: React$1.MouseEvent<HTMLDivElement, MouseEvent>;
1591
1604
  target: {
@@ -1603,10 +1616,9 @@ type SelectProps = {
1603
1616
  label?: string;
1604
1617
  name?: string;
1605
1618
  disabled?: boolean;
1606
- options: {
1607
- value: string;
1608
- label: string;
1609
- }[];
1619
+ options: SelectOptionsProps[];
1620
+ variant?: ControlProps['variant'];
1621
+ color?: keyof Theme['colors'];
1610
1622
  propsComponent?: {
1611
1623
  control?: Omit<ControlProps, 'children'>;
1612
1624
  wrapper?: {
@@ -1621,6 +1633,11 @@ type SelectProps = {
1621
1633
  menu?: {
1622
1634
  ui?: UIProps;
1623
1635
  style?: React$1.CSSProperties;
1636
+ options?: {
1637
+ text?: Omit<TextProps, 'children'>;
1638
+ ui?: UIProps;
1639
+ style?: React$1.CSSProperties;
1640
+ };
1624
1641
  };
1625
1642
  };
1626
1643
  value?: string;
@@ -1656,6 +1673,13 @@ type SwitchProps = {
1656
1673
  label?: string;
1657
1674
  color?: keyof Theme['colors'];
1658
1675
  size?: 'sm' | 'md' | 'lg';
1676
+ placement?: 'start' | 'end';
1677
+ propsComponent?: {
1678
+ label: {
1679
+ ui?: UIProps;
1680
+ style?: React$1.CSSProperties;
1681
+ };
1682
+ };
1659
1683
  };
1660
1684
  declare const Switch: React$1.FC<SwitchProps>;
1661
1685
 
@@ -1667,4 +1691,15 @@ declare const IconDown: React.FC<IconProps>;
1667
1691
 
1668
1692
  declare const useClickAway: (ref: any, callback: any) => void;
1669
1693
 
1670
- 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, type CountriesDial, 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, getCountryCodePhone, getDialPhone, getMonthCalendar, getNumberPhone, initTheme, isEmpty, normalizePhone, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
1694
+ type UsePlacesProps = {
1695
+ apiKey: string;
1696
+ provider?: Provider;
1697
+ language?: string;
1698
+ input: string;
1699
+ };
1700
+ declare const usePlaces: ({ input, language, apiKey, provider }: UsePlacesProps) => {
1701
+ suggestions: _yr3_autocomplete_places.PlaceSuggestion[];
1702
+ selectPlace: (id: string) => Promise<_yr3_autocomplete_places.Place>;
1703
+ };
1704
+
1705
+ 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, type CountriesDial, 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 SelectOptionsProps, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, type SwitchProps, Text, type TextProps, type TextVariant, type TextWeight, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getCountryCodePhone, getDialPhone, getMonthCalendar, getNumberPhone, initTheme, isEmpty, normalizePhone, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, usePlaces, useTheme };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Place } from '@yr3/autocomplete-places';
2
- export * from '@yr3/autocomplete-places';
3
1
  import * as React$1 from 'react';
4
2
  import { SVGProps, CSSProperties } from 'react';
5
3
  import * as csstype from 'csstype';
4
+ import * as _yr3_autocomplete_places from '@yr3/autocomplete-places';
5
+ import { Place, Provider } from '@yr3/autocomplete-places';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { Dayjs } from 'dayjs';
8
8
 
@@ -1012,11 +1012,12 @@ type BoxProps = {
1012
1012
  declare const Box: React$1.FC<BoxProps>;
1013
1013
 
1014
1014
  type TextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'title' | 'subtitle' | 'body1' | 'body2' | 'caption' | 'button' | 'helper' | 'inherit' | 'code';
1015
+ type TextWeight = 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black' | 'thin';
1015
1016
  type TextProps = {
1016
1017
  children?: React$1.ReactNode;
1017
1018
  variant?: TextVariant;
1018
1019
  color?: keyof Theme['colors'];
1019
- weight?: 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'black' | 'thin';
1020
+ weight?: TextWeight;
1020
1021
  as?: keyof React$1.JSX.IntrinsicElements;
1021
1022
  gutters?: number[];
1022
1023
  ui?: UIProps;
@@ -1101,6 +1102,7 @@ type CalendarProps = {
1101
1102
  bordered?: boolean;
1102
1103
  ui?: UIProps;
1103
1104
  style?: React$1.CSSProperties;
1105
+ component?: React$1.ReactNode;
1104
1106
  };
1105
1107
  month?: {
1106
1108
  color?: keyof Theme['colors'];
@@ -1182,6 +1184,7 @@ type ControlProps = {
1182
1184
  variant?: ControlVariants;
1183
1185
  label?: boolean;
1184
1186
  ui?: UIProps;
1187
+ size?: 'auto' | 'full';
1185
1188
  color?: keyof Theme['colors'];
1186
1189
  };
1187
1190
  declare const Control: React$1.FC<ControlProps>;
@@ -1329,6 +1332,7 @@ type InputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'onChange'
1329
1332
  ui?: UIProps;
1330
1333
  style?: React$1.CSSProperties;
1331
1334
  propsComponent?: {
1335
+ control?: Omit<ControlProps, 'children'>;
1332
1336
  label?: LabelProps & {
1333
1337
  display?: boolean;
1334
1338
  };
@@ -1345,6 +1349,7 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
1345
1349
  ui?: UIProps;
1346
1350
  style?: React$1.CSSProperties;
1347
1351
  propsComponent?: {
1352
+ control?: Omit<ControlProps, "children">;
1348
1353
  label?: LabelProps & {
1349
1354
  display?: boolean;
1350
1355
  };
@@ -1517,6 +1522,10 @@ type SelectorProps = {
1517
1522
  icon?: React$1.ReactNode;
1518
1523
  propsComponent?: {
1519
1524
  text?: Omit<TextProps, ''>;
1525
+ menu?: {
1526
+ ui?: UIProps;
1527
+ style?: React$1.CSSProperties;
1528
+ };
1520
1529
  };
1521
1530
  onChange?: (e: SelectorChangeEvent, value: string) => void;
1522
1531
  };
@@ -1586,6 +1595,10 @@ type RadioProps = {
1586
1595
  };
1587
1596
  declare const Radio: React$1.FC<RadioProps>;
1588
1597
 
1598
+ type SelectOptionsProps = {
1599
+ value: string;
1600
+ label: string;
1601
+ };
1589
1602
  type SelectChangeEvent = {
1590
1603
  event: React$1.MouseEvent<HTMLDivElement, MouseEvent>;
1591
1604
  target: {
@@ -1603,10 +1616,9 @@ type SelectProps = {
1603
1616
  label?: string;
1604
1617
  name?: string;
1605
1618
  disabled?: boolean;
1606
- options: {
1607
- value: string;
1608
- label: string;
1609
- }[];
1619
+ options: SelectOptionsProps[];
1620
+ variant?: ControlProps['variant'];
1621
+ color?: keyof Theme['colors'];
1610
1622
  propsComponent?: {
1611
1623
  control?: Omit<ControlProps, 'children'>;
1612
1624
  wrapper?: {
@@ -1621,6 +1633,11 @@ type SelectProps = {
1621
1633
  menu?: {
1622
1634
  ui?: UIProps;
1623
1635
  style?: React$1.CSSProperties;
1636
+ options?: {
1637
+ text?: Omit<TextProps, 'children'>;
1638
+ ui?: UIProps;
1639
+ style?: React$1.CSSProperties;
1640
+ };
1624
1641
  };
1625
1642
  };
1626
1643
  value?: string;
@@ -1656,6 +1673,13 @@ type SwitchProps = {
1656
1673
  label?: string;
1657
1674
  color?: keyof Theme['colors'];
1658
1675
  size?: 'sm' | 'md' | 'lg';
1676
+ placement?: 'start' | 'end';
1677
+ propsComponent?: {
1678
+ label: {
1679
+ ui?: UIProps;
1680
+ style?: React$1.CSSProperties;
1681
+ };
1682
+ };
1659
1683
  };
1660
1684
  declare const Switch: React$1.FC<SwitchProps>;
1661
1685
 
@@ -1667,4 +1691,15 @@ declare const IconDown: React.FC<IconProps>;
1667
1691
 
1668
1692
  declare const useClickAway: (ref: any, callback: any) => void;
1669
1693
 
1670
- 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, type CountriesDial, 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, getCountryCodePhone, getDialPhone, getMonthCalendar, getNumberPhone, initTheme, isEmpty, normalizePhone, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, useTheme };
1694
+ type UsePlacesProps = {
1695
+ apiKey: string;
1696
+ provider?: Provider;
1697
+ language?: string;
1698
+ input: string;
1699
+ };
1700
+ declare const usePlaces: ({ input, language, apiKey, provider }: UsePlacesProps) => {
1701
+ suggestions: _yr3_autocomplete_places.PlaceSuggestion[];
1702
+ selectPlace: (id: string) => Promise<_yr3_autocomplete_places.Place>;
1703
+ };
1704
+
1705
+ 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, type CountriesDial, 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 SelectOptionsProps, type SelectProps, type SelectorChangeEvent, type SelectorProps, Slide, type SlideContentProps, type SlideProps, Switch, type SwitchProps, Text, type TextProps, type TextVariant, type TextWeight, type Theme, ThemeContext, ThemeProvider, type UIProps, adjustColor, applyTheme, baseTokens, bem, bemMerge, breakpoints, composeStyles, createPaletteColor, createTheme, createVariants, cx, getContrast, getCountryCodePhone, getDialPhone, getMonthCalendar, getNumberPhone, initTheme, isEmpty, normalizePhone, text, times, uiStyle, useBackdrop, useBreakpointValue, useClickAway, useControl, useMediaQuery, useNotistack, usePlaces, useTheme };