@modul/mbui 0.0.13-beta-pv-53036-07674e76 → 0.0.13

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 (136) hide show
  1. package/dist/Base/Input/Base.d.ts +4 -0
  2. package/dist/Base/Input/Base.js +20 -0
  3. package/dist/Base/Input/Base.js.map +1 -0
  4. package/dist/Base/Input/Input.d.ts +4 -0
  5. package/dist/Base/Input/Input.js +18 -0
  6. package/dist/Base/Input/Input.js.map +1 -0
  7. package/dist/Base/Input/index.d.ts +2 -0
  8. package/dist/Base/Input/index.js +7 -0
  9. package/dist/Base/Input/index.js.map +1 -0
  10. package/dist/Base/Input/types.d.ts +9 -0
  11. package/dist/Base/Input/types.js +3 -0
  12. package/dist/Base/Input/types.js.map +1 -0
  13. package/dist/Button/Button.d.ts +1 -1
  14. package/dist/Chip/Chip.d.ts +1 -1
  15. package/dist/Drawer/Drawer.js +1 -1
  16. package/dist/Drawer/Drawer.js.map +1 -1
  17. package/dist/{Alert/Alert.d.ts → Info/Info.d.ts} +4 -4
  18. package/dist/{Alert/Alert.js → Info/Info.js} +7 -7
  19. package/dist/Info/Info.js.map +1 -0
  20. package/dist/Info/index.d.ts +1 -0
  21. package/dist/Info/index.js +6 -0
  22. package/dist/Info/index.js.map +1 -0
  23. package/dist/Input/Input.js +1 -1
  24. package/dist/Input/Input.js.map +1 -1
  25. package/dist/Input/index.d.ts +0 -1
  26. package/dist/Input/index.js +1 -3
  27. package/dist/Input/index.js.map +1 -1
  28. package/dist/Input-OTP/Input.d.ts +4 -4
  29. package/dist/Page/Page.js +1 -1
  30. package/dist/Page/Page.js.map +1 -1
  31. package/dist/Progress/Progress.d.ts +4 -0
  32. package/dist/Progress/Progress.js +12 -0
  33. package/dist/Progress/Progress.js.map +1 -0
  34. package/dist/Progress/index.d.ts +1 -0
  35. package/dist/Progress/index.js +6 -0
  36. package/dist/Progress/index.js.map +1 -0
  37. package/dist/index.d.ts +20 -27
  38. package/dist/index.js +10 -41
  39. package/dist/index.js.map +1 -1
  40. package/package.json +4 -12
  41. package/src/Drawer/Drawer.tsx +2 -2
  42. package/src/DrawerCompanyList/CompanyList.tsx +63 -0
  43. package/src/DrawerCompanyList/index.ts +1 -0
  44. package/src/{Alert/Alert.tsx → Info/Info.tsx} +6 -6
  45. package/src/Info/index.ts +1 -0
  46. package/src/Input/Input.tsx +1 -1
  47. package/src/Input/index.ts +1 -2
  48. package/src/Label/Label.tsx +1 -1
  49. package/src/Page/Page.tsx +1 -1
  50. package/src/Progress/Progress.tsx +23 -0
  51. package/src/Progress/index.ts +1 -0
  52. package/src/assets/css/global.css +9 -22
  53. package/src/index.ts +41 -67
  54. package/dist/Alert/Alert.js.map +0 -1
  55. package/dist/Alert/index.d.ts +0 -1
  56. package/dist/Alert/index.js +0 -6
  57. package/dist/Alert/index.js.map +0 -1
  58. package/dist/AlertDialog/AlertDialog.d.ts +0 -20
  59. package/dist/AlertDialog/AlertDialog.js +0 -42
  60. package/dist/AlertDialog/AlertDialog.js.map +0 -1
  61. package/dist/AlertDialog/index.d.ts +0 -1
  62. package/dist/AlertDialog/index.js +0 -16
  63. package/dist/AlertDialog/index.js.map +0 -1
  64. package/dist/Calendar/Calendar.d.ts +0 -8
  65. package/dist/Calendar/Calendar.js +0 -45
  66. package/dist/Calendar/Calendar.js.map +0 -1
  67. package/dist/Calendar/index.d.ts +0 -1
  68. package/dist/Calendar/index.js +0 -6
  69. package/dist/Calendar/index.js.map +0 -1
  70. package/dist/DatePicker/DatePicker.d.ts +0 -11
  71. package/dist/DatePicker/DatePicker.js +0 -23
  72. package/dist/DatePicker/DatePicker.js.map +0 -1
  73. package/dist/DatePicker/index.d.ts +0 -1
  74. package/dist/DatePicker/index.js +0 -6
  75. package/dist/DatePicker/index.js.map +0 -1
  76. package/dist/Form/Form.d.ts +0 -23
  77. package/dist/Form/Form.js +0 -73
  78. package/dist/Form/Form.js.map +0 -1
  79. package/dist/Form/index.d.ts +0 -1
  80. package/dist/Form/index.js +0 -13
  81. package/dist/Form/index.js.map +0 -1
  82. package/dist/Input/InputMask.d.ts +0 -3
  83. package/dist/Input/InputMask.js +0 -12
  84. package/dist/Input/InputMask.js.map +0 -1
  85. package/dist/Label/Label.d.ts +0 -5
  86. package/dist/Label/Label.js +0 -13
  87. package/dist/Label/Label.js.map +0 -1
  88. package/dist/Label/index.d.ts +0 -1
  89. package/dist/Label/index.js +0 -6
  90. package/dist/Label/index.js.map +0 -1
  91. package/dist/Select/Select.d.ts +0 -5
  92. package/dist/Select/Select.js +0 -11
  93. package/dist/Select/Select.js.map +0 -1
  94. package/dist/Select/SelectAccountCard.d.ts +0 -5
  95. package/dist/Select/SelectAccountCard.js +0 -77
  96. package/dist/Select/SelectAccountCard.js.map +0 -1
  97. package/dist/Select/SelectAsync.d.ts +0 -8
  98. package/dist/Select/SelectAsync.js +0 -73
  99. package/dist/Select/SelectAsync.js.map +0 -1
  100. package/dist/Select/SelectBase.d.ts +0 -8
  101. package/dist/Select/SelectBase.js +0 -74
  102. package/dist/Select/SelectBase.js.map +0 -1
  103. package/dist/Select/index.d.ts +0 -4
  104. package/dist/Select/index.js +0 -12
  105. package/dist/Select/index.js.map +0 -1
  106. package/dist/Switch/Switch.d.ts +0 -4
  107. package/dist/Switch/Switch.js +0 -31
  108. package/dist/Switch/Switch.js.map +0 -1
  109. package/dist/Switch/index.d.ts +0 -1
  110. package/dist/Switch/index.js +0 -6
  111. package/dist/Switch/index.js.map +0 -1
  112. package/dist/Textarea/Textarea.d.ts +0 -5
  113. package/dist/Textarea/Textarea.js +0 -12
  114. package/dist/Textarea/Textarea.js.map +0 -1
  115. package/dist/Textarea/index.d.ts +0 -1
  116. package/dist/Textarea/index.js +0 -6
  117. package/dist/Textarea/index.js.map +0 -1
  118. package/src/Alert/index.ts +0 -1
  119. package/src/AlertDialog/AlertDialog.tsx +0 -138
  120. package/src/AlertDialog/index.ts +0 -13
  121. package/src/Calendar/Calendar.tsx +0 -61
  122. package/src/Calendar/index.ts +0 -1
  123. package/src/DatePicker/DatePicker.tsx +0 -40
  124. package/src/DatePicker/index.ts +0 -1
  125. package/src/Form/Form.tsx +0 -152
  126. package/src/Form/index.ts +0 -1
  127. package/src/Input/InputMask.tsx +0 -15
  128. package/src/Select/Select.tsx +0 -19
  129. package/src/Select/SelectAccountCard.tsx +0 -175
  130. package/src/Select/SelectAsync.tsx +0 -183
  131. package/src/Select/SelectBase.tsx +0 -193
  132. package/src/Select/index.ts +0 -4
  133. package/src/Switch/Switch.tsx +0 -47
  134. package/src/Switch/index.ts +0 -1
  135. package/src/Textarea/Textarea.tsx +0 -24
  136. package/src/Textarea/index.ts +0 -1
