dst-rg 1.0.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 (249) hide show
  1. package/.gitlab-ci.yml +43 -0
  2. package/.storybook/main.ts +15 -0
  3. package/.storybook/preview.ts +15 -0
  4. package/README.md +254 -0
  5. package/components.json +21 -0
  6. package/dist/Avatar.png +0 -0
  7. package/dist/assets/index-CCq7hmG3.js +186 -0
  8. package/dist/assets/index-Mg-hjQGu.css +1 -0
  9. package/dist/index.html +15 -0
  10. package/dist/test.png +0 -0
  11. package/dist/vite.svg +1 -0
  12. package/eslint.config.js +29 -0
  13. package/index.html +14 -0
  14. package/package.json +102 -0
  15. package/postcss.config.mjs +11 -0
  16. package/rollup.config.mjs +55 -0
  17. package/src/assets/react.svg +1 -0
  18. package/src/assets/style/animation.css +27 -0
  19. package/src/assets/style/box-shadow.css +25 -0
  20. package/src/assets/style/colors.css +402 -0
  21. package/src/assets/style/dark-theme.css +288 -0
  22. package/src/assets/style/font-size.css +14 -0
  23. package/src/assets/style/gradient.css +3 -0
  24. package/src/assets/style/index.css +12 -0
  25. package/src/assets/style/light-theme.css +148 -0
  26. package/src/assets/style/line-height.css +13 -0
  27. package/src/assets/style/max-width.css +5 -0
  28. package/src/assets/style/radius.css +13 -0
  29. package/src/assets/style/utility-colors.css +166 -0
  30. package/src/components/Accordion/_.stories.tsx +75 -0
  31. package/src/components/Accordion/_.test.tsx +77 -0
  32. package/src/components/Accordion/index.tsx +47 -0
  33. package/src/components/Accordion/type.ts +24 -0
  34. package/src/components/Avatar/_.stories.tsx +179 -0
  35. package/src/components/Avatar/_.style.ts +40 -0
  36. package/src/components/Avatar/_.test.tsx +150 -0
  37. package/src/components/Avatar/_.types.ts +66 -0
  38. package/src/components/Avatar/index.tsx +63 -0
  39. package/src/components/Badge/_.stories.tsx +75 -0
  40. package/src/components/Badge/_.style.ts +53 -0
  41. package/src/components/Badge/_.test.tsx +27 -0
  42. package/src/components/Badge/_.types.ts +11 -0
  43. package/src/components/Badge/index.tsx +42 -0
  44. package/src/components/Breadcrumbs/_.stories.tsx +95 -0
  45. package/src/components/Breadcrumbs/_.test.tsx +29 -0
  46. package/src/components/Breadcrumbs/_.type.ts +15 -0
  47. package/src/components/Breadcrumbs/index.tsx +103 -0
  48. package/src/components/Button/_.stories.tsx +85 -0
  49. package/src/components/Button/_.style.ts +56 -0
  50. package/src/components/Button/_.test.tsx +103 -0
  51. package/src/components/Button/_.types.ts +14 -0
  52. package/src/components/Button/index.tsx +70 -0
  53. package/src/components/Checkbox/_.stories.tsx +96 -0
  54. package/src/components/Checkbox/_.style.ts +24 -0
  55. package/src/components/Checkbox/_.test.tsx +85 -0
  56. package/src/components/Checkbox/_.types.ts +23 -0
  57. package/src/components/Checkbox/index.tsx +93 -0
  58. package/src/components/CheckboxGroup/PaymentCard/_.stories.tsx +104 -0
  59. package/src/components/CheckboxGroup/PaymentCard/_.style.ts +28 -0
  60. package/src/components/CheckboxGroup/PaymentCard/_.test.tsx +58 -0
  61. package/src/components/CheckboxGroup/PaymentCard/_.types.ts +28 -0
  62. package/src/components/CheckboxGroup/PaymentCard/index.tsx +71 -0
  63. package/src/components/CheckboxGroup/PlanCard/_.stories.tsx +165 -0
  64. package/src/components/CheckboxGroup/PlanCard/_.style.ts +32 -0
  65. package/src/components/CheckboxGroup/PlanCard/_.test.tsx +54 -0
  66. package/src/components/CheckboxGroup/PlanCard/_.types.ts +35 -0
  67. package/src/components/CheckboxGroup/PlanCard/index.tsx +53 -0
  68. package/src/components/CheckboxGroup/UserCard/_.stories.tsx +89 -0
  69. package/src/components/CheckboxGroup/UserCard/_.style.ts +42 -0
  70. package/src/components/CheckboxGroup/UserCard/_.test.tsx +66 -0
  71. package/src/components/CheckboxGroup/UserCard/_.types.ts +26 -0
  72. package/src/components/CheckboxGroup/UserCard/index.tsx +75 -0
  73. package/src/components/Dropdown/_.stories.tsx +180 -0
  74. package/src/components/Dropdown/_.style.ts +108 -0
  75. package/src/components/Dropdown/_.test.tsx +334 -0
  76. package/src/components/Dropdown/_.types.ts +12 -0
  77. package/src/components/Dropdown/index.tsx +130 -0
  78. package/src/components/FileUpload/_.stories.tsx +74 -0
  79. package/src/components/FileUpload/_.style.ts +0 -0
  80. package/src/components/FileUpload/_.test.tsx +222 -0
  81. package/src/components/FileUpload/_.types.ts +53 -0
  82. package/src/components/FileUpload/index.tsx +44 -0
  83. package/src/components/ImageMagnify/_.stories.tsx +226 -0
  84. package/src/components/ImageMagnify/_.style.ts +109 -0
  85. package/src/components/ImageMagnify/_.types.ts +44 -0
  86. package/src/components/ImageMagnify/index.tsx +204 -0
  87. package/src/components/Input/_.stories.tsx +177 -0
  88. package/src/components/Input/_.style.ts +79 -0
  89. package/src/components/Input/_.test.tsx +146 -0
  90. package/src/components/Input/_.types.ts +66 -0
  91. package/src/components/Input/index.tsx +231 -0
  92. package/src/components/InputTags/_.stories.tsx +51 -0
  93. package/src/components/InputTags/_.style.ts +28 -0
  94. package/src/components/InputTags/_.test.tsx +123 -0
  95. package/src/components/InputTags/_.types.ts +26 -0
  96. package/src/components/InputTags/index.tsx +140 -0
  97. package/src/components/Message/_.stories.tsx +79 -0
  98. package/src/components/Message/_.style.ts +87 -0
  99. package/src/components/Message/_.test.tsx +73 -0
  100. package/src/components/Message/_.types.ts +13 -0
  101. package/src/components/Message/index.tsx +57 -0
  102. package/src/components/Metric/_.stories.tsx +142 -0
  103. package/src/components/Metric/_.style.ts +14 -0
  104. package/src/components/Metric/_.test.tsx +166 -0
  105. package/src/components/Metric/_.types.ts +18 -0
  106. package/src/components/Metric/index.tsx +100 -0
  107. package/src/components/Modal/_.stories.tsx +93 -0
  108. package/src/components/Modal/_.style.ts +31 -0
  109. package/src/components/Modal/_.test.tsx +90 -0
  110. package/src/components/Modal/_.types.ts +14 -0
  111. package/src/components/Modal/index.tsx +82 -0
  112. package/src/components/Pagination/_.stories.tsx +118 -0
  113. package/src/components/Pagination/_.test.tsx +51 -0
  114. package/src/components/Pagination/index.tsx +256 -0
  115. package/src/components/Pagination/type.ts +48 -0
  116. package/src/components/PriceSlider/_.stories.tsx +107 -0
  117. package/src/components/PriceSlider/_.test.tsx +63 -0
  118. package/src/components/PriceSlider/_.type.tsx +19 -0
  119. package/src/components/PriceSlider/index.tsx +86 -0
  120. package/src/components/Progress/_.stories.tsx +93 -0
  121. package/src/components/Progress/_.style.ts +15 -0
  122. package/src/components/Progress/_.test.tsx +34 -0
  123. package/src/components/Progress/_.types.ts +17 -0
  124. package/src/components/Progress/index.tsx +173 -0
  125. package/src/components/Radio/_.stories.tsx +391 -0
  126. package/src/components/Radio/_.style.ts +33 -0
  127. package/src/components/Radio/_.test.tsx +77 -0
  128. package/src/components/Radio/_.types.ts +14 -0
  129. package/src/components/Radio/index.tsx +59 -0
  130. package/src/components/Select/_.stories.tsx +308 -0
  131. package/src/components/Select/_.style.ts +5 -0
  132. package/src/components/Select/_.types.ts +24 -0
  133. package/src/components/Select/index.tsx +172 -0
  134. package/src/components/Switch/_.stories.tsx +61 -0
  135. package/src/components/Switch/_.test.tsx +69 -0
  136. package/src/components/Switch/_.type.ts +12 -0
  137. package/src/components/Switch/index.tsx +70 -0
  138. package/src/components/Tabs/_.stories.tsx +508 -0
  139. package/src/components/Tabs/_.style.ts +63 -0
  140. package/src/components/Tabs/_.test.tsx +174 -0
  141. package/src/components/Tabs/_.type.ts +19 -0
  142. package/src/components/Tabs/index.tsx +35 -0
  143. package/src/components/Tag/_.stories.tsx +78 -0
  144. package/src/components/Tag/_.style.ts +71 -0
  145. package/src/components/Tag/_.test.tsx +44 -0
  146. package/src/components/Tag/_.types.ts +27 -0
  147. package/src/components/Tag/index.tsx +46 -0
  148. package/src/components/TextArea/_.stories.tsx +62 -0
  149. package/src/components/TextArea/_.style.ts +11 -0
  150. package/src/components/TextArea/_.test.tsx +43 -0
  151. package/src/components/TextArea/_.types.ts +29 -0
  152. package/src/components/TextArea/index.tsx +83 -0
  153. package/src/components/Toast/_.style.tsx +27 -0
  154. package/src/components/Toast/_.type.ts +30 -0
  155. package/src/components/Toast/_.utils.ts +23 -0
  156. package/src/components/Toast/container.tsx +171 -0
  157. package/src/components/Toast/index.tsx +29 -0
  158. package/src/components/Tooltip/_.stories.tsx +106 -0
  159. package/src/components/Tooltip/_.style.ts +27 -0
  160. package/src/components/Tooltip/_.test.tsx +54 -0
  161. package/src/components/Tooltip/_.types.ts +31 -0
  162. package/src/components/Tooltip/index.tsx +80 -0
  163. package/src/components/developers/AmirHossein.tsx +149 -0
  164. package/src/components/developers/Fardin.tsx +130 -0
  165. package/src/components/developers/Maryam.tsx +260 -0
  166. package/src/components/developers/Milad.tsx +431 -0
  167. package/src/components/developers/Rasoul.tsx +198 -0
  168. package/src/components/index.ts +28 -0
  169. package/src/components/ui/accordion.tsx +162 -0
  170. package/src/components/ui/avatars-component/avatar-description.tsx +30 -0
  171. package/src/components/ui/avatars-component/avatar-groups.tsx +68 -0
  172. package/src/components/ui/avatars-component/avatar-single.tsx +50 -0
  173. package/src/components/ui/card.tsx +92 -0
  174. package/src/components/ui/checkbox-group/plan-card/basic/_.test.tsx +66 -0
  175. package/src/components/ui/checkbox-group/plan-card/basic/index.tsx +70 -0
  176. package/src/components/ui/checkbox-group/plan-card/with-header/_.test.tsx +110 -0
  177. package/src/components/ui/checkbox-group/plan-card/with-header/header.test.tsx +96 -0
  178. package/src/components/ui/checkbox-group/plan-card/with-header/header.tsx +74 -0
  179. package/src/components/ui/checkbox-group/plan-card/with-header/index.tsx +65 -0
  180. package/src/components/ui/file-content/File-content.tsx +43 -0
  181. package/src/components/ui/file-uploader-components/file-uploader-box.tsx +76 -0
  182. package/src/components/ui/file-uploader-components/file-uploader-item.tsx +64 -0
  183. package/src/components/ui/icon-wrapper/_.test.tsx +60 -0
  184. package/src/components/ui/icon-wrapper/index.tsx +19 -0
  185. package/src/components/ui/input-component/input-label.tsx +11 -0
  186. package/src/components/ui/number.tsx +18 -0
  187. package/src/components/ui/pagination/card-minimal-center-align.tsx +96 -0
  188. package/src/components/ui/pagination/card-minimal-right-aligne.tsx +90 -0
  189. package/src/components/ui/pagination/default-pagination.tsx +128 -0
  190. package/src/components/ui/pagination/get-pagination-item.tsx +36 -0
  191. package/src/components/ui/pagination/pagination-card-button-group-aligned.tsx +94 -0
  192. package/src/components/ui/pagination/pagination-card-minimal-left-aligned.tsx +90 -0
  193. package/src/components/ui/pagination/pagination-content.tsx +15 -0
  194. package/src/components/ui/pagination/pagination-item.tsx +11 -0
  195. package/src/components/ui/pagination/pagination-link.tsx +42 -0
  196. package/src/components/ui/tab-components/tabs-content.tsx +15 -0
  197. package/src/components/ui/tab-components/tabs-list.tsx +27 -0
  198. package/src/components/ui/tab-components/tabs-trigger.tsx +25 -0
  199. package/src/components/ui/text-content-wrapper.tsx +36 -0
  200. package/src/hooks/useClickOutside.ts +23 -0
  201. package/src/icons/general/ArrowLeft.tsx +31 -0
  202. package/src/icons/general/ArrowRight.tsx +31 -0
  203. package/src/icons/general/activity-heart.tsx +31 -0
  204. package/src/icons/general/activity.tsx +31 -0
  205. package/src/icons/general/anchor.tsx +31 -0
  206. package/src/icons/general/archive.tsx +31 -0
  207. package/src/icons/general/arrow-left.tsx +25 -0
  208. package/src/icons/general/arrow-right.tsx +25 -0
  209. package/src/icons/general/asterisk-01.tsx +31 -0
  210. package/src/icons/general/asterisk-02.tsx +31 -0
  211. package/src/icons/general/at-sign.tsx +31 -0
  212. package/src/icons/general/attention-mark.tsx +43 -0
  213. package/src/icons/general/bookmark-add.tsx +31 -0
  214. package/src/icons/general/bookmark.tsx +31 -0
  215. package/src/icons/general/chevron-left.tsx +25 -0
  216. package/src/icons/general/chevron-right.tsx +25 -0
  217. package/src/icons/general/circle-minues.tsx +25 -0
  218. package/src/icons/general/circle-plus.tsx +25 -0
  219. package/src/icons/general/circle-question-mark.tsx +32 -0
  220. package/src/icons/general/circle.tsx +32 -0
  221. package/src/icons/general/copy.tsx +43 -0
  222. package/src/icons/general/email.tsx +32 -0
  223. package/src/icons/general/home.tsx +25 -0
  224. package/src/icons/general/layer.tsx +36 -0
  225. package/src/icons/general/leading.tsx +19 -0
  226. package/src/icons/general/master-card.tsx +37 -0
  227. package/src/icons/general/minus.tsx +36 -0
  228. package/src/icons/general/plus.tsx +19 -0
  229. package/src/icons/general/remove.tsx +32 -0
  230. package/src/icons/general/slash-divider.tsx +26 -0
  231. package/src/icons/general/tick-box.tsx +37 -0
  232. package/src/icons/general/trailing.tsx +19 -0
  233. package/src/icons/general/unkown-format.tsx +25 -0
  234. package/src/icons/general/visa-card.tsx +38 -0
  235. package/src/icons/general/x-close.tsx +35 -0
  236. package/src/icons/icons.type.ts +7 -0
  237. package/src/index.css +21 -0
  238. package/src/index.ts +3 -0
  239. package/src/lib/utils.ts +6 -0
  240. package/src/lib/zIndexUtils.ts +2 -0
  241. package/src/main.tsx +50 -0
  242. package/src/vite-env.d.ts +1 -0
  243. package/tests/setup.ts +8 -0
  244. package/tsconfig.app.json +31 -0
  245. package/tsconfig.json +7 -0
  246. package/tsconfig.node.json +24 -0
  247. package/tsconfig.rollup.json +12 -0
  248. package/vite.config.ts +20 -0
  249. package/vitest.config.ts +47 -0
