@modul/mbui 0.0.16-beta-pv-53147-00d3e008 → 0.0.16-beta-pv-53139-88618ef5
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.
- package/dist/Alert/Alert.d.ts +6 -15
- package/dist/Alert/Alert.js +19 -30
- package/dist/Alert/Alert.js.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +10 -10
- package/dist/AlertDialog/AlertDialog.js.map +1 -1
- package/dist/Badge/Badge.d.ts +10 -0
- package/dist/Badge/Badge.js +52 -0
- package/dist/Badge/Badge.js.map +1 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/Badge/index.js +7 -0
- package/dist/Badge/index.js.map +1 -0
- package/dist/BottomNavigation/BottomNavigation.js +3 -21
- package/dist/BottomNavigation/BottomNavigation.js.map +1 -1
- package/dist/Button/Button.d.ts +2 -2
- package/dist/Button/Button.js +119 -17
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Calendar/Calendar.js +3 -3
- package/dist/Calendar/Calendar.js.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts +4 -0
- package/dist/Checkbox/Checkbox.js +35 -0
- package/dist/Checkbox/Checkbox.js.map +1 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Checkbox/index.js +6 -0
- package/dist/Checkbox/index.js.map +1 -0
- package/dist/Chip/Chip.js +3 -2
- package/dist/Chip/Chip.js.map +1 -1
- package/dist/Collapsible/AccountCollapsible.js +3 -18
- package/dist/Collapsible/AccountCollapsible.js.map +1 -1
- package/dist/DatePicker/DatePicker.js +6 -6
- package/dist/DatePicker/DatePicker.js.map +1 -1
- package/dist/Drawer/Drawer.js +3 -3
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Form/Form.js +6 -6
- package/dist/Form/Form.js.map +1 -1
- package/dist/Icon/icons/InfoSolid.js +1 -1
- package/dist/Icon/icons/InfoSolid.js.map +1 -1
- package/dist/Input/Input.js +3 -3
- package/dist/Input/Input.js.map +1 -1
- package/dist/Input/InputMask.js +1 -22
- package/dist/Input/InputMask.js.map +1 -1
- package/dist/Input-OTP/Input.js +5 -4
- package/dist/Input-OTP/Input.js.map +1 -1
- package/dist/Label/Label.js +2 -2
- package/dist/Label/Label.js.map +1 -1
- package/dist/Page/Page.js +4 -4
- package/dist/Page/Page.js.map +1 -1
- package/dist/Popover/Popover.js +2 -23
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/Progress/Progress.js +3 -11
- package/dist/Progress/Progress.js.map +1 -1
- package/dist/Select/SelectAccountCard.js +7 -33
- package/dist/Select/SelectAccountCard.js.map +1 -1
- package/dist/Select/SelectAsync.js +6 -17
- package/dist/Select/SelectAsync.js.map +1 -1
- package/dist/Select/SelectBase.js +6 -17
- package/dist/Select/SelectBase.js.map +1 -1
- package/dist/Slider/Slider.js +5 -21
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Switch/Switch.js +13 -27
- package/dist/Switch/Switch.js.map +1 -1
- package/dist/Tabs/Tabs.js +9 -39
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Textarea/Textarea.d.ts +1 -1
- package/dist/Textarea/Textarea.js +3 -20
- package/dist/Textarea/Textarea.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/@/config/index.ts +72 -72
- package/src/Alert/Alert.tsx +25 -68
- package/src/AlertDialog/AlertDialog.tsx +3 -2
- package/src/Badge/Badge.tsx +58 -0
- package/src/Badge/index.ts +1 -0
- package/src/BottomNavigation/BottomNavigation.tsx +2 -20
- package/src/Button/Button.tsx +140 -43
- package/src/Button/index.ts +1 -1
- package/src/Calendar/Calendar.tsx +1 -1
- package/src/Checkbox/Checkbox.tsx +44 -0
- package/src/Checkbox/index.ts +1 -0
- package/src/Chip/Chip.tsx +3 -2
- package/src/Collapsible/AccountCollapsible.tsx +3 -19
- package/src/DatePicker/DatePicker.tsx +5 -5
- package/src/Drawer/Drawer.tsx +1 -2
- package/src/Form/Form.tsx +3 -5
- package/src/Icon/icons/InfoSolid.tsx +1 -1
- package/src/Input/Input.tsx +1 -1
- package/src/Input/InputMask.tsx +1 -22
- package/src/Input-OTP/Input.tsx +2 -1
- package/src/Label/Label.tsx +1 -1
- package/src/Page/Page.tsx +1 -1
- package/src/Popover/Popover.tsx +2 -24
- package/src/Progress/Progress.tsx +3 -11
- package/src/Select/Select.tsx +1 -1
- package/src/Select/SelectAccountCard.tsx +11 -32
- package/src/Select/SelectAsync.tsx +10 -16
- package/src/Select/SelectBase.tsx +6 -16
- package/src/Slider/Slider.tsx +4 -21
- package/src/Switch/Switch.tsx +13 -26
- package/src/Tabs/Tabs.tsx +9 -41
- package/src/Textarea/Textarea.tsx +19 -30
- package/src/assets/css/global.css +6 -11
- package/src/index.ts +9 -3
package/src/Label/Label.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label'
|
|
3
3
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
import { cn } from '
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
5
|
|
|
6
6
|
const labelVariants = cva('peer-disabled:opacity-70 peer-disabled:cursor-not-allowed')
|
|
7
7
|
|
package/src/Page/Page.tsx
CHANGED
package/src/Popover/Popover.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import cn from '
|
|
2
|
+
import cn from 'classnames'
|
|
3
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover'
|
|
4
4
|
import {PopoverPortalProps, PopoverProps} from "@radix-ui/react-popover";
|
|
5
5
|
|
|
@@ -17,28 +17,6 @@ const PopoverPortal: React.FC<PopoverPortalProps> = ({ children, ...props }) =>
|
|
|
17
17
|
<PopoverPrimitive.Portal {...props}>{children}</PopoverPrimitive.Portal>
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
-
const popoverContentClasses = `
|
|
21
|
-
z-50
|
|
22
|
-
w-72
|
|
23
|
-
p-4
|
|
24
|
-
text-popover-foreground
|
|
25
|
-
bg-popover
|
|
26
|
-
border
|
|
27
|
-
rounded-md
|
|
28
|
-
shadow-md
|
|
29
|
-
outline-none
|
|
30
|
-
data-[state=open]:animate-in
|
|
31
|
-
data-[state=closed]:animate-out
|
|
32
|
-
data-[state=closed]:fade-out-0
|
|
33
|
-
data-[state=open]:fade-in-0
|
|
34
|
-
data-[state=closed]:zoom-out-95
|
|
35
|
-
data-[state=open]:zoom-in-95
|
|
36
|
-
data-[side=bottom]:slide-in-from-top-2
|
|
37
|
-
data-[side=left]:slide-in-from-right-2
|
|
38
|
-
data-[side=right]:slide-in-from-left-2
|
|
39
|
-
data-[side=top]:slide-in-from-bottom-2
|
|
40
|
-
`
|
|
41
|
-
|
|
42
20
|
const PopoverContent = React.forwardRef<
|
|
43
21
|
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
44
22
|
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
@@ -48,7 +26,7 @@ const PopoverContent = React.forwardRef<
|
|
|
48
26
|
align={align}
|
|
49
27
|
sideOffset={sideOffset}
|
|
50
28
|
className={cn(
|
|
51
|
-
|
|
29
|
+
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
52
30
|
className
|
|
53
31
|
)}
|
|
54
32
|
{...props}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import * as ProgressPrimitive from '@radix-ui/react-progress'
|
|
3
|
-
import { cn } from '@utils'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
relative
|
|
7
|
-
w-full
|
|
8
|
-
h-[--progress-height]
|
|
9
|
-
bg-[--progress-bg]
|
|
10
|
-
rounded-full
|
|
11
|
-
overflow-hidden
|
|
12
|
-
`
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
13
5
|
|
|
14
6
|
const Progress = React.forwardRef<
|
|
15
7
|
React.ElementRef<typeof ProgressPrimitive.Root>,
|
|
@@ -17,11 +9,11 @@ const Progress = React.forwardRef<
|
|
|
17
9
|
>(({ className, value, ...props }, ref) => (
|
|
18
10
|
<ProgressPrimitive.Root
|
|
19
11
|
ref={ref}
|
|
20
|
-
className={cn(
|
|
12
|
+
className={cn('relative h-[--progress-height] w-full overflow-hidden rounded-full bg-[--progress-bg]', className)}
|
|
21
13
|
{...props}
|
|
22
14
|
>
|
|
23
15
|
<ProgressPrimitive.Indicator
|
|
24
|
-
className="bg-primary rounded-full
|
|
16
|
+
className="bg-primary rounded-full w-full h-full transition-all"
|
|
25
17
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
26
18
|
/>
|
|
27
19
|
</ProgressPrimitive.Root>
|
package/src/Select/Select.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { DropdownSmallOld, CheckSmall } from '../Icon'
|
|
4
|
+
|
|
3
5
|
import Select, {
|
|
4
6
|
components,
|
|
5
7
|
ControlProps,
|
|
@@ -12,24 +14,11 @@ import Select, {
|
|
|
12
14
|
Props,
|
|
13
15
|
GroupBase,
|
|
14
16
|
} from 'react-select'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
items-center
|
|
20
|
-
py-[8px]
|
|
21
|
-
px-[16px]
|
|
22
|
-
min-h-[80px]
|
|
23
|
-
border-none
|
|
24
|
-
rounded-md
|
|
25
|
-
text-left
|
|
26
|
-
text-white
|
|
27
|
-
bg-gradient-to-r
|
|
28
|
-
from-[--cl-blue-3]
|
|
29
|
-
to-primary
|
|
30
|
-
shadow-[0px_8px_18px_0px_rgba(73,113,208,0.38)]
|
|
31
|
-
cursor-pointer
|
|
32
|
-
`
|
|
17
|
+
|
|
18
|
+
import { cn } from '../@/lib/utils'
|
|
19
|
+
|
|
20
|
+
const selectTriggerClasses: string =
|
|
21
|
+
'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 cursor-pointer'
|
|
33
22
|
|
|
34
23
|
const colourStyles: StylesConfig = {
|
|
35
24
|
control: () => ({}),
|
|
@@ -58,18 +47,8 @@ const Control = ({ children, ...props }: ControlProps) => {
|
|
|
58
47
|
)
|
|
59
48
|
}
|
|
60
49
|
|
|
61
|
-
const optionClasses =
|
|
62
|
-
flex
|
|
63
|
-
items-center
|
|
64
|
-
py-[16px]
|
|
65
|
-
px-[12px]
|
|
66
|
-
w-full
|
|
67
|
-
first:rounded-t-md
|
|
68
|
-
last:rounded-b-md
|
|
69
|
-
cursor-default
|
|
70
|
-
select-none
|
|
71
|
-
outline-none
|
|
72
|
-
`
|
|
50
|
+
const optionClasses =
|
|
51
|
+
'flex items-center first:rounded-t-md last:rounded-b-md px-[12px] py-[16px] w-full cursor-default select-none outline-none'
|
|
73
52
|
|
|
74
53
|
const Option = ({ children, ...props }: OptionProps) => {
|
|
75
54
|
const {
|
|
@@ -95,7 +74,7 @@ const Option = ({ children, ...props }: OptionProps) => {
|
|
|
95
74
|
</span>
|
|
96
75
|
</span>
|
|
97
76
|
|
|
98
|
-
<span className="ml-[16px]
|
|
77
|
+
<span className="ml-[16px] w-[24px] h-[24px] shrink-0">
|
|
99
78
|
{isSelected && (
|
|
100
79
|
<CheckSmall
|
|
101
80
|
width="24"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { DropdownSmallOld, CheckSmall } from '../Icon'
|
|
4
|
+
|
|
3
5
|
import {
|
|
4
6
|
components,
|
|
5
7
|
ControlProps,
|
|
@@ -14,21 +16,13 @@ import {
|
|
|
14
16
|
LoadingIndicatorProps,
|
|
15
17
|
IndicatorsContainerProps,
|
|
16
18
|
} from 'react-select'
|
|
19
|
+
|
|
17
20
|
import AsyncSelect from 'react-select/async'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
items-center
|
|
23
|
-
py-[12px]
|
|
24
|
-
px-[16px]
|
|
25
|
-
h-[44px]
|
|
26
|
-
border-[1px]
|
|
27
|
-
border-input
|
|
28
|
-
rounded-sm
|
|
29
|
-
text-left
|
|
30
|
-
cursor-pointer
|
|
31
|
-
`
|
|
21
|
+
|
|
22
|
+
import { cn } from '../@/lib/utils'
|
|
23
|
+
|
|
24
|
+
const selectTriggerClasses: string =
|
|
25
|
+
'flex items-center border-[1px] border-input rounded-sm h-[44px] text-left px-[16px] py-[12px] cursor-pointer'
|
|
32
26
|
|
|
33
27
|
const colourStyles: StylesConfig = {
|
|
34
28
|
control: () => ({}),
|
|
@@ -74,7 +68,7 @@ const Option = ({ children, ...props }: OptionProps) => {
|
|
|
74
68
|
>
|
|
75
69
|
<span className="flex basis-0 grow">{children}</span>
|
|
76
70
|
|
|
77
|
-
<span className="ml-[16px]
|
|
71
|
+
<span className="ml-[16px] w-[24px] h-[24px] shrink-0">
|
|
78
72
|
{isSelected && (
|
|
79
73
|
<CheckSmall
|
|
80
74
|
width="24"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { DropdownSmallOld, CheckSmall } from '
|
|
3
|
+
import { DropdownSmallOld, CheckSmall } from '../Icon'
|
|
4
4
|
|
|
5
5
|
import Select, {
|
|
6
6
|
components,
|
|
@@ -17,20 +17,10 @@ import Select, {
|
|
|
17
17
|
IndicatorsContainerProps, GroupBase, Props,
|
|
18
18
|
} from 'react-select'
|
|
19
19
|
|
|
20
|
-
import { cn } from '
|
|
21
|
-
|
|
22
|
-
const selectTriggerClasses: string =
|
|
23
|
-
flex
|
|
24
|
-
items-center
|
|
25
|
-
py-[12px]
|
|
26
|
-
px-[16px]
|
|
27
|
-
h-[44px]
|
|
28
|
-
text-left
|
|
29
|
-
border-[1px]
|
|
30
|
-
border-input
|
|
31
|
-
rounded-sm
|
|
32
|
-
cursor-pointer
|
|
33
|
-
`
|
|
20
|
+
import { cn } from '../@/lib/utils'
|
|
21
|
+
|
|
22
|
+
const selectTriggerClasses: string =
|
|
23
|
+
'flex items-center border-[1px] border-input rounded-sm h-[44px] text-left px-[16px] py-[12px] cursor-pointer'
|
|
34
24
|
|
|
35
25
|
const colourStyles: StylesConfig = {
|
|
36
26
|
control: () => ({}),
|
|
@@ -76,7 +66,7 @@ const Option = ({ children, ...props }: OptionProps) => {
|
|
|
76
66
|
>
|
|
77
67
|
<span className="flex basis-0 grow">{children}</span>
|
|
78
68
|
|
|
79
|
-
<span className="ml-[16px]
|
|
69
|
+
<span className="ml-[16px] w-[24px] h-[24px] shrink-0">
|
|
80
70
|
{isSelected && (
|
|
81
71
|
<CheckSmall
|
|
82
72
|
width="24"
|
package/src/Slider/Slider.tsx
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import * as SliderPrimitive from '@radix-ui/react-slider'
|
|
3
|
-
import cn from '
|
|
4
|
-
|
|
5
|
-
const sliderThumb = `
|
|
6
|
-
block
|
|
7
|
-
size-5
|
|
8
|
-
border-2
|
|
9
|
-
border-primary
|
|
10
|
-
bg-background
|
|
11
|
-
rounded-full
|
|
12
|
-
ring-offset-background
|
|
13
|
-
focus-visible:ring-2
|
|
14
|
-
focus-visible:ring-ring
|
|
15
|
-
focus-visible:ring-offset-2
|
|
16
|
-
focus-visible:outline-none
|
|
17
|
-
disabled:pointer-events-none
|
|
18
|
-
disabled:opacity-50
|
|
19
|
-
transition-colors
|
|
20
|
-
`
|
|
3
|
+
import cn from 'classnames'
|
|
21
4
|
|
|
22
5
|
const Slider = React.forwardRef<
|
|
23
6
|
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
@@ -28,10 +11,10 @@ const Slider = React.forwardRef<
|
|
|
28
11
|
className={cn('relative flex w-full touch-none select-none items-center', className)}
|
|
29
12
|
{...props}
|
|
30
13
|
>
|
|
31
|
-
<SliderPrimitive.Track className="relative
|
|
32
|
-
<SliderPrimitive.Range className="absolute bg-primary
|
|
14
|
+
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
15
|
+
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
33
16
|
</SliderPrimitive.Track>
|
|
34
|
-
<SliderPrimitive.Thumb className=
|
|
17
|
+
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
35
18
|
</SliderPrimitive.Root>
|
|
36
19
|
))
|
|
37
20
|
|
package/src/Switch/Switch.tsx
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react"
|
|
3
3
|
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { cn } from "../@/lib/utils"
|
|
5
6
|
|
|
6
7
|
const rootClasses = `
|
|
7
|
-
inline-flex
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
shadow-sm
|
|
13
|
-
rounded-full
|
|
14
|
-
focus-visible:ring-2
|
|
15
|
-
focus-visible:ring-ring
|
|
16
|
-
focus-visible:ring-offset-2
|
|
17
|
-
focus-visible:outline-none
|
|
18
|
-
data-[state=checked]:bg-primary
|
|
19
|
-
data-[state=unchecked]:bg-input
|
|
20
|
-
disabled:cursor-not-allowed peer shrink-0
|
|
21
|
-
disabled:opacity-50
|
|
8
|
+
inline-flex items-center bg-light
|
|
9
|
+
data-[state=checked]:bg-primary data-[state=unchecked]:bg-input
|
|
10
|
+
disabled:opacity-50 shadow-sm rounded-full
|
|
11
|
+
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
12
|
+
w-[32px] h-[18px]
|
|
22
13
|
transition-colors cursor-pointer
|
|
14
|
+
disabled:cursor-not-allowed peer shrink-0
|
|
15
|
+
focus-visible:outline-none
|
|
23
16
|
`
|
|
24
17
|
const ThumbClasses = `
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
bg-page
|
|
29
|
-
shadow-md
|
|
30
|
-
rounded-full
|
|
31
|
-
ring-0
|
|
32
|
-
data-[state=checked]:border-primary
|
|
33
|
-
data-[state=checked]:translate-x-[14px]
|
|
34
|
-
data-[state=unchecked]:translate-x-0
|
|
18
|
+
border-2 border-input data-[state=checked]:border-primary
|
|
19
|
+
bg-page shadow-md rounded-full ring-0
|
|
20
|
+
w-[18px] h-[18px]
|
|
35
21
|
transition-transform
|
|
22
|
+
data-[state=checked]:translate-x-[14px] data-[state=unchecked]:translate-x-0
|
|
36
23
|
pointer-events-none
|
|
37
24
|
`
|
|
38
25
|
|
package/src/Tabs/Tabs.tsx
CHANGED
|
@@ -11,15 +11,6 @@ type TabsComponents = {
|
|
|
11
11
|
|
|
12
12
|
const Tabs: React.FC<TabsProps> & TabsComponents = ({ ...props }) => <TabsPrimitive.Root {...props} />
|
|
13
13
|
|
|
14
|
-
const tabListClasses = `
|
|
15
|
-
inline-flex
|
|
16
|
-
bg-[--tabs-bg]
|
|
17
|
-
p-[1px]
|
|
18
|
-
rounded-[--tabs-round]
|
|
19
|
-
data-[orientation=horizontal]:h-[--tabs-height]
|
|
20
|
-
data-[orientation=vertical]:flex-col
|
|
21
|
-
`
|
|
22
|
-
|
|
23
14
|
const TabsList = React.forwardRef<
|
|
24
15
|
React.ElementRef<typeof TabsPrimitive.List>,
|
|
25
16
|
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
@@ -27,7 +18,7 @@ const TabsList = React.forwardRef<
|
|
|
27
18
|
<TabsPrimitive.List
|
|
28
19
|
ref={ref}
|
|
29
20
|
className={cn(
|
|
30
|
-
|
|
21
|
+
'inline-flex bg-[--tabs-bg] p-[1px] rounded-[--tabs-round] data-[orientation=horizontal]:h-[--tabs-height] data-[orientation=vertical]:flex-col',
|
|
31
22
|
className
|
|
32
23
|
)}
|
|
33
24
|
{...props}
|
|
@@ -35,33 +26,18 @@ const TabsList = React.forwardRef<
|
|
|
35
26
|
))
|
|
36
27
|
|
|
37
28
|
const triggerClasses = `
|
|
38
|
-
flex-1
|
|
39
|
-
shrink-0
|
|
40
|
-
ring-offset-background
|
|
41
|
-
h-[--tab-height]
|
|
42
|
-
text-center
|
|
43
|
-
text-[12px]
|
|
44
|
-
leading-[1.16]
|
|
45
|
-
truncate
|
|
46
|
-
border
|
|
47
|
-
border-transparent
|
|
48
|
-
rounded-sm
|
|
49
|
-
motion-reduce:hover:transform-none
|
|
50
|
-
motion-reduce:transition-none
|
|
51
|
-
focus-visible:outline-none
|
|
52
|
-
focus-visible:ring-2
|
|
53
|
-
focus-visible:ring-ring
|
|
54
|
-
focus-visible:ring-offset-2
|
|
29
|
+
flex-1 shrink-0
|
|
55
30
|
data-[state=active]:border-[--tab-border]
|
|
56
31
|
data-[state=active]:bg-[--tab-bg]
|
|
57
32
|
data-[state=active]:shadow-sm px-[8px]
|
|
58
33
|
data-[orientation=vertical]:basis-auto
|
|
59
34
|
data-[state=inactive]:text-dark
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
whitespace-nowrap
|
|
64
|
-
|
|
35
|
+
border border-transparent rounded-sm focus-visible:ring-2
|
|
36
|
+
focus-visible:ring-ring ring-offset-background focus-visible:ring-offset-2
|
|
37
|
+
h-[--tab-height] text-[12px] text-center truncate
|
|
38
|
+
leading-[1.16] whitespace-nowrap motion-reduce:hover:transform-none
|
|
39
|
+
transition-all motion-reduce:transition-none overflow-hidden
|
|
40
|
+
focus-visible:outline-none disabled:pointer-events-none`
|
|
65
41
|
|
|
66
42
|
const TabsTrigger = React.forwardRef<
|
|
67
43
|
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
@@ -74,14 +50,6 @@ const TabsTrigger = React.forwardRef<
|
|
|
74
50
|
/>
|
|
75
51
|
))
|
|
76
52
|
|
|
77
|
-
const tabsContentClasses = `
|
|
78
|
-
ring-offset-background
|
|
79
|
-
focus-visible:outline-none
|
|
80
|
-
focus-visible:ring-2
|
|
81
|
-
focus-visible:ring-ring
|
|
82
|
-
focus-visible:ring-offset-2
|
|
83
|
-
`
|
|
84
|
-
|
|
85
53
|
const TabsContent = React.forwardRef<
|
|
86
54
|
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
87
55
|
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
@@ -89,7 +57,7 @@ const TabsContent = React.forwardRef<
|
|
|
89
57
|
<TabsPrimitive.Content
|
|
90
58
|
ref={ref}
|
|
91
59
|
className={cn(
|
|
92
|
-
|
|
60
|
+
'ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
93
61
|
className
|
|
94
62
|
)}
|
|
95
63
|
{...props}
|
|
@@ -1,35 +1,24 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { cn } from '@utils'
|
|
1
|
+
import * as React from "react"
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
flex
|
|
6
|
-
py-2
|
|
7
|
-
px-3
|
|
8
|
-
min-h-[60px]
|
|
9
|
-
w-full
|
|
10
|
-
border
|
|
11
|
-
border-input
|
|
12
|
-
rounded-md
|
|
13
|
-
bg-transparent
|
|
14
|
-
placeholder:text-light
|
|
15
|
-
focus-visible:outline-none
|
|
16
|
-
focus-visible:ring-1
|
|
17
|
-
focus-visible:ring-ring
|
|
18
|
-
disabled:cursor-not-allowed
|
|
19
|
-
disabled:opacity-50
|
|
20
|
-
`
|
|
3
|
+
import { cn } from "../@/lib/utils"
|
|
21
4
|
|
|
22
|
-
export interface TextareaProps
|
|
5
|
+
export interface TextareaProps
|
|
6
|
+
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
23
7
|
|
|
24
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
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"
|
|
34
23
|
|
|
35
24
|
export { Textarea }
|
|
@@ -84,15 +84,6 @@
|
|
|
84
84
|
--cl-yellow-6: #fae6aa;
|
|
85
85
|
--cl-yellow-7: #fcf2ce;
|
|
86
86
|
|
|
87
|
-
/* Оранжевый */
|
|
88
|
-
--cl-orange-1: #C33918;
|
|
89
|
-
--cl-orange-2: #E35F19;
|
|
90
|
-
--cl-orange-3: #F27922;
|
|
91
|
-
--cl-orange-4: #F99631;
|
|
92
|
-
--cl-orange-5: #FBB26A;
|
|
93
|
-
--cl-orange-6: #FDCF93;
|
|
94
|
-
--cl-orange-7: #FFE8C4;
|
|
95
|
-
|
|
96
87
|
/* Красный */
|
|
97
88
|
--cl-red-1: #a61d1d;
|
|
98
89
|
--cl-red-2: #bd2c2c;
|
|
@@ -111,9 +102,9 @@
|
|
|
111
102
|
--dark: var(--cl-graphite-2);
|
|
112
103
|
--disabled: var(--cl-graphite-4);
|
|
113
104
|
--bg-light: var(--cl-graphite-7);
|
|
114
|
-
--warning: var(--cl-
|
|
105
|
+
--warning: var(--cl-yellow-2);
|
|
115
106
|
--warning-light: var(--cl-yellow-7);
|
|
116
|
-
--critical: var(--cl-red-
|
|
107
|
+
--critical: var(--cl-red-2);
|
|
117
108
|
--critical-light: var(--cl-red-7);
|
|
118
109
|
/* --text-quaternary:; */
|
|
119
110
|
|
|
@@ -156,6 +147,9 @@
|
|
|
156
147
|
--btn-txt-primary-hover: var(--cl-blue-3);
|
|
157
148
|
--btn-txt-primary-focus: var(--cl-blue-3);
|
|
158
149
|
--btn-txt-primary-active: var(--cl-blue-1);
|
|
150
|
+
|
|
151
|
+
--btn-widget-bg:var(--page-bg);
|
|
152
|
+
--btn-widget-icon:var(--primary);
|
|
159
153
|
/* =========================================== */
|
|
160
154
|
/* ЦВЕТ КНОПОК */
|
|
161
155
|
|
|
@@ -205,6 +199,7 @@
|
|
|
205
199
|
/* =========================================== */
|
|
206
200
|
/* DRAWER */
|
|
207
201
|
|
|
202
|
+
|
|
208
203
|
}
|
|
209
204
|
|
|
210
205
|
|
package/src/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
AccountCollapsibleContent,
|
|
20
20
|
AccountCollapsibleContentItem,
|
|
21
21
|
} from './Collapsible'
|
|
22
|
-
import { Button } from './Button'
|
|
22
|
+
import { Button, buttonVariants } from './Button'
|
|
23
23
|
import { Audio } from './Audio'
|
|
24
24
|
import { cn } from './@/lib/utils'
|
|
25
25
|
import { Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent } from './Drawer'
|
|
@@ -35,7 +35,7 @@ import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, For
|
|
|
35
35
|
import { Calendar } from './Calendar'
|
|
36
36
|
import { DatePicker } from './DatePicker'
|
|
37
37
|
import { Select } from './Select'
|
|
38
|
-
import { Progress } from
|
|
38
|
+
import { Progress } from './Progress'
|
|
39
39
|
import {
|
|
40
40
|
AlertDialog,
|
|
41
41
|
AlertDialogTrigger,
|
|
@@ -47,6 +47,8 @@ import {
|
|
|
47
47
|
AlertDialogAction,
|
|
48
48
|
AlertDialogCancel,
|
|
49
49
|
} from './AlertDialog'
|
|
50
|
+
import { Badge, badgeVariants } from './Badge'
|
|
51
|
+
import { Checkbox } from './Checkbox'
|
|
50
52
|
|
|
51
53
|
export {
|
|
52
54
|
Tooltip,
|
|
@@ -67,6 +69,7 @@ export {
|
|
|
67
69
|
AccountCollapsibleContent,
|
|
68
70
|
AccountCollapsibleContentItem,
|
|
69
71
|
Button,
|
|
72
|
+
buttonVariants,
|
|
70
73
|
InputField,
|
|
71
74
|
InputLabel,
|
|
72
75
|
Audio,
|
|
@@ -110,4 +113,7 @@ export {
|
|
|
110
113
|
AlertDialogDescription,
|
|
111
114
|
AlertDialogAction,
|
|
112
115
|
AlertDialogCancel,
|
|
113
|
-
|
|
116
|
+
Badge,
|
|
117
|
+
badgeVariants,
|
|
118
|
+
Checkbox
|
|
119
|
+
}
|