@@ -0,0 +1,63 @@
1
+ import React from 'react'
2
+
3
+
4
+ type DrawerListProps = {
5
+ children: React.ReactNode
6
+ }
7
+
8
+ const CompanyList: React.FC<DrawerListProps> = ({ children }) => {
9
+ return (
10
+ <div
11
+ role="list"
12
+ className="px-[20px] divide-y"
13
+ >
14
+ {children}
15
+ </div>
16
+ )
17
+ }
18
+
19
+ type DrawerListItemProps = {
20
+ value: string
21
+ label: string | JSX.Element
22
+ isActive?: boolean
23
+ onClick?: () => void
24
+ }
25
+ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isActive, onClick }) => {
26
+ return (
27
+ <button
28
+ className="flex py-[16px] w-full text-left"
29
+ role="listitem"
30
+ aria-selected={isActive}
31
+ aria-labelledby="1"
32
+ onClick={onClick}
33
+ >
34
+ <span className="w-[calc(100%-50px)]">
35
+ <span
36
+ className="flex [&+span]:mt-[4px] font-medium text-[14px] text-muted leading-[1.28]"
37
+ id="1"
38
+ >
39
+ <span className="[&+span]:ml-[8px] truncate">{label}</span>
40
+
41
+ <span className="inline-flex bg-[#EE7C2D] px-[4px] rounded-full h-[16px] text-[#fff] text-[12px] truncate leading-[16px] shrink-0">
42
+ 23
43
+ </span>
44
+ </span>
45
+ <span className="block font-bold text-[20px] leading-[1.2]">{value}</span>
46
+ </span>
47
+ {isActive && (
48
+ <Check
49
+ width={16}
50
+ height={16}
51
+ className="ml-auto text-primary self-center"
52
+ />
53
+ )}
54
+ </button>
55
+ )
56
+ }
57
+
58
+ export { CompanyList }
59
+
60
+
61
+ {/* <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
62
+ {children}
63
+ <DrawerFooter /> */}
@@ -0,0 +1 @@
1
+ export { CompanyList } from './CompanyList'
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from 'class-variance-authority'
4
4
  import { cn } from '../@/lib/utils'
