period-ui 0.1.19 → 0.1.20

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 (62) hide show
  1. package/dist/components/atoms/billo-icon/billo-icon-types.d.ts +116 -0
  2. package/dist/components/atoms/billo-icon/billo-icon.d.ts +11 -0
  3. package/dist/components/atoms/billo-icon/index.d.ts +3 -0
  4. package/dist/components/atoms/button/button-types.d.ts +6 -0
  5. package/dist/components/atoms/button/button.d.ts +9 -0
  6. package/dist/components/atoms/button/index.d.ts +3 -0
  7. package/dist/components/atoms/check-box/check-box-types.d.ts +10 -0
  8. package/dist/components/atoms/check-box/check-box.d.ts +14 -0
  9. package/dist/components/atoms/check-box/index.d.ts +3 -0
  10. package/dist/components/atoms/chip/chip/chip.d.ts +9 -0
  11. package/dist/components/atoms/chip/chip/components/clear-button.d.ts +11 -0
  12. package/dist/components/atoms/chip/chip/index.d.ts +2 -0
  13. package/dist/components/atoms/chip/chips-list/chips-list.d.ts +15 -0
  14. package/dist/components/atoms/chip/chips-list/index.d.ts +2 -0
  15. package/dist/components/atoms/drop-down-menu/components/index.d.ts +3 -0
  16. package/dist/components/atoms/drop-down-menu/components/menu-item-types.d.ts +7 -0
  17. package/dist/components/atoms/drop-down-menu/components/menu-item.d.ts +16 -0
  18. package/dist/components/atoms/drop-down-menu/drop-down-menu.d.ts +23 -0
  19. package/dist/components/atoms/drop-down-menu/index.d.ts +2 -0
  20. package/dist/components/atoms/icon-button/icon-button.d.ts +12 -0
  21. package/dist/components/atoms/icon-button/index.d.ts +2 -0
  22. package/dist/components/atoms/search-bar/components/clear-button.d.ts +10 -0
  23. package/dist/components/atoms/search-bar/index.d.ts +2 -0
  24. package/dist/components/atoms/search-bar/search-bar.d.ts +12 -0
  25. package/dist/components/atoms/text/index.d.ts +3 -0
  26. package/dist/components/atoms/text/text-types.d.ts +36 -0
  27. package/dist/components/atoms/text/text.d.ts +14 -0
  28. package/dist/components/atoms/text-button/index.d.ts +3 -0
  29. package/dist/components/atoms/text-button/text-button-types.d.ts +8 -0
  30. package/dist/components/atoms/text-button/text-button.d.ts +13 -0
  31. package/dist/components/index.d.ts +16 -0
  32. package/dist/components/molecules/form/form-select/form-select.d.ts +7 -0
  33. package/dist/components/molecules/form/form-select/index.d.ts +2 -0
  34. package/dist/components/molecules/form/form-story-stubs.d.ts +11 -0
  35. package/dist/components/molecules/form/form-test-stubs.d.ts +6 -0
  36. package/dist/components/molecules/form/form-text-field/form-text-field.d.ts +7 -0
  37. package/dist/components/molecules/form/form-text-field/index.d.ts +2 -0
  38. package/dist/components/molecules/form/form-types.d.ts +24 -0
  39. package/dist/components/molecules/form/form.d.ts +12 -0
  40. package/dist/components/molecules/form/index.d.ts +3 -0
  41. package/dist/components/molecules/select/components/select-input.d.ts +8 -0
  42. package/dist/components/molecules/select/index.d.ts +3 -0
  43. package/dist/components/molecules/select/select.d.ts +16 -0
  44. package/dist/components/molecules/select/use-select.d.ts +23 -0
  45. package/dist/components/molecules/text-field/index.d.ts +2 -0
  46. package/dist/components/molecules/text-field/text-field.d.ts +18 -0
  47. package/dist/containers/form-control/components/form-error.d.ts +7 -0
  48. package/dist/containers/form-control/components/form-helper.d.ts +9 -0
  49. package/dist/containers/form-control/components/form-label.d.ts +10 -0
  50. package/dist/containers/form-control/form-control-types.d.ts +11 -0
  51. package/dist/containers/form-control/form-control.d.ts +24 -0
  52. package/dist/containers/form-control/index.d.ts +3 -0
  53. package/dist/containers/index.d.ts +2 -0
  54. package/dist/index.d.ts +0 -2
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +0 -1
  57. package/dist/index.js.map +1 -1
  58. package/dist/utils/string-utils/string-utils.d.ts +6 -0
  59. package/dist/utils/tailwind-utils.d.ts +3 -0
  60. package/dist/utils/window-dimensions-utils.d.ts +9 -0
  61. package/dist/vitest.setup.d.ts +2 -0
  62. package/package.json +2 -1
