@modul/mbui 0.0.12 → 0.0.13-beta-pv-53036-bbe30888

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 (72) hide show
  1. package/dist/{Info/Info.d.ts → Alert/Alert.d.ts} +4 -4
  2. package/dist/{Info/Info.js → Alert/Alert.js} +7 -7
  3. package/dist/Alert/Alert.js.map +1 -0
  4. package/dist/Alert/index.d.ts +1 -0
  5. package/dist/Alert/index.js +6 -0
  6. package/dist/Alert/index.js.map +1 -0
  7. package/dist/Input/Input.js +1 -1
  8. package/dist/Input/Input.js.map +1 -1
  9. package/dist/Label/Label.d.ts +5 -0
  10. package/dist/Label/Label.js +13 -0
  11. package/dist/Label/Label.js.map +1 -0
  12. package/dist/Label/index.d.ts +1 -0
  13. package/dist/Label/index.js +6 -0
  14. package/dist/Label/index.js.map +1 -0
  15. package/dist/Page/Page.js +1 -1
  16. package/dist/Page/Page.js.map +1 -1
  17. package/dist/Select/SelectAccountCard.d.ts +6 -0
  18. package/dist/Select/SelectAccountCard.js +76 -0
  19. package/dist/Select/SelectAccountCard.js.map +1 -0
  20. package/dist/Select/index.d.ts +1 -0
  21. package/dist/Select/index.js +6 -0
  22. package/dist/Select/index.js.map +1 -0
  23. package/dist/Switch/Switch.d.ts +4 -0
  24. package/dist/Switch/Switch.js +12 -0
  25. package/dist/Switch/Switch.js.map +1 -0
  26. package/dist/Switch/index.d.ts +1 -0
  27. package/dist/Switch/index.js +6 -0
  28. package/dist/Switch/index.js.map +1 -0
  29. package/dist/Textarea/Textarea.d.ts +5 -0
  30. package/dist/Textarea/Textarea.js +12 -0
  31. package/dist/Textarea/Textarea.js.map +1 -0
  32. package/dist/Textarea/index.d.ts +1 -0
  33. package/dist/Textarea/index.js +6 -0
  34. package/dist/Textarea/index.js.map +1 -0
  35. package/dist/index.d.ts +22 -19
  36. package/dist/index.js +14 -8
  37. package/dist/index.js.map +1 -1
  38. package/package.json +7 -2
  39. package/src/@/config/index.ts +3 -1
  40. package/src/{Info/Info.tsx → Alert/Alert.tsx} +6 -6
  41. package/src/Alert/index.ts +1 -0
  42. package/src/Form/Form.tsx +152 -0
  43. package/src/Form/index.ts +1 -0
  44. package/src/Input/Input.tsx +1 -1
  45. package/src/Page/Page.tsx +1 -1
  46. package/src/Select/SelectAccountCard.tsx +163 -0
  47. package/src/Select/index.ts +1 -0
  48. package/src/Switch/Switch.tsx +28 -0
  49. package/src/Switch/index.ts +1 -0
  50. package/src/Textarea/Textarea.tsx +24 -0
  51. package/src/Textarea/index.ts +1 -0
  52. package/src/assets/css/global.css +6 -2
  53. package/src/index.ts +32 -40
  54. package/dist/Base/Input/Base.d.ts +0 -4
  55. package/dist/Base/Input/Base.js +0 -20
  56. package/dist/Base/Input/Base.js.map +0 -1
  57. package/dist/Base/Input/Input.d.ts +0 -4
  58. package/dist/Base/Input/Input.js +0 -18
  59. package/dist/Base/Input/Input.js.map +0 -1
  60. package/dist/Base/Input/index.d.ts +0 -2
  61. package/dist/Base/Input/index.js +0 -7
  62. package/dist/Base/Input/index.js.map +0 -1
  63. package/dist/Base/Input/types.d.ts +0 -9
  64. package/dist/Base/Input/types.js +0 -3
  65. package/dist/Base/Input/types.js.map +0 -1
  66. package/dist/Info/Info.js.map +0 -1
  67. package/dist/Info/index.d.ts +0 -1
  68. package/dist/Info/index.js +0 -6
  69. package/dist/Info/index.js.map +0 -1
  70. package/src/DrawerCompanyList/CompanyList.tsx +0 -63
  71. package/src/DrawerCompanyList/index.ts +0 -1
  72. package/src/Info/index.ts +0 -1