5
5
  // import { cn } from "@/lib/utils" порешать с алиасами
6
6
 
7
- const alertVariants = cva('px-[16px] py-[12px] rounded-sm text-[14px]', {
7
+ const infoVariants = cva('px-[16px] py-[12px] rounded-1 text-[14px]', {
8
8
  variants: {
9
9
  variant: {
10
10
  light: 'bg-[--cl-graphite-7]',
@@ -19,13 +19,13 @@ const alertVariants = cva('px-[16px] py-[12px] rounded-sm text-[14px]', {
19
19
  })
20
20
 
21
21
 
22
- export interface IProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
22
+ export interface IProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof infoVariants> {
23
23
  }
24
24
 
25
- const Alert = React.forwardRef<HTMLDivElement, IProps>(({ className, variant, children, ...props }, ref) => {
25
+ const Info = React.forwardRef<HTMLDivElement, IProps>(({ className, variant, children, ...props }, ref) => {
26
26
  return (
27
27
  <div
28
- className={cn(alertVariants({ variant, className }))}
28
+ className={cn(infoVariants({ variant, className }))}
29
29
  {...props}
30
30
  >
31
31
  {children}
@@ -33,6 +33,6 @@ const Alert = React.forwardRef<HTMLDivElement, IProps>(({ className, variant, ch
33
33
  )
34
34
  })
35
35
 
36
- Alert.displayName = 'Alert'
36
+ Info.displayName = 'Info'
37
37
 
38
- export { Alert }
38
+ export { Info }
@@ -0,0 +1 @@
1
+ export { Info } from './Info'
@@ -21,7 +21,7 @@ const InputField = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<
21
21
  <input
22
22
  type={type}
23
23
  className={cn(
24
- 'form-input px-[16px] 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',
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',
25
25
  className
26
26
  )}
27
27
  ref={ref}
@@ -1,2 +1 @@
1
- export { InputField, InputLabel } from './Input'
2
- export { InputMask } from './InputMask'
1
+ export { InputField, InputLabel } from './Input'
@@ -3,7 +3,7 @@ import * as LabelPrimitive from '@radix-ui/react-label'
3
3
  import { cva, type VariantProps } from 'class-variance-authority'
4
4
  import { cn } from '../@/lib/utils'
5
5
 
6
- const labelVariants = cva('peer-disabled:opacity-70 peer-disabled:cursor-not-allowed')
6
+ const labelVariants = cva('peer-disabled:opacity-70 font-medium text-[12px] leading-[1.33] peer-disabled:cursor-not-allowed')
7
7
 
8
8
  const Label = React.forwardRef<
9
9
  React.ElementRef<typeof LabelPrimitive.Root>,
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] overflow-y-auto', className)}>{children}</div>
18
+ return <div className={cn('px-[20px] py-[16px]', className)}>{children}</div>
19
19
  }
20
20
 
21
21
  const Page: IPage = ({ children, className }: IProps) => {
@@ -0,0 +1,23 @@
1
+ import * as React from 'react'
2
+ import * as ProgressPrimitive from '@radix-ui/react-progress'
3
+
4
+ import { cn } from '../@/lib/utils'
5
+
6
+ const Progress = React.forwardRef<
7
+ React.ElementRef<typeof ProgressPrimitive.Root>,
8
+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
9
+ >(({ className, value, ...props }, ref) => (
10
+ <ProgressPrimitive.Root
11
+ ref={ref}
12
+ className={cn('relative h-[--progress-height] w-full overflow-hidden rounded-full bg-[--progess-bg]', className)}
13
+ {...props}
14
+ >
15
+ <ProgressPrimitive.Indicator
16
+ className="bg-primary rounded-full w-full h-full transition-all"
17
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
18
+ />
19
+ </ProgressPrimitive.Root>
20
+ ))
21
+ Progress.displayName = ProgressPrimitive.Root.displayName
22
+
23
+ export { Progress }
@@ -0,0 +1 @@
1
+ export { Progress } from './Progress'
@@ -3,26 +3,6 @@
3
3
  @tailwind utilities;
4
4
 
5
5
  @layer base {
6
- html,
7
- body {
8
- height: 100%;
9
- min-height: 100%;
10
- color: var(--text-base)
11
- }
12
-
13
- body {
14
- margin: 0;
15
- /* max-width: 640px; */
16
- min-width: 320px;
17
- -webkit-overflow-scrolling: touch;
18
- }
19
-
20
- @supports (-webkit-touch-callout: none) {
21
- html,
22
- body {
23
- height: -webkit-fill-available;
24
- }
25
- }
26
6
 
27
7
  @font-face {
28
8
  font-weight: 100 900;
@@ -150,7 +130,6 @@
150
130
  /* =========================================== */
151
131
  /* ЦВЕТ КНОПОК */
152
132
 
153
-
154
133
  /* ЦВЕТ ПОЛЯ ВВОДА */
155
134
  /* =========================================== */
156
135
 
@@ -158,7 +137,6 @@
158
137
  /* =========================================== */
159
138
  /* ЦВЕТ ПОЛЯ ВВОДА */
160
139
 
161
-
162
140
  /* BORDER */
163
141
  /* =========================================== */
164
142
  --border-color: var(--cl-graphite-5);
@@ -173,6 +151,15 @@
173
151
  --shadow-md: 0 2px 10px rgba(36, 48, 54, 0.12);
174
152
  /* =========================================== */
175
153
  /* SHADOWS */
154
+
155
+ /* PROGRESS */
156
+ /* =========================================== */
157
+ --progress-height: 4px;
158
+ --progress-bg: var(--cl-graphite-6);
159
+ /* =========================================== */
160
+ /* PROGRESS */
161
+
162
+
176
163
  }
177
164
 
178
165
 
package/src/index.ts CHANGED
@@ -1,51 +1,48 @@
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'
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";
7
11
  import {
8
- BottomNavigation,
9
- BottomNavigationList,
10
- BottomNavigationListItem,
11
- BottomNavigationLink,
12
- } from './BottomNavigation'
13
- import * as Icon from './Icon'
14
- import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './Collapsible'
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";
15
23
  import {
16
24
  AccountCollapsible,
17
25
  AccountCollapsibleHeader,
18
26
  AccountCollapsibleTrigger,
19
27
  AccountCollapsibleContent,
20
28
  AccountCollapsibleContentItem,
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, InputMask } 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, SelectAsync } from './Select'
34
- import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage } from './Form'
35
- import { Calendar } from './Calendar'
36
- import { DatePicker } from './DatePicker'
37
- import { Select } from './Select'
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";
38
34
  import {
39
- AlertDialog,
40
- AlertDialogTrigger,
41
- AlertDialogContent,
42
- AlertDialogHeader,
43
- AlertDialogFooter,
44
- AlertDialogTitle,
45
- AlertDialogDescription,
46
- AlertDialogAction,
47
- AlertDialogCancel,
48
- } from './AlertDialog'
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";
45
+ import { Progress } from "./Progress"
49
46
 
50
47
  export {
51
48
  Tooltip,
@@ -66,6 +63,7 @@ export {
66
63
  AccountCollapsibleContent,
67
64
  AccountCollapsibleContentItem,
68
65
  Button,
66
+ Input,
69
67
  InputField,
70
68
  InputLabel,
71
69
  Audio,
@@ -82,30 +80,6 @@ export {
82
80
  BottomNavigationLink,
83
81
  Page,
84
82
  Chip,
85
- Alert,
86
- Switch,
87
- Label,
88
- Textarea,
89
- SelectAccountCard,
90
- Form,
91
- FormLabel,
92
- FormField,
93
- FormItem,
94
- FormControl,
95
- FormDescription,
96
- FormMessage,
97
- Calendar,
98
- DatePicker,
99
- SelectAsync,
100
- InputMask,
101
- Select,
102
- AlertDialog,
103
- AlertDialogTrigger,
104
- AlertDialogContent,
105
- AlertDialogHeader,
106
- AlertDialogFooter,
107
- AlertDialogTitle,
108
- AlertDialogDescription,
109
- AlertDialogAction,
110
- AlertDialogCancel,
111
- }
83
+ Info,
84
+ Progress,
85
+ };
@@ -1 +0,0 @@
1
- {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/Alert/Alert.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uEAAiE;AAEjE,0CAAmC;AACnC,uDAAuD;AAEvD,MAAM,aAAa,GAAG,IAAA,8BAAG,EAAC,4CAA4C,EAAE;IACvE,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,KAAK,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1G,OAAO,CACN,6BACC,SAAS,EAAE,IAAA,UAAE,EAAC,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KAChD,KAAK,IAER,QAAQ,CACJ,CACN,CAAA;AACF,CAAC,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
@@ -1 +0,0 @@
1
- export { Alert } from './Alert';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Alert = void 0;
4
- var Alert_1 = require("./Alert");
5
- Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return Alert_1.Alert; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Alert/index.ts"],"names":[],"mappings":";;;AAAA,iCAA+B;AAAtB,8FAAA,KAAK,OAAA"}
@@ -1,20 +0,0 @@
1
- import * as React from "react";
2
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
- declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
- declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
- declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const AlertDialogHeader: {
9
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
10
- displayName: string;
11
- };
12
- declare const AlertDialogFooter: {
13
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
- displayName: string;
15
- };
16
- declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
- declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
- declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
- declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
- export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = (0, tslib_1.__importStar)(require("react"));
6
- const AlertDialogPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-alert-dialog"));
7
- const utils_1 = require("../@/lib/utils");
8
- const Button_1 = require("../Button");
9
- const AlertDialog = AlertDialogPrimitive.Root;
10
- exports.AlertDialog = AlertDialog;
11
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
12
- exports.AlertDialogTrigger = AlertDialogTrigger;
13
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
14
- exports.AlertDialogPortal = AlertDialogPortal;
15
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Overlay, { className: (0, utils_1.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props, ref: ref })));
16
- exports.AlertDialogOverlay = AlertDialogOverlay;
17
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
18
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPortal, null,
19
- React.createElement(AlertDialogOverlay, null),
20
- React.createElement(AlertDialogPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-input bg-dialog p-[16px] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-md", className), ...props }))));
21
- exports.AlertDialogContent = AlertDialogContent;
22
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
23
- const AlertDialogHeader = ({ className, ...props }) => (React.createElement("div", { className: (0, utils_1.cn)("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
24
- exports.AlertDialogHeader = AlertDialogHeader;
25
- AlertDialogHeader.displayName = "AlertDialogHeader";
26
- const AlertDialogFooter = ({ className, ...props }) => (React.createElement("div", { className: (0, utils_1.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
27
- exports.AlertDialogFooter = AlertDialogFooter;
28
- AlertDialogFooter.displayName = "AlertDialogFooter";
29
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Title, { ref: ref, className: (0, utils_1.cn)("text-lg font-semibold", className), ...props })));
30
- exports.AlertDialogTitle = AlertDialogTitle;
31
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
32
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Description, { ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className), ...props })));
33
- exports.AlertDialogDescription = AlertDialogDescription;
34
- AlertDialogDescription.displayName =
35
- AlertDialogPrimitive.Description.displayName;
36
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Action, { ref: ref, className: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: 'primary', size: 'sm' }), className), ...props })));
37
- exports.AlertDialogAction = AlertDialogAction;
38
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
39
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (React.createElement(AlertDialogPrimitive.Cancel, { ref: ref, className: (0, utils_1.cn)((0, Button_1.buttonVariants)({ variant: "outline", size: 'sm' }), className), ...props })));
40
- exports.AlertDialogCancel = AlertDialogCancel;
41
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
42
- //# sourceMappingURL=AlertDialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AlertDialog.js","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"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"}
@@ -1 +0,0 @@
1
- export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './AlertDialog';
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = void 0;
4
- var AlertDialog_1 = require("./AlertDialog");
5
- Object.defineProperty(exports, "AlertDialog", { enumerable: true, get: function () { return AlertDialog_1.AlertDialog; } });
6
- Object.defineProperty(exports, "AlertDialogPortal", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogPortal; } });
7
- Object.defineProperty(exports, "AlertDialogOverlay", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogOverlay; } });
8
- Object.defineProperty(exports, "AlertDialogTrigger", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogTrigger; } });
9
- Object.defineProperty(exports, "AlertDialogContent", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogContent; } });
10
- Object.defineProperty(exports, "AlertDialogHeader", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogHeader; } });
11
- Object.defineProperty(exports, "AlertDialogFooter", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogFooter; } });
12
- Object.defineProperty(exports, "AlertDialogTitle", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogTitle; } });
13
- Object.defineProperty(exports, "AlertDialogDescription", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogDescription; } });
14
- Object.defineProperty(exports, "AlertDialogAction", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogAction; } });
15
- Object.defineProperty(exports, "AlertDialogCancel", { enumerable: true, get: function () { return AlertDialog_1.AlertDialogCancel; } });
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AlertDialog/index.ts"],"names":[],"mappings":";;;AAAA,6CAYsB;AAXrB,0GAAA,WAAW,OAAA;AACX,gHAAA,iBAAiB,OAAA;AACjB,iHAAA,kBAAkB,OAAA;AAClB,iHAAA,kBAAkB,OAAA;AAClB,iHAAA,kBAAkB,OAAA;AAClB,gHAAA,iBAAiB,OAAA;AACjB,gHAAA,iBAAiB,OAAA;AACjB,+GAAA,gBAAgB,OAAA;AAChB,qHAAA,sBAAsB,OAAA;AACtB,gHAAA,iBAAiB,OAAA;AACjB,gHAAA,iBAAiB,OAAA"}
@@ -1,8 +0,0 @@
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 };
@@ -1,45 +0,0 @@
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 locale_1 = require("date-fns/locale");
9
- const daySelectedClasses = 'bg-btn-primary text-btn-primary rounded-sm';
10
- const dayTodayClasses = 'bg-btn-secondary text-btn-secondary rounded-sm';
11
- const rangeMiddleClasses = 'date-range-middle aria-selected:bg-btn-primary/50 aria-selected:text-white';
12
- const btnNavClasses = 'opacity-50 hover:opacity-100 ring-offset-2 focus-visible:opacity-100 focus-visible:outline-primary border-input border rounded-sm shadow-sm';
13
- function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
14
- return (React.createElement(react_day_picker_1.DayPicker, { locale: locale_1.ru, showOutsideDays: showOutsideDays, className: (0, utils_1.cn)('inline-flex', className), classNames: {
15
- months: 'relative',
16
- month: 'flex flex-col space-y-[16px] items-center',
17
- month_grid: 'w-full border-collapse',
18
- month_caption: 'inline m-x-auto',
19
- caption_label: 'text-sm font-medium capitalize',
20
- nav: 'flex justify-between absolute start-0 end-0',
21
- button_previous: btnNavClasses,
22
- button_next: btnNavClasses,
23
- weekdays: 'flex',
24
- weekday: 'text-light w-[32px] font-normal text-[14px]',
25
- week: 'flex w-full mt-2',
26
- day_button: 'w-[32px] h-[32px] p-0',
27
- day: (0, utils_1.cn)('aria-selected:opacity-100 text-[14px] leading-[1]', props.mode === 'range'
28
- ? '[&:(.day-range-middle)]:rounded-0 [&:has(>.day-range-end)]:rounded-r-sm [&:has(>.day-range-start)]:rounded-l-sm first:[&:has([aria-selected])]:rounded-l-sm last:[&:has([aria-selected])]:rounded-r-sm'
29
- : '[&:([aria-selected])]:rounded-sm'),
30
- range_start: 'day-range-start',
31
- range_end: 'day-range-end',
32
- range_middle: rangeMiddleClasses,
33
- selected: daySelectedClasses,
34
- today: dayTodayClasses,
35
- outside: 'day-outside opacity-50 aria-selected:bg-primary aria-selected:text-[white] aria-selected:opacity-30',
36
- disabled: 'text-light opacity-50',
37
- hidden: 'invisible',
38
- ...classNames,
39
- }, components: {
40
- // Chevron: () => <Left className="w-4 h-4" />,
41
- }, ...props }));
42
- }
43
- exports.Calendar = Calendar;
44
- Calendar.displayName = 'Calendar';
45
- //# sourceMappingURL=Calendar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../src/Calendar/Calendar.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uDAA4C;AAC5C,0CAAmC;AACnC,4CAAoC;AAEpC,MAAM,kBAAkB,GAAG,4CAA4C,CAAA;AACvE,MAAM,eAAe,GAAG,gDAAgD,CAAA;AACxE,MAAM,kBAAkB,GAAG,4EAA4E,CAAA;AACvG,MAAM,aAAa,GAClB,6IAA6I,CAAA;AAG9I,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI,EAAE,GAAG,KAAK,EAAiB;IAC3F,OAAO,CACN,oBAAC,4BAAS,IACT,MAAM,EAAE,WAAE,EACV,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,IAAA,UAAE,EAAC,aAAa,EAAE,SAAS,CAAC,EACvC,UAAU,EAAE;YACX,MAAM,EAAE,UAAU;YAClB,KAAK,EAAE,2CAA2C;YAClD,UAAU,EAAE,wBAAwB;YACpC,aAAa,EAAE,iBAAiB;YAChC,aAAa,EAAE,gCAAgC;YAC/C,GAAG,EAAE,6CAA6C;YAClD,eAAe,EAAE,aAAa;YAC9B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,6CAA6C;YACtD,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,uBAAuB;YACnC,GAAG,EAAE,IAAA,UAAE,EACN,mDAAmD,EACnD,KAAK,CAAC,IAAI,KAAK,OAAO;gBACrB,CAAC,CAAC,wMAAwM;gBAC1M,CAAC,CAAC,kCAAkC,CACrC;YACD,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,eAAe;YAC1B,YAAY,EAAE,kBAAkB;YAChC,QAAQ,EAAE,kBAAkB;YAC5B,KAAK,EAAE,eAAe;YACtB,OAAO,EACN,qGAAqG;YACtG,QAAQ,EAAE,uBAAuB;YACjC,MAAM,EAAE,WAAW;YACnB,GAAG,UAAU;SACb,EACD,UAAU,EACT;QACC,+CAA+C;SAC/C,KAEE,KAAK,GACR,CACF,CAAA;AACF,CAAC;AAIQ,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
@@ -1 +0,0 @@
1
- export { Calendar } from './Calendar';
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Calendar/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- interface IProps {
3
- mode?: any;
4
- placeholder?: string;
5
- date?: Date;
6
- classTrigger?: string;
7
- triggerDisabled?: boolean;
8
- onSelect?: (value: Date) => void;
9
- }
10
- declare const DatePicker: React.FC<IProps>;
11
- export { DatePicker };
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DatePicker = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = (0, tslib_1.__importStar)(require("react"));
6
- const date_fns_1 = require("date-fns");
7
- const utils_1 = require("../@/lib/utils");
8
- const Calendar_1 = require("../Calendar");
9
- const Icon_1 = require("../Icon");
10
- const Popover_1 = require("../Popover");
11
- const locale_1 = require("date-fns/locale");
12
- const trigegrClasses = 'inline-flex items-center border-input px-[12px] border rounded-sm h-[44px] text-left';
13
- const DatePicker = ({ placeholder, triggerDisabled, date, classTrigger, ...props }) => {
14
- return (React.createElement(Popover_1.Popover, null,
15
- React.createElement(Popover_1.Popover.Trigger, { asChild: true },
16
- React.createElement("button", { className: (0, utils_1.cn)(trigegrClasses, { 'bg-light text-light': triggerDisabled }, classTrigger), disabled: triggerDisabled },
17
- date ? React.createElement("span", { className: 'w-[calc(100%-26px)] truncate' }, (0, date_fns_1.format)(date, 'PPP', { locale: locale_1.ru })) : React.createElement("span", { className: 'w-[calc(100%-26px)] text-light truncate' }, placeholder),
18
- React.createElement(Icon_1.Calendar, { width: 18, height: 18, className: "ml-[8px] text-light shrink-0" }))),
19
- React.createElement(Popover_1.Popover.Content, { className: "bg-page p-0 w-auto", align: "center" },
20
- React.createElement(Calendar_1.Calendar, { ...props }))));
21
- };
22
- exports.DatePicker = DatePicker;
23
- //# sourceMappingURL=DatePicker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../src/DatePicker/DatePicker.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,uCAAiC;AACjC,0CAAmC;AACnC,0CAAsC;AACtC,kCAAkD;AAClD,wCAAoC;AACpC,4CAAoC;AAEpC,MAAM,cAAc,GAAG,sFAAsF,CAAA;AAW7G,MAAM,UAAU,GAAqB,CAAC,EAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,YAAY,EAAG,GAAG,KAAK,EAAC,EAAE,EAAE;IAEtG,OAAO,CACN,oBAAC,iBAAO;QACP,oBAAC,iBAAO,CAAC,OAAO,IAAC,OAAO;YACvB,gCAAQ,SAAS,EAAE,IAAA,UAAE,EAAC,cAAc,EAAE,EAAC,qBAAqB,EAAC,eAAe,EAAC,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAe;gBACrH,IAAI,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,8BAA8B,IAAE,IAAA,iBAAM,EAAC,IAAI,EAAE,KAAK,EAAE,EAAC,MAAM,EAAE,WAAE,EAAC,CAAC,CAAQ,CAAC,CAAC,CAAC,8BAAM,SAAS,EAAC,yCAAyC,IAAE,WAAW,CAAQ;gBAClL,oBAAC,eAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAC,8BAA8B,GAAG,CACxE,CACQ;QAClB,oBAAC,iBAAO,CAAC,OAAO,IACf,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAC,QAAQ;YAEd,oBAAC,mBAAQ,OAAK,KAAK,GAAG,CACL,CACT,CACV,CAAA;AACF,CAAC,CAAA;AAEQ,gCAAU"}
@@ -1 +0,0 @@
1
- export { DatePicker } from './DatePicker';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DatePicker = void 0;
4
- var DatePicker_1 = require("./DatePicker");
5
- Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return DatePicker_1.DatePicker; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DatePicker/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -1,23 +0,0 @@
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 };