@e-burgos/tucu-ui 1.0.0 → 1.1.1

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 (133) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +2 -2
  3. package/components/common/index.d.ts +0 -1
  4. package/components/dialog/drawer.d.ts +1 -1
  5. package/components/dialog/modal.d.ts +2 -0
  6. package/components/dialog/sidebar-menu.d.ts +1 -1
  7. package/components/forms/example/index.d.ts +4 -0
  8. package/components/forms/index.d.ts +5 -17
  9. package/components/forms/types/extend-react-hook-form.type.d.ts +19 -0
  10. package/components/forms/types/validations.type.d.ts +8 -0
  11. package/components/icons/chevron-left.d.ts +1 -0
  12. package/components/icons/index.d.ts +1 -0
  13. package/components/index.d.ts +2 -1
  14. package/components/inputs/checkbox.d.ts +42 -0
  15. package/components/inputs/helpers/field-error-text.d.ts +19 -0
  16. package/components/inputs/helpers/field-helper-text.d.ts +18 -0
  17. package/components/inputs/index.d.ts +15 -0
  18. package/components/inputs/input-searcher.d.ts +13 -0
  19. package/components/inputs/input.d.ts +22 -0
  20. package/components/inputs/pin-code.d.ts +97 -0
  21. package/components/inputs/radio.d.ts +84 -0
  22. package/components/inputs/select.d.ts +26 -0
  23. package/components/inputs/switch.d.ts +15 -0
  24. package/components/inputs/textarea.d.ts +16 -0
  25. package/components/layouts/{classic/layout.d.ts → admin-layout/index.d.ts} +4 -4
  26. package/components/layouts/{authentication/layout.d.ts → clean-layout/index.d.ts} +2 -2
  27. package/components/layouts/header/admin-header.d.ts +8 -0
  28. package/components/layouts/header/admin-right-area.d.ts +3 -0
  29. package/components/layouts/header/header.d.ts +1 -8
  30. package/components/layouts/header/horizontal-header.d.ts +10 -0
  31. package/components/layouts/header/horizontal-right-area.d.ts +9 -0
  32. package/components/layouts/horizontal/index.d.ts +16 -0
  33. package/components/layouts/menus/collapsible-menu.d.ts +2 -2
  34. package/components/layouts/menus/expandable-sidebar.d.ts +1 -1
  35. package/components/layouts/menus/horizontal-nav-menu.d.ts +5 -0
  36. package/components/{common → layouts/menus}/menu-item.d.ts +5 -3
  37. package/components/layouts/root-layout.d.ts +2 -2
  38. package/components/legacy/forms/form-system/example/error-container-example.d.ts +3 -0
  39. package/components/legacy/forms/form-system/example/form-example.d.ts +3 -0
  40. package/components/legacy/forms/form-system/example/form-methods-example.d.ts +3 -0
  41. package/components/legacy/forms/form-system/example/validations.d.ts +14 -0
  42. package/components/legacy/forms/form-system/form-field.d.ts +14 -0
  43. package/components/legacy/forms/form-system/form.d.ts +13 -0
  44. package/components/legacy/forms/form-system/hook-form.d.ts +3 -0
  45. package/components/legacy/forms/form-system/types/dependencies.type.d.ts +11 -0
  46. package/components/legacy/forms/form-system/types/index.d.ts +3 -0
  47. package/components/legacy/forms/input-label.d.ts +9 -0
  48. package/components/legacy/forms/input-searcher.d.ts +11 -0
  49. package/components/{forms → legacy/forms}/input.d.ts +2 -0
  50. package/components/{forms → legacy/forms}/pin-code.d.ts +3 -5
  51. package/components/legacy/forms/radio-group.d.ts +56 -0
  52. package/components/{forms → legacy/forms}/radio.d.ts +2 -5
  53. package/components/links/active-link.d.ts +2 -1
  54. package/components/logos/AppLogo.d.ts +1 -0
  55. package/components/logos/index.d.ts +5 -1
  56. package/components/logos/logo-dark.d.ts +1 -0
  57. package/components/logos/logo-icon.d.ts +5 -0
  58. package/components/logos/logo-iso-dark.d.ts +1 -0
  59. package/components/logos/logo-iso-light.d.ts +1 -0
  60. package/components/logos/logo-light.d.ts +1 -0
  61. package/components/logos/logo.d.ts +3 -2
  62. package/components/typography/index.d.ts +26 -1
  63. package/demo/components/hero-card.d.ts +20 -0
  64. package/demo/components/index.d.ts +1 -0
  65. package/demo/index.d.ts +2 -0
  66. package/demo/utils/constants.d.ts +12 -0
  67. package/demo/utils/index.d.ts +1 -0
  68. package/index.css +1 -1
  69. package/index.d.ts +2 -1
  70. package/index.js +99 -53
  71. package/index.mjs +39377 -37968
  72. package/package.json +6 -5
  73. package/themes/auth/components/auth-provider.d.ts +5 -0
  74. package/themes/auth/components/index.d.ts +1 -0
  75. package/themes/auth/index.d.ts +1 -0
  76. package/themes/components/index.d.ts +2 -0
  77. package/themes/components/settings/index.d.ts +4 -0
  78. package/themes/components/settings/lang-selector.d.ts +6 -0
  79. package/themes/components/settings/switch-mode.d.ts +6 -0
  80. package/themes/components/theme-provider/index.d.ts +4 -23
  81. package/themes/components/theme-provider/mfe-app-theme-provider.d.ts +8 -0
  82. package/themes/components/theme-provider/single-app-theme-provider.d.ts +8 -0
  83. package/themes/components/theme-provider/theme-wrapper.d.ts +30 -0
  84. package/themes/config/index.d.ts +109 -0
  85. package/themes/hooks/index.d.ts +3 -0
  86. package/themes/hooks/use-theme-color.d.ts +17 -0
  87. package/themes/{use-theme.d.ts → hooks/use-theme.d.ts} +51 -21
  88. package/themes/index.d.ts +6 -8
  89. package/themes/pages/fallback-page.d.ts +8 -0
  90. package/themes/pages/index.d.ts +2 -0
  91. package/themes/pages/not-found.d.ts +5 -0
  92. package/themes/router/components/index.d.ts +2 -0
  93. package/themes/router/components/mfe-app-routes-provider.d.ts +14 -0
  94. package/themes/router/components/single-app-routes-provider.d.ts +17 -0
  95. package/themes/router/hooks/index.d.ts +1 -0
  96. package/themes/router/hooks/use-public-error-routes-config.d.ts +6 -0
  97. package/themes/router/index.d.ts +2 -0
  98. package/themes/types/index.d.ts +15 -0
  99. package/components/forms/input-searcher.d.ts +0 -7
  100. package/components/layouts/menus/minimal-nav-menu.d.ts +0 -5
  101. package/components/layouts/minimal/layout.d.ts +0 -24
  102. package/components/logos/logo-theme.d.ts +0 -5
  103. package/themes/components/pages/not-found.d.ts +0 -2
  104. package/themes/components/theme-provider/app-routes.d.ts +0 -17
  105. package/themes/config.d.ts +0 -106
  106. package/themes/use-theme-color.d.ts +0 -10
  107. /package/components/forms/{form-system/example → example}/error-container-example.d.ts +0 -0
  108. /package/components/forms/{form-system/example → example}/form-example.d.ts +0 -0
  109. /package/components/forms/{form-system/example → example}/form-methods-example.d.ts +0 -0
  110. /package/components/forms/{form-system/example → example}/validations.d.ts +0 -0
  111. /package/components/forms/{form-system/form-field.d.ts → form-field.d.ts} +0 -0
  112. /package/components/forms/{form-system/form.d.ts → form.d.ts} +0 -0
  113. /package/components/forms/{form-system/hook-form.d.ts → hook-form.d.ts} +0 -0
  114. /package/components/forms/{form-system/types → types}/dependencies.type.d.ts +0 -0
  115. /package/components/forms/{form-system/types → types}/index.d.ts +0 -0
  116. /package/components/{forms → inputs/helpers}/input-label.d.ts +0 -0
  117. /package/components/{forms → inputs}/radio-group.d.ts +0 -0
  118. /package/components/{forms → inputs}/toggle-bar.d.ts +0 -0
  119. /package/components/{forms → inputs}/uploader-two.d.ts +0 -0
  120. /package/components/{forms → inputs}/uploader.d.ts +0 -0
  121. /package/components/{forms → legacy/forms}/checkbox.d.ts +0 -0
  122. /package/components/{forms → legacy/forms}/field-error-text.d.ts +0 -0
  123. /package/components/{forms → legacy/forms}/field-helper-text.d.ts +0 -0
  124. /package/components/{forms → legacy/forms}/file-input.d.ts +0 -0
  125. /package/components/{forms → legacy/forms}/form-system/index.d.ts +0 -0
  126. /package/components/{forms → legacy/forms}/form-system/types/extend-react-hook-form.type.d.ts +0 -0
  127. /package/components/{forms → legacy/forms}/form-system/types/validations.type.d.ts +0 -0
  128. /package/components/{forms → legacy/forms}/input-select.d.ts +0 -0
  129. /package/components/{forms → legacy/forms}/input-switch.d.ts +0 -0
  130. /package/components/{forms → legacy/forms}/textarea.d.ts +0 -0
  131. /package/themes/components/{theme-provider → settings}/settings-button.d.ts +0 -0
  132. /package/themes/components/{theme-provider → settings}/settings-drawer.d.ts +0 -0
  133. /package/themes/{use-direction.d.ts → hooks/use-direction.d.ts} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,103 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.0] - 2024-12-19
