@draftbit/core 43.2.3-6c5db5.0 → 43.2.3-bd5c77.0

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 (67) hide show
  1. package/lib/commonjs/components/Accordion/AccordionGroup.js +9 -1
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
  3. package/lib/commonjs/components/DeprecatedFAB.js +4 -20
  4. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  5. package/lib/commonjs/components/TabView/TabView.js +103 -0
  6. package/lib/commonjs/components/TabView/TabView.js.map +1 -0
  7. package/lib/commonjs/components/TabView/TabViewItem.js +27 -0
  8. package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -0
  9. package/lib/commonjs/components/TabView/index.js +24 -0
  10. package/lib/commonjs/components/TabView/index.js.map +1 -0
  11. package/lib/commonjs/index.js +14 -0
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/mappings/AccordionGroup.js +1 -1
  14. package/lib/commonjs/mappings/AccordionGroup.js.map +1 -1
  15. package/lib/commonjs/mappings/AccordionItem.js +1 -1
  16. package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
  17. package/lib/commonjs/mappings/RadioButton.js.map +1 -1
  18. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  19. package/lib/commonjs/mappings/TabView.js +80 -0
  20. package/lib/commonjs/mappings/TabView.js.map +1 -0
  21. package/lib/module/components/Accordion/AccordionGroup.js +9 -1
  22. package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
  23. package/lib/module/components/ProgressIndicator.js.map +1 -1
  24. package/lib/module/components/TabView/TabView.js +88 -0
  25. package/lib/module/components/TabView/TabView.js.map +1 -0
  26. package/lib/module/components/TabView/TabViewItem.js +19 -0
  27. package/lib/module/components/TabView/TabViewItem.js.map +1 -0
  28. package/lib/module/components/TabView/index.js +3 -0
  29. package/lib/module/components/TabView/index.js.map +1 -0
  30. package/lib/module/components/Typography.js.map +1 -1
  31. package/lib/module/index.js +1 -0
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/mappings/AccordionGroup.js +1 -1
  34. package/lib/module/mappings/AccordionGroup.js.map +1 -1
  35. package/lib/module/mappings/AccordionItem.js +1 -1
  36. package/lib/module/mappings/AccordionItem.js.map +1 -1
  37. package/lib/module/mappings/ActionSheetCancel.js.map +1 -1
  38. package/lib/module/mappings/TabView.js +71 -0
  39. package/lib/module/mappings/TabView.js.map +1 -0
  40. package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
  41. package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
  42. package/lib/typescript/src/components/TabView/index.d.ts +2 -0
  43. package/lib/typescript/src/index.d.ts +1 -0
  44. package/lib/typescript/src/mappings/{Accordion.d.ts → TabView.d.ts} +65 -24
  45. package/package.json +4 -2
  46. package/src/components/Accordion/AccordionGroup.js +12 -1
  47. package/src/components/Accordion/AccordionGroup.tsx +15 -1
  48. package/src/components/TabView/TabView.js +33 -0
  49. package/src/components/TabView/TabView.tsx +97 -0
  50. package/src/components/TabView/TabViewItem.js +5 -0
  51. package/src/components/TabView/TabViewItem.tsx +21 -0
  52. package/src/components/TabView/index.js +2 -0
  53. package/src/components/TabView/index.ts +2 -0
  54. package/src/index.js +1 -0
  55. package/src/index.tsx +1 -0
  56. package/src/mappings/AccordionGroup.js +1 -1
  57. package/src/mappings/AccordionGroup.ts +1 -1
  58. package/src/mappings/AccordionItem.js +1 -1
  59. package/src/mappings/AccordionItem.ts +1 -1
  60. package/src/mappings/TabView.js +73 -0
  61. package/src/mappings/TabView.ts +80 -0
  62. package/lib/commonjs/mappings/Accordion.js +0 -40
  63. package/lib/commonjs/mappings/Accordion.js.map +0 -1
  64. package/lib/module/mappings/Accordion.js +0 -31
  65. package/lib/module/mappings/Accordion.js.map +0 -1
  66. package/src/mappings/Accordion.js +0 -30
  67. package/src/mappings/Accordion.ts +0 -38