@@ -0,0 +1,152 @@
1
+ import * as React from 'react'
2
+ import * as LabelPrimitive from '@radix-ui/react-label'
3
+ import { Slot } from '@radix-ui/react-slot'
4
+ import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from 'react-hook-form'
5
+
6
+ import { cn } from '../@/lib/utils'
7
+ import { Label } from '../Label'
8
+
9
+ const Form = FormProvider
10
+
11
+ type FormFieldContextValue<
12
+ TFieldValues extends FieldValues = FieldValues,
13
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
14
+ > = {
15
+ name: TName
16
+ }
17
+
18
+ const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)
19
+
20
+ const FormField = <
21
+ TFieldValues extends FieldValues = FieldValues,
22
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
23
+ >({
24
+ ...props
25
+ }: ControllerProps<TFieldValues, TName>) => {
26
+ return (
27
+ <FormFieldContext.Provider value={{ name: props.name }}>
28
+ <Controller {...props} />
29
+ </FormFieldContext.Provider>
30
+ )
31
+ }
32
+
33
+ const useFormField = () => {
34
+ const fieldContext = React.useContext(FormFieldContext)
35
+ const itemContext = React.useContext(FormItemContext)
36
+ const { getFieldState, formState } = useFormContext()
37
+
38
+ const fieldState = getFieldState(fieldContext.name, formState)
39
+
40
+ if (!fieldContext) {
41
+ throw new Error('useFormField should be used within <FormField>')
42
+ }
43
+
44
+ const { id } = itemContext
45
+
46
+ return {
47
+ id,
48
+ name: fieldContext.name,
49
+ formItemId: `${id}-form-item`,
50
+ formDescriptionId: `${id}-form-item-description`,
51
+ formMessageId: `${id}-form-item-message`,
52
+ ...fieldState,
53
+ }
54
+ }
55
+
56
+ type FormItemContextValue = {
57
+ id: string
58
+ }
59
+
60
+ const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)
61
+
62
+ const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
63
+ ({ className, ...props }, ref) => {
64
+ const id = React.useId()
65
+
66
+ return (
67
+ <FormItemContext.Provider value={{ id }}>
68
+ <div
69
+ ref={ref}
70
+ className={cn('space-y-2', className)}
71
+ {...props}
72
+ />
73
+ </FormItemContext.Provider>
74
+ )
75
+ }
76
+ )
77
+ FormItem.displayName = 'FormItem'
78
+
79
+ const FormLabel = React.forwardRef<
80
+ React.ElementRef<typeof LabelPrimitive.Root>,
81
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
82
+ >(({ className, ...props }, ref) => {
83
+ const { error, formItemId } = useFormField()
84
+
85
+ return (
86
+ <Label
87
+ ref={ref}
88
+ className={cn(error && 'text-destructive', className)}
89
+ htmlFor={formItemId}
90
+ {...props}
91
+ />
92
+ )
93
+ })
94
+ FormLabel.displayName = 'FormLabel'
95
+
96
+ const FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(
97
+ ({ ...props }, ref) => {
98
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
99
+
100
+ return (
101
+ <Slot
102
+ ref={ref}
103
+ id={formItemId}
104
+ aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
105
+ aria-invalid={!!error}
106
+ {...props}
107
+ />
108
+ )
109
+ }
110
+ )
111
+ FormControl.displayName = 'FormControl'
112
+
113
+ const FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
114
+ ({ className, ...props }, ref) => {
115
+ const { formDescriptionId } = useFormField()
116
+
117
+ return (
118
+ <p
119
+ ref={ref}
120
+ id={formDescriptionId}
121
+ className={cn('text-[0.8rem] text-muted-foreground', className)}
122
+ {...props}
123
+ />
124
+ )
125
+ }
126
+ )
127
+ FormDescription.displayName = 'FormDescription'
128
+
129
+ const FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
130
+ ({ className, children, ...props }, ref) => {
131
+ const { error, formMessageId } = useFormField()
132
+ const body = error ? String(error?.message) : children
133
+
134
+ if (!body) {
135
+ return null
136
+ }
137
+
138
+ return (
139
+ <p
140
+ ref={ref}
141
+ id={formMessageId}
142
+ className={cn('text-[0.8rem] font-medium text-destructive', className)}
143
+ {...props}
144
+ >
145
+ {body}
146
+ </p>
147
+ )
148
+ }
149
+ )
150
+ FormMessage.displayName = 'FormMessage'
151
+
152
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField }
@@ -0,0 +1 @@
1
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField } from './Form'
@@ -21,7 +21,7 @@ const InputField = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<
21
21
  <input
