@modul/mbui 0.0.13-beta-pv-53036-fcbcc069 → 0.0.13-beta-pv-53036-3e26be0c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const buttonVariants: (props?: {
4
- variant?: "outline" | "success" | "primary" | "secondary" | "primary-outline" | "ghost";
4
+ variant?: "primary" | "secondary" | "success" | "primary-outline" | "outline" | "ghost";
5
5
  size?: "lg" | "md" | "sm" | "xs" | "xxs";
6
6
  } & import("class-variance-authority/dist/types").ClassProp) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { DayPicker } from 'react-day-picker';
3
+ export declare type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
5
+ declare namespace Calendar {
6
+ var displayName: string;
7
+ }
8
+ export { Calendar };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Calendar = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = (0, tslib_1.__importStar)(require("react"));
6
+ const react_day_picker_1 = require("react-day-picker");
7
+ const utils_1 = require("../@/lib/utils");
8
+ const Button_1 = require("../Button");
9
+ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
10
+ return (React.createElement(react_day_picker_1.DayPicker, { showOutsideDays: showOutsideDays, className: (0, utils_1.cn)('p-3', className), classNames: {
11
+ months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
12
+ month: 'space-y-4',
13
+ caption: 'flex justify-center pt-1 relative items-center',
14
+ caption_label: 'text-sm font-medium',
15
+ nav: 'space-x-1 flex items-center',
16
+ nav_button: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: 'outline' }), 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'),
17
+ nav_button_previous: 'absolute left-1',
18
+ nav_button_next: 'absolute right-1',
19
+ table: 'w-full border-collapse space-y-1',
20
+ head_row: 'flex',
21
+ head_cell: 'text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]',
22
+ row: 'flex w-full mt-2',
23
+ cell: (0, utils_1.cn)('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md', props.mode === 'range'
24
+ ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'
25
+ : '[&:has([aria-selected])]:rounded-md'),
26
+ day: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: 'ghost' }), 'h-8 w-8 p-0 font-normal aria-selected:opacity-100'),
27
+ day_range_start: 'day-range-start',
28
+ day_range_end: 'day-range-end',
29
+ day_selected: 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
30
+ day_today: 'bg-accent text-accent-foreground',
31
+ day_outside: 'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
32
+ day_disabled: 'text-muted-foreground opacity-50',
33
+ day_range_middle: 'aria-selected:bg-accent aria-selected:text-accent-foreground',
34
+ day_hidden: 'invisible',
35
+ ...classNames,
36
+ }, components: {
37
+ // IconLeft: ({ ...props }) => <Left className="w-4 h-4" />,
38
+ // IconRight: ({ ...props }) => <Right className="w-4 h-4" />,
39
+ }, ...props }));
40
+ }
41
+ exports.Calendar = Calendar;
42
+ Calendar.displayName = 'Calendar';
43
+ //# sourceMappingURL=Calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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AAU;SACb,EACD,UAAU,EAAE;QACX,4DAA4D;QAC5D,8DAA8D;SAC9D,KACG,KAAK,GACR,CACF,CAAA;AACF,CAAC;AAGQ,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
@@ -0,0 +1 @@
1
+ export { Calendar } from './Calendar';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Calendar = void 0;
4
+ var Calendar_1 = require("./Calendar");
5
+ Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return Calendar_1.Calendar; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Calendar/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const chipVariants: (props?: {
4
- variant?: "outline" | "success" | "primary" | "secondary" | "primary-outline" | "ghost";
4
+ variant?: "primary" | "secondary" | "success" | "primary-outline" | "outline" | "ghost";
5
5
  size?: "lg" | "md" | "sm" | "xs" | "xxs";
6
6
  } & import("class-variance-authority/dist/types").ClassProp) => string;
7
7
  export interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { ControllerProps, FieldValues } from 'react-hook-form';
