bonkers-ui 2.0.2 → 2.0.4
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.
- package/README.md +25 -40
- package/_types/colors.d.ts +2 -0
- package/_types/colors.js +1 -1
- package/_types/colors.js.map +1 -1
- package/assets/UiBerRank.css +1 -0
- package/assets/UiButton.css +0 -0
- package/assets/UiCheckbox.css +1 -0
- package/assets/UiInputRange.css +1 -0
- package/assets/UiRadio.css +1 -0
- package/assets/UiSelect.css +1 -0
- package/assets/UiToggle.css +1 -0
- package/bonkers.css +243 -0
- package/components/UiAccordion/UiAccordion.InfoDropdown.js +31 -0
- package/components/UiAccordion/UiAccordion.InfoDropdown.js.map +1 -0
- package/components/UiAccordion/UiAccordion.base.js +13 -0
- package/components/UiAccordion/UiAccordion.base.js.map +1 -0
- package/components/UiAccordion/UiAccordion.context.js +39 -0
- package/components/UiAccordion/UiAccordion.context.js.map +1 -0
- package/components/UiAccordion/UiAccordionItem.base.js +43 -0
- package/components/UiAccordion/UiAccordionItem.base.js.map +1 -0
- package/components/UiAccordion/_types.js +5 -0
- package/components/UiAccordion/_types.js.map +1 -0
- package/components/UiAccordion/index.d.ts +1 -0
- package/components/UiAccordion/index.js +13 -0
- package/{index.js.map → components/UiAccordion/index.js.map} +1 -1
- package/components/UiAlert/UiAlert.d.ts +1 -0
- package/components/UiAlert/UiAlert.js +12 -10
- package/components/UiAlert/UiAlert.js.map +1 -1
- package/components/UiBerRank/UiBerRank.d.ts +1 -0
- package/components/UiBerRank/UiBerRank.js +35 -31
- package/components/UiBerRank/UiBerRank.js.map +1 -1
- package/components/UiBerRank/_types.js +6 -5
- package/components/UiBerRank/_types.js.map +1 -1
- package/components/UiButton/UiButton.d.ts +1 -0
- package/components/UiButton/UiButton.js +260 -103
- package/components/UiButton/UiButton.js.map +1 -1
- package/components/UiButton/_types.d.ts +15 -9
- package/components/UiButton/_types.js +1 -1
- package/components/UiButton/_types.js.map +1 -1
- package/components/UiCheckbox/UiCheckbox.d.ts +1 -0
- package/components/UiCheckbox/UiCheckbox.js +48 -42
- package/components/UiCheckbox/UiCheckbox.js.map +1 -1
- package/components/UiCheckbox/index.d.ts +1 -0
- package/components/UiCheckbox/index.js +4 -2
- package/components/UiCheckbox/index.js.map +1 -1
- package/components/UiIcon/UiIcon.d.ts +1 -0
- package/components/UiIcon/UiIcon.js +10 -9
- package/components/UiIcon/UiIcon.js.map +1 -1
- package/components/UiIconBadge/UiIconBadge.d.ts +3 -0
- package/components/UiIconBadge/UiIconBadge.js +35 -0
- package/components/UiIconBadge/UiIconBadge.js.map +1 -0
- package/components/UiIconBadge/_types.d.ts +15 -0
- package/components/UiIconBadge/_types.js +5 -0
- package/components/UiIconBadge/_types.js.map +1 -0
- package/components/UiIconBadge/index.d.ts +2 -0
- package/components/UiIconBadge/index.js +7 -0
- package/components/UiIconBadge/index.js.map +1 -0
- package/components/UiInput/UiInput.base.d.ts +1 -0
- package/components/UiInput/UiInput.base.js +13 -12
- package/components/UiInput/UiInput.base.js.map +1 -1
- package/components/UiInputRange/UiInputRange.d.ts +1 -0
- package/components/UiInputRange/UiInputRange.js +31 -28
- package/components/UiInputRange/UiInputRange.js.map +1 -1
- package/components/UiList/UiList.d.ts +3 -1
- package/components/UiList/UiList.js +23 -18
- package/components/UiList/UiList.js.map +1 -1
- package/components/UiList/UiListItem.d.ts +1 -0
- package/components/UiList/UiListItem.js +6 -5
- package/components/UiList/UiListItem.js.map +1 -1
- package/components/UiList/_types.d.ts +4 -0
- package/components/UiList/_types.js +4 -3
- package/components/UiList/_types.js.map +1 -1
- package/components/UiNotificationBadge/UiNotificationBadge.d.ts +6 -5
- package/components/UiNotificationBadge/UiNotificationBadge.js +48 -83
- package/components/UiNotificationBadge/UiNotificationBadge.js.map +1 -1
- package/components/UiNotificationBadge/_types.d.ts +8 -0
- package/components/UiNotificationBadge/_types.js +4 -2
- package/components/UiNotificationBadge/_types.js.map +1 -1
- package/components/UiPills/UiPills.d.ts +1 -0
- package/components/UiPills/UiPills.js +16 -14
- package/components/UiPills/UiPills.js.map +1 -1
- package/components/UiPlainRadio/UiPlainRadio.d.ts +1 -0
- package/components/UiPlainRadio/UiPlainRadio.js +66 -51
- package/components/UiPlainRadio/UiPlainRadio.js.map +1 -1
- package/components/UiProductCard/UiProductCard.d.ts +1 -0
- package/components/UiProductCard/UiProductCard.js +24 -27
- package/components/UiProductCard/UiProductCard.js.map +1 -1
- package/components/UiProgress/UiProgress.d.ts +1 -0
- package/components/UiProgress/UiProgress.js +17 -15
- package/components/UiProgress/UiProgress.js.map +1 -1
- package/components/UiRadio/UiRadio.js +19 -13
- package/components/UiRadio/UiRadio.js.map +1 -1
- package/components/UiRadioFancy/UiRadioFancy.d.ts +9 -4
- package/components/UiRadioFancy/UiRadioFancy.js +41 -29
- package/components/UiRadioFancy/UiRadioFancy.js.map +1 -1
- package/components/UiRadioFancy/_types.d.ts +1 -1
- package/components/UiRadioFancy/_types.js +2 -2
- package/components/UiRadioFancy/_types.js.map +1 -1
- package/components/UiSelect/UiSelect.d.ts +1 -0
- package/components/UiSelect/UiSelect.js +99 -0
- package/components/UiSelect/UiSelect.js.map +1 -0
- package/components/UiSelect/index.js +5 -0
- package/components/UiSelect/index.js.map +1 -0
- package/components/UiSkeleton/UiSkeleton.d.ts +1 -0
- package/components/UiSkeleton/UiSkeleton.js +42 -41
- package/components/UiSkeleton/UiSkeleton.js.map +1 -1
- package/components/UiSnackbar/UiSnackbar.d.ts +10 -0
- package/components/UiSnackbar/UiSnackbar.js +67 -0
- package/components/UiSnackbar/UiSnackbar.js.map +1 -0
- package/components/UiSnackbar/_types.d.ts +7 -0
- package/components/UiSnackbar/_types.js +5 -0
- package/components/UiSnackbar/_types.js.map +1 -0
- package/components/UiSnackbar/index.d.ts +1 -0
- package/components/UiSnackbar/index.js +5 -0
- package/components/UiSnackbar/index.js.map +1 -0
- package/components/UiStars/UiStars.d.ts +18 -0
- package/components/UiStars/UiStars.js +57 -0
- package/components/UiStars/UiStars.js.map +1 -0
- package/components/UiStars/_types.d.ts +12 -0
- package/components/UiStars/_types.js +6 -0
- package/components/UiStars/_types.js.map +1 -0
- package/components/UiStars/index.d.ts +3 -0
- package/components/UiStars/index.js +7 -0
- package/components/UiStars/index.js.map +1 -0
- package/components/UiTable/UiTable.js +10 -9
- package/components/UiTable/UiTable.js.map +1 -1
- package/components/UiTable/UiTableCell.js +13 -12
- package/components/UiTable/UiTableCell.js.map +1 -1
- package/components/UiTable/UiTableRow.js +10 -9
- package/components/UiTable/UiTableRow.js.map +1 -1
- package/components/UiTabs/UiTabs.d.ts +1 -0
- package/components/UiTabs/UiTabs.js +21 -18
- package/components/UiTabs/UiTabs.js.map +1 -1
- package/components/UiToggle/UiToggle.d.ts +7 -4
- package/components/UiToggle/UiToggle.js +117 -91
- package/components/UiToggle/UiToggle.js.map +1 -1
- package/components/UiTypography/UiTypography.js +12 -10
- package/components/UiTypography/UiTypography.js.map +1 -1
- package/eslint.config.mjs +4 -3
- package/helper.d.ts +31 -0
- package/index.d.ts +24 -20
- package/package.json +43 -42
- package/stories/Colors/Colors.d.ts +2 -0
- package/stories/FontSizes/FontSizes.d.ts +2 -0
- package/stories/Spacings/Spacings.d.ts +2 -0
- package/bonkers-ui.css +0 -1
- package/bonkers-ui.umd.js +0 -103
- package/bonkers-ui.umd.js.map +0 -1
- package/components/UiBerRank/UiBerRank.module.css.js +0 -10
- package/components/UiBerRank/UiBerRank.module.css.js.map +0 -1
- package/components/UiButton/UiButton.module.css.js +0 -8
- package/components/UiButton/UiButton.module.css.js.map +0 -1
- package/components/UiCheckbox/UiCheckbox.module.css.js +0 -15
- package/components/UiCheckbox/UiCheckbox.module.css.js.map +0 -1
- package/components/UiInputRange/UiInputRange.module.css.js +0 -8
- package/components/UiInputRange/UiInputRange.module.css.js.map +0 -1
- package/components/UiRadio/UiRadio.module.css.js +0 -10
- package/components/UiRadio/UiRadio.module.css.js.map +0 -1
- package/index.js +0 -43
- package/plugin.ts +0 -160
- package/postcss.config.mjs +0 -9
- package/src/_styles/_backdropBlur.json +0 -10
- package/src/_styles/_colors.json +0 -81
- package/src/_styles/_fontSizes.json +0 -12
- package/src/_styles/_shadow.json +0 -8
- package/src/_styles/_spacing.json +0 -16
- package/tailwind.config.ts +0 -15
|
@@ -1,84 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
4
|
-
import { EBadgeOffset as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
[
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
[r.SECONDARY_ALT_200]: "bg-secondary-alt-200",
|
|
43
|
-
[r.SECONDARY_ALT_300]: "bg-secondary-alt-300",
|
|
44
|
-
[r.SECONDARY_ALT_400]: "bg-secondary-alt-400",
|
|
45
|
-
[r.SECONDARY_ALT_500]: "bg-secondary-alt-500",
|
|
46
|
-
[r.SECONDARY_ALT_600]: "bg-secondary-alt-600",
|
|
47
|
-
[r.SECONDARY_ALT_700]: "bg-secondary-alt-700",
|
|
48
|
-
[r.ERROR]: "bg-error",
|
|
49
|
-
[r.ERROR_300]: "bg-error-300",
|
|
50
|
-
[r.ERROR_400]: "bg-error-400",
|
|
51
|
-
[r.ERROR_500]: "bg-error-500",
|
|
52
|
-
[r.ERROR_600]: "bg-error-600",
|
|
53
|
-
[r.ERROR_700]: "bg-error-700",
|
|
54
|
-
[r.ACCENT]: "bg-accent",
|
|
55
|
-
[r.ACCENT_300]: "bg-accent-300",
|
|
56
|
-
[r.ACCENT_500]: "bg-accent-500",
|
|
57
|
-
[r.ACCENT_600]: "bg-accent-600",
|
|
58
|
-
[r.ACCENT_700]: "bg-accent-700",
|
|
59
|
-
[r.ACCENT_ALT]: "bg-accent-alt",
|
|
60
|
-
[r.ACCENT_ALT_300]: "bg-accent-alt-300",
|
|
61
|
-
[r.ACCENT_ALT_400]: "bg-accent-alt-400",
|
|
62
|
-
[r.ACCENT_ALT_500]: "bg-accent-alt-500",
|
|
63
|
-
[r.ACCENT_ALT_600]: "bg-accent-alt-600",
|
|
64
|
-
[r.ACCENT_ALT_700]: "bg-accent-alt-700"
|
|
65
|
-
}, e = {
|
|
66
|
-
[a.DEFAULT]: "-right-xxxs -top-xxxs",
|
|
67
|
-
[a.OFFSET_BOTTOM_RIGHT]: "-right-xxxs -bottom-xxxs",
|
|
68
|
-
[a.OFFSET_TOP_LEFT]: "-left-xxxs -top-xxxs",
|
|
69
|
-
[a.OFFSET_BOTTOM_LEFT]: "-left-xxxs -bottom-xxxs"
|
|
70
|
-
}, E = ({
|
|
71
|
-
offset: R,
|
|
72
|
-
children: t,
|
|
73
|
-
color: g
|
|
74
|
-
}) => t ? /* @__PURE__ */ A(
|
|
3
|
+
import T from "classnames";
|
|
4
|
+
import { EBadgeOffset as t, EBadgeTypes as e, EBadgeSizes as x } from "./_types.js";
|
|
5
|
+
const l = {
|
|
6
|
+
[t.DEFAULT]: "-right-xxxs -top-xxxs",
|
|
7
|
+
[t.OFFSET_BOTTOM_RIGHT]: "-right-xxxs -bottom-xxxs",
|
|
8
|
+
[t.OFFSET_TOP_LEFT]: "-left-xxxs -top-xxxs",
|
|
9
|
+
[t.OFFSET_BOTTOM_LEFT]: "-left-xxxs -bottom-xxxs"
|
|
10
|
+
}, m = {
|
|
11
|
+
[e.DEFAULT]: `
|
|
12
|
+
bg-error-500
|
|
13
|
+
|
|
14
|
+
`,
|
|
15
|
+
[e.PRIMARY]: `
|
|
16
|
+
bg-primary-800
|
|
17
|
+
|
|
18
|
+
`
|
|
19
|
+
}, f = {
|
|
20
|
+
[x.DEFAULT]: `
|
|
21
|
+
h-sm
|
|
22
|
+
min-w-sm
|
|
23
|
+
p-xxxs
|
|
24
|
+
text-xxs
|
|
25
|
+
`,
|
|
26
|
+
[x.LARGE]: `
|
|
27
|
+
h-lg
|
|
28
|
+
min-w-lg
|
|
29
|
+
p-xxs
|
|
30
|
+
justify-center
|
|
31
|
+
text-2xl
|
|
32
|
+
border-2
|
|
33
|
+
|
|
34
|
+
`
|
|
35
|
+
}, g = ({
|
|
36
|
+
offset: s = t.DEFAULT,
|
|
37
|
+
children: o,
|
|
38
|
+
className: i,
|
|
39
|
+
kind: r = e.DEFAULT,
|
|
40
|
+
size: n = x.DEFAULT
|
|
41
|
+
}) => /* @__PURE__ */ a(
|
|
75
42
|
"div",
|
|
76
43
|
{
|
|
77
|
-
className:
|
|
44
|
+
className: T(
|
|
78
45
|
"notification-badge",
|
|
79
|
-
"p-xxxs",
|
|
80
|
-
"h-sm",
|
|
81
|
-
"min-w-sm",
|
|
82
46
|
"absolute",
|
|
83
47
|
"inline-flex",
|
|
84
48
|
"items-center",
|
|
@@ -86,19 +50,20 @@ const b = {
|
|
|
86
50
|
"border",
|
|
87
51
|
"border-white",
|
|
88
52
|
"text-center",
|
|
89
|
-
"text-xxs",
|
|
90
53
|
"font-bold",
|
|
91
54
|
"leading-none",
|
|
92
55
|
"text-white",
|
|
93
56
|
"whitespace-nowrap",
|
|
94
57
|
"gap-xxxs",
|
|
95
|
-
|
|
96
|
-
|
|
58
|
+
l[s],
|
|
59
|
+
m[r],
|
|
60
|
+
f[n],
|
|
61
|
+
i
|
|
97
62
|
),
|
|
98
|
-
children:
|
|
63
|
+
children: o
|
|
99
64
|
}
|
|
100
|
-
)
|
|
65
|
+
);
|
|
101
66
|
export {
|
|
102
|
-
|
|
67
|
+
g as UiNotificationBadge
|
|
103
68
|
};
|
|
104
69
|
//# sourceMappingURL=UiNotificationBadge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiNotificationBadge.js","sources":["../../../src/components/UiNotificationBadge/UiNotificationBadge.tsx"],"sourcesContent":["\nimport React from \"react\";\nimport cx from \"classnames\";\nimport { EBadgeOffset } from \"./_types\";\n\
|
|
1
|
+
{"version":3,"file":"UiNotificationBadge.js","sources":["../../../src/components/UiNotificationBadge/UiNotificationBadge.tsx"],"sourcesContent":["\nimport React from \"react\";\nimport cx from \"classnames\";\nimport { EBadgeOffset, EBadgeSizes, EBadgeTypes } from \"./_types\";\n\ntype TUiNotificationBadge = {\n\toffset?: EBadgeOffset,\n\tchildren: React.ReactNode;\n\tkind?: EBadgeTypes;\n\tsize?: EBadgeSizes;\n\tclassName?: string;\n\n};\n\nconst offsetClasses = {\n\t[EBadgeOffset.DEFAULT]: \"-right-xxxs -top-xxxs\",\n\t[EBadgeOffset.OFFSET_BOTTOM_RIGHT]: \"-right-xxxs -bottom-xxxs\",\n\t[EBadgeOffset.OFFSET_TOP_LEFT]: \"-left-xxxs -top-xxxs\",\n\t[EBadgeOffset.OFFSET_BOTTOM_LEFT]: \"-left-xxxs -bottom-xxxs\",\n};\n\nconst kindClasses = {\n\t[EBadgeTypes.DEFAULT]: `\n\t\tbg-error-500\n\n\t`,\n\t[EBadgeTypes.PRIMARY]: `\n\t\tbg-primary-800\n\n\t`,\n\n};\n\nconst sizeClasses = {\n\t[EBadgeSizes.DEFAULT]: `\n\t\th-sm\n\t\tmin-w-sm\n\t\tp-xxxs\n\t\ttext-xxs\n\t`,\n\t[EBadgeSizes.LARGE]: `\n\t\th-lg\n\t\tmin-w-lg\n\t\tp-xxs\n\t\tjustify-center\n\t\ttext-2xl\n\t\tborder-2\n\n\t`\n\n};\n\nexport const UiNotificationBadge: React.FC<TUiNotificationBadge> = ({\n\toffset = EBadgeOffset.DEFAULT,\n\tchildren,\n\tclassName,\n\tkind = EBadgeTypes.DEFAULT,\n\tsize = EBadgeSizes.DEFAULT\n\n}) => {\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ cx(\n\t\t\t\t\"notification-badge\",\n\t\t\t\t\"absolute\",\n\t\t\t\t\"inline-flex\",\n\t\t\t\t\"items-center\",\n\t\t\t\t\"rounded-full\",\n\t\t\t\t\"border\",\n\t\t\t\t\"border-white\",\n\t\t\t\t\"text-center\",\n\t\t\t\t\"font-bold\",\n\t\t\t\t\"leading-none\",\n\t\t\t\t\"text-white\",\n\t\t\t\t\"whitespace-nowrap\",\n\t\t\t\t\"gap-xxxs\",\n\t\t\t\toffsetClasses[offset],\n\t\t\t\tkindClasses[kind],\n\t\t\t\tsizeClasses[size],\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</div>\n\t);\n};\n"],"names":["offsetClasses","EBadgeOffset","kindClasses","EBadgeTypes","sizeClasses","EBadgeSizes","UiNotificationBadge","offset","children","className","kind","size","jsx","cx"],"mappings":";;;;AAcA,MAAMA,IAAgB;AAAA,EACrB,CAACC,EAAa,OAAO,GAAG;AAAA,EACxB,CAACA,EAAa,mBAAmB,GAAG;AAAA,EACpC,CAACA,EAAa,eAAe,GAAG;AAAA,EAChC,CAACA,EAAa,kBAAkB,GAAG;AACpC,GAEMC,IAAc;AAAA,EACnB,CAACC,EAAY,OAAO,GAAG;AAAA;AAAA;AAAA;AAAA,EAIvB,CAACA,EAAY,OAAO,GAAG;AAAA;AAAA;AAAA;AAKxB,GAEMC,IAAc;AAAA,EACnB,CAACC,EAAY,OAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvB,CAACA,EAAY,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUtB,GAEaC,IAAsD,CAAC;AAAA,EACnE,QAAAC,IAASN,EAAa;AAAA,EACtB,UAAAO;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAOP,EAAY;AAAA,EACnB,MAAAQ,IAAON,EAAY;AAEpB,MAGE,gBAAAO;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAYC;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAb,EAAcO,CAAM;AAAA,MACpBL,EAAYQ,CAAI;AAAA,MAChBN,EAAYO,CAAI;AAAA,MAChBF;AAAA,IACD;AAAA,IAEE,UAAAD;AAAA,EAAA;AACH;"}
|
|
@@ -4,3 +4,11 @@ export declare enum EBadgeOffset {
|
|
|
4
4
|
OFFSET_BOTTOM_RIGHT = "offset-bottom-right",
|
|
5
5
|
OFFSET_BOTTOM_LEFT = "offset-bottom-left"
|
|
6
6
|
}
|
|
7
|
+
export declare enum EBadgeSizes {
|
|
8
|
+
DEFAULT = "default",
|
|
9
|
+
LARGE = "lg"
|
|
10
|
+
}
|
|
11
|
+
export declare enum EBadgeTypes {
|
|
12
|
+
DEFAULT = "error",
|
|
13
|
+
PRIMARY = "primary"
|
|
14
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
var t = /* @__PURE__ */ ((
|
|
1
|
+
var t = /* @__PURE__ */ ((r) => (r.DEFAULT = "default", r.OFFSET_TOP_LEFT = "offset-top-left", r.OFFSET_BOTTOM_RIGHT = "offset-bottom-right", r.OFFSET_BOTTOM_LEFT = "offset-bottom-left", r))(t || {}), T = /* @__PURE__ */ ((r) => (r.DEFAULT = "default", r.LARGE = "lg", r))(T || {}), F = /* @__PURE__ */ ((r) => (r.DEFAULT = "error", r.PRIMARY = "primary", r))(F || {});
|
|
2
2
|
export {
|
|
3
|
-
t as EBadgeOffset
|
|
3
|
+
t as EBadgeOffset,
|
|
4
|
+
T as EBadgeSizes,
|
|
5
|
+
F as EBadgeTypes
|
|
4
6
|
};
|
|
5
7
|
//# sourceMappingURL=_types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sources":["../../../src/components/UiNotificationBadge/_types.ts"],"sourcesContent":["export enum EBadgeOffset {\n\tDEFAULT = \"default\",\n\tOFFSET_TOP_LEFT = \"offset-top-left\",\n\tOFFSET_BOTTOM_RIGHT = \"offset-bottom-right\",\n\tOFFSET_BOTTOM_LEFT = \"offset-bottom-left\"\n}\n"],"names":["EBadgeOffset"],"mappings":"AAAY,IAAAA,sBAAAA,OACXA,EAAA,UAAU,WACVA,EAAA,kBAAkB,mBAClBA,EAAA,sBAAsB,uBACtBA,EAAA,qBAAqB,sBAJVA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"_types.js","sources":["../../../src/components/UiNotificationBadge/_types.ts"],"sourcesContent":["export enum EBadgeOffset {\n\tDEFAULT = \"default\",\n\tOFFSET_TOP_LEFT = \"offset-top-left\",\n\tOFFSET_BOTTOM_RIGHT = \"offset-bottom-right\",\n\tOFFSET_BOTTOM_LEFT = \"offset-bottom-left\"\n}\n\nexport enum EBadgeSizes {\n\tDEFAULT = \"default\",\n\tLARGE = \"lg\"\n}\n\nexport enum EBadgeTypes {\n\tDEFAULT = \"error\",\n\tPRIMARY = \"primary\"\n\n}\n"],"names":["EBadgeOffset","EBadgeSizes","EBadgeTypes"],"mappings":"AAAY,IAAAA,sBAAAA,OACXA,EAAA,UAAU,WACVA,EAAA,kBAAkB,mBAClBA,EAAA,sBAAsB,uBACtBA,EAAA,qBAAqB,sBAJVA,IAAAA,KAAA,CAAA,CAAA,GAOAC,sBAAAA,OACXA,EAAA,UAAU,WACVA,EAAA,QAAQ,MAFGA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACXA,EAAA,UAAU,SACVA,EAAA,UAAU,WAFCA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { EBadgeKind as r, EBadgeSize as e } from "./_types.js";
|
|
4
4
|
import { UiTypography as g } from "../UiTypography/UiTypography.js";
|
|
5
|
-
import { ETypographySizes as t, ETextWeight as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import { ETypographySizes as t, ETextWeight as c } from "../UiTypography/_types.js";
|
|
6
|
+
import l from "classnames";
|
|
7
|
+
const d = {
|
|
8
8
|
[r.PRIMARY]: "bg-primary-100 text-primary-700",
|
|
9
9
|
[r.ERROR]: "bg-error-300 text-error-700",
|
|
10
10
|
[r.WARNING]: "bg-warning-300 text-warning-700",
|
|
@@ -12,30 +12,32 @@ const l = {
|
|
|
12
12
|
[r.PRIMARY_ALT]: "bg-primary-300 text-primary-800",
|
|
13
13
|
[r.SECONDARY]: "bg-white text-secondary-300 ring-1 ring-secondary-alt-300",
|
|
14
14
|
[r.ACCENT_ALT]: "bg-accent-alt-500 text-secondary-700"
|
|
15
|
-
},
|
|
15
|
+
}, y = {
|
|
16
16
|
[e.SMALL]: t.XXS,
|
|
17
17
|
[e.MEDIUM]: t.XS,
|
|
18
18
|
[e.LARGE]: t.SM
|
|
19
|
-
},
|
|
19
|
+
}, S = ({
|
|
20
20
|
children: i,
|
|
21
21
|
kind: s = r.PRIMARY,
|
|
22
22
|
size: a = e.SMALL,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
className: o,
|
|
24
|
+
icon: n,
|
|
25
|
+
rounded: x = !1
|
|
26
|
+
}) => /* @__PURE__ */ m("div", { className: l(
|
|
26
27
|
"ui-pills",
|
|
27
28
|
"grid grid-flow-col justify-start w-max",
|
|
28
29
|
"items-center",
|
|
29
30
|
"gap-xxxs",
|
|
30
31
|
"px-xxs py-xxxs",
|
|
31
32
|
"overflow-hidden",
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
x ? "rounded-full" : "rounded-sm",
|
|
34
|
+
d[s],
|
|
35
|
+
o
|
|
34
36
|
), children: [
|
|
35
|
-
|
|
36
|
-
i ? /* @__PURE__ */ p(g, { size:
|
|
37
|
+
n,
|
|
38
|
+
i ? /* @__PURE__ */ p(g, { size: y[a], weight: c.SEMI_BOLD, className: "whitespace-nowrap", children: i }) : null
|
|
37
39
|
] });
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
S as UiPills
|
|
40
42
|
};
|
|
41
43
|
//# sourceMappingURL=UiPills.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiPills.js","sources":["../../../src/components/UiPills/UiPills.tsx"],"sourcesContent":["import React from \"react\";\nimport { EBadgeKind, EBadgeSize } from \"./_types.ts\";\nimport { ETextWeight, ETypographySizes, UiTypography } from \"../UiTypography\";\nimport cx from \"classnames\";\n\ninterface IUiPills {\n\tchildren: React.ReactNode\n\tkind?: EBadgeKind,\n\tsize?: EBadgeSize,\n\ticon?: React.ReactNode,\n\trounded?: boolean\n}\n\nconst kindClasses = {\n\t[EBadgeKind.PRIMARY]: \"bg-primary-100 text-primary-700\",\n\t[EBadgeKind.ERROR]: \"bg-error-300 text-error-700\",\n\t[EBadgeKind.WARNING]: \"bg-warning-300 text-warning-700\",\n\t[EBadgeKind.ACCENT]: \"bg-accent-300 text-accent-700\",\n\t[EBadgeKind.PRIMARY_ALT]: \"bg-primary-300 text-primary-800\",\n\t[EBadgeKind.SECONDARY]: \"bg-white text-secondary-300 ring-1 ring-secondary-alt-300\",\n\t[EBadgeKind.ACCENT_ALT]: \"bg-accent-alt-500 text-secondary-700\",\n};\n\nconst sizeEnums = {\n\t[EBadgeSize.SMALL]: ETypographySizes.XXS,\n\t[EBadgeSize.MEDIUM]: ETypographySizes.XS,\n\t[EBadgeSize.LARGE]: ETypographySizes.SM,\n};\n\nexport const UiPills: React.FC<IUiPills> = ({\n\tchildren,\n\tkind = EBadgeKind.PRIMARY,\n\tsize = EBadgeSize.SMALL,\n\ticon
|
|
1
|
+
{"version":3,"file":"UiPills.js","sources":["../../../src/components/UiPills/UiPills.tsx"],"sourcesContent":["import React from \"react\";\nimport { EBadgeKind, EBadgeSize } from \"./_types.ts\";\nimport { ETextWeight, ETypographySizes, UiTypography } from \"../UiTypography\";\nimport cx from \"classnames\";\n\ninterface IUiPills {\n\tchildren: React.ReactNode\n\tkind?: EBadgeKind,\n\tsize?: EBadgeSize,\n\ticon?: React.ReactNode,\n\trounded?: boolean,\n\tclassName?: string\n}\n\nconst kindClasses = {\n\t[EBadgeKind.PRIMARY]: \"bg-primary-100 text-primary-700\",\n\t[EBadgeKind.ERROR]: \"bg-error-300 text-error-700\",\n\t[EBadgeKind.WARNING]: \"bg-warning-300 text-warning-700\",\n\t[EBadgeKind.ACCENT]: \"bg-accent-300 text-accent-700\",\n\t[EBadgeKind.PRIMARY_ALT]: \"bg-primary-300 text-primary-800\",\n\t[EBadgeKind.SECONDARY]: \"bg-white text-secondary-300 ring-1 ring-secondary-alt-300\",\n\t[EBadgeKind.ACCENT_ALT]: \"bg-accent-alt-500 text-secondary-700\",\n};\n\nconst sizeEnums = {\n\t[EBadgeSize.SMALL]: ETypographySizes.XXS,\n\t[EBadgeSize.MEDIUM]: ETypographySizes.XS,\n\t[EBadgeSize.LARGE]: ETypographySizes.SM,\n};\n\nexport const UiPills: React.FC<IUiPills> = ({\n\tchildren,\n\tkind = EBadgeKind.PRIMARY,\n\tsize = EBadgeSize.SMALL,\n\tclassName,\n\ticon,\n\trounded = false\n}) => {\n\treturn (\n\t\t<div className={ cx(\n\t\t\t\"ui-pills\",\n\t\t\t\"grid grid-flow-col justify-start w-max\",\n\t\t\t\"items-center\",\n\t\t\t\"gap-xxxs\",\n\t\t\t\"px-xxs py-xxxs\",\n\t\t\t\"overflow-hidden\",\n\t\t\trounded ? \"rounded-full\": \"rounded-sm\",\n\t\t\tkindClasses[kind],\n\t\t\tclassName\n\t\t) }>\n\t\t\t{ icon }\n\t\t\t{ children\n\t\t\t\t? (\n\t\t\t\t\t<UiTypography size={ sizeEnums[size] } weight={ ETextWeight.SEMI_BOLD } className=\"whitespace-nowrap\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</UiTypography>\n\t\t\t\t)\n\t\t\t\t: null }\n\t\t</div>\n\t);\n};\n"],"names":["kindClasses","EBadgeKind","sizeEnums","EBadgeSize","ETypographySizes","UiPills","children","kind","size","className","icon","rounded","jsxs","cx","jsx","UiTypography","ETextWeight"],"mappings":";;;;;;AAcA,MAAMA,IAAc;AAAA,EACnB,CAACC,EAAW,OAAO,GAAG;AAAA,EACtB,CAACA,EAAW,KAAK,GAAG;AAAA,EACpB,CAACA,EAAW,OAAO,GAAG;AAAA,EACtB,CAACA,EAAW,MAAM,GAAG;AAAA,EACrB,CAACA,EAAW,WAAW,GAAG;AAAA,EAC1B,CAACA,EAAW,SAAS,GAAG;AAAA,EACxB,CAACA,EAAW,UAAU,GAAG;AAC1B,GAEMC,IAAY;AAAA,EACjB,CAACC,EAAW,KAAK,GAAGC,EAAiB;AAAA,EACrC,CAACD,EAAW,MAAM,GAAGC,EAAiB;AAAA,EACtC,CAACD,EAAW,KAAK,GAAGC,EAAiB;AACtC,GAEaC,IAA8B,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,MAAAC,IAAON,EAAW;AAAA,EAClB,MAAAO,IAAOL,EAAW;AAAA,EAClB,WAAAM;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC,IAAU;AACX,MAEE,gBAAAC,EAAC,SAAI,WAAYC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACAF,IAAU,iBAAgB;AAAA,EAC1BX,EAAYO,CAAI;AAAA,EAChBE;AAEE,GAAA,UAAA;AAAA,EAAAC;AAAA,EACAJ,IAEA,gBAAAQ,EAACC,GAAa,EAAA,MAAOb,EAAUM,CAAI,GAAI,QAASQ,EAAY,WAAY,WAAU,qBAC/E,UAAAV,EACH,CAAA,IAEC;AAAA,GACJ;"}
|
|
@@ -1,83 +1,98 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
4
|
-
import { UiRadio as
|
|
5
|
-
const
|
|
6
|
-
children:
|
|
3
|
+
import p from "classnames";
|
|
4
|
+
import { UiRadio as c } from "../UiRadio/UiRadio.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
children: l,
|
|
7
7
|
disabled: r,
|
|
8
|
-
subHeader:
|
|
8
|
+
subHeader: d,
|
|
9
9
|
value: e,
|
|
10
10
|
name: a,
|
|
11
11
|
checked: o = !1,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
className: s,
|
|
13
|
+
onChange: t
|
|
14
|
+
}) => /* @__PURE__ */ i(
|
|
14
15
|
"label",
|
|
15
16
|
{
|
|
16
|
-
className:
|
|
17
|
+
className: p(
|
|
17
18
|
"ui-radio-fancy",
|
|
18
19
|
"relative",
|
|
19
20
|
{
|
|
20
|
-
"pointer-events-none": r
|
|
21
|
-
}
|
|
21
|
+
"pointer-events-none opacity-50": r
|
|
22
|
+
},
|
|
23
|
+
s
|
|
22
24
|
),
|
|
23
25
|
htmlFor: a + e,
|
|
24
26
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ n(
|
|
26
28
|
"input",
|
|
27
29
|
{
|
|
28
|
-
className:
|
|
30
|
+
className: p(
|
|
29
31
|
" absolute",
|
|
30
32
|
"appearance-none",
|
|
31
|
-
"peer"
|
|
33
|
+
"peer/plain-radio"
|
|
32
34
|
),
|
|
33
35
|
id: a + e,
|
|
34
36
|
type: "radio",
|
|
35
37
|
value: e,
|
|
36
38
|
checked: o,
|
|
37
|
-
onChange: () =>
|
|
39
|
+
onChange: () => t(e)
|
|
38
40
|
}
|
|
39
41
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
"
|
|
42
|
-
"size-full",
|
|
43
|
-
"cursor-pointer",
|
|
44
|
-
"rounded-lg",
|
|
45
|
-
"border-2",
|
|
46
|
-
"bg-white",
|
|
47
|
-
"peer-active:bg-secondary-alt-200",
|
|
48
|
-
"p-sm",
|
|
49
|
-
"peer-hover:border-primary-700",
|
|
50
|
-
"peer-focus:shadow-border-primary",
|
|
51
|
-
"flex",
|
|
52
|
-
"items-center",
|
|
53
|
-
"gap-sm",
|
|
54
|
-
"text-sm",
|
|
42
|
+
/* @__PURE__ */ i(
|
|
43
|
+
"div",
|
|
55
44
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
className: p(
|
|
46
|
+
"box-border",
|
|
47
|
+
"size-full",
|
|
48
|
+
"cursor-pointer",
|
|
49
|
+
"rounded-xl",
|
|
50
|
+
"border border-secondary-alt-600",
|
|
51
|
+
"peer-checked/plain-radio:border-primary-600",
|
|
52
|
+
"peer-checked/plain-radio:outline",
|
|
53
|
+
"peer-checked/plain-radio:outline",
|
|
54
|
+
"peer-checked/plain-radio:outline-primary-600",
|
|
55
|
+
"peer-hover/plain-radio:peer-checked/plain-radio:outline-primary-700",
|
|
56
|
+
"bg-white",
|
|
57
|
+
"peer-active/plain-radio:bg-secondary-alt-200",
|
|
58
|
+
"p-sm",
|
|
59
|
+
"peer-hover/plain-radio:border-primary-700",
|
|
60
|
+
"peer-focus/plain-radio:shadow-border-primary",
|
|
61
|
+
"flex",
|
|
62
|
+
"items-center",
|
|
63
|
+
"gap-sm",
|
|
64
|
+
"text-sm",
|
|
65
|
+
{
|
|
66
|
+
"border-secondary-alt-400": r && !o,
|
|
67
|
+
"border-primary-300": r && o,
|
|
68
|
+
"border-secondary-alt-600": !r && !o,
|
|
69
|
+
"border-primary-600": !r && o
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ n(
|
|
74
|
+
c,
|
|
75
|
+
{
|
|
76
|
+
className: "pointer-events-none",
|
|
77
|
+
disabled: r,
|
|
78
|
+
value: e,
|
|
79
|
+
name: a,
|
|
80
|
+
onChange: () => t(e),
|
|
81
|
+
checked: o,
|
|
82
|
+
tabIndex: -1
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col", children: [
|
|
86
|
+
l,
|
|
87
|
+
/* @__PURE__ */ n("div", { className: "text-xs font-normal text-secondary-alt-400", children: d })
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
60
90
|
}
|
|
61
|
-
)
|
|
62
|
-
/* @__PURE__ */ t("span", { className: "pointer-events-none", children: /* @__PURE__ */ t(
|
|
63
|
-
l,
|
|
64
|
-
{
|
|
65
|
-
disabled: r,
|
|
66
|
-
value: e,
|
|
67
|
-
name: a,
|
|
68
|
-
onChange: () => s(e),
|
|
69
|
-
checked: o
|
|
70
|
-
}
|
|
71
|
-
) }),
|
|
72
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
73
|
-
p,
|
|
74
|
-
/* @__PURE__ */ t("div", { className: "text-xs font-normal text-secondary-alt-400", children: m })
|
|
75
|
-
] })
|
|
76
|
-
] })
|
|
91
|
+
)
|
|
77
92
|
]
|
|
78
93
|
}
|
|
79
94
|
);
|
|
80
95
|
export {
|
|
81
|
-
|
|
96
|
+
f as UiPlainRadio
|
|
82
97
|
};
|
|
83
98
|
//# sourceMappingURL=UiPlainRadio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiPlainRadio.js","sources":["../../../src/components/UiPlainRadio/UiPlainRadio.tsx"],"sourcesContent":["import React from \"react\";\nimport cx from \"classnames\";\nimport { UiRadio } from \"../UiRadio\";\n\nexport type TUiPlainRadio = {\n\tchildren?: React.ReactNode\n\tdisabled?: boolean;\n\tsubHeader?: string;\n\tvalue: string;\n\tname: string;\n\tchecked?: boolean\n\tonChange: (value: string) => void;\n\n}& Omit<React.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"checked\" | \"value\" | \"name\">;\n\nexport const UiPlainRadio: React.FC<TUiPlainRadio> = ({\n\tchildren,\n\tdisabled,\n\tsubHeader,\n\tvalue,\n\tname,\n\tchecked = false,\n\tonChange\n\n}) => {\n\n\treturn (\n\t\t<label className={ cx(\n\t\t\t\"ui-radio-fancy\",\n\t\t\t\"relative\",\n\t\t\t{\n\t\t\t\t\"pointer-events-none\": disabled\n\t\t\t}\n\t\t) }\n\t\thtmlFor={ name + value }\n\t\t>\n\t\t\t<input className={ cx(\n\t\t\t\t\" absolute\",\n\t\t\t\t\"appearance-none\",\n\t\t\t\t\"peer\",\n\
|
|
1
|
+
{"version":3,"file":"UiPlainRadio.js","sources":["../../../src/components/UiPlainRadio/UiPlainRadio.tsx"],"sourcesContent":["import React from \"react\";\nimport cx from \"classnames\";\nimport { UiRadio } from \"../UiRadio\";\n\nexport type TUiPlainRadio = {\n\tchildren?: React.ReactNode\n\tdisabled?: boolean;\n\tsubHeader?: string;\n\tvalue: string;\n\tname: string;\n\tclassName?: string\n\tchecked?: boolean\n\tonChange: (value: string) => void;\n\n}& Omit<React.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"checked\" | \"value\" | \"name\">;\n\nexport const UiPlainRadio: React.FC<TUiPlainRadio> = ({\n\tchildren,\n\tdisabled,\n\tsubHeader,\n\tvalue,\n\tname,\n\tchecked = false,\n\tclassName,\n\tonChange\n\n}) => {\n\n\treturn (\n\t\t<label className={ cx(\n\t\t\t\"ui-radio-fancy\",\n\t\t\t\"relative\",\n\t\t\t{\n\t\t\t\t\"pointer-events-none opacity-50\": disabled\n\t\t\t},\n\t\t\tclassName\n\t\t) }\n\t\thtmlFor={ name + value }\n\t\t>\n\t\t\t<input className={ cx(\n\t\t\t\t\" absolute\",\n\t\t\t\t\"appearance-none\",\n\t\t\t\t\"peer/plain-radio\",\n\t\t\t) }\n\t\t\tid={ name + value }\n\t\t\ttype=\"radio\"\n\t\t\tvalue={ value }\n\t\t\tchecked={ checked }\n\t\t\tonChange={ ()=> onChange(value) }\n\t\t\t/>\n\n\t\t\t<div className={ cx(\n\t\t\t\t\"box-border\",\n\t\t\t\t\"size-full\",\n\t\t\t\t\"cursor-pointer\",\n\t\t\t\t\"rounded-xl\",\n\t\t\t\t\"border border-secondary-alt-600\",\n\t\t\t\t\"peer-checked/plain-radio:border-primary-600\",\n\t\t\t\t\"peer-checked/plain-radio:outline\",\n\t\t\t\t\"peer-checked/plain-radio:outline\",\n\t\t\t\t\"peer-checked/plain-radio:outline-primary-600\",\n\t\t\t\t\"peer-hover/plain-radio:peer-checked/plain-radio:outline-primary-700\",\n\t\t\t\t\"bg-white\",\n\t\t\t\t\"peer-active/plain-radio:bg-secondary-alt-200\",\n\t\t\t\t\"p-sm\",\n\t\t\t\t\"peer-hover/plain-radio:border-primary-700\",\n\t\t\t\t\"peer-focus/plain-radio:shadow-border-primary\",\n\t\t\t\t\"flex\",\n\t\t\t\t\"items-center\",\n\t\t\t\t\"gap-sm\",\n\t\t\t\t\"text-sm\",\n\t\t\t\t{\n\t\t\t\t\t\"border-secondary-alt-400\": disabled && !checked,\n\t\t\t\t\t\"border-primary-300\": disabled && checked,\n\t\t\t\t\t\"border-secondary-alt-600\": !disabled && !checked,\n\t\t\t\t\t\"border-primary-600\": !disabled && checked\n\t\t\t\t}\n\n\t\t\t) }\n\t\t\t>\n\n\t\t\t\t<UiRadio\n\t\t\t\t\tclassName=\"pointer-events-none\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tname={ name }\n\t\t\t\t\tonChange={ ()=> onChange(value) }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t{ children }\n\t\t\t\t\t<div className=\"text-xs font-normal text-secondary-alt-400\">{ subHeader }</div>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t</label>\n\n\t);\n};\n"],"names":["UiPlainRadio","children","disabled","subHeader","value","name","checked","className","onChange","jsxs","cx","jsx","UiRadio"],"mappings":";;;;AAgBO,MAAMA,IAAwC,CAAC;AAAA,EACrD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,UAAAC;AAED,MAGE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IAAM,WAAYC;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,QACC,kCAAkCR;AAAA,MACnC;AAAA,MACAK;AAAA,IACD;AAAA,IACA,SAAUF,IAAOD;AAAA,IAEhB,UAAA;AAAA,MAAA,gBAAAO;AAAA,QAAC;AAAA,QAAA;AAAA,UAAM,WAAYD;AAAA,YAClB;AAAA,YACA;AAAA,YACA;AAAA,UACD;AAAA,UACA,IAAKL,IAAOD;AAAA,UACZ,MAAK;AAAA,UACL,OAAAA;AAAA,UACA,SAAAE;AAAA,UACA,UAAW,MAAKE,EAASJ,CAAK;AAAA,QAAA;AAAA,MAC9B;AAAA,MAEA,gBAAAK;AAAA,QAAC;AAAA,QAAA;AAAA,UAAI,WAAYC;AAAA,YAChB;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,cACC,4BAA4BR,KAAY,CAACI;AAAA,cACzC,sBAAsBJ,KAAYI;AAAA,cAClC,4BAA4B,CAACJ,KAAY,CAACI;AAAA,cAC1C,sBAAsB,CAACJ,KAAYI;AAAA,YAAA;AAAA,UAGrC;AAAA,UAGC,UAAA;AAAA,YAAA,gBAAAK;AAAA,cAACC;AAAA,cAAA;AAAA,gBACA,WAAU;AAAA,gBACV,UAAAV;AAAA,gBACA,OAAAE;AAAA,gBACA,MAAAC;AAAA,gBACA,UAAW,MAAKG,EAASJ,CAAK;AAAA,gBAC9B,SAAAE;AAAA,gBACA,UAAW;AAAA,cAAA;AAAA,YACZ;AAAA,YAEA,gBAAAG,EAAC,OAAI,EAAA,WAAU,iBACZ,UAAA;AAAA,cAAAR;AAAA,cACD,gBAAAU,EAAA,OAAA,EAAI,WAAU,8CAA+C,UAAWR,EAAA,CAAA;AAAA,YAAA,EAC1E,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAAA;AAED;"}
|
|
@@ -1,52 +1,49 @@
|
|
|
1
1
|
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { UiPills as a } from "../UiPills/UiPills.js";
|
|
4
|
-
import { EBadgeKind as
|
|
4
|
+
import { EBadgeKind as c } from "../UiPills/_types.js";
|
|
5
5
|
import { UiTypography as o } from "../UiTypography/UiTypography.js";
|
|
6
|
-
import {
|
|
7
|
-
import { EColors as
|
|
8
|
-
|
|
6
|
+
import { ETextAlign as l, ETextWeight as x, ETypographySizes as t } from "../UiTypography/_types.js";
|
|
7
|
+
import { EColors as s } from "../../_types/colors.js";
|
|
8
|
+
import g from "classnames";
|
|
9
|
+
const A = ({
|
|
9
10
|
badgeText: i,
|
|
10
|
-
title:
|
|
11
|
-
subtitle:
|
|
12
|
-
header:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
px-xs
|
|
22
|
-
py-sm`, children: [
|
|
23
|
-
i && /* @__PURE__ */ r("div", { className: "!absolute -top-xxs right-xs", children: /* @__PURE__ */ r(a, { rounded: !0, kind: p.ACCENT_ALT, children: i }) }),
|
|
24
|
-
m,
|
|
11
|
+
title: d,
|
|
12
|
+
subtitle: m,
|
|
13
|
+
header: n,
|
|
14
|
+
className: p
|
|
15
|
+
}) => /* @__PURE__ */ e("div", { className: g(
|
|
16
|
+
"relative flex flex-col gap-sm rounded-2xl border border-secondary-alt-500 bg-white",
|
|
17
|
+
"px-xs py-sm",
|
|
18
|
+
p
|
|
19
|
+
), children: [
|
|
20
|
+
i && /* @__PURE__ */ r("div", { className: "absolute! -top-xxs right-xs", children: /* @__PURE__ */ r(a, { rounded: !0, kind: c.ACCENT_ALT, children: i }) }),
|
|
21
|
+
n,
|
|
25
22
|
/* @__PURE__ */ e("div", { className: "grid gap-xxs", children: [
|
|
26
23
|
/* @__PURE__ */ r(
|
|
27
24
|
o,
|
|
28
25
|
{
|
|
29
|
-
size:
|
|
30
|
-
weight:
|
|
26
|
+
size: t.MD,
|
|
27
|
+
weight: x.BOLD,
|
|
31
28
|
align: l.LEFT,
|
|
32
|
-
color:
|
|
29
|
+
color: s.SECONDARY,
|
|
33
30
|
lineHeight: !0,
|
|
34
|
-
children:
|
|
31
|
+
children: d
|
|
35
32
|
}
|
|
36
33
|
),
|
|
37
34
|
/* @__PURE__ */ r(
|
|
38
35
|
o,
|
|
39
36
|
{
|
|
40
|
-
size:
|
|
37
|
+
size: t.XS,
|
|
41
38
|
align: l.LEFT,
|
|
42
|
-
color:
|
|
39
|
+
color: s.SECONDARY_400,
|
|
43
40
|
lineHeight: !0,
|
|
44
|
-
children:
|
|
41
|
+
children: m
|
|
45
42
|
}
|
|
46
43
|
)
|
|
47
44
|
] })
|
|
48
45
|
] });
|
|
49
46
|
export {
|
|
50
|
-
|
|
47
|
+
A as UiProductCard
|
|
51
48
|
};
|
|
52
49
|
//# sourceMappingURL=UiProductCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiProductCard.js","sources":["../../../src/components/UiProductCard/UiProductCard.tsx"],"sourcesContent":["import React from \"react\";\nimport { EBadgeKind, UiPills } from \"../UiPills\";\nimport {\n\tUiTypography, ETypographySizes, ETextWeight, ETextAlign, EColors\n} from \"../UiTypography\";\n\ntype TUiProductCardProps = {\n\tbadgeText?: string;\n\ttitle?: React.ReactNode;\n\tsubtitle?: React.ReactNode;\n\theader?: React.ReactNode;\n}\n\nexport const UiProductCard: React.FC<TUiProductCardProps> = ({
|
|
1
|
+
{"version":3,"file":"UiProductCard.js","sources":["../../../src/components/UiProductCard/UiProductCard.tsx"],"sourcesContent":["import React from \"react\";\nimport { EBadgeKind, UiPills } from \"../UiPills\";\nimport {\n\tUiTypography, ETypographySizes, ETextWeight, ETextAlign, EColors\n} from \"../UiTypography\";\nimport cx from \"classnames\";\n\ntype TUiProductCardProps = {\n\tbadgeText?: string;\n\ttitle?: React.ReactNode;\n\tsubtitle?: React.ReactNode;\n\theader?: React.ReactNode;\n\tclassName?: string;\n}\n\nexport const UiProductCard: React.FC<TUiProductCardProps> = ({\n\tbadgeText,\n\ttitle,\n\tsubtitle,\n\theader,\n\tclassName\n}) => {\n\treturn (\n\t\t<div className={ cx(\n\t\t\t\"relative flex flex-col gap-sm rounded-2xl border border-secondary-alt-500 bg-white\",\n\t\t\t\"px-xs py-sm\",\n\t\t\tclassName\n\t\t) }>\n\n\t\t\t{ badgeText && (\n\t\t\t\t<div className=\"absolute! -top-xxs right-xs\">\n\t\t\t\t\t<UiPills rounded kind={ EBadgeKind.ACCENT_ALT }>{ badgeText }</UiPills>\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ header }\n\n\t\t\t<div className=\"grid gap-xxs\">\n\t\t\t\t<UiTypography\n\t\t\t\t\tsize={ ETypographySizes.MD }\n\t\t\t\t\tweight={ ETextWeight.BOLD }\n\t\t\t\t\talign={ ETextAlign.LEFT }\n\t\t\t\t\tcolor={ EColors.SECONDARY }\n\t\t\t\t\tlineHeight\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</UiTypography>\n\n\t\t\t\t<UiTypography\n\t\t\t\t\tsize={ ETypographySizes.XS }\n\t\t\t\t\talign={ ETextAlign.LEFT }\n\t\t\t\t\tcolor={ EColors.SECONDARY_400 }\n\t\t\t\t\tlineHeight\n\t\t\t\t>\n\t\t\t\t\t{ subtitle }\n\t\t\t\t</UiTypography>\n\t\t\t</div>\n\t\t</div >\n\t);\n};\n"],"names":["UiProductCard","badgeText","title","subtitle","header","className","jsxs","cx","jsx","UiPills","EBadgeKind","UiTypography","ETypographySizes","ETextWeight","ETextAlign","EColors"],"mappings":";;;;;;;;AAeO,MAAMA,IAA+C,CAAC;AAAA,EAC5D,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACD,MAEE,gBAAAC,EAAC,SAAI,WAAYC;AAAA,EAChB;AAAA,EACA;AAAA,EACAF;AAGE,GAAA,UAAA;AAAA,EAAAJ,KACA,gBAAAO,EAAA,OAAA,EAAI,WAAU,+BACd,UAAC,gBAAAA,EAAAC,GAAA,EAAQ,SAAO,IAAC,MAAOC,EAAW,YAAe,UAAAT,EAAW,CAAA,GAC9D;AAAA,EAGCG;AAAA,EAEF,gBAAAE,EAAC,OAAI,EAAA,WAAU,gBACd,UAAA;AAAA,IAAA,gBAAAE;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,MAAOC,EAAiB;AAAA,QACxB,QAASC,EAAY;AAAA,QACrB,OAAQC,EAAW;AAAA,QACnB,OAAQC,EAAQ;AAAA,QAChB,YAAU;AAAA,QAER,UAAAb;AAAA,MAAA;AAAA,IACH;AAAA,IAEA,gBAAAM;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,MAAOC,EAAiB;AAAA,QACxB,OAAQE,EAAW;AAAA,QACnB,OAAQC,EAAQ;AAAA,QAChB,YAAU;AAAA,QAER,UAAAZ;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,EACD,CAAA;AAAA,GACD;"}
|