22
22
  type={type}
23
23
  className={cn(
24
- 'border-input file:border-0 bg-transparent font-normal file:bg-transparent disabled:opacity-50 border rounded-1 focus-visible:ring-1 focus-visible:ring-ring w-full h-[44px] file:font-medium file:text-sm placeholder:text-muted-foreground leading-[1.17] transition-colors focus-visible:outline-none disabled:cursor-not-allowed',
24
+ 'border-input file:border-0 bg-transparent font-normal file:bg-transparent disabled:opacity-50 border rounded-sm focus-visible:ring-1 focus-visible:ring-ring w-full h-[44px] file:font-medium file:text-sm placeholder:text-muted-foreground leading-[1.17] transition-colors focus-visible:outline-none disabled:cursor-not-allowed',
25
25
  className
26
26
  )}
27
27
  ref={ref}
package/src/Page/Page.tsx CHANGED
@@ -15,7 +15,7 @@ const Navbar: FC<IProps> = ({ children, className }) => {
15
15
  }
16
16
 
17
17
  const Content: FC<IProps> = ({ children, className }) => {
18
- return <div className={cn('px-[20px] py-[16px]', className)}>{children}</div>
18
+ return <div className={cn('px-[20px] py-[16px] overflow-y-auto', className)}>{children}</div>
19
19
  }
20
20
 