@@ -0,0 +1,116 @@
1
+ export declare enum IconSymbol {
2
+ WARNING = "icon-warning",
3
+ CHEVRON_DOWN = "icon-chevron-down",
4
+ CHEVRON_UP = "icon-chevron-up",
5
+ CHEVRON_RIGHT = "icon-chevron-right",
6
+ CHEVRON_LEFT = "icon-chevron-left",
7
+ COPY = "icon-copy",
8
+ DOT_MENU = "icon-dot-menu",
9
+ FUNNEL = "icon-funnel",
10
+ CLOCK_WARNING = "icon-clock-warning",
11
+ SPINNER = "icon-spinner",
12
+ MINUS = "icon-minus",
13
+ MAGNIFYING_GLASS = "icon-magnifying-glass",
14
+ ARROWS_LEFT_RIGHT = "icon-arrows-left-right",
15
+ TAG = "icon-tag",
16
+ CALENDER = "icon-calendar",
17
+ CHECK_CIRCLE = "icon-check-circle",
18
+ ADDRESS_BOOK = "icon-address-book",
19
+ ICON_X = "icon-x",
20
+ CREDIT_CARD = "icon-credit-card",
21
+ POS = "icon-pos",
22
+ FILE = "icon-file",
23
+ DOWNLOAD = "icon-download",
24
+ PENCIL = "icon-pencil",
25
+ ALERT = "icon-alert",
26
+ QUESTION_CONTAINED = "icon-question-contained",
27
+ EYE_SLASH = "icon-eye-slash",
28
+ IMAGE = "icon-image",
29
+ UPLOAD = "icon-upload",
30
+ LINK = "icon-link",
31
+ SIGN_OUT = "icon-sign-out",
32
+ MASTER_CARD = "icon-mastercard",
33
+ MENU = "icon-menu",
34
+ FILE_PDF = "icon-file-pdf",
35
+ PLUS = "icon-plus",
36
+ BASKET = "icon-basket",
37
+ STOCK = "icon-stock",
38
+ QR_CODE = "icon-qr-code",
39
+ X_CIRCLE = "icon-x-circle",
40
+ PIE_CHART = "icon-pie-chart",
41
+ MAGNIFYING_GLASS_X = "icon-magnifying-glass-x",
42
+ PAPER_PLANE = "icon-paper-plane",
43
+ GEAR = "icon-gear",
44
+ EYE = "icon-eye",
45
+ CLIPBOARD = "icon-clipboard",
46
+ INFO = "icon-info",
47
+ TRASH = "icon-trash",
48
+ LINK_BREAK = "icon-link-break",
49
+ ELECTRICITY_BILL = "icon-electricity-bill",
50
+ VISA = "icon-visa",
51
+ RECEIPT = "icon-receipt",
52
+ RECEIPT_CONTAINED = "icon-receipt-contained",
53
+ CLOCK = "icon-clock",
54
+ CARET_DOWN = "icon-caret-down",
55
+ CARET_UP = "icon-caret-up",
56
+ QUESTION = "icon-question",
57
+ USER_CONTAINED = "icon-user-contained",
58
+ WHATSAPP = "icon-whatsapp",
59
+ STORE_CLOCK = "icon-store-clock",
60
+ PHONE_CALL = "icon-phone-call",
61
+ LOCK = "icon-lock",
62
+ ARROW_SQUARE_OUT = "icon-arrow-square-out",
63
+ ARROW_LEFT = "icon-arrow-left",
64
+ ARROW_RIGHT = "icon-arrow-right",
65
+ DEVICES = "icon-devices",
66
+ CASH = "icon-cash",
67
+ BANK = "icon-bank",
68
+ MOBILE = "icon-mobile",
69
+ CHECK = "icon-check",
70
+ MEGAPHONE = "icon-megaphone",
71
+ BELL = "icon-bell",
72
+ STOREFRONT = "icon-storefront",
73
+ HOUSE = "icon-house",
74
+ ARROW_CLOCKWISE = "icon-arrow-clockwise",
75
+ ENVELOPE = "icon-envelope",
76
+ USER = "icon-user",
77
+ CHECK_SEAL = "icon-check-seal",
78
+ PIN = "icon-pin",
79
+ BILLO_LOGO = "icon-billo-logo",
80
+ BN_LOGO = "icon-banco-nacional-logo",
81
+ SHOPPING_CART = "icon-shopping-cart",
82
+ WARNING_FILLED = "icon-warning-filled",
83
+ INFO_FILLED = "icon-info-filled",
84
+ CHECK_CIRCLE_FILLED = "icon-check-circle-filled",
85
+ ALERT_FILLED = "icon-alert-filled",
86
+ DUPLICATE_AND_SEND = "icon-duplicate-and-send",
87
+ NUMBER_PAD = "icon-number-pad"
88
+ }
89
+ export declare enum IconSize {
90
+ XXS = "text-[10px]",
91
+ XS = "text-[12px]",
92
+ SM = "text-[14px]",
93
+ MD = "text-[16px]",
94
+ LG = "text-[18px]",
95
+ XL = "text-[20px]",
96
+ TWO_XL = "text-[24px]",
97
+ THREE_XL = "text-[30px]",
98
+ FOUR_XL = "text-[36px]",
99
+ FIVE_XL = "text-[48px]",
100
+ SIX_XL = "text-[60px]",
101
+ SEVEN_XL = "text-[72px]",
102
+ EIGHT_XL = "text-[96px]"
103
+ }
104
+ export declare enum IconColor {
105
+ WHITE = "text-white",
106
+ BLUE_01 = "text-blue-01",
107
+ BLUE_02 = "text-blue-02",
108
+ BLUE_03 = "text-blue-03",
109
+ GREEN_02 = "text-green-02",
110
+ YELLOW_02 = "text-yellow-02",
111
+ RED_02 = "text-red-02",
112
+ GRAY_02 = "text-gray-02",
113
+ GRAY_03 = "text-gray-03",
114
+ RED_01 = "text-red-01"
115
+ }
116
+ //# sourceMappingURL=billo-icon-types.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { IconColor, IconSize, IconSymbol } from './billo-icon-types';
2
+ type Props = {
3
+ icon: IconSymbol;
4
+ size?: IconSize;
5
+ color?: IconColor;
6
+ touchTarget?: string;
7
+ className?: string;
8
+ };
9
+ export declare function BilloIcon({ icon, size, color, touchTarget, className, }: Props): JSX.Element;
10
+ export type { Props as BilloIconProps };
11
+ //# sourceMappingURL=billo-icon.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './billo-icon';
2
+ export * from './billo-icon-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare enum ButtonVariant {
2
+ PRIMARY = "primary",
3
+ SECONDARY = "secondary",
4
+ DESTRUCTIVE = "destructive"
5
+ }
6
+ //# sourceMappingURL=button-types.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { ComponentProps } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const buttonStyles: (props?: ({
4
+ variant?: "primary" | "secondary" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ type Props = ComponentProps<'button'> & VariantProps<typeof buttonStyles>;
7
+ export declare const Button: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
8
+ export type { Props as ButtonProps };
9
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './button';
2
+ export * from './button-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ export declare enum CheckboxVariant {
2
+ DEFAULT = "DEFAULT",
3
+ INTERMEDIATE = "INTERMEDIATE",
4
+ DESTRUCTIVE = "DESTRUCTIVE"
5
+ }
6
+ export type ExcludedVariants = Exclude<CheckboxVariant, CheckboxVariant.INTERMEDIATE>;
7
+ export declare const checkBoxStyles: {
8
+ [type in ExcludedVariants]: string;
9
+ };
10
+ //# sourceMappingURL=check-box-types.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { CheckboxVariant } from '@/components';
2
+ type Props = {
3
+ value?: boolean;
4
+ isDisabled?: boolean;
5
+ label?: string;
6
+ className?: string;
7
+ labelName?: string;
8
+ containerClassName?: string;
9
+ variant?: CheckboxVariant;
10
+ onCheckToggle?: (value: boolean) => void;
11
+ };
12
+ export declare function Checkbox({ value, isDisabled, label, className, labelName, containerClassName, variant, onCheckToggle, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export type { Props as CheckboxProps };
14
+ //# sourceMappingURL=check-box.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './check-box';
2
+ export * from './check-box-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ type Props = {
2
+ id: string;
3
+ label: string;
4
+ className?: string;
5
+ onClick?: () => void;
6
+ };
7
+ export declare function Chip({ id, label, className, onClick }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export type { Props as ChipProps };
9
+ //# sourceMappingURL=chip.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { IconColor, IconSize } from '../../../../../components';
2
+ type Props = {
3
+ isDisabled?: boolean;
4
+ size?: IconSize;
5
+ color?: IconColor;
6
+ onClick: () => void;
7
+ className?: string;
8
+ };
9
+ export declare function ClearButton({ isDisabled, size, onClick, className, }: Props): JSX.Element;
10
+ export type { Props as ClearButtonProps };
11
+ //# sourceMappingURL=clear-button.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './chip';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { ReactElement } from 'react';
2
+ export type ChipOptionsProps = {
3
+ label: string;
4
+ value: string;
5
+ onClear: () => void;
6
+ };
7
+ type Props = {
8
+ data: ChipOptionsProps[];
9
+ firstComponent?: ReactElement;
10
+ lasItemComponent?: ReactElement;
11
+ className?: string;
12
+ };
13
+ export declare function ChipList({ data, className, firstComponent, lasItemComponent }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=chips-list.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './chips-list';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './menu-item';
2
+ export * from './menu-item-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ export declare enum MenuItemVariant {
2
+ DEFAULT = "DEFAULT",
3
+ TEXT_BUTTON = "TEXT_BUTTON",
4
+ DESTRUCTIVE = "DESTRUCTIVE",
5
+ CHECK_BOX = "CHECK_BOX"
6
+ }
7
+ //# sourceMappingURL=menu-item-types.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { IconSymbol } from '../../../../components';
2
+ import { MenuItemVariant } from './menu-item-types';
3
+ type Props = {
4
+ isDisabled?: boolean;
5
+ isSelected?: boolean;
6
+ id: string;
7
+ label: string;
8
+ className?: string;
9
+ helperLabel?: string;
10
+ variant?: MenuItemVariant;
11
+ icon?: IconSymbol;
12
+ onClick?: () => void;
13
+ };
14
+ export declare function MenuItem({ isDisabled, isSelected, id, label, className, helperLabel, variant, icon, onClick, }: Props): JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=menu-item.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { ReactElement } from 'react';
2
+ import { IconSymbol } from '../../../components';
3
+ import { MenuItemVariant } from './components';
4
+ export type DropDownMenuOptionProps = {
5
+ label: string;
6
+ value: string;
7
+ icon?: IconSymbol;
8
+ isSelected?: boolean;
9
+ isDisabled?: boolean;
10
+ helperLabel?: string;
11
+ variant?: MenuItemVariant;
12
+ onClick?: () => void;
13
+ };
14
+ type Props = {
15
+ className?: string;
16
+ selectedIDs: string[];
17
+ variant?: MenuItemVariant;
18
+ emptyElement?: ReactElement;
19
+ options: DropDownMenuOptionProps[];
20
+ };
21
+ export declare function DropDownMenu({ options, className, emptyElement, selectedIDs, variant, }: Props): JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=drop-down-menu.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './drop-down-menu';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { IconColor, IconSize, IconSymbol } from '../../../components';
2
+ type Props = {
3
+ isDisabled?: boolean;
4
+ icon: IconSymbol;
5
+ size?: IconSize;
6
+ color?: IconColor;
7
+ onClick?: () => void;
8
+ className?: string;
9
+ };
10
+ export declare function IconButton({ isDisabled, icon, size, color, onClick, className, }: Props): JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=icon-button.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './icon-button';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { IconSize } from '../../../../components';
2
+ type Props = {
3
+ isDisabled: boolean;
4
+ size?: IconSize;
5
+ onClick: () => void;
6
+ className?: string;
7
+ };
8
+ export declare function ClearButton({ isDisabled, size, onClick, className, }: Props): JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=clear-button.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './search-bar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ChangeEvent } from 'react';
2
+ type Props = {
3
+ isDisabled?: boolean;
4
+ value: string;
5
+ placeholder?: string;
6
+ onChange: (e: ChangeEvent<HTMLInputElement>) => void;
7
+ onClear: () => void;
8
+ className?: string;
9
+ };
10
+ export declare function SearchBar({ isDisabled, value, placeholder, onChange, onClear, className, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=search-bar.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './text';
2
+ export * from './text-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export declare enum TextVariant {
3
+ HEADLINE = "headline",
4
+ SUBTITLE = "subtitle",
5
+ ACCENT = "accent",
6
+ BODY = "body",
7
+ BODY_SEMIBOLD = "bodySemibold",
8
+ BODY_BOLD = "bodyBold",
9
+ LINK = "link",
10
+ HELPER = "helper"
11
+ }
12
+ export declare const TextStyle: Record<TextVariant, string>;
13
+ export declare enum TextColors {
14
+ WHITE = "text-white",
15
+ BLACK = "text-gray-01",
16
+ BLACK_02 = "text-gray-02",
17
+ BLACK_03 = "text-gray-03",
18
+ BLUE = "text-blue-01",
19
+ BLUE_03 = "text-blue-03",
20
+ RED = "text-red-01",
21
+ RED_03 = "text-red-03",
22
+ PURPLE = "text-purple-01"
23
+ }
24
+ export type PropsOf<C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<unknown>> = JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;
25
+ type AsProp<C extends React.ElementType> = {
26
+ as?: C;
27
+ };
28
+ export type ExtendableProps<ExtendedProps = {}, OverrideProps = {}> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
29
+ export type InheritableElementProps<C extends React.ElementType, Props = {}> = ExtendableProps<PropsOf<C>, Props>;
30
+ export type PolymorphicComponentProps<C extends React.ElementType, Props = {}> = InheritableElementProps<C, Props & AsProp<C>>;
31
+ export type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
32
+ export type PolymorphicComponentPropsWithRef<C extends React.ElementType, Props = {}> = PolymorphicComponentProps<C, Props> & {
33
+ ref?: PolymorphicRef<C>;
34
+ };
35
+ export {};
36
+ //# sourceMappingURL=text-types.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { PolymorphicComponentPropsWithRef, TextColors, TextVariant } from './text-types';
3
+ declare const textStyles: (props?: ({
4
+ variant?: TextVariant | null | undefined;
5
+ color?: TextColors | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ type TextProps<C extends React.ElementType> = PolymorphicComponentPropsWithRef<C, Omit<VariantProps<typeof textStyles>, 'variant' | 'color'> & {
8
+ variant?: TextVariant;
9
+ color?: TextColors;
10
+ }>;
11
+ type TextComponent = <C extends React.ElementType = 'span'>(props: TextProps<C>) => React.ReactElement | null;
12
+ export declare const Text: TextComponent;
13
+ export {};
14
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './text-button';
2
+ export * from './text-button-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ export declare enum TextButtonVariant {
2
+ DEFAULT = "DEFAULT",
3
+ DESTRUCTIVE = "DESTRUCTIVE"
4
+ }
5
+ export declare const textButtonStyles: {
6
+ [type in TextButtonVariant]: string;
7
+ };
8
+ //# sourceMappingURL=text-button-types.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { IconSymbol } from '../../../components';
2
+ import { TextButtonVariant } from './text-button-types';
3
+ type Props = {
4
+ isDisabled?: boolean;
5
+ label: string;
6
+ className?: string;
7
+ icon?: IconSymbol;
8
+ variant?: TextButtonVariant;
9
+ onClick: () => void;
10
+ };
11
+ export declare function TextButton({ isDisabled, label, className, icon, variant, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=text-button.d.ts.map
@@ -0,0 +1,16 @@
1
+ export * from './atoms/billo-icon';
2
+ export * from './atoms/button';
3
+ export * from './atoms/check-box';
4
+ export * from './atoms/chip/chip';
5
+ export * from './atoms/chip/chips-list';
6
+ export * from './atoms/drop-down-menu';
7
+ export * from './atoms/icon-button';
8
+ export * from './atoms/search-bar';
9
+ export * from './atoms/text';
10
+ export * from './atoms/text-button';
11
+ export * from './molecules/form';
12
+ export * from './molecules/form/form-select';
13
+ export * from './molecules/form/form-text-field';
14
+ export * from './molecules/select';
15
+ export * from './molecules/text-field';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { FormControlProps } from '../../../../containers';
2
+ import { SelectProps } from '../../../../components';
3
+ export type FormSelectProps = FormControlProps & SelectProps & {
4
+ formControlClassName?: string;
5
+ };
6
+ export declare function FormSelect({ formControlClassName, ...props }: FormSelectProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=form-select.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './form-select';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { FormikValues } from 'formik';
2
+ import { FormHelpers, FormRenderProps } from './form-types';
3
+ export type TestFormValues = {
4
+ test: string;
5
+ };
6
+ export type FormConfig<FormValuesType> = {
7
+ initialValues: FormValuesType;
8
+ onSubmit: (values: FormValuesType, helpers?: FormHelpers<FormValuesType>) => void;
9
+ };
10
+ export declare function createMockFormikProps<T extends FormikValues>(config: FormConfig<T>): FormRenderProps<T>;
11
+ //# sourceMappingURL=form-story-stubs.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { FormRenderProps } from './form-types';
2
+ export type TestFormValues = {
3
+ test: string;
4
+ };
5
+ export declare const mockFormProps: FormRenderProps<TestFormValues>;
6
+ //# sourceMappingURL=form-test-stubs.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { FormControlProps } from '../../../../containers';
2
+ import { TextFieldProps } from '../../../../components';
3
+ export type FormTextFieldProps = FormControlProps & TextFieldProps & {
4
+ formControlClassName?: string;
5
+ };
6
+ export declare function FormTextField({ formControlClassName, ...props }: FormTextFieldProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=form-text-field.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './form-text-field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ import BaseSchema from 'yup/lib/schema';
2
+ import { FormikHelpers, FormikProps } from 'formik';
3
+ export type FormNames<FormValuesType> = {
4
+ [key in keyof FormValuesType]: string;
5
+ };
6
+ export type FormErrors<FormValuesType> = {
7
+ [key in keyof FormValuesType]: string;
8
+ };
9
+ export type FormSchema<FormValuesType> = {
10
+ [key in keyof FormValuesType]: BaseSchema;
11
+ };
12
+ export type FormHelpers<FormValuesType> = FormikHelpers<FormValuesType>;
13
+ export type FormRenderProps<FormValuesType> = FormikProps<FormValuesType> & {
14
+ submitButtonDisabled: boolean;
15
+ };
16
+ export type FormConfig<FormValuesType> = {
17
+ enableReinitialize?: boolean;
18
+ names: FormNames<FormValuesType>;
19
+ initialValues: FormValuesType;
20
+ validationSchema?: FormSchema<FormValuesType>;
21
+ innerRef?: React.Ref<FormikProps<FormValuesType>>;
22
+ onSubmit: (values: FormValuesType, helpers?: FormHelpers<FormValuesType>) => void;
23
+ };
24
+ //# sourceMappingURL=form-types.d.ts.map
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { FormikValues } from 'formik';
3
+ import { FormConfig, FormNames, FormRenderProps } from './form-types';
4
+ type FormProps<FormValuesType> = {
5
+ id?: string;
6
+ config: FormConfig<FormValuesType>;
7
+ className?: string;
8
+ children: (props: FormRenderProps<FormValuesType>, names: FormNames<FormValuesType>) => React.ReactElement;
9
+ };
10
+ export declare function Form<FormValuesType extends FormikValues>({ id, config, className, children, }: FormProps<FormValuesType>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './form';
2
+ export * from './form-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ export type SelectInputProps = {
2
+ isDisabled?: boolean;
3
+ className?: string;
4
+ inputValue: string;
5
+ handleInputChange: (value: string) => void;
6
+ };
7
+ export declare const SelectInput: import("react").ForwardRefExoticComponent<SelectInputProps & import("react").RefAttributes<HTMLInputElement>>;
8
+ //# sourceMappingURL=select-input.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './select';
2
+ export * from './use-select';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { DropDownMenuOptionProps } from '../../../components';
2
+ export type SelectProps = {
3
+ isDisabled?: boolean;
4
+ isMultiSelect?: boolean;
5
+ removeOnSelect?: boolean;
6
+ isErrorVisible?: boolean;
7
+ className?: string;
8
+ emptyLabel?: string;
9
+ initialInputValue?: string;
10
+ initialValues?: string[] | string;
11
+ options: DropDownMenuOptionProps[];
12
+ onChangeText?: (value: string) => void;
13
+ onOptionChange?: (options: string[]) => void;
14
+ };
15
+ export declare function Select({ isDisabled, isMultiSelect, removeOnSelect, isErrorVisible, className, emptyLabel, initialInputValue, initialValues, options, onChangeText, onOptionChange, }: SelectProps): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { ChipOptionsProps, DropDownMenuOptionProps } from '@/components';
2
+ export type UseSelectHook = {
3
+ openDropdownMenu: boolean;
4
+ inputValue: string;
5
+ selectedValues: string[];
6
+ chipsData: ChipOptionsProps[];
7
+ searchedOptions: DropDownMenuOptionProps[];
8
+ inputRef: React.RefObject<HTMLInputElement>;
9
+ containerRef: React.RefObject<HTMLInputElement>;
10
+ handleDropdownMenu: () => void;
11
+ handleInputChange: (value: string) => void;
12
+ };
13
+ export type UseSelectProps = {
14
+ isMultiSelect: boolean;
15
+ removeOnSelect: boolean;
16
+ initialInputValue?: string;
17
+ options: DropDownMenuOptionProps[];
18
+ initialValues?: string[] | string;
19
+ onChangeText?: (value: string) => void;
20
+ onOptionChange?: (options: string[]) => void;
21
+ };
22
+ export declare function useSelect({ isMultiSelect, removeOnSelect, initialInputValue, options, initialValues, onChangeText, onOptionChange, }: UseSelectProps): UseSelectHook;
23
+ //# sourceMappingURL=use-select.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './text-field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { RefObject } from 'react';
2
+ type InputFieldProps = {
3
+ isRequired?: boolean;
4
+ isDisabled?: boolean;
5
+ value?: any;
6
+ onBlur?: (event?: any) => void;
7
+ onChange?: (event?: any) => void;
8
+ onFocus?: (event?: any) => void;
9
+ className?: string;
10
+ };
11
+ type IntrinsicInputFieldProps = InputFieldProps & JSX.IntrinsicElements['input'];
12
+ export type TextFieldProps = IntrinsicInputFieldProps & {
13
+ ref?: RefObject<any>;
14
+ inputForwardedRef?: RefObject<any>;
15
+ };
16
+ export declare function TextField({ isRequired, isDisabled, type, name, value, placeholder, onBlur, onChange, className, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=text-field.d.ts.map
@@ -0,0 +1,7 @@
1
+ type FormErrorProps = {
2
+ errorText: string;
3
+ className?: string;
4
+ };
5
+ export declare function FormError({ errorText, className }: FormErrorProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=form-error.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { TextColors } from '../../../components';
2
+ type Props = {
3
+ helperText: string;
4
+ color?: TextColors;
5
+ className?: string;
6
+ };
7
+ export declare function FormHelper({ helperText, className, color }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=form-helper.d.ts.map
@@ -0,0 +1,10 @@
1
+ type Props = {
2
+ isRequired?: boolean;
3
+ hideRequiredMark?: boolean;
4
+ label: string;
5
+ optionalLabel?: string;
6
+ className?: string;
7
+ };
8
+ export declare function FormLabel({ isRequired, hideRequiredMark, label, className, optionalLabel, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=form-label.d.ts.map
@@ -0,0 +1,11 @@
1
+ export declare enum FormInputWidth {
2
+ ONE_COLUMN = "ONE_COLUMN",
3
+ TWO_COLUMN = "TWO_COLUMN",
4
+ THREE_COLUMN = "THREE_COLUMN",
5
+ FOUR_COLUMN = "FOUR_COLUMN",
6
+ FIVE_COLUMN = "FIVE_COLUMN"
7
+ }
8
+ export declare const FormInputWidthClassNames: {
9
+ [type in FormInputWidth]: string;
10
+ };
11
+ //# sourceMappingURL=form-control-types.d.ts.map
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { FormRenderProps } from '../../components';
3
+ import { FormInputWidth } from './form-control-types';
4
+ export type FormControlProps = {
5
+ isDisabled?: boolean;
6
+ isRequired?: boolean;
7
+ formName: string;
8
+ label?: string;
9
+ errorText?: string;
10
+ className?: string;
11
+ helperText?: string;
12
+ optionalLabel?: string;
13
+ inputWidth?: FormInputWidth;
14
+ formProps: FormRenderProps<any>;
15
+ };
16
+ type ChildrenRenderProps = {
17
+ isErrorVisible: boolean;
18
+ };
19
+ type Props = FormControlProps & {
20
+ children?: (renderProps: ChildrenRenderProps) => React.ReactElement;
21
+ };
22
+ export declare function FormControl({ isDisabled, isRequired, formName, label, formProps, className, errorText, helperText, optionalLabel, inputWidth, children, }: Props): import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=form-control.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './form-control';
2
+ export * from './form-control-types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './form-control';
2
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  export declare const _periodUI_marker = true;
2
2
  export { BilloIcon, IconColor, IconSymbol, IconSize, Button, ButtonVariant, Checkbox, CheckboxVariant, Chip, ChipList, DropDownMenu, IconButton, SearchBar, Text, TextVariant, TextColors, TextButton, TextButtonVariant, } from './components';
3
- export * from './components';
4
- export type * from './components';
5
3
  export { Form, FormSelect, Select, FormTextField, TextField } from './components';
6
4
  export type { FormErrors, FormConfig, FormHelpers, FormNames, FormRenderProps, FormSchema, } from './components';
7
5
  export type { ButtonProps, CheckboxProps, ChipProps, TextFieldProps, FormSelectProps, FormTextFieldProps, } from './components';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,mBAAmB,cAAc,CAAC;AAGlC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClF,YAAY,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,aAAa,EACb,SAAS,EAMT,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAClF,YAAY,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,WAAW,EACX,aAAa,EACb,SAAS,EAMT,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export const _periodUI_marker = true;
2
2
  export { BilloIcon, IconColor, IconSymbol, IconSize, Button, ButtonVariant, Checkbox, CheckboxVariant, Chip, ChipList, DropDownMenu, IconButton, SearchBar, Text, TextVariant, TextColors, TextButton, TextButtonVariant, } from './components';
3
- export * from './components';
4
3
  export { Form, FormSelect, Select, FormTextField, TextField } from './components';
5
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAEtB,cAAc,cAAc,CAAC;AAI7B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ type WindowDimensionsHook = {
2
+ normalize: (value?: string) => string;
3
+ };
4
+ export declare function useStringUtils(): WindowDimensionsHook;
5
+ export {};
6
+ //# sourceMappingURL=string-utils.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function tailwind(...classes: ClassValue[]): string;
3
+ //# sourceMappingURL=tailwind-utils.d.ts.map
@@ -0,0 +1,9 @@
1
+ type WindowDimensionsHook = {
2
+ width: number;
3
+ height: number;
4
+ isMobile: boolean;
5
+ isDesktop: boolean;
6
+ };
7
+ export declare function useWindowDimensions(): WindowDimensionsHook;
8
+ export {};
9
+ //# sourceMappingURL=window-dimensions-utils.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=vitest.setup.d.ts.map
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "period-ui",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
+ "type": "commonjs",
6
7
  "files": [
7
8
  "dist",
8
9
  "README.md",