4
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues = undefined>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
6
+ declare const useFormField: () => {
7
+ invalid: boolean;
8
+ isDirty: boolean;
9
+ isTouched: boolean;
10
+ isValidating: boolean;
11
+ error?: import("react-hook-form").FieldError;
12
+ id: string;
13
+ name: string;
14
+ formItemId: string;
15
+ formDescriptionId: string;
16
+ formMessageId: string;
17
+ };
18
+ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
21
+ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
22
+ declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.Form = exports.useFormField = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = (0, tslib_1.__importStar)(require("react"));
6
+ const react_slot_1 = require("@radix-ui/react-slot");
7
+ const react_hook_form_1 = require("react-hook-form");
8
+ const utils_1 = require("../@/lib/utils");
9
+ const Label_1 = require("../Label");
10
+ const Form = react_hook_form_1.FormProvider;
11
+ exports.Form = Form;
12
+ const FormFieldContext = React.createContext({});
13
+ const FormField = ({ ...props }) => {
14
+ return (React.createElement(FormFieldContext.Provider, { value: { name: props.name } },
15
+ React.createElement(react_hook_form_1.Controller, { ...props })));
16
+ };
17
+ exports.FormField = FormField;
18
+ const useFormField = () => {
19
+ const fieldContext = React.useContext(FormFieldContext);
20
+ const itemContext = React.useContext(FormItemContext);
21
+ const { getFieldState, formState } = (0, react_hook_form_1.useFormContext)();
22
+ const fieldState = getFieldState(fieldContext.name, formState);
23
+ if (!fieldContext) {
24
+ throw new Error('useFormField should be used within <FormField>');
25
+ }
26
+ const { id } = itemContext;
27
+ return {
28
+ id,
29
+ name: fieldContext.name,
30
+ formItemId: `${id}-form-item`,
31
+ formDescriptionId: `${id}-form-item-description`,
32
+ formMessageId: `${id}-form-item-message`,
33
+ ...fieldState,
34
+ };
35
+ };
36
+ exports.useFormField = useFormField;
37
+ const FormItemContext = React.createContext({});
38
+ const FormItem = React.forwardRef(({ className, ...props }, ref) => {
39
+ const id = React.useId();
40
+ return (React.createElement(FormItemContext.Provider, { value: { id } },
41
+ React.createElement("div", { ref: ref, className: (0, utils_1.cn)('space-y-2', className), ...props })));
42
+ });
43
+ exports.FormItem = FormItem;
44
+ FormItem.displayName = 'FormItem';
45
+ const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
46
+ const { error, formItemId } = useFormField();
47
+ return (React.createElement(Label_1.Label, { ref: ref, className: (0, utils_1.cn)(error && 'text-destructive', className), htmlFor: formItemId, ...props }));
48
+ });
49
+ exports.FormLabel = FormLabel;
50
+ FormLabel.displayName = 'FormLabel';
51
+ const FormControl = React.forwardRef(({ ...props }, ref) => {
52
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
53
+ return (React.createElement(react_slot_1.Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
54
+ });
55
+ exports.FormControl = FormControl;
56
+ FormControl.displayName = 'FormControl';
57
+ const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
58
+ const { formDescriptionId } = useFormField();
59
+ return (React.createElement("p", { ref: ref, id: formDescriptionId, className: (0, utils_1.cn)('text-[0.8rem] text-light', className), ...props }));
60
+ });
61
+ exports.FormDescription = FormDescription;
62
+ FormDescription.displayName = 'FormDescription';
63
+ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
64
+ const { error, formMessageId } = useFormField();
65
+ const body = error ? String(error?.message) : children;
66
+ if (!body) {
67
+ return null;
68
+ }
69
+ return (React.createElement("p", { ref: ref, id: formMessageId, className: (0, utils_1.cn)('text-[0.8rem] font-medium text-destructive', className), ...props }, body));
70
+ });
71
+ exports.FormMessage = FormMessage;
72
+ FormMessage.displayName = 'FormMessage';
73
+ //# sourceMappingURL=Form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,qDAA2C;AAC3C,qDAAmH;AAEnH,0CAAmC;AACnC,oCAAgC;AAEhC,MAAM,IAAI,GAAG,8BAAY,CAAA;AA+IF,oBAAI;AAtI3B,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAwB,EAA2B,CAAC,CAAA;AAEhG,MAAM,SAAS,GAAG,CAGhB,EACD,GAAG,KAAK,EAC8B,EAAE,EAAE;IAC1C,OAAO,CACN,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;QACrD,oBAAC,4BAAU,OAAK,KAAK,GAAI,CACE,CAC5B,CAAA;AACF,CAAC,CAAA;AAyH4F,8BAAS;AAvHtG,MAAM,YAAY,GAAG,GAAG,EAAE;IACzB,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;IACvD,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IACrD,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,IAAA,gCAAc,GAAE,CAAA;IAErD,MAAM,UAAU,GAAG,aAAa,CAAC,YAAY,CAAC,IAA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,aAAa,EAAE,GAAG,YAAY,EAAE,CAAA;IAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAEtD,IAAI,CAAC,IAAI,EAAE;QACV,OAAO,IAAI,CAAA;KACX;IAED,OAAO,CACN,2BACC,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,IAAA,UAAE,EAAC,4CAA4C,EAAE,SAAS,CAAC,KAClE,KAAK,IAER,IAAI,CACF,CACJ,CAAA;AACF,CAAC,CACD,CAAA;AAG+E,kCAAW;AAF3F,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA"}
@@ -0,0 +1 @@
1
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from './Form';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.Form = exports.useFormField = void 0;
4
+ var Form_1 = require("./Form");
5
+ Object.defineProperty(exports, "useFormField", { enumerable: true, get: function () { return Form_1.useFormField; } });
6
+ Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
7
+ Object.defineProperty(exports, "FormItem", { enumerable: true, get: function () { return Form_1.FormItem; } });
8
+ Object.defineProperty(exports, "FormLabel", { enumerable: true, get: function () { return Form_1.FormLabel; } });
9
+ Object.defineProperty(exports, "FormControl", { enumerable: true, get: function () { return Form_1.FormControl; } });
10
+ Object.defineProperty(exports, "FormDescription", { enumerable: true, get: function () { return Form_1.FormDescription; } });
11
+ Object.defineProperty(exports, "FormMessage", { enumerable: true, get: function () { return Form_1.FormMessage; } });
12
+ Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return Form_1.FormField; } });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":";;;AAAA,+BAAsH;AAA7G,oGAAA,YAAY,OAAA;AAAE,4FAAA,IAAI,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,uGAAA,eAAe,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,iGAAA,SAAS,OAAA"}
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "textAlign" | "value" | "maxLength" | "onChange" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
2
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
3
3
  value?: string;
