@flipova/foundation 1.13.0 → 2.0.4
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/CHANGELOG.md +181 -0
- package/README.md +53 -178
- package/components/ui/accordion/ANIMATION_CUSTOMIZATION.md +162 -0
- package/components/ui/accordion/AccordionAnimatedHeight.tsx +56 -0
- package/components/ui/accordion/AccordionAnimatedIcon.tsx +41 -0
- package/components/ui/accordion/AnimatedHeight.tsx +56 -0
- package/components/ui/accordion/AnimatedIcon.tsx +41 -0
- package/components/ui/accordion/MIGRATION_SUMMARY.md +250 -0
- package/components/ui/accordion/USAGE_EXAMPLE.tsx +179 -0
- package/components/ui/accordion/animation-config.ts +32 -0
- package/components/ui/accordion/index.tsx +253 -0
- package/components/ui/actionsheet/index.tsx +511 -0
- package/components/ui/alert/index.tsx +158 -0
- package/components/ui/alert-dialog/index.tsx +254 -0
- package/components/ui/avatar/index.tsx +139 -0
- package/components/ui/badge/index.tsx +163 -0
- package/components/ui/bottomsheet/index.tsx +477 -0
- package/components/ui/box/index.tsx +19 -0
- package/components/ui/box/index.web.tsx +19 -0
- package/components/ui/box/styles.tsx +10 -0
- package/components/ui/button/index.tsx +264 -0
- package/components/ui/calendar/creator.tsx +366 -0
- package/components/ui/calendar/index.tsx +462 -0
- package/components/ui/calendar/styles.tsx +140 -0
- package/components/ui/card/index.tsx +23 -0
- package/components/ui/card/index.web.tsx +26 -0
- package/components/ui/card/styles.tsx +16 -0
- package/components/ui/center/index.tsx +22 -0
- package/components/ui/center/index.web.tsx +20 -0
- package/components/ui/center/styles.tsx +8 -0
- package/components/ui/checkbox/index.tsx +184 -0
- package/components/ui/date-time-picker/creator.tsx +109 -0
- package/components/ui/date-time-picker/index.tsx +585 -0
- package/components/ui/date-time-picker/index.web.tsx +217 -0
- package/components/ui/date-time-picker/styles.tsx +56 -0
- package/components/ui/divider/index.tsx +40 -0
- package/components/ui/drawer/index.tsx +362 -0
- package/components/ui/fab/index.tsx +215 -0
- package/components/ui/flat-list/index.tsx +21 -0
- package/components/ui/form-control/index.tsx +352 -0
- package/components/ui/gluestack-ui-provider/config.ts +72 -0
- package/components/ui/gluestack-ui-provider/index.tsx +47 -0
- package/components/ui/gluestack-ui-provider/index.web.tsx +96 -0
- package/components/ui/gluestack-ui-provider/script.ts +19 -0
- package/components/ui/gluestack-ui-provider/tokens.d.ts +17 -0
- package/components/ui/gluestack-ui-provider/tokens.js +188 -0
- package/components/ui/gluestack-ui-provider/useGluestackColors.ts +82 -0
- package/components/ui/grid/index.tsx +283 -0
- package/components/ui/grid/index.web.tsx +66 -0
- package/components/ui/grid/styles.tsx +15 -0
- package/components/ui/heading/index.tsx +220 -0
- package/components/ui/heading/index.web.tsx +202 -0
- package/components/ui/heading/styles.tsx +43 -0
- package/components/ui/hstack/index.tsx +27 -0
- package/components/ui/hstack/index.web.tsx +26 -0
- package/components/ui/hstack/styles.tsx +25 -0
- package/components/ui/icon/index.tsx +1588 -0
- package/components/ui/icon/index.web.tsx +1573 -0
- package/components/ui/image/index.tsx +48 -0
- package/components/ui/image-background/index.tsx +25 -0
- package/components/ui/image-viewer/index.tsx +743 -0
- package/components/ui/image-viewer/index.web.tsx +302 -0
- package/components/ui/index.ts +58 -0
- package/components/ui/input/index.tsx +125 -0
- package/components/ui/input-accessory-view/index.tsx +2 -0
- package/components/ui/keyboard-avoiding-view/index.tsx +2 -0
- package/components/ui/link/index.tsx +102 -0
- package/components/ui/liquid-glass/index.tsx +74 -0
- package/components/ui/menu/index.tsx +186 -0
- package/components/ui/modal/index.tsx +237 -0
- package/components/ui/popover/index.tsx +272 -0
- package/components/ui/portal/index.tsx +17 -0
- package/components/ui/pressable/index.tsx +39 -0
- package/components/ui/progress/index.tsx +83 -0
- package/components/ui/radio/index.tsx +217 -0
- package/components/ui/refresh-control/index.tsx +2 -0
- package/components/ui/safe-area-view/index.tsx +2 -0
- package/components/ui/scroll-view/index.tsx +2 -0
- package/components/ui/section-list/index.tsx +2 -0
- package/components/ui/select/index.tsx +277 -0
- package/components/ui/select/select-actionsheet.tsx +562 -0
- package/components/ui/skeleton/index.tsx +105 -0
- package/components/ui/skeleton/index.web.tsx +103 -0
- package/components/ui/skeleton/styles.tsx +35 -0
- package/components/ui/slider/index.tsx +181 -0
- package/components/ui/spinner/index.tsx +40 -0
- package/components/ui/status-bar/index.tsx +2 -0
- package/components/ui/switch/index.tsx +41 -0
- package/components/ui/table/index.tsx +210 -0
- package/components/ui/table/index.web.tsx +157 -0
- package/components/ui/table/styles.tsx +44 -0
- package/components/ui/tabs/TabsAnimatedIndicator.tsx +160 -0
- package/components/ui/tabs/animation-config.ts +3 -0
- package/components/ui/tabs/creator.tsx +206 -0
- package/components/ui/tabs/index.tsx +484 -0
- package/components/ui/text/index.tsx +48 -0
- package/components/ui/text/index.web.tsx +45 -0
- package/components/ui/text/styles.tsx +47 -0
- package/components/ui/textarea/index.tsx +94 -0
- package/components/ui/toast/index.tsx +252 -0
- package/components/ui/tooltip/index.tsx +131 -0
- package/components/ui/view/index.tsx +2 -0
- package/components/ui/virtualized-list/index.tsx +2 -0
- package/components/ui/vstack/index.tsx +28 -0
- package/components/ui/vstack/index.web.tsx +27 -0
- package/components/ui/vstack/styles.tsx +25 -0
- package/design/canonical.index.txt +53 -0
- package/design/documentation.xml +519 -0
- package/design/manifest.xml +90 -0
- package/design/schema.xsd +639 -0
- package/design/themes.xml +204 -0
- package/design/tokens.xml +510 -0
- package/design/tools/design.js +165 -0
- package/design/tools/npm.js +65 -0
- package/design/tools/requirements.txt +35 -0
- package/design/tools/sources/.checker/__init__.py +81 -0
- package/design/tools/sources/.checker/checks.py +198 -0
- package/design/tools/sources/.checker/cli.py +154 -0
- package/design/tools/sources/.checker/io.py +242 -0
- package/design/tools/sources/.checker/model.py +144 -0
- package/design/tools/sources/.checker/registry.py +115 -0
- package/design/tools/sources/.checker/report.py +21 -0
- package/design/tools/sources/.docgen/__init__.py +45 -0
- package/design/tools/sources/.docgen/cli.py +101 -0
- package/design/tools/sources/.docgen/model.py +147 -0
- package/design/tools/sources/.docgen/reference.py +97 -0
- package/design/tools/sources/.docgen/site.py +145 -0
- package/design/tools/sources/.docgen/xsddoc.py +329 -0
- package/design/tools/sources/.generate/__init__.py +35 -0
- package/design/tools/sources/.generate/cli.py +76 -0
- package/design/tools/sources/.generate/common.py +33 -0
- package/design/tools/sources/.generate/config.py +119 -0
- package/design/tools/sources/.generate/model.py +51 -0
- package/design/tools/sources/.generate/tokens.py +141 -0
- package/design/tools/sources/.linter/__init__.py +9 -0
- package/design/tools/sources/.linter/cli.py +44 -0
- package/design/tools/sources/.linter/discovery.py +30 -0
- package/design/tools/sources/.linter/errors.py +45 -0
- package/design/tools/sources/.linter/linter.py +68 -0
- package/design/tools/sources/.xmleditor/__init__.py +74 -0
- package/design/tools/sources/.xmleditor/blocks.py +185 -0
- package/design/tools/sources/.xmleditor/cli.py +141 -0
- package/design/tools/sources/.xmleditor/editor.py +906 -0
- package/design/tools/sources/.xmleditor/model.py +708 -0
- package/design/tools/sources/.xmleditor/widgets.py +1832 -0
- package/design/tools/sources/.xmleditor/xsdmodel.py +753 -0
- package/design/tools/sources/checker.py +55 -0
- package/design/tools/sources/docgen.py +66 -0
- package/design/tools/sources/generate.py +48 -0
- package/design/tools/sources/linter.py +54 -0
- package/design/tools/sources/ruff.toml +12 -0
- package/design/tools/sources/xmleditor.py +62 -0
- package/design/tools/unix/_venv_python.sh +16 -0
- package/design/tools/unix/check.sh +13 -0
- package/design/tools/unix/doc.sh +14 -0
- package/design/tools/unix/gen.sh +14 -0
- package/design/tools/unix/lint.sh +10 -0
- package/design/tools/unix/run.sh +20 -0
- package/design/tools/unix/verify.sh +12 -0
- package/design/tools/unix/xmledit.sh +12 -0
- package/design/tools/windows/check.cmd +12 -0
- package/design/tools/windows/doc.cmd +12 -0
- package/design/tools/windows/gen.cmd +11 -0
- package/design/tools/windows/lint.cmd +9 -0
- package/design/tools/windows/run.cmd +26 -0
- package/design/tools/windows/verify.cmd +10 -0
- package/design/tools/windows/xmledit.cmd +10 -0
- package/dist/chunk-LV4UIEQN.js +9730 -0
- package/dist/chunk-LV4UIEQN.js.map +1 -0
- package/dist/chunk-WNVU3BM2.mjs +9401 -0
- package/dist/chunk-WNVU3BM2.mjs.map +1 -0
- package/dist/index.d.mts +40 -9
- package/dist/index.d.ts +40 -9
- package/dist/index.js +726 -414
- package/dist/index.mjs +1 -5
- package/dist/ui/index.d.mts +6931 -3070
- package/dist/ui/index.d.ts +6931 -3070
- package/dist/ui/index.js +779 -352
- package/dist/ui/index.mjs +1 -2
- package/package.json +66 -142
- package/dist/chunk-2XORADW6.js +0 -24552
- package/dist/chunk-2XORADW6.js.map +0 -1
- package/dist/chunk-52BHHF5M.js +0 -46
- package/dist/chunk-52BHHF5M.js.map +0 -1
- package/dist/chunk-5647JY7Z.mjs +0 -100
- package/dist/chunk-5647JY7Z.mjs.map +0 -1
- package/dist/chunk-5N5HC4ZA.mjs +0 -3
- package/dist/chunk-5N5HC4ZA.mjs.map +0 -1
- package/dist/chunk-7QFZMGL6.js +0 -8583
- package/dist/chunk-7QFZMGL6.js.map +0 -1
- package/dist/chunk-ASZEP37D.js +0 -423
- package/dist/chunk-ASZEP37D.js.map +0 -1
- package/dist/chunk-BH5SU2JQ.mjs +0 -8282
- package/dist/chunk-BH5SU2JQ.mjs.map +0 -1
- package/dist/chunk-BO65GO53.mjs +0 -422
- package/dist/chunk-BO65GO53.mjs.map +0 -1
- package/dist/chunk-BSVXX52E.mjs +0 -413
- package/dist/chunk-BSVXX52E.mjs.map +0 -1
- package/dist/chunk-DNV5UBNF.mjs +0 -3
- package/dist/chunk-DNV5UBNF.mjs.map +0 -1
- package/dist/chunk-EDTAMUO2.js +0 -8310
- package/dist/chunk-EDTAMUO2.js.map +0 -1
- package/dist/chunk-IJTI6EX4.js +0 -4
- package/dist/chunk-IJTI6EX4.js.map +0 -1
- package/dist/chunk-M3YLASM2.js +0 -428
- package/dist/chunk-M3YLASM2.js.map +0 -1
- package/dist/chunk-OXKOGLXE.js +0 -4
- package/dist/chunk-OXKOGLXE.js.map +0 -1
- package/dist/chunk-RQXQK3ZO.mjs +0 -8486
- package/dist/chunk-RQXQK3ZO.mjs.map +0 -1
- package/dist/chunk-SR25V4EA.mjs +0 -40
- package/dist/chunk-SR25V4EA.mjs.map +0 -1
- package/dist/chunk-UB34WFEQ.js +0 -106
- package/dist/chunk-UB34WFEQ.js.map +0 -1
- package/dist/chunk-ZBRWXKDF.mjs +0 -24431
- package/dist/chunk-ZBRWXKDF.mjs.map +0 -1
- package/dist/cli/ds.d.mts +0 -1
- package/dist/cli/ds.d.ts +0 -1
- package/dist/cli/ds.js +0 -602
- package/dist/cli/ds.js.map +0 -1
- package/dist/cli/ds.mjs +0 -579
- package/dist/cli/ds.mjs.map +0 -1
- package/dist/cli/flipova.d.mts +0 -1
- package/dist/cli/flipova.d.ts +0 -1
- package/dist/cli/flipova.js +0 -161
- package/dist/cli/flipova.js.map +0 -1
- package/dist/cli/flipova.mjs +0 -154
- package/dist/cli/flipova.mjs.map +0 -1
- package/dist/config/index.d.mts +0 -123
- package/dist/config/index.d.ts +0 -123
- package/dist/config/index.js +0 -28
- package/dist/config/index.js.map +0 -1
- package/dist/config/index.mjs +0 -3
- package/dist/config/index.mjs.map +0 -1
- package/dist/index-CuaJA3gM.d.mts +0 -78
- package/dist/index-CuaJA3gM.d.ts +0 -78
- package/dist/registry/index.d.mts +0 -10160
- package/dist/registry/index.d.ts +0 -10160
- package/dist/registry/index.js +0 -392
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/index.mjs +0 -3
- package/dist/registry/index.mjs.map +0 -1
- package/dist/theme/index.d.mts +0 -109
- package/dist/theme/index.d.ts +0 -109
- package/dist/theme/index.js +0 -28
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/index.mjs +0 -3
- package/dist/theme/index.mjs.map +0 -1
- package/dist/tokens/index.d.mts +0 -423
- package/dist/tokens/index.d.ts +0 -423
- package/dist/tokens/index.js +0 -44
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/index.mjs +0 -3
- package/dist/tokens/index.mjs.map +0 -1
- package/dist/types/index.d.mts +0 -202
- package/dist/types/index.d.ts +0 -202
- package/dist/types/index.js +0 -4
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -3
- package/dist/types/index.mjs.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { H3 } from '@expo/html-elements';
|
|
3
|
+
import {
|
|
4
|
+
createAccordion,
|
|
5
|
+
AccordionItemContext,
|
|
6
|
+
} from '@gluestack-ui/core/accordion/creator';
|
|
7
|
+
import { UIIcon } from '@gluestack-ui/core/icon/creator';
|
|
8
|
+
import { tva } from '@gluestack-ui/utils/nativewind-utils';
|
|
9
|
+
import { cssInterop } from 'nativewind';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Platform, Pressable, Text, TextProps, View } from 'react-native';
|
|
12
|
+
import { AnimatedHeight } from './AccordionAnimatedHeight';
|
|
13
|
+
import { AnimatedIcon } from './AccordionAnimatedIcon';
|
|
14
|
+
import { accordionAnimationConfig } from './animation-config';
|
|
15
|
+
|
|
16
|
+
/** Styles */
|
|
17
|
+
|
|
18
|
+
const accordionStyle = tva({
|
|
19
|
+
base: 'w-full',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const accordionItemStyle = tva({
|
|
23
|
+
base: '',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const accordionTitleTextStyle = tva({
|
|
27
|
+
base: 'text-foreground font-medium flex-1 text-left text-sm',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const accordionIconStyle = tva({
|
|
31
|
+
base: 'text-muted-foreground fill-none h-4 w-4',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const accordionContentTextStyle = tva({
|
|
35
|
+
base: 'text-foreground text-sm font-normal',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const accordionHeaderStyle = tva({
|
|
39
|
+
base: 'py-4 m-0',
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const accordionContentStyle = tva({
|
|
43
|
+
base: 'pb-4 pt-1',
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const accordionTriggerStyle = tva({
|
|
47
|
+
|
|
48
|
+
base: 'w-full flex-row justify-between items-center web:outline-none focus:outline-none data-[disabled=true]:opacity-40 data-[disabled=true]:cursor-not-allowed data-[focus-visible=true]:bg-background/10 gap-3',
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const Header = (
|
|
52
|
+
Platform.OS === 'web' ? H3 : View
|
|
53
|
+
) as React.ComponentType<TextProps>;
|
|
54
|
+
|
|
55
|
+
/** Creator */
|
|
56
|
+
const UIAccordion = createAccordion({
|
|
57
|
+
Root: View,
|
|
58
|
+
Item: View,
|
|
59
|
+
Header: Header,
|
|
60
|
+
Trigger: Pressable,
|
|
61
|
+
Icon: UIIcon,
|
|
62
|
+
TitleText: Text,
|
|
63
|
+
ContentText: Text,
|
|
64
|
+
Content: View,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
cssInterop(UIIcon, {
|
|
68
|
+
className: {
|
|
69
|
+
target: 'style',
|
|
70
|
+
nativeStyleToProp: {
|
|
71
|
+
height: true,
|
|
72
|
+
width: true,
|
|
73
|
+
fill: true,
|
|
74
|
+
color: 'classNameColor',
|
|
75
|
+
stroke: true,
|
|
76
|
+
} as any,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
cssInterop(H3, {
|
|
81
|
+
className: {
|
|
82
|
+
target: 'style',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
type IAccordionProps = React.ComponentPropsWithoutRef<typeof UIAccordion>;
|
|
87
|
+
|
|
88
|
+
type IAccordionItemProps = React.ComponentPropsWithoutRef<
|
|
89
|
+
typeof UIAccordion.Item
|
|
90
|
+
>;
|
|
91
|
+
|
|
92
|
+
type IAccordionContentProps = React.ComponentPropsWithoutRef<
|
|
93
|
+
typeof UIAccordion.Content
|
|
94
|
+
>;
|
|
95
|
+
|
|
96
|
+
type IAccordionContentTextProps = React.ComponentPropsWithoutRef<
|
|
97
|
+
typeof UIAccordion.ContentText
|
|
98
|
+
>;
|
|
99
|
+
|
|
100
|
+
type IAccordionIconProps = React.ComponentPropsWithoutRef<
|
|
101
|
+
typeof UIAccordion.Icon
|
|
102
|
+
> & {
|
|
103
|
+
as?: React.ElementType;
|
|
104
|
+
height?: number;
|
|
105
|
+
width?: number;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
type IAccordionHeaderProps = React.ComponentPropsWithoutRef<
|
|
109
|
+
typeof UIAccordion.Header
|
|
110
|
+
>;
|
|
111
|
+
|
|
112
|
+
type IAccordionTriggerProps = React.ComponentPropsWithoutRef<
|
|
113
|
+
typeof UIAccordion.Trigger
|
|
114
|
+
>;
|
|
115
|
+
|
|
116
|
+
type IAccordionTitleTextProps = React.ComponentPropsWithoutRef<
|
|
117
|
+
typeof UIAccordion.TitleText
|
|
118
|
+
>;
|
|
119
|
+
|
|
120
|
+
/** Components */
|
|
121
|
+
|
|
122
|
+
const Accordion = React.forwardRef<
|
|
123
|
+
React.ComponentRef<typeof UIAccordion>,
|
|
124
|
+
IAccordionProps
|
|
125
|
+
>(({ className, ...props }, ref) => {
|
|
126
|
+
return (
|
|
127
|
+
<UIAccordion
|
|
128
|
+
ref={ref}
|
|
129
|
+
{...props}
|
|
130
|
+
className={accordionStyle({ class: className })}
|
|
131
|
+
/>
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const AccordionItem = React.forwardRef<
|
|
136
|
+
React.ComponentRef<typeof UIAccordion.Item>,
|
|
137
|
+
IAccordionItemProps
|
|
138
|
+
>(({ className, ...props }, ref) => {
|
|
139
|
+
return (
|
|
140
|
+
<UIAccordion.Item
|
|
141
|
+
ref={ref}
|
|
142
|
+
{...props}
|
|
143
|
+
className={accordionItemStyle({ class: className })}
|
|
144
|
+
/>
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const AccordionContent = React.forwardRef<
|
|
149
|
+
React.ComponentRef<typeof UIAccordion.Content>,
|
|
150
|
+
IAccordionContentProps
|
|
151
|
+
>(function AccordionContent({ className, ...props }, ref) {
|
|
152
|
+
const { isExpanded } = React.useContext(AccordionItemContext);
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<AnimatedHeight
|
|
156
|
+
isExpanded={isExpanded}
|
|
157
|
+
duration={accordionAnimationConfig.contentDuration}
|
|
158
|
+
>
|
|
159
|
+
<UIAccordion.Content
|
|
160
|
+
ref={ref}
|
|
161
|
+
{...props}
|
|
162
|
+
className={accordionContentStyle({ class: className })}
|
|
163
|
+
/>
|
|
164
|
+
</AnimatedHeight>
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const AccordionContentText = React.forwardRef<
|
|
169
|
+
React.ComponentRef<typeof UIAccordion.ContentText>,
|
|
170
|
+
IAccordionContentTextProps
|
|
171
|
+
>(function AccordionContentText({ className, ...props }, ref) {
|
|
172
|
+
return (
|
|
173
|
+
<UIAccordion.ContentText
|
|
174
|
+
ref={ref}
|
|
175
|
+
{...props}
|
|
176
|
+
className={accordionContentTextStyle({ class: className })}
|
|
177
|
+
/>
|
|
178
|
+
);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const AccordionIcon = React.forwardRef<
|
|
182
|
+
React.ComponentRef<typeof UIAccordion.Icon>,
|
|
183
|
+
IAccordionIconProps
|
|
184
|
+
>(function AccordionIcon({ className, ...props }, ref) {
|
|
185
|
+
const { isExpanded } = React.useContext(AccordionItemContext);
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<AnimatedIcon
|
|
189
|
+
isExpanded={isExpanded}
|
|
190
|
+
duration={accordionAnimationConfig.iconDuration}
|
|
191
|
+
rotation={accordionAnimationConfig.iconRotation}
|
|
192
|
+
>
|
|
193
|
+
<UIAccordion.Icon
|
|
194
|
+
ref={ref}
|
|
195
|
+
{...props}
|
|
196
|
+
className={accordionIconStyle({ class: className })}
|
|
197
|
+
/>
|
|
198
|
+
</AnimatedIcon>
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
const AccordionHeader = React.forwardRef<
|
|
203
|
+
React.ComponentRef<typeof UIAccordion.Header>,
|
|
204
|
+
IAccordionHeaderProps
|
|
205
|
+
>(function AccordionHeader({ className, ...props }, ref) {
|
|
206
|
+
return (
|
|
207
|
+
<UIAccordion.Header
|
|
208
|
+
ref={ref}
|
|
209
|
+
{...props}
|
|
210
|
+
className={accordionHeaderStyle({ class: className })}
|
|
211
|
+
/>
|
|
212
|
+
);
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const AccordionTrigger = React.forwardRef<
|
|
216
|
+
React.ComponentRef<typeof UIAccordion.Trigger>,
|
|
217
|
+
IAccordionTriggerProps
|
|
218
|
+
>(function AccordionTrigger({ className, ...props }, ref) {
|
|
219
|
+
return (
|
|
220
|
+
<UIAccordion.Trigger
|
|
221
|
+
ref={ref}
|
|
222
|
+
{...props}
|
|
223
|
+
className={accordionTriggerStyle({ class: className })}
|
|
224
|
+
/>
|
|
225
|
+
);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const AccordionTitleText = React.forwardRef<
|
|
229
|
+
React.ComponentRef<typeof UIAccordion.TitleText>,
|
|
230
|
+
IAccordionTitleTextProps
|
|
231
|
+
>(function AccordionTitleText({ className, ...props }, ref) {
|
|
232
|
+
return (
|
|
233
|
+
<UIAccordion.TitleText
|
|
234
|
+
ref={ref}
|
|
235
|
+
{...props}
|
|
236
|
+
className={accordionTitleTextStyle({ class: className })}
|
|
237
|
+
/>
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
Accordion.displayName = 'Accordion';
|
|
242
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
243
|
+
AccordionHeader.displayName = 'AccordionHeader';
|
|
244
|
+
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
245
|
+
AccordionTitleText.displayName = 'AccordionTitleText';
|
|
246
|
+
AccordionContentText.displayName = 'AccordionContentText';
|
|
247
|
+
AccordionIcon.displayName = 'AccordionIcon';
|
|
248
|
+
AccordionContent.displayName = 'AccordionContent';
|
|
249
|
+
|
|
250
|
+
export {
|
|
251
|
+
Accordion, AccordionContent, AccordionContentText, AccordionHeader, AccordionIcon, AccordionItem, AccordionTitleText, AccordionTrigger
|
|
252
|
+
};
|
|
253
|
+
|