@ctlyst.id/internal-ui 2.0.0-canary.2 → 2.0.0

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.
Files changed (73) hide show
  1. package/dist/components/alert/__stories__/alert.stories.d.ts +14 -0
  2. package/dist/components/alert/components/alert-action.d.ts +6 -0
  3. package/dist/components/alert/components/alert-close.d.ts +6 -0
  4. package/dist/components/alert/components/alert-context.d.ts +29 -0
  5. package/dist/components/alert/components/alert-description.d.ts +3 -0
  6. package/dist/components/alert/components/alert-icon.d.ts +6 -0
  7. package/dist/components/alert/components/alert-title.d.ts +3 -0
  8. package/dist/components/alert/components/alert.d.ts +25 -0
  9. package/dist/components/alert/components/icons.d.ts +3 -0
  10. package/dist/components/alert/components/index.d.ts +14 -0
  11. package/dist/components/alert/index.d.ts +1 -0
  12. package/dist/components/{base/__stories__/button.stories.d.ts → badge/__stories__/badge.stories.d.ts} +1 -1
  13. package/dist/components/badge/components/badge.d.ts +11 -0
  14. package/dist/components/badge/index.d.ts +2 -0
  15. package/dist/components/button/__stories__/button.stories.d.ts +14 -0
  16. package/dist/components/button/components/button.d.ts +4 -0
  17. package/dist/components/button/index.d.ts +2 -0
  18. package/dist/components/card/__stories__/card.stories.d.ts +11 -0
  19. package/dist/components/card/components/card.d.ts +8 -0
  20. package/dist/components/card/index.d.ts +2 -0
  21. package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +13 -0
  22. package/dist/components/checkbox/components/checkbox-group.d.ts +18 -0
  23. package/dist/components/checkbox/index.d.ts +2 -0
  24. package/dist/components/chips/__stories__/chips.stories.d.ts +12 -0
  25. package/dist/components/chips/components/chips.d.ts +19 -0
  26. package/dist/components/chips/index.d.ts +2 -0
  27. package/dist/components/field/components/field.d.ts +0 -1
  28. package/dist/components/field/index.d.ts +0 -2
  29. package/dist/components/form/__stories__/input.stories.d.ts +14 -0
  30. package/dist/components/form/components/input-addon.d.ts +7 -0
  31. package/dist/components/{field → form}/components/input-field.d.ts +4 -1
  32. package/dist/components/form/index.d.ts +2 -0
  33. package/dist/components/form/styles/input-field.d.ts +4 -0
  34. package/dist/components/index.d.ts +6 -0
  35. package/dist/components/layouting/components/box.d.ts +4 -0
  36. package/dist/components/layouting/components/container.d.ts +4 -0
  37. package/dist/components/layouting/components/flex.d.ts +4 -0
  38. package/dist/components/layouting/components/grid.d.ts +4 -0
  39. package/dist/components/layouting/components/stack.d.ts +4 -0
  40. package/dist/components/layouting/components/wrap.d.ts +4 -0
  41. package/dist/components/layouting/index.d.ts +12 -0
  42. package/dist/components/radio/__stories__/radio-group.stories.d.ts +13 -0
  43. package/dist/components/radio/__stories__/radio.stories.d.ts +12 -0
  44. package/dist/components/radio/components/radio-group.d.ts +17 -0
  45. package/dist/components/radio/components/radio.d.ts +16 -0
  46. package/dist/components/radio/index.d.ts +4 -0
  47. package/dist/components/rating/__stories__/rating.stories.d.ts +10 -0
  48. package/dist/components/rating/components/rating.d.ts +6 -0
  49. package/dist/components/rating/index.d.ts +2 -0
  50. package/dist/components/switch/__stories__/switch.stories.d.ts +13 -0
  51. package/dist/components/switch/components/switch.d.ts +18 -0
  52. package/dist/components/switch/index.d.ts +2 -0
  53. package/dist/components/text/components/text.d.ts +4 -0
  54. package/dist/components/text/index.d.ts +2 -0
  55. package/dist/config/theme/components/alert.d.ts +79 -0
  56. package/dist/config/theme/components/card.d.ts +18 -0
  57. package/dist/config/theme/components/checkbox.d.ts +2 -1
  58. package/dist/config/theme/components/chips.d.ts +30 -0
  59. package/dist/config/theme/components/index.d.ts +3 -0
  60. package/dist/config/theme/components/input.d.ts +8 -21
  61. package/dist/config/theme/components/radio.d.ts +98 -2
  62. package/dist/config/theme/components/switch.d.ts +43 -9
  63. package/dist/config/theme/themeConfiguration.d.ts +4 -2
  64. package/dist/internal-ui.cjs.development.js +1057 -310
  65. package/dist/internal-ui.cjs.development.js.map +1 -1
  66. package/dist/internal-ui.cjs.production.min.js +9 -9
  67. package/dist/internal-ui.cjs.production.min.js.map +1 -1
  68. package/dist/internal-ui.esm.js +1058 -325
  69. package/dist/internal-ui.esm.js.map +1 -1
  70. package/dist/provider/components/provider.d.ts +0 -1
  71. package/package.json +12 -11
  72. package/dist/components/base/__stories__/input.stories.d.ts +0 -16
  73. package/dist/components/base/__stories__/radio.stories.d.ts +0 -15
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const AlertWithClose: () => JSX.Element;
12
+ export declare const AlertWithCTA: () => JSX.Element;
13
+ export declare const AlertWithCloseAndCTA: () => JSX.Element;
14
+ export declare const Variant: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { HTMLChakraProps } from '@chakra-ui/system';
2
+ export declare type AlertActionProps = HTMLChakraProps<'button'>;
3
+ export declare function AlertAction({ children, className }: AlertActionProps): JSX.Element;
4
+ export declare namespace AlertAction {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type { HTMLChakraProps } from '@chakra-ui/system';
2
+ export declare type AlertCloseProps = HTMLChakraProps<'span'>;
3
+ export declare function AlertClose({ className, children, ...rest }: AlertCloseProps): JSX.Element;
4
+ export declare namespace AlertClose {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { CheckIcon, InfoIcon, WarningIcon } from './icons';
3
+ export declare const AlertProvider: import("react").Provider<AlertContext>, useAlertContext: () => AlertContext;
4
+ export declare const AlertStylesProvider: import("react").Provider<Record<string, import("@chakra-ui/styled-system").RecursiveCSSObject<import("@chakra-ui/styled-system").CSSWithMultiValues>>>, useAlertStyles: () => Record<string, import("@chakra-ui/styled-system").RecursiveCSSObject<import("@chakra-ui/styled-system").CSSWithMultiValues>>;
5
+ declare const STATUSES: {
6
+ info: {
7
+ icon: typeof InfoIcon;
8
+ colorScheme: string;
9
+ };
10
+ warning: {
11
+ icon: typeof InfoIcon;
12
+ colorScheme: string;
13
+ };
14
+ success: {
15
+ icon: typeof CheckIcon;
16
+ colorScheme: string;
17
+ };
18
+ error: {
19
+ icon: typeof WarningIcon;
20
+ colorScheme: string;
21
+ };
22
+ };
23
+ export declare function getStatusColorScheme(status: AlertStatus): string;
24
+ export declare function getStatusIcon(status: AlertStatus): typeof InfoIcon | typeof CheckIcon | typeof WarningIcon;
25
+ export declare type AlertStatus = keyof typeof STATUSES;
26
+ export interface AlertContext {
27
+ status: AlertStatus;
28
+ }
29
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { HTMLChakraProps } from '@chakra-ui/system';
2
+ export declare type AlertDescriptionProps = HTMLChakraProps<'div'>;
3
+ export declare const AlertDescription: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", HTMLChakraProps<"div">>;
@@ -0,0 +1,6 @@
1
+ import type { HTMLChakraProps } from '@chakra-ui/system';
2
+ export declare type AlertIconProps = HTMLChakraProps<'span'>;
3
+ export declare function AlertIcon({ className, children, ...rest }: AlertIconProps): JSX.Element;
4
+ export declare namespace AlertIcon {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ import type { HTMLChakraProps } from '@chakra-ui/system';
2
+ export declare type AlertTitleProps = HTMLChakraProps<'div'>;
3
+ export declare const AlertTitle: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", HTMLChakraProps<"div">>;
@@ -0,0 +1,25 @@
1
+ import type { HTMLChakraProps, ThemingProps } from '@chakra-ui/system';
2
+ import type { AlertStatus } from './alert-context';
3
+ interface AlertOptions {
4
+ /**
5
+ * The status of the alert
6
+ * @default "info"
7
+ */
8
+ status?: AlertStatus;
9
+ }
10
+ export declare type AlertVariant = 'solid' | 'subtle';
11
+ export interface AlertProps extends HTMLChakraProps<'div'>, AlertOptions, ThemingProps<'Alert'> {
12
+ /**
13
+ * @default false
14
+ */
15
+ addRole?: boolean;
16
+ }
17
+ /**
18
+ * Alert is used to communicate the state or status of a
19
+ * page, feature or action
20
+ *
21
+ * @see Docs https://chakra-ui.com/docs/components/alert
22
+ * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/alert/
23
+ */
24
+ export declare const Alert: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"div", AlertProps>;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function CheckIcon(): JSX.Element;
2
+ export declare function InfoIcon(): JSX.Element;
3
+ export declare function WarningIcon(): JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type { AlertProps } from './alert';
2
+ export { Alert } from './alert';
3
+ export type { AlertActionProps } from './alert-action';
4
+ export { AlertAction } from './alert-action';
5
+ export type { AlertCloseProps } from './alert-close';
6
+ export { AlertClose } from './alert-close';
7
+ export type { AlertStatus } from './alert-context';
8
+ export { useAlertStyles } from './alert-context';
9
+ export type { AlertDescriptionProps } from './alert-description';
10
+ export { AlertDescription } from './alert-description';
11
+ export type { AlertIconProps } from './alert-icon';
12
+ export { AlertIcon } from './alert-icon';
13
+ export type { AlertTitleProps } from './alert-title';
14
+ export { AlertTitle } from './alert-title';
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -7,4 +7,4 @@ declare const _default: {
7
7
  decorators: ((Story: React.ElementType) => JSX.Element)[];
8
8
  };
9
9
  export default _default;
10
- export declare const ButtonDefault: () => JSX.Element;
10
+ export declare const Default: () => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { BadgeProps as BadgeChakraProps } from '@chakra-ui/react';
2
+ export interface BadgeProps extends BadgeChakraProps {
3
+ pill?: boolean;
4
+ }
5
+ declare const Badge: {
6
+ (props: BadgeProps): JSX.Element;
7
+ defaultProps: {
8
+ pill: boolean;
9
+ };
10
+ };
11
+ export default Badge;
@@ -0,0 +1,2 @@
1
+ export { default as Badge } from './components/badge';
2
+ export * from './components/badge';
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const Size: () => JSX.Element;
12
+ export declare const Variant: () => JSX.Element;
13
+ export declare const TextLink: () => JSX.Element;
14
+ export declare const IconButton: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ButtonProps as ButtonChakraProps } from '@chakra-ui/react';
2
+ export declare type ButtonProps = ButtonChakraProps;
3
+ declare const Button: (props: ButtonProps) => JSX.Element;
4
+ export default Button;
@@ -0,0 +1,2 @@
1
+ export { default as Button } from './components/button';
2
+ export * from './components/button';
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const Variant: () => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { BoxProps } from '@chakra-ui/react';
2
+ import React from 'react';
3
+ export interface CardProps extends BoxProps {
4
+ withShadow?: boolean;
5
+ isRounded?: boolean;
6
+ }
7
+ declare const CardCustom: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
8
+ export default CardCustom;
@@ -0,0 +1,2 @@
1
+ export { default as Card } from './components/card';
2
+ export * from './components/card';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const RequiredLabel: () => JSX.Element;
12
+ export declare const WithHelpText: () => JSX.Element;
13
+ export declare const WithError: () => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { CheckboxGroupProps } from '@chakra-ui/react';
2
+ import type { PropsWithChildren } from 'react';
3
+ import type { FieldProps } from '../../field';
4
+ export interface CheckboxGroupComponentProps extends FieldProps, CheckboxGroupProps, PropsWithChildren {
5
+ label: string;
6
+ helpText?: string;
7
+ isError?: boolean;
8
+ errorMessage?: string;
9
+ }
10
+ declare function CheckboxGroupComponent(props: CheckboxGroupComponentProps): JSX.Element;
11
+ declare namespace CheckboxGroupComponent {
12
+ var defaultProps: {
13
+ helpText: string;
14
+ isError: boolean;
15
+ errorMessage: string;
16
+ };
17
+ }
18
+ export default CheckboxGroupComponent;
@@ -1,2 +1,4 @@
1
1
  export { default as Checkbox } from './components/checkbox';
2
2
  export * from './components/checkbox';
3
+ export { default as CheckboxGroup } from './components/checkbox-group';
4
+ export * from './components/checkbox-group';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const Variant: () => JSX.Element;
12
+ export declare const WithClose: () => JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ChipsProps {
3
+ isDisabled?: boolean;
4
+ isActive?: boolean;
5
+ onClose?: () => void;
6
+ children?: ReactNode;
7
+ size?: 'sm' | 'md';
8
+ }
9
+ declare const Chips: {
10
+ ({ children, ...rest }: ChipsProps): JSX.Element;
11
+ defaultProps: {
12
+ isDisabled: boolean;
13
+ isActive: boolean;
14
+ onClose: undefined;
15
+ children: undefined;
16
+ size: string;
17
+ };
18
+ };
19
+ export default Chips;
@@ -0,0 +1,2 @@
1
+ export { default as Chips } from './components/chips';
2
+ export * from './components/chips';
@@ -3,7 +3,6 @@ export interface Props {
3
3
  label?: string | ReactNode;
4
4
  isError?: boolean;
5
5
  isSuccess?: boolean;
6
- isDisabled?: boolean;
7
6
  errorMessage?: string | ReactNode;
8
7
  leftHelperText?: string | ReactNode;
9
8
  rightHelperText?: string | ReactNode;
@@ -1,4 +1,2 @@
1
1
  export { default as Field } from './components/field';
2
2
  export * from './components/field';
3
- export { default as InputField } from './components/input-field';
4
- export * from './components/input-field';
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const Variant: () => JSX.Element;
12
+ export declare const PasswordField: () => JSX.Element;
13
+ export declare const WithClear: () => JSX.Element;
14
+ export declare const WithAddOn: () => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface InputAddonProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const InputAddonLeft: ({ children }: InputAddonProps) => JSX.Element;
6
+ export declare const InputAddonRight: ({ children }: InputAddonProps) => JSX.Element;
7
+ export {};
@@ -1,12 +1,15 @@
1
1
  import type { InputProps as ChakraInputProps } from '@chakra-ui/react';
2
2
  import type { ReactNode } from 'react';
3
3
  import React from 'react';
4
- import type { FieldProps } from './field';
4
+ import type { FieldProps } from '../../field/components/field';
5
5
  export interface InputFieldProps extends ChakraInputProps, FieldProps {
6
6
  addOnLeft?: ReactNode;
7
7
  addOnRight?: ReactNode;
8
8
  elementLeft?: ReactNode;
9
9
  elementRight?: ReactNode;
10
+ withClear?: boolean;
11
+ isLoading?: boolean;
12
+ onClear?: () => void;
10
13
  }
11
14
  declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
12
15
  export default InputField;
@@ -1,2 +1,4 @@
1
+ export { default as InputField } from './components/input-field';
2
+ export * from './components/input-field';
1
3
  export { default as TextareaField } from './components/textarea';
2
4
  export * from './components/textarea';
@@ -0,0 +1,4 @@
1
+ import type { BoxProps } from '@chakra-ui/react';
2
+ import type { InputFieldProps } from '../components/input-field';
3
+ declare const getWrapperStyle: (props: InputFieldProps) => BoxProps;
4
+ export default getWrapperStyle;
@@ -1,14 +1,20 @@
1
1
  export * from './breadcrumb';
2
+ export * from './button';
3
+ export * from './card';
2
4
  export * from './checkbox';
3
5
  export * from './data-table';
4
6
  export * from './datepicker';
5
7
  export * from './field';
6
8
  export * from './form';
7
9
  export * from './header';
10
+ export * from './layouting';
8
11
  export * from './loader';
9
12
  export * from './modal';
10
13
  export * from './navigation';
11
14
  export * from './pagination';
15
+ export * from './radio';
12
16
  export * from './select';
17
+ export * from './switch';
13
18
  export * from './tabs';
19
+ export * from './text';
14
20
  export * from './uploader';
@@ -0,0 +1,4 @@
1
+ import type { BoxProps as BoxPropsChakra } from '@chakra-ui/react';
2
+ import { Box } from '@chakra-ui/react';
3
+ export declare type BoxProps = BoxPropsChakra;
4
+ export default Box;
@@ -0,0 +1,4 @@
1
+ import type { ContainerProps as ContainerPropsChakra } from '@chakra-ui/react';
2
+ import { Container } from '@chakra-ui/react';
3
+ export declare type ContainerProps = ContainerPropsChakra;
4
+ export default Container;
@@ -0,0 +1,4 @@
1
+ import type { FlexProps as FlexPropsChakra } from '@chakra-ui/react';
2
+ import { Flex } from '@chakra-ui/react';
3
+ export declare type FlexProps = FlexPropsChakra;
4
+ export default Flex;
@@ -0,0 +1,4 @@
1
+ import type { GridProps as GridPropsChakra } from '@chakra-ui/react';
2
+ import { Grid } from '@chakra-ui/react';
3
+ export declare type GridProps = GridPropsChakra;
4
+ export default Grid;
@@ -0,0 +1,4 @@
1
+ import type { StackProps as StackPropsChakra } from '@chakra-ui/react';
2
+ import { Stack } from '@chakra-ui/react';
3
+ export declare type StackProps = StackPropsChakra;
4
+ export default Stack;
@@ -0,0 +1,4 @@
1
+ import type { WrapProps as WrapPropsChakra } from '@chakra-ui/react';
2
+ import { Wrap } from '@chakra-ui/react';
3
+ export declare type WrapProps = WrapPropsChakra;
4
+ export default Wrap;
@@ -0,0 +1,12 @@
1
+ export { default as Box } from './components/box';
2
+ export * from './components/box';
3
+ export { default as Container } from './components/container';
4
+ export * from './components/container';
5
+ export { default as Flex } from './components/flex';
6
+ export * from './components/flex';
7
+ export { default as Grid } from './components/grid';
8
+ export * from './components/grid';
9
+ export { default as Stack } from './components/stack';
10
+ export * from './components/stack';
11
+ export { default as Wrap } from './components/wrap';
12
+ export * from './components/wrap';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const RequiredLabel: () => JSX.Element;
12
+ export declare const WithHelpText: () => JSX.Element;
13
+ export declare const WithError: () => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const WithLabel: () => JSX.Element;
12
+ export declare const WithHelpText: () => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { RadioGroupProps } from '@chakra-ui/react';
2
+ import type { FieldProps } from '../../field';
3
+ export interface RadioGroupComponentProps extends FieldProps, RadioGroupProps {
4
+ label: string;
5
+ helpText?: string;
6
+ isError?: boolean;
7
+ errorMessage?: string;
8
+ }
9
+ declare function RadioGroupComponent(props: RadioGroupComponentProps): JSX.Element;
10
+ declare namespace RadioGroupComponent {
11
+ var defaultProps: {
12
+ helpText: string;
13
+ isError: boolean;
14
+ errorMessage: string;
15
+ };
16
+ }
17
+ export default RadioGroupComponent;
@@ -0,0 +1,16 @@
1
+ import type { RadioProps } from '@chakra-ui/react';
2
+ import type { PropsWithChildren } from 'react';
3
+ export interface RadioComponentProps extends RadioProps, PropsWithChildren {
4
+ isError?: boolean;
5
+ helpText?: string;
6
+ errorText?: string;
7
+ }
8
+ declare function RadioComponent({ isError, helpText, errorText, children, isDisabled, ...rest }: RadioComponentProps): JSX.Element;
9
+ declare namespace RadioComponent {
10
+ var defaultProps: {
11
+ isError: boolean;
12
+ helpText: string;
13
+ errorText: string;
14
+ };
15
+ }
16
+ export default RadioComponent;
@@ -0,0 +1,4 @@
1
+ export { default as Radio } from './components/radio';
2
+ export * from './components/radio';
3
+ export { default as RadioGroup } from './components/radio-group';
4
+ export * from './components/radio-group';
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ declare type PropsValue = 0 | 1 | 2 | 3 | 4 | 5;
2
+ export interface RatingProps {
3
+ value: PropsValue;
4
+ }
5
+ declare const Rating: ({ value }: RatingProps) => JSX.Element;
6
+ export default Rating;
@@ -0,0 +1,2 @@
1
+ export { default as Rating } from './components/rating';
2
+ export * from './components/rating';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ declare const _default: {
3
+ chakra: {
4
+ theme: Record<string, any>;
5
+ };
6
+ title: string;
7
+ decorators: ((Story: React.ElementType) => JSX.Element)[];
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const Disabled: () => JSX.Element;
12
+ export declare const Size: () => JSX.Element;
13
+ export declare const WithLabel: () => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { HTMLChakraProps, SystemProps, ThemingProps, UseCheckboxProps } from '@chakra-ui/react';
2
+ export interface SwitchProps extends Omit<UseCheckboxProps, 'isIndeterminate'>, Omit<HTMLChakraProps<'label'>, keyof UseCheckboxProps>, ThemingProps<'Switch'> {
3
+ /**
4
+ * The spacing between the switch and its label text
5
+ * @default 0.5rem
6
+ * @type SystemProps["marginLeft"]
7
+ */
8
+ spacing?: SystemProps['marginLeft'];
9
+ size?: 'sm' | 'md' | 'lg';
10
+ }
11
+ /**
12
+ * The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
13
+ *
14
+ * @see Docs https://chakra-ui.com/docs/components/switch
15
+ * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
16
+ */
17
+ declare const Switch: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"input", SwitchProps>;
18
+ export default Switch;
@@ -0,0 +1,2 @@
1
+ export { default as Switch } from './components/switch';
2
+ export * from './components/switch';
@@ -0,0 +1,4 @@
1
+ import type { TextProps as TextPropsChakra } from '@chakra-ui/react';
2
+ import { Text } from '@chakra-ui/react';
3
+ export declare type TextProps = TextPropsChakra;
4
+ export default Text;
@@ -0,0 +1,2 @@
1
+ export { default as Text } from './components/text';
2
+ export * from './components/text';