@campxdev/react-native-blueprint 0.1.14 → 0.1.15
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/lib/module/assets/Loading Animation.json +1 -0
- package/lib/module/assets/lotties/index.js +2 -1
- package/lib/module/assets/lotties/index.js.map +1 -1
- package/lib/module/components/DataDisplay/Accordion/Accordion.js +1 -0
- package/lib/module/components/DataDisplay/Accordion/Accordion.js.map +1 -1
- package/lib/module/components/DataDisplay/AccordionItem/AccordionItem.js +1 -0
- package/lib/module/components/DataDisplay/AccordionItem/AccordionItem.js.map +1 -1
- package/lib/module/components/DataDisplay/Badge/Badge.figma.js +1 -0
- package/lib/module/components/DataDisplay/Badge/Badge.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Badge/Badge.js +1 -0
- package/lib/module/components/DataDisplay/Badge/Badge.js.map +1 -1
- package/lib/module/components/DataDisplay/BannerRow/BannerRow.js +1 -0
- package/lib/module/components/DataDisplay/BannerRow/BannerRow.js.map +1 -1
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js +1 -0
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js.map +1 -1
- package/lib/module/components/DataDisplay/Card/Card.js +1 -0
- package/lib/module/components/DataDisplay/Card/Card.js.map +1 -1
- package/lib/module/components/DataDisplay/Chips/Chips.js +1 -0
- package/lib/module/components/DataDisplay/Chips/Chips.js.map +1 -1
- package/lib/module/components/DataDisplay/ChipsRow/ChipsRow.js +1 -0
- package/lib/module/components/DataDisplay/ChipsRow/ChipsRow.js.map +1 -1
- package/lib/module/components/DataDisplay/DataListItem/DataListItem.js +1 -0
- package/lib/module/components/DataDisplay/DataListItem/DataListItem.js.map +1 -1
- package/lib/module/components/DataDisplay/Datalist/Datalist.js +1 -0
- package/lib/module/components/DataDisplay/Datalist/Datalist.js.map +1 -1
- package/lib/module/components/DataDisplay/Separator/Separator.js +1 -0
- package/lib/module/components/DataDisplay/Separator/Separator.js.map +1 -1
- package/lib/module/components/DataDisplay/Skeleton/Skeleton.js +1 -0
- package/lib/module/components/DataDisplay/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/components/DataDisplay/Tooltip/Tooltip.figma.js +1 -0
- package/lib/module/components/DataDisplay/Tooltip/Tooltip.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Tooltip/Tooltip.js +1 -0
- package/lib/module/components/DataDisplay/Tooltip/Tooltip.js.map +1 -1
- package/lib/module/components/Feedback/InfoBar/InfoBar.figma.js +32 -0
- package/lib/module/components/Feedback/InfoBar/InfoBar.figma.js.map +1 -0
- package/lib/module/components/Feedback/InfoBar/InfoBar.js +107 -0
- package/lib/module/components/Feedback/InfoBar/InfoBar.js.map +1 -0
- package/lib/module/components/Feedback/ProgressCircular/Progress-circular.js +1 -0
- package/lib/module/components/Feedback/ProgressCircular/Progress-circular.js.map +1 -1
- package/lib/module/components/Feedback/ProgressLinear/Progress-linear.js +1 -0
- package/lib/module/components/Feedback/ProgressLinear/Progress-linear.js.map +1 -1
- package/lib/module/components/Input/Button/Button.js +99 -43
- package/lib/module/components/Input/Button/Button.js.map +1 -1
- package/lib/module/components/Input/Checkbox/Checkbox.js +1 -0
- package/lib/module/components/Input/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/Input/RadioGroup/Radio-Group.figma.js +3 -3
- package/lib/module/components/Input/RadioGroup/Radio-Group.figma.js.map +1 -1
- package/lib/module/components/Input/RadioGroup/Radio-Group.js +1 -0
- package/lib/module/components/Input/RadioGroup/Radio-Group.js.map +1 -1
- package/lib/module/components/Input/Select/Select.js +1 -0
- package/lib/module/components/Input/Select/Select.js.map +1 -1
- package/lib/module/components/Input/TextField/Textfield.figma.js +4 -2
- package/lib/module/components/Input/TextField/Textfield.figma.js.map +1 -1
- package/lib/module/components/Input/TextField/Textfield.js +161 -41
- package/lib/module/components/Input/TextField/Textfield.js.map +1 -1
- package/lib/module/components/Input/Toggle/Toggle.figma.js +32 -0
- package/lib/module/components/Input/Toggle/Toggle.figma.js.map +1 -0
- package/lib/module/components/Input/Toggle/Toggle.js +52 -23
- package/lib/module/components/Input/Toggle/Toggle.js.map +1 -1
- package/lib/module/components/Input/ToggleGroup/Toggle-Group.js +1 -0
- package/lib/module/components/Input/ToggleGroup/Toggle-Group.js.map +1 -1
- package/lib/module/components/Input/switch/Switch.figma.js +1 -0
- package/lib/module/components/Input/switch/Switch.figma.js.map +1 -1
- package/lib/module/components/Input/switch/Switch.js +1 -0
- package/lib/module/components/Input/switch/Switch.js.map +1 -1
- package/lib/module/components/Layout/Tabs/Tabs.figma.js +1 -0
- package/lib/module/components/Layout/Tabs/Tabs.figma.js.map +1 -1
- package/lib/module/components/Layout/Tabs/Tabs.js +1 -0
- package/lib/module/components/Layout/Tabs/Tabs.js.map +1 -1
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js +1 -0
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js.map +1 -1
- package/lib/module/components/Navigation/FloatingAction/Floating-Action.js +1 -0
- package/lib/module/components/Navigation/FloatingAction/Floating-Action.js.map +1 -1
- package/lib/module/components/Navigation/Popover/Popover.figma.js +1 -0
- package/lib/module/components/Navigation/Popover/Popover.figma.js.map +1 -1
- package/lib/module/components/Navigation/Popover/Popover.js +1 -0
- package/lib/module/components/Navigation/Popover/Popover.js.map +1 -1
- package/lib/module/components/ui/Custom-Card.js +1 -0
- package/lib/module/components/ui/Custom-Card.js.map +1 -1
- package/lib/module/components/ui/Dropdown-Menu.js +1 -0
- package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
- package/lib/module/components/ui/Greeting-Card.js +1 -0
- package/lib/module/components/ui/Greeting-Card.js.map +1 -1
- package/lib/module/components/ui/Hover-Card.js +1 -0
- package/lib/module/components/ui/Hover-Card.js.map +1 -1
- package/lib/module/components/ui/Icon.js +1 -0
- package/lib/module/components/ui/Icon.js.map +1 -1
- package/lib/module/components/ui/Input.js +1 -0
- package/lib/module/components/ui/Input.js.map +1 -1
- package/lib/module/components/ui/Menubar.js +1 -0
- package/lib/module/components/ui/Menubar.js.map +1 -1
- package/lib/module/components/ui/Slider.js +1 -0
- package/lib/module/components/ui/Slider.js.map +1 -1
- package/lib/module/components/ui/Table.js +1 -0
- package/lib/module/components/ui/Table.js.map +1 -1
- package/lib/module/components/ui/Toast.js +1 -0
- package/lib/module/components/ui/Toast.js.map +1 -1
- package/lib/module/components/ui/index.js +2 -0
- package/lib/module/components/ui/index.js.map +1 -1
- package/lib/module/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.js +1 -0
- package/lib/module/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/AlertPattern/AlertPattern.js +1 -0
- package/lib/module/patterns/pattern-components/AlertPattern/AlertPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js +1 -0
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js.map +1 -1
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.js +1 -0
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/EmptyState/EmptyState.js +1 -0
- package/lib/module/patterns/pattern-components/EmptyState/EmptyState.js.map +1 -1
- package/lib/module/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.js +1 -0
- package/lib/module/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.js.map +1 -1
- package/lib/module/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.js +1 -0
- package/lib/module/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.js.map +1 -1
- package/lib/module/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.js +1 -0
- package/lib/module/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.js.map +1 -1
- package/lib/module/patterns/pattern-components/FormPattern/FormPattern.js +1 -0
- package/lib/module/patterns/pattern-components/FormPattern/FormPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/index.js +1 -0
- package/lib/module/patterns/pattern-components/index.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/Loading Animation.json +1 -0
- package/src/assets/lotties/index.ts +1 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +1 -0
- package/src/components/DataDisplay/AccordionItem/AccordionItem.tsx +1 -0
- package/src/components/DataDisplay/Badge/Badge.figma.tsx +1 -0
- package/src/components/DataDisplay/Badge/Badge.tsx +1 -0
- package/src/components/DataDisplay/BannerRow/BannerRow.tsx +1 -0
- package/src/components/DataDisplay/CalendarItem/CalendarItem.tsx +1 -0
- package/src/components/DataDisplay/Card/Card.tsx +1 -0
- package/src/components/DataDisplay/Chips/Chips.tsx +1 -0
- package/src/components/DataDisplay/ChipsRow/ChipsRow.tsx +1 -0
- package/src/components/DataDisplay/DataListItem/DataListItem.tsx +1 -0
- package/src/components/DataDisplay/Datalist/Datalist.tsx +1 -0
- package/src/components/DataDisplay/Separator/Separator.tsx +1 -0
- package/src/components/DataDisplay/Skeleton/Skeleton.tsx +1 -0
- package/src/components/DataDisplay/Tooltip/Tooltip.figma.tsx +1 -0
- package/src/components/DataDisplay/Tooltip/Tooltip.tsx +1 -0
- package/src/components/Feedback/InfoBar/InfoBar.figma.tsx +31 -0
- package/src/components/Feedback/InfoBar/InfoBar.tsx +127 -0
- package/src/components/Feedback/ProgressCircular/Progress-circular.tsx +1 -0
- package/src/components/Feedback/ProgressLinear/Progress-linear.tsx +1 -0
- package/src/components/Input/Button/Button.tsx +110 -43
- package/src/components/Input/Checkbox/Checkbox.tsx +1 -0
- package/src/components/Input/RadioGroup/Radio-Group.figma.tsx +3 -3
- package/src/components/Input/RadioGroup/Radio-Group.tsx +1 -0
- package/src/components/Input/Select/Select.tsx +1 -0
- package/src/components/Input/TextField/Textfield.figma.tsx +2 -0
- package/src/components/Input/TextField/Textfield.tsx +195 -48
- package/src/components/Input/Toggle/Toggle.figma.tsx +37 -0
- package/src/components/Input/Toggle/Toggle.tsx +49 -22
- package/src/components/Input/ToggleGroup/Toggle-Group.tsx +1 -0
- package/src/components/Input/switch/Switch.figma.tsx +1 -0
- package/src/components/Input/switch/Switch.tsx +1 -0
- package/src/components/Layout/Tabs/Tabs.figma.tsx +1 -0
- package/src/components/Layout/Tabs/Tabs.tsx +1 -0
- package/src/components/Navigation/Appbar/AppBar.figma.tsx +1 -0
- package/src/components/Navigation/FloatingAction/Floating-Action.tsx +1 -0
- package/src/components/Navigation/Popover/Popover.figma.tsx +1 -0
- package/src/components/Navigation/Popover/Popover.tsx +1 -0
- package/src/components/ui/Custom-Card.tsx +1 -0
- package/src/components/ui/Dropdown-Menu.tsx +1 -0
- package/src/components/ui/Greeting-Card.tsx +1 -0
- package/src/components/ui/Hover-Card.tsx +1 -0
- package/src/components/ui/Icon.tsx +1 -0
- package/src/components/ui/Input.tsx +1 -0
- package/src/components/ui/Menubar.tsx +1 -0
- package/src/components/ui/Slider.tsx +1 -0
- package/src/components/ui/Table.tsx +1 -0
- package/src/components/ui/Toast.tsx +1 -0
- package/src/components/ui/index.ts +2 -0
- package/src/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.tsx +1 -0
- package/src/patterns/pattern-components/AlertPattern/AlertPattern.tsx +1 -0
- package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.tsx +1 -0
- package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.tsx +1 -0
- package/src/patterns/pattern-components/EmptyState/EmptyState.tsx +1 -0
- package/src/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.tsx +1 -0
- package/src/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.tsx +1 -0
- package/src/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.tsx +1 -0
- package/src/patterns/pattern-components/FormPattern/FormPattern.tsx +1 -0
- package/src/patterns/pattern-components/index.ts +1 -0
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { View, Text } from 'react-native';
|
|
4
|
+
import { cssInterop } from 'nativewind';
|
|
3
5
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
6
|
import { cn } from '../../../lib/utils';
|
|
5
7
|
|
|
8
|
+
// NativeWind interop
|
|
9
|
+
cssInterop(View, { className: 'style' });
|
|
10
|
+
cssInterop(Text, { className: 'style' });
|
|
11
|
+
|
|
12
|
+
// Typed components
|
|
13
|
+
const StyledView = View as any;
|
|
14
|
+
const StyledText = Text as any;
|
|
15
|
+
|
|
6
16
|
/* ------------------------------------------------------------------
|
|
7
17
|
* Variants
|
|
8
18
|
* ------------------------------------------------------------------ */
|
|
@@ -12,14 +22,14 @@ const toggleItemVariants = cva(
|
|
|
12
22
|
{
|
|
13
23
|
variants: {
|
|
14
24
|
tone: {
|
|
15
|
-
default: 'border-
|
|
16
|
-
success: 'border-
|
|
17
|
-
destructive: 'border-
|
|
18
|
-
warning: 'border-
|
|
25
|
+
default: 'border-text-primary bg-surface-default',
|
|
26
|
+
success: 'border-text-primary bg-surface-default',
|
|
27
|
+
destructive: 'border-text-primary bg-surface-default',
|
|
28
|
+
warning: 'border-text-primary bg-surface-default',
|
|
19
29
|
},
|
|
20
30
|
state: {
|
|
21
31
|
true: '',
|
|
22
|
-
false: '
|
|
32
|
+
false: '',
|
|
23
33
|
},
|
|
24
34
|
},
|
|
25
35
|
compoundVariants: [
|
|
@@ -27,25 +37,27 @@ const toggleItemVariants = cva(
|
|
|
27
37
|
{
|
|
28
38
|
tone: 'default',
|
|
29
39
|
state: true,
|
|
30
|
-
className: 'bg-surface-subtle',
|
|
40
|
+
className: 'bg-surface-subtle border-text-primary',
|
|
31
41
|
},
|
|
32
42
|
// SUCCESS (ON)
|
|
33
43
|
{
|
|
34
44
|
tone: 'success',
|
|
35
45
|
state: true,
|
|
36
|
-
className:
|
|
46
|
+
className:
|
|
47
|
+
'bg-highlight-success-green-muted border-highlight-success-green',
|
|
37
48
|
},
|
|
38
49
|
// DESTRUCTIVE (ON)
|
|
39
50
|
{
|
|
40
51
|
tone: 'destructive',
|
|
41
52
|
state: true,
|
|
42
|
-
className: 'bg-highlight-alert-red-muted',
|
|
53
|
+
className: 'bg-highlight-alert-red-muted border-highlight-alert-red',
|
|
43
54
|
},
|
|
44
55
|
// WARNING (ON)
|
|
45
56
|
{
|
|
46
57
|
tone: 'warning',
|
|
47
58
|
state: true,
|
|
48
|
-
className:
|
|
59
|
+
className:
|
|
60
|
+
'bg-highlight-warning-orange-muted border-highlight-warning-orange',
|
|
49
61
|
},
|
|
50
62
|
],
|
|
51
63
|
defaultVariants: {
|
|
@@ -59,9 +71,9 @@ const textVariants = cva('text-sm font-semibold', {
|
|
|
59
71
|
variants: {
|
|
60
72
|
tone: {
|
|
61
73
|
default: 'text-text-secondary',
|
|
62
|
-
success: 'text-
|
|
63
|
-
destructive: 'text-
|
|
64
|
-
warning: 'text-
|
|
74
|
+
success: 'text-text-secondary',
|
|
75
|
+
destructive: 'text-text-secondary',
|
|
76
|
+
warning: 'text-text-secondary',
|
|
65
77
|
},
|
|
66
78
|
state: {
|
|
67
79
|
true: '',
|
|
@@ -75,9 +87,24 @@ const textVariants = cva('text-sm font-semibold', {
|
|
|
75
87
|
state: true,
|
|
76
88
|
className: 'text-brand-primary',
|
|
77
89
|
},
|
|
78
|
-
//
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
// Success (ON)
|
|
91
|
+
{
|
|
92
|
+
tone: 'success',
|
|
93
|
+
state: true,
|
|
94
|
+
className: 'text-highlight-success-green',
|
|
95
|
+
},
|
|
96
|
+
// Destructive (ON)
|
|
97
|
+
{
|
|
98
|
+
tone: 'destructive',
|
|
99
|
+
state: true,
|
|
100
|
+
className: 'text-highlight-alert-red',
|
|
101
|
+
},
|
|
102
|
+
// Warning (ON)
|
|
103
|
+
{
|
|
104
|
+
tone: 'warning',
|
|
105
|
+
state: true,
|
|
106
|
+
className: 'text-highlight-warning-orange',
|
|
107
|
+
},
|
|
81
108
|
],
|
|
82
109
|
});
|
|
83
110
|
|
|
@@ -101,19 +128,19 @@ export function ToggleItem({
|
|
|
101
128
|
className,
|
|
102
129
|
}: ToggleItemProps) {
|
|
103
130
|
return (
|
|
104
|
-
<
|
|
105
|
-
{showLeftIcon && <
|
|
131
|
+
<StyledView className={cn(toggleItemVariants({ tone, state }), className)}>
|
|
132
|
+
{showLeftIcon && <StyledView className="h-4 w-4 bg-muted rounded-sm" />}
|
|
106
133
|
|
|
107
|
-
<
|
|
134
|
+
<StyledText
|
|
108
135
|
className={textVariants({
|
|
109
136
|
tone,
|
|
110
137
|
state,
|
|
111
138
|
})}
|
|
112
139
|
>
|
|
113
140
|
{text}
|
|
114
|
-
</
|
|
141
|
+
</StyledText>
|
|
115
142
|
|
|
116
|
-
{showRightIcon && <
|
|
117
|
-
</
|
|
143
|
+
{showRightIcon && <StyledView className="h-4 w-4 bg-muted rounded-sm" />}
|
|
144
|
+
</StyledView>
|
|
118
145
|
);
|
|
119
146
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
export * from '../DataDisplay/Accordion/Accordion';
|
|
2
3
|
export * from '../DataDisplay/AccordionItem/AccordionItem';
|
|
3
4
|
export * from '../Feedback/Alert/Alert';
|
|
4
5
|
export * from '../Feedback/AlertDialog/Alert-Dialog';
|
|
6
|
+
export * from '../Feedback/InfoBar/InfoBar';
|
|
5
7
|
export * from '../Navigation/Appbar/AppBar';
|
|
6
8
|
export * from '../Layout/AspectRatio/Aspect-Ratio';
|
|
7
9
|
export * from '../DataDisplay/Avatar/Avatar';
|