abrplus-ui-kit 1.0.6 → 1.0.8

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 (55) hide show
  1. package/dist/antOverrides.cjs.js +1 -127
  2. package/dist/antOverrides.es.js +70 -98
  3. package/dist/atoms.cjs.js +1 -391
  4. package/dist/atoms.es.js +252 -306
  5. package/dist/colors-BDQwGpaB.cjs +5 -0
  6. package/dist/{colors-CztsZ6e_.js → colors-BW-NR0oP.js} +30 -34
  7. package/dist/deepMerge-2zqLIrFM.cjs +1 -0
  8. package/dist/deepMerge-Dm_AZi0Z.js +14 -0
  9. package/dist/index-B1HRk2-g.cjs +1 -0
  10. package/dist/index-BCH1vT85.js +8 -0
  11. package/dist/index-BJmt8SSx.cjs +1 -0
  12. package/dist/index-BPqX2Hsu.js +75 -0
  13. package/dist/{index-DqFzpRuD.cjs → index-BRLLsEKX.js} +20169 -19477
  14. package/dist/index-BeP9-mrf.js +200 -0
  15. package/dist/index-Bpx-uyOR.cjs +1 -0
  16. package/dist/index-CpGdrWps.js +19 -0
  17. package/dist/index-CwKyw6uN.cjs +1 -0
  18. package/dist/index-CzPs2mPX.js +478 -0
  19. package/dist/index-QraJKad8.cjs +1 -0
  20. package/dist/index-R9oQ5kp6.js +1569 -0
  21. package/dist/index-bNh4-ggT.cjs +1 -0
  22. package/dist/index-lDQ4dr86.cjs +1 -0
  23. package/dist/index.cjs.js +1 -109
  24. package/dist/index.css +1 -1519
  25. package/dist/index.es.js +5 -5
  26. package/dist/index2.css +1 -3
  27. package/dist/molecules.cjs.js +8 -7826
  28. package/dist/molecules.es.js +4270 -6306
  29. package/dist/organisms.cjs.js +1 -940
  30. package/dist/organisms.es.js +651 -758
  31. package/dist/provider.cjs.js +1 -48
  32. package/dist/provider.es.js +29 -34
  33. package/dist/sortable.esm-BSCvBWLi.js +2943 -0
  34. package/dist/sortable.esm-CA8VbUF-.cjs +5 -0
  35. package/dist/theme.css +1 -102
  36. package/dist/types/components/atoms/icon/constants/iconNames.d.ts +1 -1
  37. package/package.json +3 -3
  38. package/dist/colors-TPZkyKI4.cjs +0 -2212
  39. package/dist/deepMerge-CG1he8ZD.js +0 -20
  40. package/dist/deepMerge-Cn27K7-s.cjs +0 -19
  41. package/dist/index-Bknzi7oo.js +0 -266
  42. package/dist/index-BvegjQUf.js +0 -90
  43. package/dist/index-Bvu3tjZA.js +0 -37331
  44. package/dist/index-CCvWoynu.cjs +0 -12
  45. package/dist/index-CIBuPhXl.cjs +0 -1629
  46. package/dist/index-C_d8YZwK.js +0 -28
  47. package/dist/index-Ck1A1Vbk.js +0 -543
  48. package/dist/index-DKwKBp9E.cjs +0 -265
  49. package/dist/index-DLUd_0LP.js +0 -13
  50. package/dist/index-DTnBytzT.cjs +0 -89
  51. package/dist/index-DvjH6QYq.cjs +0 -542
  52. package/dist/index-ITeOhLPx.js +0 -1630
  53. package/dist/index-vJLaOgWn.cjs +0 -27
  54. package/dist/sortable.esm-CJ4hbOQu.js +0 -3873
  55. package/dist/sortable.esm-grhzbi7z.cjs +0 -3872
