@ceed/cds 0.0.177-beta.4 → 0.0.177-beta.5

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 (156) hide show
  1. package/package.json +2 -1
  2. package/src/components/Accordions/Accordions.framer.ts +44 -0
  3. package/src/components/Accordions/Accordions.tsx +98 -0
  4. package/src/components/Accordions/index.ts +3 -0
  5. package/src/components/Autocomplete/Autocomplete.framer.ts +136 -0
  6. package/src/components/Autocomplete/Autocomplete.tsx +419 -0
  7. package/src/components/Autocomplete/index.ts +3 -0
  8. package/src/components/Avatar/Avatar.framer.ts +32 -0
  9. package/src/components/Avatar/Avatar.tsx +59 -0
  10. package/src/components/Avatar/index.ts +3 -0
  11. package/src/components/Badge/Badge.framer.ts +25 -0
  12. package/src/components/Box/Box.tsx +11 -0
  13. package/src/components/Box/index.ts +3 -0
  14. package/src/components/Breadcrumbs/Breadcrumbs.framer.ts +50 -0
  15. package/src/components/Breadcrumbs/Breadcrumbs.tsx +101 -0
  16. package/src/components/Breadcrumbs/index.ts +3 -0
  17. package/src/components/Button/Button.framer.ts +67 -0
  18. package/src/components/Button/Button.tsx +39 -0
  19. package/src/components/Button/index.ts +3 -0
  20. package/src/components/Calendar/Calendar.framer.ts +31 -0
  21. package/src/components/Calendar/Calendar.tsx +527 -0
  22. package/src/components/Calendar/hooks/use-calendar-props.ts +89 -0
  23. package/src/components/Calendar/hooks/use-calendar.ts +312 -0
  24. package/src/components/Calendar/index.ts +3 -0
  25. package/src/components/Calendar/types.ts +33 -0
  26. package/src/components/Calendar/utils/index.ts +88 -0
  27. package/src/components/Card/Card.tsx +49 -0
  28. package/src/components/Card/index.ts +3 -0
  29. package/src/components/Checkbox/Checkbox.framer.ts +49 -0
  30. package/src/components/Checkbox/Checkbox.tsx +22 -0
  31. package/src/components/Checkbox/index.ts +3 -0
  32. package/src/components/Chip/Chip.framer.ts +26 -0
  33. package/src/components/Chip/Chip.tsx +7 -0
  34. package/src/components/Chip/index.ts +3 -0
  35. package/src/components/Container/Container.framer.ts +13 -0
  36. package/src/components/Container/Container.tsx +61 -0
  37. package/src/components/Container/index.ts +3 -0
  38. package/src/components/CurrencyInput/CurrencyInput.framer.ts +52 -0
  39. package/src/components/CurrencyInput/CurrencyInput.tsx +190 -0
  40. package/src/components/CurrencyInput/hooks/use-currency-setting.ts +174 -0
  41. package/src/components/CurrencyInput/index.ts +3 -0
  42. package/src/components/DataTable/DataTable.framer.ts +187 -0
  43. package/src/components/DataTable/DataTable.tsx +1096 -0
  44. package/src/components/DataTable/index.ts +3 -0
  45. package/src/components/DataTable/types.ts +263 -0
  46. package/src/components/DatePicker/DatePicker.framer.ts +79 -0
  47. package/src/components/DatePicker/DatePicker.tsx +360 -0
  48. package/src/components/DatePicker/index.ts +3 -0
  49. package/src/components/DateRangePicker/DateRangePicker.framer.ts +79 -0
  50. package/src/components/DateRangePicker/DateRangePicker.tsx +362 -0
  51. package/src/components/DateRangePicker/index.ts +3 -0
  52. package/src/components/DialogActions/DialogActions.tsx +18 -0
  53. package/src/components/DialogActions/index.ts +3 -0
  54. package/src/components/DialogContent/DialogContent.tsx +15 -0
  55. package/src/components/DialogContent/index.ts +3 -0
  56. package/src/components/DialogFrame/DialogFrame.framer.ts +27 -0
  57. package/src/components/DialogFrame/DialogFrame.tsx +55 -0
  58. package/src/components/DialogFrame/index.ts +3 -0
  59. package/src/components/DialogTitle/DialogTitle.tsx +15 -0
  60. package/src/components/DialogTitle/index.ts +3 -0
  61. package/src/components/Divider/Divider.framer.ts +13 -0
  62. package/src/components/Divider/Divider.tsx +22 -0
  63. package/src/components/Divider/index.ts +3 -0
  64. package/src/components/Drawer/Drawer.tsx +52 -0
  65. package/src/components/Drawer/index.ts +3 -0
  66. package/src/components/Dropdown/Dropdown.tsx +11 -0
  67. package/src/components/Dropdown/index.ts +3 -0
  68. package/src/components/FormControl/FormControl.framer.ts +27 -0
  69. package/src/components/FormControl/FormControl.tsx +22 -0
  70. package/src/components/FormControl/index.ts +3 -0
  71. package/src/components/FormHelperText/FormHelperText.tsx +11 -0
  72. package/src/components/FormHelperText/index.ts +3 -0
  73. package/src/components/FormLabel/FormLabel.tsx +11 -0
  74. package/src/components/FormLabel/index.ts +3 -0
  75. package/src/components/Grid/Grid.tsx +11 -0
  76. package/src/components/Grid/index.ts +3 -0
  77. package/src/components/IconButton/IconButton.framer.ts +49 -0
  78. package/src/components/IconButton/IconButton.tsx +42 -0
  79. package/src/components/IconButton/index.ts +3 -0
  80. package/src/components/Input/Input.framer.ts +77 -0
  81. package/src/components/Input/Input.tsx +132 -0
  82. package/src/components/Input/index.ts +3 -0
  83. package/src/components/InsetDrawer/InsetDrawer.tsx +40 -0
  84. package/src/components/InsetDrawer/index.ts +3 -0
  85. package/src/components/Link/Link.framer.ts +58 -0
  86. package/src/components/Markdown/Markdown.framer.ts +77 -0
  87. package/src/components/Markdown/Markdown.tsx +109 -0
  88. package/src/components/Markdown/index.ts +3 -0
  89. package/src/components/Menu/Menu.tsx +78 -0
  90. package/src/components/Menu/index.ts +3 -0
  91. package/src/components/MenuButton/MenuButton.framer.ts +31 -0
  92. package/src/components/Modal/Modal.framer.ts +31 -0
  93. package/src/components/Modal/Modal.tsx +81 -0
  94. package/src/components/Modal/index.ts +3 -0
  95. package/src/components/MonthPicker/MonthPicker.framer.ts +69 -0
  96. package/src/components/MonthPicker/MonthPicker.tsx +327 -0
  97. package/src/components/MonthPicker/index.ts +3 -0
  98. package/src/components/MonthRangePicker/MonthRangePicker.framer.ts +69 -0
  99. package/src/components/MonthRangePicker/MonthRangePicker.tsx +343 -0
  100. package/src/components/MonthRangePicker/index.ts +3 -0
  101. package/src/components/NavigationGroup/NavigationGroup.tsx +65 -0
  102. package/src/components/NavigationGroup/index.ts +3 -0
  103. package/src/components/NavigationItem/NavigationItem.tsx +75 -0
  104. package/src/components/NavigationItem/index.ts +3 -0
  105. package/src/components/Navigator/Navigator.framer.ts +55 -0
  106. package/src/components/Navigator/Navigator.tsx +76 -0
  107. package/src/components/Navigator/index.ts +3 -0
  108. package/src/components/Pagination/Pagination.framer.ts +31 -0
  109. package/src/components/Pagination/Pagination.tsx +239 -0
  110. package/src/components/Pagination/index.ts +3 -0
  111. package/src/components/PercentageInput/PercentageInput.framer.ts +64 -0
  112. package/src/components/PercentageInput/PercentageInput.tsx +181 -0
  113. package/src/components/PercentageInput/index.ts +3 -0
  114. package/src/components/Radio/Radio.tsx +19 -0
  115. package/src/components/Radio/index.ts +3 -0
  116. package/src/components/RadioList/RadioList.framer.ts +43 -0
  117. package/src/components/RadioList/RadioList.tsx +30 -0
  118. package/src/components/RadioList/index.ts +3 -0
  119. package/src/components/Select/Select.framer.ts +86 -0
  120. package/src/components/Select/Select.tsx +122 -0
  121. package/src/components/Select/index.ts +3 -0
  122. package/src/components/Sheet/Sheet.framer.ts +16 -0
  123. package/src/components/Sheet/Sheet.tsx +11 -0
  124. package/src/components/Sheet/index.ts +3 -0
  125. package/src/components/Skeleton/Skeleton.framer.ts +24 -0
  126. package/src/components/Stack/Stack.tsx +11 -0
  127. package/src/components/Stack/index.ts +3 -0
  128. package/src/components/Stepper/Stepper.framer.ts +182 -0
  129. package/src/components/Stepper/Stepper.tsx +129 -0
  130. package/src/components/Stepper/index.ts +3 -0
  131. package/src/components/Switch/Switch.framer.ts +39 -0
  132. package/src/components/Switch/Switch.tsx +64 -0
  133. package/src/components/Switch/index.ts +3 -0
  134. package/src/components/Table/Table.tsx +191 -0
  135. package/src/components/Table/index.ts +3 -0
  136. package/src/components/Tabs/Tabs.framer.ts +60 -0
  137. package/src/components/Tabs/Tabs.tsx +35 -0
  138. package/src/components/Tabs/index.ts +3 -0
  139. package/src/components/Textarea/Textarea.framer.ts +77 -0
  140. package/src/components/Textarea/Textarea.tsx +74 -0
  141. package/src/components/Textarea/index.ts +3 -0
  142. package/src/components/ThemeProvider/ThemeProvider.tsx +348 -0
  143. package/src/components/ThemeProvider/index.ts +3 -0
  144. package/src/components/Tooltip/Tooltip.tsx +22 -0
  145. package/src/components/Tooltip/index.ts +3 -0
  146. package/src/components/Typography/Typography.framer.ts +90 -0
  147. package/src/components/Typography/Typography.tsx +22 -0
  148. package/src/components/Typography/index.ts +3 -0
  149. package/src/components/Uploader/Uploader.framer.ts +119 -0
  150. package/src/components/Uploader/Uploader.tsx +565 -0
  151. package/src/components/Uploader/index.ts +3 -0
  152. package/src/components/index.ts +63 -0
  153. package/src/framer-entrypoint.ts +433 -0
  154. package/src/hooks/use-controlled-state/index.ts +37 -0
  155. package/src/index.ts +173 -0
  156. package/src/libs/rehype-accent/index.ts +46 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/cds",