@@ -29,7 +29,18 @@ const AccordionGroup = ({ Icon, openColor, closedColor, caretColor, icon, iconSi
29
29
  React.createElement(Icon, { name: expanded
30
30
  ? "MaterialIcons/keyboard-arrow-up"
31
31
  : "MaterialIcons/keyboard-arrow-down", color: caretColor, size: 24 })))),
32
- expandedInternal ? children : null));
32
+ expandedInternal
33
+ ? React.Children.map(children, (child) => {
34
+ if (React.isValidElement(child) &&
35
+ !child.props.left &&
36
+ !child.props.right) {
37
+ return React.cloneElement(child, {
38
+ style: child.props.style,
39
+ });
40
+ }
41
+ return child;
42
+ })
43
+ : null));
33
44
  };
34
45
  const styles = StyleSheet.create({
35
46
  row: {
@@ -97,7 +97,21 @@ const AccordionGroup = ({
97
97
  </View>
98
98
  </View>
99
99
  </Pressable>
100
- {expandedInternal ? children : null}
100
+ {expandedInternal
101
+ ? React.Children.map(children, (child) => {
102
+ if (
103
+ React.isValidElement(child) &&
104
+ !child.props.left &&
105
+ !child.props.right
106
+ ) {
107
+ return React.cloneElement(child, {
108
+ style: child.props.style,
109
+ });
110
+ }
111
+
112
+ return child;
113
+ })
114
+ : null}
101
115
  </>
102
116
  );
103
117
  };
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import { TabView, TabBar, SceneMap } from "react-native-tab-view";
3
+ // import { withTheme } from "../../theming";
4
+ import TabViewItem from "./TabViewItem";
5
+ const TabViewComponent = ({ Icon, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, style, children, }) => {
6
+ const [index, setIndex] = React.useState(0);
7
+ const [routes, setRoutes] = React.useState([]);
8
+ const [tabScenes, setTabScenes] = React.useState({});
9
+ React.useEffect(() => {
10
+ const newRoutes = [];
11
+ const scenes = {};
12
+ React.Children.toArray(children)
13
+ .filter((child) => child.type === TabViewItem)
14
+ .forEach((child) => {
15
+ if (child?.props?.id) {
16
+ newRoutes.push({
17
+ key: child?.props?.id,
18
+ ...child?.props,
19
+ });
20
+ scenes[child?.props?.id] = () => child;
21
+ }
22
+ });
23
+ setRoutes(newRoutes);
24
+ setTabScenes(scenes);
25
+ }, [children]);
26
+ const indexChangeHandler = (i) => setIndex(i);
27
+ const renderTabBar = (props) => {
28
+ console.log(props);
29
+ return (React.createElement(TabBar, { ...props, activeColor: activeColor, inactiveColor: inactiveColor, pressColor: pressColor, scrollEnabled: scrollEnabled, indicatorStyle: { backgroundColor: indicatorColor }, renderIcon: ({ route, color }) => route?.icon ? (React.createElement(Icon, { name: route.icon, color: color, size: 36 })) : null, style: style }));
30
+ };
31
+ return (React.createElement(TabView, { navigationState: { index, routes }, renderScene: SceneMap(tabScenes), renderTabBar: renderTabBar, onIndexChange: indexChangeHandler, tabBarPosition: tabBarPosition, keyboardDismissMode: keyboardDismissMode, swipeEnabled: swipeEnabled }));
32
+ };
33
+ export default TabViewComponent;
@@ -0,0 +1,97 @@
1
+ import * as React from "react";
2
+ import { StyleProp, TextStyle, ViewStyle } from "react-native";
3
+ import { TabView, TabBar, SceneMap } from "react-native-tab-view";
4
+
5
+ // import { withTheme } from "../../theming";
6
+ import TabViewItem from "./TabViewItem";
7
+ import type { IconSlot } from "../../interfaces/Icon";
8
+
9
+ type TabBarPosition = "top" | "bottom";
10
+ type KeyboardDismissMode = "none" | "auto" | "on-drag";
11
+
12
+ type TabViewProps = {
13
+ tabBarPosition?: TabBarPosition;
14
+ keyboardDismissMode?: KeyboardDismissMode;
15
+ swipeEnabled?: boolean;
16
+ scrollEnabled?: boolean;
17
+ activeColor?: string;
18
+ inactiveColor?: string;
19
+ pressColor?: string;
20
+ indicatorColor?: string;
21
+ style?: StyleProp<TextStyle | ViewStyle>;
22
+ children: React.ReactNode;
23
+ } & IconSlot;
24
+
25
+ const TabViewComponent = ({
26
+ Icon,
27
+ tabBarPosition,
28
+ keyboardDismissMode,
29
+ swipeEnabled,
30
+ scrollEnabled,
31
+ activeColor,
32
+ inactiveColor,
33
+ pressColor,
34
+ indicatorColor,
35
+ style,
36
+ children,
37
+ }: TabViewProps) => {
38
+ const [index, setIndex] = React.useState(0);
39
+ const [routes, setRoutes] = React.useState([]);
40
+ const [tabScenes, setTabScenes] = React.useState({});
41
+
42
+ React.useEffect(() => {
43
+ const newRoutes: any = [];
44
+ const scenes: any = {};
45
+
46
+ React.Children.toArray(children)
47
+ .filter((child: any) => child.type === TabViewItem)
48
+ .forEach((child: any) => {
49
+ if (child?.props?.id) {
50
+ newRoutes.push({
51
+ key: child?.props?.id,
52
+ ...child?.props,
53
+ });
54
+ scenes[child?.props?.id] = () => child;
55
+ }
56
+ });
57
+
58
+ setRoutes(newRoutes);
59
+ setTabScenes(scenes);
60
+ }, [children]);
61
+
62
+ const indexChangeHandler = (i: any) => setIndex(i);
63
+
64
+ const renderTabBar = (props: any) => {
65
+ console.log(props);
66
+ return (
67
+ <TabBar
68
+ {...props}
69
+ activeColor={activeColor}
70
+ inactiveColor={inactiveColor}
71
+ pressColor={pressColor}
72
+ scrollEnabled={scrollEnabled}
73
+ indicatorStyle={{ backgroundColor: indicatorColor }}
74
+ renderIcon={({ route, color }) =>
75
+ route?.icon ? (
76
+ <Icon name={route.icon} color={color} size={36} />
77
+ ) : null
78
+ }
79
+ style={style}
80
+ />
81
+ );
82
+ };
83
+
84
+ return (
85
+ <TabView
86
+ navigationState={{ index, routes }}
87
+ renderScene={SceneMap(tabScenes)}
88
+ renderTabBar={renderTabBar}
89
+ onIndexChange={indexChangeHandler}
90
+ tabBarPosition={tabBarPosition}
91
+ keyboardDismissMode={keyboardDismissMode}
92
+ swipeEnabled={swipeEnabled}
93
+ />
94
+ );
95
+ };
96
+
97
+ export default TabViewComponent;
@@ -0,0 +1,5 @@
1
+ const TabViewItem = ({ title, id, icon, children, accessibilityLabel, }) => {
2
+ console.log({ title, id, icon, accessibilityLabel });
3
+ return children;
4
+ };
5
+ export default TabViewItem;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ interface TabViewItemProps {
3
+ title: string;
4
+ id: string;
5
+ icon: string;
6
+ accessibilityLabel: string;
7
+ children: React.ReactNode;
8
+ }
9
+
10
+ const TabViewItem = ({
11
+ title,
12
+ id,
13
+ icon,
14
+ children,
15
+ accessibilityLabel,
16
+ }: TabViewItemProps) => {
17
+ console.log({ title, id, icon, accessibilityLabel });
18
+ return children;
19
+ };
20
+
21
+ export default TabViewItem;
@@ -0,0 +1,2 @@
1
+ export { default as TabView } from "./TabView";
2
+ export { default as TabViewItem } from "./TabViewItem";
@@ -0,0 +1,2 @@
1
+ export { default as TabView } from "./TabView";
2
+ export { default as TabViewItem } from "./TabViewItem";
package/src/index.js CHANGED
@@ -27,6 +27,7 @@ export { default as Touchable } from "./components/Touchable";
27
27
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
28
28
  export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/ActionSheet";
29
29
  export { Swiper, SwiperItem } from "./components/Swiper";
30
+ export { TabView, TabViewItem } from "./components/TabView";
30
31
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
31
32
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
32
33
  /* Deprecated: Fix or Delete! */
package/src/index.tsx CHANGED
@@ -32,6 +32,7 @@ export {
32
32
  ActionSheetCancel,
33
33
  } from "./components/ActionSheet";
34
34
  export { Swiper, SwiperItem } from "./components/Swiper";
35
+ export { TabView, TabViewItem } from "./components/TabView";
35
36
 
36
37
  export {
37
38
  Center,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Accordion Group",
4
4
  tag: "AccordionGroup",
5
5
  description: "An expandable container containing components",
6
- category: COMPONENT_TYPES.deprecated,
6
+ category: COMPONENT_TYPES.container,
7
7
  props: {
8
8
  openColor: createColorProp({
9
9
  label: "Open text color",
@@ -11,7 +11,7 @@ export const SEED_DATA = {
11
11
  name: "Accordion Group",
12
12
  tag: "AccordionGroup",
13
13
  description: "An expandable container containing components",
14
- category: COMPONENT_TYPES.deprecated,
14
+ category: COMPONENT_TYPES.container,
15
15
  props: {
16
16
  openColor: createColorProp({
17
17
  label: "Open text color",
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Accordion Item",
4
4
  tag: "AccordionItem",
5
5
  description: "Item to be used in Accordion",
6
- category: COMPONENT_TYPES.deprecated,
6
+ category: COMPONENT_TYPES.button,
7
7
  props: {
8
8
  icon: createIconProp(),
9
9
  label: createTextProp({
@@ -9,7 +9,7 @@ export const SEED_DATA = {
9
9
  name: "Accordion Item",
10
10
  tag: "AccordionItem",
11
11
  description: "Item to be used in Accordion",
12
- category: COMPONENT_TYPES.deprecated,
12
+ category: COMPONENT_TYPES.button,
13
13
  props: {
14
14
  icon: createIconProp(),
15
15
  label: createTextProp({
@@ -0,0 +1,73 @@
1
+ import { COMPONENT_TYPES, createTextProp, createTextEnumProp, createBoolProp, createColorProp, } from "@draftbit/types";
2
+ export const SEED_DATA = [
3
+ {
4
+ name: "TabView",
5
+ tag: "TabView",
6
+ category: COMPONENT_TYPES.container,
7
+ layout: {},
8
+ props: {
9
+ tabBarPosition: createTextEnumProp({
10
+ label: "Tab Bar Position",
11
+ description: "Tab Bar Position",
12
+ options: ["top", "bottom"],
13
+ defaultValue: "top",
14
+ }),
15
+ keyboardDismissMode: createTextEnumProp({
16
+ label: "Keyboard Dismiss Mode",
17
+ description: "Keyboard Dismiss Mode",
18
+ options: ["auto", "on-drag", "none"],
19
+ defaultValue: "auto",
20
+ }),
21
+ swipeEnabled: createBoolProp({
22
+ label: "Swipe Enabled",
23
+ description: "Swipe Enabled",
24
+ defaultValue: true,
25
+ }),
26
+ scrollEnabled: createBoolProp({
27
+ label: "Scroll Enabled",
28
+ description: "Scroll Enabled",
29
+ defaultValue: true,
30
+ }),
31
+ activeColor: createColorProp({
32
+ label: "Active Color",
33
+ description: "Active Color",
34
+ defaultValue: "primary",
35
+ }),
36
+ inactiveColor: createColorProp({
37
+ label: "Inactive Color",
38
+ description: "Inactive Color",
39
+ defaultValue: null,
40
+ }),
41
+ pressColor: createColorProp({
42
+ label: "Press Color",
43
+ description: "Press Color",
44
+ defaultValue: null,
45
+ }),
46
+ indicatorColor: createColorProp({
47
+ label: "Indicator Color",
48
+ description: "Indicator Color",
49
+ defaultValue: null,
50
+ }),
51
+ },
52
+ },
53
+ {
54
+ name: "TabViewItem",
55
+ tag: "TabViewItem",
56
+ category: COMPONENT_TYPES.container,
57
+ layout: {},
58
+ props: {
59
+ title: createTextProp({
60
+ label: "Title",
61
+ description: "Tab Title",
62
+ }),
63
+ id: createTextProp({
64
+ label: "Id",
65
+ description: "Tab Id",
66
+ }),
67
+ accessibilityLabel: createTextProp({
68
+ label: "Accessibility Label",
69
+ description: "Accessibility Label",
70
+ }),
71
+ },
72
+ },
73
+ ];
@@ -0,0 +1,80 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createTextProp,
4
+ createTextEnumProp,
5
+ createBoolProp,
6
+ createColorProp,
7
+ } from "@draftbit/types";
8
+
9
+ export const SEED_DATA = [
10
+ {
11
+ name: "TabView",
12
+ tag: "TabView",
13
+ category: COMPONENT_TYPES.container,
14
+ layout: {},
15
+ props: {
16
+ tabBarPosition: createTextEnumProp({
17
+ label: "Tab Bar Position",
18
+ description: "Tab Bar Position",
19
+ options: ["top", "bottom"],
20
+ defaultValue: "top",
21
+ }),
22
+ keyboardDismissMode: createTextEnumProp({
23
+ label: "Keyboard Dismiss Mode",
24
+ description: "Keyboard Dismiss Mode",
25
+ options: ["auto", "on-drag", "none"],
26
+ defaultValue: "auto",
27
+ }),
28
+ swipeEnabled: createBoolProp({
29
+ label: "Swipe Enabled",
30
+ description: "Swipe Enabled",
31
+ defaultValue: true,
32
+ }),
33
+ scrollEnabled: createBoolProp({
34
+ label: "Scroll Enabled",
35
+ description: "Scroll Enabled",
36
+ defaultValue: true,
37
+ }),
38
+ activeColor: createColorProp({
39
+ label: "Active Color",
40
+ description: "Active Color",
41
+ defaultValue: "primary",
42
+ }),
43
+ inactiveColor: createColorProp({
44
+ label: "Inactive Color",
45
+ description: "Inactive Color",
46
+ defaultValue: null,
47
+ }),
48
+ pressColor: createColorProp({
49
+ label: "Press Color",
50
+ description: "Press Color",
51
+ defaultValue: null,
52
+ }),
53
+ indicatorColor: createColorProp({
54
+ label: "Indicator Color",
55
+ description: "Indicator Color",
56
+ defaultValue: null,
57
+ }),
58
+ },
59
+ },
60
+ {
61
+ name: "TabViewItem",
62
+ tag: "TabViewItem",
63
+ category: COMPONENT_TYPES.container,
64
+ layout: {},
65
+ props: {
66
+ title: createTextProp({
67
+ label: "Title",
68
+ description: "Tab Title",
69
+ }),
70
+ id: createTextProp({
71
+ label: "Id",
72
+ description: "Tab Id",
73
+ }),
74
+ accessibilityLabel: createTextProp({
75
+ label: "Accessibility Label",
76
+ description: "Accessibility Label",
77
+ }),
78
+ },
79
+ },
80
+ ];
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
-
8
- var _types = require("@draftbit/types");
9
-
10
- const SEED_DATA = {
11
- name: "Accordion",
12
- tag: "AccordionGroup",
13
- description: "An expandable container containing components",
14
- category: _types.COMPONENT_TYPES.container,
15
- props: {
16
- openColor: (0, _types.createColorProp)({
17
- label: "Open text color"
18
- }),
19
- closedColor: (0, _types.createColorProp)({
20
- label: "Closed text Color"
21
- }),
22
- caretColor: (0, _types.createColorProp)({
23
- label: "Caret color"
24
- }),
25
- iconSize: (0, _types.createNumberProp)({
26
- label: "Icon size",
27
- defaultValue: 24
28
- }),
29
- label: (0, _types.createTextProp)({
30
- label: "Label"
31
- }),
32
- expanded: (0, _types.createStaticBoolProp)({
33
- label: "Expanded",
34
- description: "Whether the AccordionGroup should be expanded or not"
35
- }),
36
- icon: (0, _types.createIconProp)()
37
- }
38
- };
39
- exports.SEED_DATA = SEED_DATA;
40
- //# sourceMappingURL=Accordion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Accordion.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","container","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,SAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,4BAAgB;AACzBC,MAAAA,KAAK,EAAE;AADkB,KAAhB,CADN;AAILC,IAAAA,WAAW,EAAE,4BAAgB;AAC3BD,MAAAA,KAAK,EAAE;AADoB,KAAhB,CAJR;AAOLE,IAAAA,UAAU,EAAE,4BAAgB;AAC1BF,MAAAA,KAAK,EAAE;AADmB,KAAhB,CAPP;AAULG,IAAAA,QAAQ,EAAE,6BAAiB;AACzBH,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAjB,CAVL;AAcLJ,IAAAA,KAAK,EAAE,2BAAe;AACpBA,MAAAA,KAAK,EAAE;AADa,KAAf,CAdF;AAiBLK,IAAAA,QAAQ,EAAE,iCAAqB;AAC7BL,MAAAA,KAAK,EAAE,UADsB;AAE7BN,MAAAA,WAAW,EAAE;AAFgB,KAArB,CAjBL;AAqBLY,IAAAA,IAAI,EAAE;AArBD;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
@@ -1,31 +0,0 @@
1
- import { COMPONENT_TYPES, createNumberProp, createIconProp, createTextProp, createStaticBoolProp, createColorProp } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Accordion",
4
- tag: "AccordionGroup",
5
- description: "An expandable container containing components",
6
- category: COMPONENT_TYPES.container,
7
- props: {
8
- openColor: createColorProp({
9
- label: "Open text color"
10
- }),
11
- closedColor: createColorProp({
12
- label: "Closed text Color"
13
- }),
14
- caretColor: createColorProp({
15
- label: "Caret color"
16
- }),
17
- iconSize: createNumberProp({
18
- label: "Icon size",
19
- defaultValue: 24
20
- }),
21
- label: createTextProp({
22
- label: "Label"
23
- }),
24
- expanded: createStaticBoolProp({
25
- label: "Expanded",
26
- description: "Whether the AccordionGroup should be expanded or not"
27
- }),
28
- icon: createIconProp()
29
- }
30
- };
31
- //# sourceMappingURL=Accordion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Accordion.ts"],"names":["COMPONENT_TYPES","createNumberProp","createIconProp","createTextProp","createStaticBoolProp","createColorProp","SEED_DATA","name","tag","description","category","container","props","openColor","label","closedColor","caretColor","iconSize","defaultValue","expanded","icon"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,cAHF,EAIEC,cAJF,EAKEC,oBALF,EAMEC,eANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,WADiB;AAEvBC,EAAAA,GAAG,EAAE,gBAFkB;AAGvBC,EAAAA,WAAW,EAAE,+CAHU;AAIvBC,EAAAA,QAAQ,EAAEV,eAAe,CAACW,SAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAER,eAAe,CAAC;AACzBS,MAAAA,KAAK,EAAE;AADkB,KAAD,CADrB;AAILC,IAAAA,WAAW,EAAEV,eAAe,CAAC;AAC3BS,MAAAA,KAAK,EAAE;AADoB,KAAD,CAJvB;AAOLE,IAAAA,UAAU,EAAEX,eAAe,CAAC;AAC1BS,MAAAA,KAAK,EAAE;AADmB,KAAD,CAPtB;AAULG,IAAAA,QAAQ,EAAEhB,gBAAgB,CAAC;AACzBa,MAAAA,KAAK,EAAE,WADkB;AAEzBI,MAAAA,YAAY,EAAE;AAFW,KAAD,CAVrB;AAcLJ,IAAAA,KAAK,EAAEX,cAAc,CAAC;AACpBW,MAAAA,KAAK,EAAE;AADa,KAAD,CAdhB;AAiBLK,IAAAA,QAAQ,EAAEf,oBAAoB,CAAC;AAC7BU,MAAAA,KAAK,EAAE,UADsB;AAE7BL,MAAAA,WAAW,EAAE;AAFgB,KAAD,CAjBzB;AAqBLW,IAAAA,IAAI,EAAElB,cAAc;AArBf;AALgB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n createNumberProp,\n createIconProp,\n createTextProp,\n createStaticBoolProp,\n createColorProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Accordion\",\n tag: \"AccordionGroup\",\n description: \"An expandable container containing components\",\n category: COMPONENT_TYPES.container,\n props: {\n openColor: createColorProp({\n label: \"Open text color\",\n }),\n closedColor: createColorProp({\n label: \"Closed text Color\",\n }),\n caretColor: createColorProp({\n label: \"Caret color\",\n }),\n iconSize: createNumberProp({\n label: \"Icon size\",\n defaultValue: 24,\n }),\n label: createTextProp({\n label: \"Label\",\n }),\n expanded: createStaticBoolProp({\n label: \"Expanded\",\n description: \"Whether the AccordionGroup should be expanded or not\",\n }),\n icon: createIconProp(),\n },\n};\n"]}
@@ -1,30 +0,0 @@
1
- import { COMPONENT_TYPES, createNumberProp, createIconProp, createTextProp, createStaticBoolProp, createColorProp, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Accordion",
4
- tag: "AccordionGroup",
5
- description: "An expandable container containing components",
6
- category: COMPONENT_TYPES.container,
7
- props: {
8
- openColor: createColorProp({
9
- label: "Open text color",
10
- }),
11
- closedColor: createColorProp({
12
- label: "Closed text Color",
13
- }),
14
- caretColor: createColorProp({
15
- label: "Caret color",
16
- }),
17
- iconSize: createNumberProp({
18
- label: "Icon size",
19
- defaultValue: 24,
20
- }),
21
- label: createTextProp({
22
- label: "Label",
23
- }),
24
- expanded: createStaticBoolProp({
25
- label: "Expanded",
26
- description: "Whether the AccordionGroup should be expanded or not",
27
- }),
28
- icon: createIconProp(),
29
- },
30
- };
@@ -1,38 +0,0 @@
1
- import {
2
- COMPONENT_TYPES,
3
- createNumberProp,
4
- createIconProp,
5
- createTextProp,
6
- createStaticBoolProp,
7
- createColorProp,
8
- } from "@draftbit/types";
9
-
10
- export const SEED_DATA = {
11
- name: "Accordion",
12
- tag: "AccordionGroup",
13
- description: "An expandable container containing components",
14
- category: COMPONENT_TYPES.container,
15
- props: {
16
- openColor: createColorProp({
17
- label: "Open text color",
18
- }),
19
- closedColor: createColorProp({
20
- label: "Closed text Color",
21
- }),
22
- caretColor: createColorProp({
23
- label: "Caret color",
24
- }),
25
- iconSize: createNumberProp({
26
- label: "Icon size",
27
- defaultValue: 24,
28
- }),
29
- label: createTextProp({
30
- label: "Label",
31
- }),
32
- expanded: createStaticBoolProp({
33
- label: "Expanded",
34
- description: "Whether the AccordionGroup should be expanded or not",
35
- }),
36
- icon: createIconProp(),
37
- },
38
- };