@@ -1,542 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const index = require("./index-DqFzpRuD.cjs");
4
- const colors = require("./colors-TPZkyKI4.cjs");
5
- const tailwindMerge = require("tailwind-merge");
6
- function uncapitalize(value) {
7
- return value.slice(0, 1).toLowerCase() + value.slice(1);
8
- }
9
- function batch(components) {
10
- const assignees = Object.assign({}, { ...components });
11
- return new Proxy(assignees, {
12
- get(target, property) {
13
- const safeTarget = Object.freeze({
14
- ...target,
15
- [Symbol.toPrimitive]() {
16
- return "Error: Attempted to render object as a JSX";
17
- }
18
- });
19
- if (property in safeTarget) {
20
- return safeTarget[property];
21
- }
22
- const origProperty = uncapitalize(property);
23
- if (origProperty in safeTarget) {
24
- return safeTarget[origProperty];
25
- }
26
- return null;
27
- }
28
- });
29
- }
30
- const TooltipTitle = ({ title, iconName }) => /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { align: "center", gap: 8, children: [
31
- /* @__PURE__ */ jsxRuntime.jsx(index.Text, { size: 14, color: colors.colors.white_ff, children: title }),
32
- iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName })
33
- ] });
34
- const Tooltip = ({ children, title, iconName, ...rest }) => {
35
- return /* @__PURE__ */ jsxRuntime.jsx(
36
- index.Tooltip,
37
- {
38
- title: typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(TooltipTitle, { title, iconName }) : title,
39
- ...rest,
40
- children
41
- }
42
- );
43
- };
44
- const fontSizePicker = {
45
- block: "text-[16px]",
46
- medium: "text-[16px]",
47
- small: "text-[12px]"
48
- };
49
- const paddingPicker = (hasIcon) => ({
50
- start: {
51
- block: `pe-4 ${hasIcon ? "ps-3" : "ps-4"} `,
52
- medium: `pe-4 ${hasIcon ? "ps-3" : "ps-4"} `,
53
- small: `pe-3 ps-[8px]`
54
- },
55
- end: {
56
- block: `ps-4 pe-3`,
57
- medium: `ps-4 pe-3`,
58
- small: `ps-4 pe-3`
59
- }
60
- });
61
- const buttonDefaultClasses = "flex relative select-none w-fit appearance-none flex-row items-center justify-center gap-2 whitespace-nowrap rounded text-center outline-none";
62
- const ActionButton = ({
63
- style,
64
- height,
65
- mode,
66
- children,
67
- iconName,
68
- disabled,
69
- className,
70
- iconPosition = "start",
71
- isLoading,
72
- lang = "fa",
73
- ...rest
74
- }) => {
75
- const appName = colors.AbrplusUIKit.config().getAppName();
76
- const getColor = () => {
77
- if ((disabled || isLoading) && appName) {
78
- if (appName === "home" || appName === "sandbox" || appName === "bi" || appName === "storybook")
79
- return colors.colors["sales"]["action_light_2"];
80
- return colors.colors[appName]["action_light_2"];
81
- }
82
- return colors.colors.white_ff;
83
- };
84
- const getColorClass = () => {
85
- if (!appName) return;
86
- const data = {
87
- bi: tailwindMerge.twMerge("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),
88
- call: tailwindMerge.twMerge("bg-call-action hover:bg-call-action-light-1 active:bg-call-action-dark-1"),
89
- club: tailwindMerge.twMerge("bg-club-action hover:bg-club-action-light-1 active:bg-club-action-dark-1"),
90
- marketing: tailwindMerge.twMerge(
91
- "bg-marketing-action hover:bg-marketing-action-light-1 active:bg-marketing-action-dark-1"
92
- ),
93
- sales: tailwindMerge.twMerge("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),
94
- team: tailwindMerge.twMerge("bg-team-action hover:bg-team-action-light-1 active:bg-team-action-dark-1"),
95
- rayan: tailwindMerge.twMerge("bg-rayan-action hover:bg-rayan-action-light-1 active:bg-rayan-action-dark-1")
96
- };
97
- return data?.[appName] || data["sales"];
98
- };
99
- return /* @__PURE__ */ jsxRuntime.jsxs(
100
- "button",
101
- {
102
- lang,
103
- style: {
104
- height: height || 34,
105
- ...style
106
- },
107
- className: tailwindMerge.twMerge(
108
- "bg-repo disabled:bg-light-6 ",
109
- getColorClass(),
110
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
111
- fontSizePicker[mode || "block"],
112
- buttonDefaultClasses,
113
- mode === "block" && "w-full",
114
- (disabled || isLoading) && "cursor-not-allowed border-light-6",
115
- className
116
- ),
117
- disabled: disabled || isLoading,
118
- ...rest,
119
- children: [
120
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: isLoading, children: /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: 16 }) }) }),
121
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) }),
122
- /* @__PURE__ */ jsxRuntime.jsx(
123
- index.Text,
124
- {
125
- lang,
126
- weight: "medium",
127
- className: fontSizePicker[mode || "block"],
128
- color: getColor(),
129
- children
130
- }
131
- ),
132
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
133
- ]
134
- }
135
- );
136
- };
137
- const IconButton = ({
138
- style,
139
- height = 34,
140
- iconName,
141
- disabled,
142
- className,
143
- iconPosition = "start",
144
- iconProps,
145
- color,
146
- ...rest
147
- }) => {
148
- return /* @__PURE__ */ jsxRuntime.jsx(
149
- "button",
150
- {
151
- style: {
152
- height,
153
- ...style
154
- },
155
- className: tailwindMerge.twMerge(
156
- buttonDefaultClasses,
157
- "h-[34px] w-[34px] p-4",
158
- "bg-light-1 border-primary-light-3 border",
159
- "hover:bg-white-ff hover:border-primary-light-2",
160
- "active:bg-light-6 active:border-primary-light-2",
161
- "disabled:text-primary-light-2 disabled:bg-light-6 disabled:border-light-6",
162
- disabled && "border-light-6 cursor-not-allowed",
163
- className
164
- ),
165
- disabled,
166
- ...rest,
167
- children: iconProps?.renderIcon ? iconProps.renderIcon : /* @__PURE__ */ jsxRuntime.jsx(
168
- index.Icon,
169
- {
170
- name: iconName,
171
- color: disabled ? colors.colors.primary_light_3 : color ?? colors.colors.primary,
172
- ...iconProps
173
- }
174
- )
175
- }
176
- );
177
- };
178
- const NegativeButton = ({
179
- style,
180
- height,
181
- mode,
182
- children,
183
- iconName,
184
- disabled,
185
- className,
186
- iconPosition = "start",
187
- isLoading,
188
- lang = "fa",
189
- variant = "outline",
190
- // Default variant
191
- ...rest
192
- }) => {
193
- const getColor = () => {
194
- if (disabled || isLoading) {
195
- return colors.colors.primary_light_2;
196
- } else if (variant === "contain") {
197
- return colors.colors.white_ff;
198
- }
199
- return colors.colors.negative;
200
- };
201
- const outlineClasses = "hover:bg-negative-light-1 active:bg-negative-dark-1 [&_p]:hover:!text-white-ff [&_*]:hover:fill-white-ff disabled:bg-light-6 bg-transparent border-negative hover:border-negative-light-1 active:border-negative-dark-1 disabled:light-6 border-[2px] border-solid";
202
- const containClasses = "bg-negative hover:bg-negative-light-1 active:bg-negative-dark-1 disabled:bg-light-6 border-transparent";
203
- const buttonVariantClasses = variant === "contain" ? containClasses : outlineClasses;
204
- return /* @__PURE__ */ jsxRuntime.jsxs(
205
- "button",
206
- {
207
- lang,
208
- style: {
209
- height: height || 34,
210
- ...style
211
- },
212
- className: tailwindMerge.twMerge(
213
- buttonDefaultClasses,
214
- buttonVariantClasses,
215
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
216
- fontSizePicker[mode || "block"],
217
- (disabled || isLoading) && "cursor-not-allowed",
218
- className
219
- ),
220
- disabled: disabled || isLoading,
221
- ...rest,
222
- children: [
223
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: isLoading, children: /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: 16 }) }) }),
224
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(
225
- index.Icon,
226
- {
227
- name: iconName,
228
- className: tailwindMerge.twMerge(fontSizePicker[mode || "block"]),
229
- color: getColor()
230
- }
231
- ) }),
232
- /* @__PURE__ */ jsxRuntime.jsx(index.Text, { weight: "medium", size: 16, color: getColor(), lang, children }),
233
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
234
- ]
235
- }
236
- );
237
- };
238
- const PrimaryButton = ({
239
- style,
240
- height = 34,
241
- mode,
242
- children,
243
- iconName,
244
- disabled,
245
- className,
246
- iconPosition = "start",
247
- isLoading,
248
- lang = "fa",
249
- textSize,
250
- ...rest
251
- }) => {
252
- const getColor = () => {
253
- if (disabled || isLoading) {
254
- return colors.colors.primary_light_2;
255
- }
256
- return colors.colors.white_ff;
257
- };
258
- return /* @__PURE__ */ jsxRuntime.jsxs(
259
- "button",
260
- {
261
- lang,
262
- style: { height, ...style },
263
- className: tailwindMerge.twMerge(
264
- "bg-primary hover:bg-primary-light-1 active:bg-primary-dark-1 disabled:bg-light-6",
265
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
266
- fontSizePicker[mode || "block"],
267
- buttonDefaultClasses,
268
- mode === "block" && "w-full",
269
- (disabled || isLoading) && "cursor-not-allowed border-light-6",
270
- className
271
- ),
272
- disabled: disabled || isLoading,
273
- ...rest,
274
- children: [
275
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: isLoading, children: /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: 16 }) }) }),
276
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) }),
277
- /* @__PURE__ */ jsxRuntime.jsx(
278
- index.Text,
279
- {
280
- lang,
281
- weight: "medium",
282
- className: tailwindMerge.twMerge(
283
- "text-white-ff",
284
- (disabled || isLoading) && "text-primary-light-2",
285
- fontSizePicker[mode || "block"]
286
- ),
287
- size: textSize,
288
- children
289
- }
290
- ),
291
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
292
- ]
293
- }
294
- );
295
- };
296
- const SecondaryButton = ({
297
- style,
298
- height = 34,
299
- mode,
300
- children,
301
- iconName,
302
- disabled,
303
- className,
304
- iconPosition = "start",
305
- isLoading,
306
- lang = "fa",
307
- ...rest
308
- }) => {
309
- const getColor = () => {
310
- if (disabled || isLoading) {
311
- return colors.colors.primary_light_2;
312
- }
313
- return colors.colors.primary;
314
- };
315
- return /* @__PURE__ */ jsxRuntime.jsxs(
316
- "button",
317
- {
318
- lang,
319
- style: { height, ...style },
320
- className: tailwindMerge.twMerge(
321
- "bg-transparent hover:bg-primary-light-1 active:bg-primary-dark-1 disabled:bg-light-6 [&_p]:text-primary [&_p]:hover:text-white-ff [&_svg]:hover:!fill-white-ff",
322
- "border-[2px] border-solid border-primary hover:border-primary-light-1 active:border-primary-dark-1 disabled:bg-light-6",
323
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
324
- fontSizePicker[mode || "block"],
325
- buttonDefaultClasses,
326
- (disabled || isLoading) && "cursor-not-allowed",
327
- className
328
- ),
329
- disabled: disabled || isLoading,
330
- ...rest,
331
- children: [
332
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: isLoading, children: /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: 16 }) }) }),
333
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) }),
334
- /* @__PURE__ */ jsxRuntime.jsx(index.Text, { lang, weight: "medium", className: fontSizePicker[mode || "block"], children }),
335
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
336
- ]
337
- }
338
- );
339
- };
340
- const SecondaryQuietButton = ({
341
- style,
342
- height,
343
- mode,
344
- children,
345
- iconName,
346
- disabled,
347
- className,
348
- iconPosition = "start",
349
- isLoading,
350
- lang = "fa",
351
- ...rest
352
- }) => {
353
- const getColor = () => {
354
- if (disabled || isLoading) {
355
- return colors.colors.primary_light_2;
356
- }
357
- return colors.colors.primary;
358
- };
359
- return /* @__PURE__ */ jsxRuntime.jsxs(
360
- "button",
361
- {
362
- lang,
363
- style: {
364
- height: height || 34,
365
- ...style
366
- },
367
- className: tailwindMerge.twMerge(
368
- "hover:bg-light-6 active:bg-light-7 disabled:light-6 bg-transparent",
369
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
370
- fontSizePicker[mode || "block"],
371
- buttonDefaultClasses,
372
- (disabled || isLoading) && "cursor-not-allowed ",
373
- className
374
- ),
375
- disabled: disabled || isLoading,
376
- ...rest,
377
- children: [
378
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) }),
379
- /* @__PURE__ */ jsxRuntime.jsx(
380
- index.Text,
381
- {
382
- lang,
383
- weight: "medium",
384
- className: fontSizePicker[mode || "block"],
385
- color: getColor(),
386
- children
387
- }
388
- ),
389
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
390
- ]
391
- }
392
- );
393
- };
394
- const TertiaryButton = ({
395
- style,
396
- height,
397
- mode,
398
- children,
399
- iconName,
400
- disabled,
401
- className,
402
- iconPosition = "start",
403
- isLoading,
404
- lang = "fa",
405
- ...rest
406
- }) => {
407
- const getColor = () => {
408
- if (disabled || isLoading) {
409
- return colors.colors.primary_light_2;
410
- }
411
- return colors.colors.primary_dark_1;
412
- };
413
- return /* @__PURE__ */ jsxRuntime.jsxs(
414
- "button",
415
- {
416
- lang,
417
- style: {
418
- height: height || 34,
419
- ...style
420
- },
421
- className: tailwindMerge.twMerge(
422
- "bg-light-1 hover:bg-white-ff active:light-6 disabled:light-6",
423
- "border-primary-light-3 hover:border-primary-light-2 active:bg-primary-light-2 disabled:light-6 border-[1px] border-solid",
424
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
425
- fontSizePicker[mode || "block"],
426
- buttonDefaultClasses,
427
- (disabled || isLoading) && "cursor-not-allowed",
428
- className
429
- ),
430
- disabled: disabled || isLoading,
431
- ...rest,
432
- children: [
433
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) }),
434
- /* @__PURE__ */ jsxRuntime.jsx(
435
- index.Text,
436
- {
437
- lang,
438
- weight: "medium",
439
- className: fontSizePicker[mode || "block"],
440
- color: getColor(),
441
- children
442
- }
443
- ),
444
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(index.Icon, { name: iconName, className: fontSizePicker[mode || "block"], color: getColor() }) })
445
- ]
446
- }
447
- );
448
- };
449
- const TextButton = ({
450
- style,
451
- height = 34,
452
- mode,
453
- children,
454
- iconName,
455
- disabled,
456
- className,
457
- iconPosition = "start",
458
- isLoading,
459
- lang = "fa",
460
- underline,
461
- textProps,
462
- startIconSize,
463
- endIconSize,
464
- ...rest
465
- }) => {
466
- const getColor = () => {
467
- if (disabled || isLoading) {
468
- return colors.colors.primary_light_2;
469
- }
470
- return colors.colors.black;
471
- };
472
- return /* @__PURE__ */ jsxRuntime.jsxs(
473
- "button",
474
- {
475
- lang,
476
- style: { height, ...style },
477
- className: tailwindMerge.twMerge(
478
- "disabled:bg-light-6 border-none hover:bg-none focus:bg-none",
479
- paddingPicker(!!iconName)[iconPosition][mode || "block"],
480
- fontSizePicker[mode || "block"],
481
- buttonDefaultClasses,
482
- mode === "block" && "w-full",
483
- (disabled || isLoading) && "border-light-6 cursor-not-allowed",
484
- className
485
- ),
486
- disabled: disabled || isLoading,
487
- ...rest,
488
- children: [
489
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: isLoading, children: /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { className: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(index.Loading, { isLoading: true, size: 16 }) }) }),
490
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "start", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(
491
- index.Icon,
492
- {
493
- size: startIconSize,
494
- name: iconName,
495
- className: fontSizePicker[mode || "block"],
496
- color: getColor()
497
- }
498
- ) }),
499
- /* @__PURE__ */ jsxRuntime.jsx(
500
- index.Text,
501
- {
502
- lang,
503
- weight: "medium",
504
- className: tailwindMerge.twMerge(
505
- (disabled || isLoading) && "text-primary-light-2",
506
- fontSizePicker[mode || "block"],
507
- underline && "underline"
508
- ),
509
- ...textProps,
510
- children
511
- }
512
- ),
513
- /* @__PURE__ */ jsxRuntime.jsx(index.Render, { when: iconPosition === "end", children: iconName && /* @__PURE__ */ jsxRuntime.jsx(
514
- index.Icon,
515
- {
516
- size: endIconSize,
517
- name: iconName,
518
- className: fontSizePicker[mode || "block"],
519
- color: getColor()
520
- }
521
- ) })
522
- ]
523
- }
524
- );
525
- };
526
- const Button = batch({
527
- Primary: PrimaryButton,
528
- Secondary: SecondaryButton,
529
- Tertiary: TertiaryButton,
530
- SecondaryQuiet: SecondaryQuietButton,
531
- Icon: IconButton,
532
- Negative: NegativeButton,
533
- Action: ActionButton,
534
- Text: TextButton
535
- });
536
- exports.Button = Button;
537
- exports.IconButton = IconButton;
538
- exports.Tooltip = Tooltip;
539
- exports.batch = batch;
540
- exports.buttonDefaultClasses = buttonDefaultClasses;
541
- exports.fontSizePicker = fontSizePicker;
542
- exports.paddingPicker = paddingPicker;