@@ -0,0 +1,149 @@
1
+ import { Input } from "@/components/Input";
2
+ import { InputTags } from "@/components/InputTags";
3
+ import { TextArea } from "@/components/TextArea";
4
+ import Email from "@/icons/general/email";
5
+ import React, { memo, useState } from "react";
6
+
7
+ const MemoAmirHossein = () => {
8
+ const [inputValue, setInputValue] = useState<string>("");
9
+ const [textAreaValue, setTextAreaValue] = useState<string>("");
10
+
11
+ const inputHandler = (e: React.ChangeEvent<HTMLInputElement>) => {
12
+ setInputValue(e.target.value);
13
+ };
14
+
15
+ const textareaHandler = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
16
+ setTextAreaValue(e.target.value);
17
+ };
18
+
19
+ return (
20
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 w-full">
21
+ <Input
22
+ size="sm"
23
+ type="email"
24
+ label="Email"
25
+ required={true}
26
+ placeholder="Enter your password"
27
+ onChange={inputHandler}
28
+ className="w-full"
29
+ value={inputValue}
30
+ name="email"
31
+ icon={Email}
32
+ inputType="iconLeading"
33
+ />
34
+
35
+ <Input
36
+ size="sm"
37
+ type="password"
38
+ inputType="default"
39
+ label="Password"
40
+ required={true}
41
+ placeholder="Enter your password"
42
+ onChange={inputHandler}
43
+ className="w-full"
44
+ value={inputValue}
45
+ name="password"
46
+ />
47
+
48
+ <Input
49
+ tooltipProps={{
50
+ text: "This is a tooltip",
51
+ description:
52
+ "Tooltips are used to describe or identify an element. In most scenarios",
53
+ position: "top",
54
+ dir: "ltr",
55
+ descriptionClassName: "max-w-[260px] w-full",
56
+ }}
57
+ destructive={false}
58
+ destructiveText="error text"
59
+ size="sm"
60
+ type="text"
61
+ inputType="trailingDropdown"
62
+ icon={Email}
63
+ label="Email"
64
+ required={true}
65
+ hintText="This is a hint text to help user."
66
+ placeholder="Enter your email"
67
+ // disabled={true}
68
+ helpIcon={true}
69
+ leadingTextValue="http"
70
+ trailingDropdownOptions={[
71
+ { title: "usd", value: 1, icon: "$" },
72
+ { title: "pound", value: 2, icon: "£" },
73
+ { title: "euro", value: 3, icon: "€" },
74
+ ]}
75
+ trailingDropdownDefault={{ title: "usd", value: 1, icon: "$" }}
76
+ onChange={inputHandler}
77
+ className="w-full"
78
+ // className="min-w-[400px] max-w-[400px]"
79
+ // need this value when type is "trailingButton" to copy to clipboard
80
+ value={inputValue}
81
+ trailingButtonText="Copy"
82
+ name="Email"
83
+ />
84
+
85
+ <TextArea
86
+ row={3}
87
+ tooltipProps={{
88
+ text: "This is a tooltip",
89
+ description:
90
+ "Tooltips are used to describe or identify an element. In most scenarios",
91
+ position: "top",
92
+ dir: "ltr",
93
+ descriptionClassName: "max-w-[260px] w-full",
94
+ }}
95
+ // disabled={true}
96
+ // destructive={true}
97
+ destructiveText="This is an error message."
98
+ label="Description"
99
+ helpIcon={true}
100
+ required={true}
101
+ hintText="This is a hint text to help user."
102
+ placeholder="Enter a description..."
103
+ className="w-full"
104
+ onChange={textareaHandler}
105
+ value={textAreaValue}
106
+ name="description"
107
+ autoFocus
108
+ />
109
+
110
+ <InputTags
111
+ tooltipProps={{
112
+ text: "This is a tooltip",
113
+ description:
114
+ "Tooltips are used to describe or identify an element. In most scenarios",
115
+ position: "top",
116
+ dir: "ltr",
117
+ descriptionClassName: "max-w-[260px] w-full",
118
+ }}
119
+ destructive={false}
120
+ destructiveText="error text"
121
+ size="sm"
122
+ label="Tags"
123
+ required={true}
124
+ hintText="This is a hint text to help user."
125
+ placeholder="Enter your tag"
126
+ helpIcon={true}
127
+ onChange={(tags: string[]) => console.log("tags", tags)}
128
+ name="tags"
129
+ />
130
+
131
+ <Input
132
+ size="sm"
133
+ type="number"
134
+ inputType="shaba"
135
+ label="شماره شبا"
136
+ required={true}
137
+ placeholder="شماره شبا را وارد کنید"
138
+ onChange={inputHandler}
139
+ className="w-full"
140
+ value={inputValue}
141
+ name="shaba"
142
+ />
143
+ </div>
144
+ );
145
+ };
146
+
147
+ const AmirHossein = memo(MemoAmirHossein);
148
+
149
+ export default AmirHossein;
@@ -0,0 +1,130 @@
1
+ import { Pagination } from "@/components/Pagination";
2
+ import { Progress } from "@/components/Progress/index";
3
+ import CircleMinues from "@/icons/general/circle-minues";
4
+ import CirclePlus from "@/icons/general/circle-plus";
5
+ import { memo, useState } from "react";
6
+ import { AccordionDemo } from "../Accordion";
7
+ import { Breadcrumb } from "../Breadcrumbs";
8
+ import { Button } from "../Button";
9
+ import { PriceSlider } from "../PriceSlider";
10
+ import { Switch } from "../Switch";
11
+ import { TooltipWrapper } from "../Tooltip";
12
+
13
+ const MemoFardin = () => {
14
+ const [currentPage, setCurrentPage] = useState(1);
15
+ const totalPages = 10;
16
+
17
+
18
+ const handlePageChange = (page: number) => {
19
+ setCurrentPage(page);
20
+ console.log("صفحه تغییر کرد:", page);
21
+ };
22
+ const Breadcrumbs = [
23
+ { title: "دسته بندی", link: "/category" },
24
+ { title: "زیر دسته بندی ", link: "/subcategory" },
25
+ { title: "محصولات", link: "/product" },
26
+ ];
27
+ const faqItems = [
28
+ {
29
+ question: "How can I track my order?",
30
+ answer:
31
+ "You can track your order by logging into your account and navigating to the 'Orders' section where the order status will be displayed.",
32
+ },
33
+ {
34
+ question: "Can I return a product?",
35
+ answer:
36
+ "Yes, you can request a return within 7 days of receiving the product, as long as it is unused and in its original packaging.",
37
+ },
38
+ {
39
+ question: "How is the shipping cost calculated?",
40
+ answer:
41
+ "Shipping cost is calculated based on your location and the weight of your package. It will be shown during checkout.",
42
+ },
43
+ {
44
+ question: "What payment methods are available?",
45
+ answer:
46
+ "We accept online payments, bank transfers, and cash on delivery (COD) depending on your location.",
47
+ },
48
+ {
49
+ question: "How can I reset my password?",
50
+ answer:
51
+ "Click on the 'Forgot password?' link on the login page and follow the instructions to reset your password via email.",
52
+ },
53
+ ];
54
+
55
+ return (
56
+ <>
57
+ <Progress
58
+ value={90}
59
+ indicatorVariant="bg-rfg-brand-primary-600"
60
+ backgroundVariant="bg-rbg-quaternary"
61
+ />
62
+ <Progress
63
+ type="half-circle"
64
+ value={90}
65
+ label={70}
66
+ size="md"
67
+ strokeWidth={12}
68
+ indicatorVariant="stroke-rose-500"
69
+ svgClassName="rotate-[0deg]"
70
+ />
71
+
72
+ <Switch
73
+ id="switch"
74
+ label="مرا به خاطر بسپار"
75
+ description="جزئیات ورود من را برای دفعه بعد ذخیره کن."
76
+ onToggle={() => alert("تغییر وضعیت سوئیچ")}
77
+ />
78
+ <TooltipWrapper
79
+ content="This is a tooltip"
80
+ description="Tooltips are used to describe or identify an element. In most scenarios, tooltips help the user understand meaning, function or alt-text."
81
+ position="top"
82
+ dir="ltr"
83
+ descriptionClassName="max-w-[260px] w-full"
84
+ >
85
+ <Button>نمایش TooltipWrapper</Button>
86
+ </TooltipWrapper>
87
+ <Breadcrumb breadCrumbLink={Breadcrumbs} dir="ltr" />
88
+ <div className="mt-6">
89
+ <AccordionDemo
90
+ items={faqItems}
91
+ accordionClassName="border border-white rounded-md bg-white p-6"
92
+ itemClassName="border-b border-gray-200"
93
+ questionClassName="text-lg font-bold text-blue-700"
94
+ answerClassName="text-sm text-gray-600"
95
+ type="single"
96
+ iconClosed={CirclePlus}
97
+ iconOpen={CircleMinues}
98
+ collapsible={true}
99
+ />
100
+ <div className="mt-6">
101
+ <PriceSlider
102
+ min={0}
103
+ max={10000000}
104
+ defaultValue={[1000000, 5000000]}
105
+ onValueChange={(range) => console.log("انتخاب شده:", range)}
106
+ showValue
107
+ className="w-[500px]"
108
+
109
+ />
110
+ </div>
111
+ <div className="mt-10">
112
+ <Pagination
113
+ currentPage={currentPage}
114
+ totalPages={totalPages}
115
+ onPageChange={handlePageChange}
116
+ activeClassName="bg-brand-700 border-brand-700 text-white"
117
+ hasText={false}
118
+ showFirstLast={false}
119
+ // dir="rtl"
120
+ // type="card-button-group-right-aligned"
121
+ // hasText={false}
122
+ />
123
+ </div>
124
+ </div>
125
+ </>
126
+ );
127
+ };
128
+
129
+ const Fardin = memo(MemoFardin);
130
+ export default Fardin;
@@ -0,0 +1,260 @@
1
+ import { memo, useState } from "react";
2
+
3
+ import MasterCard from "@/icons/general/master-card";
4
+ import { Checkbox } from "../Checkbox";
5
+ import { PaymentCard } from "../CheckboxGroup/PaymentCard/index";
6
+ import { PlanCard } from "../CheckboxGroup/PlanCard";
7
+ import { UserCard } from "../CheckboxGroup/UserCard";
8
+ import IconWrapper from "../ui/icon-wrapper";
9
+ import { Radio } from "../Radio";
10
+
11
+ const MemoMaryam = () => {
12
+ const [radio, setRadio] = useState("radio1");
13
+ const [simpleRadio, setSimpleRadio] = useState("radio1");
14
+ const [checkedValues, setChecked] = useState<string[]>([]);
15
+ const handleChangeCheckbox = (value: string) => {
16
+ setChecked((prev) =>
17
+ prev.includes(value) ? prev.filter((v) => v !== value) : [...prev, value]
18
+ );
19
+ };
20
+ const handleChangeRadio = (value: string) => {
21
+ setRadio(value);
22
+ };
23
+
24
+ return (
25
+ <div className=" gap-2 grid grid-cols-4">
26
+ <div className="space-y-2 [&>*]:space-y-2">
27
+ <div className="space-x-2">
28
+ <Checkbox
29
+ id={"5"}
30
+ value={"value"}
31
+ label="چکباکس"
32
+ size={"md"}
33
+ name="checkbox-plan-card-8"
34
+ checkboxIndex={6}
35
+ checked={checkedValues.includes("checkbox-plan-card-8")}
36
+ onChange={() => handleChangeCheckbox("checkbox-plan-card-8")}
37
+ />
38
+ </div>
39
+ <div>
40
+ plan card radio
41
+ <PlanCard
42
+ type="radio"
43
+ checkboxIndex={20}
44
+ title={"Basic Plan"}
45
+ price={"$20"}
46
+ per={"month"}
47
+ size={"md"}
48
+ headerTitle={"Subscribe to newsletter"}
49
+ description={
50
+ "Get the latest updates} articles} and promotions delivered to your inbox."
51
+ }
52
+ badgeContent={"limited time only"}
53
+ value={"basic-plan2"}
54
+ checked={radio === "radio2"}
55
+ onChange={() => handleChangeRadio("radio2")}
56
+ />
57
+ <PlanCard
58
+ type="radio"
59
+ checkboxIndex={19}
60
+ title={"Basic Plan"}
61
+ price={"$20"}
62
+ per={"month"}
63
+ size={"md"}
64
+ headerTitle={"Subscribe to newsletter"}
65
+ description={
66
+ "Get the latest updates} articles} and promotions delivered to your inbox."
67
+ }
68
+ badgeContent={"limited time only"}
69
+ value={"basic-plan2"}
70
+ checked={radio === "radio3"}
71
+ onChange={() => handleChangeRadio("radio3")}
72
+ />
73
+ </div>
74
+ <div>
75
+ plan card basic checkbox
76
+ <PlanCard
77
+ checkboxIndex={18}
78
+ title={"Basic Plan"}
79
+ price={"$250"}
80
+ per={"month"}
81
+ hasHeader={true}
82
+ size={"md"}
83
+ headerTitle={"Subscribe to newsletter"}
84
+ description={
85
+ "Get the latest updates articles and promotions delivered to your inbox."
86
+ }
87
+ badgeContent={"limited time only"}
88
+ id={"checkbox-plan-card-1"}
89
+ value={"checkbox-plan-card-1"}
90
+ checked={checkedValues.includes("checkbox-plan-card-1")}
91
+ onChange={() => handleChangeCheckbox("checkbox-plan-card-1")}
92
+ onCardClick={() => handleChangeCheckbox("checkbox-plan-card-1")}
93
+ />
94
+ <PlanCard
95
+ checkboxIndex={8}
96
+ title={"Basic Plan"}
97
+ price={"$20"}
98
+ per={"month"}
99
+ hasHeader={true}
100
+ size={"md"}
101
+ headerTitle={"Subscribe to newsletter"}
102
+ description={
103
+ "Get the latest updates articles and promotions delivered to your inbox."
104
+ }
105
+ badgeContent={"limited time only"}
106
+ id={"checkbox-plan-card-2"}
107
+ value={"checkbox-plan-card-2"}
108
+ checked={checkedValues.includes("checkbox-plan-card-2")}
109
+ onChange={() => handleChangeCheckbox("checkbox-plan-card-2")}
110
+ onCardClick={() => handleChangeCheckbox("checkbox-plan-card-2")}
111
+ />
112
+ </div>
113
+ <div>
114
+ payment Card radio
115
+ <PaymentCard
116
+ type="radio"
117
+ size="sm"
118
+ value="radio2"
119
+ name="radio-group"
120
+ title="title"
121
+ checkboxIndex={16}
122
+ onChange={(e) => setRadio(e.target.value)}
123
+ cardOnclick={() => setRadio("radio2")}
124
+ checked={radio === "radio2"}
125
+ icon={
126
+ <IconWrapper
127
+ className="!h-8 !w-[46px]"
128
+ data-testid="icon-wrapper"
129
+ >
130
+ <MasterCard />
131
+ </IconWrapper>
132
+ }
133
+ description="Expiry 06/2024"
134
+ footer={
135
+ <div className="text-muted-foreground gap-3 text-sm font-semibold flex">
136
+ <span>set as default</span>
137
+ <span className="text-brand-700">Edit</span>
138
+ </div>
139
+ }
140
+ />
141
+ <PaymentCard
142
+ type="radio"
143
+ size="sm"
144
+ value="radio1"
145
+ name="radio-group"
146
+ title="title"
147
+ checkboxIndex={15}
148
+ onChange={(e) => setRadio(e.target.value)}
149
+ cardOnclick={() => setRadio("radio1")}
150
+ checked={radio === "radio1"}
151
+ // disabled
152
+ icon={
153
+ <IconWrapper
154
+ className="!h-8 !w-[46px]"
155
+ data-testid="icon-wrapper"
156
+ >
157
+ <MasterCard />
158
+ </IconWrapper>
159
+ }
160
+ description="Expiry 06/2024"
161
+ footer={
162
+ <div className="text-muted-foreground gap-3 text-sm font-semibold flex">
163
+ <span>set as default</span>
164
+ <span className="text-brand-700">Edit</span>
165
+ </div>
166
+ }
167
+ />
168
+ </div>
169
+ <div>
170
+ user Card radio
171
+ <UserCard
172
+ size="sm"
173
+ checkboxIndex={14}
174
+ id="id"
175
+ name="card-group"
176
+ username="@maryam"
177
+ description="product manager,contacts"
178
+ type="radio"
179
+ userFullName="maria ebrahimi"
180
+ value="user-radio1"
181
+ checked={radio === "user-radio1"}
182
+ onChange={(e) => setRadio(e.target.value)}
183
+ cardOnclick={() => setRadio("user-radio1")}
184
+ />
185
+ <UserCard
186
+ size="sm"
187
+ checkboxIndex={60}
188
+ id="id2"
189
+ name="card-group"
190
+ userFullName="maria ebrahimi"
191
+ username="@maryam"
192
+ description="product manager,contacts"
193
+ type="radio"
194
+ value="user-radio2"
195
+ onChange={(e) => setRadio(e.target.value)}
196
+ checked={radio === "user-radio2"}
197
+ cardOnclick={() => setRadio("user-radio2")}
198
+ />
199
+ </div>
200
+ <div>
201
+ user Card checkbox
202
+ <UserCard
203
+ size="sm"
204
+ checkboxIndex={55}
205
+ id="salam"
206
+ name="card-group-5"
207
+ username="@maryam"
208
+ description="product manager,contacts"
209
+ userFullName="maria ebrahimi"
210
+ value="checkbox--user-card-2"
211
+ checked={checkedValues.includes("checkbox--user-card-2")}
212
+ onChange={(e) => handleChangeCheckbox(e.target.value)}
213
+ cardOnclick={() => handleChangeCheckbox("checkbox--user-card-2")}
214
+ />
215
+ <UserCard
216
+ size="sm"
217
+ checkboxIndex={65}
218
+ id="salame2"
219
+ name="card-group-5"
220
+ userFullName="maria ebrahimi"
221
+ username="@maryam"
222
+ description="product manager,contacts"
223
+ value="checkbox--user-card-1"
224
+ onChange={(e) => handleChangeCheckbox(e.target.value)}
225
+ checked={checkedValues.includes("checkbox--user-card-1")}
226
+ cardOnclick={() => handleChangeCheckbox("checkbox--user-card-1")}
227
+ />
228
+ </div>
229
+ this is radio
230
+ <div>
231
+ radio
232
+ <Radio
233
+ id="radio-option-1"
234
+ size="sm"
235
+ name="radio-group2"
236
+ value="radio1"
237
+ checked={simpleRadio === "radio1"}
238
+ onChange={(e) => setSimpleRadio(e.target.value)}
239
+ >
240
+ Option 1
241
+ </Radio>
242
+ <Radio
243
+ id="radio-option-2"
244
+ size="sm"
245
+ name="radio-group2"
246
+ value="radio2"
247
+ checked={simpleRadio === "radio2"}
248
+ onChange={(e) => setSimpleRadio(e.target.value)}
249
+ >
250
+ Option 2
251
+ </Radio>
252
+ </div>
253
+ </div>
254
+ </div>
255
+ );
256
+ };
257
+
258
+ const Maryam = memo(MemoMaryam);
259
+
260
+ export default Maryam;