4
4
  onChange?: (newValue: string) => unknown;
5
5
  maxLength: number;
6
- textAlign?: "center" | "left" | "right";
6
+ textAlign?: "center" | "right" | "left";
7
7
  onComplete?: (...args: any[]) => unknown;
8
8
  pushPasswordManagerStrategy?: "none" | "increase-width";
9
9
  containerClassName?: string;
@@ -11,11 +11,11 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
11
11
  } & {
12
12
  render: (props: import("input-otp").RenderProps) => React.ReactNode;
13
13
  children?: never;
14
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "textAlign" | "value" | "maxLength" | "onChange" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
14
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "containerClassName" | "noScriptCSSFallback"> & {
15
15
  value?: string;
16
16
  onChange?: (newValue: string) => unknown;
17
17
  maxLength: number;
18
- textAlign?: "center" | "left" | "right";
18
+ textAlign?: "center" | "right" | "left";
19
19
  onComplete?: (...args: any[]) => unknown;
20
20
  pushPasswordManagerStrategy?: "none" | "increase-width";
21
21
  containerClassName?: string;
@@ -1,7 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import Select from 'react-select';
3
- declare const SelectAccountCard: React.ForwardRefExoticComponent<{
4
- className?: string;
5
- defaultValue: {};
6
- } & React.RefAttributes<Select>>;
3
+ declare const SelectAccountCard: React.ForwardRefExoticComponent<React.RefAttributes<Select>>;
7
4
  export { SelectAccountCard };
@@ -63,7 +63,7 @@ const SingleValue = ({ children, ...props }) => {
63
63
  const Menu = ({ children, ...props }) => {
64
64
  return (React.createElement(react_select_1.components.Menu, { className: "absolute inset-x-0 bg-page drop-shadow-1 mt-[8px] rounded-md", ...props }, children));
65
65
  };
66
- const SelectAccountCard = React.forwardRef(({ className, defaultValue, ...props }, ref) => (React.createElement(react_select_1.default, { className: className, isSearchable: false, components: {
66
+ const SelectAccountCard = React.forwardRef(({ ...props }, ref) => (React.createElement(react_select_1.default, { isSearchable: false, components: {
67
67
  Control,
68
68
  Option,
69
69
  SingleValue,
@@ -71,6 +71,6 @@ const SelectAccountCard = React.forwardRef(({ className, defaultValue, ...props
71
71
  IndicatorSeparator: () => null,
72
72
  Menu,
73
73
  ValueContainer,
74
- }, styles: colourStyles, unstyled: true, ...props, defaultValue: defaultValue })));
74
+ }, styles: colourStyles, unstyled: true, ...props })));
75
75
  exports.SelectAccountCard = SelectAccountCard;
76
76
  //# sourceMappingURL=SelectAccountCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAccountCard.js","sourceRoot":"","sources":["../../src/Select/SelectAccountCard.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,kCAAsD;AAEtD,0EASqB;AAEr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G,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;IACnD,OAAO,CACN,oBAAC,yBAAU,CAAC,WAAW,IACtB,SAAS,EAAC,6CAA6C,KACnD,KAAK;QAET,8BAAM,SAAS,EAAC,qDAAqD;YACnE,KAAK;;YAAE,8BAAM,SAAS,EAAC,uCAAuC,IAAE,OAAO,CAAQ,CAC1E;QACP,8BAAM,SAAS,EAAC,wDAAwD;YACtE,OAAO;;YAAG,GAAG,CACR,CACiB,CACzB,CAAA;AACF,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE;IAClD,OAAO,CACN,oBAAC,yBAAU,CAAC,IAAI,IACf,SAAS,EAAC,8DAA8D,KACpE,KAAK,IAER,QAAQ,CACQ,CAClB,CAAA;AACF,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CACzC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC/C,oBAAC,sBAAM,IACN,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE;QACX,OAAO;QACP,MAAM;QACN,WAAW;QACX,iBAAiB;QACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;QAC9B,IAAI;QACJ,cAAc;KACd,EACD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,EACT,YAAY,EAAE,YAAY,GACzB,CACF,CACD,CAAA;AAEQ,8CAAiB"}
1
+ {"version":3,"file":"SelectAccountCard.js","sourceRoot":"","sources":["../../src/Select/SelectAccountCard.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,kCAAsD;AAEtD,0EASqB;AAErB,0CAAmC;AAEnC,MAAM,oBAAoB,GACzB,6MAA6M,CAAA;AAE9M,MAAM,YAAY,GAAiB;IAClC,OAAO,EAAE,GAAG,E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6C,KACnD,KAAK;QAET,8BAAM,SAAS,EAAC,qDAAqD;YACnE,KAAK;;YAAE,8BAAM,SAAS,EAAC,uCAAuC,IAAE,OAAO,CAAQ,CAC1E;QACP,8BAAM,SAAS,EAAC,wDAAwD;YACtE,OAAO;;YAAG,GAAG,CACR,CACiB,CACzB,CAAA;AACF,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE;IAClD,OAAO,CACN,oBAAC,yBAAU,CAAC,IAAI,IACf,SAAS,EAAC,8DAA8D,KACpE,KAAK,IAER,QAAQ,CACQ,CAClB,CAAA;AACF,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzE,oBAAC,sBAAM,IACN,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE;QACX,OAAO;QACP,MAAM;QACN,WAAW;QACX,iBAAiB;QACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;QAC9B,IAAI;QACJ,cAAc;KACd,EACD,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,GACR,CACF,CAAC,CAAA;AAGO,8CAAiB"}
package/dist/index.d.ts CHANGED
@@ -20,4 +20,6 @@ import { Switch } from './Switch';
20
20
  import { Label } from './Label';
21
21
  import { Textarea } from './Textarea';
22
22
  import { SelectAccountCard } from './Select';
23
- export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Alert, Switch, Label, Textarea, SelectAccountCard, };
23
+ import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage } from './Form';
24
+ import { Calendar } from './Calendar';
25
+ export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Alert, Switch, Label, Textarea, SelectAccountCard, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
3
+ exports.Calendar = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormItem = exports.FormField = exports.FormLabel = exports.Form = exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Tooltip_1 = require("./Tooltip");
6
6
  Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
@@ -63,4 +63,14 @@ const Textarea_1 = require("./Textarea");
63
63
  Object.defineProperty(exports, "Textarea", { enumerable: true, get: function () { return Textarea_1.Textarea; } });
64
64
  const Select_1 = require("./Select");
65
65
  Object.defineProperty(exports, "SelectAccountCard", { enumerable: true, get: function () { return Select_1.SelectAccountCard; } });
66
+ const Form_1 = require("./Form");
67
+ Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
68
+ Object.defineProperty(exports, "FormLabel", { enumerable: true, get: function () { return Form_1.FormLabel; } });
69
+ Object.defineProperty(exports, "FormField", { enumerable: true, get: function () { return Form_1.FormField; } });
70
+ Object.defineProperty(exports, "FormItem", { enumerable: true, get: function () { return Form_1.FormItem; } });
71
+ Object.defineProperty(exports, "FormControl", { enumerable: true, get: function () { return Form_1.FormControl; } });
72
+ Object.defineProperty(exports, "FormDescription", { enumerable: true, get: function () { return Form_1.FormDescription; } });
73
+ Object.defineProperty(exports, "FormMessage", { enumerable: true, get: function () { return Form_1.FormMessage; } });
74
+ const Calendar_1 = require("./Calendar");
75
+ Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return Calendar_1.Calendar; } });
66
76
  //# 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":";;;;AAAA,uCAAmC;AAmClC,wFAnCQ,iBAAO,OAmCR;AAlCR,iCAA6B;AAmC5B,qFAnCQ,WAAI,OAmCR;AAlCL,qCAAiC;AAmChC,uFAnCQ,eAAM,OAmCR;AAlCP,uCAAmC;AAmClC,wFAnCQ,iBAAO,OAmCR;AAlCR,+DAAyB;AAmCxB,eAnCM,cAAI,CAmCN;AAlCL,2CAAsF;AAmCrF,yFAnCQ,oBAAQ,OAmCR;AACR,8FApCkB,yBAAa,OAoClB;AACb,6FArCiC,wBAAY,OAqCjC;AACZ,kGAtC+C,6BAAiB,OAsC/C;AArClB,yDAK2B;AAoD1B,iGAxDA,mCAAgB,OAwDA;AAChB,qGAxDA,uCAAoB,OAwDA;AACpB,yGAxDA,2CAAwB,OAwDA;AACxB,qGAxDA,uCAAoB,OAwDA;AAtDrB,0DAA8B;AA6C7B,oBAAI;AA5CL,+CAAmF;AA+BlF,4FA/BQ,yBAAW,OA+BR;AACX,mGAhCqB,gCAAkB,OAgCrB;AAClB,mGAjCyC,gCAAkB,OAiCzC;AAhCnB,+CAMsB;AA2BrB,mGAhCA,gCAAkB,OAgCA;AAClB,yGAhCA,sCAAwB,OAgCA;AACxB,0GAhCA,uCAAyB,OAgCA;AACzB,0GAhCA,uCAAyB,OAgCA;AACzB,8GAhCA,2CAA6B,OAgCA;AA9B9B,qCAAiC;AA+BhC,uFA/BQ,eAAM,OA+BR;AA9BP,mCAA+B;AAiC9B,sFAjCQ,aAAK,OAiCR;AAhCN,yCAAkC;AAiCjC,mFAjCQ,UAAE,OAiCR;AAhCH,qCAAyF;AAkCxF,uFAlCQ,eAAM,OAkCR;AACN,8FAnCgB,sBAAa,OAmChB;AACb,4FApC+B,oBAAW,OAoC/B;AACX,4FArC4C,oBAAW,OAqC5C;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Manager": "yarn@3.5.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -40,6 +40,7 @@
40
40
  "input-otp": "1.2.4",
41
41
  "lodash": "4.17.5",
42
42
  "react-datepicker": "4.16.0",
43
+ "react-day-picker": "^9.0.8",
43
44
  "react-hook-form": "7.53.0",
44
45
  "react-imask": "7.1.3",
45
46
  "react-select": "5.8.0",
@@ -0,0 +1,59 @@
1
+ import * as React from 'react'
2
+ import { DayPicker } from 'react-day-picker'
3
+ import { cn } from '../@/lib/utils'
4
+ import { buttonVariants } from '../Button'
5
+ import { Left, Right } from '../Icon'
6
+
7
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>
8
+
9
+ function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {
10
+ return (
11
+ <DayPicker
12
+ showOutsideDays={showOutsideDays}
13
+ className={cn('p-3', className)}
14
+ classNames={{
15
+ months: 'flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0',
16
+ month: 'space-y-4',
17
+ caption: 'flex justify-center pt-1 relative items-center',
18
+ caption_label: 'text-sm font-medium',
19
+ nav: 'space-x-1 flex items-center',
20
+ nav_button: cn(
21
+ buttonVariants({ variant: 'outline' }),
22
+ 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100'
23
+ ),
24
+ nav_button_previous: 'absolute left-1',
25
+ nav_button_next: 'absolute right-1',
26
+ table: 'w-full border-collapse space-y-1',
27
+ head_row: 'flex',
28
+ head_cell: 'text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]',
29
+ row: 'flex w-full mt-2',
30
+ cell: cn(
31
+ 'relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md',
32
+ props.mode === 'range'
33
+ ? '[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md'
34
+ : '[&:has([aria-selected])]:rounded-md'
35
+ ),
36
+ day: cn(buttonVariants({ variant: 'ghost' }), 'h-8 w-8 p-0 font-normal aria-selected:opacity-100'),
37
+ day_range_start: 'day-range-start',
38
+ day_range_end: 'day-range-end',
39
+ day_selected:
40
+ 'bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground',
41
+ day_today: 'bg-accent text-accent-foreground',
42
+ day_outside:
43
+ 'day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30',
44
+ day_disabled: 'text-muted-foreground opacity-50',
45
+ day_range_middle: 'aria-selected:bg-accent aria-selected:text-accent-foreground',
46
+ day_hidden: 'invisible',
47
+ ...classNames,
48
+ }}
49
+ components={{
50
+ // IconLeft: ({ ...props }) => <Left className="w-4 h-4" />,
51
+ // IconRight: ({ ...props }) => <Right className="w-4 h-4" />,
52
+ }}
53
+ {...props}
54
+ />
55
+ )
56
+ }
57
+ Calendar.displayName = 'Calendar'
58
+
59
+ export { Calendar }
@@ -0,0 +1 @@
1
+ export { Calendar } from './Calendar'
@@ -0,0 +1,41 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+
5
+ import { format } from "date-fns"
6
+
7
+ import { cn } from "../@/lib/utils"
8
+ import { Button } from "../Button"
9
+ import { Calendar } from "../Calendar"
10
+ import {
11
+ Popover,
12
+ } from "../Popover"
13
+
14
+ export function DatePickerDemo() {
15
+ const [date, setDate] = React.useState<Date>()
16
+
17
+ return (
18
+ <Popover>
19
+ <Popover.Trigger asChild>
20
+ <Button
21
+ variant={"outline"}
22
+ className={cn(
23
+ "w-[240px] justify-start text-left font-normal",
24
+ !date && "text-muted-foreground"
25
+ )}
26
+ >
27
+ {/* <CalendarIcon className="mr-2 w-4 h-4" /> */}
28
+ {date ? format(date, "PPP") : <span>Pick a date</span>}
29
+ </Button>
30
+ </Popover.Trigger>
31
+ <Popover.Content className="p-0 w-auto" align="start">
32
+ <Calendar
33
+ mode="single"
34
+ // selected={date}
35
+ // onSelect={setDate}
36
+ // initialFocus
37
+ />
38
+ </Popover.Content>
39
+ </Popover>
40
+ )
41
+ }
@@ -0,0 +1 @@
1
+ export { Datepicker } from './Datepicker'
package/src/Form/Form.tsx CHANGED
@@ -118,7 +118,7 @@ const FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttribu
118
118
  <p
119
119
  ref={ref}
120
120
  id={formDescriptionId}
121
- className={cn('text-[0.8rem] text-muted-foreground', className)}
121
+ className={cn('text-[0.8rem] text-light', className)}
122
122
  {...props}
123
123
  />
124
124
  )
@@ -32,7 +32,6 @@ const colourStyles: StylesConfig = {
32
32
 
33
33
  const Control = ({ children, ...props }: ControlProps) => {
34
34
  const { isFocused } = props
35
-
36
35
  return (
37
36
  <components.Control
38
37
  className={cn(
@@ -142,26 +141,23 @@ const Menu = ({ children, ...props }: MenuProps) => {
142
141
  )
143
142
  }
144
143
 
145
- const SelectAccountCard = React.forwardRef<Select, { className?: string; defaultValue: {} }>(
146
- ({ className, defaultValue, ...props }, ref) => (
147
- <Select
148
- className={className}
149
- isSearchable={false}
150
- components={{
151
- Control,
152
- Option,
153
- SingleValue,
154
- DropdownIndicator,
155
- IndicatorSeparator: () => null,
156
- Menu,
157
- ValueContainer,
158
- }}
159
- styles={colourStyles}
160
- unstyled={true}
161
- {...props}
162
- defaultValue={defaultValue}
163
- />
164
- )
165
- )
144
+ const SelectAccountCard = React.forwardRef<Select>(({ ...props }, ref) => (
145
+ <Select
146
+ isSearchable={false}
147
+ components={{
148
+ Control,
149
+ Option,
150
+ SingleValue,
151
+ DropdownIndicator,
152
+ IndicatorSeparator: () => null,
153
+ Menu,
154
+ ValueContainer,
155
+ }}
156
+ styles={colourStyles}
157
+ unstyled={true}
158
+ {...props}
159
+ />
160
+ ))
161
+
166
162
 
167
163
  export { SelectAccountCard }
package/src/index.ts CHANGED
@@ -31,6 +31,9 @@ import { Switch } from './Switch'
31
31
  import { Label } from './Label'
32
32
  import { Textarea } from './Textarea'
33
33
  import { SelectAccountCard } from './Select'
34
+ import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage } from './Form'
35
+ import { Calendar } from './Calendar'
36
+ // import { Datepicker } from './Datepicker'
34
37
 
35
38
  export {
36
39
  Tooltip,
@@ -72,4 +75,13 @@ export {
72
75
  Label,
73
76
  Textarea,
74
77
  SelectAccountCard,
78
+ Form,
79
+ FormLabel,
80
+ FormField,
81
+ FormItem,
82
+ FormControl,
83
+ FormDescription,
84
+ FormMessage,
85
+ Calendar,
86
+ // Datepicker,
75
87
  }