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,431 @@
1
+ import { memo, useState } from "react";
2
+ import { Badge } from "../Badge";
3
+ import { Circle, ArrowUpRight, VerifiedIcon } from "lucide-react";
4
+ import { Avatar } from "../Avatar";
5
+ import { Tabs } from "../Tabs";
6
+ import { FileUploader } from "../FileUpload";
7
+ import { Metrics } from "../Metric";
8
+ import { Message } from "../Message";
9
+ import { FileContent } from "../ui/file-content/File-content";
10
+ import { UnkownFormat } from "@/icons/general/unkown-format";
11
+ import { Dropdown } from "../Dropdown";
12
+
13
+ const MemoMilad = () => {
14
+ const test = () => {
15
+ document.documentElement.classList.toggle("dark");
16
+ };
17
+ const imageList = [
18
+ {
19
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
20
+ alt: "User 1",
21
+ },
22
+ {
23
+ src: "https://randomuser.me/api/portraits/men/32.jpg",
24
+ alt: "User 2",
25
+ },
26
+ {
27
+ src: "https://randomuser.me/api/portraits/women/25.jpg",
28
+ alt: "User 3",
29
+ },
30
+ {
31
+ src: "https://randomuser.me/api/portraits/men/19.jpg",
32
+ alt: "User 4",
33
+ },
34
+ {
35
+ src: "https://randomuser.me/api/portraits/women/11.jpg",
36
+ alt: "User 5",
37
+ },
38
+ ];
39
+ const [internalOpen, setInternalOpen] = useState(false);
40
+ return (
41
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-1 gap-6">
42
+ <button className="size-20 bg-pink dark:text-white" onClick={test}>
43
+ Click Here
44
+ </button>
45
+ <div className="w-50 h-12 text-rtext-primary-900 bg-utility-gray-dark-50">
46
+ Lorem Ipsum
47
+ </div>
48
+ <Badge size="sm" type="pillColor" color="brand">
49
+ Label
50
+ </Badge>
51
+
52
+ <Metrics
53
+ title="Total Sales"
54
+ value="$32,000"
55
+ icon={<ArrowUpRight className="w-6 h-6 text-green-600" />}
56
+ iconType="secondary"
57
+ iconPosition="topWithTitle"
58
+ statistic={
59
+ <span className="text-xs font-medium text-green-700 bg-green-100 rounded px-2 py-0.5">
60
+ +12%
61
+ </span>
62
+ }
63
+ toggleBtn={
64
+ <button className="text-xs text-rtext-tertiary-600 underline">
65
+ Details
66
+ </button>
67
+ }
68
+ actionBtns={[
69
+ <button
70
+ key="1"
71
+ className="text-sm px-4 py-1.5 bg-rbg-brand-primary text-white rounded-md"
72
+ >
73
+ View
74
+ </button>,
75
+ <button
76
+ key="2"
77
+ className="text-sm px-4 py-1.5 border border-rborder-secondary rounded-md"
78
+ >
79
+ Export
80
+ </button>,
81
+ ]}
82
+ statisticPosition="row-next"
83
+ dir="rtl"
84
+ chartPosition="side"
85
+ chartImg={<img src="./test.png" alt="" />}
86
+ />
87
+
88
+ <Avatar
89
+ type="single"
90
+ size="lg"
91
+ img={{
92
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
93
+ alt: "John",
94
+ }}
95
+ notifyColor="bg-red-500"
96
+ addBtnAction={() => alert("Clicked!")}
97
+ />
98
+ <Avatar
99
+ type="single"
100
+ size="2xl"
101
+ img={{
102
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
103
+ alt: "John",
104
+ }}
105
+ iconBorder={false}
106
+ notifyIcon={<VerifiedIcon />}
107
+ // notifyColor="bg-red-500"
108
+ addBtnAction={() => alert("Clicked!")}
109
+ />
110
+
111
+ {/* 🏷️ Labeled avatar with title and description */}
112
+ <Avatar
113
+ type="single"
114
+ size="md"
115
+ img={{
116
+ src: "https://randomuser.me/api/portraits/women/60.jpg",
117
+ alt: "Emily",
118
+ }}
119
+ notifyColor="bg-red-500"
120
+ title="Emily Johnson"
121
+ description="Product Designer"
122
+ addBtnAction={() => alert("Clicked!")}
123
+ />
124
+
125
+ {/* 👥 Group of avatars */}
126
+ <Avatar
127
+ type="group"
128
+ size="lg"
129
+ imgList={imageList}
130
+ showAmount={3}
131
+ showAddBtn={true}
132
+ addBtnAction={() => alert("Add new user")}
133
+ />
134
+ <Avatar
135
+ type="labled"
136
+ size="xl"
137
+ img={{
138
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
139
+ alt: "John",
140
+ }}
141
+ title="اولیوییا رای"
142
+ description="olivia@untitledui.com"
143
+ iconBorder={false}
144
+ notifyIcon={<VerifiedIcon />}
145
+ // notifyColor="bg-red-500"
146
+ addBtnAction={() => alert("Clicked!")}
147
+ />
148
+
149
+ <div className="w-full" dir="rtl">
150
+ <Tabs defaultValue="account">
151
+ <Tabs.List listVariant="gray" fullWidth={false}>
152
+ <Tabs.Trigger
153
+ value="account"
154
+ triggerVariant="gray"
155
+ fullWidth={true}
156
+ >
157
+ Account
158
+ <Circle />
159
+ </Tabs.Trigger>
160
+ <Tabs.Trigger
161
+ value="password"
162
+ triggerVariant="gray"
163
+ fullWidth={true}
164
+ >
165
+ Export
166
+ <Circle />
167
+ </Tabs.Trigger>
168
+ </Tabs.List>
169
+ <Tabs.Content value="account">
170
+ <div className="">acc</div>
171
+ </Tabs.Content>
172
+ <Tabs.Content value="password">
173
+ <div className="">pass</div>
174
+ </Tabs.Content>
175
+ </Tabs>
176
+ </div>
177
+ <div className="w-full" dir="rtl">
178
+ <Tabs defaultValue="account">
179
+ <Tabs.List listVariant="minimal" fullWidth={false}>
180
+ <Tabs.Trigger
181
+ value="account"
182
+ triggerVariant="minimal"
183
+ fullWidth={true}
184
+ >
185
+ Account
186
+ <Circle />
187
+ </Tabs.Trigger>
188
+ <Tabs.Trigger
189
+ value="password"
190
+ triggerVariant="minimal"
191
+ fullWidth={true}
192
+ >
193
+ Export
194
+ <Circle />
195
+ </Tabs.Trigger>
196
+ </Tabs.List>
197
+ <Tabs.Content value="account">
198
+ <div className="">acc</div>
199
+ </Tabs.Content>
200
+ <Tabs.Content value="password">
201
+ <div className="">pass</div>
202
+ </Tabs.Content>
203
+ </Tabs>
204
+ </div>
205
+ <div className="w-full" dir="rtl">
206
+ <Tabs defaultValue="account">
207
+ <Tabs.List listVariant="outlined" fullWidth={false}>
208
+ <Tabs.Trigger
209
+ value="account"
210
+ triggerVariant="outlined"
211
+ fullWidth={false}
212
+ >
213
+ Account
214
+ <Circle />
215
+ </Tabs.Trigger>
216
+ <Tabs.Trigger
217
+ value="password"
218
+ triggerVariant="outlined"
219
+ fullWidth={false}
220
+ >
221
+ Export
222
+ <Circle />
223
+ </Tabs.Trigger>
224
+ </Tabs.List>
225
+ <Tabs.Content value="account">
226
+ <div className="">acc</div>
227
+ </Tabs.Content>
228
+ <Tabs.Content value="password">
229
+ <div className="">pass</div>
230
+ </Tabs.Content>
231
+ </Tabs>
232
+ </div>
233
+ <div className="w-[400px]">
234
+ <FileUploader
235
+ mainText="برای آپلود کلیک کنید"
236
+ subText="یا بکشید و رها کنید"
237
+ formatText="SVG, PNG, JPG or GIF (max. 800x400px)"
238
+ onChange={() => {}}
239
+ onDelete={(id: number) => {
240
+ console.log(id);
241
+ }}
242
+ items={[
243
+ {
244
+ title: "تصویر_محصول.png",
245
+ progressValue: 75,
246
+ description: "در حال آپلود...",
247
+ percentage: 75,
248
+ error: false,
249
+ size: "1.1 MB",
250
+ status: "uploading",
251
+ id: 1,
252
+ },
253
+ {
254
+ title: "لوگو.svg",
255
+ progressValue: 100,
256
+ description: "آپلود کامل شد",
257
+ percentage: 100,
258
+ error: false,
259
+ size: "220 KB",
260
+ status: "completed",
261
+ id: 2,
262
+ },
263
+ {
264
+ title: "بنر.gif",
265
+ progressValue: 0,
266
+ description: "خطا در آپلود",
267
+ percentage: 0,
268
+ error: true,
269
+ size: "3.2 MB",
270
+ status: "error",
271
+ id: 3,
272
+ },
273
+ {
274
+ title: "بنر.gif",
275
+ progressValue: 0,
276
+ description: "خطا در آپلود",
277
+ percentage: 0,
278
+ error: true,
279
+ size: "3.2 MB",
280
+ status: "error",
281
+ id: 4,
282
+ },
283
+ ]}
284
+ />
285
+ </div>
286
+ <div className="w-1/2 mx-auto flex flex-col gap-12">
287
+ <Message
288
+ variant="gray"
289
+ sender="user"
290
+ senderName="Alice"
291
+ message="Here's the document you asked for"
292
+ date="April 14, 2025"
293
+ avatar={
294
+ <Avatar
295
+ type="single"
296
+ size="md"
297
+ img={{
298
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
299
+ alt: "John",
300
+ }}
301
+ iconBorder={false}
302
+ notifyIcon={false}
303
+ // notifyColor="bg-red-500"
304
+ addBtnAction={() => alert("Clicked!")}
305
+ />
306
+ }
307
+ className=""
308
+ ></Message>
309
+ <Message
310
+ variant="primary"
311
+ sender="admin"
312
+ senderName="Admin"
313
+ message="Lorem,"
314
+ date="April 15, 2025"
315
+ avatar={
316
+ <Avatar
317
+ type="single"
318
+ size="md"
319
+ img={{
320
+ src: "https://randomuser.me/api/portraits/women/44.jpg",
321
+ alt: "John",
322
+ }}
323
+ iconBorder={false}
324
+ notifyIcon={false}
325
+ // notifyColor="bg-red-500"
326
+ addBtnAction={() => alert("Clicked!")}
327
+ />
328
+ }
329
+ children={
330
+ <FileContent
331
+ title="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Egestas purus viverra accumsan in nisl nisi. Arcu cursus vitae congue mauris rhoncus aenean vel elit scelerisque. In egestas erat imperdiet sed euismod nisi porta lorem mollis. Morbi tristique senectus et netus. Mattis pellentesque id nibh tortor id aliquet lectus proin. Sapien faucibus et molestie ac feugiat sed lectus vestibulum. Ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget. Dictum varius duis at consectetur lorem. Nisi vitae suscipit tellus mauris a diam maecenas sed enim. Velit ut tortor pretium viverra suspendisse potenti nullam. Et molestie ac feugiat sed lectus. Non nisi est sit amet facilisis magna. Dignissim diam quis enim lobortis scelerisque fermentum. Odio ut enim blandit volutpat maecenas volutpat. Ornare lectus sit amet est placerat in egestas erat. Nisi vitae suscipit tellus mauris a diam maecenas sed. Placerat duis ultricies lacus sed turpis tincidunt id aliquet."
332
+ size="1.2"
333
+ sizeFormat="mb"
334
+ icon={<UnkownFormat />}
335
+ />
336
+ }
337
+ />
338
+ <div className="flex justify-center items-center ">
339
+ <Dropdown
340
+ direction="down"
341
+ alignment="left"
342
+ toggleBtn={{
343
+ children: <>down left</>,
344
+ }}
345
+ dropDownClassName=" p-4"
346
+ >
347
+ <ul className="space-y-2 text-sm text-gray-700 w-[1000px]">
348
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">
349
+ ProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfileProfile
350
+ </li>
351
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Settings</li>
352
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Logout</li>
353
+ </ul>
354
+ </Dropdown>
355
+ </div>
356
+ <div className="flex justify-center items-center">
357
+ <Dropdown
358
+ direction="down"
359
+ alignment="right"
360
+ toggleBtn={{
361
+ children: <>down right</>,
362
+ }}
363
+ dropDownClassName=" p-4"
364
+ >
365
+ <ul className="space-y-2 text-sm text-gray-700">
366
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Profile</li>
367
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Settings</li>
368
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Logout</li>
369
+ </ul>
370
+ </Dropdown>
371
+ </div>
372
+ <div className="flex justify-center items-center ">
373
+ <Dropdown
374
+ direction="up"
375
+ alignment="left"
376
+ toggleBtn={{
377
+ children: <>up rightawsd</>,
378
+ }}
379
+ dropDownClassName=" p-4"
380
+ >
381
+ <ul className="space-y-2 text-sm text-gray-700 w-64">
382
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Profile</li>
383
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Settings</li>
384
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Logout</li>
385
+ </ul>
386
+ </Dropdown>
387
+ </div>
388
+ <div className="flex justify-center items-center ">
389
+ <Dropdown
390
+ direction="down"
391
+ alignment="right"
392
+ toggleBtn={{
393
+ children: <>up rightawsd</>,
394
+ }}
395
+ dropDownClassName="w-64 p-4"
396
+ autoAdjust={true}
397
+ open={internalOpen}
398
+ onOpenChange={(val: boolean) => setInternalOpen(val)}
399
+ >
400
+ <ul className="space-y-2 text-sm text-gray-700">
401
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Profile</li>
402
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Settings</li>
403
+ <li className="hover:bg-gray-100 px-2 py-1 rounded">Logout</li>
404
+ </ul>
405
+ </Dropdown>
406
+ </div>
407
+ <div className="flex justify-center items-center ">
408
+ <Dropdown
409
+ direction="down"
410
+ alignment="right"
411
+ toggleBtn={{
412
+ variant: "primary",
413
+ size: "sm",
414
+ fullWidth: true,
415
+ // onClick: notificationModalHandler,
416
+ type: "button",
417
+ children: <>down right</>,
418
+ }}
419
+ autoAdjust={false}
420
+ >
421
+ <div className="bg-black w-20 h-20 text-white p-5">123</div>
422
+ </Dropdown>
423
+ </div>
424
+ </div>
425
+ </div>
426
+ );
427
+ };
428
+
429
+ const Milad = memo(MemoMilad);
430
+
431
+ export default Milad;
@@ -0,0 +1,198 @@
1
+ import Activity from "@/icons/general/activity";
2
+ import XClose from "@/icons/general/x-close";
3
+ import { ArrowRight } from "lucide-react";
4
+ import { memo, useState } from "react";
5
+ import { Badge } from "../Badge";
6
+ import { Button } from "../Button";
7
+ import { ImageMagnify } from "../ImageMagnify";
8
+ import { Modal } from "../Modal";
9
+ import { Select } from "../Select";
10
+ import { toast, ToastContainer } from "../Toast";
11
+
12
+ const MemoRasoul = () => {
13
+ const [showModal, setShowModal] = useState(false);
14
+
15
+ const [selectValue, setSelectedValue] = useState(null);
16
+
17
+ const optionsList = [
18
+ { title: "a", value: 1 },
19
+ { title: "b", value: 2 },
20
+ { title: "c", value: 3 },
21
+ { title: "d", value: 4 },
22
+ { title: "e", value: 5 },
23
+ { title: "f", value: 6 },
24
+ { title: "g", value: 7 },
25
+ ];
26
+
27
+ return (
28
+ <div className="w-full flex flex-col gap-4">
29
+ <ToastContainer />
30
+ <Select
31
+ isLoading={false}
32
+ onChange={(val) => setSelectedValue(val?.value)}
33
+ className=""
34
+ // disabled
35
+ tooltipTitle="gio gio"
36
+ tooltipClass=""
37
+ selectedValueLabel={
38
+ optionsList?.find((elem) => elem?.value === selectValue)?.title ?? "-"
39
+ }
40
+ options={optionsList}
41
+ config={{
42
+ name: "gio",
43
+ canSelectZero: true,
44
+ errorText: "gio error",
45
+ isRequiredInput: true,
46
+ label: "gio gio",
47
+ }}
48
+ />
49
+
50
+ <Badge size="sm" type="pillColor" color="brand">
51
+ میلاد پسر رنگ کار مکاری است
52
+ </Badge>
53
+
54
+ <Badge
55
+ type="pillColor"
56
+ color="indigo"
57
+ closable
58
+ onClose={() => alert("closed")}
59
+ >
60
+ برچسب
61
+ </Badge>
62
+ <Badge
63
+ size={"md"}
64
+ type={"badgeColor"}
65
+ dir="rtl"
66
+ color="orange"
67
+ icon={
68
+ <img
69
+ src="/Avatar.png"
70
+ alt="avatar"
71
+ className="w-4 h-4 rounded-full"
72
+ />
73
+ }
74
+ >
75
+ Username
76
+ </Badge>
77
+
78
+ <Button
79
+ variant="primary"
80
+ size="sm"
81
+ leftIcon={<ArrowRight size={16} />}
82
+ onClick={() => toast.error("test")}
83
+ >
84
+ Show Toast
85
+ </Button>
86
+
87
+ <Button variant={"primary"} onClick={() => setShowModal(true)} size="md">
88
+ باز کردن مودال
89
+ </Button>
90
+
91
+ <Modal
92
+ showModal={showModal}
93
+ position="center"
94
+ size="md"
95
+ showCloseIcon={false}
96
+ closeHandler={() => setShowModal(false)}
97
+ modalTitle="مودال تستی"
98
+ icon={
99
+ <div>
100
+ <Activity />
101
+ </div>
102
+ }
103
+ // headerIconDir="flex-row"
104
+ modalContentStyle="gap-4 px-6"
105
+ >
106
+ <hr />
107
+ <h2>ساختار اصلی 25 مودال</h2>
108
+ <p>
109
+ این مودال جریانش اینه که ساختار پایه ایجاد شده و children هرچی باشه
110
+ بهش پاس میدیم فقط
111
+ </p>
112
+ <p>
113
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
114
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
115
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
116
+ magni nulla voluptate, tempora dolores? Sapiente!
117
+ </p>
118
+ <p>
119
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
120
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
121
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
122
+ magni nulla voluptate, tempora dolores? Sapiente!
123
+ </p>
124
+ <p>
125
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
126
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
127
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
128
+ magni nulla voluptate, tempora dolores? Sapiente!
129
+ </p>
130
+ <p>
131
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
132
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
133
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
134
+ magni nulla voluptate, tempora dolores? Sapiente!
135
+ </p>
136
+ <p>
137
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
138
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
139
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
140
+ magni nulla voluptate, tempora dolores? Sapiente!
141
+ </p>
142
+ <p>
143
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
144
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
145
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
146
+ magni nulla voluptate, tempora dolores? Sapiente!
147
+ </p>
148
+ <p>
149
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
150
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
151
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
152
+ magni nulla voluptate, tempora dolores? Sapiente!
153
+ </p>
154
+ <p>
155
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
156
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
157
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
158
+ magni nulla voluptate, tempora dolores? Sapiente!
159
+ </p>
160
+ <p>
161
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
162
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
163
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
164
+ magni nulla voluptate, tempora dolores? Sapiente!
165
+ </p>
166
+ <p>
167
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi
168
+ molestias incidunt labore porro quibusdam, reprehenderit reiciendis
169
+ ipsam veritatis nam deserunt tenetur dolore, delectus consectetur
170
+ magni nulla voluptate, tempora dolores? Sapiente!
171
+ </p>
172
+ <hr />
173
+ <div className="py-4 flex justify-end sticky bottom-0 bg-white">
174
+ <Button
175
+ variant="secondaryColor"
176
+ size="sm"
177
+ leftIcon={<XClose stroke="blue" />}
178
+ onClick={() => setShowModal(false)}
179
+ >
180
+ بستن
181
+ </Button>
182
+ </div>
183
+ </Modal>
184
+
185
+ <ImageMagnify
186
+ src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400&h=300&fit=crop"
187
+ zoom={2}
188
+ zoomPanePosition="left"
189
+ lensSize={140}
190
+ touchToggle={true}
191
+ />
192
+ </div>
193
+ );
194
+ };
195
+
196
+ const Rasoul = memo(MemoRasoul);
197
+
198
+ export default Rasoul;
@@ -0,0 +1,28 @@
1
+ export * from "./Accordion";
2
+ export * from "./Avatar";
3
+ export * from "./Badge";
4
+ export * from "./Breadcrumbs";
5
+ export * from "./Button";
6
+ export * from "./Checkbox";
7
+ export * from "./CheckboxGroup/PaymentCard";
8
+ export * from "./CheckboxGroup/PlanCard";
9
+ export * from "./CheckboxGroup/UserCard";
10
+ export * from "./Dropdown";
11
+ export * from "./FileUpload";
12
+ export * from "./ImageMagnify";
13
+ export * from "./Input";
14
+ export * from "./Message";
15
+ export * from "./Metric";
16
+ export * from "./Modal";
17
+ export * from "./Pagination";
18
+ export * from "./PriceSlider";
19
+ export * from "./Progress";
20
+ export * from "./Radio";
21
+ export * from "./Select";
22
+ export * from "./Switch";
23
+ export * from "./Tabs";
24
+ export * from "./Tag";
25
+ export * from "./TextArea";
26
+ export * from "./Toast";
27
+ export * from "./Tooltip";
28
+