9
+
10
+ ### Added
11
+
12
+ - **Radio Component**: Enhanced hover experience when radio is checked
13
+ - Added darker color on hover (`checked:hover:enabled:bg-*/90` or `checked:hover:enabled:bg-*-600`)
14
+ - Added subtle scale effect (`checked:hover:enabled:scale-105`)
15
+ - Improved transitions with `transition-all duration-200`
16
+ - **Checkbox Component**: Enhanced hover experience when checkbox is checked
17
+ - Added darker color on hover for checked state
18
+ - Added subtle scale effect on hover
19
+ - Improved transitions for smoother animations
20
+ - **PinCode Component**: Hide native number input spinners
21
+ - Added styles to hide webkit and moz spinners when `type="number"`
22
+ - Improved visual consistency for numeric pin codes
23
+
24
+ ### Changed
25
+
26
+ - **Radio Component**: Removed "DEFAULT" values
27
+ - Changed default `size` from `'DEFAULT'` to `'md'`
28
+ - Changed default `color` from `'DEFAULT'` to `'primary'`
29
+ - Updated internal class mappings to use explicit values
30
+ - **RadioGroup Component**: Removed "DEFAULT" values
31
+ - Changed default `size` from `'DEFAULT'` to `'md'`
32
+ - Changed default `color` from `'DEFAULT'` to `'primary'`
33
+ - Updated Storybook stories to reflect new defaults
34
+ - **PinCode Component**: Removed "DEFAULT" values
35
+ - Changed default `size` from `'DEFAULT'` to `'md'`
36
+ - Changed default `rounded` from `'DEFAULT'` to `'md'`
37
+ - Changed default `color` from `'DEFAULT'` to `'primary'`
38
+ - Updated internal class mappings (`inputClasses.size`, `inputClasses.rounded`, `inputClasses.variant.*.color`)
39
+ - Updated Storybook stories to reflect new defaults
40
+
41
+ ### Fixed
42
+
43
+ - **Radio Component**: Fixed variant and color props not displaying correctly
44
+ - Added `appearance-none` to remove native browser styles
45
+ - Implemented custom checked indicator using `peer-checked` utility
46
+ - Fixed color classes to properly apply `checked:border-*` and `checked:bg-*` styles
47
+ - **PinCode Component**: Fixed native number input spinners appearing in numeric pin codes
48
+ - Added cross-browser support for hiding spinners (Chrome, Safari, Edge, Firefox)
49
+
50
+ ### Documentation
51
+
52
+ - Updated Storybook stories for Radio, RadioGroup, and PinCode components
53
+ - Removed "DEFAULT" from argTypes options
54
+ - Updated default args to use explicit values (`'md'`, `'primary'`)
55
+ - Ensured consistency across all form component stories
56
+
57
+ ## [Unreleased]
58
+
59
+ ## [1.0.0] - Initial Release
60
+
61
+ ### Added
62
+
63
+ - **Input Component**:
64
+ - Password visibility toggle with eye icon
65
+ - Custom date picker with year selection
66
+ - Support for multiple date formats (DD-MM-YYYY, MM-DD-YYYY, YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD)
67
+ - Default date format: DD-MM-YYYY
68
+ - **InputSearcher Component**:
69
+ - Internal state management (removed external `value` and `onChange` props)
70
+ - Option filtering after 3 characters typed
71
+ - Error message display when no matches found (after 3+ characters)
72
+ - Text highlighting for matching characters in dropdown options
73
+ - Multiple selection support with `multiple` prop
74
+ - Selected options displayed as chips below the input
75
+ - Custom error message support via `noMatchesMessage` prop
76
+ - **Tab Component**:
77
+ - Animated tab panel transitions using Framer Motion
78
+ - Smooth fade and slide animations
79
+
80
+ ### Changed
81
+
82
+ - **Input Component**:
83
+ - Improved `onChange` prop handling to prevent read-only warnings
84
+ - Enhanced date picker UI with custom calendar dropdown
85
+ - **InputSearcher Component**:
86
+ - Refactored to be internally controlled
87
+ - Improved state management to prevent infinite loops
88
+ - Enhanced user experience with better error handling
89
+
90
+ ### Fixed
91
+
92
+ - **Input Component**: Fixed `onChange` prop not being passed to native input element
93
+ - **InputSearcher Component**:
94
+ - Fixed infinite loop issues with `useEffect` dependencies
95
+ - Fixed input not being writable
96
+ - Fixed state synchronization with `initialValue` prop
97
+
98
+ ---
99
+
100
+ ## Version History
101
+
102
+ - **1.1.0** - Enhanced form components with improved hover states, removed DEFAULT values, and bug fixes
103
+ - **1.0.0** - Initial release with core form components and UI elements
package/README.md CHANGED
@@ -409,7 +409,7 @@ function ThemeControls() {
409
409
  ### **Comprehensive Form Components**
410
410
 
411
411
  ```tsx
412
- import { Form, FormField, Input, Textarea, Checkbox, RadioGroup, InputSelect, PinCode, FileInput, Button } from '@e-burgos/tucu-ui';
412
+ import { Form, FormField, Input, Textarea, Checkbox, RadioGroup, Select, PinCode, FileInput, Button } from '@e-burgos/tucu-ui';
413
413
  ```
414
414
 
415
415
  ### **Centralized Validation**
@@ -469,7 +469,7 @@ function UserRegistrationForm() {
469
469
  </FormField>
470
470
 
471
471
  <FormField<UserFormData> name="country" label="Country">
472
- <InputSelect
472
+ <Select
473
473
  options={[
474
474
  { name: 'United States', value: 'us' },
475
475
  { name: 'Canada', value: 'ca' },
@@ -2,6 +2,5 @@ export * from './avatar';
2
2
  export * from './badge';
3
3
  export * from './collapse';
4
4
  export * from './scrollbar';
5
- export * from './menu-item';
6
5
  export * from './scrollbar-native';
7
6
  export * from './skeleton';
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { LogoPropTypes } from '../logos/logo';
3
- import { IMenuItem } from '../common/menu-item';
3
+ import { IMenuItem } from '../layouts/menus/menu-item';
4
4
  export interface DrawerProps {
5
5
  children?: React.ReactNode;
6
6
  type: 'sidebar' | 'sidebar-menu';
@@ -6,6 +6,8 @@ export interface ModalProps {
6
6
  children?: React.ReactNode;
7
7
  buttonContainer?: React.ReactNode;
8
8
  className?: string;
9
+ contentClassName?: string;
10
+ titleContainerClassName?: string;
9
11
  text?: {
10
12
  title?: string;
11
13
  content?: string;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { LogoPropTypes } from '../logos/logo';
3
- import { IMenuItem } from '../common/menu-item';
3
+ import { IMenuItem } from '../layouts/menus/menu-item';
4
4
  export declare function SidebarMenu({ className, menuItems, children, title, actionContent, onClose, logo, }: {
5
5
  className?: string;
6
6
  menuItems: IMenuItem[];
@@ -0,0 +1,4 @@
1
+ export * from './error-container-example';
2
+ export * from './form-example';
3
+ export * from './form-methods-example';
4
+ export * from './validations';
@@ -1,17 +1,5 @@
1
- export * from './checkbox';
2
- export * from './field-error-text';
3
- export * from './field-helper-text';
4
- export * from './file-input';
5
- export * from './input-label';
6
- export * from './input-searcher';
7
- export * from './input-switch';
8
- export * from './input';
9
- export * from './input-select';
10
- export * from './pin-code';
11
- export * from './radio';
12
- export * from './radio-group';
13
- export * from './textarea';
14
- export * from './toggle-bar';
15
- export * from './uploader-two';
16
- export * from './uploader';
17
- export * from './form-system';
1
+ export * from './example';
2
+ export * from './form-field';
3
+ export * from './form';
4
+ export * from './types';
5
+ export * from './hook-form';
@@ -0,0 +1,19 @@
1
+ export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
2
+ export type BrowserNativeObject = Date | FileList | File;
3
+ export type IsEqual<T1, T2> = T1 extends T2 ? (<G>() => G extends T1 ? 1 : 2) extends <G>() => G extends T2 ? 1 : 2 ? true : false : false;
4
+ export type IsTuple<T extends ReadonlyArray<unknown>> = number extends T['length'] ? false : true;
5
+ export type TupleKeys<T extends ReadonlyArray<unknown>> = Exclude<keyof T, keyof unknown[]>;
6
+ export type ValidateResult = string | boolean | undefined;
7
+ export type ArrayKey = '[number]';
8
+ type AnyIsEqual<T1, T2> = T1 extends T2 ? IsEqual<T1, T2> extends true ? true : never : never;
9
+ type PathImpl<K extends string | number, V, TraversedTypes, ArrayK extends string | number> = V extends Primitive | BrowserNativeObject ? `${K}` : true extends AnyIsEqual<TraversedTypes, V> ? `${K}` : `${K}` | `${K}.${FieldPathInternal<V, ArrayK, TraversedTypes | V>}`;
10
+ export type FieldPathInternal<T, ArrayK extends string | number, TraversedTypes = T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
11
+ [K in TupleKeys<T>]-?: PathImpl<K & string, T[K], TraversedTypes, ArrayK>;
12
+ }[TupleKeys<T>] : PathImpl<ArrayK, V, TraversedTypes, ArrayK> : {
13
+ [K in keyof T]-?: PathImpl<K & string, T[K], TraversedTypes, ArrayK>;
14
+ }[keyof T];
15
+ export type InternalValidate<TFieldValue, TFormValues> = (value: TFieldValue, formValues: TFormValues, options: {
16
+ index: number | null;
17
+ name: string | null;
18
+ }) => ValidateResult | Promise<ValidateResult>;
19
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FieldValues, RegisterOptions, FieldPath, FieldPathValue } from 'react-hook-form';
2
+ import { FieldPathInternal, ArrayKey, InternalValidate } from './extend-react-hook-form.type';
3
+ export type Rules<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<RegisterOptions<TFieldValues>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled' | 'validate'> & {
4
+ validate?: InternalValidate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues> | Record<never, InternalValidate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues>>;
5
+ };
6
+ export type FormValidations<TFieldValues extends FieldValues = FieldValues> = {
7
+ [key in FieldPathInternal<TFieldValues, ArrayKey>]?: Rules<TFieldValues>;
8
+ };
@@ -0,0 +1 @@
1
+ export declare function ChevronLeft(props: React.SVGAttributes<SVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -15,6 +15,7 @@ export * from './check';
15
15
  export * from './checkmark';
16
16
  export * from './chevron-down';
17
17
  export * from './chevron-forward';
18
+ export * from './chevron-left';
18
19
  export * from './chevron-right';
19
20
  export * from './classic-layout-icon';
20
21
  export * from './close';
@@ -5,7 +5,6 @@ export * from './cards';
5
5
  export * from './carousel';
6
6
  export * from './common';
7
7
  export * from './dialog';
8
- export * from './forms';
9
8
  export * from './tabs';
10
9
  export * from './icons';
11
10
  export * from './links';
@@ -14,3 +13,5 @@ export * from './logos';
14
13
  export * from './notifications';
15
14
  export * from './typography';
16
15
  export * from './utils';
16
+ export * from './forms';
17
+ export * from './inputs';
@@ -0,0 +1,42 @@
1
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
2
+ /** The size of the component */
3
+ size?: 'sm' | 'md' | 'lg';
4
+ /** Change input color */
5
+ color?: 'primary' | 'secondary' | 'danger' | 'info' | 'success' | 'warning';
6
+ /** Available directions of the label are: */
7
+ labelPlacement?: 'start' | 'end';
8
+ /** Whether the input is disabled */
9
+ disabled?: boolean;
10
+ /** Set field label */
11
+ label?: React.ReactNode;
12
+ /** Show error message using this prop */
13
+ error?: string;
14
+ /** Add helper text. It could be string or a React component */
15
+ helperText?: React.ReactNode;
16
+ /** Use className prop to apply style for entire component */
17
+ className?: string;
18
+ /** Use activeClassName prop to apply style on active component from checkboxGroup */
19
+ activeClassName?: string;
20
+ /** Use containerClassName prop to apply some additional style for label and checkbox container */
21
+ containerClassName?: string;
22
+ /** Use iconClassName prop to apply some additonal style for check mark icon */
23
+ iconClassName?: string;
24
+ /** Use labelClassName prop to apply some addition style for the field label */
25
+ labelClassName?: string;
26
+ /** Add custom classes for the input filed extra style */
27
+ inputClassName?: string;
28
+ /** This prop allows you to customize the error message style */
29
+ errorClassName?: string;
30
+ /** This prop allows you to customize the helper message style */
31
+ helperClassName?: string;
32
+ /** The variant of the component */
33
+ variant?: 'ghost' | 'solid' | 'transparent';
34
+ /** The shape of the component */
35
+ shape?: 'rounded' | 'square';
36
+ }
37
+ /**
38
+ * A simplified checkbox component that uses a single color-based styling approach.
39
+ * The checkbox changes appearance based on its state (unchecked, checked, hover, focus, disabled).
40
+ */
41
+ export declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
42
+ export default Checkbox;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ declare const fieldErrorClasses: {
3
+ base: string;
4
+ size: {
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ };
10
+ };
11
+ export interface FieldErrorProps extends React.HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
12
+ tag?: 'div' | 'span';
13
+ error: string | null | undefined;
14
+ size?: keyof typeof fieldErrorClasses.size;
15
+ className?: string;
16
+ id?: string;
17
+ }
18
+ export declare function FieldError({ tag, error, size, className, id, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
19
+ export default FieldError;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ declare const helperTextClasses: {
3
+ base: string;
4
+ size: {
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ };
10
+ };
11
+ export interface FieldHelperTextProps extends React.HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
12
+ tag?: 'div' | 'span';
13
+ size?: keyof typeof helperTextClasses.size;
14
+ className?: string;
15
+ id?: string;
16
+ }
17
+ export declare function FieldHelperText({ size, tag, children, className, id, ...props }: React.PropsWithChildren<FieldHelperTextProps>): import("react/jsx-runtime").JSX.Element;
18
+ export default FieldHelperText;
@@ -0,0 +1,15 @@
1
+ export * from './checkbox';
2
+ export * from './helpers/field-error-text';
3
+ export * from './helpers/field-helper-text';
4
+ export * from './helpers/input-label';
5
+ export * from './input-searcher';
6
+ export * from './input';
7
+ export * from './pin-code';
8
+ export * from './radio-group';
9
+ export * from './radio';
10
+ export * from './select';
11
+ export * from './switch';
12
+ export * from './textarea';
13
+ export * from './toggle-bar';
14
+ export * from './uploader-two';
15
+ export * from './uploader';
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { SelectOption } from './select';
3
+ export declare function InputSearcher({ label, onOptionSelect, options, initialValue, noMatchesMessage, multiple, variant, disabled, ...props }: {
4
+ label?: string;
5
+ initialValue?: string | number;
6
+ onOptionSelect?: (option: SelectOption | SelectOption[]) => void;
7
+ options?: SelectOption[];
8
+ noMatchesMessage?: string;
9
+ multiple?: boolean;
10
+ variant?: 'ghost' | 'solid' | 'transparent';
11
+ disabled?: boolean;
12
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'>): import("react/jsx-runtime").JSX.Element;
13
+ export default InputSearcher;
@@ -0,0 +1,22 @@
1
+ export type DateFormat = 'DD-MM-YYYY' | 'MM-DD-YYYY' | 'YYYY-MM-DD' | 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD';
2
+ export type InputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
3
+ label?: string;
4
+ error?: string;
5
+ variant?: 'ghost' | 'solid' | 'transparent';
6
+ className?: string;
7
+ inputClassName?: string;
8
+ labelClassName?: string;
9
+ useUppercaseLabel?: boolean;
10
+ helperText?: string;
11
+ suffix?: React.ReactNode;
12
+ suffixClassName?: string;
13
+ icon?: React.ReactNode;
14
+ dateFormat?: DateFormat;
15
+ };
16
+ export declare const inputVariantClasses: {
17
+ ghost: string;
18
+ solid: string;
19
+ transparent: string;
20
+ };
21
+ export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
22
+ export default Input;
@@ -0,0 +1,97 @@
1
+ import { default as React } from 'react';
2
+ declare const inputClasses: {
3
+ base: string;
4
+ numberType: string;
5
+ error: string;
6
+ size: {
7
+ sm: string;
8
+ md: string;
9
+ lg: string;
10
+ xl: string;
11
+ };
12
+ rounded: {
13
+ none: string;
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ full: string;
18
+ };
19
+ variant: {
20
+ ghost: {
21
+ base: string;
22
+ color: {
23
+ primary: string;
24
+ secondary: string;
25
+ danger: string;
26
+ info: string;
27
+ success: string;
28
+ warning: string;
29
+ };
30
+ };
31
+ solid: {
32
+ base: string;
33
+ color: {
34
+ primary: string;
35
+ secondary: string;
36
+ danger: string;
37
+ info: string;
38
+ success: string;
39
+ warning: string;
40
+ };
41
+ };
42
+ transparent: {
43
+ base: string;
44
+ color: {
45
+ primary: string;
46
+ secondary: string;
47
+ danger: string;
48
+ info: string;
49
+ success: string;
50
+ warning: string;
51
+ };
52
+ };
53
+ };
54
+ };
55
+ export interface PinCodeProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'> {
56
+ /** Current value of the pin code */
57
+ value?: string;
58
+ /** Callback function called when pin code changes */
59
+ onChange?: (value: string) => void;
60
+ /** This Pin Code component only support these two types */
61
+ type?: 'text' | 'number';
62
+ /** Mask and unmask to hide and show pin code */
63
+ mask?: boolean;
64
+ /** Set pin code length */
65
+ length?: number;
66
+ /** Make pin code horizontally center */
67
+ center?: boolean;
68
+ /** Set placeholder text */
69
+ placeholder?: string;
70
+ /** The size of the component. `"sm"` is equivalent to the dense input styling. */
71
+ size?: keyof typeof inputClasses.size;
72
+ /** The rounded variants are: */
73
+ rounded?: keyof typeof inputClasses.rounded;
74
+ /** The variants of the component are: */
75
+ variant?: keyof typeof inputClasses.variant;
76
+ /** Change input color */
77
+ color?: keyof (typeof inputClasses.variant)['ghost']['color'];
78
+ /** Show error message using this prop */
79
+ error?: string;
80
+ /** Add custom classes for the input filed extra style */
81
+ inputClassName?: string;
82
+ /** This prop allows you to customize the error message style */
83
+ errorClassName?: string;
84
+ /** This prop allows you to add a helper text to the pin code component */
85
+ helperText?: string;
86
+ /** This prop allows you to add a helper text to the pin code component */
87
+ helperTextClassName?: string;
88
+ /** This prop allows you to make the pin code component full width */
89
+ fullWidth?: boolean;
90
+ }
91
+ /**
92
+ * A basic widget for getting pin code. Here is the API documentation of the Pin Code component.
93
+ * And the rest of the props of PinCode are the same as the original html input field.
94
+ * You can use props like `disabled`, `placeholder`, `defaultValue` etc.
95
+ */
96
+ export declare function PinCode({ type, value, onChange, mask, length, center, size, rounded, variant, color, placeholder, error, className, inputClassName, errorClassName, helperText, helperTextClassName, fullWidth, ...props }: PinCodeProps): import("react/jsx-runtime").JSX.Element;
97
+ export default PinCode;
@@ -0,0 +1,84 @@
1
+ import { default as React } from 'react';
2
+ declare const inputClasses: {
3
+ base: string;
4
+ size: {
5
+ sm: string;
6
+ md: string;
7
+ lg: string;
8
+ xl: string;
9
+ };
10
+ variant: {
11
+ ghost: {
12
+ base: string;
13
+ color: {
14
+ primary: string;
15
+ secondary: string;
16
+ danger: string;
17
+ info: string;
18
+ success: string;
19
+ warning: string;
20
+ };
21
+ };
22
+ solid: {
23
+ base: string;
24
+ color: {
25
+ primary: string;
26
+ secondary: string;
27
+ danger: string;
28
+ info: string;
29
+ success: string;
30
+ warning: string;
31
+ };
32
+ };
33
+ transparent: {
34
+ base: string;
35
+ color: {
36
+ primary: string;
37
+ secondary: string;
38
+ danger: string;
39
+ info: string;
40
+ success: string;
41
+ warning: string;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
47
+ /** The variants of the component are: */
48
+ variant?: keyof typeof inputClasses.variant;
49
+ /** The size of the component. `"sm"` is equivalent to the dense input styling. */
50
+ size?: keyof typeof inputClasses.size;
51
+ /** Change radio button color */
52
+ color?: keyof typeof inputClasses.variant.ghost.color;
53
+ /** Available directions of the label are: */
54
+ labelPlacement?: 'start' | 'end';
55
+ /** Whether the input is disabled */
56
+ disabled?: boolean;
57
+ /** Set field label */
58
+ label?: React.ReactNode;
59
+ /** Show error message using this prop */
60
+ error?: string;
61
+ /** Add helper text. It could be string or a React component */
62
+ helperText?: React.ReactNode;
63
+ /** Use className prop to apply style for entire component */
64
+ className?: string;
65
+ /** Use activeClassName prop to apply style on active component from radioGroup */
66
+ activeClassName?: string;
67
+ /** Use containerClassName prop to apply some additional style for label and radio container */
68
+ containerClassName?: string;
69
+ /** Use labelClassName prop to apply some addition style for the field label */
70
+ labelClassName?: string;
71
+ /** Add custom classes for the input filed extra style */
72
+ inputClassName?: string;
73
+ /** This prop allows you to customize the error message style */
74
+ errorClassName?: string;
75
+ /** This prop allows you to customize the helper message style */
76
+ helperClassName?: string;
77
+ }
78
+ /**
79
+ * A basic widget for getting the user input of radio. Here is the API documentation of the Radio component.
80
+ * And the rest of the props of Checkbox are the same as the original html input field.
81
+ * You can use props like `value`, `disabled`, `onChange`, `onFocus`, `onBlur` etc.
82
+ */
83
+ export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
84
+ export default Radio;
@@ -0,0 +1,26 @@
1
+ export type SelectOption = {
2
+ name: string;
3
+ value: string;
4
+ icon?: React.ReactNode;
5
+ };
6
+ export interface SelectTypes {
7
+ options: SelectOption[];
8
+ selectedOption?: SelectOption;
9
+ onChange?: React.Dispatch<React.SetStateAction<SelectOption>> | ((value: SelectOption) => void);
10
+ children?: React.ReactNode;
11
+ onSelect?: (value: string) => void;
12
+ variant?: 'ghost' | 'solid' | 'transparent';
13
+ className?: string;
14
+ disabled?: boolean;
15
+ label?: string;
16
+ useUppercaseLabel?: boolean;
17
+ required?: boolean;
18
+ value?: string;
19
+ name?: string;
20
+ errorMessage?: string;
21
+ helperText?: string;
22
+ placeholder?: string;
23
+ buttonClassName?: string;
24
+ }
25
+ export declare function Select({ options, onChange, onSelect, variant, selectedOption: propSelectedOption, className, children, disabled, label, useUppercaseLabel, required, value, name, errorMessage, helperText, placeholder, buttonClassName, }: SelectTypes): import("react/jsx-runtime").JSX.Element;
26
+ export default Select;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ export interface SwitchProps {
3
+ label?: string | React.ReactNode;
4
+ offLabel?: string | React.ReactNode;
5
+ onLabel?: string | React.ReactNode;
6
+ checked: boolean;
7
+ onChange: (checked: boolean) => void;
8
+ variant?: 'ghost' | 'solid' | 'transparent';
9
+ className?: string;
10
+ errorMessage?: string;
11
+ helperText?: string;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const Switch: React.FC<SwitchProps>;
15
+ export default Switch;
@@ -0,0 +1,16 @@
1
+ export declare const textareaVariantClasses: {
2
+ ghost: string;
3
+ solid: string;
4
+ transparent: string;
5
+ };
6
+ export type TextareaProps = React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {
7
+ label?: string;
8
+ error?: string;
9
+ variant?: 'ghost' | 'solid' | 'transparent';
10
+ className?: string;
11
+ inputClassName?: string;
12
+ useUppercaseLabel?: boolean;
13
+ helperText?: string;
14
+ };
15
+ export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
16
+ export default Textarea;
@@ -1,6 +1,6 @@
1
1
  import { LogoPropTypes } from '../../logos';
2
- import { IMenuItem } from '../../common/menu-item';
3
- interface ClassicLayoutProps {
2
+ import { IMenuItem } from '../menus/menu-item';
3
+ interface AdminLayoutProps {
4
4
  children: React.ReactNode;
5
5
  menuItems: IMenuItem[];
6
6
  rightButton?: React.ReactNode;
@@ -12,5 +12,5 @@ interface ClassicLayoutProps {
12
12
  fullWidth?: boolean;
13
13
  setIsOpen: (isOpen: boolean) => void;
14
14
  }
15
- export declare function ClassicLayout({ logo, children, menuItems, rightButton, isOpen, className, headerClassName, contentClassName, fullWidth, setIsOpen, }: ClassicLayoutProps): import("react/jsx-runtime").JSX.Element;
16
- export default ClassicLayout;
15
+ export declare function AdminLayout({ logo, children, menuItems, rightButton, isOpen, className, headerClassName, contentClassName, fullWidth, setIsOpen, }: AdminLayoutProps): import("react/jsx-runtime").JSX.Element;
16
+ export default AdminLayout;
@@ -1,5 +1,5 @@
1
- export declare function AuthLayout({ children, className, }: {
1
+ export declare function CleanLayout({ children, className, }: {
2
2
  children: React.ReactNode;
3
3
  className?: string;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
- export default AuthLayout;
5
+ export default CleanLayout;