@gobolt/genesis 0.3.1 → 0.3.3
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/components/Chat/Message.d.ts +1 -0
- package/dist/index.cjs +542 -515
- package/dist/index.js +542 -515
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74902,27 +74902,423 @@ const Message$1 = ({ message: message2, handle, isThinking = false }) => {
|
|
|
74902
74902
|
const isBot = handle === "bot";
|
|
74903
74903
|
return /* @__PURE__ */ jsxs(MessageContainer, { $isBot: isBot, children: [
|
|
74904
74904
|
/* @__PURE__ */ jsx(IconContainer, { children: isBot ? /* @__PURE__ */ jsx(BotIcon, {}) : /* @__PURE__ */ jsx(UserIcon, {}) }),
|
|
74905
|
-
/* @__PURE__ */ jsx(TextContainer, { $isBot: isBot, children: isThinking ? /* @__PURE__ */ jsx(ThinkingIndicator, {}) : handle === "bot" ? /* @__PURE__ */ jsx(
|
|
74906
|
-
|
|
74905
|
+
/* @__PURE__ */ jsx(TextContainer, { $isBot: isBot, children: isThinking ? /* @__PURE__ */ jsx(ThinkingIndicator, {}) : handle === "bot" ? /* @__PURE__ */ jsx(Markdown, { children: message2 }) : /* @__PURE__ */ jsx(MessageText, { children: message2 }) })
|
|
74906
|
+
] });
|
|
74907
|
+
};
|
|
74908
|
+
const getStateColors = (colors2, type4, state) => {
|
|
74909
|
+
const filled = {
|
|
74910
|
+
color: colors2.inputs.onsurface.active,
|
|
74911
|
+
borderColor: colors2[TYPE.secondary].active.borderColor,
|
|
74912
|
+
ringColor: colors2[type4].focussed.ringColor
|
|
74913
|
+
};
|
|
74914
|
+
const success = {
|
|
74915
|
+
color: colors2.status.success.default,
|
|
74916
|
+
borderColor: colors2.status.success.default,
|
|
74917
|
+
ringColor: colors2.status.success.ringColor
|
|
74918
|
+
};
|
|
74919
|
+
const error2 = {
|
|
74920
|
+
color: colors2.status.error.default,
|
|
74921
|
+
borderColor: colors2.status.error.default,
|
|
74922
|
+
ringColor: colors2.status.error.ringColor
|
|
74923
|
+
};
|
|
74924
|
+
const themeState = state !== STATE.error && state !== STATE.success && state !== STATE.filled ? {
|
|
74925
|
+
color: colors2.inputs.onsurface.active,
|
|
74926
|
+
backgroundColor: colors2.inputs.surface.active,
|
|
74927
|
+
borderColor: colors2.inputs.surface.border,
|
|
74928
|
+
ringColor: colors2[type4][state].ringColor
|
|
74929
|
+
} : null;
|
|
74930
|
+
const stateMap = {
|
|
74931
|
+
filled,
|
|
74932
|
+
error: error2,
|
|
74933
|
+
success,
|
|
74934
|
+
themeState
|
|
74935
|
+
};
|
|
74936
|
+
const getValidKey = (state2) => {
|
|
74937
|
+
const validStates = [STATE.filled, STATE.error, STATE.success];
|
|
74938
|
+
return validStates.includes(state2) ? state2 : "themeState";
|
|
74939
|
+
};
|
|
74940
|
+
const css = stateMap[getValidKey(state)];
|
|
74941
|
+
return css;
|
|
74942
|
+
};
|
|
74943
|
+
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size) => {
|
|
74944
|
+
const stateColors = getStateColors(colors2, type4, state);
|
|
74945
|
+
const getBorderRadius = (hasBeforeAddon2, hasAfterAddon2) => {
|
|
74946
|
+
if (hasAfterAddon2 && !hasBeforeAddon2) {
|
|
74947
|
+
return `${borderRadius2.BorderRadiusMd}px 0px 0px ${borderRadius2.BorderRadiusMd}px`;
|
|
74948
|
+
}
|
|
74949
|
+
if (hasBeforeAddon2 && !hasAfterAddon2) {
|
|
74950
|
+
return `0px ${borderRadius2.BorderRadiusMd}px ${borderRadius2.BorderRadiusMd}px 0px`;
|
|
74951
|
+
}
|
|
74952
|
+
return `0px`;
|
|
74953
|
+
};
|
|
74954
|
+
return `
|
|
74955
|
+
&.ant-input {
|
|
74956
|
+
font-family: 'Inter', sans-serif;
|
|
74957
|
+
color: ${stateColors.color};
|
|
74958
|
+
border-color: ${stateColors.borderColor};
|
|
74959
|
+
box-shadow: ${shadows2.inputs[1]} !important;
|
|
74960
|
+
height: ${size === "normal" || size === "large" ? "40px" : "32px"} !important;
|
|
74961
|
+
}
|
|
74962
|
+
|
|
74963
|
+
/* Increase specificity for focus states */
|
|
74964
|
+
&.ant-input.ant-input:focus,
|
|
74965
|
+
&.ant-input.ant-input:focus-visible,
|
|
74966
|
+
&.ant-input.ant-input-focused {
|
|
74967
|
+
outline: none !important;
|
|
74968
|
+
border-color: ${colors2[type4].focussed.borderColor} !important;
|
|
74969
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor} !important;
|
|
74970
|
+
}
|
|
74971
|
+
|
|
74972
|
+
&.ant-input-outlined {
|
|
74973
|
+
border: 1px solid ${stateColors.borderColor};
|
|
74974
|
+
|
|
74975
|
+
&:hover {
|
|
74976
|
+
border-color: ${stateColors.borderColor};
|
|
74977
|
+
}
|
|
74978
|
+
}
|
|
74979
|
+
|
|
74980
|
+
.ant-input-group & {
|
|
74981
|
+
&:focus-within {
|
|
74982
|
+
outline: none;
|
|
74983
|
+
color: ${stateColors.color};
|
|
74984
|
+
box-shadow: none;
|
|
74985
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
74986
|
+
}
|
|
74987
|
+
}
|
|
74988
|
+
|
|
74989
|
+
.ant-input-group:focus-within {
|
|
74990
|
+
outline: none;
|
|
74991
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
74992
|
+
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
74993
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
74994
|
+
|
|
74995
|
+
/* Hide focus styles on inner input when parent is focused */
|
|
74996
|
+
.ant-input:focus-within {
|
|
74997
|
+
box-shadow: none;
|
|
74998
|
+
border-radius: 0;
|
|
74999
|
+
border-radius: ${getBorderRadius(hasBeforeAddon, hasAfterAddon)};
|
|
75000
|
+
border-color: #ddd;
|
|
75001
|
+
}
|
|
75002
|
+
}
|
|
75003
|
+
|
|
75004
|
+
/* Remove inner input focus styles when in a group */
|
|
75005
|
+
.ant-input-group .ant-input:focus,
|
|
75006
|
+
.ant-input-group .ant-input:focus-visible,
|
|
75007
|
+
.ant-input-group .ant-input:focus-within {
|
|
75008
|
+
outline: none;
|
|
75009
|
+
box-shadow: none;
|
|
75010
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
75011
|
+
}
|
|
75012
|
+
|
|
75013
|
+
/* Single focus ring on group */
|
|
75014
|
+
.ant-input-group:focus-within {
|
|
75015
|
+
outline: none;
|
|
75016
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75017
|
+
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75018
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
75019
|
+
}
|
|
75020
|
+
|
|
75021
|
+
/* Remove focus styles for standalone inputs */
|
|
75022
|
+
&:not(.ant-input-group):focus-visible {
|
|
75023
|
+
outline: none;
|
|
75024
|
+
color: ${stateColors.color};
|
|
75025
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75026
|
+
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75027
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
75028
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
75029
|
+
}
|
|
75030
|
+
|
|
75031
|
+
&:not(.ant-input-group .ant-input):focus-visible {
|
|
75032
|
+
outline: none;
|
|
75033
|
+
color: ${stateColors.color};
|
|
75034
|
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75035
|
+
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75036
|
+
border-color: ${colors2[type4].focussed.borderColor};
|
|
75037
|
+
transition: box-shadow 0.2s ease-in-out;
|
|
75038
|
+
}
|
|
75039
|
+
|
|
75040
|
+
&.ant-input-group-wrapper {
|
|
75041
|
+
.ant-input-group {
|
|
75042
|
+
display: flex;
|
|
75043
|
+
align-items: center;
|
|
75044
|
+
height: ${size === "normal" || size === "large" ? "40px" : "32px"};
|
|
75045
|
+
|
|
75046
|
+
.ant-input {
|
|
75047
|
+
height: 100% !important;
|
|
75048
|
+
}
|
|
75049
|
+
|
|
75050
|
+
.ant-input-group-addon {
|
|
75051
|
+
padding: 0 ${components2.input.suffixPrefixHorPadding};
|
|
75052
|
+
height: 100%;
|
|
75053
|
+
display: flex;
|
|
75054
|
+
align-items: center;
|
|
75055
|
+
min-width: fit-content;
|
|
75056
|
+
width: auto;
|
|
75057
|
+
|
|
75058
|
+
> * {
|
|
75059
|
+
width: 100%;
|
|
75060
|
+
}
|
|
75061
|
+
|
|
75062
|
+
.ant-select {
|
|
75063
|
+
height: 100%;
|
|
75064
|
+
|
|
75065
|
+
.ant-select-selector {
|
|
75066
|
+
height: 100%;
|
|
75067
|
+
display: flex;
|
|
75068
|
+
align-items: center;
|
|
75069
|
+
}
|
|
75070
|
+
}
|
|
75071
|
+
}
|
|
75072
|
+
}
|
|
75073
|
+
}
|
|
75074
|
+
`;
|
|
75075
|
+
};
|
|
75076
|
+
const Input$1 = styled(Input$2)`
|
|
75077
|
+
${({ theme, state, type: type4 = TYPE.primary, size = "normal", ...rest }) => {
|
|
75078
|
+
const hasBeforeAddon = !!rest.addonBefore;
|
|
75079
|
+
const hasAfterAddon = !!rest.addonAfter;
|
|
75080
|
+
return getGenesisInputClass(
|
|
75081
|
+
theme,
|
|
75082
|
+
type4,
|
|
75083
|
+
state,
|
|
75084
|
+
hasBeforeAddon,
|
|
75085
|
+
hasAfterAddon,
|
|
75086
|
+
size
|
|
75087
|
+
);
|
|
75088
|
+
}}
|
|
75089
|
+
`;
|
|
75090
|
+
const DropdownChevron = (properties) => {
|
|
75091
|
+
const { theme } = useGenesis();
|
|
75092
|
+
return /* @__PURE__ */ jsx(
|
|
75093
|
+
"svg",
|
|
75094
|
+
{
|
|
75095
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75096
|
+
width: 20,
|
|
75097
|
+
height: 20,
|
|
75098
|
+
fill: "none",
|
|
75099
|
+
...properties,
|
|
75100
|
+
children: /* @__PURE__ */ jsx(
|
|
75101
|
+
"path",
|
|
75102
|
+
{
|
|
75103
|
+
fill: "#222",
|
|
75104
|
+
fillRule: "evenodd",
|
|
75105
|
+
d: "M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414Z",
|
|
75106
|
+
clipRule: "evenodd"
|
|
75107
|
+
}
|
|
75108
|
+
)
|
|
75109
|
+
}
|
|
75110
|
+
);
|
|
75111
|
+
};
|
|
75112
|
+
const Input2 = ({
|
|
75113
|
+
state = STATE.active,
|
|
75114
|
+
size = "normal",
|
|
75115
|
+
onChange,
|
|
75116
|
+
value: value2,
|
|
75117
|
+
...rest
|
|
75118
|
+
}) => {
|
|
75119
|
+
const { type: type4, ...validRest } = rest;
|
|
75120
|
+
const addonAfter = React__default.isValidElement(rest.addonAfter) && rest.addonAfter.type === Select$1 ? React__default.cloneElement(rest.addonAfter, {
|
|
75121
|
+
suffixIcon: /* @__PURE__ */ jsx(DropdownChevron, {})
|
|
75122
|
+
}) : rest.addonAfter;
|
|
75123
|
+
const handleChange = React__default.useCallback(
|
|
75124
|
+
(e2) => {
|
|
75125
|
+
if (onChange) {
|
|
75126
|
+
onChange({
|
|
75127
|
+
event: "inputChange",
|
|
75128
|
+
payload: {
|
|
75129
|
+
value: e2.target.value
|
|
75130
|
+
}
|
|
75131
|
+
});
|
|
75132
|
+
}
|
|
75133
|
+
},
|
|
75134
|
+
[onChange]
|
|
75135
|
+
);
|
|
75136
|
+
return /* @__PURE__ */ jsx(
|
|
75137
|
+
Input$1,
|
|
75138
|
+
{
|
|
75139
|
+
...validRest,
|
|
75140
|
+
size,
|
|
75141
|
+
state,
|
|
75142
|
+
disabled: state === "disabled" || rest.disabled,
|
|
75143
|
+
addonAfter,
|
|
75144
|
+
style: {
|
|
75145
|
+
height: size === "normal" || size === "large" ? "40px" : "32px"
|
|
75146
|
+
},
|
|
75147
|
+
onChange: handleChange,
|
|
75148
|
+
value: value2
|
|
75149
|
+
}
|
|
75150
|
+
);
|
|
75151
|
+
};
|
|
75152
|
+
const getVariant = (typography2, variant, breakpoint) => {
|
|
75153
|
+
return `
|
|
75154
|
+
font-size: ${typography2[breakpoint][variant].fontSize}px !important;
|
|
75155
|
+
line-height: ${typography2[breakpoint][variant].lineHeight};
|
|
75156
|
+
letter-spacing: ${typography2[breakpoint][variant].letterSpacing}px;
|
|
75157
|
+
font-weight: ${typography2[breakpoint][variant].fontWeight};
|
|
75158
|
+
`;
|
|
75159
|
+
};
|
|
75160
|
+
const getColor = (color2, colors2, $themeType) => {
|
|
75161
|
+
if (color2) {
|
|
75162
|
+
return color2;
|
|
75163
|
+
}
|
|
75164
|
+
return colors2[$themeType].active.color;
|
|
75165
|
+
};
|
|
75166
|
+
const getFontFamily = (variant) => {
|
|
75167
|
+
return `
|
|
75168
|
+
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
75169
|
+
`;
|
|
75170
|
+
};
|
|
75171
|
+
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
75172
|
+
&.ant-typography {
|
|
75173
|
+
font-family: ${getFontFamily(variant)};
|
|
75174
|
+
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
75175
|
+
${getVariant(typography2, variant, breakpoint)}
|
|
75176
|
+
margin-bottom: 0 !important;
|
|
75177
|
+
width: ${$isFullWidth ? "100%" : "auto"};
|
|
75178
|
+
line-height: 1;
|
|
75179
|
+
|
|
75180
|
+
&:disabled {
|
|
75181
|
+
color: ${colors2.status.disabled.default} !important;
|
|
75182
|
+
userSelect: none;
|
|
75183
|
+
cursor: not-allowed;
|
|
75184
|
+
}
|
|
75185
|
+
}
|
|
75186
|
+
`;
|
|
75187
|
+
const Headline = styled(Typography$1.Title)`
|
|
75188
|
+
${({
|
|
75189
|
+
theme,
|
|
75190
|
+
$themeType,
|
|
75191
|
+
variant,
|
|
75192
|
+
state,
|
|
75193
|
+
breakpoint,
|
|
75194
|
+
color: color2,
|
|
75195
|
+
$isFullWidth
|
|
75196
|
+
}) => {
|
|
75197
|
+
return getGenesisTypographyClass(
|
|
75198
|
+
theme,
|
|
75199
|
+
$themeType,
|
|
75200
|
+
variant,
|
|
75201
|
+
state,
|
|
75202
|
+
breakpoint,
|
|
75203
|
+
color2,
|
|
75204
|
+
$isFullWidth
|
|
75205
|
+
);
|
|
75206
|
+
}}
|
|
75207
|
+
`;
|
|
75208
|
+
const Paragraph = styled(
|
|
75209
|
+
Typography$1.Paragraph
|
|
75210
|
+
)`
|
|
75211
|
+
${({
|
|
75212
|
+
theme,
|
|
75213
|
+
$themeType,
|
|
75214
|
+
variant,
|
|
75215
|
+
state,
|
|
75216
|
+
breakpoint,
|
|
75217
|
+
color: color2,
|
|
75218
|
+
$isFullWidth
|
|
75219
|
+
}) => {
|
|
75220
|
+
return getGenesisTypographyClass(
|
|
75221
|
+
theme,
|
|
75222
|
+
$themeType,
|
|
75223
|
+
variant,
|
|
75224
|
+
state,
|
|
75225
|
+
breakpoint,
|
|
75226
|
+
color2,
|
|
75227
|
+
$isFullWidth
|
|
75228
|
+
);
|
|
75229
|
+
}}
|
|
75230
|
+
`;
|
|
75231
|
+
const Text = styled(Typography$1.Text)`
|
|
75232
|
+
${({
|
|
75233
|
+
theme,
|
|
75234
|
+
$themeType,
|
|
75235
|
+
variant,
|
|
75236
|
+
state,
|
|
75237
|
+
breakpoint,
|
|
75238
|
+
color: color2,
|
|
75239
|
+
$isFullWidth
|
|
75240
|
+
}) => {
|
|
75241
|
+
return getGenesisTypographyClass(
|
|
75242
|
+
theme,
|
|
75243
|
+
$themeType,
|
|
75244
|
+
variant,
|
|
75245
|
+
state,
|
|
75246
|
+
breakpoint,
|
|
75247
|
+
color2,
|
|
75248
|
+
$isFullWidth
|
|
75249
|
+
);
|
|
75250
|
+
}}
|
|
75251
|
+
`;
|
|
75252
|
+
const Typography = ({
|
|
75253
|
+
children,
|
|
75254
|
+
themeType = TYPE.secondary,
|
|
75255
|
+
variant = TYPOGRAPHY_VARIANT.body1,
|
|
75256
|
+
state = STATE.active,
|
|
75257
|
+
color: color2,
|
|
75258
|
+
isText = false,
|
|
75259
|
+
isFullWidth,
|
|
75260
|
+
style: style2,
|
|
75261
|
+
isDisabled,
|
|
75262
|
+
...rest
|
|
75263
|
+
}) => {
|
|
75264
|
+
const { breakpoint } = useGenesis();
|
|
75265
|
+
if (variant.startsWith("display") || variant.startsWith("heading")) {
|
|
75266
|
+
const level = variant.split("heading")[1] || variant.split("display")[1];
|
|
75267
|
+
return /* @__PURE__ */ jsx(
|
|
75268
|
+
Headline,
|
|
74907
75269
|
{
|
|
74908
|
-
|
|
74909
|
-
|
|
74910
|
-
|
|
74911
|
-
|
|
74912
|
-
|
|
74913
|
-
|
|
74914
|
-
|
|
74915
|
-
|
|
74916
|
-
|
|
75270
|
+
state,
|
|
75271
|
+
$themeType: themeType,
|
|
75272
|
+
variant,
|
|
75273
|
+
breakpoint,
|
|
75274
|
+
color: color2,
|
|
75275
|
+
level: Number.parseInt(level),
|
|
75276
|
+
$isFullWidth: isFullWidth,
|
|
75277
|
+
style: style2,
|
|
75278
|
+
disabled: isDisabled,
|
|
75279
|
+
...rest,
|
|
75280
|
+
children
|
|
74917
75281
|
}
|
|
74918
|
-
)
|
|
74919
|
-
|
|
75282
|
+
);
|
|
75283
|
+
}
|
|
75284
|
+
if (isText) {
|
|
75285
|
+
return /* @__PURE__ */ jsx(
|
|
75286
|
+
Text,
|
|
75287
|
+
{
|
|
75288
|
+
state,
|
|
75289
|
+
$themeType: themeType,
|
|
75290
|
+
variant,
|
|
75291
|
+
breakpoint,
|
|
75292
|
+
color: color2,
|
|
75293
|
+
$isFullWidth: isFullWidth,
|
|
75294
|
+
style: style2,
|
|
75295
|
+
disabled: isDisabled,
|
|
75296
|
+
...rest,
|
|
75297
|
+
children
|
|
75298
|
+
}
|
|
75299
|
+
);
|
|
75300
|
+
}
|
|
75301
|
+
return /* @__PURE__ */ jsx(
|
|
75302
|
+
Paragraph,
|
|
75303
|
+
{
|
|
75304
|
+
state,
|
|
75305
|
+
$themeType: themeType,
|
|
75306
|
+
variant,
|
|
75307
|
+
breakpoint,
|
|
75308
|
+
color: color2,
|
|
75309
|
+
$isFullWidth: isFullWidth,
|
|
75310
|
+
style: style2,
|
|
75311
|
+
disabled: isDisabled,
|
|
75312
|
+
...rest,
|
|
75313
|
+
children
|
|
75314
|
+
}
|
|
75315
|
+
);
|
|
74920
75316
|
};
|
|
74921
75317
|
const ChatContainer = styled.div`
|
|
74922
75318
|
display: flex;
|
|
74923
75319
|
flex-direction: column;
|
|
74924
75320
|
position: relative;
|
|
74925
|
-
width:
|
|
75321
|
+
width: 600px;
|
|
74926
75322
|
overflow: hidden;
|
|
74927
75323
|
`;
|
|
74928
75324
|
const HeroContainer = styled.div`
|
|
@@ -74986,21 +75382,40 @@ const Chat = ({
|
|
|
74986
75382
|
const [isLocked, setIsLocked] = useState(false);
|
|
74987
75383
|
useEffect(() => {
|
|
74988
75384
|
if (isSimulated) return;
|
|
74989
|
-
|
|
74990
|
-
|
|
74991
|
-
|
|
74992
|
-
|
|
74993
|
-
|
|
75385
|
+
const socketUrlToUse = window.location.hostname === "localhost" && window.location.port === "6006" ? "http://localhost:3000" : socketUrl;
|
|
75386
|
+
console.log("Connecting to socket server at:", socketUrlToUse);
|
|
75387
|
+
socketRef.current = lookup(socketUrlToUse, {
|
|
75388
|
+
transports: ["polling", "websocket"],
|
|
75389
|
+
reconnection: true,
|
|
75390
|
+
reconnectionAttempts: 5,
|
|
75391
|
+
reconnectionDelay: 1e3,
|
|
75392
|
+
withCredentials: true,
|
|
75393
|
+
forceNew: true,
|
|
75394
|
+
autoConnect: true,
|
|
75395
|
+
timeout: 1e4
|
|
74994
75396
|
});
|
|
74995
75397
|
const socket = socketRef.current;
|
|
74996
75398
|
socket.on("connect", () => {
|
|
74997
75399
|
console.log("Socket connected successfully");
|
|
75400
|
+
setServerError("");
|
|
75401
|
+
setServerStatus("ready");
|
|
75402
|
+
serverReadyRef.current = true;
|
|
74998
75403
|
});
|
|
74999
75404
|
socket.on("connect_error", (error2) => {
|
|
75000
75405
|
console.error("Socket connection error:", error2);
|
|
75001
|
-
setServerError(
|
|
75406
|
+
setServerError(`Connection error: ${error2.message}`);
|
|
75002
75407
|
setServerStatus("error");
|
|
75003
75408
|
serverReadyRef.current = false;
|
|
75409
|
+
setMessages((prev2) => prev2.filter((msg) => !msg.isThinking));
|
|
75410
|
+
setIsLocked(false);
|
|
75411
|
+
});
|
|
75412
|
+
socket.on("disconnect", (reason) => {
|
|
75413
|
+
console.log("Socket disconnected:", reason);
|
|
75414
|
+
setServerError(`Disconnected: ${reason}`);
|
|
75415
|
+
setServerStatus("error");
|
|
75416
|
+
serverReadyRef.current = false;
|
|
75417
|
+
setMessages((prev2) => prev2.filter((msg) => !msg.isThinking));
|
|
75418
|
+
setIsLocked(false);
|
|
75004
75419
|
});
|
|
75005
75420
|
socket.on("new connection", () => {
|
|
75006
75421
|
console.log("New connection established");
|
|
@@ -75014,16 +75429,20 @@ const Chat = ({
|
|
|
75014
75429
|
socket.on("message", (newMessage) => {
|
|
75015
75430
|
setMessages((prev2) => {
|
|
75016
75431
|
if (newMessage.sender === "bot") {
|
|
75017
|
-
|
|
75018
|
-
|
|
75019
|
-
if (
|
|
75020
|
-
|
|
75021
|
-
return { ...newMessage, isThinking: false };
|
|
75432
|
+
if (newMessage.content === "Processing your message...") {
|
|
75433
|
+
const hasThinkingMessage = prev2.some((msg) => msg.isThinking);
|
|
75434
|
+
if (hasThinkingMessage) {
|
|
75435
|
+
return prev2;
|
|
75022
75436
|
}
|
|
75023
|
-
return
|
|
75024
|
-
}
|
|
75025
|
-
|
|
75026
|
-
|
|
75437
|
+
return [...prev2, { ...newMessage, isThinking: true }];
|
|
75438
|
+
}
|
|
75439
|
+
const thinkingMessage = prev2.find((msg) => msg.isThinking);
|
|
75440
|
+
if (thinkingMessage) {
|
|
75441
|
+
return prev2.map(
|
|
75442
|
+
(msg) => msg.isThinking ? { ...newMessage, isThinking: false } : msg
|
|
75443
|
+
);
|
|
75444
|
+
}
|
|
75445
|
+
return [...prev2, { ...newMessage, isThinking: false }];
|
|
75027
75446
|
}
|
|
75028
75447
|
const lastUserMsg = [...prev2].reverse().find((msg) => msg.sender === "user");
|
|
75029
75448
|
if (lastUserMsg && lastUserMsg.content === newMessage.content) {
|
|
@@ -75031,6 +75450,7 @@ const Chat = ({
|
|
|
75031
75450
|
}
|
|
75032
75451
|
return [...prev2, newMessage];
|
|
75033
75452
|
});
|
|
75453
|
+
setIsLocked(false);
|
|
75034
75454
|
});
|
|
75035
75455
|
socket.on("update-bot-message", (updatedData) => {
|
|
75036
75456
|
console.log("Received bot message update:", updatedData);
|
|
@@ -75050,8 +75470,10 @@ const Chat = ({
|
|
|
75050
75470
|
const timeoutId = setTimeout(() => {
|
|
75051
75471
|
if (!serverReadyRef.current) {
|
|
75052
75472
|
console.log("Server status check failed");
|
|
75053
|
-
setServerError("
|
|
75473
|
+
setServerError("Server status check failed - please check the server");
|
|
75054
75474
|
setServerStatus("error");
|
|
75475
|
+
setMessages((prev2) => prev2.filter((msg) => !msg.isThinking));
|
|
75476
|
+
setIsLocked(false);
|
|
75055
75477
|
}
|
|
75056
75478
|
}, 2e3);
|
|
75057
75479
|
return () => {
|
|
@@ -75078,41 +75500,48 @@ const Chat = ({
|
|
|
75078
75500
|
}
|
|
75079
75501
|
};
|
|
75080
75502
|
const sendMessage = () => {
|
|
75081
|
-
var _a;
|
|
75503
|
+
var _a, _b;
|
|
75082
75504
|
if (!message2.trim() || isLocked) return;
|
|
75505
|
+
const timestamp = Date.now();
|
|
75083
75506
|
const userMessage = {
|
|
75084
75507
|
content: message2,
|
|
75085
75508
|
sender: handle,
|
|
75086
|
-
id: `
|
|
75087
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
75088
|
-
};
|
|
75089
|
-
const thinkingMessage = {
|
|
75090
|
-
content: "",
|
|
75091
|
-
sender: "bot",
|
|
75092
|
-
id: `id_${Date.now()}_thinking`,
|
|
75093
|
-
isThinking: true,
|
|
75509
|
+
id: `user_${timestamp}_${Math.random().toString(36).substr(2, 9)}`,
|
|
75094
75510
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
75095
75511
|
};
|
|
75096
75512
|
setIsLocked(true);
|
|
75097
|
-
setMessages((prev2) => [...prev2,
|
|
75098
|
-
if (
|
|
75513
|
+
setMessages((prev2) => [...prev2, userMessage]);
|
|
75514
|
+
if ((_a = socketRef.current) == null ? void 0 : _a.connected) {
|
|
75515
|
+
const botMessageId = `bot_${timestamp}`;
|
|
75516
|
+
const thinkingMessage = {
|
|
75517
|
+
content: "",
|
|
75518
|
+
sender: "bot",
|
|
75519
|
+
id: botMessageId,
|
|
75520
|
+
isThinking: true,
|
|
75521
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
75522
|
+
};
|
|
75523
|
+
setMessages((prev2) => [...prev2, thinkingMessage]);
|
|
75524
|
+
}
|
|
75525
|
+
if (!((_b = socketRef.current) == null ? void 0 : _b.connected)) {
|
|
75099
75526
|
setServerError("Not connected to server");
|
|
75100
75527
|
setIsLocked(false);
|
|
75101
75528
|
return;
|
|
75102
75529
|
}
|
|
75103
|
-
socketRef.current.emit("message", userMessage);
|
|
75104
|
-
|
|
75105
|
-
|
|
75106
|
-
(
|
|
75107
|
-
(
|
|
75108
|
-
|
|
75109
|
-
|
|
75110
|
-
|
|
75111
|
-
|
|
75112
|
-
|
|
75113
|
-
|
|
75114
|
-
|
|
75115
|
-
|
|
75530
|
+
socketRef.current.emit("message", userMessage);
|
|
75531
|
+
if (socketRef.current.connected) {
|
|
75532
|
+
setTimeout(() => {
|
|
75533
|
+
setMessages(
|
|
75534
|
+
(prev2) => prev2.map(
|
|
75535
|
+
(msg) => msg.isThinking ? { ...msg, content: "Processing your message..." } : msg
|
|
75536
|
+
)
|
|
75537
|
+
);
|
|
75538
|
+
}, 300);
|
|
75539
|
+
setTimeout(() => {
|
|
75540
|
+
setMessages((prev2) => prev2.filter((msg) => !msg.isThinking));
|
|
75541
|
+
setServerError("No response from server");
|
|
75542
|
+
setIsLocked(false);
|
|
75543
|
+
}, 1e4);
|
|
75544
|
+
}
|
|
75116
75545
|
setMessage("");
|
|
75117
75546
|
};
|
|
75118
75547
|
const toggleChat = () => {
|
|
@@ -75121,15 +75550,22 @@ const Chat = ({
|
|
|
75121
75550
|
const handleInputChange = (e2) => {
|
|
75122
75551
|
setMessage(e2.payload.value);
|
|
75123
75552
|
};
|
|
75553
|
+
if (serverStatus === "error") {
|
|
75554
|
+
return /* @__PURE__ */ jsx(ErrorMessage, { children: "Network error" });
|
|
75555
|
+
}
|
|
75556
|
+
const uniqueMessages = messages2.filter(
|
|
75557
|
+
(msg, index2, self2) => index2 === self2.findIndex((t2) => t2.id === msg.id)
|
|
75558
|
+
);
|
|
75559
|
+
console.log("uniqueMessages", uniqueMessages);
|
|
75124
75560
|
return /* @__PURE__ */ jsxs(ChatContainer, { children: [
|
|
75125
75561
|
/* @__PURE__ */ jsx(HeroContainer, { $isVisible: !isChatOpen, children: /* @__PURE__ */ jsxs("div", { children: [
|
|
75126
|
-
title
|
|
75562
|
+
title ? /* @__PURE__ */ jsx(Typography, { variant: "heading3", children: title }) : null,
|
|
75127
75563
|
/* @__PURE__ */ jsx(Subtitle, { children: "Click the Chat Icon below to begin" }),
|
|
75128
|
-
serverError
|
|
75564
|
+
serverError ? /* @__PURE__ */ jsx(ErrorMessage, { children: serverError }) : null
|
|
75129
75565
|
] }) }),
|
|
75130
75566
|
isChatOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75131
|
-
/* @__PURE__ */ jsx(HeroContainer, { $isVisible: true, children: /* @__PURE__ */ jsx("div", { children: title
|
|
75132
|
-
/* @__PURE__ */ jsx(MessageList, { ref: messageListRef, children:
|
|
75567
|
+
/* @__PURE__ */ jsx(HeroContainer, { $isVisible: true, children: /* @__PURE__ */ jsx("div", { children: title ? /* @__PURE__ */ jsx(Typography, { variant: "heading2", children: title }) : null }) }),
|
|
75568
|
+
/* @__PURE__ */ jsx(MessageList, { ref: messageListRef, children: uniqueMessages.map((msg) => /* @__PURE__ */ jsx(
|
|
75133
75569
|
Message$1,
|
|
75134
75570
|
{
|
|
75135
75571
|
message: msg.content,
|
|
@@ -75282,305 +75718,61 @@ const Form$1 = styled(Form$2)`
|
|
|
75282
75718
|
const FormItem = Form$1.Item;
|
|
75283
75719
|
const Form2 = Object.assign(
|
|
75284
75720
|
({ children, ...properties }) => {
|
|
75285
|
-
const { breakpoint } = useGenesis();
|
|
75286
|
-
return /* @__PURE__ */ jsx(Form$1, { role: "form", ...properties, children });
|
|
75287
|
-
},
|
|
75288
|
-
{
|
|
75289
|
-
Item: FormItem,
|
|
75290
|
-
useForm: Form$1.useForm
|
|
75291
|
-
}
|
|
75292
|
-
);
|
|
75293
|
-
const Outline = (properties) => /* @__PURE__ */ jsxs(
|
|
75294
|
-
"svg",
|
|
75295
|
-
{
|
|
75296
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
75297
|
-
width: 24,
|
|
75298
|
-
height: 24,
|
|
75299
|
-
fill: "none",
|
|
75300
|
-
...properties,
|
|
75301
|
-
children: [
|
|
75302
|
-
/* @__PURE__ */ jsx(
|
|
75303
|
-
"path",
|
|
75304
|
-
{
|
|
75305
|
-
fill: "#101010",
|
|
75306
|
-
d: "M12.6 15.383a2.47 2.47 0 0 1 .18-.926c.054-.139.123-.278.207-.419.086-.143.173-.272.261-.39.09-.119.194-.24.314-.366.119-.127.231-.24.336-.34a17.157 17.157 0 0 1 1.087-.9c.034-.024.059-.044.076-.058.317-.246.552-.522.707-.829.154-.306.231-.616.231-.928 0-.413-.11-.73-.331-.953-.219-.224-.538-.336-.958-.336-.184 0-.372.043-.566.131a1.404 1.404 0 0 0-.48.346.89.89 0 0 1 .577.31.9.9 0 0 1 .235.619c0 .26-.092.481-.276.665a.901.901 0 0 1-.662.272.922.922 0 0 1-.84-.521 1.49 1.49 0 0 1-.177-.71c0-.204.04-.406.118-.606.078-.199.194-.384.348-.556.155-.174.337-.327.548-.46.211-.133.458-.238.741-.314.284-.076.584-.114.903-.114.396 0 .755.04 1.075.12.322.078.59.185.803.32.213.132.39.29.533.474.142.182.245.372.308.571.062.198.093.406.093.624 0 .213-.023.414-.07.604a2.076 2.076 0 0 1-.463.908 2.718 2.718 0 0 1-.346.343 5.695 5.695 0 0 1-.392.296 8.39 8.39 0 0 1-.407.266c-.125.075-.262.16-.41.255-.147.094-.271.18-.373.258a9.965 9.965 0 0 1-.369.264 34.1 34.1 0 0 0-.334.234c-.08.057-.17.133-.272.229-.1.095-.19.2-.273.313.223-.068.444-.102.662-.102h1.524a.307.307 0 0 0 .22-.094.617.617 0 0 0 .146-.246c.035-.1.06-.2.076-.302.018-.102.026-.2.026-.296v-.469h1.055v2.813h-5.39ZM7.418 9.611 7.216 11.1c.326-.102.68-.18 1.063-.232.385-.055.715-.082.99-.082.374 0 .702.058.985.173.283.113.513.275.688.486.176.211.308.46.396.747.088.285.132.607.132.964a2.168 2.168 0 0 1-.404 1.28c-.143.208-.32.39-.53.545a2.6 2.6 0 0 1-.804.375 3.77 3.77 0 0 1-1.075.144 3.46 3.46 0 0 1-.902-.114 2.57 2.57 0 0 1-1.29-.77 1.869 1.869 0 0 1-.348-.56A1.649 1.649 0 0 1 6 13.449c0-.252.059-.488.176-.709a.915.915 0 0 1 .343-.378.909.909 0 0 1 .498-.143c.26 0 .48.091.662.275a.897.897 0 0 1 .275.662.911.911 0 0 1-.234.621.895.895 0 0 1-.577.308c.128.144.289.26.48.349.193.086.382.129.565.129.42 0 .74-.112.958-.335.221-.224.332-.543.332-.955 0-.529-.11-.907-.332-1.133-.22-.227-.6-.34-1.136-.34-.242 0-.534.022-.876.067l-.938-.234.041-.024.48-3.492h.886c.039.01.14.037.301.082.164.043.279.072.343.085a5.676 5.676 0 0 0 .879.067c.824 0 1.527-.078 2.11-.234l.116.352a2.005 2.005 0 0 1-.36.662 1.748 1.748 0 0 1-.539.44 2.544 2.544 0 0 1-.63.23 3.194 3.194 0 0 1-.697.074c-.76 0-1.33-.088-1.708-.264Z"
|
|
75307
|
-
}
|
|
75308
|
-
),
|
|
75309
|
-
/* @__PURE__ */ jsx(
|
|
75310
|
-
"path",
|
|
75311
|
-
{
|
|
75312
|
-
fill: "#101010",
|
|
75313
|
-
fillRule: "evenodd",
|
|
75314
|
-
d: "M19 6H5a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1ZM5 4a3 3 0 0 0-3 3v9a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H5Z",
|
|
75315
|
-
clipRule: "evenodd"
|
|
75316
|
-
}
|
|
75317
|
-
)
|
|
75318
|
-
]
|
|
75319
|
-
}
|
|
75320
|
-
);
|
|
75321
|
-
const Solid = (properties) => /* @__PURE__ */ jsx(
|
|
75322
|
-
"svg",
|
|
75323
|
-
{
|
|
75324
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
75325
|
-
width: 24,
|
|
75326
|
-
height: 24,
|
|
75327
|
-
fill: "none",
|
|
75328
|
-
...properties,
|
|
75329
|
-
children: /* @__PURE__ */ jsx(
|
|
75330
|
-
"path",
|
|
75331
|
-
{
|
|
75332
|
-
fill: "#101010",
|
|
75333
|
-
d: "M19 4a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h14ZM6.718 8.117l-.48 3.492-.042.024.938.234c.342-.045.634-.067.876-.067.537 0 .916.113 1.136.34.221.226.332.604.332 1.133 0 .412-.11.73-.332.956-.218.222-.538.334-.958.334-.183 0-.372-.043-.565-.13a1.438 1.438 0 0 1-.48-.348.895.895 0 0 0 .577-.308.911.911 0 0 0 .234-.62c0-.26-.092-.481-.275-.663a.896.896 0 0 0-.662-.275.909.909 0 0 0-.498.143.915.915 0 0 0-.343.378 1.49 1.49 0 0 0-.176.71c0 .204.04.406.117.606.078.199.195.385.349.56a2.57 2.57 0 0 0 1.289.77c.283.076.584.114.902.114a3.77 3.77 0 0 0 1.075-.144 2.6 2.6 0 0 0 .803-.375c.211-.156.388-.337.53-.544a2.168 2.168 0 0 0 .405-1.28c0-.358-.044-.68-.132-.965a2.122 2.122 0 0 0-.396-.747 1.697 1.697 0 0 0-.688-.486 2.598 2.598 0 0 0-.984-.173c-.276 0-.606.027-.99.082-.384.053-.738.13-1.064.232l.202-1.489c.379.176.948.264 1.708.264.246 0 .478-.024.697-.073.219-.05.429-.126.63-.232.203-.105.383-.252.54-.44.155-.187.276-.407.36-.661l-.118-.352c-.582.156-1.285.235-2.109.235a5.676 5.676 0 0 1-.879-.068 8.84 8.84 0 0 1-.343-.085 17.89 17.89 0 0 0-.301-.082h-.885ZM15.178 8c-.318 0-.618.038-.902.114-.283.076-.53.18-.74.314a2.526 2.526 0 0 0-.549.46c-.154.172-.27.357-.348.556-.079.2-.117.402-.117.607 0 .252.058.488.175.709a.933.933 0 0 0 .841.521c.26 0 .48-.09.662-.272a.906.906 0 0 0 .276-.665.9.9 0 0 0-.235-.618.89.89 0 0 0-.577-.311c.129-.144.29-.26.48-.346.194-.088.382-.132.566-.132.42 0 .74.113.958.337.22.223.331.54.331.953 0 .312-.077.622-.231.928-.155.307-.39.583-.707.83l-.076.058c-.134.104-.255.197-.36.281a17.157 17.157 0 0 0-.727.618c-.105.1-.217.213-.336.34a4.22 4.22 0 0 0-.314.366 4.665 4.665 0 0 0-.26.39 2.753 2.753 0 0 0-.34.864 2.47 2.47 0 0 0-.047.48h5.39V12.57h-1.055v.47c0 .095-.008.193-.026.295a1.678 1.678 0 0 1-.076.302.617.617 0 0 1-.146.246.307.307 0 0 1-.22.094h-1.524c-.218 0-.44.034-.662.102.082-.113.173-.218.273-.313.101-.096.192-.172.272-.229a34.1 34.1 0 0 1 .334-.234c.143-.098.266-.186.37-.264.1-.078.225-.164.371-.258.149-.096.286-.18.41-.255a8.39 8.39 0 0 0 .408-.266c.146-.102.277-.2.392-.296.118-.096.233-.21.346-.343a2.076 2.076 0 0 0 .463-.908c.047-.19.07-.39.07-.604 0-.218-.031-.426-.093-.624-.063-.199-.166-.39-.308-.57a2.02 2.02 0 0 0-.533-.476 2.676 2.676 0 0 0-.803-.319c-.32-.08-.679-.12-1.075-.12Z"
|
|
75334
|
-
}
|
|
75335
|
-
)
|
|
75336
|
-
}
|
|
75337
|
-
);
|
|
75338
|
-
const UnitNumber = ({ variant }) => {
|
|
75339
|
-
return variant === "outline" ? /* @__PURE__ */ jsx(Outline, {}) : /* @__PURE__ */ jsx(Solid, {});
|
|
75340
|
-
};
|
|
75341
|
-
const getStateColors = (colors2, type4, state) => {
|
|
75342
|
-
const filled = {
|
|
75343
|
-
color: colors2.inputs.onsurface.active,
|
|
75344
|
-
borderColor: colors2[TYPE.secondary].active.borderColor,
|
|
75345
|
-
ringColor: colors2[type4].focussed.ringColor
|
|
75346
|
-
};
|
|
75347
|
-
const success = {
|
|
75348
|
-
color: colors2.status.success.default,
|
|
75349
|
-
borderColor: colors2.status.success.default,
|
|
75350
|
-
ringColor: colors2.status.success.ringColor
|
|
75351
|
-
};
|
|
75352
|
-
const error2 = {
|
|
75353
|
-
color: colors2.status.error.default,
|
|
75354
|
-
borderColor: colors2.status.error.default,
|
|
75355
|
-
ringColor: colors2.status.error.ringColor
|
|
75356
|
-
};
|
|
75357
|
-
const themeState = state !== STATE.error && state !== STATE.success && state !== STATE.filled ? {
|
|
75358
|
-
color: colors2.inputs.onsurface.active,
|
|
75359
|
-
backgroundColor: colors2.inputs.surface.active,
|
|
75360
|
-
borderColor: colors2.inputs.surface.border,
|
|
75361
|
-
ringColor: colors2[type4][state].ringColor
|
|
75362
|
-
} : null;
|
|
75363
|
-
const stateMap = {
|
|
75364
|
-
filled,
|
|
75365
|
-
error: error2,
|
|
75366
|
-
success,
|
|
75367
|
-
themeState
|
|
75368
|
-
};
|
|
75369
|
-
const getValidKey = (state2) => {
|
|
75370
|
-
const validStates = [STATE.filled, STATE.error, STATE.success];
|
|
75371
|
-
return validStates.includes(state2) ? state2 : "themeState";
|
|
75372
|
-
};
|
|
75373
|
-
const css = stateMap[getValidKey(state)];
|
|
75374
|
-
return css;
|
|
75375
|
-
};
|
|
75376
|
-
const getGenesisInputClass = ({ colors: colors2, borderRadius: borderRadius2, components: components2, shadows: shadows2 }, type4, state, hasBeforeAddon, hasAfterAddon, size) => {
|
|
75377
|
-
const stateColors = getStateColors(colors2, type4, state);
|
|
75378
|
-
const getBorderRadius = (hasBeforeAddon2, hasAfterAddon2) => {
|
|
75379
|
-
if (hasAfterAddon2 && !hasBeforeAddon2) {
|
|
75380
|
-
return `${borderRadius2.BorderRadiusMd}px 0px 0px ${borderRadius2.BorderRadiusMd}px`;
|
|
75381
|
-
}
|
|
75382
|
-
if (hasBeforeAddon2 && !hasAfterAddon2) {
|
|
75383
|
-
return `0px ${borderRadius2.BorderRadiusMd}px ${borderRadius2.BorderRadiusMd}px 0px`;
|
|
75384
|
-
}
|
|
75385
|
-
return `0px`;
|
|
75386
|
-
};
|
|
75387
|
-
return `
|
|
75388
|
-
&.ant-input {
|
|
75389
|
-
font-family: 'Inter', sans-serif;
|
|
75390
|
-
color: ${stateColors.color};
|
|
75391
|
-
border-color: ${stateColors.borderColor};
|
|
75392
|
-
box-shadow: ${shadows2.inputs[1]} !important;
|
|
75393
|
-
height: ${size === "normal" || size === "large" ? "40px" : "32px"} !important;
|
|
75394
|
-
}
|
|
75395
|
-
|
|
75396
|
-
/* Increase specificity for focus states */
|
|
75397
|
-
&.ant-input.ant-input:focus,
|
|
75398
|
-
&.ant-input.ant-input:focus-visible,
|
|
75399
|
-
&.ant-input.ant-input-focused {
|
|
75400
|
-
outline: none !important;
|
|
75401
|
-
border-color: ${colors2[type4].focussed.borderColor} !important;
|
|
75402
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor} !important;
|
|
75403
|
-
}
|
|
75404
|
-
|
|
75405
|
-
&.ant-input-outlined {
|
|
75406
|
-
border: 1px solid ${stateColors.borderColor};
|
|
75407
|
-
|
|
75408
|
-
&:hover {
|
|
75409
|
-
border-color: ${stateColors.borderColor};
|
|
75410
|
-
}
|
|
75411
|
-
}
|
|
75412
|
-
|
|
75413
|
-
.ant-input-group & {
|
|
75414
|
-
&:focus-within {
|
|
75415
|
-
outline: none;
|
|
75416
|
-
color: ${stateColors.color};
|
|
75417
|
-
box-shadow: none;
|
|
75418
|
-
border-color: ${colors2[type4].focussed.borderColor};
|
|
75419
|
-
}
|
|
75420
|
-
}
|
|
75421
|
-
|
|
75422
|
-
.ant-input-group:focus-within {
|
|
75423
|
-
outline: none;
|
|
75424
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75425
|
-
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75426
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
75427
|
-
|
|
75428
|
-
/* Hide focus styles on inner input when parent is focused */
|
|
75429
|
-
.ant-input:focus-within {
|
|
75430
|
-
box-shadow: none;
|
|
75431
|
-
border-radius: 0;
|
|
75432
|
-
border-radius: ${getBorderRadius(hasBeforeAddon, hasAfterAddon)};
|
|
75433
|
-
border-color: #ddd;
|
|
75434
|
-
}
|
|
75435
|
-
}
|
|
75436
|
-
|
|
75437
|
-
/* Remove inner input focus styles when in a group */
|
|
75438
|
-
.ant-input-group .ant-input:focus,
|
|
75439
|
-
.ant-input-group .ant-input:focus-visible,
|
|
75440
|
-
.ant-input-group .ant-input:focus-within {
|
|
75441
|
-
outline: none;
|
|
75442
|
-
box-shadow: none;
|
|
75443
|
-
border-color: ${colors2[type4].focussed.borderColor};
|
|
75444
|
-
}
|
|
75445
|
-
|
|
75446
|
-
/* Single focus ring on group */
|
|
75447
|
-
.ant-input-group:focus-within {
|
|
75448
|
-
outline: none;
|
|
75449
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75450
|
-
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75451
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
75452
|
-
}
|
|
75453
|
-
|
|
75454
|
-
/* Remove focus styles for standalone inputs */
|
|
75455
|
-
&:not(.ant-input-group):focus-visible {
|
|
75456
|
-
outline: none;
|
|
75457
|
-
color: ${stateColors.color};
|
|
75458
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75459
|
-
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75460
|
-
border-color: ${colors2[type4].focussed.borderColor};
|
|
75461
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
75462
|
-
}
|
|
75463
|
-
|
|
75464
|
-
&:not(.ant-input-group .ant-input):focus-visible {
|
|
75465
|
-
outline: none;
|
|
75466
|
-
color: ${stateColors.color};
|
|
75467
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors2[type4].focussed.ringColor};
|
|
75468
|
-
border-radius: ${borderRadius2.BorderRadiusMd}px;
|
|
75469
|
-
border-color: ${colors2[type4].focussed.borderColor};
|
|
75470
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
75471
|
-
}
|
|
75472
|
-
|
|
75473
|
-
&.ant-input-group-wrapper {
|
|
75474
|
-
.ant-input-group {
|
|
75475
|
-
display: flex;
|
|
75476
|
-
align-items: center;
|
|
75477
|
-
height: ${size === "normal" || size === "large" ? "40px" : "32px"};
|
|
75478
|
-
|
|
75479
|
-
.ant-input {
|
|
75480
|
-
height: 100% !important;
|
|
75481
|
-
}
|
|
75482
|
-
|
|
75483
|
-
.ant-input-group-addon {
|
|
75484
|
-
padding: 0 ${components2.input.suffixPrefixHorPadding};
|
|
75485
|
-
height: 100%;
|
|
75486
|
-
display: flex;
|
|
75487
|
-
align-items: center;
|
|
75488
|
-
min-width: fit-content;
|
|
75489
|
-
width: auto;
|
|
75490
|
-
|
|
75491
|
-
> * {
|
|
75492
|
-
width: 100%;
|
|
75493
|
-
}
|
|
75494
|
-
|
|
75495
|
-
.ant-select {
|
|
75496
|
-
height: 100%;
|
|
75497
|
-
|
|
75498
|
-
.ant-select-selector {
|
|
75499
|
-
height: 100%;
|
|
75500
|
-
display: flex;
|
|
75501
|
-
align-items: center;
|
|
75502
|
-
}
|
|
75503
|
-
}
|
|
75504
|
-
}
|
|
75505
|
-
}
|
|
75506
|
-
}
|
|
75507
|
-
`;
|
|
75508
|
-
};
|
|
75509
|
-
const Input$1 = styled(Input$2)`
|
|
75510
|
-
${({ theme, state, type: type4 = TYPE.primary, size = "normal", ...rest }) => {
|
|
75511
|
-
const hasBeforeAddon = !!rest.addonBefore;
|
|
75512
|
-
const hasAfterAddon = !!rest.addonAfter;
|
|
75513
|
-
return getGenesisInputClass(
|
|
75514
|
-
theme,
|
|
75515
|
-
type4,
|
|
75516
|
-
state,
|
|
75517
|
-
hasBeforeAddon,
|
|
75518
|
-
hasAfterAddon,
|
|
75519
|
-
size
|
|
75520
|
-
);
|
|
75521
|
-
}}
|
|
75522
|
-
`;
|
|
75523
|
-
const DropdownChevron = (properties) => {
|
|
75524
|
-
const { theme } = useGenesis();
|
|
75525
|
-
return /* @__PURE__ */ jsx(
|
|
75526
|
-
"svg",
|
|
75527
|
-
{
|
|
75528
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
75529
|
-
width: 20,
|
|
75530
|
-
height: 20,
|
|
75531
|
-
fill: "none",
|
|
75532
|
-
...properties,
|
|
75533
|
-
children: /* @__PURE__ */ jsx(
|
|
75721
|
+
const { breakpoint } = useGenesis();
|
|
75722
|
+
return /* @__PURE__ */ jsx(Form$1, { role: "form", ...properties, children });
|
|
75723
|
+
},
|
|
75724
|
+
{
|
|
75725
|
+
Item: FormItem,
|
|
75726
|
+
useForm: Form$1.useForm
|
|
75727
|
+
}
|
|
75728
|
+
);
|
|
75729
|
+
const Outline = (properties) => /* @__PURE__ */ jsxs(
|
|
75730
|
+
"svg",
|
|
75731
|
+
{
|
|
75732
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75733
|
+
width: 24,
|
|
75734
|
+
height: 24,
|
|
75735
|
+
fill: "none",
|
|
75736
|
+
...properties,
|
|
75737
|
+
children: [
|
|
75738
|
+
/* @__PURE__ */ jsx(
|
|
75534
75739
|
"path",
|
|
75535
75740
|
{
|
|
75536
|
-
fill: "#
|
|
75741
|
+
fill: "#101010",
|
|
75742
|
+
d: "M12.6 15.383a2.47 2.47 0 0 1 .18-.926c.054-.139.123-.278.207-.419.086-.143.173-.272.261-.39.09-.119.194-.24.314-.366.119-.127.231-.24.336-.34a17.157 17.157 0 0 1 1.087-.9c.034-.024.059-.044.076-.058.317-.246.552-.522.707-.829.154-.306.231-.616.231-.928 0-.413-.11-.73-.331-.953-.219-.224-.538-.336-.958-.336-.184 0-.372.043-.566.131a1.404 1.404 0 0 0-.48.346.89.89 0 0 1 .577.31.9.9 0 0 1 .235.619c0 .26-.092.481-.276.665a.901.901 0 0 1-.662.272.922.922 0 0 1-.84-.521 1.49 1.49 0 0 1-.177-.71c0-.204.04-.406.118-.606.078-.199.194-.384.348-.556.155-.174.337-.327.548-.46.211-.133.458-.238.741-.314.284-.076.584-.114.903-.114.396 0 .755.04 1.075.12.322.078.59.185.803.32.213.132.39.29.533.474.142.182.245.372.308.571.062.198.093.406.093.624 0 .213-.023.414-.07.604a2.076 2.076 0 0 1-.463.908 2.718 2.718 0 0 1-.346.343 5.695 5.695 0 0 1-.392.296 8.39 8.39 0 0 1-.407.266c-.125.075-.262.16-.41.255-.147.094-.271.18-.373.258a9.965 9.965 0 0 1-.369.264 34.1 34.1 0 0 0-.334.234c-.08.057-.17.133-.272.229-.1.095-.19.2-.273.313.223-.068.444-.102.662-.102h1.524a.307.307 0 0 0 .22-.094.617.617 0 0 0 .146-.246c.035-.1.06-.2.076-.302.018-.102.026-.2.026-.296v-.469h1.055v2.813h-5.39ZM7.418 9.611 7.216 11.1c.326-.102.68-.18 1.063-.232.385-.055.715-.082.99-.082.374 0 .702.058.985.173.283.113.513.275.688.486.176.211.308.46.396.747.088.285.132.607.132.964a2.168 2.168 0 0 1-.404 1.28c-.143.208-.32.39-.53.545a2.6 2.6 0 0 1-.804.375 3.77 3.77 0 0 1-1.075.144 3.46 3.46 0 0 1-.902-.114 2.57 2.57 0 0 1-1.29-.77 1.869 1.869 0 0 1-.348-.56A1.649 1.649 0 0 1 6 13.449c0-.252.059-.488.176-.709a.915.915 0 0 1 .343-.378.909.909 0 0 1 .498-.143c.26 0 .48.091.662.275a.897.897 0 0 1 .275.662.911.911 0 0 1-.234.621.895.895 0 0 1-.577.308c.128.144.289.26.48.349.193.086.382.129.565.129.42 0 .74-.112.958-.335.221-.224.332-.543.332-.955 0-.529-.11-.907-.332-1.133-.22-.227-.6-.34-1.136-.34-.242 0-.534.022-.876.067l-.938-.234.041-.024.48-3.492h.886c.039.01.14.037.301.082.164.043.279.072.343.085a5.676 5.676 0 0 0 .879.067c.824 0 1.527-.078 2.11-.234l.116.352a2.005 2.005 0 0 1-.36.662 1.748 1.748 0 0 1-.539.44 2.544 2.544 0 0 1-.63.23 3.194 3.194 0 0 1-.697.074c-.76 0-1.33-.088-1.708-.264Z"
|
|
75743
|
+
}
|
|
75744
|
+
),
|
|
75745
|
+
/* @__PURE__ */ jsx(
|
|
75746
|
+
"path",
|
|
75747
|
+
{
|
|
75748
|
+
fill: "#101010",
|
|
75537
75749
|
fillRule: "evenodd",
|
|
75538
|
-
d: "
|
|
75750
|
+
d: "M19 6H5a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1ZM5 4a3 3 0 0 0-3 3v9a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H5Z",
|
|
75539
75751
|
clipRule: "evenodd"
|
|
75540
75752
|
}
|
|
75541
75753
|
)
|
|
75542
|
-
|
|
75543
|
-
|
|
75544
|
-
|
|
75545
|
-
const
|
|
75546
|
-
|
|
75547
|
-
|
|
75548
|
-
|
|
75549
|
-
|
|
75550
|
-
|
|
75551
|
-
|
|
75552
|
-
|
|
75553
|
-
|
|
75554
|
-
|
|
75555
|
-
|
|
75556
|
-
|
|
75557
|
-
|
|
75558
|
-
if (onChange) {
|
|
75559
|
-
onChange({
|
|
75560
|
-
event: "inputChange",
|
|
75561
|
-
payload: {
|
|
75562
|
-
value: e2.target.value
|
|
75563
|
-
}
|
|
75564
|
-
});
|
|
75754
|
+
]
|
|
75755
|
+
}
|
|
75756
|
+
);
|
|
75757
|
+
const Solid = (properties) => /* @__PURE__ */ jsx(
|
|
75758
|
+
"svg",
|
|
75759
|
+
{
|
|
75760
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
75761
|
+
width: 24,
|
|
75762
|
+
height: 24,
|
|
75763
|
+
fill: "none",
|
|
75764
|
+
...properties,
|
|
75765
|
+
children: /* @__PURE__ */ jsx(
|
|
75766
|
+
"path",
|
|
75767
|
+
{
|
|
75768
|
+
fill: "#101010",
|
|
75769
|
+
d: "M19 4a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h14ZM6.718 8.117l-.48 3.492-.042.024.938.234c.342-.045.634-.067.876-.067.537 0 .916.113 1.136.34.221.226.332.604.332 1.133 0 .412-.11.73-.332.956-.218.222-.538.334-.958.334-.183 0-.372-.043-.565-.13a1.438 1.438 0 0 1-.48-.348.895.895 0 0 0 .577-.308.911.911 0 0 0 .234-.62c0-.26-.092-.481-.275-.663a.896.896 0 0 0-.662-.275.909.909 0 0 0-.498.143.915.915 0 0 0-.343.378 1.49 1.49 0 0 0-.176.71c0 .204.04.406.117.606.078.199.195.385.349.56a2.57 2.57 0 0 0 1.289.77c.283.076.584.114.902.114a3.77 3.77 0 0 0 1.075-.144 2.6 2.6 0 0 0 .803-.375c.211-.156.388-.337.53-.544a2.168 2.168 0 0 0 .405-1.28c0-.358-.044-.68-.132-.965a2.122 2.122 0 0 0-.396-.747 1.697 1.697 0 0 0-.688-.486 2.598 2.598 0 0 0-.984-.173c-.276 0-.606.027-.99.082-.384.053-.738.13-1.064.232l.202-1.489c.379.176.948.264 1.708.264.246 0 .478-.024.697-.073.219-.05.429-.126.63-.232.203-.105.383-.252.54-.44.155-.187.276-.407.36-.661l-.118-.352c-.582.156-1.285.235-2.109.235a5.676 5.676 0 0 1-.879-.068 8.84 8.84 0 0 1-.343-.085 17.89 17.89 0 0 0-.301-.082h-.885ZM15.178 8c-.318 0-.618.038-.902.114-.283.076-.53.18-.74.314a2.526 2.526 0 0 0-.549.46c-.154.172-.27.357-.348.556-.079.2-.117.402-.117.607 0 .252.058.488.175.709a.933.933 0 0 0 .841.521c.26 0 .48-.09.662-.272a.906.906 0 0 0 .276-.665.9.9 0 0 0-.235-.618.89.89 0 0 0-.577-.311c.129-.144.29-.26.48-.346.194-.088.382-.132.566-.132.42 0 .74.113.958.337.22.223.331.54.331.953 0 .312-.077.622-.231.928-.155.307-.39.583-.707.83l-.076.058c-.134.104-.255.197-.36.281a17.157 17.157 0 0 0-.727.618c-.105.1-.217.213-.336.34a4.22 4.22 0 0 0-.314.366 4.665 4.665 0 0 0-.26.39 2.753 2.753 0 0 0-.34.864 2.47 2.47 0 0 0-.047.48h5.39V12.57h-1.055v.47c0 .095-.008.193-.026.295a1.678 1.678 0 0 1-.076.302.617.617 0 0 1-.146.246.307.307 0 0 1-.22.094h-1.524c-.218 0-.44.034-.662.102.082-.113.173-.218.273-.313.101-.096.192-.172.272-.229a34.1 34.1 0 0 1 .334-.234c.143-.098.266-.186.37-.264.1-.078.225-.164.371-.258.149-.096.286-.18.41-.255a8.39 8.39 0 0 0 .408-.266c.146-.102.277-.2.392-.296.118-.096.233-.21.346-.343a2.076 2.076 0 0 0 .463-.908c.047-.19.07-.39.07-.604 0-.218-.031-.426-.093-.624-.063-.199-.166-.39-.308-.57a2.02 2.02 0 0 0-.533-.476 2.676 2.676 0 0 0-.803-.319c-.32-.08-.679-.12-1.075-.12Z"
|
|
75565
75770
|
}
|
|
75566
|
-
|
|
75567
|
-
|
|
75568
|
-
|
|
75569
|
-
|
|
75570
|
-
|
|
75571
|
-
{
|
|
75572
|
-
...validRest,
|
|
75573
|
-
size,
|
|
75574
|
-
state,
|
|
75575
|
-
disabled: state === "disabled" || rest.disabled,
|
|
75576
|
-
addonAfter,
|
|
75577
|
-
style: {
|
|
75578
|
-
height: size === "normal" || size === "large" ? "40px" : "32px"
|
|
75579
|
-
},
|
|
75580
|
-
onChange: handleChange,
|
|
75581
|
-
value: value2
|
|
75582
|
-
}
|
|
75583
|
-
);
|
|
75771
|
+
)
|
|
75772
|
+
}
|
|
75773
|
+
);
|
|
75774
|
+
const UnitNumber = ({ variant }) => {
|
|
75775
|
+
return variant === "outline" ? /* @__PURE__ */ jsx(Outline, {}) : /* @__PURE__ */ jsx(Solid, {});
|
|
75584
75776
|
};
|
|
75585
75777
|
function r(e2) {
|
|
75586
75778
|
var t2, f, n2 = "";
|
|
@@ -78994,171 +79186,6 @@ const Table$1 = styled(ForwardTable)`
|
|
|
78994
79186
|
return getGenesisClass$3(theme, $isMainContentCell);
|
|
78995
79187
|
}}
|
|
78996
79188
|
`;
|
|
78997
|
-
const getVariant = (typography2, variant, breakpoint) => {
|
|
78998
|
-
return `
|
|
78999
|
-
font-size: ${typography2[breakpoint][variant].fontSize}px !important;
|
|
79000
|
-
line-height: ${typography2[breakpoint][variant].lineHeight};
|
|
79001
|
-
letter-spacing: ${typography2[breakpoint][variant].letterSpacing}px;
|
|
79002
|
-
font-weight: ${typography2[breakpoint][variant].fontWeight};
|
|
79003
|
-
`;
|
|
79004
|
-
};
|
|
79005
|
-
const getColor = (color2, colors2, $themeType) => {
|
|
79006
|
-
if (color2) {
|
|
79007
|
-
return color2;
|
|
79008
|
-
}
|
|
79009
|
-
return colors2[$themeType].active.color;
|
|
79010
|
-
};
|
|
79011
|
-
const getFontFamily = (variant) => {
|
|
79012
|
-
return `
|
|
79013
|
-
${variant.includes("digits") ? "'Roboto Mono', sans-serif" : "'Inter', sans-serif"} !important;
|
|
79014
|
-
`;
|
|
79015
|
-
};
|
|
79016
|
-
const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 }, $themeType, variant, state, breakpoint, color2, $isFullWidth) => `
|
|
79017
|
-
&.ant-typography {
|
|
79018
|
-
font-family: ${getFontFamily(variant)};
|
|
79019
|
-
color: ${getColor(color2, colors2, $themeType)} !important;
|
|
79020
|
-
${getVariant(typography2, variant, breakpoint)}
|
|
79021
|
-
margin-bottom: 0 !important;
|
|
79022
|
-
width: ${$isFullWidth ? "100%" : "auto"};
|
|
79023
|
-
line-height: 1;
|
|
79024
|
-
|
|
79025
|
-
&:disabled {
|
|
79026
|
-
color: ${colors2.status.disabled.default} !important;
|
|
79027
|
-
userSelect: none;
|
|
79028
|
-
cursor: not-allowed;
|
|
79029
|
-
}
|
|
79030
|
-
}
|
|
79031
|
-
`;
|
|
79032
|
-
const Headline = styled(Typography$1.Title)`
|
|
79033
|
-
${({
|
|
79034
|
-
theme,
|
|
79035
|
-
$themeType,
|
|
79036
|
-
variant,
|
|
79037
|
-
state,
|
|
79038
|
-
breakpoint,
|
|
79039
|
-
color: color2,
|
|
79040
|
-
$isFullWidth
|
|
79041
|
-
}) => {
|
|
79042
|
-
return getGenesisTypographyClass(
|
|
79043
|
-
theme,
|
|
79044
|
-
$themeType,
|
|
79045
|
-
variant,
|
|
79046
|
-
state,
|
|
79047
|
-
breakpoint,
|
|
79048
|
-
color2,
|
|
79049
|
-
$isFullWidth
|
|
79050
|
-
);
|
|
79051
|
-
}}
|
|
79052
|
-
`;
|
|
79053
|
-
const Paragraph = styled(
|
|
79054
|
-
Typography$1.Paragraph
|
|
79055
|
-
)`
|
|
79056
|
-
${({
|
|
79057
|
-
theme,
|
|
79058
|
-
$themeType,
|
|
79059
|
-
variant,
|
|
79060
|
-
state,
|
|
79061
|
-
breakpoint,
|
|
79062
|
-
color: color2,
|
|
79063
|
-
$isFullWidth
|
|
79064
|
-
}) => {
|
|
79065
|
-
return getGenesisTypographyClass(
|
|
79066
|
-
theme,
|
|
79067
|
-
$themeType,
|
|
79068
|
-
variant,
|
|
79069
|
-
state,
|
|
79070
|
-
breakpoint,
|
|
79071
|
-
color2,
|
|
79072
|
-
$isFullWidth
|
|
79073
|
-
);
|
|
79074
|
-
}}
|
|
79075
|
-
`;
|
|
79076
|
-
const Text = styled(Typography$1.Text)`
|
|
79077
|
-
${({
|
|
79078
|
-
theme,
|
|
79079
|
-
$themeType,
|
|
79080
|
-
variant,
|
|
79081
|
-
state,
|
|
79082
|
-
breakpoint,
|
|
79083
|
-
color: color2,
|
|
79084
|
-
$isFullWidth
|
|
79085
|
-
}) => {
|
|
79086
|
-
return getGenesisTypographyClass(
|
|
79087
|
-
theme,
|
|
79088
|
-
$themeType,
|
|
79089
|
-
variant,
|
|
79090
|
-
state,
|
|
79091
|
-
breakpoint,
|
|
79092
|
-
color2,
|
|
79093
|
-
$isFullWidth
|
|
79094
|
-
);
|
|
79095
|
-
}}
|
|
79096
|
-
`;
|
|
79097
|
-
const Typography = ({
|
|
79098
|
-
children,
|
|
79099
|
-
themeType = TYPE.secondary,
|
|
79100
|
-
variant = TYPOGRAPHY_VARIANT.body1,
|
|
79101
|
-
state = STATE.active,
|
|
79102
|
-
color: color2,
|
|
79103
|
-
isText = false,
|
|
79104
|
-
isFullWidth,
|
|
79105
|
-
style: style2,
|
|
79106
|
-
isDisabled,
|
|
79107
|
-
...rest
|
|
79108
|
-
}) => {
|
|
79109
|
-
const { breakpoint } = useGenesis();
|
|
79110
|
-
if (variant.startsWith("display") || variant.startsWith("heading")) {
|
|
79111
|
-
const level = variant.split("heading")[1] || variant.split("display")[1];
|
|
79112
|
-
return /* @__PURE__ */ jsx(
|
|
79113
|
-
Headline,
|
|
79114
|
-
{
|
|
79115
|
-
state,
|
|
79116
|
-
$themeType: themeType,
|
|
79117
|
-
variant,
|
|
79118
|
-
breakpoint,
|
|
79119
|
-
color: color2,
|
|
79120
|
-
level: Number.parseInt(level),
|
|
79121
|
-
$isFullWidth: isFullWidth,
|
|
79122
|
-
style: style2,
|
|
79123
|
-
disabled: isDisabled,
|
|
79124
|
-
...rest,
|
|
79125
|
-
children
|
|
79126
|
-
}
|
|
79127
|
-
);
|
|
79128
|
-
}
|
|
79129
|
-
if (isText) {
|
|
79130
|
-
return /* @__PURE__ */ jsx(
|
|
79131
|
-
Text,
|
|
79132
|
-
{
|
|
79133
|
-
state,
|
|
79134
|
-
$themeType: themeType,
|
|
79135
|
-
variant,
|
|
79136
|
-
breakpoint,
|
|
79137
|
-
color: color2,
|
|
79138
|
-
$isFullWidth: isFullWidth,
|
|
79139
|
-
style: style2,
|
|
79140
|
-
disabled: isDisabled,
|
|
79141
|
-
...rest,
|
|
79142
|
-
children
|
|
79143
|
-
}
|
|
79144
|
-
);
|
|
79145
|
-
}
|
|
79146
|
-
return /* @__PURE__ */ jsx(
|
|
79147
|
-
Paragraph,
|
|
79148
|
-
{
|
|
79149
|
-
state,
|
|
79150
|
-
$themeType: themeType,
|
|
79151
|
-
variant,
|
|
79152
|
-
breakpoint,
|
|
79153
|
-
color: color2,
|
|
79154
|
-
$isFullWidth: isFullWidth,
|
|
79155
|
-
style: style2,
|
|
79156
|
-
disabled: isDisabled,
|
|
79157
|
-
...rest,
|
|
79158
|
-
children
|
|
79159
|
-
}
|
|
79160
|
-
);
|
|
79161
|
-
};
|
|
79162
79189
|
const NumberButton = styled.button`
|
|
79163
79190
|
background: ${({ $active, theme }) => $active ? theme.colors.primary.default.backgroundColor : "transparent"};
|
|
79164
79191
|
color: ${({ $active, theme }) => $active ? "#fff" : theme.colors.onsurface["copy-light"] || "#6C6C6C"};
|