3
- "version": "0.0.177-beta.4",
3
+ "version": "0.0.177-beta.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/types/index.d.ts",
6
6
  "type": "module",
@@ -17,6 +17,7 @@
17
17
  "prepack": "yarn build"
18
18
  },
19
19
  "files": [
20
+ "src",
20
21
  "dist",
21
22
  "framer"
22
23
  ],
@@ -0,0 +1,44 @@
1
+ import { ControlType, type PropertyControls } from "framer";
2
+
3
+ export const accordionsPropertyControls: PropertyControls = {
4
+ variant: {
5
+ title: "Variant",
6
+ type: ControlType.Enum,
7
+ options: ["outlined", "plain", "solid", "soft"],
8
+ defaultValue: "plain",
9
+ },
10
+ color: {
11
+ title: "Color",
12
+ type: ControlType.Enum,
13
+ options: ["primary", "neutral", "danger", "success", "warning"],
14
+ optionTitles: ["Primary", "Neutral", "Danger", "Success", "Warning"],
15
+ defaultValue: "neutral",
16
+ },
17
+ size: {
18
+ title: "Size",
19
+ type: ControlType.Enum,
20
+ options: ["sm", "md", "lg"],
21
+ defaultValue: "md",
22
+ },
23
+ disableDivider: {
24
+ title: "Disable Divider",
25
+ type: ControlType.Boolean,
26
+ defaultValue: false,
27
+ },
28
+ summaries: {
29
+ title: "Summaries",
30
+ type: ControlType.Array,
31
+ control: {
32
+ type: ControlType.String,
33
+ },
34
+ defaultValue: [],
35
+ },
36
+ details: {
37
+ title: "Details",
38
+ type: ControlType.Array,
39
+ control: {
40
+ type: ControlType.ComponentInstance,
41
+ },
42
+ defaultValue: [],
43
+ }
44
+ };
@@ -0,0 +1,98 @@
1
+ import React from "react";
2
+ import {
3
+ AccordionGroup as JoyAccordionGroup,
4
+ Accordion as JoyAccordion,
5
+ AccordionSummary as JoyAccordionSummary,
6
+ AccordionDetails as JoyAccordionDetails,
7
+ } from "@mui/joy";
8
+ import { motion } from "framer-motion";
9
+
10
+ const MotionAccordionSummary = motion(JoyAccordionSummary);
11
+
12
+ const AccordionSummary = MotionAccordionSummary;
13
+
14
+ export { AccordionSummary };
15
+
16
+ AccordionSummary.displayName = "AccordionSummary";
17
+
18
+ const MotionAccordionDetails = motion(JoyAccordionDetails);
19
+
20
+ const AccordionDetails = MotionAccordionDetails;
21
+
22
+ export { AccordionDetails };
23
+
24
+ AccordionDetails.displayName = "AccordionDetails";
25
+
26
+ const MotionAccordion = motion(JoyAccordion);
27
+ function Accordion(
28
+ props: {
29
+ summary: React.ReactNode;
30
+ details: React.ReactNode;
31
+ index: number;
32
+ } & React.ComponentProps<typeof MotionAccordion>
33
+ ) {
34
+ // prop destruction
35
+ const { summary, details, variant, color, ...innerProps } = props;
36
+ // lib hooks
37
+ // state, ref, querystring hooks
38
+ // form hooks
39
+ // query hooks
40
+ // calculated values
41
+ const inheritedVariant = variant === "solid" ? "solid" : undefined;
42
+ // effects
43
+ // handlers
44
+
45
+ return (
46
+ <MotionAccordion variant={inheritedVariant} color={color} {...innerProps}>
47
+ <AccordionSummary variant={inheritedVariant} color={color}>
48
+ {summary}
49
+ </AccordionSummary>
50
+ <AccordionDetails variant={inheritedVariant} color={color}>
51
+ {details}
52
+ </AccordionDetails>
53
+ </MotionAccordion>
54
+ );
55
+ }
56
+
57
+ export { Accordion };
58
+
59
+ Accordion.displayName = "Accordion";
60
+
61
+ const MotionAccordions = motion(JoyAccordionGroup);
62
+
63
+ function Accordions(
64
+ props: {
65
+ items: {
66
+ summary: string;
67
+ details: React.ReactNode;
68
+ }[];
69
+ } & React.ComponentProps<typeof MotionAccordions>
70
+ ) {
71
+ // prop destruction
72
+ const { variant, color, items, ...innerProps } = props;
73
+ // lib hooks
74
+ // state, ref, querystring hooks
75
+ // form hooks
76
+ // query hooks
77
+ // calculated values
78
+ // effects
79
+ // handlers
80
+
81
+ return (
82
+ <MotionAccordions variant={variant} color={color} {...innerProps}>
83
+ {items.map((item, index) => (
84
+ <Accordion
85
+ summary={item.summary}
86
+ details={item.details}
87
+ index={index}
88
+ variant={variant}
89
+ color={color}
90
+ />
91
+ ))}
92
+ </MotionAccordions>
93
+ );
94
+ }
95
+
96
+ export { Accordions };
97
+
98
+ Accordions.displayName = "Accordions";
@@ -0,0 +1,3 @@
1
+ import { Accordions } from "./Accordions.js";
2
+ export * from "./Accordions.js";
3
+ export default Accordions;
@@ -0,0 +1,136 @@
1
+ import { ControlType, type PropertyControls } from "framer";
2
+
3
+ export const autocompletePropertyControls: PropertyControls = {
4
+ onChange: {
5
+ type: ControlType.EventHandler,
6
+ },
7
+ label: {
8
+ title: "Label",
9
+ type: ControlType.String,
10
+ },
11
+ helperText: {
12
+ title: "Helper Text",
13
+ type: ControlType.String,
14
+ },
15
+ error: {
16
+ title: "Error",
17
+ type: ControlType.Boolean,
18
+ defaultValue: false,
19
+ },
20
+ defaultValue: {
21
+ title: "Default Value",
22
+ type: ControlType.String,
23
+ defaultValue: undefined,
24
+ },
25
+ options: {
26
+ title: "Options",
27
+ type: ControlType.Array,
28
+ control: {
29
+ type: ControlType.Object,
30
+ controls: {
31
+ label: {
32
+ title: "Label",
33
+ type: ControlType.String,
34
+ },
35
+ chips: {
36
+ title: "Chips",
37
+ type: ControlType.Object,
38
+ controls: {
39
+ start: {
40
+ title: "Start",
41
+ type: ControlType.Object,
42
+ controls: {
43
+ label: {
44
+ title: "Label",
45
+ type: ControlType.String,
46
+ },
47
+ color: {
48
+ title: "Color",
49
+ type: ControlType.Enum,
50
+ options: [
51
+ "primary",
52
+ "neutral",
53
+ "danger",
54
+ "success",
55
+ "warning",
56
+ ],
57
+ optionTitles: [
58
+ "Primary",
59
+ "Neutral",
60
+ "Danger",
61
+ "Success",
62
+ "Warning",
63
+ ],
64
+ },
65
+ },
66
+ },
67
+ end: {
68
+ title: "End",
69
+ type: ControlType.Object,
70
+ controls: {
71
+ label: {
72
+ title: "Label",
73
+ type: ControlType.String,
74
+ },
75
+ color: {
76
+ title: "Color",
77
+ type: ControlType.Enum,
78
+ options: [
79
+ "primary",
80
+ "neutral",
81
+ "danger",
82
+ "success",
83
+ "warning",
84
+ ],
85
+ optionTitles: [
86
+ "Primary",
87
+ "Neutral",
88
+ "Danger",
89
+ "Success",
90
+ "Warning",
91
+ ],
92
+ },
93
+ },
94
+ },
95
+ },
96
+ },
97
+ },
98
+ },
99
+ defaultValue: [
100
+ { label: "Option1", chips: {} },
101
+ { label: "Option2", chips: {} },
102
+ { label: "Option3", chips: {} },
103
+ ],
104
+ },
105
+ placeholder: {
106
+ title: "Placeholder",
107
+ type: ControlType.String,
108
+ defaultValue: "Select an option",
109
+ },
110
+ variant: {
111
+ title: "Variant",
112
+ type: ControlType.Enum,
113
+ options: ["outlined", "plain", "solid", "soft"],
114
+ defaultValue: "outlined",
115
+ },
116
+ size: {
117
+ title: "Size",
118
+ type: ControlType.Enum,
119
+ options: ["sm", "md", "lg"],
120
+ defaultValue: "md",
121
+ },
122
+ startDecorator: {
123
+ title: "Start Decorator",
124
+ type: ControlType.ComponentInstance,
125
+ },
126
+ disabled: {
127
+ title: "Disabled",
128
+ type: ControlType.Boolean,
129
+ defaultValue: false,
130
+ },
131
+ required: {
132
+ title: "Required",
133
+ type: ControlType.Boolean,
134
+ defaultValue: false,
135
+ },
136
+ };