@bikdotai/bik-component-library 0.0.839-beta.7 → 0.0.839
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/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/button/themes.js +11 -11
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js +2 -0
- package/dist/cjs/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/cjs/icons/index.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +66 -61
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/button/themes.d.ts +1 -0
- package/dist/esm/components/button/themes.js +61 -51
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.js +13 -13
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js +58 -0
- package/dist/esm/icons/Media/Visual/FormkitNeutral.js.map +1 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js +61 -0
- package/dist/esm/icons/Media/Visual/FormkitSad.js.map +1 -0
- package/dist/esm/icons/Media/Visual/index.d.ts +2 -0
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/icons/index.js +420 -416
- package/dist/esm/icons/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { COLORS as r } from "../../constants/Theme.js";
|
|
2
|
-
import { ButtonRegularAI as
|
|
3
|
-
const
|
|
2
|
+
import { ButtonRegularAI as g, ButtonLargeAI as f, BodySecondary as l, BodyCaption as b, ButtonRegular as p, ButtonLarge as h } from "../TypographyStyle.js";
|
|
3
|
+
const y = (t, n, e, a, i) => {
|
|
4
4
|
if (t === "special") return r.background.brandVeryLight;
|
|
5
5
|
if (t === "secondaryGray") return "transparent";
|
|
6
6
|
if (n === "chip")
|
|
7
7
|
return t === "text" ? "transparent" : a ? r.surface.hovered : r.surface.subdued;
|
|
8
8
|
switch (t) {
|
|
9
9
|
case "primary":
|
|
10
|
-
return
|
|
10
|
+
return i || (e ? r.background.warning.vibrant : r.background.inverseLight);
|
|
11
11
|
case "destructive":
|
|
12
12
|
return r.background.negative.vibrant;
|
|
13
13
|
case "tertiary":
|
|
@@ -36,7 +36,7 @@ const m = (t, n, e, a, o) => {
|
|
|
36
36
|
default:
|
|
37
37
|
return e ? r.content.primaryInverse : r.stroke.brand;
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, v = (t) => t ? "rgba(255, 255, 255, 0.5)" : r.content.inactive, B = (t, n) => {
|
|
40
40
|
if (t === "text")
|
|
41
41
|
return "0px";
|
|
42
42
|
if (n === "xs")
|
|
@@ -70,27 +70,30 @@ const m = (t, n, e, a, o) => {
|
|
|
70
70
|
default:
|
|
71
71
|
return "14px 12px";
|
|
72
72
|
}
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
a,
|
|
76
|
-
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
!1,
|
|
80
|
-
|
|
81
|
-
)
|
|
73
|
+
}, L = (t, n, e) => !e && n === "ai" ? t === "small" ? g : f : n === "dashRegular" ? l : t === "chip" || t === "xs" ? b : t === "small" ? p : h, d = (t, n, e) => e ? r.stroke.negative.vibrant : n ? r.surface.standard : t == "secondary" ? r.stroke.brand : r.content.placeholder, o = (t, n, e = 1) => t === "xs" ? `box-shadow: inset 0 0 0 ${e}px ${n}; border: none;` : `border: ${e}px solid ${n};`, G = (t, n, e, a, i) => n == "text" ? "border: none;" : n === "special" ? o(e, r.stroke.brandLightAlt) : n === "secondaryGray" ? o(e, r.stroke.primary) : e === "chip" ? `border: ${t === "2.0" ? 0.5 : 1}px solid ${r.stroke.primary};` : a ? n === "secondary" ? o(
|
|
74
|
+
e,
|
|
75
|
+
d(n, a, i),
|
|
76
|
+
t === "2.0" ? 0.5 : 1
|
|
77
|
+
) : "border: none;" : n === "secondary" ? o(
|
|
78
|
+
e,
|
|
79
|
+
d(n, !1, i),
|
|
80
|
+
t === "2.0" ? 0.5 : 1
|
|
81
|
+
) : "border: none;", u = (t) => t === "medium" ? `5px,
|
|
82
82
|
transparent 5px,
|
|
83
83
|
transparent 10px` : `6px,
|
|
84
84
|
transparent 6px,
|
|
85
|
-
transparent 12px`,
|
|
86
|
-
const e = parseInt(t.replace("#", ""), 16), a = Math.round(2.55 * n),
|
|
87
|
-
return `#${(16777216 + (Math.max(
|
|
88
|
-
},
|
|
89
|
-
const e = parseInt(t.replace("#", ""), 16), a = Math.round(2.55 * n),
|
|
90
|
-
return `#${(16777216 + (Math.min(
|
|
91
|
-
},
|
|
92
|
-
opacity: 0.03;` : "",
|
|
93
|
-
text-decoration-color: ${r.content.brand};`,
|
|
85
|
+
transparent 12px`, w = (t, n) => {
|
|
86
|
+
const e = parseInt(t.replace("#", ""), 16), a = Math.round(2.55 * n), i = (e >> 16) - a, c = (e >> 8 & 255) - a, s = (e & 255) - a;
|
|
87
|
+
return `#${(16777216 + (Math.max(i, 0) << 16) + (Math.max(c, 0) << 8) + Math.max(s, 0)).toString(16).slice(1)}`;
|
|
88
|
+
}, k = (t, n) => {
|
|
89
|
+
const e = parseInt(t.replace("#", ""), 16), a = Math.round(2.55 * n), i = (e >> 16) + a, c = (e >> 8 & 255) + a, s = (e & 255) + a;
|
|
90
|
+
return `#${(16777216 + (Math.min(i, 255) << 16) + (Math.min(c, 255) << 8) + Math.min(s, 255)).toString(16).slice(1)}`;
|
|
91
|
+
}, I = (t, n) => t === "ai" ? `background: ${r.surface.aiLight};` : t === "text" ? "background-color:transparent;" : t === "special" || t === "secondaryGray" ? "" : !n && t !== "primary" ? `background-color: #000000;
|
|
92
|
+
opacity: 0.03;` : "", M = (t, n) => n ? "" : `text-decoration-line: underline;
|
|
93
|
+
text-decoration-color: ${r.content.brand};`, S = (t, n) => n ? "" : t === "primary" ? `background-color: ${r.stroke.warning.lightAlt};` : "background-color: rgba(255, 255, 255, 0.1)", A = (t, n, e) => t === "special" ? `background-color: ${r.background.base}; ${o(
|
|
94
|
+
n,
|
|
95
|
+
r.stroke.primary
|
|
96
|
+
)}` : t === "secondaryGray" ? o(n, r.stroke.primary) : n === "chip" ? "background-color: transparent;" : t === "primary" || t === "destructive" ? e ? "background-color: rgba(255,255,255,0.3);" : `background-color: ${r.background.inactive};` : t === "secondary" ? e ? o(n, "rgba(255, 255, 255, 0.5)") : o(n, r.stroke.primary) : "", R = (t, n, e = d(t, !1)) => `
|
|
94
97
|
.line-top {
|
|
95
98
|
position: absolute;
|
|
96
99
|
left: 0;
|
|
@@ -101,7 +104,7 @@ const m = (t, n, e, a, o) => {
|
|
|
101
104
|
to right,
|
|
102
105
|
${e},
|
|
103
106
|
${e}
|
|
104
|
-
${
|
|
107
|
+
${u(n)}
|
|
105
108
|
);
|
|
106
109
|
}
|
|
107
110
|
.line-right {
|
|
@@ -114,7 +117,7 @@ const m = (t, n, e, a, o) => {
|
|
|
114
117
|
to bottom,
|
|
115
118
|
${e},
|
|
116
119
|
${e}
|
|
117
|
-
${
|
|
120
|
+
${u(n)}
|
|
118
121
|
);
|
|
119
122
|
}
|
|
120
123
|
.line-bottom {
|
|
@@ -127,7 +130,7 @@ const m = (t, n, e, a, o) => {
|
|
|
127
130
|
to right,
|
|
128
131
|
${e},
|
|
129
132
|
${e}
|
|
130
|
-
${
|
|
133
|
+
${u(n)}
|
|
131
134
|
);
|
|
132
135
|
}
|
|
133
136
|
.line-left {
|
|
@@ -140,18 +143,24 @@ const m = (t, n, e, a, o) => {
|
|
|
140
143
|
to bottom,
|
|
141
144
|
${e},
|
|
142
145
|
${e}
|
|
143
|
-
${
|
|
146
|
+
${u(n)}
|
|
144
147
|
);
|
|
145
148
|
}
|
|
146
|
-
`,
|
|
149
|
+
`, D = (t, n, e) => {
|
|
147
150
|
if (t === "text")
|
|
148
151
|
return `background-color: ${r.background.brandLight};
|
|
149
152
|
text-decoration-line: underline;
|
|
150
153
|
text-decoration-color: ${r.content.brand};`;
|
|
151
154
|
if (t === "special")
|
|
152
|
-
return `background-color: ${r.background.brandLight};
|
|
155
|
+
return `background-color: ${r.background.brandLight}; ${o(
|
|
156
|
+
n,
|
|
157
|
+
r.stroke.brandLightAlt
|
|
158
|
+
)}`;
|
|
153
159
|
if (t === "secondaryGray")
|
|
154
|
-
return `background-color: ${r.surface.hovered};
|
|
160
|
+
return `background-color: ${r.surface.hovered}; ${o(
|
|
161
|
+
n,
|
|
162
|
+
r.stroke.primary
|
|
163
|
+
)}`;
|
|
155
164
|
if (n === "chip")
|
|
156
165
|
return `border: 1px solid ${r.stroke.brandLightAlt};
|
|
157
166
|
background-color: ${r.background.brandLight};`;
|
|
@@ -161,13 +170,13 @@ const m = (t, n, e, a, o) => {
|
|
|
161
170
|
` : "box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);";
|
|
162
171
|
if (t === "secondary" || t === "tertiary" || t === "tertiaryGray" || t.startsWith("dash"))
|
|
163
172
|
return e ? `background-color: ${r.background.inverseLight} !important;` : `background-color: ${r.background.brandLight};`;
|
|
164
|
-
},
|
|
173
|
+
}, H = (t, n, e, a) => t === "special" ? `background-color: ${r.background.brandVeryLight};` : t === "secondaryGray" ? `background-color: ${r.surface.subdued};` : n === "chip" ? `background-color: ${r.background.base};` : t === "primary" ? a ? `background-color: ${k(
|
|
165
174
|
a,
|
|
166
175
|
50
|
|
167
|
-
)};` : `background-color: ${e ? r.background.warning.vibrant : r.background.brandLight};` : t === "destructive" ? `background-color: ${r.background.negative.light};` : "background-color: transparent;",
|
|
176
|
+
)};` : `background-color: ${e ? r.background.warning.vibrant : r.background.brandLight};` : t === "destructive" ? `background-color: ${r.background.negative.light};` : "background-color: transparent;", C = (t, n, e) => t === "special" ? o(n, r.stroke.brandLightAlt) : t === "secondaryGray" ? o(n, r.stroke.primary) : n === "chip" ? "border: none;" : t === "secondary" ? e ? o(n, r.content.secondary) : o(n, r.stroke.brandLightAlt) : "", T = (t, n) => t === "secondaryGray" ? r.content.secondary : n ? t === "primary" ? r.content.primary : r.content.primaryInverse : t === "destructive" ? r.content.negative : r.content.brand, V = (t, n, e, a, i, c) => {
|
|
168
177
|
if (t === "chip")
|
|
169
|
-
return a ? r.content.inactive :
|
|
170
|
-
if (
|
|
178
|
+
return a ? r.content.inactive : c ? r.content.primary : r.content.secondary;
|
|
179
|
+
if (i)
|
|
171
180
|
return "transparent";
|
|
172
181
|
if (n === "special")
|
|
173
182
|
return a ? r.content.inactive : r.background.inverseLight;
|
|
@@ -183,25 +192,26 @@ const m = (t, n, e, a, o) => {
|
|
|
183
192
|
return a ? r.content.inactive : r.content.secondary;
|
|
184
193
|
};
|
|
185
194
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
195
|
+
L as GetButtonTextComponent,
|
|
196
|
+
T as SpinnerColorMap,
|
|
188
197
|
A as generateDisabledStyling,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
S as generateInverseHoverBackground,
|
|
199
|
+
y as getBackgroundColor,
|
|
200
|
+
G as getBorder,
|
|
201
|
+
d as getBorderColor,
|
|
202
|
+
V as getButtonIconColor,
|
|
203
|
+
D as getClickEffect,
|
|
195
204
|
$ as getColor,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
R as getDashedBorderStyling,
|
|
206
|
+
v as getDisabledTextColor,
|
|
207
|
+
I as getHoverButtonBackground,
|
|
208
|
+
w as getHoverButtonBackgroundCustom,
|
|
209
|
+
M as getHoverButtonTextDecorationStyle,
|
|
210
|
+
u as getLinearGradientValue,
|
|
211
|
+
H as getLoadingBackground,
|
|
212
|
+
C as getLoadingBorder,
|
|
213
|
+
k as getLoadingButtonBackgroundCustom,
|
|
214
|
+
B as getPadding,
|
|
215
|
+
o as strokeStyle
|
|
206
216
|
};
|
|
207
217
|
//# sourceMappingURL=themes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sources":["../../../../src/components/button/themes.tsx"],"sourcesContent":["import { COLORS } from '@src/constants/Theme';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tButtonLarge,\n\tButtonLargeAI,\n\tButtonRegular,\n\tButtonRegularAI,\n} from '../TypographyStyle';\nimport { Size, Type } from './model';\n\nexport const getBackgroundColor = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tdarkMode?: boolean,\n\tbuttonColor?: string,\n): string => {\n\tif (type === 'special') return COLORS.background.brandVeryLight;\n\tif (type === 'secondaryGray') return 'transparent';\n\n\tif (size === 'chip') {\n\t\tif (type === 'text') {\n\t\t\treturn 'transparent';\n\t\t}\n\t\treturn darkMode ? COLORS.surface.hovered : COLORS.surface.subdued;\n\t}\n\tswitch (type) {\n\t\tcase 'primary':\n\t\t\treturn buttonColor\n\t\t\t\t? buttonColor\n\t\t\t\t: inverse\n\t\t\t\t? COLORS.background.warning.vibrant\n\t\t\t\t: COLORS.background.inverseLight;\n\t\tcase 'destructive':\n\t\t\treturn COLORS.background.negative.vibrant;\n\t\tcase 'tertiary':\n\t\t\treturn 'transparent';\n\t\tdefault:\n\t\t\treturn 'transparent';\n\t}\n};\n\nexport const getColor = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tdarkMode?: boolean,\n): string => {\n\tif (type === 'special') return COLORS.background.inverseLight;\n\tif (type === 'secondaryGray') return COLORS.content.secondary;\n\n\tif (size === 'chip') {\n\t\tif (type === 'text') {\n\t\t\treturn inverse ? COLORS.content.inactive : COLORS.content.brand;\n\t\t}\n\t\treturn darkMode ? COLORS.content.primary : COLORS.content.secondary;\n\t}\n\tswitch (type) {\n\t\tcase 'primary':\n\t\t\treturn inverse ? COLORS.content.primary : COLORS.content.primaryInverse;\n\t\tcase 'tertiaryGray':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'destructive':\n\t\t\treturn COLORS.content.primaryInverse;\n\t\tcase 'dashBold':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'dashRegular':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'ai':\n\t\t\treturn COLORS.content.ai;\n\t\tdefault:\n\t\t\treturn inverse ? COLORS.content.primaryInverse : COLORS.stroke.brand;\n\t}\n};\n\nexport const getDisabledTextColor = (inverse?: boolean) => {\n\tif (inverse) {\n\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t}\n\treturn COLORS.content.inactive;\n};\n\nexport const getPadding = (type: Type, size: Size) => {\n\tif (type === 'text') {\n\t\treturn '0px';\n\t} else if (size === 'xs') {\n\t\treturn '4px 6px';\n\t} else if (size === 'chip') {\n\t\treturn '4px 8px';\n\t} else if (size === 'small') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '6px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '6px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '6px 12px';\n\t\t}\n\t} else if (size === 'medium') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '10px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '10px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '10px 12px';\n\t\t}\n\t} else if (size === 'large') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '14px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '14px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '14px 12px';\n\t\t}\n\t}\n};\nexport const GetButtonTextComponent = (\n\tsize: Size,\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (!disabled && type === 'ai') {\n\t\tif (size === 'small') {\n\t\t\treturn ButtonRegularAI;\n\t\t} else {\n\t\t\treturn ButtonLargeAI;\n\t\t}\n\t}\n\n\tif (type === 'dashRegular') {\n\t\treturn BodySecondary;\n\t}\n\tif (size === 'chip' || size === 'xs') {\n\t\treturn BodyCaption;\n\t} else if (size === 'small') {\n\t\treturn ButtonRegular;\n\t}\n\treturn ButtonLarge;\n};\n\nexport const getBorderColor = (\n\ttype: Type,\n\tinverse?: boolean,\n\terror?: boolean,\n): string => {\n\tif (error) {\n\t\treturn COLORS.stroke.negative.vibrant;\n\t}\n\n\tif (inverse) {\n\t\treturn COLORS.surface.standard;\n\t}\n\tif (type == 'secondary') {\n\t\treturn COLORS.stroke.brand;\n\t}\n\treturn COLORS.content.placeholder;\n};\n\nexport const getBorder = (\n\tversion: '1.0' | '2.0' | '3.0',\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\terror?: boolean,\n): string => {\n\tif (type == 'text') {\n\t\treturn 'border: none;';\n\t}\n\tif (type === 'special') {\n\t\treturn `border: 1px solid ${COLORS.stroke.brandLightAlt};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: ${version === '2.0' ? 0.5 : 1}px solid ${\n\t\t\tCOLORS.stroke.primary\n\t\t};`;\n\t}\n\tif (inverse) {\n\t\tif (type === 'secondary') {\n\t\t\treturn `border: ${version === '2.0' ? 0.5 : 1}px solid ${getBorderColor(\n\t\t\t\ttype,\n\t\t\t\tinverse,\n\t\t\t\terror,\n\t\t\t)};`;\n\t\t}\n\t\treturn 'border: none;';\n\t}\n\n\tif (type === 'secondary') {\n\t\treturn `border: ${version === '2.0' ? 0.5 : 1}px solid ${getBorderColor(\n\t\t\ttype,\n\t\t\tfalse,\n\t\t\terror,\n\t\t)};`;\n\t}\n\treturn 'border: none;';\n};\n\nexport const getLinearGradientValue = (size: Size): string => {\n\tif (size === 'medium') {\n\t\treturn `5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px`;\n\t}\n\treturn `6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px`;\n};\n\n/**\n * Adjusts the brightness of a given hex color by a specified percentage.\n * Below function is used to generate a hover effect for button backgrounds.\n *\n * @param {string} color - The hex color code to be adjusted (e.g., \"#ff0000\").\n * @param {number} percent - The percentage by which to darken the color. Positive values darken the color.\n * @returns {string} - The adjusted hex color code.\n *\n * @example\n * // Darken the color #ff0000 (red) by 10%\n * const darkerRed = getHoverButtonBackgroundCustom(\"#ff0000\", 10);\n * console.log(darkerRed); // Output might be \"#e60000\"\n */\n\nexport const getHoverButtonBackgroundCustom = (\n\tcolor: string,\n\tpercent: number,\n) => {\n\tconst num = parseInt(color.replace('#', ''), 16),\n\t\tamt = Math.round(2.55 * percent),\n\t\tR = (num >> 16) - amt,\n\t\tG = ((num >> 8) & 0x00ff) - amt,\n\t\tB = (num & 0x0000ff) - amt;\n\n\treturn `#${(\n\t\t0x1000000 +\n\t\t(Math.max(R, 0) << 16) +\n\t\t(Math.max(G, 0) << 8) +\n\t\tMath.max(B, 0)\n\t)\n\t\t.toString(16)\n\t\t.slice(1)}`;\n};\n\n/**\n * Generates a new color by adjusting the brightness of the given color by a specified percentage.\n *\n * @param color - The original color in hexadecimal format (e.g., \"#RRGGBB\").\n * @param percent - The percentage to adjust the brightness. Positive values will lighten the color, while negative values will darken it.\n * @returns The new color in hexadecimal format after adjusting the brightness.\n *\n * @example\n * // Lighten the color by 20%\n * const newColor = getLoadingButtonBackgroundCustom(\"#ff0000\", 20); // \"#ff3333\"\n *\n * @example\n * // Darken the color by 10%\n * const newColor = getLoadingButtonBackgroundCustom(\"#00ff00\", -10); // \"#00e600\"\n */\nexport const getLoadingButtonBackgroundCustom = (\n\tcolor: string,\n\tpercent: number,\n) => {\n\tconst num = parseInt(color.replace('#', ''), 16),\n\t\tamt = Math.round(2.55 * percent),\n\t\tR = (num >> 16) + amt,\n\t\tG = ((num >> 8) & 0x00ff) + amt,\n\t\tB = (num & 0x0000ff) + amt;\n\n\treturn `#${(\n\t\t0x1000000 +\n\t\t(Math.min(R, 255) << 16) +\n\t\t(Math.min(G, 255) << 8) +\n\t\tMath.min(B, 255)\n\t)\n\t\t.toString(16)\n\t\t.slice(1)}`;\n};\n\nexport const getHoverButtonBackground = (type: Type, inverse?: boolean) => {\n\tif (type === 'ai') {\n\t\treturn `background: ${COLORS.surface.aiLight};`;\n\t}\n\n\tif (type === 'text') {\n\t\treturn `background-color:transparent;`;\n\t}\n\tif (type === 'special' || type === 'secondaryGray') {\n\t\treturn '';\n\t}\n\tif (!inverse && type !== 'primary') {\n\t\treturn `background-color: #000000;\n\t\t\t\topacity: 0.03;`;\n\t}\n\n\treturn ``;\n};\n\nexport const getHoverButtonTextDecorationStyle = (\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (disabled) {\n\t\treturn '';\n\t}\n\treturn `text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${COLORS.content.brand};`;\n};\n\nexport const generateInverseHoverBackground = (\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (disabled) {\n\t\treturn '';\n\t}\n\tif (type === 'primary') {\n\t\treturn `background-color: ${COLORS.stroke.warning.lightAlt};`;\n\t}\n\treturn `background-color: rgba(255, 255, 255, 0.1)`;\n};\n\nexport const generateDisabledStyling = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n) => {\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.base}; border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `background-color: transparent;`;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\treturn inverse\n\t\t\t? 'background-color: rgba(255,255,255,0.3);'\n\t\t\t: `background-color: ${COLORS.background.inactive};`;\n\t} else if (type === 'secondary') {\n\t\treturn inverse\n\t\t\t? `border: 1px solid rgba(255, 255, 255, 0.5);`\n\t\t\t: `border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\treturn '';\n};\n\nexport const getDashedBorderStyling = (\n\ttype: Type,\n\tsize: Size,\n\tborderColor: string = getBorderColor(type, false),\n) => {\n\treturn `\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t`;\n};\n\nexport const getClickEffect = (type: Type, size: Size, inverse?: boolean) => {\n\tif (type === 'text') {\n\t\treturn `background-color: ${COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${COLORS.content.brand};`;\n\t}\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.brandLight}; border: 1px solid ${COLORS.stroke.brandLightAlt};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `background-color: ${COLORS.surface.hovered}; border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: 1px solid ${COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${COLORS.background.brandLight};`;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\tif (inverse) {\n\t\t\treturn `background-color: ${COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`;\n\t\t}\n\t\treturn 'box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);';\n\t} else if (\n\t\ttype === 'secondary' ||\n\t\ttype === 'tertiary' ||\n\t\ttype === 'tertiaryGray' ||\n\t\ttype.startsWith('dash')\n\t) {\n\t\treturn inverse\n\t\t\t? `background-color: ${COLORS.background.inverseLight} !important;`\n\t\t\t: `background-color: ${COLORS.background.brandLight};`;\n\t}\n};\nexport const getLoadingBackground = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tbuttonColor?: string,\n) => {\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.brandVeryLight};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `background-color: ${COLORS.surface.subdued};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `background-color: ${COLORS.background.base};`;\n\t}\n\tif (type === 'primary') {\n\t\tif (buttonColor) {\n\t\t\treturn `background-color: ${getLoadingButtonBackgroundCustom(\n\t\t\t\tbuttonColor,\n\t\t\t\t50,\n\t\t\t)};`;\n\t\t}\n\t\treturn `background-color: ${\n\t\t\tinverse ? COLORS.background.warning.vibrant : COLORS.background.brandLight\n\t\t};`;\n\t}\n\tif (type === 'destructive') {\n\t\treturn `background-color: ${COLORS.background.negative.light};`;\n\t}\n\treturn 'background-color: transparent;';\n};\n\nexport const getLoadingBorder = (type: Type, size: Size, inverse?: boolean) => {\n\tif (type === 'special') {\n\t\treturn `border: 1px solid ${COLORS.stroke.brandLightAlt};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `border: 1px solid ${COLORS.stroke.primary};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: none;`;\n\t}\n\tif (type === 'secondary') {\n\t\treturn inverse\n\t\t\t? `border: 1px solid ${COLORS.content.secondary};`\n\t\t\t: `border: 1px solid ${COLORS.stroke.brandLightAlt};`;\n\t}\n\treturn '';\n};\n\nexport const SpinnerColorMap = (type: Type, inverse?: boolean) => {\n\tif (type === 'secondaryGray') return COLORS.content.secondary;\n\tif (inverse) {\n\t\tif (type === 'primary') {\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\treturn COLORS.content.primaryInverse;\n\t}\n\tif (type === 'destructive') {\n\t\treturn COLORS.content.negative;\n\t}\n\treturn COLORS.content.brand;\n};\n\nexport const getButtonIconColor = (\n\tsize: Size,\n\ttype: Type,\n\tinverse?: boolean,\n\tdisabled?: boolean,\n\tisLoading?: boolean,\n\tdarkMode?: boolean,\n) => {\n\tif (size === 'chip') {\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t} else if (darkMode) {\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\treturn COLORS.content.secondary;\n\t}\n\tif (isLoading) {\n\t\treturn 'transparent';\n\t}\n\tif (type === 'special') {\n\t\treturn disabled ? COLORS.content.inactive : COLORS.background.inverseLight;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn disabled ? COLORS.content.inactive : COLORS.content.secondary;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.primaryInverse;\n\t} else if (type === 'secondary') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primaryInverse;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.brand;\n\t} else if (type === 'tertiary') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primaryInverse;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.brand;\n\t} else if (type === 'tertiaryGray' || type.startsWith('dash')) {\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.secondary;\n\t}\n};\n"],"names":["getBackgroundColor","type","size","inverse","darkMode","buttonColor","COLORS","getColor","getDisabledTextColor","getPadding","GetButtonTextComponent","disabled","ButtonRegularAI","ButtonLargeAI","BodySecondary","BodyCaption","ButtonRegular","ButtonLarge","getBorderColor","error","getBorder","version","getLinearGradientValue","getHoverButtonBackgroundCustom","color","percent","num","amt","R","G","B","getLoadingButtonBackgroundCustom","getHoverButtonBackground","getHoverButtonTextDecorationStyle","generateInverseHoverBackground","generateDisabledStyling","getDashedBorderStyling","borderColor","getClickEffect","getLoadingBackground","getLoadingBorder","SpinnerColorMap","getButtonIconColor","isLoading"],"mappings":";;AAWO,MAAMA,IAAqB,CACjCC,GACAC,GACAC,GACAC,GACAC,MACY;AACZ,MAAIJ,MAAS,UAAW,QAAOK,EAAO,WAAW;AACjD,MAAIL,MAAS,gBAAiB,QAAO;AAErC,MAAIC,MAAS;AACZ,WAAID,MAAS,SACL,gBAEDG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1C,MAAS;AACZ,WAAOU,IAAWL,EAAO,QAAQ,WAAWA,EAAO,WAAW;AAE/D,MAAIL,MAAS;AACZ,WAAOU,IAAWL,EAAO,QAAQ,WAAWA,EAAO,QAAQ;AAE5D,MAAIL,MAAS,aAAaA,MAAS;AAClC,WAAIE,IACCQ,IACI,6BAEDL,EAAO,QAAQ,UAEnBK,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;AACvB,MAAWL,MAAS;AACnB,WAAIE,IACCQ,IACI,6BAEDL,EAAO,QAAQ,iBAEnBK,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;AACvB,MAAWL,MAAS;AACnB,WAAIE,IACCQ,IACI,6BAEDL,EAAO,QAAQ,iBAEnBK,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;MACZL,MAAS,kBAAkBA,EAAK,WAAW,MAAM;AAC3D,WAAIU,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;AAExB;"}
|
|
1
|
+
{"version":3,"file":"themes.js","sources":["../../../../src/components/button/themes.tsx"],"sourcesContent":["import { COLORS } from '@src/constants/Theme';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tButtonLarge,\n\tButtonLargeAI,\n\tButtonRegular,\n\tButtonRegularAI,\n} from '../TypographyStyle';\nimport { Size, Type } from './model';\n\nexport const getBackgroundColor = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tdarkMode?: boolean,\n\tbuttonColor?: string,\n): string => {\n\tif (type === 'special') return COLORS.background.brandVeryLight;\n\tif (type === 'secondaryGray') return 'transparent';\n\n\tif (size === 'chip') {\n\t\tif (type === 'text') {\n\t\t\treturn 'transparent';\n\t\t}\n\t\treturn darkMode ? COLORS.surface.hovered : COLORS.surface.subdued;\n\t}\n\tswitch (type) {\n\t\tcase 'primary':\n\t\t\treturn buttonColor\n\t\t\t\t? buttonColor\n\t\t\t\t: inverse\n\t\t\t\t? COLORS.background.warning.vibrant\n\t\t\t\t: COLORS.background.inverseLight;\n\t\tcase 'destructive':\n\t\t\treturn COLORS.background.negative.vibrant;\n\t\tcase 'tertiary':\n\t\t\treturn 'transparent';\n\t\tdefault:\n\t\t\treturn 'transparent';\n\t}\n};\n\nexport const getColor = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tdarkMode?: boolean,\n): string => {\n\tif (type === 'special') return COLORS.background.inverseLight;\n\tif (type === 'secondaryGray') return COLORS.content.secondary;\n\n\tif (size === 'chip') {\n\t\tif (type === 'text') {\n\t\t\treturn inverse ? COLORS.content.inactive : COLORS.content.brand;\n\t\t}\n\t\treturn darkMode ? COLORS.content.primary : COLORS.content.secondary;\n\t}\n\tswitch (type) {\n\t\tcase 'primary':\n\t\t\treturn inverse ? COLORS.content.primary : COLORS.content.primaryInverse;\n\t\tcase 'tertiaryGray':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'destructive':\n\t\t\treturn COLORS.content.primaryInverse;\n\t\tcase 'dashBold':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'dashRegular':\n\t\t\treturn COLORS.content.secondary;\n\t\tcase 'ai':\n\t\t\treturn COLORS.content.ai;\n\t\tdefault:\n\t\t\treturn inverse ? COLORS.content.primaryInverse : COLORS.stroke.brand;\n\t}\n};\n\nexport const getDisabledTextColor = (inverse?: boolean) => {\n\tif (inverse) {\n\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t}\n\treturn COLORS.content.inactive;\n};\n\nexport const getPadding = (type: Type, size: Size) => {\n\tif (type === 'text') {\n\t\treturn '0px';\n\t} else if (size === 'xs') {\n\t\treturn '4px 6px';\n\t} else if (size === 'chip') {\n\t\treturn '4px 8px';\n\t} else if (size === 'small') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '6px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '6px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '6px 12px';\n\t\t}\n\t} else if (size === 'medium') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '10px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '10px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '10px 12px';\n\t\t}\n\t} else if (size === 'large') {\n\t\tswitch (type) {\n\t\t\tcase 'tertiary':\n\t\t\t\treturn '14px 4px';\n\t\t\tcase 'tertiaryGray':\n\t\t\t\treturn '14px 4px';\n\t\t\tdefault:\n\t\t\t\treturn '14px 12px';\n\t\t}\n\t}\n};\nexport const GetButtonTextComponent = (\n\tsize: Size,\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (!disabled && type === 'ai') {\n\t\tif (size === 'small') {\n\t\t\treturn ButtonRegularAI;\n\t\t} else {\n\t\t\treturn ButtonLargeAI;\n\t\t}\n\t}\n\n\tif (type === 'dashRegular') {\n\t\treturn BodySecondary;\n\t}\n\tif (size === 'chip' || size === 'xs') {\n\t\treturn BodyCaption;\n\t} else if (size === 'small') {\n\t\treturn ButtonRegular;\n\t}\n\treturn ButtonLarge;\n};\n\nexport const getBorderColor = (\n\ttype: Type,\n\tinverse?: boolean,\n\terror?: boolean,\n): string => {\n\tif (error) {\n\t\treturn COLORS.stroke.negative.vibrant;\n\t}\n\n\tif (inverse) {\n\t\treturn COLORS.surface.standard;\n\t}\n\tif (type == 'secondary') {\n\t\treturn COLORS.stroke.brand;\n\t}\n\treturn COLORS.content.placeholder;\n};\n\nexport const strokeStyle = (size: Size, color: string, width = 1): string =>\n\tsize === 'xs'\n\t\t? `box-shadow: inset 0 0 0 ${width}px ${color}; border: none;`\n\t\t: `border: ${width}px solid ${color};`;\n\nexport const getBorder = (\n\tversion: '1.0' | '2.0' | '3.0',\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\terror?: boolean,\n): string => {\n\tif (type == 'text') {\n\t\treturn 'border: none;';\n\t}\n\tif (type === 'special') {\n\t\treturn strokeStyle(size, COLORS.stroke.brandLightAlt);\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn strokeStyle(size, COLORS.stroke.primary);\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: ${version === '2.0' ? 0.5 : 1}px solid ${\n\t\t\tCOLORS.stroke.primary\n\t\t};`;\n\t}\n\tif (inverse) {\n\t\tif (type === 'secondary') {\n\t\t\treturn strokeStyle(\n\t\t\t\tsize,\n\t\t\t\tgetBorderColor(type, inverse, error),\n\t\t\t\tversion === '2.0' ? 0.5 : 1,\n\t\t\t);\n\t\t}\n\t\treturn 'border: none;';\n\t}\n\n\tif (type === 'secondary') {\n\t\treturn strokeStyle(\n\t\t\tsize,\n\t\t\tgetBorderColor(type, false, error),\n\t\t\tversion === '2.0' ? 0.5 : 1,\n\t\t);\n\t}\n\treturn 'border: none;';\n};\n\nexport const getLinearGradientValue = (size: Size): string => {\n\tif (size === 'medium') {\n\t\treturn `5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px`;\n\t}\n\treturn `6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px`;\n};\n\n/**\n * Adjusts the brightness of a given hex color by a specified percentage.\n * Below function is used to generate a hover effect for button backgrounds.\n *\n * @param {string} color - The hex color code to be adjusted (e.g., \"#ff0000\").\n * @param {number} percent - The percentage by which to darken the color. Positive values darken the color.\n * @returns {string} - The adjusted hex color code.\n *\n * @example\n * // Darken the color #ff0000 (red) by 10%\n * const darkerRed = getHoverButtonBackgroundCustom(\"#ff0000\", 10);\n * console.log(darkerRed); // Output might be \"#e60000\"\n */\n\nexport const getHoverButtonBackgroundCustom = (\n\tcolor: string,\n\tpercent: number,\n) => {\n\tconst num = parseInt(color.replace('#', ''), 16),\n\t\tamt = Math.round(2.55 * percent),\n\t\tR = (num >> 16) - amt,\n\t\tG = ((num >> 8) & 0x00ff) - amt,\n\t\tB = (num & 0x0000ff) - amt;\n\n\treturn `#${(\n\t\t0x1000000 +\n\t\t(Math.max(R, 0) << 16) +\n\t\t(Math.max(G, 0) << 8) +\n\t\tMath.max(B, 0)\n\t)\n\t\t.toString(16)\n\t\t.slice(1)}`;\n};\n\n/**\n * Generates a new color by adjusting the brightness of the given color by a specified percentage.\n *\n * @param color - The original color in hexadecimal format (e.g., \"#RRGGBB\").\n * @param percent - The percentage to adjust the brightness. Positive values will lighten the color, while negative values will darken it.\n * @returns The new color in hexadecimal format after adjusting the brightness.\n *\n * @example\n * // Lighten the color by 20%\n * const newColor = getLoadingButtonBackgroundCustom(\"#ff0000\", 20); // \"#ff3333\"\n *\n * @example\n * // Darken the color by 10%\n * const newColor = getLoadingButtonBackgroundCustom(\"#00ff00\", -10); // \"#00e600\"\n */\nexport const getLoadingButtonBackgroundCustom = (\n\tcolor: string,\n\tpercent: number,\n) => {\n\tconst num = parseInt(color.replace('#', ''), 16),\n\t\tamt = Math.round(2.55 * percent),\n\t\tR = (num >> 16) + amt,\n\t\tG = ((num >> 8) & 0x00ff) + amt,\n\t\tB = (num & 0x0000ff) + amt;\n\n\treturn `#${(\n\t\t0x1000000 +\n\t\t(Math.min(R, 255) << 16) +\n\t\t(Math.min(G, 255) << 8) +\n\t\tMath.min(B, 255)\n\t)\n\t\t.toString(16)\n\t\t.slice(1)}`;\n};\n\nexport const getHoverButtonBackground = (type: Type, inverse?: boolean) => {\n\tif (type === 'ai') {\n\t\treturn `background: ${COLORS.surface.aiLight};`;\n\t}\n\n\tif (type === 'text') {\n\t\treturn `background-color:transparent;`;\n\t}\n\tif (type === 'special' || type === 'secondaryGray') {\n\t\treturn '';\n\t}\n\tif (!inverse && type !== 'primary') {\n\t\treturn `background-color: #000000;\n\t\t\t\topacity: 0.03;`;\n\t}\n\n\treturn ``;\n};\n\nexport const getHoverButtonTextDecorationStyle = (\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (disabled) {\n\t\treturn '';\n\t}\n\treturn `text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${COLORS.content.brand};`;\n};\n\nexport const generateInverseHoverBackground = (\n\ttype: Type,\n\tdisabled?: boolean,\n) => {\n\tif (disabled) {\n\t\treturn '';\n\t}\n\tif (type === 'primary') {\n\t\treturn `background-color: ${COLORS.stroke.warning.lightAlt};`;\n\t}\n\treturn `background-color: rgba(255, 255, 255, 0.1)`;\n};\n\nexport const generateDisabledStyling = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n) => {\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.base}; ${strokeStyle(\n\t\t\tsize,\n\t\t\tCOLORS.stroke.primary,\n\t\t)}`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn strokeStyle(size, COLORS.stroke.primary);\n\t}\n\tif (size === 'chip') {\n\t\treturn `background-color: transparent;`;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\treturn inverse\n\t\t\t? 'background-color: rgba(255,255,255,0.3);'\n\t\t\t: `background-color: ${COLORS.background.inactive};`;\n\t} else if (type === 'secondary') {\n\t\treturn inverse\n\t\t\t? strokeStyle(size, 'rgba(255, 255, 255, 0.5)')\n\t\t\t: strokeStyle(size, COLORS.stroke.primary);\n\t}\n\treturn '';\n};\n\nexport const getDashedBorderStyling = (\n\ttype: Type,\n\tsize: Size,\n\tborderColor: string = getBorderColor(type, false),\n) => {\n\treturn `\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${borderColor},\n\t\t\t${borderColor}\n\t\t\t\t${getLinearGradientValue(size)}\n\t\t);\n\t}\n\t`;\n};\n\nexport const getClickEffect = (type: Type, size: Size, inverse?: boolean) => {\n\tif (type === 'text') {\n\t\treturn `background-color: ${COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${COLORS.content.brand};`;\n\t}\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.brandLight}; ${strokeStyle(\n\t\t\tsize,\n\t\t\tCOLORS.stroke.brandLightAlt,\n\t\t)}`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `background-color: ${COLORS.surface.hovered}; ${strokeStyle(\n\t\t\tsize,\n\t\t\tCOLORS.stroke.primary,\n\t\t)}`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: 1px solid ${COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${COLORS.background.brandLight};`;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\tif (inverse) {\n\t\t\treturn `background-color: ${COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`;\n\t\t}\n\t\treturn 'box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);';\n\t} else if (\n\t\ttype === 'secondary' ||\n\t\ttype === 'tertiary' ||\n\t\ttype === 'tertiaryGray' ||\n\t\ttype.startsWith('dash')\n\t) {\n\t\treturn inverse\n\t\t\t? `background-color: ${COLORS.background.inverseLight} !important;`\n\t\t\t: `background-color: ${COLORS.background.brandLight};`;\n\t}\n};\nexport const getLoadingBackground = (\n\ttype: Type,\n\tsize: Size,\n\tinverse?: boolean,\n\tbuttonColor?: string,\n) => {\n\tif (type === 'special') {\n\t\treturn `background-color: ${COLORS.background.brandVeryLight};`;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn `background-color: ${COLORS.surface.subdued};`;\n\t}\n\tif (size === 'chip') {\n\t\treturn `background-color: ${COLORS.background.base};`;\n\t}\n\tif (type === 'primary') {\n\t\tif (buttonColor) {\n\t\t\treturn `background-color: ${getLoadingButtonBackgroundCustom(\n\t\t\t\tbuttonColor,\n\t\t\t\t50,\n\t\t\t)};`;\n\t\t}\n\t\treturn `background-color: ${\n\t\t\tinverse ? COLORS.background.warning.vibrant : COLORS.background.brandLight\n\t\t};`;\n\t}\n\tif (type === 'destructive') {\n\t\treturn `background-color: ${COLORS.background.negative.light};`;\n\t}\n\treturn 'background-color: transparent;';\n};\n\nexport const getLoadingBorder = (type: Type, size: Size, inverse?: boolean) => {\n\tif (type === 'special') {\n\t\treturn strokeStyle(size, COLORS.stroke.brandLightAlt);\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn strokeStyle(size, COLORS.stroke.primary);\n\t}\n\tif (size === 'chip') {\n\t\treturn `border: none;`;\n\t}\n\tif (type === 'secondary') {\n\t\treturn inverse\n\t\t\t? strokeStyle(size, COLORS.content.secondary)\n\t\t\t: strokeStyle(size, COLORS.stroke.brandLightAlt);\n\t}\n\treturn '';\n};\n\nexport const SpinnerColorMap = (type: Type, inverse?: boolean) => {\n\tif (type === 'secondaryGray') return COLORS.content.secondary;\n\tif (inverse) {\n\t\tif (type === 'primary') {\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\treturn COLORS.content.primaryInverse;\n\t}\n\tif (type === 'destructive') {\n\t\treturn COLORS.content.negative;\n\t}\n\treturn COLORS.content.brand;\n};\n\nexport const getButtonIconColor = (\n\tsize: Size,\n\ttype: Type,\n\tinverse?: boolean,\n\tdisabled?: boolean,\n\tisLoading?: boolean,\n\tdarkMode?: boolean,\n) => {\n\tif (size === 'chip') {\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t} else if (darkMode) {\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\treturn COLORS.content.secondary;\n\t}\n\tif (isLoading) {\n\t\treturn 'transparent';\n\t}\n\tif (type === 'special') {\n\t\treturn disabled ? COLORS.content.inactive : COLORS.background.inverseLight;\n\t}\n\tif (type === 'secondaryGray') {\n\t\treturn disabled ? COLORS.content.inactive : COLORS.content.secondary;\n\t}\n\tif (type === 'primary' || type === 'destructive') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primary;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.primaryInverse;\n\t} else if (type === 'secondary') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primaryInverse;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.brand;\n\t} else if (type === 'tertiary') {\n\t\tif (inverse) {\n\t\t\tif (disabled) {\n\t\t\t\treturn 'rgba(255, 255, 255, 0.5)';\n\t\t\t}\n\t\t\treturn COLORS.content.primaryInverse;\n\t\t}\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.brand;\n\t} else if (type === 'tertiaryGray' || type.startsWith('dash')) {\n\t\tif (disabled) {\n\t\t\treturn COLORS.content.inactive;\n\t\t}\n\t\treturn COLORS.content.secondary;\n\t}\n};\n"],"names":["getBackgroundColor","type","size","inverse","darkMode","buttonColor","COLORS","getColor","getDisabledTextColor","getPadding","GetButtonTextComponent","disabled","ButtonRegularAI","ButtonLargeAI","BodySecondary","BodyCaption","ButtonRegular","ButtonLarge","getBorderColor","error","strokeStyle","color","width","getBorder","version","getLinearGradientValue","getHoverButtonBackgroundCustom","percent","num","amt","R","G","B","getLoadingButtonBackgroundCustom","getHoverButtonBackground","getHoverButtonTextDecorationStyle","generateInverseHoverBackground","generateDisabledStyling","getDashedBorderStyling","borderColor","getClickEffect","getLoadingBackground","getLoadingBorder","SpinnerColorMap","getButtonIconColor","isLoading"],"mappings":";;AAWO,MAAMA,IAAqB,CACjCC,GACAC,GACAC,GACAC,GACAC,MACY;AACZ,MAAIJ,MAAS,UAAW,QAAOK,EAAO,WAAW;AACjD,MAAIL,MAAS,gBAAiB,QAAO;AAErC,MAAIC,MAAS;AACZ,WAAID,MAAS,SACL,gBAEDG,IAAWE,EAAO,QAAQ,UAAUA,EAAO,QAAQ;AAE3D,UAAQL,GAAA;AAAA,IACP,KAAK;AACJ,aAAOI,MAEJF,IACAG,EAAO,WAAW,QAAQ,UAC1BA,EAAO,WAAW;AAAA,IACtB,KAAK;AACJ,aAAOA,EAAO,WAAW,SAAS;AAAA,IACnC,KAAK;AACJ,aAAO;AAAA,IACR;AACC,aAAO;AAAA,EAAA;AAEV,GAEaC,IAAW,CACvBN,GACAC,GACAC,GACAC,MACY;AACZ,MAAIH,MAAS,UAAW,QAAOK,EAAO,WAAW;AACjD,MAAIL,MAAS,gBAAiB,QAAOK,EAAO,QAAQ;AAEpD,MAAIJ,MAAS;AACZ,WAAID,MAAS,SACLE,IAAUG,EAAO,QAAQ,WAAWA,EAAO,QAAQ,QAEpDF,IAAWE,EAAO,QAAQ,UAAUA,EAAO,QAAQ;AAE3D,UAAQL,GAAA;AAAA,IACP,KAAK;AACJ,aAAOE,IAAUG,EAAO,QAAQ,UAAUA,EAAO,QAAQ;AAAA,IAC1D,KAAK;AACJ,aAAOA,EAAO,QAAQ;AAAA,IACvB,KAAK;AACJ,aAAOA,EAAO,QAAQ;AAAA,IACvB,KAAK;AACJ,aAAOA,EAAO,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ACI,6BAEDL,EAAO,QAAQ,iBAEnBK,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;MACZL,MAAS,kBAAkBA,EAAK,WAAW,MAAM;AAC3D,WAAIU,IACIL,EAAO,QAAQ,WAEhBA,EAAO,QAAQ;AAExB;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { DropdownPopover as
|
|
2
|
+
import { DropdownPopover as a } from "../dropdown/DropdownPopover/index.js";
|
|
3
3
|
import { SpinnerColorMap as p } from "../button/themes.js";
|
|
4
|
-
import { DropdownButtonStyle as
|
|
4
|
+
import { DropdownButtonStyle as u, LoaderContainer as m } from "./DropdownButton.style.js";
|
|
5
5
|
import { IconButton as l } from "../icon-button/IconButton.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { Spinner as
|
|
6
|
+
import { Tooltip as x } from "../tooltips/Tooltip.js";
|
|
7
|
+
import { Spinner as y } from "../spinner/Spinner.js";
|
|
8
8
|
import { Button as b } from "../button/Button.js";
|
|
9
9
|
const S = (o) => {
|
|
10
10
|
const e = !!o.iconButtonProps, r = e ? o.iconButtonProps?.disabled : o.buttonProps?.disabled;
|
|
@@ -21,7 +21,7 @@ const S = (o) => {
|
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
return /* @__PURE__ */ s(
|
|
24
|
-
|
|
24
|
+
u,
|
|
25
25
|
{
|
|
26
26
|
type: void 0,
|
|
27
27
|
disabled: r,
|
|
@@ -30,7 +30,7 @@ const S = (o) => {
|
|
|
30
30
|
iconButtonSize: n?.size ?? "default",
|
|
31
31
|
children: [
|
|
32
32
|
i ? /* @__PURE__ */ t(
|
|
33
|
-
|
|
33
|
+
x,
|
|
34
34
|
{
|
|
35
35
|
body: i.body,
|
|
36
36
|
tooltipContent: i.tooltipContent,
|
|
@@ -39,7 +39,7 @@ const S = (o) => {
|
|
|
39
39
|
}
|
|
40
40
|
) : d,
|
|
41
41
|
/* @__PURE__ */ t("div", { className: "dd-button-divider" }),
|
|
42
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(
|
|
42
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ t(a, { ...o.dropdownProps, isChildLoading: !1, children: /* @__PURE__ */ t(
|
|
43
43
|
l,
|
|
44
44
|
{
|
|
45
45
|
Icon: o.iconProps,
|
|
@@ -63,18 +63,18 @@ const S = (o) => {
|
|
|
63
63
|
LeadingIcon: B,
|
|
64
64
|
LeadingIconStyles: f,
|
|
65
65
|
IconComponent: R,
|
|
66
|
-
TrailingIcon:
|
|
66
|
+
TrailingIcon: h,
|
|
67
67
|
...c
|
|
68
68
|
} = o.buttonProps;
|
|
69
69
|
return /* @__PURE__ */ s(
|
|
70
|
-
|
|
70
|
+
u,
|
|
71
71
|
{
|
|
72
72
|
type: o.buttonProps.buttonType,
|
|
73
73
|
disabled: o.buttonProps.disabled,
|
|
74
74
|
size: o.buttonProps.size,
|
|
75
75
|
children: [
|
|
76
76
|
o.buttonProps?.isLoading && /* @__PURE__ */ t(m, { type: o.buttonProps.buttonType, children: /* @__PURE__ */ t(
|
|
77
|
-
|
|
77
|
+
y,
|
|
78
78
|
{
|
|
79
79
|
className: "spinner",
|
|
80
80
|
size: "small",
|
|
@@ -94,13 +94,13 @@ const S = (o) => {
|
|
|
94
94
|
borderTopLeftRadius: "4px",
|
|
95
95
|
borderBottomLeftRadius: "4px",
|
|
96
96
|
borderRight: "0px",
|
|
97
|
-
...o.buttonProps?.size === "xs" ? { border: "none", borderRadius: "0px" } : {}
|
|
97
|
+
...o.buttonProps?.size === "xs" ? { border: "none", boxShadow: "none", borderRadius: "0px" } : {}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
101
|
/* @__PURE__ */ t("div", { className: "dd-button-divider" }),
|
|
102
102
|
/* @__PURE__ */ t(
|
|
103
|
-
|
|
103
|
+
a,
|
|
104
104
|
{
|
|
105
105
|
...o.dropdownProps,
|
|
106
106
|
isChildLoading: o.buttonProps?.isLoading,
|
|
@@ -115,7 +115,7 @@ const S = (o) => {
|
|
|
115
115
|
borderRadius: "0px",
|
|
116
116
|
borderTopRightRadius: "4px",
|
|
117
117
|
borderBottomRightRadius: "4px",
|
|
118
|
-
...o.buttonProps?.size === "xs" ? { border: "none", borderRadius: "0px" } : {}
|
|
118
|
+
...o.buttonProps?.size === "xs" ? { border: "none", boxShadow: "none", borderRadius: "0px" } : {}
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","sources":["../../../../src/components/dropdown-button/DropdownButton.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownPopover, DropdownProps } from '@src/components/dropdown';\nimport { Button } from '../button';\nimport { ButtonProps } from '../button/model';\nimport { SpinnerColorMap } from '../button/themes';\nimport { IconButton } from '../icon-button';\nimport { IconButtonProps } from '../icon-button/model';\nimport { Spinner } from '../spinner';\nimport { Placement, Tooltip } from '../tooltips';\nimport { DropdownButtonStyle, LoaderContainer } from './DropdownButton.style';\n\nexport interface DropdownButtonProps {\n\tdropdownProps: DropdownProps;\n\ticonProps: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\tbuttonProps?: ButtonProps;\n\ticonButtonProps?: IconButtonProps;\n\t/**\n\t * Optional tooltip shown only on the main icon button (icon mode),\n\t * not on the dropdown/chevron trigger.\n\t */\n\ticonButtonTooltip?: {\n\t\tbody?: string;\n\t\ttooltipContent?: JSX.Element;\n\t\tplacement?: Placement;\n\t};\n}\n\nexport const DropdownButton: React.FC<DropdownButtonProps> = (props) => {\n\tconst isIconMode = !!props.iconButtonProps;\n\tconst disabled = isIconMode\n\t\t? props.iconButtonProps?.disabled\n\t\t: props.buttonProps?.disabled;\n\n\tif (isIconMode) {\n\t\tconst { iconButtonProps, iconButtonTooltip } = props;\n\t\tconst iconButton = (\n\t\t\t<IconButton\n\t\t\t\t{...iconButtonProps!}\n\t\t\t\tstyle={{\n\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\tborderTopLeftRadius: '4px',\n\t\t\t\t\tborderBottomLeftRadius: '4px',\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t\treturn (\n\t\t\t<DropdownButtonStyle\n\t\t\t\ttype={undefined}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisIconButton\n\t\t\t\ticonButtonType={iconButtonProps?.iconButtonType ?? 'primary'}\n\t\t\t\ticonButtonSize={iconButtonProps?.size ?? 'default'}\n\t\t\t>\n\t\t\t\t{iconButtonTooltip ? (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tbody={iconButtonTooltip.body}\n\t\t\t\t\t\ttooltipContent={iconButtonTooltip.tooltipContent}\n\t\t\t\t\t\tplacement={iconButtonTooltip.placement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{iconButton}\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\ticonButton\n\t\t\t\t)}\n\t\t\t\t<div className=\"dd-button-divider\"></div>\n\t\t\t\t<div style={{ display: 'flex', alignItems: 'center' }}>\n\t\t\t\t\t<DropdownPopover {...props.dropdownProps} isChildLoading={false}>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tIcon={props.iconProps}\n\t\t\t\t\t\t\ticonButtonType={iconButtonProps?.iconButtonType ?? 'primary'}\n\t\t\t\t\t\t\tsize={iconButtonProps?.size}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\t\t\t\tborderTopRightRadius: '4px',\n\t\t\t\t\t\t\t\tborderBottomRightRadius: '4px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownPopover>\n\t\t\t\t</div>\n\t\t\t</DropdownButtonStyle>\n\t\t);\n\t}\n\n\tconst {\n\t\tonClick,\n\t\tLeadingIcon,\n\t\tLeadingIconStyles,\n\t\tIconComponent,\n\t\tTrailingIcon,\n\t\t...childButtonProps\n\t} = props.buttonProps!;\n\n\treturn (\n\t\t<DropdownButtonStyle\n\t\t\ttype={props.buttonProps!.buttonType}\n\t\t\tdisabled={props.buttonProps!.disabled}\n\t\t\tsize={props.buttonProps!.size}\n\t\t>\n\t\t\t{props.buttonProps?.isLoading && (\n\t\t\t\t<LoaderContainer type={props.buttonProps.buttonType}>\n\t\t\t\t\t<Spinner\n\t\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tcolor={SpinnerColorMap(\n\t\t\t\t\t\t\tprops.buttonProps.buttonType || 'primary',\n\t\t\t\t\t\t\tprops.buttonProps.inverse,\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</LoaderContainer>\n\t\t\t)}\n\n\t\t\t<Button\n\t\t\t\t{...props.buttonProps!}\n\t\t\t\tisLoading={false}\n\t\t\t\tstyle={{\n\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\tborderTopLeftRadius: '4px',\n\t\t\t\t\tborderBottomLeftRadius: '4px',\n\t\t\t\t\tborderRight: '0px',\n\t\t\t\t\t...(props.buttonProps?.size === 'xs'\n\t\t\t\t\t\t? { border: 'none', borderRadius: '0px' }\n\t\t\t\t\t\t: {}),\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<div className=\"dd-button-divider\"></div>\n\t\t\t<DropdownPopover\n\t\t\t\t{...props.dropdownProps}\n\t\t\t\tisChildLoading={props.buttonProps?.isLoading}\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\t{...childButtonProps}\n\t\t\t\t\tisLoading={false}\n\t\t\t\t\tbuttonText={''}\n\t\t\t\t\tTrailingIcon={props.iconProps}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\t\tborderTopRightRadius: '4px',\n\t\t\t\t\t\tborderBottomRightRadius: '4px',\n\t\t\t\t\t\t...(props.buttonProps?.size === 'xs'\n\t\t\t\t\t\t\t? { border: 'none', borderRadius: '0px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</DropdownPopover>\n\t\t</DropdownButtonStyle>\n\t);\n};\n"],"names":["DropdownButton","props","isIconMode","disabled","iconButtonProps","iconButtonTooltip","iconButton","jsx","IconButton","jsxs","DropdownButtonStyle","Tooltip","DropdownPopover","onClick","LeadingIcon","LeadingIconStyles","IconComponent","TrailingIcon","childButtonProps","LoaderContainer","Spinner","SpinnerColorMap","Button"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAgD,CAACC,MAAU;AACvE,QAAMC,IAAa,CAAC,CAACD,EAAM,iBACrBE,IAAWD,IACdD,EAAM,iBAAiB,WACvBA,EAAM,aAAa;AAEtB,MAAIC,GAAY;AACf,UAAM,EAAE,iBAAAE,GAAiB,mBAAAC,EAAA,IAAsBJ,GACzCK,IACL,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,GAAGJ;AAAA,QACJ,OAAO;AAAA,UACN,cAAc;AAAA,UACd,qBAAqB;AAAA,UACrB,wBAAwB;AAAA,QAAA;AAAA,MACzB;AAAA,IAAA;AAGF,WACC,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,MAAM;AAAA,QACN,UAAAP;AAAA,QACA,cAAY;AAAA,QACZ,gBAAgBC,GAAiB,kBAAkB;AAAA,QACnD,gBAAgBA,GAAiB,QAAQ;AAAA,QAExC,UAAA;AAAA,UAAAC,IACA,gBAAAE;AAAA,YAACI;AAAA,YAAA;AAAA,cACA,MAAMN,EAAkB;AAAA,cACxB,gBAAgBA,EAAkB;AAAA,cAClC,WAAWA,EAAkB;AAAA,cAE5B,UAAAC;AAAA,YAAA;AAAA,UAAA,IAGFA;AAAA,UAED,gBAAAC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AAA,cACrB,wBAAwB;AAAA,cACxB,aAAa;AAAA,cACb,GAAIA,EAAM,aAAa,SAAS,OAC7B,EAAE,QAAQ,QAAQ,cAAc,
|
|
1
|
+
{"version":3,"file":"DropdownButton.js","sources":["../../../../src/components/dropdown-button/DropdownButton.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownPopover, DropdownProps } from '@src/components/dropdown';\nimport { Button } from '../button';\nimport { ButtonProps } from '../button/model';\nimport { SpinnerColorMap } from '../button/themes';\nimport { IconButton } from '../icon-button';\nimport { IconButtonProps } from '../icon-button/model';\nimport { Spinner } from '../spinner';\nimport { Placement, Tooltip } from '../tooltips';\nimport { DropdownButtonStyle, LoaderContainer } from './DropdownButton.style';\n\nexport interface DropdownButtonProps {\n\tdropdownProps: DropdownProps;\n\ticonProps: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\tbuttonProps?: ButtonProps;\n\ticonButtonProps?: IconButtonProps;\n\t/**\n\t * Optional tooltip shown only on the main icon button (icon mode),\n\t * not on the dropdown/chevron trigger.\n\t */\n\ticonButtonTooltip?: {\n\t\tbody?: string;\n\t\ttooltipContent?: JSX.Element;\n\t\tplacement?: Placement;\n\t};\n}\n\nexport const DropdownButton: React.FC<DropdownButtonProps> = (props) => {\n\tconst isIconMode = !!props.iconButtonProps;\n\tconst disabled = isIconMode\n\t\t? props.iconButtonProps?.disabled\n\t\t: props.buttonProps?.disabled;\n\n\tif (isIconMode) {\n\t\tconst { iconButtonProps, iconButtonTooltip } = props;\n\t\tconst iconButton = (\n\t\t\t<IconButton\n\t\t\t\t{...iconButtonProps!}\n\t\t\t\tstyle={{\n\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\tborderTopLeftRadius: '4px',\n\t\t\t\t\tborderBottomLeftRadius: '4px',\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t\treturn (\n\t\t\t<DropdownButtonStyle\n\t\t\t\ttype={undefined}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tisIconButton\n\t\t\t\ticonButtonType={iconButtonProps?.iconButtonType ?? 'primary'}\n\t\t\t\ticonButtonSize={iconButtonProps?.size ?? 'default'}\n\t\t\t>\n\t\t\t\t{iconButtonTooltip ? (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tbody={iconButtonTooltip.body}\n\t\t\t\t\t\ttooltipContent={iconButtonTooltip.tooltipContent}\n\t\t\t\t\t\tplacement={iconButtonTooltip.placement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{iconButton}\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\ticonButton\n\t\t\t\t)}\n\t\t\t\t<div className=\"dd-button-divider\"></div>\n\t\t\t\t<div style={{ display: 'flex', alignItems: 'center' }}>\n\t\t\t\t\t<DropdownPopover {...props.dropdownProps} isChildLoading={false}>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tIcon={props.iconProps}\n\t\t\t\t\t\t\ticonButtonType={iconButtonProps?.iconButtonType ?? 'primary'}\n\t\t\t\t\t\t\tsize={iconButtonProps?.size}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\t\t\t\tborderTopRightRadius: '4px',\n\t\t\t\t\t\t\t\tborderBottomRightRadius: '4px',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownPopover>\n\t\t\t\t</div>\n\t\t\t</DropdownButtonStyle>\n\t\t);\n\t}\n\n\tconst {\n\t\tonClick,\n\t\tLeadingIcon,\n\t\tLeadingIconStyles,\n\t\tIconComponent,\n\t\tTrailingIcon,\n\t\t...childButtonProps\n\t} = props.buttonProps!;\n\n\treturn (\n\t\t<DropdownButtonStyle\n\t\t\ttype={props.buttonProps!.buttonType}\n\t\t\tdisabled={props.buttonProps!.disabled}\n\t\t\tsize={props.buttonProps!.size}\n\t\t>\n\t\t\t{props.buttonProps?.isLoading && (\n\t\t\t\t<LoaderContainer type={props.buttonProps.buttonType}>\n\t\t\t\t\t<Spinner\n\t\t\t\t\t\tclassName=\"spinner\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tcolor={SpinnerColorMap(\n\t\t\t\t\t\t\tprops.buttonProps.buttonType || 'primary',\n\t\t\t\t\t\t\tprops.buttonProps.inverse,\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</LoaderContainer>\n\t\t\t)}\n\n\t\t\t<Button\n\t\t\t\t{...props.buttonProps!}\n\t\t\t\tisLoading={false}\n\t\t\t\tstyle={{\n\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\tborderTopLeftRadius: '4px',\n\t\t\t\t\tborderBottomLeftRadius: '4px',\n\t\t\t\t\tborderRight: '0px',\n\t\t\t\t\t...(props.buttonProps?.size === 'xs'\n\t\t\t\t\t\t? { border: 'none', boxShadow: 'none', borderRadius: '0px' }\n\t\t\t\t\t\t: {}),\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t<div className=\"dd-button-divider\"></div>\n\t\t\t<DropdownPopover\n\t\t\t\t{...props.dropdownProps}\n\t\t\t\tisChildLoading={props.buttonProps?.isLoading}\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\t{...childButtonProps}\n\t\t\t\t\tisLoading={false}\n\t\t\t\t\tbuttonText={''}\n\t\t\t\t\tTrailingIcon={props.iconProps}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tborderRadius: '0px',\n\t\t\t\t\t\tborderTopRightRadius: '4px',\n\t\t\t\t\t\tborderBottomRightRadius: '4px',\n\t\t\t\t\t\t...(props.buttonProps?.size === 'xs'\n\t\t\t\t\t\t\t? { border: 'none', boxShadow: 'none', borderRadius: '0px' }\n\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</DropdownPopover>\n\t\t</DropdownButtonStyle>\n\t);\n};\n"],"names":["DropdownButton","props","isIconMode","disabled","iconButtonProps","iconButtonTooltip","iconButton","jsx","IconButton","jsxs","DropdownButtonStyle","Tooltip","DropdownPopover","onClick","LeadingIcon","LeadingIconStyles","IconComponent","TrailingIcon","childButtonProps","LoaderContainer","Spinner","SpinnerColorMap","Button"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAgD,CAACC,MAAU;AACvE,QAAMC,IAAa,CAAC,CAACD,EAAM,iBACrBE,IAAWD,IACdD,EAAM,iBAAiB,WACvBA,EAAM,aAAa;AAEtB,MAAIC,GAAY;AACf,UAAM,EAAE,iBAAAE,GAAiB,mBAAAC,EAAA,IAAsBJ,GACzCK,IACL,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,GAAGJ;AAAA,QACJ,OAAO;AAAA,UACN,cAAc;AAAA,UACd,qBAAqB;AAAA,UACrB,wBAAwB;AAAA,QAAA;AAAA,MACzB;AAAA,IAAA;AAGF,WACC,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,MAAM;AAAA,QACN,UAAAP;AAAA,QACA,cAAY;AAAA,QACZ,gBAAgBC,GAAiB,kBAAkB;AAAA,QACnD,gBAAgBA,GAAiB,QAAQ;AAAA,QAExC,UAAA;AAAA,UAAAC,IACA,gBAAAE;AAAA,YAACI;AAAA,YAAA;AAAA,cACA,MAAMN,EAAkB;AAAA,cACxB,gBAAgBA,EAAkB;AAAA,cAClC,WAAWA,EAAkB;AAAA,cAE5B,UAAAC;AAAA,YAAA;AAAA,UAAA,IAGFA;AAAA,UAED,gBAAAC,EAAC,OAAA,EAAI,WAAU,oBAAA,CAAoB;AAAA,UACnC,gBAAAA,EAAC,OAAA,EAAI,OAAO,EAAE,SAAS,QAAQ,YAAY,SAAA,GAC1C,4BAACK,GAAA,EAAiB,GAAGX,EAAM,eAAe,gBAAgB,IACzD,UAAA,gBAAAM;AAAA,YAACC;AAAA,YAAA;AAAA,cACA,MAAMP,EAAM;AAAA,cACZ,gBAAgBG,GAAiB,kBAAkB;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AAA,YACC,GAAGX,EAAM;AAAA,YACV,gBAAgBA,EAAM,aAAa;AAAA,YAEnC,UAAA,gBAAAM;AAAA,cAACe;AAAA,cAAA;AAAA,gBACC,GAAGJ;AAAA,gBACJ,WAAW;AAAA,gBACX,YAAY;AAAA,gBACZ,cAAcjB,EAAM;AAAA,gBACpB,OAAO;AAAA,kBACN,cAAc;AAAA,kBACd,sBAAsB;AAAA,kBACtB,yBAAyB;AAAA,kBACzB,GAAIA,EAAM,aAAa,SAAS,OAC7B,EAAE,QAAQ,QAAQ,WAAW,QAAQ,cAAc,MAAA,IACnD,CAAA;AAAA,gBAAC;AAAA,cACL;AAAA,YAAA;AAAA,UACD;AAAA,QAAA;AAAA,MACD;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const s = ({
|
|
3
|
+
size: t = 24,
|
|
4
|
+
color: o = "currentColor",
|
|
5
|
+
...C
|
|
6
|
+
}) => {
|
|
7
|
+
const l = {
|
|
8
|
+
width: t,
|
|
9
|
+
height: t,
|
|
10
|
+
color: o,
|
|
11
|
+
...C
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
"svg",
|
|
15
|
+
{
|
|
16
|
+
viewBox: "0 0 15 15",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...l,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ r(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
d: "M5.23976 6.28567C5.81834 6.28567 6.28738 5.81663 6.28738 5.23805C6.28738 4.65946 5.81834 4.19043 5.23976 4.19043C4.66117 4.19043 4.19214 4.65946 4.19214 5.23805C4.19214 5.81663 4.66117 6.28567 5.23976 6.28567Z",
|
|
25
|
+
fill: "currentColor"
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M9.43043 6.28567C10.009 6.28567 10.4781 5.81663 10.4781 5.23805C10.4781 4.65946 10.009 4.19043 9.43043 4.19043C8.85185 4.19043 8.38281 4.65946 8.38281 5.23805C8.38281 5.81663 8.85185 6.28567 9.43043 6.28567Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
d: "M7.3348 14.6667C3.29099 14.6667 0.00146484 11.3771 0.00146484 7.33333C0.00146484 3.28952 3.29099 0 7.3348 0C11.3786 0 14.6681 3.28952 14.6681 7.33333C14.6681 11.3771 11.3786 14.6667 7.3348 14.6667ZM7.3348 1.33333C3.86718 1.33333 1.3348 3.86571 1.3348 7.33333C1.3348 10.801 3.86718 13.3333 7.3348 13.3333C10.8024 13.3333 13.3348 10.801 13.3348 7.33333C13.3348 3.86571 10.8024 1.33333 7.3348 1.33333Z",
|
|
39
|
+
fill: "currentColor"
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"path",
|
|
44
|
+
{
|
|
45
|
+
d: "M4.00146 9H10.6681",
|
|
46
|
+
stroke: "#616161",
|
|
47
|
+
strokeWidth: 1.33333,
|
|
48
|
+
strokeLinecap: "round"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
s as default
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=FormkitNeutral.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormkitNeutral.js","sources":["../../../../../src/icons/Media/Visual/FormkitNeutral.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgFormkitNeutral = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 15 15\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M5.23976 6.28567C5.81834 6.28567 6.28738 5.81663 6.28738 5.23805C6.28738 4.65946 5.81834 4.19043 5.23976 4.19043C4.66117 4.19043 4.19214 4.65946 4.19214 5.23805C4.19214 5.81663 4.66117 6.28567 5.23976 6.28567Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M9.43043 6.28567C10.009 6.28567 10.4781 5.81663 10.4781 5.23805C10.4781 4.65946 10.009 4.19043 9.43043 4.19043C8.85185 4.19043 8.38281 4.65946 8.38281 5.23805C8.38281 5.81663 8.85185 6.28567 9.43043 6.28567Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M7.3348 14.6667C3.29099 14.6667 0.00146484 11.3771 0.00146484 7.33333C0.00146484 3.28952 3.29099 0 7.3348 0C11.3786 0 14.6681 3.28952 14.6681 7.33333C14.6681 11.3771 11.3786 14.6667 7.3348 14.6667ZM7.3348 1.33333C3.86718 1.33333 1.3348 3.86571 1.3348 7.33333C1.3348 10.801 3.86718 13.3333 7.3348 13.3333C10.8024 13.3333 13.3348 10.801 13.3348 7.33333C13.3348 3.86571 10.8024 1.33333 7.3348 1.33333Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M4.00146 9H10.6681\"\n\t\t\t\tstroke=\"#616161\"\n\t\t\t\tstrokeWidth={1.33333}\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t);\n};\nexport default SvgFormkitNeutral;\n"],"names":["SvgFormkitNeutral","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAoB,CAAC;AAAA,EAC1B,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAa;AACZ,QAAMC,IAAQ;AAAA,IACb,OAAOH;AAAA,IACP,QAAQA;AAAA,IACR,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA;AAEJ,SACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEN,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,GAAE;AAAA,YACF,QAAO;AAAA,YACP,aAAa;AAAA,YACb,eAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as t, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
const h = ({
|
|
3
|
+
size: r = 24,
|
|
4
|
+
color: l = "currentColor",
|
|
5
|
+
...i
|
|
6
|
+
}) => {
|
|
7
|
+
const o = {
|
|
8
|
+
width: r,
|
|
9
|
+
height: r,
|
|
10
|
+
color: l,
|
|
11
|
+
...i
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
"svg",
|
|
15
|
+
{
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...o,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ t("g", { clipPath: "url(#clip0_6886_8842)", children: [
|
|
22
|
+
/* @__PURE__ */ C(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
d: "M5.90773 6.95168C6.48631 6.95168 6.95535 6.48265 6.95535 5.90406C6.95535 5.32548 6.48631 4.85645 5.90773 4.85645C5.32914 4.85645 4.86011 5.32548 4.86011 5.90406C4.86011 6.48265 5.32914 6.95168 5.90773 6.95168Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ C(
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
d: "M10.0984 6.95168C10.677 6.95168 11.146 6.48265 11.146 5.90406C11.146 5.32548 10.677 4.85645 10.0984 4.85645C9.51982 4.85645 9.05078 5.32548 9.05078 5.90406C9.05078 6.48265 9.51982 6.95168 10.0984 6.95168Z",
|
|
33
|
+
fill: "currentColor"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ C(
|
|
37
|
+
"path",
|
|
38
|
+
{
|
|
39
|
+
d: "M8.00277 15.3332C3.95896 15.3332 0.669434 12.0436 0.669434 7.99984C0.669434 3.95603 3.95896 0.666504 8.00277 0.666504C12.0466 0.666504 15.3361 3.95603 15.3361 7.99984C15.3361 12.0436 12.0466 15.3332 8.00277 15.3332ZM8.00277 1.99984C4.53515 1.99984 2.00277 4.53222 2.00277 7.99984C2.00277 11.4675 4.53515 13.9998 8.00277 13.9998C11.4704 13.9998 14.0028 11.4675 14.0028 7.99984C14.0028 4.53222 11.4704 1.99984 8.00277 1.99984Z",
|
|
40
|
+
fill: "currentColor"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ C(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
d: "M5.62329 11.3467C5.51404 11.6611 5.16422 11.8306 4.8479 11.7109L4.84692 11.7109L4.84399 11.7109L4.84497 11.71C4.53138 11.5999 4.36268 11.2515 4.48267 10.9355L4.48169 10.9346C4.73997 10.2037 5.21864 9.57115 5.85181 9.12402C6.48507 8.6769 7.24166 8.43732 8.01685 8.43848C9.50331 8.43848 10.8485 9.32324 11.4436 10.6611L11.5549 10.9395L11.554 10.9404C11.596 11.0884 11.5811 11.2469 11.511 11.3838C11.4408 11.5208 11.3208 11.6263 11.176 11.6787C11.0314 11.7309 10.8722 11.7264 10.7307 11.666C10.5891 11.6055 10.4756 11.4934 10.4133 11.3525L10.4104 11.3467L10.4114 11.3467C10.2369 10.8511 9.91239 10.4218 9.48364 10.1182C9.05488 9.81456 8.54222 9.65137 8.01685 9.65137C7.49167 9.65142 6.97967 9.81473 6.55103 10.1182C6.12226 10.4218 5.79777 10.8511 5.62329 11.3467Z",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
stroke: "#4B1583",
|
|
49
|
+
strokeWidth: 0.166667
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_6886_8842", children: /* @__PURE__ */ C("rect", { width: 16, height: 16, fill: "white" }) }) })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
h as default
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=FormkitSad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormkitSad.js","sources":["../../../../../src/icons/Media/Visual/FormkitSad.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\ninterface Props extends SVGProps<SVGSVGElement> {\n\tsize?: number | string;\n\tcolor?: string;\n}\nconst SvgFormkitSad = ({\n\tsize = 24,\n\tcolor = 'currentColor',\n\t...rest\n}: Props) => {\n\tconst props = {\n\t\twidth: size,\n\t\theight: size,\n\t\tcolor,\n\t\t...rest,\n\t};\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<g clipPath=\"url(#clip0_6886_8842)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M5.90773 6.95168C6.48631 6.95168 6.95535 6.48265 6.95535 5.90406C6.95535 5.32548 6.48631 4.85645 5.90773 4.85645C5.32914 4.85645 4.86011 5.32548 4.86011 5.90406C4.86011 6.48265 5.32914 6.95168 5.90773 6.95168Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M10.0984 6.95168C10.677 6.95168 11.146 6.48265 11.146 5.90406C11.146 5.32548 10.677 4.85645 10.0984 4.85645C9.51982 4.85645 9.05078 5.32548 9.05078 5.90406C9.05078 6.48265 9.51982 6.95168 10.0984 6.95168Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M8.00277 15.3332C3.95896 15.3332 0.669434 12.0436 0.669434 7.99984C0.669434 3.95603 3.95896 0.666504 8.00277 0.666504C12.0466 0.666504 15.3361 3.95603 15.3361 7.99984C15.3361 12.0436 12.0466 15.3332 8.00277 15.3332ZM8.00277 1.99984C4.53515 1.99984 2.00277 4.53222 2.00277 7.99984C2.00277 11.4675 4.53515 13.9998 8.00277 13.9998C11.4704 13.9998 14.0028 11.4675 14.0028 7.99984C14.0028 4.53222 11.4704 1.99984 8.00277 1.99984Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M5.62329 11.3467C5.51404 11.6611 5.16422 11.8306 4.8479 11.7109L4.84692 11.7109L4.84399 11.7109L4.84497 11.71C4.53138 11.5999 4.36268 11.2515 4.48267 10.9355L4.48169 10.9346C4.73997 10.2037 5.21864 9.57115 5.85181 9.12402C6.48507 8.6769 7.24166 8.43732 8.01685 8.43848C9.50331 8.43848 10.8485 9.32324 11.4436 10.6611L11.5549 10.9395L11.554 10.9404C11.596 11.0884 11.5811 11.2469 11.511 11.3838C11.4408 11.5208 11.3208 11.6263 11.176 11.6787C11.0314 11.7309 10.8722 11.7264 10.7307 11.666C10.5891 11.6055 10.4756 11.4934 10.4133 11.3525L10.4104 11.3467L10.4114 11.3467C10.2369 10.8511 9.91239 10.4218 9.48364 10.1182C9.05488 9.81456 8.54222 9.65137 8.01685 9.65137C7.49167 9.65142 6.97967 9.81473 6.55103 10.1182C6.12226 10.4218 5.79777 10.8511 5.62329 11.3467Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tstroke=\"#4B1583\"\n\t\t\t\t\tstrokeWidth={0.166667}\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"clip0_6886_8842\">\n\t\t\t\t\t<rect width={16} height={16} fill=\"white\" />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n};\nexport default SvgFormkitSad;\n"],"names":["SvgFormkitSad","size","color","rest","props","jsxs","jsx"],"mappings":";AAMA,MAAMA,IAAgB,CAAC;AAAA,EACtB,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACJ,MAAa;AACZ,QAAMC,IAAQ;AAAA,IACb,OAAOH;AAAA,IACP,QAAQA;AAAA,IACR,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA;AAEJ,SACC,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACL,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,KAAA,EAAE,UAAS,yBACX,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,GAAE;AAAA,cACF,MAAK;AAAA,cACL,QAAO;AAAA,cACP,aAAa;AAAA,YAAA;AAAA,UAAA;AAAA,QACd,GACD;AAAA,QACA,gBAAAA,EAAC,QAAA,EACA,UAAA,gBAAAA,EAAC,YAAA,EAAS,IAAG,mBACZ,UAAA,gBAAAA,EAAC,QAAA,EAAK,OAAO,IAAI,QAAQ,IAAI,MAAK,SAAQ,GAC3C,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -5,6 +5,8 @@ export { default as Crop } from './Crop';
|
|
|
5
5
|
export { default as FlashOff } from './FlashOff';
|
|
6
6
|
export { default as FlashOn } from './FlashOn';
|
|
7
7
|
export { default as FormkitHappy } from './FormkitHappy';
|
|
8
|
+
export { default as FormkitNeutral } from './FormkitNeutral';
|
|
9
|
+
export { default as FormkitSad } from './FormkitSad';
|
|
8
10
|
export { default as IconTrailing } from './IconTrailing';
|
|
9
11
|
export { default as Image } from './Image';
|
|
10
12
|
export { default as ImageAdd } from './ImageAdd';
|