21
21
  const Page: IPage = ({ children, className }: IProps) => {
@@ -0,0 +1,163 @@
1
+ import * as React from 'react'
2
+
3
+ import { DropdownSmallOld, CheckSmall } from '../Icon'
4
+
5
+ import Select, {
6
+ components,
7
+ ControlProps,
8
+ OptionProps,
9
+ DropdownIndicatorProps,
10
+ StylesConfig,
11
+ SingleValueProps,
12
+ MenuProps,
13
+ ValueContainerProps,
14
+ } from 'react-select'
15
+
16
+ import { cn } from '../@/lib/utils'
17
+
18
+ const selectTriggerClasses: string =
19
+ 'flex items-center bg-gradient-to-r from-[--cl-blue-3] to-primary shadow-[0px_8px_18px_0px_rgba(73,113,208,0.38)] px-[16px] py-[8px] border-none rounded-md min-h-[80px] text-left text-white'
20
+
21
+ const colourStyles: StylesConfig = {
22
+ control: () => ({}),
23
+ option: () => ({}),
24
+ input: () => ({}),
25
+ dropdownIndicator: () => ({}),
26
+ indicatorsContainer: () => ({}),
27
+ menu: () => ({}),
28
+ menuList: () => ({}),
29
+ singleValue: () => ({}),
30
+ valueContainer: () => ({}),
31
+ }
32
+
33
+ const Control = ({ children, ...props }: ControlProps) => {
34
+ const style = { cursor: 'pointer' }
35
+ return (
36
+ <components.Control
37
+ className={selectTriggerClasses}
38
+ {...props}
39
+ >
40
+ {children}
41
+ </components.Control>
42
+ )
43
+ }
44
+
45
+ const optionClasses =
46
+ 'flex items-center first:rounded-t-md last:rounded-b-md px-[12px] py-[16px] w-full cursor-default select-none outline-none'
47
+
48
+ const Option = ({ children, ...props }: OptionProps) => {
49
+ const {
50
+ isSelected,
51
+ isFocused,
52
+ isDisabled,
53
+ // @ts-ignore
54
+ data : { label, account, balance, cur },
55
+ } = props
56
+ const style = { cursor: 'pointer' }
57
+ return (
58
+ <components.Option
59
+ className={cn(
60
+ optionClasses,
61
+ { 'bg-light': isFocused },
62
+ { 'opacity-50 pointer-events-none': isDisabled }
63
+ )}
64
+ {...props}
65
+ >
66
+ <span className="flex basis-0 grow">
67
+ <span>
68
+ <span>{label}</span><br/>
69
+ <span className='text-[14px] text-light'>{account}</span>
70
+ </span>
71
+ <span className='ml-auto shrink-0'>
72
+ {balance}&nbsp;{cur}
73
+ </span>
74
+ </span>
75
+
76
+ <span className='ml-[16px] w-[24px] h-[24px] shrink-0'>
77
+ {isSelected && (
78
+ <CheckSmall
79
+ width="24"
80
+ height="24"
81
+ className="text-primary"
82
+ />
83
+ )}
84
+ </span>
85
+
86
+ </components.Option>
87
+ )
88
+ }
89
+
90
+ const DropdownIndicator = ({ children, ...props }: DropdownIndicatorProps) => {
91
+ return (
92
+ <components.DropdownIndicator
93
+ className="shrink-0"
94
+ {...props}
95
+ >
96
+ <DropdownSmallOld
97
+ className="text-white"
98
+ width="16"
99
+ height="16"
100
+ />
101
+ </components.DropdownIndicator>
102
+ )
103
+ }
104
+
105
+ const ValueContainer = ({ children, ...props }: ValueContainerProps) => {
106
+ return (
107
+ <components.ValueContainer
108
+ className="flex-1 grid"
109
+ {...props}
110
+ >
111
+ {children}
112
+ </components.ValueContainer>
113
+ )
114
+ }
115
+
116
+ const SingleValue = ({ children, ...props }: SingleValueProps) => {
117
+ // @ts-ignore
118
+ const { label, account, balance, cur } = props.data
119
+ return (
120
+ <components.SingleValue className='col-start-1 col-end-3 row-start-1 row-end-2' {...props}>
121
+ <span className="block max-w-full text-[16px] truncate leading-[1.5]">
122
+ {label} <span className="opacity-75 text-[14px] leading-[1.42]">{account}</span>
123
+ </span>
124
+ <span className="block mt-[8px] font-medium text-[24px] leading-[1.333]">
125
+ {balance} {cur}
126
+ </span>
127
+ </components.SingleValue>
128
+ )
129
+ }
130
+
131
+ const Menu = ({ children, ...props }: MenuProps) => {
132
+ return (
133
+ <components.Menu
134
+ className="bg-page drop-shadow-1 mt-[8px] rounded-md"
135
+ {...props}
136
+ >
137
+ {children}
138
+ </components.Menu>
139
+ )
140
+ }
141
+
142
+ const SelectAccountCard = React.forwardRef<Select, { className: string | undefined }>(({ className, ...props }, ref) => (
143
+ <Select
144
+ className={cn(className)}
145
+ classNamePrefix="super"
146
+ isDisabled={false}
147
+ isSearchable={false}
148
+ components={{
149
+ Control,
150
+ Option,
151
+ SingleValue,
152
+ DropdownIndicator,
153
+ IndicatorSeparator: () => null,
154
+ Menu,
155
+ ValueContainer,
156
+ }}
157
+ styles={colourStyles}
158
+ unstyled={true}
159
+ {...props}
160
+ />
161
+ ))
162
+
163
+ export { SelectAccountCard }
@@ -0,0 +1 @@
1
+ export { SelectAccountCard } from './SelectAccountCard'
@@ -0,0 +1,28 @@
1
+
2
+ import * as React from "react"
3
+ import * as SwitchPrimitives from "@radix-ui/react-switch"
4
+
5
+ import { cn } from "../@/lib/utils"
6
+
7
+ const Switch = React.forwardRef<
8
+ React.ElementRef<typeof SwitchPrimitives.Root>,
9
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
10
+ >(({ className, ...props }, ref) => (
11
+ <SwitchPrimitives.Root
12
+ className={cn(
13
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer border-light items-center rounded-full border-2 shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
14
+ className
15
+ )}
16
+ {...props}
17
+ ref={ref}
18
+ >
19
+ <SwitchPrimitives.Thumb
20
+ className={cn(
21
+ "pointer-events-none block h-4 w-4 rounded-full bg-light shadow-md ring-0 transition-transform data-[state=checked]:bg-page data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
22
+ )}
23
+ />
24
+ </SwitchPrimitives.Root>
25
+ ))
26
+ Switch.displayName = SwitchPrimitives.Root.displayName
27
+
28
+ export { Switch }
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch'
@@ -0,0 +1,24 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "../@/lib/utils"
4
+
5
+ export interface TextareaProps
6
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
7
+
8
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
9
+ ({ className, ...props }, ref) => {
10
+ return (
11
+ <textarea
12
+ className={cn(
13
+ "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 placeholder:text-light focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ )}
16
+ ref={ref}
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+ )
22
+ Textarea.displayName = "Textarea"
23
+
24
+ export { Textarea }
@@ -0,0 +1 @@
1
+ export { Textarea } from './Textarea'
@@ -73,7 +73,7 @@
73
73
  --cl-red-6: #f9c1bd;
74
74
  --cl-red-7: #ffe9e9;
75
75
 
76
- --text-base: var(--cl-graphite-1);
76
+ --base: var(--cl-graphite-1);
77
77
  --primary: var(--cl-blue-2);
78
78
  --primary-light: var(--cl-blue-7);
79
79
  --success: var(--cl-green-3);
@@ -81,6 +81,7 @@
81
81
  --light: var(--cl-graphite-3);
82
82
  --dark: var(--cl-graphite-2);
83
83
  --disabled: var(--cl-graphite-4);
84
+ --bg-light: var(--cl-graphite-7);
84
85
  --warning: var(--cl-yellow-2);
85
86
  --warning-light: var(--cl-yellow-7);
86
87
  --critical: var(--cl-red-4);
@@ -89,6 +90,7 @@
89
90
 
90
91
  --page-bg: var(--cl-white);
91
92
 
93
+
92
94
  /* ЦВЕТ КНОПОК */
93
95
  /* =========================================== */
94
96
  --btn-primary: var(--cl-white);
@@ -130,6 +132,7 @@
130
132
 
131
133
  /* ЦВЕТ ПОЛЯ ВВОДА */
132
134
  /* =========================================== */
135
+
133
136
 
134
137
  /* =========================================== */
135
138
  /* ЦВЕТ ПОЛЯ ВВОДА */
@@ -138,7 +141,8 @@
138
141
  /* BORDER */
139
142
  /* =========================================== */
140
143
  --border-color: var(--cl-graphite-5);
141
- --border-radius-1: 8px;
144
+ --border-radius-sm: 4px;
145
+ --border-radius-md: 8px;
142
146
  /* =========================================== */
143
147
  /* BORDER */
144
148
 
package/src/index.ts CHANGED
@@ -1,47 +1,36 @@
1
- import { Tooltip } from "./Tooltip";
2
- import { Tabs } from "./Tabs";
3
- import { Slider } from "./Slider";
4
- import { Popover } from "./Popover";
5
- import Logo from "./Logo";
6
- import { InputOTP,
7
- InputOTPGroup,
8
- InputOTPSlot,
9
- InputOTPSeparator
10
- } from "./Input-OTP";
1
+ import { Tooltip } from './Tooltip'
2
+ import { Tabs } from './Tabs'
3
+ import { Slider } from './Slider'
4
+ import { Popover } from './Popover'
5
+ import Logo from './Logo'
6
+ import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from './Input-OTP'
11
7
  import {
12
- BottomNavigation,
13
- BottomNavigationList,
14
- BottomNavigationListItem,
15
- BottomNavigationLink
16
- } from "./BottomNavigation";
17
- import * as Icon from "./Icon";
18
- import {
19
- Collapsible,
20
- CollapsibleTrigger,
21
- CollapsibleContent
22
- } from "./Collapsible";
8
+ BottomNavigation,
9
+ BottomNavigationList,
10
+ BottomNavigationListItem,
11
+ BottomNavigationLink,
12
+ } from './BottomNavigation'
13
+ import * as Icon from './Icon'
14
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './Collapsible'
23
15
  import {
24
16
  AccountCollapsible,
25
17
  AccountCollapsibleHeader,
26
18
  AccountCollapsibleTrigger,
27
19
  AccountCollapsibleContent,
28
20
  AccountCollapsibleContentItem,
29
- } from "./Collapsible";
30
- import { Button } from "./Button";
31
- import { Input } from "./Base/Input";
32
- import { Audio } from "./Audio";
33
- import { cn } from "./@/lib/utils";
34
- import {
35
- Drawer,
36
- DrawerTrigger,
37
- DrawerTitle,
38
- DrawerClose,
39
- DrawerContent
40
- } from './Drawer'
41
- import { Page } from "./Page";
42
- import { Chip } from "./Chip";
43
- import { InputField, InputLabel } from "./Input";
44
- import { Info } from "./Info";
21
+ } from './Collapsible'
22
+ import { Button } from './Button'
23
+ import { Audio } from './Audio'
24
+ import { cn } from './@/lib/utils'
25
+ import { Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent } from './Drawer'
26
+ import { Page } from './Page'
27
+ import { Chip } from './Chip'
28
+ import { InputField, InputLabel } from './Input'
29
+ import { Alert } from './Alert'
30
+ import { Switch } from './Switch'
31
+ import { Label } from './Label'
32
+ import { Textarea } from './Textarea'
33
+ import { SelectAccountCard } from './Select'
45
34
 
46
35
  export {
47
36
  Tooltip,
@@ -62,7 +51,6 @@ export {
62
51
  AccountCollapsibleContent,
63
52
  AccountCollapsibleContentItem,
64
53
  Button,
65
- Input,
66
54
  InputField,
67
55
  InputLabel,
68
56
  Audio,
@@ -79,5 +67,9 @@ export {
79
67
  BottomNavigationLink,
80
68
  Page,
81
69
  Chip,
82
- Info,
83
- };
70
+ Alert,
71
+ Switch,
72
+ Label,
73
+ Textarea,
74
+ SelectAccountCard,
75
+ }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { IInputProps } from './types';
3
- declare const Base: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
4
- export default Base;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = (0, tslib_1.__importDefault)(require("react"));
5
- const react_imask_1 = require("react-imask");
6
- const Base = react_1.default.forwardRef(({ onChange, type = 'text', mask, ...props }, ref) => {
7
- const handleChange = (event) => {
8
- // @ts-ignore
9
- const val = event.target.value;
10
- onChange?.(val, event);
11
- };
12
- if (!mask) {
13
- return (react_1.default.createElement("input", { type: type, ref: ref, onChange: handleChange, ...props }));
14
- }
15
- return (
16
- // @ts-ignore
17
- react_1.default.createElement(react_imask_1.IMaskInput, { type: type, inputRef: ref, mask: mask, onChange: handleChange, ...props }));
18
- });
19
- exports.default = Base;
20
- //# sourceMappingURL=Base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../src/Base/Input/Base.tsx"],"names":[],"mappings":";;;AAAA,+DAAwD;AACxD,6CAAwC;AAGxC,MAAM,IAAI,GAAG,eAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAe,EAAE,GAAmC,EAAE,EAAE;IACjG,MAAM,YAAY,GAAG,CAAC,KAAoC,EAAQ,EAAE;QACnE,aAAa;QACb,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAA;QAC9B,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,IAAI,CAAC,IAAI,EAAE;QACV,OAAO,CACN,yCACC,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,KAClB,KAAK,GACR,CACF,CAAA;KACD;IAED,OAAO;IACN,aAAa;IACb,8BAAC,wBAAU,IACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,GAAG,EACb,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,KAClB,KAAK,GACR,CACF,CAAA;AACF,CAAC,CACD,CAAA;AAED,kBAAe,IAAI,CAAA"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { IInputProps } from './types';
3
- declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
4
- export default Input;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = (0, tslib_1.__importDefault)(require("react"));
5
- const Base_1 = (0, tslib_1.__importDefault)(require("./Base"));
6
- const Input = react_1.default.forwardRef(({ onChange, value, clearable, ...props }, ref) => {
7
- const handleClearClick = () => {
8
- onChange?.('');
9
- };
10
- if (!clearable) {
11
- return (react_1.default.createElement(Base_1.default, { ref: ref, onChange: onChange, value: value, ...props }));
12
- }
13
- return (react_1.default.createElement("div", { className: "input_wrap_clear" },
14
- react_1.default.createElement(Base_1.default, { ref: ref, onChange: onChange, value: value, ...props }),
15
- value && (react_1.default.createElement("a", { className: "input_clear icon-cancel", onClick: handleClearClick, style: { visibility: 'initial' } }))));
16
- });
17
- exports.default = Input;
18
- //# sourceMappingURL=Input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/Base/Input/Input.tsx"],"names":[],"mappings":";;;AAAA,+DAA2C;AAC3C,+DAAyB;AAGzB,MAAM,KAAK,GAAG,eAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAE,GAAmC,EAAE,EAAE;IAC9F,MAAM,gBAAgB,GAAG,GAAS,EAAE;QACnC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAA;IACf,CAAC,CAAA;IAED,IAAI,CAAC,SAAS,EAAE;QACf,OAAO,CACN,8BAAC,cAAI,IACJ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,KACR,KAAK,GACR,CACF,CAAA;KACD;IAED,OAAO,CACN,uCAAK,SAAS,EAAC,kBAAkB;QAChC,8BAAC,cAAI,IACJ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,KACR,KAAK,GACR;QACD,KAAK,IAAI,CACT,qCACC,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,GAC/B,CACF,CACI,CACN,CAAA;AACF,CAAC,CACD,CAAA;AAED,kBAAe,KAAK,CAAA"}
@@ -1,2 +0,0 @@
1
- import Input from './Input';
2
- export { Input };
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Input = void 0;
4
- const tslib_1 = require("tslib");
5
- const Input_1 = (0, tslib_1.__importDefault)(require("./Input"));
6
- exports.Input = Input_1.default;
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Base/Input/index.ts"],"names":[],"mappings":";;;;AAAA,iEAA2B;AAElB,gBAFF,eAAK,CAEE"}
@@ -1,9 +0,0 @@
1
- import React, { ChangeEvent, ChangeEventHandler } from 'react';
2
- declare type CustomChangeEventHandler = (value: string, event?: ChangeEvent<HTMLInputElement>) => void;
3
- declare type CombinedChangeEventHandler = ChangeEventHandler<HTMLInputElement> & CustomChangeEventHandler;
4
- export interface IInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
- onChange?: CombinedChangeEventHandler;
6
- mask?: string | RegExp | (string | RegExp)[] | NumberConstructor;
7
- clearable?: boolean;
8
- }
9
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/Base/Input/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Info.js","sourceRoot":"","sources":["../../src/Info/Info.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uEAAiE;AAEjE,0CAAmC;AACnC,uDAAuD;AAEvD,MAAM,YAAY,GAAG,IAAA,8BAAG,EAAC,2CAA2C,EAAE;IACrE,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,kBAAkB;YAC3B,OAAO,EAAE,kBAAkB;YAC3B,QAAQ,EAAE,wBAAwB;SAClC;KACD;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,OAAO;KAChB;CACD,CAAC,CAAA;AAMF,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzG,OAAO,CACN,6BACC,SAAS,EAAE,IAAA,UAAE,EAAC,YAAY,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KAC/C,KAAK,IAER,QAAQ,CACJ,CACN,CAAA;AACF,CAAC,CAAC,CAAA;AAIO,oBAAI;AAFb,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA"}
@@ -1 +0,0 @@
1
- export { Info } from './Info';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Info = void 0;
4
- var Info_1 = require("./Info");
5
- Object.defineProperty(exports, "Info", { enumerable: true, get: function () { return Info_1.Info; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Info/index.ts"],"names":[],"mappings":";;;AAAA,+BAA6B;AAApB,4FAAA,IAAI,OAAA"}