@jects/jds 0.2.0 → 0.2.1
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/{chunk-36BLFWIB.js → chunk-7WOJLKYD.js} +1269 -1267
- package/dist/chunk-7WOJLKYD.js.map +1 -0
- package/dist/index.cjs +912 -620
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +829 -537
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +1268 -1266
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js +1 -1
- package/dist/tokens.cjs +1268 -1266
- package/dist/tokens.cjs.map +1 -1
- package/dist/tokens.d.cts +164 -162
- package/dist/tokens.d.ts +164 -162
- package/dist/tokens.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-36BLFWIB.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6097,7 +6097,7 @@ var ImageButton = (0, import_styled9.default)("button", {
|
|
|
6097
6097
|
inset: "-1px"
|
|
6098
6098
|
},
|
|
6099
6099
|
"&:hover::after": {
|
|
6100
|
-
backgroundColor: theme.color.semantic.curtain.dimmer,
|
|
6100
|
+
backgroundColor: theme.color.semantic.curtain.static.dimmer,
|
|
6101
6101
|
opacity: isReadonly ? 0 : 1,
|
|
6102
6102
|
cursor: isReadonly ? "default" : "pointer"
|
|
6103
6103
|
},
|
|
@@ -6414,10 +6414,7 @@ var getOverlayPositionStyles = (hasOffset, offset) => {
|
|
|
6414
6414
|
height: "auto"
|
|
6415
6415
|
};
|
|
6416
6416
|
};
|
|
6417
|
-
var getFocusVisibleStyles = (
|
|
6418
|
-
if (isEmptyPost) {
|
|
6419
|
-
return shadow(theme, "raised");
|
|
6420
|
-
}
|
|
6417
|
+
var getFocusVisibleStyles = (hasOffset, interactionParams) => {
|
|
6421
6418
|
if (!hasOffset && interactionParams.focus.boxShadow) {
|
|
6422
6419
|
return { boxShadow: interactionParams.focus.boxShadow };
|
|
6423
6420
|
}
|
|
@@ -6551,7 +6548,6 @@ var StyledCardOverlay = (0, import_styled10.default)("a", {
|
|
|
6551
6548
|
borderRadius: borderRadius > 0 ? `${borderRadius}px` : 0,
|
|
6552
6549
|
outline: "none",
|
|
6553
6550
|
pointerEvents: $isDisabled ? "none" : "auto",
|
|
6554
|
-
transition: isEmptyPost ? `box-shadow ${theme.environment.semantic.duration[150]} ${theme.environment.semantic.motion.fluent}` : void 0,
|
|
6555
6551
|
"::before": {
|
|
6556
6552
|
...interactionParams.rest["::before"],
|
|
6557
6553
|
transition: `opacity ${theme.environment.semantic.duration[150]} ${theme.environment.semantic.motion.fluent}`
|
|
@@ -6562,7 +6558,6 @@ var StyledCardOverlay = (0, import_styled10.default)("a", {
|
|
|
6562
6558
|
},
|
|
6563
6559
|
...!$isDisabled && {
|
|
6564
6560
|
"&:hover": {
|
|
6565
|
-
...isEmptyPost && shadow(theme, "raised"),
|
|
6566
6561
|
"::after": {
|
|
6567
6562
|
...interactionParams.hover["::after"],
|
|
6568
6563
|
transition: `opacity ${theme.environment.semantic.duration[100]} ${theme.environment.semantic.motion.fluent}`
|
|
@@ -6575,7 +6570,7 @@ var StyledCardOverlay = (0, import_styled10.default)("a", {
|
|
|
6575
6570
|
}
|
|
6576
6571
|
},
|
|
6577
6572
|
"&:focus-visible": {
|
|
6578
|
-
...getFocusVisibleStyles(
|
|
6573
|
+
...getFocusVisibleStyles(hasOffset, interactionParams),
|
|
6579
6574
|
"::before": {
|
|
6580
6575
|
...interactionParams.focus["::before"],
|
|
6581
6576
|
...hasOffset && { opacity: 1 }
|
|
@@ -7143,17 +7138,17 @@ var basicStyles = {
|
|
|
7143
7138
|
var feedbackStyles = {
|
|
7144
7139
|
positive: (theme) => ({
|
|
7145
7140
|
bg: theme.color.semantic.feedback.positive.alpha.subtlest,
|
|
7146
|
-
border: theme.color.semantic.feedback.positive.alpha.
|
|
7141
|
+
border: theme.color.semantic.feedback.positive.alpha.assistive,
|
|
7147
7142
|
color: theme.color.semantic.feedback.positive.normal
|
|
7148
7143
|
}),
|
|
7149
7144
|
destructive: (theme) => ({
|
|
7150
7145
|
bg: theme.color.semantic.feedback.destructive.alpha.subtlest,
|
|
7151
|
-
border: theme.color.semantic.feedback.destructive.alpha.
|
|
7146
|
+
border: theme.color.semantic.feedback.destructive.alpha.assistive,
|
|
7152
7147
|
color: theme.color.semantic.feedback.destructive.normal
|
|
7153
7148
|
}),
|
|
7154
7149
|
notifying: (theme) => ({
|
|
7155
7150
|
bg: theme.color.semantic.feedback.notifying.alpha.subtlest,
|
|
7156
|
-
border: theme.color.semantic.feedback.notifying.alpha.
|
|
7151
|
+
border: theme.color.semantic.feedback.notifying.alpha.assistive,
|
|
7157
7152
|
color: theme.color.semantic.feedback.notifying.normal
|
|
7158
7153
|
})
|
|
7159
7154
|
};
|
|
@@ -7190,15 +7185,6 @@ var calloutContentSizeMap = {
|
|
|
7190
7185
|
content: "semantic-textStyle-body-2xs-normal"
|
|
7191
7186
|
}
|
|
7192
7187
|
};
|
|
7193
|
-
var getButtonConfig = (mode) => {
|
|
7194
|
-
if (mode.feedback) {
|
|
7195
|
-
if (mode.feedback === "notifying") {
|
|
7196
|
-
return { variant: "basic", hierarchy: "primary" };
|
|
7197
|
-
}
|
|
7198
|
-
return { variant: "feedback", intent: mode.feedback };
|
|
7199
|
-
}
|
|
7200
|
-
return { variant: "basic", hierarchy: mode.hierarchy || "secondary" };
|
|
7201
|
-
};
|
|
7202
7188
|
|
|
7203
7189
|
// src/components/Callout/Callout.style.ts
|
|
7204
7190
|
var CalloutContainer = import_styled11.default.div(
|
|
@@ -7797,13 +7783,19 @@ var Callout = ({
|
|
|
7797
7783
|
}) => {
|
|
7798
7784
|
const theme = (0, import_react22.useTheme)();
|
|
7799
7785
|
const styleToken = getCalloutStyleToken(theme, props);
|
|
7800
|
-
const buttonConfig = labelButtonProps && getButtonConfig(props);
|
|
7801
7786
|
const renderButton = () => {
|
|
7802
|
-
if (!
|
|
7803
|
-
if (
|
|
7804
|
-
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(LabelButton.
|
|
7787
|
+
if (!labelButtonProps) return null;
|
|
7788
|
+
if (props.feedback) {
|
|
7789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(LabelButton.Basic, { hierarchy: "secondary", size, ...labelButtonProps });
|
|
7805
7790
|
}
|
|
7806
|
-
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
7791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
|
|
7792
|
+
LabelButton.Basic,
|
|
7793
|
+
{
|
|
7794
|
+
hierarchy: props.hierarchy || "secondary",
|
|
7795
|
+
size,
|
|
7796
|
+
...labelButtonProps
|
|
7797
|
+
}
|
|
7798
|
+
);
|
|
7807
7799
|
};
|
|
7808
7800
|
return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(CalloutContainer, { $size: size, $styleToken: styleToken, className, children: [
|
|
7809
7801
|
/* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(CalloutContentDiv, { $size: size, children: [
|
|
@@ -8478,7 +8470,7 @@ var interactionStyles4 = (theme, disabled, readonly) => {
|
|
|
8478
8470
|
const makeLayer = (state) => InteractionLayer({
|
|
8479
8471
|
theme,
|
|
8480
8472
|
state,
|
|
8481
|
-
variant: "
|
|
8473
|
+
variant: "normal",
|
|
8482
8474
|
density: "assistive",
|
|
8483
8475
|
fillColor: "default",
|
|
8484
8476
|
isReadonly: disabled || readonly,
|
|
@@ -8547,7 +8539,7 @@ var FileItemWrapButton = import_styled14.default.button(
|
|
|
8547
8539
|
flexDirection: "column",
|
|
8548
8540
|
gap: theme.scheme.semantic.spacing[8],
|
|
8549
8541
|
...interaction,
|
|
8550
|
-
cursor: $disabled || $readonly ? "default" : "pointer",
|
|
8542
|
+
cursor: $disabled || $readonly || $hasError ? "default" : "pointer",
|
|
8551
8543
|
color: $hasError ? theme.color.semantic.object.bold : $disabled ? theme.color.semantic.object.subtle : theme.color.semantic.object.bold
|
|
8552
8544
|
};
|
|
8553
8545
|
}
|
|
@@ -8573,10 +8565,14 @@ var FileItemIcon = (0, import_styled14.default)(Icon)(() => {
|
|
|
8573
8565
|
color: "inherit"
|
|
8574
8566
|
};
|
|
8575
8567
|
});
|
|
8576
|
-
var FileItemLabel = (0, import_styled14.default)(Label)(({
|
|
8568
|
+
var FileItemLabel = (0, import_styled14.default)(Label)(({
|
|
8569
|
+
$disabled,
|
|
8570
|
+
$readonly,
|
|
8571
|
+
$hasError
|
|
8572
|
+
}) => {
|
|
8577
8573
|
return {
|
|
8578
8574
|
flex: "1",
|
|
8579
|
-
cursor: $disabled || $readonly ? "default" : "pointer",
|
|
8575
|
+
cursor: $disabled || $readonly || $hasError ? "default" : "pointer",
|
|
8580
8576
|
color: "inherit"
|
|
8581
8577
|
};
|
|
8582
8578
|
});
|
|
@@ -8634,6 +8630,7 @@ var FileItem = (0, import_react24.forwardRef)(
|
|
|
8634
8630
|
weight: "subtle",
|
|
8635
8631
|
$disabled: disabled,
|
|
8636
8632
|
$readonly: readonly,
|
|
8633
|
+
$hasError: hasError,
|
|
8637
8634
|
className: "file-name",
|
|
8638
8635
|
children: fileName
|
|
8639
8636
|
}
|
|
@@ -8993,22 +8990,22 @@ var getHelperTextColor = (theme, validation, disabled, readOnly) => {
|
|
|
8993
8990
|
};
|
|
8994
8991
|
var StyledFieldContainer = (0, import_styled17.default)("div", {
|
|
8995
8992
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
8996
|
-
})(({ theme
|
|
8993
|
+
})(({ theme }) => ({
|
|
8997
8994
|
display: "flex",
|
|
8998
8995
|
padding: 0,
|
|
8999
8996
|
width: "100%",
|
|
9000
|
-
flexDirection:
|
|
9001
|
-
justifyContent:
|
|
8997
|
+
flexDirection: "column",
|
|
8998
|
+
justifyContent: "center",
|
|
9002
8999
|
alignItems: "flex-start",
|
|
9003
|
-
gap:
|
|
9000
|
+
gap: theme.scheme.semantic.spacing[6]
|
|
9004
9001
|
}));
|
|
9005
9002
|
var StyledLabelContainer = (0, import_styled17.default)("div", {
|
|
9006
9003
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
9007
9004
|
})(
|
|
9008
|
-
({ theme, $
|
|
9005
|
+
({ theme, $disabled = false, $readOnly = false }) => ({
|
|
9009
9006
|
display: "flex",
|
|
9010
9007
|
padding: 0,
|
|
9011
|
-
alignItems:
|
|
9008
|
+
alignItems: "center",
|
|
9012
9009
|
alignSelf: "stretch",
|
|
9013
9010
|
gap: theme.scheme.semantic.spacing[4],
|
|
9014
9011
|
color: getLabelColor(theme, $disabled, $readOnly)
|
|
@@ -9021,16 +9018,9 @@ var StyledLabelIcon = (0, import_styled17.default)(Icon, {
|
|
|
9021
9018
|
}));
|
|
9022
9019
|
var StyledFieldLabel = (0, import_styled17.default)(Label, {
|
|
9023
9020
|
shouldForwardProp: (prop) => !prop.startsWith("$")
|
|
9024
|
-
})(
|
|
9025
|
-
(
|
|
9026
|
-
|
|
9027
|
-
...$layout === "horizontal" && {
|
|
9028
|
-
height: pxToRem(40),
|
|
9029
|
-
minWidth: pxToRem(80),
|
|
9030
|
-
maxWidth: pxToRem(120)
|
|
9031
|
-
}
|
|
9032
|
-
})
|
|
9033
|
-
);
|
|
9021
|
+
})(({ theme, $disabled, $readOnly }) => ({
|
|
9022
|
+
color: getLabelColor(theme, $disabled, $readOnly)
|
|
9023
|
+
}));
|
|
9034
9024
|
var StyledHelperText = (0, import_styled17.default)(Label, {
|
|
9035
9025
|
shouldForwardProp: (prop) => !prop.startsWith("$")
|
|
9036
9026
|
})(({ theme, $validation, $disabled, $readOnly }) => ({
|
|
@@ -9046,9 +9036,8 @@ var StyledInputColumn = (0, import_styled17.default)("div")(({ theme }) => ({
|
|
|
9046
9036
|
}));
|
|
9047
9037
|
var StyledInputRow = (0, import_styled17.default)("div", {
|
|
9048
9038
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
9049
|
-
})(({ theme, $style
|
|
9050
|
-
const
|
|
9051
|
-
const gapValue = isEmptyVertical ? 20 : 12;
|
|
9039
|
+
})(({ theme, $style }) => {
|
|
9040
|
+
const gapValue = $style === "empty" ? 20 : 12;
|
|
9052
9041
|
return {
|
|
9053
9042
|
display: "flex",
|
|
9054
9043
|
gap: theme.scheme.semantic.spacing[gapValue],
|
|
@@ -9360,7 +9349,6 @@ var import_jsx_runtime154 = require("@emotion/react/jsx-runtime");
|
|
|
9360
9349
|
var InputArea = (0, import_react28.forwardRef)(
|
|
9361
9350
|
({
|
|
9362
9351
|
style = "outlined",
|
|
9363
|
-
layout = "vertical",
|
|
9364
9352
|
validation = "none",
|
|
9365
9353
|
interaction = "enabled",
|
|
9366
9354
|
label,
|
|
@@ -9378,8 +9366,8 @@ var InputArea = (0, import_react28.forwardRef)(
|
|
|
9378
9366
|
const { isDisabled, isReadOnly } = getInteractionStates(interaction);
|
|
9379
9367
|
const currentLength = value.length;
|
|
9380
9368
|
const hasHelperContainer = Boolean(helperText) || Boolean(maxLength);
|
|
9381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(StyledFieldContainer, {
|
|
9382
|
-
label && labelVisible && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(StyledLabelContainer, { $
|
|
9369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(StyledFieldContainer, { children: [
|
|
9370
|
+
label && labelVisible && /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(StyledLabelContainer, { $disabled: isDisabled, $readOnly: isReadOnly, children: [
|
|
9383
9371
|
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
9384
9372
|
StyledFieldLabel,
|
|
9385
9373
|
{
|
|
@@ -9389,7 +9377,6 @@ var InputArea = (0, import_react28.forwardRef)(
|
|
|
9389
9377
|
weight: "normal",
|
|
9390
9378
|
$disabled: isDisabled,
|
|
9391
9379
|
$readOnly: isReadOnly,
|
|
9392
|
-
$layout: layout,
|
|
9393
9380
|
children: label
|
|
9394
9381
|
}
|
|
9395
9382
|
),
|
|
@@ -9607,7 +9594,7 @@ var StyledSelectWrapper = (0, import_styled19.default)("div", {
|
|
|
9607
9594
|
border: "none",
|
|
9608
9595
|
boxShadow: baseBorderStyle,
|
|
9609
9596
|
borderRadius: theme.scheme.semantic.radius[6],
|
|
9610
|
-
cursor: $disabled ? "not-allowed" : "pointer",
|
|
9597
|
+
cursor: $disabled ? "not-allowed" : $readOnly ? "text" : "pointer",
|
|
9611
9598
|
transition: `box-shadow ${theme.environment.semantic.duration[100]} ${theme.environment.semantic.motion.fluent}`,
|
|
9612
9599
|
"::after": {
|
|
9613
9600
|
...restStyle["::after"],
|
|
@@ -9668,7 +9655,8 @@ var StyledSelectValue = (0, import_styled19.default)("span", {
|
|
|
9668
9655
|
...theme.textStyle["semantic-textStyle-body-sm-normal"],
|
|
9669
9656
|
userSelect: "none",
|
|
9670
9657
|
overflow: "hidden",
|
|
9671
|
-
textOverflow: "ellipsis"
|
|
9658
|
+
textOverflow: "ellipsis",
|
|
9659
|
+
cursor: $readOnly ? "text" : "inherit"
|
|
9672
9660
|
};
|
|
9673
9661
|
});
|
|
9674
9662
|
var getIconColor = (theme, disabled, readOnly, isFocus) => {
|
|
@@ -9708,7 +9696,6 @@ var useFormField = () => {
|
|
|
9708
9696
|
};
|
|
9709
9697
|
var FormFieldProvider = ({
|
|
9710
9698
|
style = "outlined",
|
|
9711
|
-
layout = "vertical",
|
|
9712
9699
|
validation = "none",
|
|
9713
9700
|
interaction = "enabled",
|
|
9714
9701
|
label,
|
|
@@ -9721,7 +9708,6 @@ var FormFieldProvider = ({
|
|
|
9721
9708
|
const value = {
|
|
9722
9709
|
fieldId,
|
|
9723
9710
|
style,
|
|
9724
|
-
layout,
|
|
9725
9711
|
validation,
|
|
9726
9712
|
interaction,
|
|
9727
9713
|
isDisabled,
|
|
@@ -9737,11 +9723,11 @@ var FormFieldProvider = ({
|
|
|
9737
9723
|
// src/components/Input/shared/FormField.tsx
|
|
9738
9724
|
var import_jsx_runtime156 = require("@emotion/react/jsx-runtime");
|
|
9739
9725
|
var FormFieldLabel = ({ children }) => {
|
|
9740
|
-
const { fieldId, label, isWithInfoIcon,
|
|
9726
|
+
const { fieldId, label, isWithInfoIcon, isDisabled, isReadOnly } = useFormField();
|
|
9741
9727
|
if (!label && !children) {
|
|
9742
9728
|
return null;
|
|
9743
9729
|
}
|
|
9744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(StyledLabelContainer, {
|
|
9730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(StyledLabelContainer, { children: [
|
|
9745
9731
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
9746
9732
|
StyledFieldLabel,
|
|
9747
9733
|
{
|
|
@@ -9751,7 +9737,6 @@ var FormFieldLabel = ({ children }) => {
|
|
|
9751
9737
|
weight: "normal",
|
|
9752
9738
|
$disabled: isDisabled,
|
|
9753
9739
|
$readOnly: isReadOnly,
|
|
9754
|
-
$layout: layout,
|
|
9755
9740
|
children: children || label
|
|
9756
9741
|
}
|
|
9757
9742
|
),
|
|
@@ -9781,7 +9766,6 @@ var FormFieldContent = ({ children }) => {
|
|
|
9781
9766
|
};
|
|
9782
9767
|
var FormField = ({
|
|
9783
9768
|
style,
|
|
9784
|
-
layout,
|
|
9785
9769
|
validation,
|
|
9786
9770
|
interaction,
|
|
9787
9771
|
label,
|
|
@@ -9793,7 +9777,6 @@ var FormField = ({
|
|
|
9793
9777
|
FormFieldProvider,
|
|
9794
9778
|
{
|
|
9795
9779
|
style,
|
|
9796
|
-
layout,
|
|
9797
9780
|
validation,
|
|
9798
9781
|
interaction,
|
|
9799
9782
|
label,
|
|
@@ -9866,7 +9849,6 @@ SelectFieldInput.displayName = "SelectFieldInput";
|
|
|
9866
9849
|
var SelectField = (0, import_react30.forwardRef)(
|
|
9867
9850
|
({
|
|
9868
9851
|
style = "outlined",
|
|
9869
|
-
layout = "vertical",
|
|
9870
9852
|
validation = "none",
|
|
9871
9853
|
interaction = "enabled",
|
|
9872
9854
|
isWithInfoIcon = false,
|
|
@@ -9878,13 +9860,12 @@ var SelectField = (0, import_react30.forwardRef)(
|
|
|
9878
9860
|
FormField,
|
|
9879
9861
|
{
|
|
9880
9862
|
style,
|
|
9881
|
-
layout,
|
|
9882
9863
|
validation,
|
|
9883
9864
|
interaction,
|
|
9884
9865
|
label,
|
|
9885
9866
|
isWithInfoIcon,
|
|
9886
9867
|
helperText,
|
|
9887
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(StyledFieldContainer, {
|
|
9868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(StyledFieldContainer, { children: [
|
|
9888
9869
|
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(FormField.Label, {}),
|
|
9889
9870
|
/* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(FormField.Content, { children: [
|
|
9890
9871
|
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)(SelectFieldInput, { ref, ...restProps }),
|
|
@@ -9903,7 +9884,6 @@ var import_jsx_runtime158 = require("@emotion/react/jsx-runtime");
|
|
|
9903
9884
|
var SelectFieldButton = (0, import_react31.forwardRef)(
|
|
9904
9885
|
({
|
|
9905
9886
|
style = "outlined",
|
|
9906
|
-
layout = "vertical",
|
|
9907
9887
|
validation = "none",
|
|
9908
9888
|
interaction = "enabled",
|
|
9909
9889
|
label,
|
|
@@ -9927,8 +9907,8 @@ var SelectFieldButton = (0, import_react31.forwardRef)(
|
|
|
9927
9907
|
onClick();
|
|
9928
9908
|
}
|
|
9929
9909
|
};
|
|
9930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledFieldContainer, {
|
|
9931
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledLabelContainer, {
|
|
9910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledFieldContainer, { children: [
|
|
9911
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledLabelContainer, { children: [
|
|
9932
9912
|
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
9933
9913
|
StyledFieldLabel,
|
|
9934
9914
|
{
|
|
@@ -9938,14 +9918,13 @@ var SelectFieldButton = (0, import_react31.forwardRef)(
|
|
|
9938
9918
|
weight: "normal",
|
|
9939
9919
|
$disabled: isDisabled,
|
|
9940
9920
|
$readOnly: isReadOnly,
|
|
9941
|
-
$layout: layout,
|
|
9942
9921
|
children: label
|
|
9943
9922
|
}
|
|
9944
9923
|
),
|
|
9945
9924
|
labelIcon && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(Icon, { name: labelIcon, size: "2xs" })
|
|
9946
9925
|
] }),
|
|
9947
9926
|
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledInputColumn, { children: [
|
|
9948
|
-
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledInputRow, { $style: style,
|
|
9927
|
+
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(StyledInputRow, { $style: style, children: [
|
|
9949
9928
|
/* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
|
|
9950
9929
|
StyledSelectWrapper,
|
|
9951
9930
|
{
|
|
@@ -10377,7 +10356,7 @@ var TagFieldUtils = {
|
|
|
10377
10356
|
// src/components/Input/TagField/TagItem.tsx
|
|
10378
10357
|
var import_jsx_runtime159 = require("@emotion/react/jsx-runtime");
|
|
10379
10358
|
var TagItem = ({ tag, isSelected, onSelect, onRemove }) => {
|
|
10380
|
-
const { isInteractive } = useFormField();
|
|
10359
|
+
const { isInteractive, isDisabled } = useFormField();
|
|
10381
10360
|
const handleRemoveIconClick = (e) => {
|
|
10382
10361
|
e.stopPropagation();
|
|
10383
10362
|
if (onRemove) onRemove(tag.id);
|
|
@@ -10399,6 +10378,7 @@ var TagItem = ({ tag, isSelected, onSelect, onRemove }) => {
|
|
|
10399
10378
|
size: "xs",
|
|
10400
10379
|
hierarchy: "secondary",
|
|
10401
10380
|
badgeStyle: "alpha",
|
|
10381
|
+
isMuted: isDisabled,
|
|
10402
10382
|
withIcon: isInteractive,
|
|
10403
10383
|
onIconClick: isInteractive ? handleRemoveIconClick : void 0,
|
|
10404
10384
|
children: tag.label
|
|
@@ -10609,7 +10589,6 @@ TagFieldInput.displayName = "TagFieldInput";
|
|
|
10609
10589
|
var TagField = (0, import_react33.forwardRef)(
|
|
10610
10590
|
({
|
|
10611
10591
|
style = "outlined",
|
|
10612
|
-
layout = "vertical",
|
|
10613
10592
|
validation = "none",
|
|
10614
10593
|
interaction = "enabled",
|
|
10615
10594
|
isWithInfoIcon = false,
|
|
@@ -10621,13 +10600,12 @@ var TagField = (0, import_react33.forwardRef)(
|
|
|
10621
10600
|
FormField,
|
|
10622
10601
|
{
|
|
10623
10602
|
style,
|
|
10624
|
-
layout,
|
|
10625
10603
|
validation,
|
|
10626
10604
|
interaction,
|
|
10627
10605
|
label,
|
|
10628
10606
|
isWithInfoIcon,
|
|
10629
10607
|
helperText,
|
|
10630
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(StyledFieldContainer, {
|
|
10608
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(StyledFieldContainer, { children: [
|
|
10631
10609
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)(FormField.Label, {}),
|
|
10632
10610
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(FormField.Content, { children: [
|
|
10633
10611
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)(TagFieldInput, { ref, ...restProps }),
|
|
@@ -10646,7 +10624,6 @@ var import_jsx_runtime162 = require("@emotion/react/jsx-runtime");
|
|
|
10646
10624
|
var TagFieldButton = (0, import_react34.forwardRef)(
|
|
10647
10625
|
({
|
|
10648
10626
|
style = "outlined",
|
|
10649
|
-
layout = "vertical",
|
|
10650
10627
|
validation = "none",
|
|
10651
10628
|
interaction = "enabled",
|
|
10652
10629
|
label,
|
|
@@ -10744,8 +10721,8 @@ var TagFieldButton = (0, import_react34.forwardRef)(
|
|
|
10744
10721
|
},
|
|
10745
10722
|
[tags, onTagsChange]
|
|
10746
10723
|
);
|
|
10747
|
-
return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledFieldContainer, {
|
|
10748
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledLabelContainer, {
|
|
10724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledFieldContainer, { children: [
|
|
10725
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledLabelContainer, { children: [
|
|
10749
10726
|
/* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
10750
10727
|
StyledFieldLabel,
|
|
10751
10728
|
{
|
|
@@ -10755,14 +10732,13 @@ var TagFieldButton = (0, import_react34.forwardRef)(
|
|
|
10755
10732
|
weight: "normal",
|
|
10756
10733
|
$disabled: isDisabled,
|
|
10757
10734
|
$readOnly: isReadOnly,
|
|
10758
|
-
$layout: layout,
|
|
10759
10735
|
children: label
|
|
10760
10736
|
}
|
|
10761
10737
|
),
|
|
10762
10738
|
labelIcon && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(Icon, { name: labelIcon, size: "2xs" })
|
|
10763
10739
|
] }),
|
|
10764
10740
|
/* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledInputColumn, { children: [
|
|
10765
|
-
/* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledInputRow, { $style: style,
|
|
10741
|
+
/* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(StyledInputRow, { $style: style, children: [
|
|
10766
10742
|
/* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
|
|
10767
10743
|
StyledTagInputWrapper,
|
|
10768
10744
|
{
|
|
@@ -10784,6 +10760,7 @@ var TagFieldButton = (0, import_react34.forwardRef)(
|
|
|
10784
10760
|
size: "xs",
|
|
10785
10761
|
hierarchy: "secondary",
|
|
10786
10762
|
badgeStyle: "alpha",
|
|
10763
|
+
isMuted: isDisabled,
|
|
10787
10764
|
withIcon: isInteractive,
|
|
10788
10765
|
children: tag.label
|
|
10789
10766
|
}
|
|
@@ -11104,7 +11081,6 @@ TextFieldInput.displayName = "TextFieldInput";
|
|
|
11104
11081
|
var TextField = (0, import_react35.forwardRef)(
|
|
11105
11082
|
({
|
|
11106
11083
|
style = "outlined",
|
|
11107
|
-
layout = "vertical",
|
|
11108
11084
|
validation = "none",
|
|
11109
11085
|
interaction = "enabled",
|
|
11110
11086
|
isWithInfoIcon = false,
|
|
@@ -11116,13 +11092,12 @@ var TextField = (0, import_react35.forwardRef)(
|
|
|
11116
11092
|
FormField,
|
|
11117
11093
|
{
|
|
11118
11094
|
style,
|
|
11119
|
-
layout,
|
|
11120
11095
|
validation,
|
|
11121
11096
|
interaction,
|
|
11122
11097
|
label,
|
|
11123
11098
|
isWithInfoIcon,
|
|
11124
11099
|
helperText,
|
|
11125
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(StyledFieldContainer, {
|
|
11100
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(StyledFieldContainer, { children: [
|
|
11126
11101
|
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(FormField.Label, {}),
|
|
11127
11102
|
/* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(FormField.Content, { children: [
|
|
11128
11103
|
/* @__PURE__ */ (0, import_jsx_runtime163.jsx)(TextFieldInput, { ref, ...restProps }),
|
|
@@ -11141,7 +11116,6 @@ var import_jsx_runtime164 = require("@emotion/react/jsx-runtime");
|
|
|
11141
11116
|
var TextFieldButton = (0, import_react36.forwardRef)(
|
|
11142
11117
|
({
|
|
11143
11118
|
style = "outlined",
|
|
11144
|
-
layout = "vertical",
|
|
11145
11119
|
validation = "none",
|
|
11146
11120
|
disabled = false,
|
|
11147
11121
|
readOnly = false,
|
|
@@ -11154,8 +11128,8 @@ var TextFieldButton = (0, import_react36.forwardRef)(
|
|
|
11154
11128
|
...restProps
|
|
11155
11129
|
}, ref) => {
|
|
11156
11130
|
const inputId = (0, import_react36.useId)();
|
|
11157
|
-
return /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledFieldContainer, {
|
|
11158
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledLabelContainer, {
|
|
11131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledFieldContainer, { children: [
|
|
11132
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledLabelContainer, { children: [
|
|
11159
11133
|
/* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
|
|
11160
11134
|
StyledFieldLabel,
|
|
11161
11135
|
{
|
|
@@ -11165,14 +11139,13 @@ var TextFieldButton = (0, import_react36.forwardRef)(
|
|
|
11165
11139
|
weight: "bold",
|
|
11166
11140
|
$disabled: disabled,
|
|
11167
11141
|
$readOnly: readOnly,
|
|
11168
|
-
$layout: layout,
|
|
11169
11142
|
children: label
|
|
11170
11143
|
}
|
|
11171
11144
|
),
|
|
11172
11145
|
labelIcon && /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(Icon, { name: labelIcon, size: "sm" })
|
|
11173
11146
|
] }),
|
|
11174
11147
|
/* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledInputColumn, { children: [
|
|
11175
|
-
/* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledInputRow, { $style: style,
|
|
11148
|
+
/* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(StyledInputRow, { $style: style, children: [
|
|
11176
11149
|
/* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
|
|
11177
11150
|
StyledInputWrapper,
|
|
11178
11151
|
{
|
|
@@ -11866,14 +11839,12 @@ var SelectCheckbox = (0, import_react40.forwardRef)(
|
|
|
11866
11839
|
...restProps,
|
|
11867
11840
|
children: [
|
|
11868
11841
|
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(StyledSelectItemInputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
11869
|
-
|
|
11842
|
+
Checkbox.Basic,
|
|
11870
11843
|
{
|
|
11871
|
-
|
|
11844
|
+
size,
|
|
11872
11845
|
checked: isItemSelected,
|
|
11873
11846
|
disabled: isDisabled,
|
|
11874
|
-
|
|
11875
|
-
tabIndex: -1,
|
|
11876
|
-
style: { pointerEvents: "none" }
|
|
11847
|
+
tabIndex: -1
|
|
11877
11848
|
}
|
|
11878
11849
|
) }),
|
|
11879
11850
|
/* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(StyledSelectItemContent, { children: [
|
|
@@ -11966,9 +11937,347 @@ var SelectList = (0, import_react41.forwardRef)(
|
|
|
11966
11937
|
SelectList.displayName = "Select.List";
|
|
11967
11938
|
|
|
11968
11939
|
// src/components/Select/SelectRadio.tsx
|
|
11940
|
+
var import_react45 = require("react");
|
|
11941
|
+
|
|
11942
|
+
// src/components/Radio/Radio.tsx
|
|
11943
|
+
var import_react44 = require("react");
|
|
11944
|
+
|
|
11945
|
+
// src/components/Radio/Radio.style.ts
|
|
11946
|
+
var import_styled25 = __toESM(require("@emotion/styled"), 1);
|
|
11947
|
+
var RADIO_SIZE = {
|
|
11948
|
+
lg: {
|
|
11949
|
+
radioSize: 20,
|
|
11950
|
+
border: "6"
|
|
11951
|
+
},
|
|
11952
|
+
md: {
|
|
11953
|
+
radioSize: 18,
|
|
11954
|
+
border: "5"
|
|
11955
|
+
},
|
|
11956
|
+
sm: {
|
|
11957
|
+
radioSize: 16,
|
|
11958
|
+
border: "5"
|
|
11959
|
+
},
|
|
11960
|
+
xs: {
|
|
11961
|
+
radioSize: 14,
|
|
11962
|
+
border: "4"
|
|
11963
|
+
}
|
|
11964
|
+
};
|
|
11965
|
+
var StyledRadioRootLabel = import_styled25.default.label(({ theme, radioSize }) => {
|
|
11966
|
+
const borderSize = RADIO_SIZE[radioSize].border;
|
|
11967
|
+
return {
|
|
11968
|
+
display: "inline-flex",
|
|
11969
|
+
position: "relative",
|
|
11970
|
+
[`input[type="radio"]:not(:disabled):checked + .visual`]: {
|
|
11971
|
+
backgroundColor: theme.color.semantic.surface.static.standard,
|
|
11972
|
+
border: `${theme.scheme.semantic.strokeWeight[borderSize]} solid ${theme.color.semantic.accent.neutral}`
|
|
11973
|
+
},
|
|
11974
|
+
[`input[type="radio"]:not(:checked):disabled + .visual`]: {
|
|
11975
|
+
backgroundColor: theme.color.semantic.surface.standard,
|
|
11976
|
+
borderColor: theme.color.semantic.stroke.alpha.subtler,
|
|
11977
|
+
cursor: "default",
|
|
11978
|
+
...Interaction(theme, "normal", "normal", "default", "disabled")
|
|
11979
|
+
},
|
|
11980
|
+
[`input[type="radio"]:checked:disabled + .visual`]: {
|
|
11981
|
+
backgroundColor: theme.color.semantic.fill.subtle,
|
|
11982
|
+
border: `${theme.scheme.semantic.strokeWeight[borderSize]} solid ${theme.color.semantic.stroke.subtler}`,
|
|
11983
|
+
cursor: "default",
|
|
11984
|
+
...Interaction(theme, "normal", "normal", "default", "disabled")
|
|
11985
|
+
},
|
|
11986
|
+
[`input[type="radio"]:focus-visible + .visual`]: {
|
|
11987
|
+
boxShadow: `0 0 0 3px ${theme.color.semantic.interaction.focus}`
|
|
11988
|
+
}
|
|
11989
|
+
};
|
|
11990
|
+
});
|
|
11991
|
+
var StyledRadioRootInput = import_styled25.default.input({
|
|
11992
|
+
position: "absolute",
|
|
11993
|
+
width: 1,
|
|
11994
|
+
height: 1,
|
|
11995
|
+
padding: 0,
|
|
11996
|
+
margin: -1,
|
|
11997
|
+
border: 0,
|
|
11998
|
+
overflow: "hidden",
|
|
11999
|
+
clipPath: "inset(50%)",
|
|
12000
|
+
whiteSpace: "nowrap"
|
|
12001
|
+
});
|
|
12002
|
+
var StyledRadioRootSpan = import_styled25.default.span(({ theme, radioSize }) => {
|
|
12003
|
+
const sizeValue = pxToRem(RADIO_SIZE[radioSize].radioSize);
|
|
12004
|
+
return {
|
|
12005
|
+
borderRadius: theme.scheme.semantic.radius.max,
|
|
12006
|
+
width: sizeValue,
|
|
12007
|
+
height: sizeValue,
|
|
12008
|
+
border: `1px solid ${theme.color.semantic.stroke.alpha.assistive}`,
|
|
12009
|
+
backgroundColor: theme.color.semantic.surface.shallow,
|
|
12010
|
+
cursor: "pointer",
|
|
12011
|
+
...Interaction(theme, "normal", "normal", "default")
|
|
12012
|
+
};
|
|
12013
|
+
});
|
|
12014
|
+
var radioContainerSizeMap = {
|
|
12015
|
+
lg: {
|
|
12016
|
+
width: 13,
|
|
12017
|
+
height: 8,
|
|
12018
|
+
gap: "12",
|
|
12019
|
+
padding: "12",
|
|
12020
|
+
borderRadius: "6"
|
|
12021
|
+
},
|
|
12022
|
+
md: {
|
|
12023
|
+
width: 13,
|
|
12024
|
+
height: 8,
|
|
12025
|
+
gap: "10",
|
|
12026
|
+
padding: "10",
|
|
12027
|
+
borderRadius: "6"
|
|
12028
|
+
},
|
|
12029
|
+
sm: {
|
|
12030
|
+
width: 11,
|
|
12031
|
+
height: 6,
|
|
12032
|
+
gap: "8",
|
|
12033
|
+
padding: "8",
|
|
12034
|
+
borderRadius: "4"
|
|
12035
|
+
},
|
|
12036
|
+
xs: {
|
|
12037
|
+
width: 9,
|
|
12038
|
+
height: 6,
|
|
12039
|
+
gap: "8",
|
|
12040
|
+
padding: "6",
|
|
12041
|
+
borderRadius: "4"
|
|
12042
|
+
}
|
|
12043
|
+
};
|
|
12044
|
+
var subLabelSizeMap2 = {
|
|
12045
|
+
lg: "md",
|
|
12046
|
+
md: "sm",
|
|
12047
|
+
sm: "xs",
|
|
12048
|
+
xs: "xs"
|
|
12049
|
+
};
|
|
12050
|
+
var StyledRadioItem = import_styled25.default.div(
|
|
12051
|
+
({ theme, radioSize, isDisabled, isAlignRight, isStyleOutline }) => {
|
|
12052
|
+
const rowGap = radioContainerSizeMap[radioSize].gap;
|
|
12053
|
+
const padding = radioContainerSizeMap[radioSize].padding;
|
|
12054
|
+
const borderRadius = radioContainerSizeMap[radioSize].borderRadius;
|
|
12055
|
+
const interactionWidth = radioContainerSizeMap[radioSize].width;
|
|
12056
|
+
const interactionHeight = radioContainerSizeMap[radioSize].height;
|
|
12057
|
+
const borderColor = isDisabled ? theme.color.semantic.stroke.alpha.subtler : theme.color.semantic.stroke.alpha.subtle;
|
|
12058
|
+
const checkedInteraction = Interaction(
|
|
12059
|
+
theme,
|
|
12060
|
+
"accent",
|
|
12061
|
+
"assistive",
|
|
12062
|
+
"default",
|
|
12063
|
+
isDisabled ? "readonly" : "default"
|
|
12064
|
+
);
|
|
12065
|
+
const nonCheckedInteraction = Interaction(
|
|
12066
|
+
theme,
|
|
12067
|
+
"normal",
|
|
12068
|
+
"normal",
|
|
12069
|
+
"default",
|
|
12070
|
+
isDisabled ? "readonly" : "default"
|
|
12071
|
+
);
|
|
12072
|
+
const addonInteraction = isStyleOutline ? {
|
|
12073
|
+
border: "inherit"
|
|
12074
|
+
} : {
|
|
12075
|
+
width: `calc(100% + ${interactionWidth}px)`,
|
|
12076
|
+
height: `calc(100% + ${interactionHeight}px)`,
|
|
12077
|
+
transform: `translate(-${Math.floor(interactionWidth / 2) + 1}px , -${Math.floor(interactionHeight / 2)}px)`
|
|
12078
|
+
};
|
|
12079
|
+
return {
|
|
12080
|
+
display: "inline-grid",
|
|
12081
|
+
gridTemplateColumns: "auto 1fr",
|
|
12082
|
+
alignItems: "center",
|
|
12083
|
+
"& > :nth-child(1)": {
|
|
12084
|
+
gridColumn: 1,
|
|
12085
|
+
gridRow: 1,
|
|
12086
|
+
display: "flex",
|
|
12087
|
+
alignItems: "center"
|
|
12088
|
+
},
|
|
12089
|
+
"& > :nth-child(2)": {
|
|
12090
|
+
gridColumn: 2,
|
|
12091
|
+
gridRow: 1,
|
|
12092
|
+
display: "flex",
|
|
12093
|
+
alignItems: "center"
|
|
12094
|
+
},
|
|
12095
|
+
"& > :nth-child(3)": {
|
|
12096
|
+
gridColumn: isAlignRight ? "1 / span 2" : 2,
|
|
12097
|
+
gridRow: 2
|
|
12098
|
+
},
|
|
12099
|
+
gap: `${theme.scheme.semantic.spacing[6]} ${theme.scheme.semantic.spacing[rowGap]} `,
|
|
12100
|
+
border: isStyleOutline ? `1px solid ${borderColor}` : "none",
|
|
12101
|
+
borderRadius: theme.scheme.semantic.radius[borderRadius],
|
|
12102
|
+
padding: isStyleOutline ? theme.scheme.semantic.spacing[padding] : "0",
|
|
12103
|
+
...nonCheckedInteraction,
|
|
12104
|
+
"::after": {
|
|
12105
|
+
...nonCheckedInteraction["::after"],
|
|
12106
|
+
...addonInteraction,
|
|
12107
|
+
transition: `all ${theme.environment.semantic.duration[100]}ms ${theme.environment.semantic.motion.fluent}`,
|
|
12108
|
+
pointerEvents: "none"
|
|
12109
|
+
},
|
|
12110
|
+
"&:active::after": {
|
|
12111
|
+
transition: "none"
|
|
12112
|
+
},
|
|
12113
|
+
'&:has(input[type="radio"]:checked)': {
|
|
12114
|
+
...checkedInteraction,
|
|
12115
|
+
"::after": {
|
|
12116
|
+
...checkedInteraction["::after"],
|
|
12117
|
+
...addonInteraction,
|
|
12118
|
+
pointerEvents: "none"
|
|
12119
|
+
}
|
|
12120
|
+
},
|
|
12121
|
+
'&:has(input[type="radio"]:focus-visible)::before': {
|
|
12122
|
+
...addonInteraction,
|
|
12123
|
+
boxShadow: `0 0 0 3px ${theme.color.semantic.interaction.focus}`,
|
|
12124
|
+
content: '""',
|
|
12125
|
+
position: "absolute",
|
|
12126
|
+
inset: 0,
|
|
12127
|
+
borderRadius: theme.scheme.semantic.radius[borderRadius]
|
|
12128
|
+
},
|
|
12129
|
+
'input[type="radio"]:focus-visible + .visual': {
|
|
12130
|
+
boxShadow: "none !important"
|
|
12131
|
+
}
|
|
12132
|
+
};
|
|
12133
|
+
}
|
|
12134
|
+
);
|
|
12135
|
+
var StyledLabel2 = (0, import_styled25.default)("div")(({ theme, $size, $isDisabled }) => {
|
|
12136
|
+
return {
|
|
12137
|
+
...theme.textStyle[`semantic-textStyle-label-${$size}-subtle`],
|
|
12138
|
+
color: $isDisabled ? theme.color.semantic.object.subtle : theme.color.semantic.object.bold,
|
|
12139
|
+
whiteSpace: "nowrap"
|
|
12140
|
+
};
|
|
12141
|
+
});
|
|
12142
|
+
var StyledSubLabel2 = (0, import_styled25.default)("div")(({ theme, $size, $isDisabled }) => {
|
|
12143
|
+
return {
|
|
12144
|
+
...theme.textStyle[`semantic-textStyle-label-${subLabelSizeMap2[$size]}-subtle`],
|
|
12145
|
+
color: $isDisabled ? theme.color.semantic.object.subtle : theme.color.semantic.object.assistive,
|
|
12146
|
+
position: "relative",
|
|
12147
|
+
zIndex: 10,
|
|
12148
|
+
whiteSpace: "nowrap"
|
|
12149
|
+
};
|
|
12150
|
+
});
|
|
12151
|
+
|
|
12152
|
+
// src/components/Radio/RadioContext.tsx
|
|
11969
12153
|
var import_react42 = require("react");
|
|
12154
|
+
var RadioContext = (0, import_react42.createContext)(null);
|
|
12155
|
+
var RadioProvider = RadioContext.Provider;
|
|
12156
|
+
var useRadioContext = () => {
|
|
12157
|
+
const context = (0, import_react42.useContext)(RadioContext);
|
|
12158
|
+
return context;
|
|
12159
|
+
};
|
|
12160
|
+
|
|
12161
|
+
// src/components/Radio/RadioGroupContext.tsx
|
|
12162
|
+
var import_react43 = require("react");
|
|
12163
|
+
var RadioGroupContext = (0, import_react43.createContext)(null);
|
|
12164
|
+
var RadioGroupProvider = RadioGroupContext.Provider;
|
|
12165
|
+
var useRadioGroupContext = () => {
|
|
12166
|
+
const context = (0, import_react43.useContext)(RadioGroupContext);
|
|
12167
|
+
return context;
|
|
12168
|
+
};
|
|
12169
|
+
|
|
12170
|
+
// src/components/Radio/Radio.tsx
|
|
11970
12171
|
var import_jsx_runtime171 = require("@emotion/react/jsx-runtime");
|
|
11971
|
-
var
|
|
12172
|
+
var RadioRoot = ({
|
|
12173
|
+
radioSize = "md",
|
|
12174
|
+
radioStyle = "empty",
|
|
12175
|
+
radioAlign = "left",
|
|
12176
|
+
disabled = false,
|
|
12177
|
+
value,
|
|
12178
|
+
onChange,
|
|
12179
|
+
name,
|
|
12180
|
+
children
|
|
12181
|
+
}) => {
|
|
12182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
12183
|
+
RadioGroupProvider,
|
|
12184
|
+
{
|
|
12185
|
+
value: { radioSize, radioStyle, radioAlign, isDisabled: disabled, value, onChange, name },
|
|
12186
|
+
children
|
|
12187
|
+
}
|
|
12188
|
+
);
|
|
12189
|
+
};
|
|
12190
|
+
RadioRoot.displayName = "Radio.Root";
|
|
12191
|
+
var RadioItem = (0, import_react44.forwardRef)(
|
|
12192
|
+
({ radioSize = "md", radioStyle = "empty", radioAlign = "left", disabled = false, children }, ref) => {
|
|
12193
|
+
const groupContext = useRadioGroupContext();
|
|
12194
|
+
const size = groupContext?.radioSize || radioSize;
|
|
12195
|
+
const isDisabled = groupContext?.isDisabled || disabled;
|
|
12196
|
+
const isAlignRight = groupContext?.radioAlign ? groupContext.radioAlign === "right" : radioAlign === "right";
|
|
12197
|
+
const isStyleOutline = groupContext?.radioStyle ? groupContext?.radioStyle === "outline" : radioStyle === "outline";
|
|
12198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(RadioProvider, { value: { radioSize: size, isDisabled }, children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
12199
|
+
StyledRadioItem,
|
|
12200
|
+
{
|
|
12201
|
+
ref,
|
|
12202
|
+
radioSize: size,
|
|
12203
|
+
isDisabled,
|
|
12204
|
+
isAlignRight,
|
|
12205
|
+
isStyleOutline,
|
|
12206
|
+
children
|
|
12207
|
+
}
|
|
12208
|
+
) });
|
|
12209
|
+
}
|
|
12210
|
+
);
|
|
12211
|
+
RadioItem.displayName = "Radio.Item";
|
|
12212
|
+
var RadioBasic = (0, import_react44.forwardRef)(
|
|
12213
|
+
({ radioSize = "md", value, checked, disabled, onChange, ...props }, ref) => {
|
|
12214
|
+
const groupContext = useRadioGroupContext();
|
|
12215
|
+
const radioContext = useRadioContext();
|
|
12216
|
+
const isChecked = groupContext?.value ? groupContext.value === value : checked;
|
|
12217
|
+
const isBasicDisabled = radioContext?.isDisabled ? radioContext.isDisabled : disabled;
|
|
12218
|
+
const groupName = groupContext?.name;
|
|
12219
|
+
const handleChange = (e) => {
|
|
12220
|
+
if (groupContext?.onChange && value !== void 0) {
|
|
12221
|
+
groupContext.onChange(String(value));
|
|
12222
|
+
}
|
|
12223
|
+
onChange?.(e);
|
|
12224
|
+
};
|
|
12225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(StyledRadioRootLabel, { radioSize: radioContext?.radioSize || radioSize, children: [
|
|
12226
|
+
/* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
12227
|
+
StyledRadioRootInput,
|
|
12228
|
+
{
|
|
12229
|
+
ref,
|
|
12230
|
+
type: "radio",
|
|
12231
|
+
value,
|
|
12232
|
+
checked: isChecked,
|
|
12233
|
+
disabled: isBasicDisabled,
|
|
12234
|
+
onChange: handleChange,
|
|
12235
|
+
name: groupName,
|
|
12236
|
+
...props
|
|
12237
|
+
}
|
|
12238
|
+
),
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime171.jsx)(StyledRadioRootSpan, { className: "visual", "aria-hidden": "true", radioSize })
|
|
12240
|
+
] });
|
|
12241
|
+
}
|
|
12242
|
+
);
|
|
12243
|
+
RadioBasic.displayName = "Radio.Basic";
|
|
12244
|
+
var RadioLabel = (0, import_react44.forwardRef)(({ children }, ref) => {
|
|
12245
|
+
const rootContext = useRadioContext();
|
|
12246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
12247
|
+
StyledLabel2,
|
|
12248
|
+
{
|
|
12249
|
+
ref,
|
|
12250
|
+
$size: rootContext?.radioSize || "md",
|
|
12251
|
+
$isDisabled: rootContext?.isDisabled || false,
|
|
12252
|
+
children
|
|
12253
|
+
}
|
|
12254
|
+
);
|
|
12255
|
+
});
|
|
12256
|
+
RadioLabel.displayName = "Radio.Label";
|
|
12257
|
+
var RadioSubLabel = (0, import_react44.forwardRef)(({ children }, ref) => {
|
|
12258
|
+
const rootContext = useRadioContext();
|
|
12259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
12260
|
+
StyledSubLabel2,
|
|
12261
|
+
{
|
|
12262
|
+
ref,
|
|
12263
|
+
$size: rootContext?.radioSize || "md",
|
|
12264
|
+
$isDisabled: rootContext?.isDisabled || false,
|
|
12265
|
+
children
|
|
12266
|
+
}
|
|
12267
|
+
);
|
|
12268
|
+
});
|
|
12269
|
+
RadioSubLabel.displayName = "Radio.SubLabel";
|
|
12270
|
+
var Radio = {
|
|
12271
|
+
Root: RadioRoot,
|
|
12272
|
+
Item: RadioItem,
|
|
12273
|
+
Basic: RadioBasic,
|
|
12274
|
+
Label: RadioLabel,
|
|
12275
|
+
SubLabel: RadioSubLabel
|
|
12276
|
+
};
|
|
12277
|
+
|
|
12278
|
+
// src/components/Select/SelectRadio.tsx
|
|
12279
|
+
var import_jsx_runtime172 = require("@emotion/react/jsx-runtime");
|
|
12280
|
+
var SelectRadio = (0, import_react45.forwardRef)(
|
|
11972
12281
|
({ value, isDisabled = false, caption, children, ...restProps }, ref) => {
|
|
11973
12282
|
const { size, isSelected, onChange } = useSelectContext();
|
|
11974
12283
|
const { isItemSelected, handleClick, handleKeyDown } = createSelectItemHandlers({
|
|
@@ -11977,7 +12286,7 @@ var SelectRadio = (0, import_react42.forwardRef)(
|
|
|
11977
12286
|
isSelected,
|
|
11978
12287
|
onChange
|
|
11979
12288
|
});
|
|
11980
|
-
return /* @__PURE__ */ (0,
|
|
12289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
|
|
11981
12290
|
StyledSelectItem,
|
|
11982
12291
|
{
|
|
11983
12292
|
ref,
|
|
@@ -11992,19 +12301,17 @@ var SelectRadio = (0, import_react42.forwardRef)(
|
|
|
11992
12301
|
tabIndex: isDisabled ? -1 : 0,
|
|
11993
12302
|
...restProps,
|
|
11994
12303
|
children: [
|
|
11995
|
-
/* @__PURE__ */ (0,
|
|
11996
|
-
|
|
12304
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(StyledSelectItemInputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
12305
|
+
Radio.Basic,
|
|
11997
12306
|
{
|
|
11998
|
-
|
|
12307
|
+
radioSize: size,
|
|
11999
12308
|
checked: isItemSelected,
|
|
12000
12309
|
disabled: isDisabled,
|
|
12001
|
-
|
|
12002
|
-
tabIndex: -1,
|
|
12003
|
-
style: { pointerEvents: "none" }
|
|
12310
|
+
tabIndex: -1
|
|
12004
12311
|
}
|
|
12005
12312
|
) }),
|
|
12006
|
-
/* @__PURE__ */ (0,
|
|
12007
|
-
/* @__PURE__ */ (0,
|
|
12313
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(StyledSelectItemContent, { children: [
|
|
12314
|
+
/* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
12008
12315
|
StyledSelectItemText,
|
|
12009
12316
|
{
|
|
12010
12317
|
as: "span",
|
|
@@ -12015,7 +12322,7 @@ var SelectRadio = (0, import_react42.forwardRef)(
|
|
|
12015
12322
|
children
|
|
12016
12323
|
}
|
|
12017
12324
|
),
|
|
12018
|
-
caption && /* @__PURE__ */ (0,
|
|
12325
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
|
|
12019
12326
|
StyledSelectItemCaption,
|
|
12020
12327
|
{
|
|
12021
12328
|
as: "span",
|
|
@@ -12042,7 +12349,7 @@ var Select2 = Object.assign(Select, {
|
|
|
12042
12349
|
|
|
12043
12350
|
// src/components/Step/Step.tsx
|
|
12044
12351
|
var import_internal = require("radix-ui/internal");
|
|
12045
|
-
var
|
|
12352
|
+
var import_react47 = require("react");
|
|
12046
12353
|
|
|
12047
12354
|
// src/components/Step/step.utils.ts
|
|
12048
12355
|
function calculateStepStatus(itemIndex, currentStep) {
|
|
@@ -12062,10 +12369,10 @@ function useStepItemStatus({
|
|
|
12062
12369
|
}
|
|
12063
12370
|
|
|
12064
12371
|
// src/components/Divider/Divider.tsx
|
|
12065
|
-
var
|
|
12372
|
+
var import_react46 = require("react");
|
|
12066
12373
|
|
|
12067
12374
|
// src/components/Divider/divider.styles.ts
|
|
12068
|
-
var
|
|
12375
|
+
var import_styled26 = __toESM(require("@emotion/styled"), 1);
|
|
12069
12376
|
var thicknessMap = {
|
|
12070
12377
|
normal: 1,
|
|
12071
12378
|
bold: 2,
|
|
@@ -12096,20 +12403,20 @@ var GetDividerStyles = (theme, orientation, thickness, variant) => {
|
|
|
12096
12403
|
alignSelf: "stretch"
|
|
12097
12404
|
};
|
|
12098
12405
|
};
|
|
12099
|
-
var StyledDivider = (0,
|
|
12406
|
+
var StyledDivider = (0, import_styled26.default)("hr", {
|
|
12100
12407
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
12101
12408
|
})(({ theme, $orientation, $thickness, $variant }) => ({
|
|
12102
12409
|
...GetDividerStyles(theme, $orientation, $thickness, $variant)
|
|
12103
12410
|
}));
|
|
12104
|
-
var StyledVerticalDivider = (0,
|
|
12411
|
+
var StyledVerticalDivider = (0, import_styled26.default)("div", {
|
|
12105
12412
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
12106
12413
|
})(({ theme, $thickness, $variant }) => ({
|
|
12107
12414
|
...GetDividerStyles(theme, "vertical", $thickness, $variant)
|
|
12108
12415
|
}));
|
|
12109
12416
|
|
|
12110
12417
|
// src/components/Divider/Divider.tsx
|
|
12111
|
-
var
|
|
12112
|
-
var Divider = (0,
|
|
12418
|
+
var import_jsx_runtime173 = require("@emotion/react/jsx-runtime");
|
|
12419
|
+
var Divider = (0, import_react46.forwardRef)(
|
|
12113
12420
|
({
|
|
12114
12421
|
thickness = "normal",
|
|
12115
12422
|
orientation = "horizontal",
|
|
@@ -12118,7 +12425,7 @@ var Divider = (0, import_react43.forwardRef)(
|
|
|
12118
12425
|
...restProps
|
|
12119
12426
|
}, ref) => {
|
|
12120
12427
|
if (orientation === "vertical") {
|
|
12121
|
-
return /* @__PURE__ */ (0,
|
|
12428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
12122
12429
|
StyledVerticalDivider,
|
|
12123
12430
|
{
|
|
12124
12431
|
ref,
|
|
@@ -12131,7 +12438,7 @@ var Divider = (0, import_react43.forwardRef)(
|
|
|
12131
12438
|
}
|
|
12132
12439
|
);
|
|
12133
12440
|
}
|
|
12134
|
-
return /* @__PURE__ */ (0,
|
|
12441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
12135
12442
|
StyledDivider,
|
|
12136
12443
|
{
|
|
12137
12444
|
ref,
|
|
@@ -12147,8 +12454,8 @@ var Divider = (0, import_react43.forwardRef)(
|
|
|
12147
12454
|
Divider.displayName = "Divider";
|
|
12148
12455
|
|
|
12149
12456
|
// src/components/Step/step.styles.ts
|
|
12150
|
-
var
|
|
12151
|
-
var StyledCounterNumber = (0,
|
|
12457
|
+
var import_styled27 = __toESM(require("@emotion/styled"), 1);
|
|
12458
|
+
var StyledCounterNumber = (0, import_styled27.default)("span", {
|
|
12152
12459
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
12153
12460
|
})(({ theme, $size }) => {
|
|
12154
12461
|
const counterStyleMap = {
|
|
@@ -12177,13 +12484,13 @@ var StyledCounterNumber = (0, import_styled26.default)("span", {
|
|
|
12177
12484
|
cursor: "default"
|
|
12178
12485
|
};
|
|
12179
12486
|
});
|
|
12180
|
-
var StyledStepRoot = (0,
|
|
12487
|
+
var StyledStepRoot = (0, import_styled27.default)("div")(({ theme }) => ({
|
|
12181
12488
|
display: "flex",
|
|
12182
12489
|
alignItems: "flex-start",
|
|
12183
12490
|
width: "100%",
|
|
12184
12491
|
gap: theme.scheme.semantic.spacing[8]
|
|
12185
12492
|
}));
|
|
12186
|
-
var StyledStepItem = (0,
|
|
12493
|
+
var StyledStepItem = (0, import_styled27.default)("div")(({ theme }) => ({
|
|
12187
12494
|
display: "flex",
|
|
12188
12495
|
flexDirection: "column",
|
|
12189
12496
|
alignItems: "center",
|
|
@@ -12210,7 +12517,7 @@ var StyledStepItem = (0, import_styled26.default)("div")(({ theme }) => ({
|
|
|
12210
12517
|
color: theme.color.semantic.object.assistive
|
|
12211
12518
|
}
|
|
12212
12519
|
}));
|
|
12213
|
-
var StyledStepContent = (0,
|
|
12520
|
+
var StyledStepContent = (0, import_styled27.default)("div")(({ theme }) => ({
|
|
12214
12521
|
display: "flex",
|
|
12215
12522
|
alignItems: "flex-start",
|
|
12216
12523
|
alignSelf: "stretch",
|
|
@@ -12219,14 +12526,14 @@ var StyledStepContent = (0, import_styled26.default)("div")(({ theme }) => ({
|
|
|
12219
12526
|
width: "100%",
|
|
12220
12527
|
color: "inherit"
|
|
12221
12528
|
}));
|
|
12222
|
-
var StyledStepLabel = (0,
|
|
12529
|
+
var StyledStepLabel = (0, import_styled27.default)(Label)(({ theme }) => ({
|
|
12223
12530
|
flex: "1 0 0",
|
|
12224
12531
|
paddingTop: theme.scheme.semantic.spacing[2],
|
|
12225
12532
|
whiteSpace: "nowrap"
|
|
12226
12533
|
}));
|
|
12227
12534
|
|
|
12228
12535
|
// src/components/Step/Step.tsx
|
|
12229
|
-
var
|
|
12536
|
+
var import_jsx_runtime174 = require("@emotion/react/jsx-runtime");
|
|
12230
12537
|
var SIZE_TO_LABEL_SIZE = {
|
|
12231
12538
|
lg: "lg",
|
|
12232
12539
|
md: "md",
|
|
@@ -12234,23 +12541,23 @@ var SIZE_TO_LABEL_SIZE = {
|
|
|
12234
12541
|
xs: "xs"
|
|
12235
12542
|
};
|
|
12236
12543
|
var [StepProvider, useStepContext] = import_internal.Context.createContext("Step");
|
|
12237
|
-
var StepRoot = (0,
|
|
12544
|
+
var StepRoot = (0, import_react47.forwardRef)(
|
|
12238
12545
|
({ size = "md", current, children, ...restProps }, ref) => {
|
|
12239
|
-
const contextValue = (0,
|
|
12240
|
-
return /* @__PURE__ */ (0,
|
|
12546
|
+
const contextValue = (0, import_react47.useMemo)(() => ({ size, currentStep: current }), [size, current]);
|
|
12547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(StepProvider, { ...contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(StyledStepRoot, { ref, ...restProps, children }) });
|
|
12241
12548
|
}
|
|
12242
12549
|
);
|
|
12243
12550
|
StepRoot.displayName = "Step.Root";
|
|
12244
|
-
var StepItem = (0,
|
|
12551
|
+
var StepItem = (0, import_react47.forwardRef)(
|
|
12245
12552
|
({ index, status: statusProp, children, ...restProps }, ref) => {
|
|
12246
12553
|
const { size, currentStep } = useStepContext("Step.Item");
|
|
12247
12554
|
const labelSize = SIZE_TO_LABEL_SIZE[size];
|
|
12248
12555
|
const status = useStepItemStatus({ itemIndex: index, currentStep, statusProp });
|
|
12249
|
-
return /* @__PURE__ */ (0,
|
|
12250
|
-
/* @__PURE__ */ (0,
|
|
12251
|
-
/* @__PURE__ */ (0,
|
|
12252
|
-
/* @__PURE__ */ (0,
|
|
12253
|
-
/* @__PURE__ */ (0,
|
|
12556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(StyledStepItem, { ref, "data-status": status, ...restProps, children: [
|
|
12557
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Divider, { orientation: "horizontal", thickness: "bolder" }),
|
|
12558
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(StyledStepContent, { children: [
|
|
12559
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(StyledCounterNumber, { $size: size, children: index + 1 }),
|
|
12560
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(StyledStepLabel, { as: "span", size: labelSize, color: "inherit", children })
|
|
12254
12561
|
] })
|
|
12255
12562
|
] });
|
|
12256
12563
|
}
|
|
@@ -12263,10 +12570,10 @@ var Step = {
|
|
|
12263
12570
|
|
|
12264
12571
|
// src/components/Tab/tab.tsx
|
|
12265
12572
|
var import_radix_ui3 = require("radix-ui");
|
|
12266
|
-
var
|
|
12573
|
+
var import_react49 = require("react");
|
|
12267
12574
|
|
|
12268
12575
|
// src/components/Tab/tab.styles.ts
|
|
12269
|
-
var
|
|
12576
|
+
var import_styled28 = __toESM(require("@emotion/styled"), 1);
|
|
12270
12577
|
var import_radix_ui2 = require("radix-ui");
|
|
12271
12578
|
var createInteractionStyles2 = (theme, borderRadius, isReadonly) => {
|
|
12272
12579
|
const makeLayer = (state) => InteractionLayer({
|
|
@@ -12285,7 +12592,7 @@ var createInteractionStyles2 = (theme, borderRadius, isReadonly) => {
|
|
|
12285
12592
|
focusStyle: makeLayer("focus")
|
|
12286
12593
|
};
|
|
12287
12594
|
};
|
|
12288
|
-
var StyledTabList = (0,
|
|
12595
|
+
var StyledTabList = (0, import_styled28.default)(import_radix_ui2.Tabs.List)(({
|
|
12289
12596
|
theme,
|
|
12290
12597
|
$variant
|
|
12291
12598
|
}) => {
|
|
@@ -12295,7 +12602,7 @@ var StyledTabList = (0, import_styled27.default)(import_radix_ui2.Tabs.List)(({
|
|
|
12295
12602
|
borderBottom: $variant === "header" ? `1px solid ${theme.color.semantic.stroke.assistive}` : "none"
|
|
12296
12603
|
};
|
|
12297
12604
|
});
|
|
12298
|
-
var StyledTabPrimitiveTrigger = (0,
|
|
12605
|
+
var StyledTabPrimitiveTrigger = (0, import_styled28.default)(
|
|
12299
12606
|
import_radix_ui2.Tabs.Trigger
|
|
12300
12607
|
)(({ theme, $variant, $isDisabled, $isItemStretched }) => {
|
|
12301
12608
|
const borderRadius = $variant === "header" ? 0 : 6;
|
|
@@ -12339,17 +12646,17 @@ var StyledTabPrimitiveTrigger = (0, import_styled27.default)(
|
|
|
12339
12646
|
}
|
|
12340
12647
|
};
|
|
12341
12648
|
});
|
|
12342
|
-
var
|
|
12649
|
+
var StyledLabel3 = (0, import_styled28.default)(Label)(() => ({
|
|
12343
12650
|
color: "inherit",
|
|
12344
12651
|
cursor: "inherit",
|
|
12345
12652
|
whiteSpace: "nowrap"
|
|
12346
12653
|
}));
|
|
12347
12654
|
|
|
12348
12655
|
// src/components/Tab/tabContext.ts
|
|
12349
|
-
var
|
|
12350
|
-
var TabContext = (0,
|
|
12656
|
+
var import_react48 = require("react");
|
|
12657
|
+
var TabContext = (0, import_react48.createContext)(void 0);
|
|
12351
12658
|
var useTabContext = () => {
|
|
12352
|
-
const context = (0,
|
|
12659
|
+
const context = (0, import_react48.useContext)(TabContext);
|
|
12353
12660
|
if (!context) {
|
|
12354
12661
|
throw new Error("Tab \uCEF4\uD3EC\uB10C\uD2B8\uB294 Tab.Root \uB0B4\uBD80\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4");
|
|
12355
12662
|
}
|
|
@@ -12357,22 +12664,22 @@ var useTabContext = () => {
|
|
|
12357
12664
|
};
|
|
12358
12665
|
|
|
12359
12666
|
// src/components/Tab/tab.tsx
|
|
12360
|
-
var
|
|
12361
|
-
var TabRoot = (0,
|
|
12667
|
+
var import_jsx_runtime175 = require("@emotion/react/jsx-runtime");
|
|
12668
|
+
var TabRoot = (0, import_react49.forwardRef)(
|
|
12362
12669
|
({ children, variant = "header", isItemStretched = false, ...rest }, ref) => {
|
|
12363
|
-
return /* @__PURE__ */ (0,
|
|
12670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(TabContext.Provider, { value: { variant, isItemStretched }, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_radix_ui3.Tabs.Root, { ref, ...rest, children }) });
|
|
12364
12671
|
}
|
|
12365
12672
|
);
|
|
12366
12673
|
TabRoot.displayName = "Tab.Root";
|
|
12367
|
-
var TabList = (0,
|
|
12674
|
+
var TabList = (0, import_react49.forwardRef)(({ children, ...rest }, ref) => {
|
|
12368
12675
|
const { variant } = useTabContext();
|
|
12369
|
-
return /* @__PURE__ */ (0,
|
|
12676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(StyledTabList, { ref, $variant: variant, ...rest, children });
|
|
12370
12677
|
});
|
|
12371
12678
|
TabList.displayName = "Tab.List";
|
|
12372
|
-
var TabTrigger = (0,
|
|
12679
|
+
var TabTrigger = (0, import_react49.forwardRef)(
|
|
12373
12680
|
({ children, disabled = false, badge = "", ...rest }, ref) => {
|
|
12374
12681
|
const { variant, isItemStretched } = useTabContext();
|
|
12375
|
-
return /* @__PURE__ */ (0,
|
|
12682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
|
|
12376
12683
|
StyledTabPrimitiveTrigger,
|
|
12377
12684
|
{
|
|
12378
12685
|
disabled,
|
|
@@ -12382,17 +12689,17 @@ var TabTrigger = (0, import_react46.forwardRef)(
|
|
|
12382
12689
|
ref,
|
|
12383
12690
|
...rest,
|
|
12384
12691
|
children: [
|
|
12385
|
-
/* @__PURE__ */ (0,
|
|
12386
|
-
badge && /* @__PURE__ */ (0,
|
|
12692
|
+
/* @__PURE__ */ (0, import_jsx_runtime175.jsx)(StyledLabel3, { size: "md", weight: "bold", children }),
|
|
12693
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(StyledLabel3, { size: "md", weight: "subtle", children: badge })
|
|
12387
12694
|
]
|
|
12388
12695
|
}
|
|
12389
12696
|
);
|
|
12390
12697
|
}
|
|
12391
12698
|
);
|
|
12392
12699
|
TabTrigger.displayName = "Tab.Trigger";
|
|
12393
|
-
var TabContent = (0,
|
|
12700
|
+
var TabContent = (0, import_react49.forwardRef)(
|
|
12394
12701
|
({ children, ...rest }, ref) => {
|
|
12395
|
-
return /* @__PURE__ */ (0,
|
|
12702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_radix_ui3.Tabs.Content, { ref, ...rest, children });
|
|
12396
12703
|
}
|
|
12397
12704
|
);
|
|
12398
12705
|
TabContent.displayName = "Tab.Content";
|
|
@@ -12404,17 +12711,17 @@ var Tab = {
|
|
|
12404
12711
|
};
|
|
12405
12712
|
|
|
12406
12713
|
// src/components/Title/Title.tsx
|
|
12407
|
-
var
|
|
12714
|
+
var import_react50 = require("react");
|
|
12408
12715
|
|
|
12409
12716
|
// src/components/Title/Title.style.ts
|
|
12410
|
-
var
|
|
12717
|
+
var import_styled29 = __toESM(require("@emotion/styled"), 1);
|
|
12411
12718
|
var titleStylesMap = {
|
|
12412
12719
|
lg: "semantic-textStyle-title-4",
|
|
12413
12720
|
md: "semantic-textStyle-title-3",
|
|
12414
12721
|
sm: "semantic-textStyle-title-2",
|
|
12415
12722
|
xs: "semantic-textStyle-title-1"
|
|
12416
12723
|
};
|
|
12417
|
-
var StyledTitle =
|
|
12724
|
+
var StyledTitle = import_styled29.default.div(({ theme, size, textAlign, color }) => {
|
|
12418
12725
|
const tokenKey = titleStylesMap[size];
|
|
12419
12726
|
const justifyContent = TEXT_ALIGN_MAPPING2[textAlign];
|
|
12420
12727
|
const BaseColor = color || theme.color.semantic.object.bolder;
|
|
@@ -12429,10 +12736,10 @@ var StyledTitle = import_styled28.default.div(({ theme, size, textAlign, color }
|
|
|
12429
12736
|
});
|
|
12430
12737
|
|
|
12431
12738
|
// src/components/Title/Title.tsx
|
|
12432
|
-
var
|
|
12433
|
-
var Title = (0,
|
|
12739
|
+
var import_jsx_runtime176 = require("@emotion/react/jsx-runtime");
|
|
12740
|
+
var Title = (0, import_react50.forwardRef)(
|
|
12434
12741
|
({ as, size = "md", textAlign = "left", color, children, ...props }, ref) => {
|
|
12435
|
-
return /* @__PURE__ */ (0,
|
|
12742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledTitle, { as, ref, size, textAlign, color, ...props, children });
|
|
12436
12743
|
}
|
|
12437
12744
|
);
|
|
12438
12745
|
Title.displayName = "Title";
|
|
@@ -12441,9 +12748,9 @@ Title.displayName = "Title";
|
|
|
12441
12748
|
var import_radix_ui5 = require("radix-ui");
|
|
12442
12749
|
|
|
12443
12750
|
// src/components/Tooltip/tooltip.styles.ts
|
|
12444
|
-
var
|
|
12751
|
+
var import_styled30 = __toESM(require("@emotion/styled"), 1);
|
|
12445
12752
|
var import_radix_ui4 = require("radix-ui");
|
|
12446
|
-
var StyledTooltipContent = (0,
|
|
12753
|
+
var StyledTooltipContent = (0, import_styled30.default)(import_radix_ui4.Tooltip.Content)(({ theme }) => ({
|
|
12447
12754
|
backgroundColor: theme.color.semantic.fill.boldest,
|
|
12448
12755
|
color: theme.color.semantic.object.inverse.boldest,
|
|
12449
12756
|
padding: `${theme.scheme.semantic.spacing[6]} ${theme.scheme.semantic.spacing[10]}`,
|
|
@@ -12482,13 +12789,13 @@ var StyledTooltipContent = (0, import_styled29.default)(import_radix_ui4.Tooltip
|
|
|
12482
12789
|
}));
|
|
12483
12790
|
|
|
12484
12791
|
// src/components/Tooltip/Tooltip.tsx
|
|
12485
|
-
var
|
|
12792
|
+
var import_jsx_runtime177 = require("@emotion/react/jsx-runtime");
|
|
12486
12793
|
var TooltipRoot = ({ children, delayDuration = 0, ...radixProps }) => {
|
|
12487
|
-
return /* @__PURE__ */ (0,
|
|
12794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_radix_ui5.Tooltip.Root, { delayDuration, ...radixProps, children });
|
|
12488
12795
|
};
|
|
12489
12796
|
TooltipRoot.displayName = "Tooltip.Root";
|
|
12490
12797
|
var TooltipTrigger = ({ children, asChild = true, ...restProps }) => {
|
|
12491
|
-
return /* @__PURE__ */ (0,
|
|
12798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_radix_ui5.Tooltip.Trigger, { asChild, ...restProps, children });
|
|
12492
12799
|
};
|
|
12493
12800
|
TooltipTrigger.displayName = "Tooltip.Trigger";
|
|
12494
12801
|
var TooltipContent = ({
|
|
@@ -12499,7 +12806,7 @@ var TooltipContent = ({
|
|
|
12499
12806
|
avoidCollisions = true,
|
|
12500
12807
|
...restProps
|
|
12501
12808
|
}) => {
|
|
12502
|
-
return /* @__PURE__ */ (0,
|
|
12809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_radix_ui5.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
|
|
12503
12810
|
StyledTooltipContent,
|
|
12504
12811
|
{
|
|
12505
12812
|
side,
|
|
@@ -12520,10 +12827,10 @@ var Tooltip = {
|
|
|
12520
12827
|
};
|
|
12521
12828
|
|
|
12522
12829
|
// src/components/Uploader/Uploader.tsx
|
|
12523
|
-
var
|
|
12830
|
+
var import_react52 = require("react");
|
|
12524
12831
|
|
|
12525
12832
|
// src/components/Uploader/uploader.styles.ts
|
|
12526
|
-
var
|
|
12833
|
+
var import_styled31 = __toESM(require("@emotion/styled"), 1);
|
|
12527
12834
|
var uploaderFileStylesMap = (theme, disabled, isLoading, isDragging) => {
|
|
12528
12835
|
const stylesByState = {
|
|
12529
12836
|
rest: {
|
|
@@ -12592,7 +12899,7 @@ var interactionStyles6 = (theme, isDisabled) => {
|
|
|
12592
12899
|
}
|
|
12593
12900
|
};
|
|
12594
12901
|
};
|
|
12595
|
-
var FileDropZoneDiv =
|
|
12902
|
+
var FileDropZoneDiv = import_styled31.default.div(
|
|
12596
12903
|
({ theme, $isDisabled, $isLoading, $isDragging }) => {
|
|
12597
12904
|
const { borderColor, textColor, bgColor } = uploaderFileStylesMap(
|
|
12598
12905
|
theme,
|
|
@@ -12636,18 +12943,18 @@ var FileDropZoneDiv = import_styled30.default.div(
|
|
|
12636
12943
|
};
|
|
12637
12944
|
}
|
|
12638
12945
|
);
|
|
12639
|
-
var FileSpan =
|
|
12946
|
+
var FileSpan = import_styled31.default.span(({ theme }) => {
|
|
12640
12947
|
return {
|
|
12641
12948
|
textAlign: "center",
|
|
12642
12949
|
...theme.textStyle["semantic-textStyle-body-2xs-bold"]
|
|
12643
12950
|
};
|
|
12644
12951
|
});
|
|
12645
|
-
var LoadingIcon = (0,
|
|
12952
|
+
var LoadingIcon = (0, import_styled31.default)(Icon)(({ theme }) => {
|
|
12646
12953
|
return {
|
|
12647
12954
|
color: theme.color.semantic.object.alternative
|
|
12648
12955
|
};
|
|
12649
12956
|
});
|
|
12650
|
-
var FlexRowDiv =
|
|
12957
|
+
var FlexRowDiv = import_styled31.default.div(({ theme }) => {
|
|
12651
12958
|
return {
|
|
12652
12959
|
display: "flex",
|
|
12653
12960
|
justifyContent: "center",
|
|
@@ -12655,7 +12962,7 @@ var FlexRowDiv = import_styled30.default.div(({ theme }) => {
|
|
|
12655
12962
|
gap: theme.scheme.semantic.spacing[8]
|
|
12656
12963
|
};
|
|
12657
12964
|
});
|
|
12658
|
-
var ImageDropZoneButton =
|
|
12965
|
+
var ImageDropZoneButton = import_styled31.default.button(
|
|
12659
12966
|
({ theme, $isDisabled, $isLoading }) => {
|
|
12660
12967
|
const interaction = ($isDisabled || !$isLoading) && interactionStyles6(theme, $isDisabled);
|
|
12661
12968
|
return {
|
|
@@ -12694,24 +13001,24 @@ var ImageDropZoneButton = import_styled30.default.button(
|
|
|
12694
13001
|
};
|
|
12695
13002
|
}
|
|
12696
13003
|
);
|
|
12697
|
-
var AddIcon = (0,
|
|
13004
|
+
var AddIcon = (0, import_styled31.default)(Icon)(({ theme, $isDisabled }) => {
|
|
12698
13005
|
return {
|
|
12699
13006
|
color: $isDisabled ? theme.color.semantic.object.subtle : theme.color.semantic.object.alternative
|
|
12700
13007
|
};
|
|
12701
13008
|
});
|
|
12702
|
-
var ImageLabel = (0,
|
|
13009
|
+
var ImageLabel = (0, import_styled31.default)(Label)(({ theme, $isDisabled }) => {
|
|
12703
13010
|
return {
|
|
12704
13011
|
color: $isDisabled ? theme.color.semantic.object.subtle : theme.color.semantic.object.neutral
|
|
12705
13012
|
};
|
|
12706
13013
|
});
|
|
12707
|
-
var HiddenInput =
|
|
13014
|
+
var HiddenInput = import_styled31.default.input(() => {
|
|
12708
13015
|
return {
|
|
12709
13016
|
display: "none"
|
|
12710
13017
|
};
|
|
12711
13018
|
});
|
|
12712
13019
|
|
|
12713
13020
|
// src/components/Uploader/useUploader.ts
|
|
12714
|
-
var
|
|
13021
|
+
var import_react51 = require("react");
|
|
12715
13022
|
|
|
12716
13023
|
// src/components/Uploader/uploader.utils.ts
|
|
12717
13024
|
var validateAcceptedFile = (accept, file) => {
|
|
@@ -12757,24 +13064,24 @@ var useUploader = (options) => {
|
|
|
12757
13064
|
onError,
|
|
12758
13065
|
files: controlledFiles
|
|
12759
13066
|
} = options;
|
|
12760
|
-
const [state, dispatch] = (0,
|
|
12761
|
-
const enterCounter = (0,
|
|
13067
|
+
const [state, dispatch] = (0, import_react51.useReducer)(reducer, initialState);
|
|
13068
|
+
const enterCounter = (0, import_react51.useRef)(0);
|
|
12762
13069
|
const isControlled = controlledFiles !== void 0;
|
|
12763
13070
|
const files = isControlled ? controlledFiles : state.files;
|
|
12764
|
-
const handleDragEnter = (0,
|
|
13071
|
+
const handleDragEnter = (0, import_react51.useCallback)((e) => {
|
|
12765
13072
|
e.preventDefault();
|
|
12766
13073
|
enterCounter.current++;
|
|
12767
13074
|
if (enterCounter.current === 1) dispatch({ type: "DRAG_ENTER" });
|
|
12768
13075
|
}, []);
|
|
12769
|
-
const handleDragOver = (0,
|
|
13076
|
+
const handleDragOver = (0, import_react51.useCallback)((e) => {
|
|
12770
13077
|
e.preventDefault();
|
|
12771
13078
|
}, []);
|
|
12772
|
-
const handleDragLeave = (0,
|
|
13079
|
+
const handleDragLeave = (0, import_react51.useCallback)((e) => {
|
|
12773
13080
|
e.preventDefault();
|
|
12774
13081
|
enterCounter.current--;
|
|
12775
13082
|
if (enterCounter.current === 0) dispatch({ type: "DRAG_LEAVE" });
|
|
12776
13083
|
}, []);
|
|
12777
|
-
const handleFiles = (0,
|
|
13084
|
+
const handleFiles = (0, import_react51.useCallback)(
|
|
12778
13085
|
(droppedFiles) => {
|
|
12779
13086
|
let newTotalSize = existingFilesSize || 0;
|
|
12780
13087
|
const validFiles = [];
|
|
@@ -12798,14 +13105,14 @@ var useUploader = (options) => {
|
|
|
12798
13105
|
},
|
|
12799
13106
|
[accept, maxFileSize, maxTotalSize, existingFilesSize, onError]
|
|
12800
13107
|
);
|
|
12801
|
-
const setFiles = (0,
|
|
13108
|
+
const setFiles = (0, import_react51.useCallback)(
|
|
12802
13109
|
(newFiles) => {
|
|
12803
13110
|
if (!isControlled) dispatch({ type: "SET_FILES", files: newFiles });
|
|
12804
13111
|
onUpload?.(newFiles);
|
|
12805
13112
|
},
|
|
12806
13113
|
[isControlled, onUpload]
|
|
12807
13114
|
);
|
|
12808
|
-
const handleDrop = (0,
|
|
13115
|
+
const handleDrop = (0, import_react51.useCallback)(
|
|
12809
13116
|
(e) => {
|
|
12810
13117
|
e.preventDefault();
|
|
12811
13118
|
enterCounter.current = 0;
|
|
@@ -12817,7 +13124,7 @@ var useUploader = (options) => {
|
|
|
12817
13124
|
},
|
|
12818
13125
|
[handleFiles, setFiles]
|
|
12819
13126
|
);
|
|
12820
|
-
const handleInputChange = (0,
|
|
13127
|
+
const handleInputChange = (0, import_react51.useCallback)(
|
|
12821
13128
|
(e) => {
|
|
12822
13129
|
const files2 = Array.from(e.target.files ?? []);
|
|
12823
13130
|
const validFiles = handleFiles(files2);
|
|
@@ -12838,22 +13145,22 @@ var useUploader = (options) => {
|
|
|
12838
13145
|
};
|
|
12839
13146
|
|
|
12840
13147
|
// src/components/Uploader/Uploader.tsx
|
|
12841
|
-
var
|
|
13148
|
+
var import_jsx_runtime178 = require("@emotion/react/jsx-runtime");
|
|
12842
13149
|
var defaultMessages = {
|
|
12843
|
-
rest: /* @__PURE__ */ (0,
|
|
13150
|
+
rest: /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
12844
13151
|
"\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8&\uB4DC\uB86D\uD558\uAC70\uB098, \uC9C1\uC811 \uC120\uD0DD\uD574 \uC5C5\uB85C\uB4DC\uD574\uC8FC\uC138\uC694.",
|
|
12845
|
-
/* @__PURE__ */ (0,
|
|
13152
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)("br", {}),
|
|
12846
13153
|
" \uCD5C\uB300 100MB \uC774\uD558\uC758 PDF \uD30C\uC77C\uC744 \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC5B4\uC694."
|
|
12847
13154
|
] }),
|
|
12848
|
-
loading: /* @__PURE__ */ (0,
|
|
13155
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
12849
13156
|
"\uD30C\uC77C\uC744 \uC5C5\uB85C\uB4DC\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. ",
|
|
12850
|
-
/* @__PURE__ */ (0,
|
|
13157
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)("br", {}),
|
|
12851
13158
|
"\uC7A0\uC2DC\uB9CC \uAE30\uB2E4\uB824\uC8FC\uC138\uC694..."
|
|
12852
13159
|
] }),
|
|
12853
|
-
disabled: /* @__PURE__ */ (0,
|
|
13160
|
+
disabled: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_jsx_runtime178.Fragment, { children: "\uAC00\uB2A5\uD55C \uCD5C\uB300 \uC6A9\uB7C9\uC5D0 \uB3C4\uB2EC\uD588\uC5B4\uC694." })
|
|
12854
13161
|
};
|
|
12855
13162
|
var CustomBorderSVG = () => {
|
|
12856
|
-
return /* @__PURE__ */ (0,
|
|
13163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("svg", { children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("rect", {}) });
|
|
12857
13164
|
};
|
|
12858
13165
|
var UploaderFileButton = ({
|
|
12859
13166
|
isLoading,
|
|
@@ -12864,15 +13171,15 @@ var UploaderFileButton = ({
|
|
|
12864
13171
|
helperLabel
|
|
12865
13172
|
}) => {
|
|
12866
13173
|
if (isLoading && !isDisabled) {
|
|
12867
|
-
return /* @__PURE__ */ (0,
|
|
12868
|
-
/* @__PURE__ */ (0,
|
|
12869
|
-
/* @__PURE__ */ (0,
|
|
13174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
13175
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(LoadingIcon, { name: "spinner", size: "2xl" }),
|
|
13176
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(FlexRowDiv, { children: [
|
|
12870
13177
|
helperLabel,
|
|
12871
13178
|
cancelButton
|
|
12872
13179
|
] })
|
|
12873
13180
|
] });
|
|
12874
13181
|
}
|
|
12875
|
-
return uploadButton ? uploadButton(triggerUpload) : /* @__PURE__ */ (0,
|
|
13182
|
+
return uploadButton ? uploadButton(triggerUpload) : /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(import_jsx_runtime178.Fragment, {});
|
|
12876
13183
|
};
|
|
12877
13184
|
var UploaderFile = ({
|
|
12878
13185
|
accept,
|
|
@@ -12890,7 +13197,7 @@ var UploaderFile = ({
|
|
|
12890
13197
|
cancelButton,
|
|
12891
13198
|
helperLabel
|
|
12892
13199
|
}) => {
|
|
12893
|
-
const inputRef = (0,
|
|
13200
|
+
const inputRef = (0, import_react52.useRef)(null);
|
|
12894
13201
|
const {
|
|
12895
13202
|
isDragging,
|
|
12896
13203
|
handleDragEnter,
|
|
@@ -12910,7 +13217,7 @@ var UploaderFile = ({
|
|
|
12910
13217
|
const baseBodyText = isLoading ? messages.loading : messages.rest;
|
|
12911
13218
|
const bodyText = isDisabled ? messages.disabled : baseBodyText;
|
|
12912
13219
|
const triggerUpload = () => !isDisabled && !isLoading && inputRef.current?.click();
|
|
12913
|
-
return /* @__PURE__ */ (0,
|
|
13220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(
|
|
12914
13221
|
FileDropZoneDiv,
|
|
12915
13222
|
{
|
|
12916
13223
|
onDragEnter: handleDragEnter,
|
|
@@ -12921,9 +13228,9 @@ var UploaderFile = ({
|
|
|
12921
13228
|
$isDisabled: isDisabled,
|
|
12922
13229
|
$isLoading: isLoading,
|
|
12923
13230
|
children: [
|
|
12924
|
-
/* @__PURE__ */ (0,
|
|
12925
|
-
/* @__PURE__ */ (0,
|
|
12926
|
-
/* @__PURE__ */ (0,
|
|
13231
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(CustomBorderSVG, {}),
|
|
13232
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(FileSpan, { children: bodyText }),
|
|
13233
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
12927
13234
|
UploaderFileButton,
|
|
12928
13235
|
{
|
|
12929
13236
|
triggerUpload,
|
|
@@ -12934,7 +13241,7 @@ var UploaderFile = ({
|
|
|
12934
13241
|
helperLabel
|
|
12935
13242
|
}
|
|
12936
13243
|
),
|
|
12937
|
-
/* @__PURE__ */ (0,
|
|
13244
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
12938
13245
|
HiddenInput,
|
|
12939
13246
|
{
|
|
12940
13247
|
ref: inputRef,
|
|
@@ -12957,17 +13264,17 @@ var UploaderImageButton = ({
|
|
|
12957
13264
|
cancelButton
|
|
12958
13265
|
}) => {
|
|
12959
13266
|
if (!isDisabled && isLoading) {
|
|
12960
|
-
return /* @__PURE__ */ (0,
|
|
12961
|
-
/* @__PURE__ */ (0,
|
|
12962
|
-
/* @__PURE__ */ (0,
|
|
12963
|
-
/* @__PURE__ */ (0,
|
|
13267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
13268
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(LoadingIcon, { name: "spinner", size: "xl" }),
|
|
13269
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(FlexRowDiv, { children: [
|
|
13270
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(ImageLabel, { as: "span", size: "sm", textAlign: "center", weight: "normal", $isDisabled: isDisabled, children: loadingLabel }),
|
|
12964
13271
|
cancelButton
|
|
12965
13272
|
] })
|
|
12966
13273
|
] });
|
|
12967
13274
|
}
|
|
12968
|
-
return /* @__PURE__ */ (0,
|
|
12969
|
-
/* @__PURE__ */ (0,
|
|
12970
|
-
/* @__PURE__ */ (0,
|
|
13275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(import_jsx_runtime178.Fragment, { children: [
|
|
13276
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(AddIcon, { name: "add-line", size: "xl", $isDisabled: isDisabled }),
|
|
13277
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(ImageLabel, { as: "span", size: "sm", textAlign: "center", weight: "normal", $isDisabled: isDisabled, children: uploadLabel })
|
|
12971
13278
|
] });
|
|
12972
13279
|
};
|
|
12973
13280
|
var UploaderImage = ({
|
|
@@ -12985,7 +13292,7 @@ var UploaderImage = ({
|
|
|
12985
13292
|
loadingLabel,
|
|
12986
13293
|
cancelButton
|
|
12987
13294
|
}) => {
|
|
12988
|
-
const inputRef = (0,
|
|
13295
|
+
const inputRef = (0, import_react52.useRef)(null);
|
|
12989
13296
|
const { handleInputChange } = useUploader({
|
|
12990
13297
|
accept,
|
|
12991
13298
|
maxFileSize,
|
|
@@ -12996,9 +13303,9 @@ var UploaderImage = ({
|
|
|
12996
13303
|
onError
|
|
12997
13304
|
});
|
|
12998
13305
|
const handleClick = () => !isDisabled && !isLoading && inputRef.current?.click();
|
|
12999
|
-
return /* @__PURE__ */ (0,
|
|
13000
|
-
/* @__PURE__ */ (0,
|
|
13001
|
-
/* @__PURE__ */ (0,
|
|
13306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(ImageDropZoneButton, { $isDisabled: isDisabled, $isLoading: isLoading, onClick: handleClick, children: [
|
|
13307
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(CustomBorderSVG, {}),
|
|
13308
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
13002
13309
|
UploaderImageButton,
|
|
13003
13310
|
{
|
|
13004
13311
|
isDisabled,
|
|
@@ -13008,7 +13315,7 @@ var UploaderImage = ({
|
|
|
13008
13315
|
cancelButton
|
|
13009
13316
|
}
|
|
13010
13317
|
),
|
|
13011
|
-
/* @__PURE__ */ (0,
|
|
13318
|
+
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
13012
13319
|
HiddenInput,
|
|
13013
13320
|
{
|
|
13014
13321
|
ref: inputRef,
|
|
@@ -13032,13 +13339,13 @@ var import_react_dom = __toESM(require("react-dom"), 1);
|
|
|
13032
13339
|
|
|
13033
13340
|
// ../../node_modules/@radix-ui/react-context/dist/index.mjs
|
|
13034
13341
|
var React = __toESM(require("react"), 1);
|
|
13035
|
-
var
|
|
13342
|
+
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
13036
13343
|
function createContext22(rootComponentName, defaultContext) {
|
|
13037
13344
|
const Context2 = React.createContext(defaultContext);
|
|
13038
13345
|
const Provider = (props) => {
|
|
13039
13346
|
const { children, ...context } = props;
|
|
13040
13347
|
const value = React.useMemo(() => context, Object.values(context));
|
|
13041
|
-
return /* @__PURE__ */ (0,
|
|
13348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Context2.Provider, { value, children });
|
|
13042
13349
|
};
|
|
13043
13350
|
Provider.displayName = rootComponentName + "Provider";
|
|
13044
13351
|
function useContext22(consumerName) {
|
|
@@ -13059,7 +13366,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
13059
13366
|
const { scope, children, ...context } = props;
|
|
13060
13367
|
const Context2 = scope?.[scopeName]?.[index] || BaseContext;
|
|
13061
13368
|
const value = React.useMemo(() => context, Object.values(context));
|
|
13062
|
-
return /* @__PURE__ */ (0,
|
|
13369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Context2.Provider, { value, children });
|
|
13063
13370
|
};
|
|
13064
13371
|
Provider.displayName = rootComponentName + "Provider";
|
|
13065
13372
|
function useContext22(consumerName, scope) {
|
|
@@ -13163,7 +13470,7 @@ function useComposedRefs(...refs) {
|
|
|
13163
13470
|
}
|
|
13164
13471
|
|
|
13165
13472
|
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
13166
|
-
var
|
|
13473
|
+
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
13167
13474
|
// @__NO_SIDE_EFFECTS__
|
|
13168
13475
|
function createSlot(ownerName) {
|
|
13169
13476
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -13181,9 +13488,9 @@ function createSlot(ownerName) {
|
|
|
13181
13488
|
return child;
|
|
13182
13489
|
}
|
|
13183
13490
|
});
|
|
13184
|
-
return /* @__PURE__ */ (0,
|
|
13491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
13185
13492
|
}
|
|
13186
|
-
return /* @__PURE__ */ (0,
|
|
13493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
13187
13494
|
});
|
|
13188
13495
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
13189
13496
|
return Slot2;
|
|
@@ -13248,7 +13555,7 @@ function getElementRef(element) {
|
|
|
13248
13555
|
}
|
|
13249
13556
|
|
|
13250
13557
|
// ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
13251
|
-
var
|
|
13558
|
+
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
13252
13559
|
var NODES = [
|
|
13253
13560
|
"a",
|
|
13254
13561
|
"button",
|
|
@@ -13276,7 +13583,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
13276
13583
|
if (typeof window !== "undefined") {
|
|
13277
13584
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
13278
13585
|
}
|
|
13279
|
-
return /* @__PURE__ */ (0,
|
|
13586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
13280
13587
|
});
|
|
13281
13588
|
Node2.displayName = `Primitive.${node}`;
|
|
13282
13589
|
return { ...primitive, [node]: Node2 };
|
|
@@ -13362,7 +13669,7 @@ function isFunction(value) {
|
|
|
13362
13669
|
|
|
13363
13670
|
// ../../node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
13364
13671
|
var React7 = __toESM(require("react"), 1);
|
|
13365
|
-
var
|
|
13672
|
+
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
13366
13673
|
var DirectionContext = React7.createContext(void 0);
|
|
13367
13674
|
function useDirection(localDir) {
|
|
13368
13675
|
const globalDir = React7.useContext(DirectionContext);
|
|
@@ -13508,10 +13815,10 @@ function useId6(deterministicId) {
|
|
|
13508
13815
|
}
|
|
13509
13816
|
|
|
13510
13817
|
// ../../node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
13511
|
-
var
|
|
13512
|
-
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
13513
|
-
var import_react51 = __toESM(require("react"), 1);
|
|
13818
|
+
var import_react53 = __toESM(require("react"), 1);
|
|
13514
13819
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
13820
|
+
var import_react54 = __toESM(require("react"), 1);
|
|
13821
|
+
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
13515
13822
|
function createCollection(name) {
|
|
13516
13823
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
13517
13824
|
const [createCollectionContext, createCollectionScope3] = createContextScope(PROVIDER_NAME);
|
|
@@ -13521,42 +13828,42 @@ function createCollection(name) {
|
|
|
13521
13828
|
);
|
|
13522
13829
|
const CollectionProvider = (props) => {
|
|
13523
13830
|
const { scope, children } = props;
|
|
13524
|
-
const ref =
|
|
13525
|
-
const itemMap =
|
|
13526
|
-
return /* @__PURE__ */ (0,
|
|
13831
|
+
const ref = import_react53.default.useRef(null);
|
|
13832
|
+
const itemMap = import_react53.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
13833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
13527
13834
|
};
|
|
13528
13835
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
13529
13836
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
13530
13837
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
13531
|
-
const CollectionSlot =
|
|
13838
|
+
const CollectionSlot = import_react53.default.forwardRef(
|
|
13532
13839
|
(props, forwardedRef) => {
|
|
13533
13840
|
const { scope, children } = props;
|
|
13534
13841
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
13535
13842
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
13536
|
-
return /* @__PURE__ */ (0,
|
|
13843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
|
13537
13844
|
}
|
|
13538
13845
|
);
|
|
13539
13846
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
13540
13847
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
13541
13848
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
13542
13849
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
13543
|
-
const CollectionItemSlot =
|
|
13850
|
+
const CollectionItemSlot = import_react53.default.forwardRef(
|
|
13544
13851
|
(props, forwardedRef) => {
|
|
13545
13852
|
const { scope, children, ...itemData } = props;
|
|
13546
|
-
const ref =
|
|
13853
|
+
const ref = import_react53.default.useRef(null);
|
|
13547
13854
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
13548
13855
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
13549
|
-
|
|
13856
|
+
import_react53.default.useEffect(() => {
|
|
13550
13857
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
13551
13858
|
return () => void context.itemMap.delete(ref);
|
|
13552
13859
|
});
|
|
13553
|
-
return /* @__PURE__ */ (0,
|
|
13860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
13554
13861
|
}
|
|
13555
13862
|
);
|
|
13556
13863
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
13557
13864
|
function useCollection3(scope) {
|
|
13558
13865
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
13559
|
-
const getItems =
|
|
13866
|
+
const getItems = import_react53.default.useCallback(() => {
|
|
13560
13867
|
const collectionNode = context.collectionRef.current;
|
|
13561
13868
|
if (!collectionNode) return [];
|
|
13562
13869
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -13604,7 +13911,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
13604
13911
|
}
|
|
13605
13912
|
|
|
13606
13913
|
// ../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
13607
|
-
var
|
|
13914
|
+
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
13608
13915
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
13609
13916
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
13610
13917
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -13692,7 +13999,7 @@ var DismissableLayer = React13.forwardRef(
|
|
|
13692
13999
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
13693
14000
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
13694
14001
|
}, []);
|
|
13695
|
-
return /* @__PURE__ */ (0,
|
|
14002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
13696
14003
|
Primitive.div,
|
|
13697
14004
|
{
|
|
13698
14005
|
...layerProps,
|
|
@@ -13726,7 +14033,7 @@ var DismissableLayerBranch = React13.forwardRef((props, forwardedRef) => {
|
|
|
13726
14033
|
};
|
|
13727
14034
|
}
|
|
13728
14035
|
}, [context.branches]);
|
|
13729
|
-
return /* @__PURE__ */ (0,
|
|
14036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
|
13730
14037
|
});
|
|
13731
14038
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
13732
14039
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -13823,7 +14130,7 @@ function usePrevious(value) {
|
|
|
13823
14130
|
|
|
13824
14131
|
// ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
13825
14132
|
var React15 = __toESM(require("react"), 1);
|
|
13826
|
-
var
|
|
14133
|
+
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
13827
14134
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
13828
14135
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
13829
14136
|
position: "absolute",
|
|
@@ -13840,7 +14147,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
13840
14147
|
var NAME = "VisuallyHidden";
|
|
13841
14148
|
var VisuallyHidden = React15.forwardRef(
|
|
13842
14149
|
(props, forwardedRef) => {
|
|
13843
|
-
return /* @__PURE__ */ (0,
|
|
14150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
13844
14151
|
Primitive.span,
|
|
13845
14152
|
{
|
|
13846
14153
|
...props,
|
|
@@ -13854,7 +14161,7 @@ VisuallyHidden.displayName = NAME;
|
|
|
13854
14161
|
var Root = VisuallyHidden;
|
|
13855
14162
|
|
|
13856
14163
|
// ../../node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
13857
|
-
var
|
|
14164
|
+
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
13858
14165
|
var NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
13859
14166
|
var [Collection, useCollection, createCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
|
|
13860
14167
|
var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
|
|
@@ -13936,7 +14243,7 @@ var NavigationMenu = React16.forwardRef(
|
|
|
13936
14243
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
13937
14244
|
};
|
|
13938
14245
|
}, []);
|
|
13939
|
-
return /* @__PURE__ */ (0,
|
|
14246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
13940
14247
|
NavigationMenuProvider,
|
|
13941
14248
|
{
|
|
13942
14249
|
scope: __scopeNavigationMenu,
|
|
@@ -13960,7 +14267,7 @@ var NavigationMenu = React16.forwardRef(
|
|
|
13960
14267
|
setValue((prevValue) => prevValue === itemValue ? "" : itemValue);
|
|
13961
14268
|
},
|
|
13962
14269
|
onItemDismiss: () => setValue(""),
|
|
13963
|
-
children: /* @__PURE__ */ (0,
|
|
14270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
13964
14271
|
Primitive.nav,
|
|
13965
14272
|
{
|
|
13966
14273
|
"aria-label": "Main",
|
|
@@ -13993,7 +14300,7 @@ var NavigationMenuSub = React16.forwardRef(
|
|
|
13993
14300
|
defaultProp: defaultValue ?? "",
|
|
13994
14301
|
caller: SUB_NAME
|
|
13995
14302
|
});
|
|
13996
|
-
return /* @__PURE__ */ (0,
|
|
14303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
13997
14304
|
NavigationMenuProvider,
|
|
13998
14305
|
{
|
|
13999
14306
|
scope: __scopeNavigationMenu,
|
|
@@ -14005,7 +14312,7 @@ var NavigationMenuSub = React16.forwardRef(
|
|
|
14005
14312
|
onTriggerEnter: (itemValue) => setValue(itemValue),
|
|
14006
14313
|
onItemSelect: (itemValue) => setValue(itemValue),
|
|
14007
14314
|
onItemDismiss: () => setValue(""),
|
|
14008
|
-
children: /* @__PURE__ */ (0,
|
|
14315
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
|
|
14009
14316
|
}
|
|
14010
14317
|
);
|
|
14011
14318
|
}
|
|
@@ -14030,7 +14337,7 @@ var NavigationMenuProvider = (props) => {
|
|
|
14030
14337
|
const [viewport, setViewport] = React16.useState(null);
|
|
14031
14338
|
const [viewportContent, setViewportContent] = React16.useState(/* @__PURE__ */ new Map());
|
|
14032
14339
|
const [indicatorTrack, setIndicatorTrack] = React16.useState(null);
|
|
14033
|
-
return /* @__PURE__ */ (0,
|
|
14340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14034
14341
|
NavigationMenuProviderImpl,
|
|
14035
14342
|
{
|
|
14036
14343
|
scope,
|
|
@@ -14064,7 +14371,7 @@ var NavigationMenuProvider = (props) => {
|
|
|
14064
14371
|
return new Map(prevContent);
|
|
14065
14372
|
});
|
|
14066
14373
|
}, []),
|
|
14067
|
-
children: /* @__PURE__ */ (0,
|
|
14374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Collection.Provider, { scope, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(ViewportContentProvider, { scope, items: viewportContent, children }) })
|
|
14068
14375
|
}
|
|
14069
14376
|
);
|
|
14070
14377
|
};
|
|
@@ -14073,8 +14380,8 @@ var NavigationMenuList = React16.forwardRef(
|
|
|
14073
14380
|
(props, forwardedRef) => {
|
|
14074
14381
|
const { __scopeNavigationMenu, ...listProps } = props;
|
|
14075
14382
|
const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
|
|
14076
|
-
const list = /* @__PURE__ */ (0,
|
|
14077
|
-
return /* @__PURE__ */ (0,
|
|
14383
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
|
|
14384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroup, { asChild: true, children: list }) : list }) });
|
|
14078
14385
|
}
|
|
14079
14386
|
);
|
|
14080
14387
|
NavigationMenuList.displayName = LIST_NAME;
|
|
@@ -14104,7 +14411,7 @@ var NavigationMenuItem = React16.forwardRef(
|
|
|
14104
14411
|
if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
|
|
14105
14412
|
}
|
|
14106
14413
|
}, []);
|
|
14107
|
-
return /* @__PURE__ */ (0,
|
|
14414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14108
14415
|
NavigationMenuItemContextProvider,
|
|
14109
14416
|
{
|
|
14110
14417
|
scope: __scopeNavigationMenu,
|
|
@@ -14117,7 +14424,7 @@ var NavigationMenuItem = React16.forwardRef(
|
|
|
14117
14424
|
onFocusProxyEnter: handleContentEntry,
|
|
14118
14425
|
onRootContentClose: handleContentExit,
|
|
14119
14426
|
onContentFocusOutside: handleContentExit,
|
|
14120
|
-
children: /* @__PURE__ */ (0,
|
|
14427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Primitive.li, { ...itemProps, ref: forwardedRef })
|
|
14121
14428
|
}
|
|
14122
14429
|
);
|
|
14123
14430
|
}
|
|
@@ -14135,8 +14442,8 @@ var NavigationMenuTrigger = React16.forwardRef((props, forwardedRef) => {
|
|
|
14135
14442
|
const hasPointerMoveOpenedRef = React16.useRef(false);
|
|
14136
14443
|
const wasClickCloseRef = React16.useRef(false);
|
|
14137
14444
|
const open = itemContext.value === context.value;
|
|
14138
|
-
return /* @__PURE__ */ (0,
|
|
14139
|
-
/* @__PURE__ */ (0,
|
|
14445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, { children: [
|
|
14446
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14140
14447
|
Primitive.button,
|
|
14141
14448
|
{
|
|
14142
14449
|
id: triggerId,
|
|
@@ -14182,8 +14489,8 @@ var NavigationMenuTrigger = React16.forwardRef((props, forwardedRef) => {
|
|
|
14182
14489
|
})
|
|
14183
14490
|
}
|
|
14184
14491
|
) }) }),
|
|
14185
|
-
open && /* @__PURE__ */ (0,
|
|
14186
|
-
/* @__PURE__ */ (0,
|
|
14492
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, { children: [
|
|
14493
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14187
14494
|
Root,
|
|
14188
14495
|
{
|
|
14189
14496
|
"aria-hidden": true,
|
|
@@ -14200,7 +14507,7 @@ var NavigationMenuTrigger = React16.forwardRef((props, forwardedRef) => {
|
|
|
14200
14507
|
}
|
|
14201
14508
|
}
|
|
14202
14509
|
),
|
|
14203
|
-
context.viewport && /* @__PURE__ */ (0,
|
|
14510
|
+
context.viewport && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("span", { "aria-owns": contentId })
|
|
14204
14511
|
] })
|
|
14205
14512
|
] });
|
|
14206
14513
|
});
|
|
@@ -14210,7 +14517,7 @@ var LINK_SELECT = "navigationMenu.linkSelect";
|
|
|
14210
14517
|
var NavigationMenuLink = React16.forwardRef(
|
|
14211
14518
|
(props, forwardedRef) => {
|
|
14212
14519
|
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
|
|
14213
|
-
return /* @__PURE__ */ (0,
|
|
14520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14214
14521
|
Primitive.a,
|
|
14215
14522
|
{
|
|
14216
14523
|
"data-active": active ? "" : void 0,
|
|
@@ -14248,7 +14555,7 @@ var NavigationMenuIndicator = React16.forwardRef((props, forwardedRef) => {
|
|
|
14248
14555
|
const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);
|
|
14249
14556
|
const isVisible = Boolean(context.value);
|
|
14250
14557
|
return context.indicatorTrack ? import_react_dom.default.createPortal(
|
|
14251
|
-
/* @__PURE__ */ (0,
|
|
14558
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Presence, { present: forceMount || isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }),
|
|
14252
14559
|
context.indicatorTrack
|
|
14253
14560
|
) : null;
|
|
14254
14561
|
});
|
|
@@ -14278,7 +14585,7 @@ var NavigationMenuIndicatorImpl = React16.forwardRef((props, forwardedRef) => {
|
|
|
14278
14585
|
};
|
|
14279
14586
|
useResizeObserver(activeTrigger, handlePositionChange);
|
|
14280
14587
|
useResizeObserver(context.indicatorTrack, handlePositionChange);
|
|
14281
|
-
return position ? /* @__PURE__ */ (0,
|
|
14588
|
+
return position ? /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14282
14589
|
Primitive.div,
|
|
14283
14590
|
{
|
|
14284
14591
|
"aria-hidden": true,
|
|
@@ -14318,7 +14625,7 @@ var NavigationMenuContent = React16.forwardRef((props, forwardedRef) => {
|
|
|
14318
14625
|
onRootContentClose: itemContext.onRootContentClose,
|
|
14319
14626
|
...contentProps
|
|
14320
14627
|
};
|
|
14321
|
-
return !context.viewport ? /* @__PURE__ */ (0,
|
|
14628
|
+
return !context.viewport ? /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14322
14629
|
NavigationMenuContentImpl,
|
|
14323
14630
|
{
|
|
14324
14631
|
"data-state": getOpenState(open),
|
|
@@ -14335,7 +14642,7 @@ var NavigationMenuContent = React16.forwardRef((props, forwardedRef) => {
|
|
|
14335
14642
|
...commonProps.style
|
|
14336
14643
|
}
|
|
14337
14644
|
}
|
|
14338
|
-
) }) : /* @__PURE__ */ (0,
|
|
14645
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs });
|
|
14339
14646
|
});
|
|
14340
14647
|
NavigationMenuContent.displayName = CONTENT_NAME;
|
|
14341
14648
|
var ViewportContentMounter = React16.forwardRef((props, forwardedRef) => {
|
|
@@ -14403,7 +14710,7 @@ var NavigationMenuContentImpl = React16.forwardRef((props, forwardedRef) => {
|
|
|
14403
14710
|
prevMotionAttributeRef.current = attribute;
|
|
14404
14711
|
return attribute;
|
|
14405
14712
|
}, [context.previousValue, context.value, context.dir, getItems, value]);
|
|
14406
|
-
return /* @__PURE__ */ (0,
|
|
14713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroup, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14407
14714
|
DismissableLayer,
|
|
14408
14715
|
{
|
|
14409
14716
|
id: contentId,
|
|
@@ -14458,7 +14765,7 @@ var NavigationMenuViewport = React16.forwardRef((props, forwardedRef) => {
|
|
|
14458
14765
|
const { forceMount, ...viewportProps } = props;
|
|
14459
14766
|
const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);
|
|
14460
14767
|
const open = Boolean(context.value);
|
|
14461
|
-
return /* @__PURE__ */ (0,
|
|
14768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) });
|
|
14462
14769
|
});
|
|
14463
14770
|
NavigationMenuViewport.displayName = VIEWPORT_NAME;
|
|
14464
14771
|
var NavigationMenuViewportImpl = React16.forwardRef((props, forwardedRef) => {
|
|
@@ -14479,7 +14786,7 @@ var NavigationMenuViewportImpl = React16.forwardRef((props, forwardedRef) => {
|
|
|
14479
14786
|
if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight });
|
|
14480
14787
|
};
|
|
14481
14788
|
useResizeObserver(content, handleSizeChange);
|
|
14482
|
-
return /* @__PURE__ */ (0,
|
|
14789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14483
14790
|
Primitive.div,
|
|
14484
14791
|
{
|
|
14485
14792
|
"data-state": getOpenState(open),
|
|
@@ -14497,7 +14804,7 @@ var NavigationMenuViewportImpl = React16.forwardRef((props, forwardedRef) => {
|
|
|
14497
14804
|
onPointerLeave: composeEventHandlers(props.onPointerLeave, whenMouse(context.onContentLeave)),
|
|
14498
14805
|
children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => {
|
|
14499
14806
|
const isActive = activeContentValue === value;
|
|
14500
|
-
return /* @__PURE__ */ (0,
|
|
14807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Presence, { present: forceMount || isActive, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14501
14808
|
NavigationMenuContentImpl,
|
|
14502
14809
|
{
|
|
14503
14810
|
...props2,
|
|
@@ -14515,7 +14822,7 @@ var FocusGroup = React16.forwardRef(
|
|
|
14515
14822
|
(props, forwardedRef) => {
|
|
14516
14823
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
14517
14824
|
const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
14518
|
-
return /* @__PURE__ */ (0,
|
|
14825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
|
|
14519
14826
|
}
|
|
14520
14827
|
);
|
|
14521
14828
|
var ARROW_KEYS = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
|
|
@@ -14525,7 +14832,7 @@ var FocusGroupItem = React16.forwardRef(
|
|
|
14525
14832
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
14526
14833
|
const getItems = useFocusGroupCollection(__scopeNavigationMenu);
|
|
14527
14834
|
const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
|
|
14528
|
-
return /* @__PURE__ */ (0,
|
|
14835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
|
|
14529
14836
|
Primitive.button,
|
|
14530
14837
|
{
|
|
14531
14838
|
...groupProps,
|
|
@@ -14618,10 +14925,10 @@ var Link = NavigationMenuLink;
|
|
|
14618
14925
|
var Content = NavigationMenuContent;
|
|
14619
14926
|
|
|
14620
14927
|
// src/components/Navigation/GlobalNavigation/GlobalNavigation.tsx
|
|
14621
|
-
var
|
|
14928
|
+
var import_react55 = require("react");
|
|
14622
14929
|
|
|
14623
14930
|
// src/components/Navigation/GlobalNavigation/globalNavigation.styles.ts
|
|
14624
|
-
var
|
|
14931
|
+
var import_styled32 = __toESM(require("@emotion/styled"), 1);
|
|
14625
14932
|
var globalNavigationStyleMap = (theme) => ({
|
|
14626
14933
|
empty: {
|
|
14627
14934
|
backgroundColor: "transparent",
|
|
@@ -14632,7 +14939,7 @@ var globalNavigationStyleMap = (theme) => ({
|
|
|
14632
14939
|
borderBottom: `1px solid ${theme.color.semantic.stroke.subtle}`
|
|
14633
14940
|
}
|
|
14634
14941
|
});
|
|
14635
|
-
var StyledGlobalNavigationWrapper =
|
|
14942
|
+
var StyledGlobalNavigationWrapper = import_styled32.default.div(
|
|
14636
14943
|
({ theme, $variant }) => {
|
|
14637
14944
|
const globalNavigationStyles = globalNavigationStyleMap(theme)[$variant];
|
|
14638
14945
|
return {
|
|
@@ -14653,7 +14960,7 @@ var StyledGlobalNavigationWrapper = import_styled31.default.div(
|
|
|
14653
14960
|
};
|
|
14654
14961
|
}
|
|
14655
14962
|
);
|
|
14656
|
-
var StyledGlobalNavigationRoot = (0,
|
|
14963
|
+
var StyledGlobalNavigationRoot = (0, import_styled32.default)(Root2)(({ theme }) => ({
|
|
14657
14964
|
position: "relative",
|
|
14658
14965
|
display: "flex",
|
|
14659
14966
|
justifyContent: "left",
|
|
@@ -14676,7 +14983,7 @@ var AlignMap = {
|
|
|
14676
14983
|
left: "flex-start",
|
|
14677
14984
|
right: "flex-end"
|
|
14678
14985
|
};
|
|
14679
|
-
var StyledGlobalNavigationListWrapper =
|
|
14986
|
+
var StyledGlobalNavigationListWrapper = import_styled32.default.div`
|
|
14680
14987
|
display: flex;
|
|
14681
14988
|
justify-content: ${({ $align }) => AlignMap[$align]};
|
|
14682
14989
|
flex: 1;
|
|
@@ -14689,7 +14996,7 @@ var StyledGlobalNavigationListWrapper = import_styled31.default.div`
|
|
|
14689
14996
|
justify-content: flex-end;
|
|
14690
14997
|
}
|
|
14691
14998
|
`;
|
|
14692
|
-
var StyledGlobalNavigationList = (0,
|
|
14999
|
+
var StyledGlobalNavigationList = (0, import_styled32.default)(List)(({ theme }) => ({
|
|
14693
15000
|
display: "flex",
|
|
14694
15001
|
alignItems: "center",
|
|
14695
15002
|
gap: theme.scheme.semantic.spacing[32],
|
|
@@ -14699,26 +15006,26 @@ var StyledGlobalNavigationList = (0, import_styled31.default)(List)(({ theme })
|
|
|
14699
15006
|
gap: theme.scheme.semantic.spacing[24]
|
|
14700
15007
|
}
|
|
14701
15008
|
}));
|
|
14702
|
-
var StyledGlobalNavigationItem = (0,
|
|
15009
|
+
var StyledGlobalNavigationItem = (0, import_styled32.default)(Item)(() => ({
|
|
14703
15010
|
position: "relative"
|
|
14704
15011
|
}));
|
|
14705
|
-
var StyledMobileMenuButton = (0,
|
|
15012
|
+
var StyledMobileMenuButton = (0, import_styled32.default)(IconButton.Basic)(({ theme }) => ({
|
|
14706
15013
|
display: "none",
|
|
14707
15014
|
[theme.breakPoint.mobile]: {
|
|
14708
15015
|
display: "inline-block"
|
|
14709
15016
|
}
|
|
14710
15017
|
}));
|
|
14711
|
-
var StyledGlobalNavigationLogoLink = (0,
|
|
15018
|
+
var StyledGlobalNavigationLogoLink = (0, import_styled32.default)(Link)(() => ({
|
|
14712
15019
|
textDecoration: "none",
|
|
14713
15020
|
color: "inherit"
|
|
14714
15021
|
}));
|
|
14715
|
-
var StyledDividerWrapper =
|
|
15022
|
+
var StyledDividerWrapper = import_styled32.default.div(({ theme }) => ({
|
|
14716
15023
|
height: pxToRem(20),
|
|
14717
15024
|
[theme.breakPoint.tablet]: {
|
|
14718
15025
|
height: pxToRem(18)
|
|
14719
15026
|
}
|
|
14720
15027
|
}));
|
|
14721
|
-
var StyledGlobalNavigationContent = (0,
|
|
15028
|
+
var StyledGlobalNavigationContent = (0, import_styled32.default)(
|
|
14722
15029
|
Content
|
|
14723
15030
|
)(({ $offset }) => {
|
|
14724
15031
|
return {
|
|
@@ -14730,15 +15037,15 @@ var StyledGlobalNavigationContent = (0, import_styled31.default)(
|
|
|
14730
15037
|
});
|
|
14731
15038
|
|
|
14732
15039
|
// src/components/Navigation/GlobalNavigation/GlobalNavigation.tsx
|
|
14733
|
-
var
|
|
14734
|
-
var GlobalNavigationRoot = (0,
|
|
15040
|
+
var import_jsx_runtime188 = require("@emotion/react/jsx-runtime");
|
|
15041
|
+
var GlobalNavigationRoot = (0, import_react55.forwardRef)(
|
|
14735
15042
|
({ children, variant = "empty", ...props }, ref) => {
|
|
14736
|
-
return /* @__PURE__ */ (0,
|
|
15043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationWrapper, { $variant: variant, children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationRoot, { ref, ...props, children }) });
|
|
14737
15044
|
}
|
|
14738
15045
|
);
|
|
14739
15046
|
GlobalNavigationRoot.displayName = "GlobalNavigation.Root";
|
|
14740
|
-
var GlobalNavigationMobileMenuButton = (0,
|
|
14741
|
-
return /* @__PURE__ */ (0,
|
|
15047
|
+
var GlobalNavigationMobileMenuButton = (0, import_react55.forwardRef)(({ ...props }, ref) => {
|
|
15048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
14742
15049
|
StyledMobileMenuButton,
|
|
14743
15050
|
{
|
|
14744
15051
|
ref,
|
|
@@ -14751,44 +15058,44 @@ var GlobalNavigationMobileMenuButton = (0, import_react52.forwardRef)(({ ...prop
|
|
|
14751
15058
|
);
|
|
14752
15059
|
});
|
|
14753
15060
|
GlobalNavigationMobileMenuButton.displayName = "GlobalNavigation.MobileMenuButton";
|
|
14754
|
-
var GlobalNavigationList = (0,
|
|
15061
|
+
var GlobalNavigationList = (0, import_react55.forwardRef)(
|
|
14755
15062
|
({ children, align = "left", ...props }, ref) => {
|
|
14756
|
-
return /* @__PURE__ */ (0,
|
|
15063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationListWrapper, { $align: align, children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationList, { ref, role: "list", ...props, children }) });
|
|
14757
15064
|
}
|
|
14758
15065
|
);
|
|
14759
15066
|
GlobalNavigationList.displayName = "GlobalNavigation.List";
|
|
14760
|
-
var GlobalNavigationItem = (0,
|
|
15067
|
+
var GlobalNavigationItem = (0, import_react55.forwardRef)(
|
|
14761
15068
|
({ children, ...props }, ref) => {
|
|
14762
|
-
return /* @__PURE__ */ (0,
|
|
15069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationItem, { ref, ...props, children });
|
|
14763
15070
|
}
|
|
14764
15071
|
);
|
|
14765
15072
|
GlobalNavigationItem.displayName = "GlobalNavigation.Item";
|
|
14766
|
-
var GlobalNavigationTrigger = (0,
|
|
15073
|
+
var GlobalNavigationTrigger = (0, import_react55.forwardRef)(
|
|
14767
15074
|
({ asChild = true, ...props }, ref) => {
|
|
14768
|
-
return /* @__PURE__ */ (0,
|
|
15075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(Trigger, { ref, asChild, ...props });
|
|
14769
15076
|
}
|
|
14770
15077
|
);
|
|
14771
15078
|
GlobalNavigationTrigger.displayName = "GlobalNavigation.Trigger";
|
|
14772
15079
|
var GlobalNavigationLink = Link;
|
|
14773
15080
|
GlobalNavigationLink.displayName = "GlobalNavigation.Link";
|
|
14774
15081
|
var GlobalNavigationDivider = () => {
|
|
14775
|
-
return /* @__PURE__ */ (0,
|
|
15082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledDividerWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(Divider, { thickness: "normal", orientation: "vertical", variant: "solid" }) });
|
|
14776
15083
|
};
|
|
14777
|
-
var GlobalNavigationLogoLink = (0,
|
|
15084
|
+
var GlobalNavigationLogoLink = (0, import_react55.forwardRef)(
|
|
14778
15085
|
({ children, href, ...props }, ref) => {
|
|
14779
|
-
return /* @__PURE__ */ (0,
|
|
15086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationLogoLink, { href, ref, ...props, children });
|
|
14780
15087
|
}
|
|
14781
15088
|
);
|
|
14782
15089
|
GlobalNavigationLogoLink.displayName = "GlobalNavigation.LogoLink";
|
|
14783
|
-
var GlobalNavigationLogoItem = (0,
|
|
15090
|
+
var GlobalNavigationLogoItem = (0, import_react55.forwardRef)(
|
|
14784
15091
|
({ children, ...props }, ref) => {
|
|
14785
|
-
return /* @__PURE__ */ (0,
|
|
15092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { ref, ...props, children });
|
|
14786
15093
|
}
|
|
14787
15094
|
);
|
|
14788
15095
|
GlobalNavigationLogoItem.displayName = "GlobalNavigation.LogoItem";
|
|
14789
|
-
var GlobalNavigationContent = (0,
|
|
15096
|
+
var GlobalNavigationContent = (0, import_react55.forwardRef)(
|
|
14790
15097
|
({ children, offset = 0, ...props }, ref) => {
|
|
14791
|
-
return /* @__PURE__ */ (0,
|
|
15098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(StyledGlobalNavigationContent, { ref, $offset: offset, ...props, children });
|
|
14792
15099
|
}
|
|
14793
15100
|
);
|
|
14794
15101
|
GlobalNavigationContent.displayName = "GlobalNavigation.Content";
|
|
@@ -14806,11 +15113,11 @@ var GlobalNavigation = {
|
|
|
14806
15113
|
};
|
|
14807
15114
|
|
|
14808
15115
|
// src/components/Navigation/GlobalNavigation/useGlobalNavigationVariant.ts
|
|
14809
|
-
var
|
|
15116
|
+
var import_react56 = require("react");
|
|
14810
15117
|
var useGlobalNavigationVariant = (options = {}) => {
|
|
14811
15118
|
const { threshold = 0 } = options;
|
|
14812
|
-
const [variant, setVariant] = (0,
|
|
14813
|
-
(0,
|
|
15119
|
+
const [variant, setVariant] = (0, import_react56.useState)("empty");
|
|
15120
|
+
(0, import_react56.useEffect)(() => {
|
|
14814
15121
|
const handleScroll2 = () => {
|
|
14815
15122
|
setVariant(window.scrollY > threshold ? "solid" : "empty");
|
|
14816
15123
|
};
|
|
@@ -14822,17 +15129,17 @@ var useGlobalNavigationVariant = (options = {}) => {
|
|
|
14822
15129
|
};
|
|
14823
15130
|
|
|
14824
15131
|
// src/components/Navigation/LocalNavigation/LocalNavigation.tsx
|
|
14825
|
-
var
|
|
15132
|
+
var import_react58 = require("react");
|
|
14826
15133
|
|
|
14827
15134
|
// src/components/Navigation/LocalNavigation/localNavigation.styles.ts
|
|
14828
|
-
var
|
|
14829
|
-
var StyledLocalNavigationRoot =
|
|
15135
|
+
var import_styled33 = __toESM(require("@emotion/styled"), 1);
|
|
15136
|
+
var StyledLocalNavigationRoot = import_styled33.default.div(
|
|
14830
15137
|
({ theme, $isStretched }) => ({
|
|
14831
15138
|
width: "100%",
|
|
14832
15139
|
padding: $isStretched ? `${theme.scheme.semantic.spacing[8]} 0` : `${theme.scheme.semantic.spacing[8]} ${theme.scheme.semantic.margin.lg}`
|
|
14833
15140
|
})
|
|
14834
15141
|
);
|
|
14835
|
-
var StyledLocalNavigationWrapper =
|
|
15142
|
+
var StyledLocalNavigationWrapper = import_styled33.default.div(({ theme }) => ({
|
|
14836
15143
|
display: "flex",
|
|
14837
15144
|
alignItems: "center",
|
|
14838
15145
|
justifyContent: "space-between",
|
|
@@ -14844,7 +15151,7 @@ var StyledLocalNavigationWrapper = import_styled32.default.div(({ theme }) => ({
|
|
|
14844
15151
|
gap: theme.scheme.semantic.spacing[16]
|
|
14845
15152
|
}
|
|
14846
15153
|
}));
|
|
14847
|
-
var StyledLocalNavigationTitle =
|
|
15154
|
+
var StyledLocalNavigationTitle = import_styled33.default.div(({ theme }) => ({
|
|
14848
15155
|
flex: 1,
|
|
14849
15156
|
color: theme.color.semantic.object.boldest,
|
|
14850
15157
|
...theme.textStyle["semantic-textStyle-title-1"],
|
|
@@ -14852,7 +15159,7 @@ var StyledLocalNavigationTitle = import_styled32.default.div(({ theme }) => ({
|
|
|
14852
15159
|
...theme.textStyle["semantic-textStyle-label-lg-bold"]
|
|
14853
15160
|
}
|
|
14854
15161
|
}));
|
|
14855
|
-
var StyledLocalNavigationButtonGroup =
|
|
15162
|
+
var StyledLocalNavigationButtonGroup = import_styled33.default.div(({ theme }) => ({
|
|
14856
15163
|
display: "flex",
|
|
14857
15164
|
alignItems: "center",
|
|
14858
15165
|
gap: theme.scheme.semantic.spacing[24],
|
|
@@ -14865,14 +15172,14 @@ var StyledLocalNavigationButtonGroup = import_styled32.default.div(({ theme }) =
|
|
|
14865
15172
|
}));
|
|
14866
15173
|
|
|
14867
15174
|
// src/hooks/useMediaQuery.ts
|
|
14868
|
-
var
|
|
15175
|
+
var import_react57 = require("react");
|
|
14869
15176
|
var DEFAULT_BREAKPOINTS = {
|
|
14870
15177
|
mobile: { min: 320, max: 767 },
|
|
14871
15178
|
tablet: { min: 768, max: 1199 },
|
|
14872
15179
|
desktop: { min: 1200, max: 2560 }
|
|
14873
15180
|
};
|
|
14874
15181
|
var useMediaQuery = (breakpoints = DEFAULT_BREAKPOINTS) => {
|
|
14875
|
-
const getDeviceType = (0,
|
|
15182
|
+
const getDeviceType = (0, import_react57.useCallback)(() => {
|
|
14876
15183
|
if (typeof window === "undefined") return "desktop";
|
|
14877
15184
|
const desktopQuery = window.matchMedia(`(min-width: ${breakpoints.desktop.min}px)`);
|
|
14878
15185
|
const tabletQuery = window.matchMedia(
|
|
@@ -14882,8 +15189,8 @@ var useMediaQuery = (breakpoints = DEFAULT_BREAKPOINTS) => {
|
|
|
14882
15189
|
if (tabletQuery.matches) return "tablet";
|
|
14883
15190
|
return "mobile";
|
|
14884
15191
|
}, [breakpoints]);
|
|
14885
|
-
const [deviceType, setDeviceType] = (0,
|
|
14886
|
-
(0,
|
|
15192
|
+
const [deviceType, setDeviceType] = (0, import_react57.useState)(getDeviceType);
|
|
15193
|
+
(0, import_react57.useEffect)(() => {
|
|
14887
15194
|
if (typeof window === "undefined") return;
|
|
14888
15195
|
const desktopQuery = window.matchMedia(`(min-width: ${breakpoints.desktop.min}px)`);
|
|
14889
15196
|
const tabletQuery = window.matchMedia(
|
|
@@ -14911,17 +15218,17 @@ var useMediaQueryFlags = (breakpoints) => {
|
|
|
14911
15218
|
};
|
|
14912
15219
|
|
|
14913
15220
|
// src/components/Navigation/LocalNavigation/LocalNavigation.tsx
|
|
14914
|
-
var
|
|
14915
|
-
var LocalNavigationRoot = (0,
|
|
15221
|
+
var import_jsx_runtime189 = require("@emotion/react/jsx-runtime");
|
|
15222
|
+
var LocalNavigationRoot = (0, import_react58.forwardRef)(
|
|
14916
15223
|
({ isStretched = false, children, ...props }, ref) => {
|
|
14917
|
-
return /* @__PURE__ */ (0,
|
|
15224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLocalNavigationRoot, { ref, $isStretched: isStretched, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLocalNavigationWrapper, { children }) });
|
|
14918
15225
|
}
|
|
14919
15226
|
);
|
|
14920
|
-
var LocalNavigationBackButton = (0,
|
|
15227
|
+
var LocalNavigationBackButton = (0, import_react58.forwardRef)(
|
|
14921
15228
|
({ ...props }, ref) => {
|
|
14922
15229
|
const { isMobile } = useMediaQueryFlags();
|
|
14923
15230
|
const buttonSize = isMobile ? "lg" : "xl";
|
|
14924
|
-
return /* @__PURE__ */ (0,
|
|
15231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
|
|
14925
15232
|
IconButton.Basic,
|
|
14926
15233
|
{
|
|
14927
15234
|
ref,
|
|
@@ -14934,16 +15241,16 @@ var LocalNavigationBackButton = (0, import_react55.forwardRef)(
|
|
|
14934
15241
|
}
|
|
14935
15242
|
);
|
|
14936
15243
|
LocalNavigationBackButton.displayName = "LocalNavigation.BackButton";
|
|
14937
|
-
var LocalNavigationTitle = (0,
|
|
15244
|
+
var LocalNavigationTitle = (0, import_react58.forwardRef)(
|
|
14938
15245
|
({ as, children, ...props }, ref) => {
|
|
14939
|
-
return /* @__PURE__ */ (0,
|
|
15246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLocalNavigationTitle, { as, ref, ...props, children });
|
|
14940
15247
|
}
|
|
14941
15248
|
);
|
|
14942
15249
|
LocalNavigationTitle.displayName = "LocalNavigation.Title";
|
|
14943
|
-
var LocalNavigationButtonGroup = (0,
|
|
15250
|
+
var LocalNavigationButtonGroup = (0, import_react58.forwardRef)(
|
|
14944
15251
|
({ extraButtonVisible = false, children, ...props }, ref) => {
|
|
14945
15252
|
if (!extraButtonVisible) return null;
|
|
14946
|
-
return /* @__PURE__ */ (0,
|
|
15253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(StyledLocalNavigationButtonGroup, { ref, ...props, children });
|
|
14947
15254
|
}
|
|
14948
15255
|
);
|
|
14949
15256
|
LocalNavigationButtonGroup.displayName = "LocalNavigation.ButtonGroup ";
|
|
@@ -14955,10 +15262,10 @@ var LocalNavigation = {
|
|
|
14955
15262
|
};
|
|
14956
15263
|
|
|
14957
15264
|
// src/components/EmptyState/EmptyState.tsx
|
|
14958
|
-
var
|
|
15265
|
+
var import_react59 = require("react");
|
|
14959
15266
|
|
|
14960
15267
|
// src/components/EmptyState/emptyState.styles.ts
|
|
14961
|
-
var
|
|
15268
|
+
var import_styled34 = __toESM(require("@emotion/styled"), 1);
|
|
14962
15269
|
var variantStylesMap = {
|
|
14963
15270
|
outlined: (theme) => ({
|
|
14964
15271
|
backgroundColor: "transparent",
|
|
@@ -14977,7 +15284,7 @@ var contentLayoutStylesMap = {
|
|
|
14977
15284
|
gap: theme.scheme.semantic.spacing[10]
|
|
14978
15285
|
})
|
|
14979
15286
|
};
|
|
14980
|
-
var EmptyStateRoot = (0,
|
|
15287
|
+
var EmptyStateRoot = (0, import_styled34.default)("div", {
|
|
14981
15288
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
14982
15289
|
})(({ theme, $variant, $layout }) => ({
|
|
14983
15290
|
display: "flex",
|
|
@@ -14992,7 +15299,7 @@ var EmptyStateRoot = (0, import_styled33.default)("div", {
|
|
|
14992
15299
|
borderRadius: theme.scheme.semantic.radius[8],
|
|
14993
15300
|
...$variant !== "empty" ? variantStylesMap[$variant](theme) : {}
|
|
14994
15301
|
}));
|
|
14995
|
-
var EmptyStateContentDiv = (0,
|
|
15302
|
+
var EmptyStateContentDiv = (0, import_styled34.default)("div", {
|
|
14996
15303
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
14997
15304
|
})(({ theme, $layout }) => ({
|
|
14998
15305
|
display: "flex",
|
|
@@ -15000,11 +15307,11 @@ var EmptyStateContentDiv = (0, import_styled33.default)("div", {
|
|
|
15000
15307
|
padding: theme.scheme.semantic.spacing[0],
|
|
15001
15308
|
...contentLayoutStylesMap[$layout](theme)
|
|
15002
15309
|
}));
|
|
15003
|
-
var EmptyStateLabel = (0,
|
|
15310
|
+
var EmptyStateLabel = (0, import_styled34.default)(Label)(({ theme }) => ({
|
|
15004
15311
|
flex: 1,
|
|
15005
15312
|
color: theme.color.semantic.object.neutral
|
|
15006
15313
|
}));
|
|
15007
|
-
var EmptyStateBodyTextP = (0,
|
|
15314
|
+
var EmptyStateBodyTextP = (0, import_styled34.default)("p", {
|
|
15008
15315
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
15009
15316
|
})(({ theme, $layout }) => ({
|
|
15010
15317
|
display: "-webkit-box",
|
|
@@ -15017,7 +15324,7 @@ var EmptyStateBodyTextP = (0, import_styled33.default)("p", {
|
|
|
15017
15324
|
textOverflow: "ellipsis",
|
|
15018
15325
|
...theme.textStyle["semantic-textStyle-body-xs-normal"]
|
|
15019
15326
|
}));
|
|
15020
|
-
var EmptyStateButtonContainerDiv = (0,
|
|
15327
|
+
var EmptyStateButtonContainerDiv = (0, import_styled34.default)("div", {
|
|
15021
15328
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
15022
15329
|
})(({ theme, $hasSecondary }) => {
|
|
15023
15330
|
return {
|
|
@@ -15031,8 +15338,8 @@ var EmptyStateButtonContainerDiv = (0, import_styled33.default)("div", {
|
|
|
15031
15338
|
});
|
|
15032
15339
|
|
|
15033
15340
|
// src/components/EmptyState/EmptyState.tsx
|
|
15034
|
-
var
|
|
15035
|
-
var EmptyState = (0,
|
|
15341
|
+
var import_jsx_runtime190 = require("@emotion/react/jsx-runtime");
|
|
15342
|
+
var EmptyState = (0, import_react59.forwardRef)(
|
|
15036
15343
|
({
|
|
15037
15344
|
variant = "empty",
|
|
15038
15345
|
layout = "vertical",
|
|
@@ -15047,8 +15354,8 @@ var EmptyState = (0, import_react56.forwardRef)(
|
|
|
15047
15354
|
const hasSecondary = !!secondaryAction;
|
|
15048
15355
|
const renderActions = () => {
|
|
15049
15356
|
if (!hasPrimary) return null;
|
|
15050
|
-
return /* @__PURE__ */ (0,
|
|
15051
|
-
hasSecondary && /* @__PURE__ */ (0,
|
|
15357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(EmptyStateButtonContainerDiv, { $hasSecondary: hasSecondary, children: [
|
|
15358
|
+
hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
15052
15359
|
BlockButton.Basic,
|
|
15053
15360
|
{
|
|
15054
15361
|
variant: "outlined",
|
|
@@ -15057,14 +15364,14 @@ var EmptyState = (0, import_react56.forwardRef)(
|
|
|
15057
15364
|
...secondaryAction
|
|
15058
15365
|
}
|
|
15059
15366
|
),
|
|
15060
|
-
/* @__PURE__ */ (0,
|
|
15367
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(BlockButton.Basic, { size: "sm", ...primaryAction })
|
|
15061
15368
|
] });
|
|
15062
15369
|
};
|
|
15063
|
-
return /* @__PURE__ */ (0,
|
|
15064
|
-
icon && /* @__PURE__ */ (0,
|
|
15065
|
-
/* @__PURE__ */ (0,
|
|
15066
|
-
/* @__PURE__ */ (0,
|
|
15067
|
-
/* @__PURE__ */ (0,
|
|
15370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(EmptyStateRoot, { ref, $variant: variant, $layout: layout, ...rest, children: [
|
|
15371
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Icon, { name: icon, size: "3xl", "aria-hidden": "true", focusable: false }),
|
|
15372
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(EmptyStateContentDiv, { $layout: layout, children: [
|
|
15373
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(EmptyStateLabel, { weight: "bold", textAlign: "center", children: header }),
|
|
15374
|
+
/* @__PURE__ */ (0, import_jsx_runtime190.jsx)(EmptyStateBodyTextP, { $layout: layout, children: body })
|
|
15068
15375
|
] }),
|
|
15069
15376
|
renderActions()
|
|
15070
15377
|
] });
|
|
@@ -15073,34 +15380,34 @@ var EmptyState = (0, import_react56.forwardRef)(
|
|
|
15073
15380
|
EmptyState.displayName = "EmptyState";
|
|
15074
15381
|
|
|
15075
15382
|
// src/components/Menu/MegaMenu/MegaMenu.tsx
|
|
15076
|
-
var
|
|
15383
|
+
var import_react60 = require("react");
|
|
15077
15384
|
|
|
15078
15385
|
// src/components/Menu/MegaMenu/megaMenu.styles.ts
|
|
15079
|
-
var
|
|
15080
|
-
var StyledMegaMenuRoot = (0,
|
|
15386
|
+
var import_styled35 = __toESM(require("@emotion/styled"), 1);
|
|
15387
|
+
var StyledMegaMenuRoot = (0, import_styled35.default)("div")(({ theme }) => ({
|
|
15081
15388
|
display: "flex",
|
|
15082
15389
|
backgroundColor: theme.color.semantic.surface.shallow,
|
|
15083
15390
|
border: `1px solid ${theme.color.semantic.stroke.subtler}`,
|
|
15084
15391
|
borderRadius: theme.scheme.semantic.radius[10],
|
|
15085
15392
|
...shadow(theme, "floated")
|
|
15086
15393
|
}));
|
|
15087
|
-
var StyledMegaMenuSection = (0,
|
|
15394
|
+
var StyledMegaMenuSection = (0, import_styled35.default)("div")(({ theme }) => ({
|
|
15088
15395
|
display: "flex",
|
|
15089
15396
|
flexDirection: "column",
|
|
15090
15397
|
padding: `${theme.scheme.semantic.margin.lg} ${theme.scheme.semantic.margin.xl}`,
|
|
15091
15398
|
gap: theme.scheme.semantic.spacing[20]
|
|
15092
15399
|
}));
|
|
15093
|
-
var
|
|
15400
|
+
var StyledLabel4 = (0, import_styled35.default)(Label)(({ theme }) => ({
|
|
15094
15401
|
color: theme.color.semantic.object.alternative
|
|
15095
15402
|
}));
|
|
15096
|
-
var StyledMegaMenuGroup = (0,
|
|
15403
|
+
var StyledMegaMenuGroup = (0, import_styled35.default)("ul")(({ theme }) => ({
|
|
15097
15404
|
display: "flex",
|
|
15098
15405
|
flexDirection: "column",
|
|
15099
15406
|
justifyItems: "flex-start",
|
|
15100
15407
|
alignItems: "flex-start",
|
|
15101
15408
|
gap: theme.scheme.semantic.spacing[16]
|
|
15102
15409
|
}));
|
|
15103
|
-
var StyledDivider2 = (0,
|
|
15410
|
+
var StyledDivider2 = (0, import_styled35.default)("hr")(({ theme }) => ({
|
|
15104
15411
|
width: 0,
|
|
15105
15412
|
border: "none",
|
|
15106
15413
|
borderLeft: `1px solid ${theme.color.semantic.stroke.subtler}`,
|
|
@@ -15108,33 +15415,33 @@ var StyledDivider2 = (0, import_styled34.default)("hr")(({ theme }) => ({
|
|
|
15108
15415
|
}));
|
|
15109
15416
|
|
|
15110
15417
|
// src/components/Menu/MegaMenu/MegaMenu.tsx
|
|
15111
|
-
var
|
|
15112
|
-
var MegaMenuRoot = (0,
|
|
15113
|
-
return /* @__PURE__ */ (0,
|
|
15418
|
+
var import_jsx_runtime191 = require("@emotion/react/jsx-runtime");
|
|
15419
|
+
var MegaMenuRoot = (0, import_react60.forwardRef)(({ children, ...rest }, ref) => {
|
|
15420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(StyledMegaMenuRoot, { ref, ...rest, children });
|
|
15114
15421
|
});
|
|
15115
15422
|
MegaMenuRoot.displayName = "MegaMenu.Root";
|
|
15116
15423
|
var MegaMenuDivider = () => {
|
|
15117
|
-
return /* @__PURE__ */ (0,
|
|
15424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(StyledDivider2, {});
|
|
15118
15425
|
};
|
|
15119
15426
|
MegaMenuDivider.displayName = "MegaMenu.Divider";
|
|
15120
|
-
var MegaMenuSection = (0,
|
|
15427
|
+
var MegaMenuSection = (0, import_react60.forwardRef)(
|
|
15121
15428
|
({ children, sectionName = "", ...rest }, ref) => {
|
|
15122
|
-
return /* @__PURE__ */ (0,
|
|
15123
|
-
/* @__PURE__ */ (0,
|
|
15429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(StyledMegaMenuSection, { ref, ...rest, children: [
|
|
15430
|
+
/* @__PURE__ */ (0, import_jsx_runtime191.jsx)(StyledLabel4, { as: "span", textAlign: "left", size: "sm", weight: "normal", children: sectionName }),
|
|
15124
15431
|
children
|
|
15125
15432
|
] });
|
|
15126
15433
|
}
|
|
15127
15434
|
);
|
|
15128
15435
|
StyledMegaMenuSection.displayName = "MegaMenu.Section";
|
|
15129
|
-
var MegaMenuGroup = (0,
|
|
15436
|
+
var MegaMenuGroup = (0, import_react60.forwardRef)(
|
|
15130
15437
|
({ children, ...rest }, ref) => {
|
|
15131
|
-
return /* @__PURE__ */ (0,
|
|
15438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(StyledMegaMenuGroup, { ref, role: "list", ...rest, children });
|
|
15132
15439
|
}
|
|
15133
15440
|
);
|
|
15134
15441
|
MegaMenuGroup.displayName = "MegaMenu.Group";
|
|
15135
|
-
var MegaMenuGroupItem = (0,
|
|
15442
|
+
var MegaMenuGroupItem = (0, import_react60.forwardRef)(
|
|
15136
15443
|
({ children, ...rest }, ref) => {
|
|
15137
|
-
return /* @__PURE__ */ (0,
|
|
15444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("li", { ref, ...rest, children });
|
|
15138
15445
|
}
|
|
15139
15446
|
);
|
|
15140
15447
|
MegaMenuGroupItem.displayName = "MegaMenu.GroupItem";
|
|
@@ -15147,10 +15454,10 @@ var MegaMenu = {
|
|
|
15147
15454
|
};
|
|
15148
15455
|
|
|
15149
15456
|
// src/components/Menu/MenuItem/MenuItem.tsx
|
|
15150
|
-
var
|
|
15457
|
+
var import_react61 = require("react");
|
|
15151
15458
|
|
|
15152
15459
|
// src/components/Menu/MenuItem/menuItem.styles.ts
|
|
15153
|
-
var
|
|
15460
|
+
var import_styled36 = __toESM(require("@emotion/styled"), 1);
|
|
15154
15461
|
|
|
15155
15462
|
// src/components/Menu/MenuItem/menuItem.variants.ts
|
|
15156
15463
|
var menuItemColorMap = (theme, isDisabled, isSelected, isDestructive) => {
|
|
@@ -15190,7 +15497,7 @@ var createInteractionStyles3 = (theme, isDisabled, isSelected, isDestructive) =>
|
|
|
15190
15497
|
focusStyle: makeLayer("focus")
|
|
15191
15498
|
};
|
|
15192
15499
|
};
|
|
15193
|
-
var StyledMenuItemButton = (0,
|
|
15500
|
+
var StyledMenuItemButton = (0, import_styled36.default)("button", {
|
|
15194
15501
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
15195
15502
|
})(({ theme, $isDisabled, $isSelected, $isDestructive }) => {
|
|
15196
15503
|
const color = menuItemColorMap(theme, $isDisabled, $isSelected, $isDestructive);
|
|
@@ -15220,7 +15527,7 @@ var StyledMenuItemButton = (0, import_styled35.default)("button", {
|
|
|
15220
15527
|
}
|
|
15221
15528
|
};
|
|
15222
15529
|
});
|
|
15223
|
-
var StyledMenuItemAnchor = (0,
|
|
15530
|
+
var StyledMenuItemAnchor = (0, import_styled36.default)("a", {
|
|
15224
15531
|
shouldForwardProp: (prop) => isPropValid(prop) && !prop.startsWith("$")
|
|
15225
15532
|
})(({ theme, $isDisabled, $isSelected, $isDestructive }) => {
|
|
15226
15533
|
const color = menuItemColorMap(theme, $isDisabled, $isSelected, $isDestructive);
|
|
@@ -15254,20 +15561,20 @@ var StyledMenuItemAnchor = (0, import_styled35.default)("a", {
|
|
|
15254
15561
|
}
|
|
15255
15562
|
};
|
|
15256
15563
|
});
|
|
15257
|
-
var StyledImage = (0,
|
|
15564
|
+
var StyledImage = (0, import_styled36.default)(Image)(({ $size }) => {
|
|
15258
15565
|
const width = menuItemImageSizeMap[$size];
|
|
15259
15566
|
return {
|
|
15260
15567
|
borderRadius: 0,
|
|
15261
15568
|
width
|
|
15262
15569
|
};
|
|
15263
15570
|
});
|
|
15264
|
-
var MenuItemLabel = (0,
|
|
15571
|
+
var MenuItemLabel = (0, import_styled36.default)(Label)(() => ({
|
|
15265
15572
|
color: "inherit"
|
|
15266
15573
|
}));
|
|
15267
15574
|
|
|
15268
15575
|
// src/components/Menu/MenuItem/MenuItem.tsx
|
|
15269
|
-
var
|
|
15270
|
-
var MenuItemButton = (0,
|
|
15576
|
+
var import_jsx_runtime192 = require("@emotion/react/jsx-runtime");
|
|
15577
|
+
var MenuItemButton = (0, import_react61.forwardRef)(
|
|
15271
15578
|
({
|
|
15272
15579
|
variant = "icon",
|
|
15273
15580
|
size = "md",
|
|
@@ -15283,7 +15590,7 @@ var MenuItemButton = (0, import_react58.forwardRef)(
|
|
|
15283
15590
|
children,
|
|
15284
15591
|
...rest
|
|
15285
15592
|
}, ref) => {
|
|
15286
|
-
return /* @__PURE__ */ (0,
|
|
15593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
|
|
15287
15594
|
StyledMenuItemButton,
|
|
15288
15595
|
{
|
|
15289
15596
|
ref,
|
|
@@ -15293,8 +15600,8 @@ var MenuItemButton = (0, import_react58.forwardRef)(
|
|
|
15293
15600
|
$isDestructive: isDestructive,
|
|
15294
15601
|
...rest,
|
|
15295
15602
|
children: [
|
|
15296
|
-
variant === "icon" && prefixIconVisible && /* @__PURE__ */ (0,
|
|
15297
|
-
variant === "thumbnail" && /* @__PURE__ */ (0,
|
|
15603
|
+
variant === "icon" && prefixIconVisible && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(Icon, { name: prefixIcon, size }),
|
|
15604
|
+
variant === "thumbnail" && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
15298
15605
|
StyledImage,
|
|
15299
15606
|
{
|
|
15300
15607
|
src: imageSrc,
|
|
@@ -15305,15 +15612,15 @@ var MenuItemButton = (0, import_react58.forwardRef)(
|
|
|
15305
15612
|
$size: size
|
|
15306
15613
|
}
|
|
15307
15614
|
),
|
|
15308
|
-
/* @__PURE__ */ (0,
|
|
15309
|
-
suffixIconVisible && /* @__PURE__ */ (0,
|
|
15615
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(MenuItemLabel, { as: "span", size, textAlign: "left", weight: "normal", cursor: disabled ? "default" : "pointer", children }),
|
|
15616
|
+
suffixIconVisible && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(Icon, { name: suffixIcon, size })
|
|
15310
15617
|
]
|
|
15311
15618
|
}
|
|
15312
15619
|
);
|
|
15313
15620
|
}
|
|
15314
15621
|
);
|
|
15315
15622
|
MenuItemButton.displayName = "MenuItem.Button";
|
|
15316
|
-
var MenuItemAnchor = (0,
|
|
15623
|
+
var MenuItemAnchor = (0, import_react61.forwardRef)(
|
|
15317
15624
|
({
|
|
15318
15625
|
variant = "icon",
|
|
15319
15626
|
size = "md",
|
|
@@ -15329,7 +15636,7 @@ var MenuItemAnchor = (0, import_react58.forwardRef)(
|
|
|
15329
15636
|
children,
|
|
15330
15637
|
...rest
|
|
15331
15638
|
}, ref) => {
|
|
15332
|
-
return /* @__PURE__ */ (0,
|
|
15639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
|
|
15333
15640
|
StyledMenuItemAnchor,
|
|
15334
15641
|
{
|
|
15335
15642
|
ref,
|
|
@@ -15338,8 +15645,8 @@ var MenuItemAnchor = (0, import_react58.forwardRef)(
|
|
|
15338
15645
|
$isDestructive: isDestructive,
|
|
15339
15646
|
...rest,
|
|
15340
15647
|
children: [
|
|
15341
|
-
variant === "icon" && prefixIconVisible && /* @__PURE__ */ (0,
|
|
15342
|
-
variant === "thumbnail" && /* @__PURE__ */ (0,
|
|
15648
|
+
variant === "icon" && prefixIconVisible && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(Icon, { name: prefixIcon, size }),
|
|
15649
|
+
variant === "thumbnail" && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
15343
15650
|
StyledImage,
|
|
15344
15651
|
{
|
|
15345
15652
|
src: imageSrc,
|
|
@@ -15350,8 +15657,8 @@ var MenuItemAnchor = (0, import_react58.forwardRef)(
|
|
|
15350
15657
|
$size: size
|
|
15351
15658
|
}
|
|
15352
15659
|
),
|
|
15353
|
-
/* @__PURE__ */ (0,
|
|
15354
|
-
suffixIconVisible && /* @__PURE__ */ (0,
|
|
15660
|
+
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(MenuItemLabel, { as: "span", size, textAlign: "left", weight: "normal", children }),
|
|
15661
|
+
suffixIconVisible && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(Icon, { name: suffixIcon, size })
|
|
15355
15662
|
]
|
|
15356
15663
|
}
|
|
15357
15664
|
);
|
|
@@ -15365,10 +15672,10 @@ var MenuItem = {
|
|
|
15365
15672
|
|
|
15366
15673
|
// src/components/Menu/Menu/Menu.tsx
|
|
15367
15674
|
var import_radix_ui7 = require("radix-ui");
|
|
15368
|
-
var
|
|
15675
|
+
var import_react63 = require("react");
|
|
15369
15676
|
|
|
15370
15677
|
// src/components/Menu/Menu/Menu.styles.ts
|
|
15371
|
-
var
|
|
15678
|
+
var import_styled37 = __toESM(require("@emotion/styled"), 1);
|
|
15372
15679
|
var import_radix_ui6 = require("radix-ui");
|
|
15373
15680
|
|
|
15374
15681
|
// src/components/Menu/Menu/menu.variants.ts
|
|
@@ -15438,7 +15745,7 @@ var menuCategorySizeMap = {
|
|
|
15438
15745
|
};
|
|
15439
15746
|
|
|
15440
15747
|
// src/components/Menu/Menu/Menu.styles.ts
|
|
15441
|
-
var StyledDropdownMenuContent = (0,
|
|
15748
|
+
var StyledDropdownMenuContent = (0, import_styled37.default)(
|
|
15442
15749
|
import_radix_ui6.DropdownMenu.Content
|
|
15443
15750
|
)(({ theme, $menuStyle, $size }) => {
|
|
15444
15751
|
const shadowStyle = $menuStyle === "solid" ? shadow(theme, "floated") : {};
|
|
@@ -15449,12 +15756,12 @@ var StyledDropdownMenuContent = (0, import_styled36.default)(
|
|
|
15449
15756
|
...menuContentMap(theme)[$menuStyle][$size]
|
|
15450
15757
|
};
|
|
15451
15758
|
});
|
|
15452
|
-
var StyledMenuCategory = (0,
|
|
15759
|
+
var StyledMenuCategory = (0, import_styled37.default)(Label)(({ theme }) => {
|
|
15453
15760
|
return {
|
|
15454
15761
|
color: theme.color.semantic.object.alternative
|
|
15455
15762
|
};
|
|
15456
15763
|
});
|
|
15457
|
-
var StyledMenuGroup = (0,
|
|
15764
|
+
var StyledMenuGroup = (0, import_styled37.default)("ul")(({ $size, theme }) => {
|
|
15458
15765
|
return {
|
|
15459
15766
|
display: "flex",
|
|
15460
15767
|
flexDirection: "column",
|
|
@@ -15463,10 +15770,10 @@ var StyledMenuGroup = (0, import_styled36.default)("ul")(({ $size, theme }) => {
|
|
|
15463
15770
|
});
|
|
15464
15771
|
|
|
15465
15772
|
// src/components/Menu/Menu/menuContext.ts
|
|
15466
|
-
var
|
|
15467
|
-
var MenuContext = (0,
|
|
15773
|
+
var import_react62 = require("react");
|
|
15774
|
+
var MenuContext = (0, import_react62.createContext)(void 0);
|
|
15468
15775
|
var useMenuContext = () => {
|
|
15469
|
-
const context = (0,
|
|
15776
|
+
const context = (0, import_react62.useContext)(MenuContext);
|
|
15470
15777
|
if (!context) {
|
|
15471
15778
|
throw new Error("Menu \uCEF4\uD3EC\uB10C\uD2B8\uB294 Menu.Root \uB0B4\uBD80\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4");
|
|
15472
15779
|
}
|
|
@@ -15474,20 +15781,20 @@ var useMenuContext = () => {
|
|
|
15474
15781
|
};
|
|
15475
15782
|
|
|
15476
15783
|
// src/components/Menu/Menu/Menu.tsx
|
|
15477
|
-
var
|
|
15784
|
+
var import_jsx_runtime193 = require("@emotion/react/jsx-runtime");
|
|
15478
15785
|
var MenuRoot = ({ children, menuStyle = "solid", size = "md", ...rest }) => {
|
|
15479
|
-
return /* @__PURE__ */ (0,
|
|
15786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(MenuContext.Provider, { value: { menuStyle, size }, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_radix_ui7.DropdownMenu.Root, { ...rest, children }) });
|
|
15480
15787
|
};
|
|
15481
15788
|
MenuRoot.displayName = "Menu.Root";
|
|
15482
|
-
var MenuContent = (0,
|
|
15789
|
+
var MenuContent = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15483
15790
|
const { menuStyle, size } = useMenuContext();
|
|
15484
|
-
return /* @__PURE__ */ (0,
|
|
15791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledDropdownMenuContent, { ref, $menuStyle: menuStyle, $size: size, ...rest, children });
|
|
15485
15792
|
});
|
|
15486
15793
|
MenuContent.displayName = "Menu.Content";
|
|
15487
|
-
var MenuCategory = (0,
|
|
15794
|
+
var MenuCategory = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15488
15795
|
const { size } = useMenuContext();
|
|
15489
15796
|
const labelSize = menuCategorySizeMap[size];
|
|
15490
|
-
return /* @__PURE__ */ (0,
|
|
15797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
15491
15798
|
StyledMenuCategory,
|
|
15492
15799
|
{
|
|
15493
15800
|
ref,
|
|
@@ -15501,22 +15808,22 @@ var MenuCategory = (0, import_react60.forwardRef)(({ children, ...rest }, ref) =
|
|
|
15501
15808
|
);
|
|
15502
15809
|
});
|
|
15503
15810
|
MenuCategory.displayName = "Menu.Category";
|
|
15504
|
-
var MenuGroup = (0,
|
|
15811
|
+
var MenuGroup = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15505
15812
|
const { size } = useMenuContext();
|
|
15506
|
-
return /* @__PURE__ */ (0,
|
|
15813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(StyledMenuGroup, { ref, role: "list", $size: size, ...rest, children });
|
|
15507
15814
|
});
|
|
15508
15815
|
MenuGroup.displayName = "Menu.Group";
|
|
15509
|
-
var MenuGroupItem = (0,
|
|
15510
|
-
return /* @__PURE__ */ (0,
|
|
15816
|
+
var MenuGroupItem = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(import_radix_ui7.DropdownMenu.Item, { asChild: true, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("li", { ref, children }) });
|
|
15511
15818
|
});
|
|
15512
15819
|
MenuGroupItem.displayName = "Menu.GroupItem";
|
|
15513
|
-
var MenuButton = (0,
|
|
15820
|
+
var MenuButton = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15514
15821
|
const { size } = useMenuContext();
|
|
15515
|
-
return /* @__PURE__ */ (0,
|
|
15822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(MenuItem.Button, { ref, size, ...rest, children });
|
|
15516
15823
|
});
|
|
15517
|
-
var MenuAnchor = (0,
|
|
15824
|
+
var MenuAnchor = (0, import_react63.forwardRef)(({ children, ...rest }, ref) => {
|
|
15518
15825
|
const { size } = useMenuContext();
|
|
15519
|
-
return /* @__PURE__ */ (0,
|
|
15826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(MenuItem.Anchor, { ref, size, ...rest, children });
|
|
15520
15827
|
});
|
|
15521
15828
|
var Menu = {
|
|
15522
15829
|
Root: MenuRoot,
|
|
@@ -15534,7 +15841,7 @@ var React30 = __toESM(require("react"), 1);
|
|
|
15534
15841
|
|
|
15535
15842
|
// ../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
15536
15843
|
var React17 = __toESM(require("react"), 1);
|
|
15537
|
-
var
|
|
15844
|
+
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
15538
15845
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
15539
15846
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
15540
15847
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -15653,7 +15960,7 @@ var FocusScope = React17.forwardRef((props, forwardedRef) => {
|
|
|
15653
15960
|
},
|
|
15654
15961
|
[loop, trapped, focusScope.paused]
|
|
15655
15962
|
);
|
|
15656
|
-
return /* @__PURE__ */ (0,
|
|
15963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
15657
15964
|
});
|
|
15658
15965
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
15659
15966
|
function focusFirst2(candidates, { select = false } = {}) {
|
|
@@ -15739,14 +16046,14 @@ function removeLinks(items) {
|
|
|
15739
16046
|
// ../../node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
15740
16047
|
var React18 = __toESM(require("react"), 1);
|
|
15741
16048
|
var import_react_dom2 = __toESM(require("react-dom"), 1);
|
|
15742
|
-
var
|
|
16049
|
+
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
15743
16050
|
var PORTAL_NAME = "Portal";
|
|
15744
16051
|
var Portal = React18.forwardRef((props, forwardedRef) => {
|
|
15745
16052
|
const { container: containerProp, ...portalProps } = props;
|
|
15746
16053
|
const [mounted, setMounted] = React18.useState(false);
|
|
15747
16054
|
useLayoutEffect22(() => setMounted(true), []);
|
|
15748
16055
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
15749
|
-
return container ? import_react_dom2.default.createPortal(/* @__PURE__ */ (0,
|
|
16056
|
+
return container ? import_react_dom2.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime195.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
15750
16057
|
});
|
|
15751
16058
|
Portal.displayName = PORTAL_NAME;
|
|
15752
16059
|
|
|
@@ -15833,9 +16140,9 @@ function assignRef(ref, value) {
|
|
|
15833
16140
|
}
|
|
15834
16141
|
|
|
15835
16142
|
// ../../node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
15836
|
-
var
|
|
16143
|
+
var import_react64 = require("react");
|
|
15837
16144
|
function useCallbackRef2(initialValue, callback) {
|
|
15838
|
-
var ref = (0,
|
|
16145
|
+
var ref = (0, import_react64.useState)(function() {
|
|
15839
16146
|
return {
|
|
15840
16147
|
// value
|
|
15841
16148
|
value: initialValue,
|
|
@@ -16620,7 +16927,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
16620
16927
|
};
|
|
16621
16928
|
|
|
16622
16929
|
// ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
16623
|
-
var
|
|
16930
|
+
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
16624
16931
|
var DIALOG_NAME = "Dialog";
|
|
16625
16932
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
16626
16933
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -16641,7 +16948,7 @@ var Dialog = (props) => {
|
|
|
16641
16948
|
onChange: onOpenChange,
|
|
16642
16949
|
caller: DIALOG_NAME
|
|
16643
16950
|
});
|
|
16644
|
-
return /* @__PURE__ */ (0,
|
|
16951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16645
16952
|
DialogProvider,
|
|
16646
16953
|
{
|
|
16647
16954
|
scope: __scopeDialog,
|
|
@@ -16665,7 +16972,7 @@ var DialogTrigger = React30.forwardRef(
|
|
|
16665
16972
|
const { __scopeDialog, ...triggerProps } = props;
|
|
16666
16973
|
const context = useDialogContext(TRIGGER_NAME2, __scopeDialog);
|
|
16667
16974
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
16668
|
-
return /* @__PURE__ */ (0,
|
|
16975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16669
16976
|
Primitive.button,
|
|
16670
16977
|
{
|
|
16671
16978
|
type: "button",
|
|
@@ -16688,7 +16995,7 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
|
16688
16995
|
var DialogPortal = (props) => {
|
|
16689
16996
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
16690
16997
|
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
16691
|
-
return /* @__PURE__ */ (0,
|
|
16998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React30.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
16692
16999
|
};
|
|
16693
17000
|
DialogPortal.displayName = PORTAL_NAME2;
|
|
16694
17001
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -16697,7 +17004,7 @@ var DialogOverlay = React30.forwardRef(
|
|
|
16697
17004
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
16698
17005
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
16699
17006
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
16700
|
-
return context.modal ? /* @__PURE__ */ (0,
|
|
17007
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
16701
17008
|
}
|
|
16702
17009
|
);
|
|
16703
17010
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -16709,7 +17016,7 @@ var DialogOverlayImpl = React30.forwardRef(
|
|
|
16709
17016
|
return (
|
|
16710
17017
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
16711
17018
|
// ie. when `Overlay` and `Content` are siblings
|
|
16712
|
-
/* @__PURE__ */ (0,
|
|
17019
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16713
17020
|
Primitive.div,
|
|
16714
17021
|
{
|
|
16715
17022
|
"data-state": getState(context.open),
|
|
@@ -16727,7 +17034,7 @@ var DialogContent = React30.forwardRef(
|
|
|
16727
17034
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopeDialog);
|
|
16728
17035
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
16729
17036
|
const context = useDialogContext(CONTENT_NAME2, props.__scopeDialog);
|
|
16730
|
-
return /* @__PURE__ */ (0,
|
|
17037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
16731
17038
|
}
|
|
16732
17039
|
);
|
|
16733
17040
|
DialogContent.displayName = CONTENT_NAME2;
|
|
@@ -16740,7 +17047,7 @@ var DialogContentModal = React30.forwardRef(
|
|
|
16740
17047
|
const content = contentRef.current;
|
|
16741
17048
|
if (content) return hideOthers(content);
|
|
16742
17049
|
}, []);
|
|
16743
|
-
return /* @__PURE__ */ (0,
|
|
17050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16744
17051
|
DialogContentImpl,
|
|
16745
17052
|
{
|
|
16746
17053
|
...props,
|
|
@@ -16770,7 +17077,7 @@ var DialogContentNonModal = React30.forwardRef(
|
|
|
16770
17077
|
const context = useDialogContext(CONTENT_NAME2, props.__scopeDialog);
|
|
16771
17078
|
const hasInteractedOutsideRef = React30.useRef(false);
|
|
16772
17079
|
const hasPointerDownOutsideRef = React30.useRef(false);
|
|
16773
|
-
return /* @__PURE__ */ (0,
|
|
17080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16774
17081
|
DialogContentImpl,
|
|
16775
17082
|
{
|
|
16776
17083
|
...props,
|
|
@@ -16812,8 +17119,8 @@ var DialogContentImpl = React30.forwardRef(
|
|
|
16812
17119
|
const contentRef = React30.useRef(null);
|
|
16813
17120
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
16814
17121
|
useFocusGuards();
|
|
16815
|
-
return /* @__PURE__ */ (0,
|
|
16816
|
-
/* @__PURE__ */ (0,
|
|
17122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_jsx_runtime196.Fragment, { children: [
|
|
17123
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16817
17124
|
FocusScope,
|
|
16818
17125
|
{
|
|
16819
17126
|
asChild: true,
|
|
@@ -16821,7 +17128,7 @@ var DialogContentImpl = React30.forwardRef(
|
|
|
16821
17128
|
trapped: trapFocus,
|
|
16822
17129
|
onMountAutoFocus: onOpenAutoFocus,
|
|
16823
17130
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
16824
|
-
children: /* @__PURE__ */ (0,
|
|
17131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16825
17132
|
DismissableLayer,
|
|
16826
17133
|
{
|
|
16827
17134
|
role: "dialog",
|
|
@@ -16836,9 +17143,9 @@ var DialogContentImpl = React30.forwardRef(
|
|
|
16836
17143
|
)
|
|
16837
17144
|
}
|
|
16838
17145
|
),
|
|
16839
|
-
/* @__PURE__ */ (0,
|
|
16840
|
-
/* @__PURE__ */ (0,
|
|
16841
|
-
/* @__PURE__ */ (0,
|
|
17146
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_jsx_runtime196.Fragment, { children: [
|
|
17147
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
17148
|
+
/* @__PURE__ */ (0, import_jsx_runtime196.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
16842
17149
|
] })
|
|
16843
17150
|
] });
|
|
16844
17151
|
}
|
|
@@ -16848,7 +17155,7 @@ var DialogTitle = React30.forwardRef(
|
|
|
16848
17155
|
(props, forwardedRef) => {
|
|
16849
17156
|
const { __scopeDialog, ...titleProps } = props;
|
|
16850
17157
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
16851
|
-
return /* @__PURE__ */ (0,
|
|
17158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
16852
17159
|
}
|
|
16853
17160
|
);
|
|
16854
17161
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -16857,7 +17164,7 @@ var DialogDescription = React30.forwardRef(
|
|
|
16857
17164
|
(props, forwardedRef) => {
|
|
16858
17165
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
16859
17166
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
16860
|
-
return /* @__PURE__ */ (0,
|
|
17167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
16861
17168
|
}
|
|
16862
17169
|
);
|
|
16863
17170
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -16866,7 +17173,7 @@ var DialogClose = React30.forwardRef(
|
|
|
16866
17173
|
(props, forwardedRef) => {
|
|
16867
17174
|
const { __scopeDialog, ...closeProps } = props;
|
|
16868
17175
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
16869
|
-
return /* @__PURE__ */ (0,
|
|
17176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
16870
17177
|
Primitive.button,
|
|
16871
17178
|
{
|
|
16872
17179
|
type: "button",
|
|
@@ -16921,20 +17228,20 @@ var Overlay = DialogOverlay;
|
|
|
16921
17228
|
var Content2 = DialogContent;
|
|
16922
17229
|
|
|
16923
17230
|
// src/components/Dialog/Dialog.tsx
|
|
16924
|
-
var
|
|
17231
|
+
var import_react66 = require("react");
|
|
16925
17232
|
|
|
16926
17233
|
// src/components/Dialog/Dialog.styles.ts
|
|
16927
|
-
var
|
|
16928
|
-
var
|
|
16929
|
-
var dialogOverlayFadeIn =
|
|
17234
|
+
var import_react65 = require("@emotion/react");
|
|
17235
|
+
var import_styled38 = __toESM(require("@emotion/styled"), 1);
|
|
17236
|
+
var dialogOverlayFadeIn = import_react65.keyframes`
|
|
16930
17237
|
from { opacity: 0 }
|
|
16931
17238
|
to { opacity: 1 }
|
|
16932
17239
|
`;
|
|
16933
|
-
var dialogOverlayFadeOut =
|
|
17240
|
+
var dialogOverlayFadeOut = import_react65.keyframes`
|
|
16934
17241
|
from { opacity: 1 }
|
|
16935
17242
|
to { opacity: 0 }
|
|
16936
17243
|
`;
|
|
16937
|
-
var dialogSlideIn =
|
|
17244
|
+
var dialogSlideIn = import_react65.keyframes`
|
|
16938
17245
|
from {
|
|
16939
17246
|
opacity: 0;
|
|
16940
17247
|
transform: translate(-50%, calc(-50% + 60px));
|
|
@@ -16944,7 +17251,7 @@ var dialogSlideIn = import_react62.keyframes`
|
|
|
16944
17251
|
transform: translate(-50%, -50%);
|
|
16945
17252
|
}
|
|
16946
17253
|
`;
|
|
16947
|
-
var dialogSlideOut =
|
|
17254
|
+
var dialogSlideOut = import_react65.keyframes`
|
|
16948
17255
|
from {
|
|
16949
17256
|
opacity: 1;
|
|
16950
17257
|
transform: translate(-50%, -50%);
|
|
@@ -16954,11 +17261,11 @@ var dialogSlideOut = import_react62.keyframes`
|
|
|
16954
17261
|
transform: translate(-50%, calc(-50% + 60px));
|
|
16955
17262
|
}
|
|
16956
17263
|
`;
|
|
16957
|
-
var DialogOverlay2 = (0,
|
|
17264
|
+
var DialogOverlay2 = (0, import_styled38.default)(Overlay)(({ theme }) => {
|
|
16958
17265
|
return {
|
|
16959
17266
|
position: "fixed",
|
|
16960
17267
|
inset: 0,
|
|
16961
|
-
backgroundColor: theme.color.semantic.curtain.dim,
|
|
17268
|
+
backgroundColor: theme.color.semantic.curtain.static.dim,
|
|
16962
17269
|
'&[data-state="open"]': {
|
|
16963
17270
|
animation: `${dialogOverlayFadeIn} ${theme.environment.semantic.duration[200]} ${theme.environment.semantic.motion.entrance}`
|
|
16964
17271
|
},
|
|
@@ -16967,7 +17274,7 @@ var DialogOverlay2 = (0, import_styled37.default)(Overlay)(({ theme }) => {
|
|
|
16967
17274
|
}
|
|
16968
17275
|
};
|
|
16969
17276
|
});
|
|
16970
|
-
var DialogContent2 = (0,
|
|
17277
|
+
var DialogContent2 = (0, import_styled38.default)(Content2)(({ theme }) => {
|
|
16971
17278
|
return {
|
|
16972
17279
|
position: "fixed",
|
|
16973
17280
|
top: "50%",
|
|
@@ -16982,7 +17289,7 @@ var DialogContent2 = (0, import_styled37.default)(Content2)(({ theme }) => {
|
|
|
16982
17289
|
}
|
|
16983
17290
|
};
|
|
16984
17291
|
});
|
|
16985
|
-
var DialogRoot =
|
|
17292
|
+
var DialogRoot = import_styled38.default.div(({ theme }) => ({
|
|
16986
17293
|
display: "flex",
|
|
16987
17294
|
flexDirection: "column",
|
|
16988
17295
|
alignItems: "flex-start",
|
|
@@ -16995,7 +17302,7 @@ var DialogRoot = import_styled37.default.div(({ theme }) => ({
|
|
|
16995
17302
|
background: theme.color.semantic.surface.shallow,
|
|
16996
17303
|
...shadow(theme, "overlay")
|
|
16997
17304
|
}));
|
|
16998
|
-
var DialogDiv =
|
|
17305
|
+
var DialogDiv = import_styled38.default.div(({ theme }) => ({
|
|
16999
17306
|
display: "flex",
|
|
17000
17307
|
flexDirection: "column",
|
|
17001
17308
|
alignItems: "flex-start",
|
|
@@ -17003,7 +17310,7 @@ var DialogDiv = import_styled37.default.div(({ theme }) => ({
|
|
|
17003
17310
|
padding: theme.scheme.semantic.margin.md,
|
|
17004
17311
|
gap: theme.scheme.semantic.spacing[24]
|
|
17005
17312
|
}));
|
|
17006
|
-
var DialogContentDiv =
|
|
17313
|
+
var DialogContentDiv = import_styled38.default.div(({ theme }) => ({
|
|
17007
17314
|
display: "flex",
|
|
17008
17315
|
flexDirection: "column",
|
|
17009
17316
|
alignItems: "flex-start",
|
|
@@ -17011,15 +17318,15 @@ var DialogContentDiv = import_styled37.default.div(({ theme }) => ({
|
|
|
17011
17318
|
padding: theme.scheme.semantic.spacing[0],
|
|
17012
17319
|
gap: theme.scheme.semantic.spacing[16]
|
|
17013
17320
|
}));
|
|
17014
|
-
var DialogTitle2 = (0,
|
|
17321
|
+
var DialogTitle2 = (0, import_styled38.default)(Title)({
|
|
17015
17322
|
alignSelf: "stretch"
|
|
17016
17323
|
});
|
|
17017
|
-
var DialogBodyTextP =
|
|
17324
|
+
var DialogBodyTextP = import_styled38.default.p(({ theme }) => ({
|
|
17018
17325
|
alignSelf: "stretch",
|
|
17019
17326
|
color: theme.color.semantic.object.normal,
|
|
17020
17327
|
...theme.textStyle["semantic-textStyle-body-xs-normal"]
|
|
17021
17328
|
}));
|
|
17022
|
-
var DialogButtonContainerDiv = (0,
|
|
17329
|
+
var DialogButtonContainerDiv = (0, import_styled38.default)("div", {
|
|
17023
17330
|
shouldForwardProp: (prop) => !prop.startsWith("$")
|
|
17024
17331
|
})(({ theme, $isStacked }) => ({
|
|
17025
17332
|
display: "flex",
|
|
@@ -17031,8 +17338,8 @@ var DialogButtonContainerDiv = (0, import_styled37.default)("div", {
|
|
|
17031
17338
|
}));
|
|
17032
17339
|
|
|
17033
17340
|
// src/components/Dialog/Dialog.tsx
|
|
17034
|
-
var
|
|
17035
|
-
var Dialog2 = (0,
|
|
17341
|
+
var import_jsx_runtime197 = require("@emotion/react/jsx-runtime");
|
|
17342
|
+
var Dialog2 = (0, import_react66.forwardRef)(
|
|
17036
17343
|
({
|
|
17037
17344
|
isButtonStretched = false,
|
|
17038
17345
|
header,
|
|
@@ -17046,7 +17353,7 @@ var Dialog2 = (0, import_react63.forwardRef)(
|
|
|
17046
17353
|
const hasTertiaryButton = !!tertiaryAction;
|
|
17047
17354
|
const isReversedOrder = isButtonStretched && !!tertiaryAction;
|
|
17048
17355
|
const renderButtons = () => {
|
|
17049
|
-
const primary = /* @__PURE__ */ (0,
|
|
17356
|
+
const primary = /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
17050
17357
|
BlockButton.Basic,
|
|
17051
17358
|
{
|
|
17052
17359
|
style: { width: isButtonStretched ? "100%" : "auto" },
|
|
@@ -17054,7 +17361,7 @@ var Dialog2 = (0, import_react63.forwardRef)(
|
|
|
17054
17361
|
},
|
|
17055
17362
|
"primary"
|
|
17056
17363
|
);
|
|
17057
|
-
const secondary = secondaryAction ? /* @__PURE__ */ (0,
|
|
17364
|
+
const secondary = secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
17058
17365
|
BlockButton.Basic,
|
|
17059
17366
|
{
|
|
17060
17367
|
variant: "outlined",
|
|
@@ -17064,7 +17371,7 @@ var Dialog2 = (0, import_react63.forwardRef)(
|
|
|
17064
17371
|
},
|
|
17065
17372
|
"secondary"
|
|
17066
17373
|
) : null;
|
|
17067
|
-
const tertiary = tertiaryAction ? /* @__PURE__ */ (0,
|
|
17374
|
+
const tertiary = tertiaryAction ? /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
|
|
17068
17375
|
BlockButton.Basic,
|
|
17069
17376
|
{
|
|
17070
17377
|
variant: "empty",
|
|
@@ -17077,15 +17384,15 @@ var Dialog2 = (0, import_react63.forwardRef)(
|
|
|
17077
17384
|
const ordered = isReversedOrder ? [primary, secondary, tertiary] : [tertiary, secondary, primary];
|
|
17078
17385
|
return ordered.filter(Boolean);
|
|
17079
17386
|
};
|
|
17080
|
-
return /* @__PURE__ */ (0,
|
|
17081
|
-
/* @__PURE__ */ (0,
|
|
17082
|
-
/* @__PURE__ */ (0,
|
|
17083
|
-
/* @__PURE__ */ (0,
|
|
17084
|
-
/* @__PURE__ */ (0,
|
|
17085
|
-
/* @__PURE__ */ (0,
|
|
17086
|
-
checkboxAction && /* @__PURE__ */ (0,
|
|
17387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Root3, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(Portal2, { children: [
|
|
17388
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogOverlay2, {}),
|
|
17389
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogContent2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogRoot, { ref, children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(DialogDiv, { children: [
|
|
17390
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(DialogContentDiv, { children: [
|
|
17391
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogTitle2, { textAlign: "left", size: "xs", children: header }),
|
|
17392
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogBodyTextP, { children: body }),
|
|
17393
|
+
checkboxAction && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Checkbox.Content, { ...checkboxAction })
|
|
17087
17394
|
] }),
|
|
17088
|
-
/* @__PURE__ */ (0,
|
|
17395
|
+
/* @__PURE__ */ (0, import_jsx_runtime197.jsx)(DialogButtonContainerDiv, { $isStacked: isButtonStretched && hasTertiaryButton, children: renderButtons() })
|
|
17089
17396
|
] }) }) })
|
|
17090
17397
|
] }) });
|
|
17091
17398
|
}
|
|
@@ -17093,11 +17400,11 @@ var Dialog2 = (0, import_react63.forwardRef)(
|
|
|
17093
17400
|
Dialog2.displayName = "Dialog";
|
|
17094
17401
|
|
|
17095
17402
|
// src/components/Toast/Toast.tsx
|
|
17096
|
-
var
|
|
17403
|
+
var import_react68 = require("react");
|
|
17097
17404
|
|
|
17098
17405
|
// src/components/Toast/toast.styles.ts
|
|
17099
|
-
var
|
|
17100
|
-
var
|
|
17406
|
+
var import_react67 = require("@emotion/react");
|
|
17407
|
+
var import_styled39 = __toESM(require("@emotion/styled"), 1);
|
|
17101
17408
|
|
|
17102
17409
|
// src/components/Toast/toast.variants.ts
|
|
17103
17410
|
var toastStylesMap = (theme) => ({
|
|
@@ -17119,7 +17426,7 @@ var toastStylesMap = (theme) => ({
|
|
|
17119
17426
|
});
|
|
17120
17427
|
|
|
17121
17428
|
// src/components/Toast/toast.styles.ts
|
|
17122
|
-
var ToastStackContainer =
|
|
17429
|
+
var ToastStackContainer = import_styled39.default.div(({ theme }) => {
|
|
17123
17430
|
return {
|
|
17124
17431
|
position: "fixed",
|
|
17125
17432
|
bottom: "0",
|
|
@@ -17134,15 +17441,15 @@ var ToastStackContainer = import_styled38.default.div(({ theme }) => {
|
|
|
17134
17441
|
overflow: "hidden"
|
|
17135
17442
|
};
|
|
17136
17443
|
});
|
|
17137
|
-
var ToastDiv =
|
|
17444
|
+
var ToastDiv = import_styled39.default.div(({ theme, toastStyle }) => {
|
|
17138
17445
|
const color = toastStylesMap(theme)[toastStyle].color;
|
|
17139
17446
|
const borderColor = toastStylesMap(theme)[toastStyle].borderColor;
|
|
17140
17447
|
const backgroundColor = toastStylesMap(theme)[toastStyle].backgroundColor;
|
|
17141
|
-
const slideIn =
|
|
17448
|
+
const slideIn = import_react67.keyframes`
|
|
17142
17449
|
from { opacity: 0; transform: translateY(100%); }
|
|
17143
17450
|
to { opacity: 1; transform: translateY(0); }
|
|
17144
17451
|
`;
|
|
17145
|
-
const slideOut =
|
|
17452
|
+
const slideOut = import_react67.keyframes`
|
|
17146
17453
|
from { opacity: 1; transform: translateY(0); }
|
|
17147
17454
|
to { opacity: 0; transform: translateY(100%); }
|
|
17148
17455
|
`;
|
|
@@ -17178,17 +17485,17 @@ var ToastDiv = import_styled38.default.div(({ theme, toastStyle }) => {
|
|
|
17178
17485
|
}
|
|
17179
17486
|
};
|
|
17180
17487
|
});
|
|
17181
|
-
var ToastLabel = (0,
|
|
17488
|
+
var ToastLabel = (0, import_styled39.default)(Label)(({ theme, toastStyle }) => {
|
|
17182
17489
|
return { flex: "1", color: toastStylesMap(theme)[toastStyle].color };
|
|
17183
17490
|
});
|
|
17184
|
-
var ToastContentDiv =
|
|
17491
|
+
var ToastContentDiv = import_styled39.default.div(({ theme }) => {
|
|
17185
17492
|
return {
|
|
17186
17493
|
display: "flex",
|
|
17187
17494
|
flexDirection: "column",
|
|
17188
17495
|
gap: theme.scheme.semantic.spacing[6]
|
|
17189
17496
|
};
|
|
17190
17497
|
});
|
|
17191
|
-
var ToastLabelContainerDiv =
|
|
17498
|
+
var ToastLabelContainerDiv = import_styled39.default.div(({ theme }) => {
|
|
17192
17499
|
return {
|
|
17193
17500
|
display: "flex",
|
|
17194
17501
|
gap: theme.scheme.semantic.spacing[8],
|
|
@@ -17196,14 +17503,14 @@ var ToastLabelContainerDiv = import_styled38.default.div(({ theme }) => {
|
|
|
17196
17503
|
alignItems: "center"
|
|
17197
17504
|
};
|
|
17198
17505
|
});
|
|
17199
|
-
var ToastCaptionP =
|
|
17506
|
+
var ToastCaptionP = import_styled39.default.p(({ theme }) => {
|
|
17200
17507
|
return {
|
|
17201
17508
|
...theme.textStyle["semantic-textStyle-body-xs-normal"],
|
|
17202
17509
|
[theme.breakPoint.mobile]: { ...theme.textStyle["semantic-textStyle-body-xs-normal"] },
|
|
17203
17510
|
[theme.breakPoint.tablet]: { ...theme.textStyle["semantic-textStyle-body-xs-normal"] }
|
|
17204
17511
|
};
|
|
17205
17512
|
});
|
|
17206
|
-
var ButtonContainerDiv =
|
|
17513
|
+
var ButtonContainerDiv = import_styled39.default.div(({ theme }) => {
|
|
17207
17514
|
return {
|
|
17208
17515
|
display: "flex",
|
|
17209
17516
|
gap: theme.scheme.semantic.spacing[12],
|
|
@@ -17211,14 +17518,14 @@ var ButtonContainerDiv = import_styled38.default.div(({ theme }) => {
|
|
|
17211
17518
|
alignItems: "center"
|
|
17212
17519
|
};
|
|
17213
17520
|
});
|
|
17214
|
-
var ToastFeedbackIcon = (0,
|
|
17521
|
+
var ToastFeedbackIcon = (0, import_styled39.default)(Icon)(({ theme, variant }) => {
|
|
17215
17522
|
return { color: toastStylesMap(theme)[variant].color };
|
|
17216
17523
|
});
|
|
17217
17524
|
|
|
17218
17525
|
// src/components/Toast/Toast.tsx
|
|
17219
|
-
var
|
|
17526
|
+
var import_jsx_runtime198 = require("@emotion/react/jsx-runtime");
|
|
17220
17527
|
var ToastBasic = ({ id, caption, onRemove, title, isClosing }) => {
|
|
17221
|
-
const [phase, setPhase] = (0,
|
|
17528
|
+
const [phase, setPhase] = (0, import_react68.useState)("enter");
|
|
17222
17529
|
const onAnimationEnd = () => {
|
|
17223
17530
|
if (phase === "enter") {
|
|
17224
17531
|
setPhase("static");
|
|
@@ -17229,19 +17536,19 @@ var ToastBasic = ({ id, caption, onRemove, title, isClosing }) => {
|
|
|
17229
17536
|
}
|
|
17230
17537
|
};
|
|
17231
17538
|
const onClose = () => setPhase("exit");
|
|
17232
|
-
(0,
|
|
17539
|
+
(0, import_react68.useEffect)(() => {
|
|
17233
17540
|
if (phase === "static") {
|
|
17234
17541
|
const timer = setTimeout(() => setPhase("exit"), 3e3);
|
|
17235
17542
|
return () => clearTimeout(timer);
|
|
17236
17543
|
}
|
|
17237
17544
|
}, [phase]);
|
|
17238
|
-
(0,
|
|
17545
|
+
(0, import_react68.useEffect)(() => {
|
|
17239
17546
|
if (isClosing) setPhase("exit");
|
|
17240
17547
|
}, [isClosing]);
|
|
17241
|
-
return /* @__PURE__ */ (0,
|
|
17242
|
-
/* @__PURE__ */ (0,
|
|
17243
|
-
/* @__PURE__ */ (0,
|
|
17244
|
-
/* @__PURE__ */ (0,
|
|
17548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastDiv, { id, className: phase, toastStyle: "basic", onAnimationEnd, children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(ToastContentDiv, { children: [
|
|
17549
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(ToastLabelContainerDiv, { children: [
|
|
17550
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastLabel, { as: "span", toastStyle: "basic", size: "md", textAlign: "left", weight: "normal", children: title }),
|
|
17551
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
17245
17552
|
IconButton.Basic,
|
|
17246
17553
|
{
|
|
17247
17554
|
icon: "close-line",
|
|
@@ -17252,7 +17559,7 @@ var ToastBasic = ({ id, caption, onRemove, title, isClosing }) => {
|
|
|
17252
17559
|
}
|
|
17253
17560
|
)
|
|
17254
17561
|
] }),
|
|
17255
|
-
caption && /* @__PURE__ */ (0,
|
|
17562
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastCaptionP, { children: caption })
|
|
17256
17563
|
] }) });
|
|
17257
17564
|
};
|
|
17258
17565
|
ToastBasic.displayName = "Toast.Basic";
|
|
@@ -17264,7 +17571,7 @@ var ToastFeedback = ({
|
|
|
17264
17571
|
title,
|
|
17265
17572
|
isClosing
|
|
17266
17573
|
}) => {
|
|
17267
|
-
const [phase, setPhase] = (0,
|
|
17574
|
+
const [phase, setPhase] = (0, import_react68.useState)("enter");
|
|
17268
17575
|
const onAnimationEnd = () => {
|
|
17269
17576
|
if (phase === "enter") {
|
|
17270
17577
|
setPhase("static");
|
|
@@ -17275,26 +17582,26 @@ var ToastFeedback = ({
|
|
|
17275
17582
|
}
|
|
17276
17583
|
};
|
|
17277
17584
|
const onClose = () => setPhase("exit");
|
|
17278
|
-
(0,
|
|
17585
|
+
(0, import_react68.useEffect)(() => {
|
|
17279
17586
|
if (phase === "static") {
|
|
17280
17587
|
const timer = setTimeout(() => setPhase("exit"), 3e3);
|
|
17281
17588
|
return () => clearTimeout(timer);
|
|
17282
17589
|
}
|
|
17283
17590
|
}, [phase]);
|
|
17284
|
-
(0,
|
|
17591
|
+
(0, import_react68.useEffect)(() => {
|
|
17285
17592
|
if (isClosing) setPhase("exit");
|
|
17286
17593
|
}, [isClosing]);
|
|
17287
|
-
return /* @__PURE__ */ (0,
|
|
17288
|
-
/* @__PURE__ */ (0,
|
|
17289
|
-
/* @__PURE__ */ (0,
|
|
17594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastDiv, { id, className: phase, toastStyle: variant, onAnimationEnd, children: /* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(ToastContentDiv, { children: [
|
|
17595
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsxs)(ToastLabelContainerDiv, { children: [
|
|
17596
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
17290
17597
|
ToastFeedbackIcon,
|
|
17291
17598
|
{
|
|
17292
17599
|
variant,
|
|
17293
17600
|
name: variant === "positive" ? "check-line" : "error-warning-line"
|
|
17294
17601
|
}
|
|
17295
17602
|
),
|
|
17296
|
-
/* @__PURE__ */ (0,
|
|
17297
|
-
/* @__PURE__ */ (0,
|
|
17603
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastLabel, { as: "span", toastStyle: variant, size: "md", textAlign: "left", weight: "normal", children: title }),
|
|
17604
|
+
/* @__PURE__ */ (0, import_jsx_runtime198.jsx)(
|
|
17298
17605
|
IconButton.Basic,
|
|
17299
17606
|
{
|
|
17300
17607
|
icon: "close-line",
|
|
@@ -17305,7 +17612,7 @@ var ToastFeedback = ({
|
|
|
17305
17612
|
}
|
|
17306
17613
|
)
|
|
17307
17614
|
] }),
|
|
17308
|
-
caption && /* @__PURE__ */ (0,
|
|
17615
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(ToastCaptionP, { children: caption })
|
|
17309
17616
|
] }) });
|
|
17310
17617
|
};
|
|
17311
17618
|
ToastFeedback.displayName = "Toast.Feedback";
|
|
@@ -17315,7 +17622,7 @@ var Toast = {
|
|
|
17315
17622
|
};
|
|
17316
17623
|
|
|
17317
17624
|
// src/components/Toast/ToastProvider.tsx
|
|
17318
|
-
var
|
|
17625
|
+
var import_react70 = require("react");
|
|
17319
17626
|
var import_react_dom3 = require("react-dom");
|
|
17320
17627
|
|
|
17321
17628
|
// src/components/Toast/toastController.ts
|
|
@@ -17342,14 +17649,14 @@ var toastController = {
|
|
|
17342
17649
|
};
|
|
17343
17650
|
|
|
17344
17651
|
// src/hooks/useLimitedQueueProvider.ts
|
|
17345
|
-
var
|
|
17652
|
+
var import_react69 = require("react");
|
|
17346
17653
|
var useLimitedQueueProvider = ({
|
|
17347
17654
|
limit = 3
|
|
17348
17655
|
}) => {
|
|
17349
17656
|
const AUTO_RESOLVE_TIME = 1500;
|
|
17350
|
-
const [items, setItems] = (0,
|
|
17351
|
-
const removeResolvers = (0,
|
|
17352
|
-
const removeItem = (0,
|
|
17657
|
+
const [items, setItems] = (0, import_react69.useState)([]);
|
|
17658
|
+
const removeResolvers = (0, import_react69.useRef)(/* @__PURE__ */ new Map());
|
|
17659
|
+
const removeItem = (0, import_react69.useCallback)((id) => {
|
|
17353
17660
|
const resolver = removeResolvers.current.get(id);
|
|
17354
17661
|
if (resolver) {
|
|
17355
17662
|
resolver();
|
|
@@ -17357,12 +17664,12 @@ var useLimitedQueueProvider = ({
|
|
|
17357
17664
|
}
|
|
17358
17665
|
setItems((prev) => prev.filter((item) => item.id !== id));
|
|
17359
17666
|
}, []);
|
|
17360
|
-
const closeItem = (0,
|
|
17667
|
+
const closeItem = (0, import_react69.useCallback)((id) => {
|
|
17361
17668
|
setItems(
|
|
17362
17669
|
(prev) => prev.map((item) => item.id === id && !item.isClosing ? { ...item, isClosing: true } : item)
|
|
17363
17670
|
);
|
|
17364
17671
|
}, []);
|
|
17365
|
-
const addItem = (0,
|
|
17672
|
+
const addItem = (0, import_react69.useCallback)(
|
|
17366
17673
|
async (item) => {
|
|
17367
17674
|
const id = crypto.randomUUID();
|
|
17368
17675
|
const newItem = { ...item, id };
|
|
@@ -17400,19 +17707,19 @@ var useToastProvider = ({ toastLimit = 3 }) => {
|
|
|
17400
17707
|
};
|
|
17401
17708
|
|
|
17402
17709
|
// src/components/Toast/ToastProvider.tsx
|
|
17403
|
-
var
|
|
17404
|
-
var ToastContext = (0,
|
|
17710
|
+
var import_jsx_runtime199 = require("@emotion/react/jsx-runtime");
|
|
17711
|
+
var ToastContext = (0, import_react70.createContext)(null);
|
|
17405
17712
|
var ToastProvider = ({ children }) => {
|
|
17406
17713
|
const { toasts, toast: handler, removeToast } = useToastProvider({});
|
|
17407
|
-
(0,
|
|
17714
|
+
(0, import_react70.useEffect)(() => {
|
|
17408
17715
|
toastController.setHandler(handler);
|
|
17409
17716
|
return () => toastController.clearHandler();
|
|
17410
17717
|
}, [handler]);
|
|
17411
|
-
return /* @__PURE__ */ (0,
|
|
17718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsxs)(ToastContext.Provider, { value: { toast: handler, removeToast }, children: [
|
|
17412
17719
|
children,
|
|
17413
17720
|
(0, import_react_dom3.createPortal)(
|
|
17414
|
-
/* @__PURE__ */ (0,
|
|
17415
|
-
(toast) => toast.type === "basic" ? /* @__PURE__ */ (0,
|
|
17721
|
+
/* @__PURE__ */ (0, import_jsx_runtime199.jsx)(ToastStackContainer, { children: toasts.map(
|
|
17722
|
+
(toast) => toast.type === "basic" ? /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(Toast.Basic, { onRemove: () => removeToast(toast.id), ...toast }, toast.id) : /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
17416
17723
|
Toast.Feedback,
|
|
17417
17724
|
{
|
|
17418
17725
|
variant: toast.type,
|
|
@@ -17427,17 +17734,17 @@ var ToastProvider = ({ children }) => {
|
|
|
17427
17734
|
] });
|
|
17428
17735
|
};
|
|
17429
17736
|
var useToast = () => {
|
|
17430
|
-
const context = (0,
|
|
17737
|
+
const context = (0, import_react70.useContext)(ToastContext);
|
|
17431
17738
|
if (!context) throw new Error("useToast must be used within ToastProvider");
|
|
17432
17739
|
return context;
|
|
17433
17740
|
};
|
|
17434
17741
|
|
|
17435
17742
|
// src/components/Snackbar/Snackbar.tsx
|
|
17436
|
-
var
|
|
17743
|
+
var import_react72 = require("react");
|
|
17437
17744
|
|
|
17438
17745
|
// src/components/Snackbar/snackbar.styles.ts
|
|
17439
|
-
var
|
|
17440
|
-
var
|
|
17746
|
+
var import_react71 = require("@emotion/react");
|
|
17747
|
+
var import_styled40 = __toESM(require("@emotion/styled"), 1);
|
|
17441
17748
|
|
|
17442
17749
|
// src/components/Snackbar/snackbar.variants.ts
|
|
17443
17750
|
var snackbarStylesMap = (theme) => ({
|
|
@@ -17459,7 +17766,7 @@ var snackbarStylesMap = (theme) => ({
|
|
|
17459
17766
|
});
|
|
17460
17767
|
|
|
17461
17768
|
// src/components/Snackbar/snackbar.styles.ts
|
|
17462
|
-
var SnackbarStackContainer =
|
|
17769
|
+
var SnackbarStackContainer = import_styled40.default.div(({ theme }) => {
|
|
17463
17770
|
return {
|
|
17464
17771
|
position: "absolute",
|
|
17465
17772
|
bottom: "0",
|
|
@@ -17474,15 +17781,15 @@ var SnackbarStackContainer = import_styled39.default.div(({ theme }) => {
|
|
|
17474
17781
|
overflow: "hidden"
|
|
17475
17782
|
};
|
|
17476
17783
|
});
|
|
17477
|
-
var SnackbarDiv =
|
|
17784
|
+
var SnackbarDiv = import_styled40.default.div(({ theme, snackbarStyle }) => {
|
|
17478
17785
|
const color = snackbarStylesMap(theme)[snackbarStyle].color;
|
|
17479
17786
|
const borderColor = snackbarStylesMap(theme)[snackbarStyle].borderColor;
|
|
17480
17787
|
const backgroundColor = snackbarStylesMap(theme)[snackbarStyle].backgroundColor;
|
|
17481
|
-
const slideIn =
|
|
17788
|
+
const slideIn = import_react71.keyframes`
|
|
17482
17789
|
from { opacity: 0; transform: translateY(100%); }
|
|
17483
17790
|
to { opacity: 1; transform: translateY(0); }
|
|
17484
17791
|
`;
|
|
17485
|
-
const slideOut =
|
|
17792
|
+
const slideOut = import_react71.keyframes`
|
|
17486
17793
|
from { opacity: 1; transform: translateY(0); }
|
|
17487
17794
|
to { opacity: 0; transform: translateY(100%); }
|
|
17488
17795
|
`;
|
|
@@ -17518,20 +17825,20 @@ var SnackbarDiv = import_styled39.default.div(({ theme, snackbarStyle }) => {
|
|
|
17518
17825
|
}
|
|
17519
17826
|
};
|
|
17520
17827
|
});
|
|
17521
|
-
var SnackbarLabel = (0,
|
|
17828
|
+
var SnackbarLabel = (0, import_styled40.default)(Label)(({
|
|
17522
17829
|
theme,
|
|
17523
17830
|
snackbarStyle
|
|
17524
17831
|
}) => {
|
|
17525
17832
|
return { flex: "1", color: snackbarStylesMap(theme)[snackbarStyle].color };
|
|
17526
17833
|
});
|
|
17527
|
-
var SnackbarContentDiv =
|
|
17834
|
+
var SnackbarContentDiv = import_styled40.default.div(({ theme }) => {
|
|
17528
17835
|
return {
|
|
17529
17836
|
display: "flex",
|
|
17530
17837
|
flexDirection: "column",
|
|
17531
17838
|
gap: theme.scheme.semantic.spacing[6]
|
|
17532
17839
|
};
|
|
17533
17840
|
});
|
|
17534
|
-
var SnackbarLabelContainerDiv =
|
|
17841
|
+
var SnackbarLabelContainerDiv = import_styled40.default.div(({ theme }) => {
|
|
17535
17842
|
return {
|
|
17536
17843
|
display: "flex",
|
|
17537
17844
|
gap: theme.scheme.semantic.spacing[8],
|
|
@@ -17539,14 +17846,14 @@ var SnackbarLabelContainerDiv = import_styled39.default.div(({ theme }) => {
|
|
|
17539
17846
|
alignItems: "center"
|
|
17540
17847
|
};
|
|
17541
17848
|
});
|
|
17542
|
-
var SnackbarCaptionP =
|
|
17849
|
+
var SnackbarCaptionP = import_styled40.default.p(({ theme }) => {
|
|
17543
17850
|
return {
|
|
17544
17851
|
...theme.textStyle["semantic-textStyle-body-xs-normal"],
|
|
17545
17852
|
[theme.breakPoint.mobile]: { ...theme.textStyle["semantic-textStyle-body-xs-normal"] },
|
|
17546
17853
|
[theme.breakPoint.tablet]: { ...theme.textStyle["semantic-textStyle-body-xs-normal"] }
|
|
17547
17854
|
};
|
|
17548
17855
|
});
|
|
17549
|
-
var ButtonContainerDiv2 =
|
|
17856
|
+
var ButtonContainerDiv2 = import_styled40.default.div(({ theme }) => {
|
|
17550
17857
|
return {
|
|
17551
17858
|
display: "flex",
|
|
17552
17859
|
gap: theme.scheme.semantic.spacing[12],
|
|
@@ -17554,7 +17861,7 @@ var ButtonContainerDiv2 = import_styled39.default.div(({ theme }) => {
|
|
|
17554
17861
|
alignItems: "center"
|
|
17555
17862
|
};
|
|
17556
17863
|
});
|
|
17557
|
-
var SnackbarFeedbackIcon = (0,
|
|
17864
|
+
var SnackbarFeedbackIcon = (0, import_styled40.default)(Icon)(({
|
|
17558
17865
|
theme,
|
|
17559
17866
|
variant
|
|
17560
17867
|
}) => {
|
|
@@ -17562,12 +17869,12 @@ var SnackbarFeedbackIcon = (0, import_styled39.default)(Icon)(({
|
|
|
17562
17869
|
});
|
|
17563
17870
|
|
|
17564
17871
|
// src/components/Snackbar/Snackbar.tsx
|
|
17565
|
-
var
|
|
17872
|
+
var import_jsx_runtime200 = require("@emotion/react/jsx-runtime");
|
|
17566
17873
|
var SnackbarButtons = ({ prefixButtonProps, suffixButtonProps }) => {
|
|
17567
17874
|
if (!prefixButtonProps && !suffixButtonProps) return;
|
|
17568
|
-
return /* @__PURE__ */ (0,
|
|
17569
|
-
prefixButtonProps && /* @__PURE__ */ (0,
|
|
17570
|
-
suffixButtonProps && /* @__PURE__ */ (0,
|
|
17875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(ButtonContainerDiv2, { children: [
|
|
17876
|
+
prefixButtonProps && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(BlockButton.Basic, { hierarchy: "tertiary", size: "xs", variant: "solid", ...prefixButtonProps, children: prefixButtonProps.children }),
|
|
17877
|
+
suffixButtonProps && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(BlockButton.Basic, { hierarchy: "primary", size: "xs", variant: "solid", ...suffixButtonProps, children: suffixButtonProps.children })
|
|
17571
17878
|
] });
|
|
17572
17879
|
};
|
|
17573
17880
|
var SnackbarBasic = ({
|
|
@@ -17579,7 +17886,7 @@ var SnackbarBasic = ({
|
|
|
17579
17886
|
onRemove,
|
|
17580
17887
|
isClosing
|
|
17581
17888
|
}) => {
|
|
17582
|
-
const [phase, setPhase] = (0,
|
|
17889
|
+
const [phase, setPhase] = (0, import_react72.useState)("enter");
|
|
17583
17890
|
const onAnimationEnd = () => {
|
|
17584
17891
|
if (phase === "enter") {
|
|
17585
17892
|
setPhase("static");
|
|
@@ -17590,20 +17897,20 @@ var SnackbarBasic = ({
|
|
|
17590
17897
|
}
|
|
17591
17898
|
};
|
|
17592
17899
|
const onClose = () => setPhase("exit");
|
|
17593
|
-
(0,
|
|
17900
|
+
(0, import_react72.useEffect)(() => {
|
|
17594
17901
|
if (phase === "static") {
|
|
17595
17902
|
const timer = setTimeout(() => setPhase("exit"), 3e3);
|
|
17596
17903
|
return () => clearTimeout(timer);
|
|
17597
17904
|
}
|
|
17598
17905
|
}, [phase]);
|
|
17599
|
-
(0,
|
|
17906
|
+
(0, import_react72.useEffect)(() => {
|
|
17600
17907
|
if (isClosing) setPhase("exit");
|
|
17601
17908
|
}, [isClosing]);
|
|
17602
|
-
return /* @__PURE__ */ (0,
|
|
17603
|
-
/* @__PURE__ */ (0,
|
|
17604
|
-
/* @__PURE__ */ (0,
|
|
17605
|
-
/* @__PURE__ */ (0,
|
|
17606
|
-
/* @__PURE__ */ (0,
|
|
17909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarDiv, { id, className: phase, snackbarStyle: "basic", onAnimationEnd, children: [
|
|
17910
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarContentDiv, { children: [
|
|
17911
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarLabelContainerDiv, { children: [
|
|
17912
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(SnackbarLabel, { snackbarStyle: "basic", size: "md", textAlign: "left", weight: "normal", children: title }),
|
|
17913
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
17607
17914
|
IconButton.Basic,
|
|
17608
17915
|
{
|
|
17609
17916
|
icon: "close-line",
|
|
@@ -17614,9 +17921,9 @@ var SnackbarBasic = ({
|
|
|
17614
17921
|
}
|
|
17615
17922
|
)
|
|
17616
17923
|
] }),
|
|
17617
|
-
caption && /* @__PURE__ */ (0,
|
|
17924
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(SnackbarCaptionP, { children: caption })
|
|
17618
17925
|
] }),
|
|
17619
|
-
/* @__PURE__ */ (0,
|
|
17926
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
17620
17927
|
SnackbarButtons,
|
|
17621
17928
|
{
|
|
17622
17929
|
prefixButtonProps,
|
|
@@ -17636,7 +17943,7 @@ var SnackbarFeedback = ({
|
|
|
17636
17943
|
onRemove,
|
|
17637
17944
|
isClosing
|
|
17638
17945
|
}) => {
|
|
17639
|
-
const [phase, setPhase] = (0,
|
|
17946
|
+
const [phase, setPhase] = (0, import_react72.useState)("enter");
|
|
17640
17947
|
const onAnimationEnd = () => {
|
|
17641
17948
|
if (phase === "enter") {
|
|
17642
17949
|
setPhase("static");
|
|
@@ -17647,27 +17954,27 @@ var SnackbarFeedback = ({
|
|
|
17647
17954
|
}
|
|
17648
17955
|
};
|
|
17649
17956
|
const onClose = () => setPhase("exit");
|
|
17650
|
-
(0,
|
|
17957
|
+
(0, import_react72.useEffect)(() => {
|
|
17651
17958
|
if (phase === "static") {
|
|
17652
17959
|
const timer = setTimeout(() => setPhase("exit"), 3e3);
|
|
17653
17960
|
return () => clearTimeout(timer);
|
|
17654
17961
|
}
|
|
17655
17962
|
}, [phase]);
|
|
17656
|
-
(0,
|
|
17963
|
+
(0, import_react72.useEffect)(() => {
|
|
17657
17964
|
if (isClosing) setPhase("exit");
|
|
17658
17965
|
}, [isClosing]);
|
|
17659
|
-
return /* @__PURE__ */ (0,
|
|
17660
|
-
/* @__PURE__ */ (0,
|
|
17661
|
-
/* @__PURE__ */ (0,
|
|
17662
|
-
/* @__PURE__ */ (0,
|
|
17966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarDiv, { id, className: phase, snackbarStyle: variant, onAnimationEnd, children: [
|
|
17967
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarContentDiv, { children: [
|
|
17968
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(SnackbarLabelContainerDiv, { children: [
|
|
17969
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
17663
17970
|
SnackbarFeedbackIcon,
|
|
17664
17971
|
{
|
|
17665
17972
|
variant,
|
|
17666
17973
|
name: variant === "positive" ? "check-line" : "error-warning-line"
|
|
17667
17974
|
}
|
|
17668
17975
|
),
|
|
17669
|
-
/* @__PURE__ */ (0,
|
|
17670
|
-
/* @__PURE__ */ (0,
|
|
17976
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(SnackbarLabel, { snackbarStyle: variant, size: "md", textAlign: "left", weight: "normal", children: title }),
|
|
17977
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
17671
17978
|
IconButton.Basic,
|
|
17672
17979
|
{
|
|
17673
17980
|
icon: "close-line",
|
|
@@ -17678,9 +17985,9 @@ var SnackbarFeedback = ({
|
|
|
17678
17985
|
}
|
|
17679
17986
|
)
|
|
17680
17987
|
] }),
|
|
17681
|
-
caption && /* @__PURE__ */ (0,
|
|
17988
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(SnackbarCaptionP, { children: caption })
|
|
17682
17989
|
] }),
|
|
17683
|
-
/* @__PURE__ */ (0,
|
|
17990
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
17684
17991
|
SnackbarButtons,
|
|
17685
17992
|
{
|
|
17686
17993
|
prefixButtonProps,
|
|
@@ -17696,7 +18003,7 @@ var Snackbar = {
|
|
|
17696
18003
|
};
|
|
17697
18004
|
|
|
17698
18005
|
// src/components/Snackbar/SnackbarProvider.tsx
|
|
17699
|
-
var
|
|
18006
|
+
var import_react73 = require("react");
|
|
17700
18007
|
var import_react_dom4 = require("react-dom");
|
|
17701
18008
|
|
|
17702
18009
|
// src/components/Snackbar/snackbarController.ts
|
|
@@ -17736,26 +18043,26 @@ var useSnackbarProvider = ({ snackbarLimit = 3 }) => {
|
|
|
17736
18043
|
};
|
|
17737
18044
|
|
|
17738
18045
|
// src/components/Snackbar/SnackbarProvider.tsx
|
|
17739
|
-
var
|
|
17740
|
-
var SnackbarContext = (0,
|
|
18046
|
+
var import_jsx_runtime201 = require("@emotion/react/jsx-runtime");
|
|
18047
|
+
var SnackbarContext = (0, import_react73.createContext)(null);
|
|
17741
18048
|
var SnackbarProvider = ({ children }) => {
|
|
17742
18049
|
const { snackbars, snackbar: handler, removeSnackbar } = useSnackbarProvider({});
|
|
17743
|
-
(0,
|
|
18050
|
+
(0, import_react73.useEffect)(() => {
|
|
17744
18051
|
snackbarController.setHandler(handler);
|
|
17745
18052
|
return () => snackbarController.clearHandler();
|
|
17746
18053
|
}, [handler]);
|
|
17747
|
-
return /* @__PURE__ */ (0,
|
|
18054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(SnackbarContext.Provider, { value: { snackbar: handler, removeSnackbar }, children: [
|
|
17748
18055
|
children,
|
|
17749
18056
|
(0, import_react_dom4.createPortal)(
|
|
17750
|
-
/* @__PURE__ */ (0,
|
|
17751
|
-
(snackbar) => snackbar.type === "basic" ? /* @__PURE__ */ (0,
|
|
18057
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(SnackbarStackContainer, { children: snackbars.map(
|
|
18058
|
+
(snackbar) => snackbar.type === "basic" ? /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
17752
18059
|
Snackbar.Basic,
|
|
17753
18060
|
{
|
|
17754
18061
|
onRemove: () => removeSnackbar(snackbar.id),
|
|
17755
18062
|
...snackbar
|
|
17756
18063
|
},
|
|
17757
18064
|
snackbar.id
|
|
17758
|
-
) : /* @__PURE__ */ (0,
|
|
18065
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(
|
|
17759
18066
|
Snackbar.Feedback,
|
|
17760
18067
|
{
|
|
17761
18068
|
variant: snackbar.type,
|
|
@@ -17770,17 +18077,17 @@ var SnackbarProvider = ({ children }) => {
|
|
|
17770
18077
|
] });
|
|
17771
18078
|
};
|
|
17772
18079
|
var useSnackbar = () => {
|
|
17773
|
-
const context = (0,
|
|
18080
|
+
const context = (0, import_react73.useContext)(SnackbarContext);
|
|
17774
18081
|
if (!context) throw new Error("useSnackbar must be used within SnackbarProvider");
|
|
17775
18082
|
return context;
|
|
17776
18083
|
};
|
|
17777
18084
|
|
|
17778
18085
|
// ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
17779
|
-
var
|
|
18086
|
+
var import_react74 = __toESM(require("react"), 1);
|
|
17780
18087
|
|
|
17781
18088
|
// ../../node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
17782
18089
|
var React31 = __toESM(require("react"), 1);
|
|
17783
|
-
var
|
|
18090
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
17784
18091
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
17785
18092
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
17786
18093
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
@@ -17800,7 +18107,7 @@ var Collapsible = React31.forwardRef(
|
|
|
17800
18107
|
onChange: onOpenChange,
|
|
17801
18108
|
caller: COLLAPSIBLE_NAME
|
|
17802
18109
|
});
|
|
17803
|
-
return /* @__PURE__ */ (0,
|
|
18110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
17804
18111
|
CollapsibleProvider,
|
|
17805
18112
|
{
|
|
17806
18113
|
scope: __scopeCollapsible,
|
|
@@ -17808,7 +18115,7 @@ var Collapsible = React31.forwardRef(
|
|
|
17808
18115
|
contentId: useId6(),
|
|
17809
18116
|
open,
|
|
17810
18117
|
onOpenToggle: React31.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
17811
|
-
children: /* @__PURE__ */ (0,
|
|
18118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
17812
18119
|
Primitive.div,
|
|
17813
18120
|
{
|
|
17814
18121
|
"data-state": getState2(open),
|
|
@@ -17827,7 +18134,7 @@ var CollapsibleTrigger = React31.forwardRef(
|
|
|
17827
18134
|
(props, forwardedRef) => {
|
|
17828
18135
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
17829
18136
|
const context = useCollapsibleContext(TRIGGER_NAME3, __scopeCollapsible);
|
|
17830
|
-
return /* @__PURE__ */ (0,
|
|
18137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
17831
18138
|
Primitive.button,
|
|
17832
18139
|
{
|
|
17833
18140
|
type: "button",
|
|
@@ -17849,7 +18156,7 @@ var CollapsibleContent = React31.forwardRef(
|
|
|
17849
18156
|
(props, forwardedRef) => {
|
|
17850
18157
|
const { forceMount, ...contentProps } = props;
|
|
17851
18158
|
const context = useCollapsibleContext(CONTENT_NAME3, props.__scopeCollapsible);
|
|
17852
|
-
return /* @__PURE__ */ (0,
|
|
18159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
17853
18160
|
}
|
|
17854
18161
|
);
|
|
17855
18162
|
CollapsibleContent.displayName = CONTENT_NAME3;
|
|
@@ -17889,7 +18196,7 @@ var CollapsibleContentImpl = React31.forwardRef((props, forwardedRef) => {
|
|
|
17889
18196
|
setIsPresent(present);
|
|
17890
18197
|
}
|
|
17891
18198
|
}, [context.open, present]);
|
|
17892
|
-
return /* @__PURE__ */ (0,
|
|
18199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
17893
18200
|
Primitive.div,
|
|
17894
18201
|
{
|
|
17895
18202
|
"data-state": getState2(context.open),
|
|
@@ -17915,7 +18222,7 @@ var Trigger2 = CollapsibleTrigger;
|
|
|
17915
18222
|
var Content3 = CollapsibleContent;
|
|
17916
18223
|
|
|
17917
18224
|
// ../../node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
17918
|
-
var
|
|
18225
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
17919
18226
|
var ACCORDION_NAME = "Accordion";
|
|
17920
18227
|
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
|
17921
18228
|
var [Collection2, useCollection2, createCollectionScope2] = createCollection(ACCORDION_NAME);
|
|
@@ -17924,12 +18231,12 @@ var [createAccordionContext, createAccordionScope] = createContextScope(ACCORDIO
|
|
|
17924
18231
|
createCollapsibleScope
|
|
17925
18232
|
]);
|
|
17926
18233
|
var useCollapsibleScope = createCollapsibleScope();
|
|
17927
|
-
var Accordion =
|
|
18234
|
+
var Accordion = import_react74.default.forwardRef(
|
|
17928
18235
|
(props, forwardedRef) => {
|
|
17929
18236
|
const { type, ...accordionProps } = props;
|
|
17930
18237
|
const singleProps = accordionProps;
|
|
17931
18238
|
const multipleProps = accordionProps;
|
|
17932
|
-
return /* @__PURE__ */ (0,
|
|
18239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Collection2.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
|
17933
18240
|
}
|
|
17934
18241
|
);
|
|
17935
18242
|
Accordion.displayName = ACCORDION_NAME;
|
|
@@ -17938,7 +18245,7 @@ var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccor
|
|
|
17938
18245
|
ACCORDION_NAME,
|
|
17939
18246
|
{ collapsible: false }
|
|
17940
18247
|
);
|
|
17941
|
-
var AccordionImplSingle =
|
|
18248
|
+
var AccordionImplSingle = import_react74.default.forwardRef(
|
|
17942
18249
|
(props, forwardedRef) => {
|
|
17943
18250
|
const {
|
|
17944
18251
|
value: valueProp,
|
|
@@ -17954,19 +18261,19 @@ var AccordionImplSingle = import_react71.default.forwardRef(
|
|
|
17954
18261
|
onChange: onValueChange,
|
|
17955
18262
|
caller: ACCORDION_NAME
|
|
17956
18263
|
});
|
|
17957
|
-
return /* @__PURE__ */ (0,
|
|
18264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
17958
18265
|
AccordionValueProvider,
|
|
17959
18266
|
{
|
|
17960
18267
|
scope: props.__scopeAccordion,
|
|
17961
|
-
value:
|
|
18268
|
+
value: import_react74.default.useMemo(() => value ? [value] : [], [value]),
|
|
17962
18269
|
onItemOpen: setValue,
|
|
17963
|
-
onItemClose:
|
|
17964
|
-
children: /* @__PURE__ */ (0,
|
|
18270
|
+
onItemClose: import_react74.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
|
18271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
17965
18272
|
}
|
|
17966
18273
|
);
|
|
17967
18274
|
}
|
|
17968
18275
|
);
|
|
17969
|
-
var AccordionImplMultiple =
|
|
18276
|
+
var AccordionImplMultiple = import_react74.default.forwardRef((props, forwardedRef) => {
|
|
17970
18277
|
const {
|
|
17971
18278
|
value: valueProp,
|
|
17972
18279
|
defaultValue,
|
|
@@ -17980,30 +18287,30 @@ var AccordionImplMultiple = import_react71.default.forwardRef((props, forwardedR
|
|
|
17980
18287
|
onChange: onValueChange,
|
|
17981
18288
|
caller: ACCORDION_NAME
|
|
17982
18289
|
});
|
|
17983
|
-
const handleItemOpen =
|
|
18290
|
+
const handleItemOpen = import_react74.default.useCallback(
|
|
17984
18291
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
17985
18292
|
[setValue]
|
|
17986
18293
|
);
|
|
17987
|
-
const handleItemClose =
|
|
18294
|
+
const handleItemClose = import_react74.default.useCallback(
|
|
17988
18295
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
17989
18296
|
[setValue]
|
|
17990
18297
|
);
|
|
17991
|
-
return /* @__PURE__ */ (0,
|
|
18298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
17992
18299
|
AccordionValueProvider,
|
|
17993
18300
|
{
|
|
17994
18301
|
scope: props.__scopeAccordion,
|
|
17995
18302
|
value,
|
|
17996
18303
|
onItemOpen: handleItemOpen,
|
|
17997
18304
|
onItemClose: handleItemClose,
|
|
17998
|
-
children: /* @__PURE__ */ (0,
|
|
18305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
17999
18306
|
}
|
|
18000
18307
|
);
|
|
18001
18308
|
});
|
|
18002
18309
|
var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
|
18003
|
-
var AccordionImpl =
|
|
18310
|
+
var AccordionImpl = import_react74.default.forwardRef(
|
|
18004
18311
|
(props, forwardedRef) => {
|
|
18005
18312
|
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
|
18006
|
-
const accordionRef =
|
|
18313
|
+
const accordionRef = import_react74.default.useRef(null);
|
|
18007
18314
|
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
|
18008
18315
|
const getItems = useCollection2(__scopeAccordion);
|
|
18009
18316
|
const direction = useDirection(dir);
|
|
@@ -18070,14 +18377,14 @@ var AccordionImpl = import_react71.default.forwardRef(
|
|
|
18070
18377
|
const clampedIndex = nextIndex % triggerCount;
|
|
18071
18378
|
triggerCollection[clampedIndex].ref.current?.focus();
|
|
18072
18379
|
});
|
|
18073
|
-
return /* @__PURE__ */ (0,
|
|
18380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18074
18381
|
AccordionImplProvider,
|
|
18075
18382
|
{
|
|
18076
18383
|
scope: __scopeAccordion,
|
|
18077
18384
|
disabled,
|
|
18078
18385
|
direction: dir,
|
|
18079
18386
|
orientation,
|
|
18080
|
-
children: /* @__PURE__ */ (0,
|
|
18387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Collection2.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18081
18388
|
Primitive.div,
|
|
18082
18389
|
{
|
|
18083
18390
|
...accordionProps,
|
|
@@ -18092,7 +18399,7 @@ var AccordionImpl = import_react71.default.forwardRef(
|
|
|
18092
18399
|
);
|
|
18093
18400
|
var ITEM_NAME2 = "AccordionItem";
|
|
18094
18401
|
var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME2);
|
|
18095
|
-
var AccordionItem =
|
|
18402
|
+
var AccordionItem = import_react74.default.forwardRef(
|
|
18096
18403
|
(props, forwardedRef) => {
|
|
18097
18404
|
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
|
18098
18405
|
const accordionContext = useAccordionContext(ITEM_NAME2, __scopeAccordion);
|
|
@@ -18101,14 +18408,14 @@ var AccordionItem = import_react71.default.forwardRef(
|
|
|
18101
18408
|
const triggerId = useId6();
|
|
18102
18409
|
const open = value && valueContext.value.includes(value) || false;
|
|
18103
18410
|
const disabled = accordionContext.disabled || props.disabled;
|
|
18104
|
-
return /* @__PURE__ */ (0,
|
|
18411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18105
18412
|
AccordionItemProvider,
|
|
18106
18413
|
{
|
|
18107
18414
|
scope: __scopeAccordion,
|
|
18108
18415
|
open,
|
|
18109
18416
|
disabled,
|
|
18110
18417
|
triggerId,
|
|
18111
|
-
children: /* @__PURE__ */ (0,
|
|
18418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18112
18419
|
Root4,
|
|
18113
18420
|
{
|
|
18114
18421
|
"data-orientation": accordionContext.orientation,
|
|
@@ -18133,12 +18440,12 @@ var AccordionItem = import_react71.default.forwardRef(
|
|
|
18133
18440
|
);
|
|
18134
18441
|
AccordionItem.displayName = ITEM_NAME2;
|
|
18135
18442
|
var HEADER_NAME = "AccordionHeader";
|
|
18136
|
-
var AccordionHeader =
|
|
18443
|
+
var AccordionHeader = import_react74.default.forwardRef(
|
|
18137
18444
|
(props, forwardedRef) => {
|
|
18138
18445
|
const { __scopeAccordion, ...headerProps } = props;
|
|
18139
18446
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
18140
18447
|
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
18141
|
-
return /* @__PURE__ */ (0,
|
|
18448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18142
18449
|
Primitive.h3,
|
|
18143
18450
|
{
|
|
18144
18451
|
"data-orientation": accordionContext.orientation,
|
|
@@ -18152,14 +18459,14 @@ var AccordionHeader = import_react71.default.forwardRef(
|
|
|
18152
18459
|
);
|
|
18153
18460
|
AccordionHeader.displayName = HEADER_NAME;
|
|
18154
18461
|
var TRIGGER_NAME4 = "AccordionTrigger";
|
|
18155
|
-
var AccordionTrigger =
|
|
18462
|
+
var AccordionTrigger = import_react74.default.forwardRef(
|
|
18156
18463
|
(props, forwardedRef) => {
|
|
18157
18464
|
const { __scopeAccordion, ...triggerProps } = props;
|
|
18158
18465
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
18159
18466
|
const itemContext = useAccordionItemContext(TRIGGER_NAME4, __scopeAccordion);
|
|
18160
18467
|
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME4, __scopeAccordion);
|
|
18161
18468
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
18162
|
-
return /* @__PURE__ */ (0,
|
|
18469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(Collection2.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18163
18470
|
Trigger2,
|
|
18164
18471
|
{
|
|
18165
18472
|
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
@@ -18174,13 +18481,13 @@ var AccordionTrigger = import_react71.default.forwardRef(
|
|
|
18174
18481
|
);
|
|
18175
18482
|
AccordionTrigger.displayName = TRIGGER_NAME4;
|
|
18176
18483
|
var CONTENT_NAME4 = "AccordionContent";
|
|
18177
|
-
var AccordionContent =
|
|
18484
|
+
var AccordionContent = import_react74.default.forwardRef(
|
|
18178
18485
|
(props, forwardedRef) => {
|
|
18179
18486
|
const { __scopeAccordion, ...contentProps } = props;
|
|
18180
18487
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
18181
18488
|
const itemContext = useAccordionItemContext(CONTENT_NAME4, __scopeAccordion);
|
|
18182
18489
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
18183
|
-
return /* @__PURE__ */ (0,
|
|
18490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
18184
18491
|
Content3,
|
|
18185
18492
|
{
|
|
18186
18493
|
role: "region",
|
|
@@ -18209,15 +18516,15 @@ var Trigger22 = AccordionTrigger;
|
|
|
18209
18516
|
var Content22 = AccordionContent;
|
|
18210
18517
|
|
|
18211
18518
|
// src/components/Accordion/Accordion.tsx
|
|
18212
|
-
var
|
|
18519
|
+
var import_react77 = require("react");
|
|
18213
18520
|
|
|
18214
18521
|
// src/components/Accordion/accordion.styles.ts
|
|
18215
|
-
var
|
|
18216
|
-
var
|
|
18522
|
+
var import_react75 = require("@emotion/react");
|
|
18523
|
+
var import_styled41 = __toESM(require("@emotion/styled"), 1);
|
|
18217
18524
|
var accordionSizeMap = {
|
|
18218
|
-
lg: { iconSize: "sm", labelSize: "lg" },
|
|
18219
|
-
md: { iconSize: "xs", labelSize: "md" },
|
|
18220
|
-
sm: { iconSize: "xs", labelSize: "sm" }
|
|
18525
|
+
lg: { iconSize: "sm", labelSize: "lg", contentTextStyle: "semantic-textStyle-body-lg-normal" },
|
|
18526
|
+
md: { iconSize: "xs", labelSize: "md", contentTextStyle: "semantic-textStyle-body-md-normal" },
|
|
18527
|
+
sm: { iconSize: "xs", labelSize: "sm", contentTextStyle: "semantic-textStyle-body-xs-normal" }
|
|
18221
18528
|
};
|
|
18222
18529
|
var createInteractionStyles4 = (theme, isReadonly) => {
|
|
18223
18530
|
const borderRadius = 4;
|
|
@@ -18240,13 +18547,13 @@ var createInteractionStyles4 = (theme, isReadonly) => {
|
|
|
18240
18547
|
focusStyle: makeLayer("focus")
|
|
18241
18548
|
};
|
|
18242
18549
|
};
|
|
18243
|
-
var StyledAccordionRoot = (0,
|
|
18550
|
+
var StyledAccordionRoot = (0, import_styled41.default)("div")(({ theme }) => ({
|
|
18244
18551
|
display: "flex",
|
|
18245
18552
|
flexDirection: "column",
|
|
18246
18553
|
gap: theme.scheme.semantic.spacing[24],
|
|
18247
18554
|
width: "100%"
|
|
18248
18555
|
}));
|
|
18249
|
-
var StyledAccordionTrigger = (0,
|
|
18556
|
+
var StyledAccordionTrigger = (0, import_styled41.default)(
|
|
18250
18557
|
Trigger22
|
|
18251
18558
|
)(({ theme, $isStretched }) => {
|
|
18252
18559
|
const interactionStyles7 = createInteractionStyles4(theme, false);
|
|
@@ -18274,22 +18581,9 @@ var StyledAccordionTrigger = (0, import_styled40.default)(
|
|
|
18274
18581
|
...interactionStyles7.focusStyle
|
|
18275
18582
|
},
|
|
18276
18583
|
"&[data-disabled]": {
|
|
18584
|
+
pointerEvents: "none",
|
|
18277
18585
|
color: theme.color.semantic.object.subtle,
|
|
18278
18586
|
...disabledInteractionStyles.restStyle,
|
|
18279
|
-
"&:hover": {
|
|
18280
|
-
...disabledInteractionStyles.hoverStyle,
|
|
18281
|
-
"::after": {
|
|
18282
|
-
...interactionStyles7.hoverStyle["::after"],
|
|
18283
|
-
transition: `opacity ${theme.environment.semantic.duration[100]} ${theme.environment.semantic.motion.fluent}`
|
|
18284
|
-
}
|
|
18285
|
-
},
|
|
18286
|
-
"&:active": {
|
|
18287
|
-
...disabledInteractionStyles.activeStyle,
|
|
18288
|
-
"::after": {
|
|
18289
|
-
...disabledInteractionStyles.activeStyle["::after"],
|
|
18290
|
-
transition: "none"
|
|
18291
|
-
}
|
|
18292
|
-
},
|
|
18293
18587
|
"&:focus-visible": {
|
|
18294
18588
|
...disabledInteractionStyles.focusStyle
|
|
18295
18589
|
}
|
|
@@ -18299,36 +18593,35 @@ var StyledAccordionTrigger = (0, import_styled40.default)(
|
|
|
18299
18593
|
}
|
|
18300
18594
|
};
|
|
18301
18595
|
});
|
|
18302
|
-
var StyledAccordionLabelContainer = (0,
|
|
18596
|
+
var StyledAccordionLabelContainer = (0, import_styled41.default)("div")(({ theme }) => ({
|
|
18303
18597
|
display: "flex",
|
|
18304
18598
|
justifyContent: "flex-start",
|
|
18305
18599
|
alignItems: "center",
|
|
18306
18600
|
gap: theme.scheme.semantic.spacing[8],
|
|
18307
18601
|
flex: 1
|
|
18308
18602
|
}));
|
|
18309
|
-
var StyledAccordionChevron = (0,
|
|
18603
|
+
var StyledAccordionChevron = (0, import_styled41.default)("div")(({ theme }) => ({
|
|
18310
18604
|
display: "flex",
|
|
18311
18605
|
alignItems: "center",
|
|
18312
18606
|
transition: `transform ${theme.environment.semantic.duration[300]} ${theme.environment.semantic.motion.fluent}`
|
|
18313
18607
|
}));
|
|
18314
|
-
var StyleLabel = (0,
|
|
18608
|
+
var StyleLabel = (0, import_styled41.default)(Label)(() => ({
|
|
18315
18609
|
color: "inherit",
|
|
18316
18610
|
textAlign: "left",
|
|
18317
18611
|
textWrap: "wrap",
|
|
18318
18612
|
cursor: "pointer"
|
|
18319
18613
|
}));
|
|
18320
|
-
var slideUp =
|
|
18614
|
+
var slideUp = import_react75.keyframes`
|
|
18321
18615
|
from { height: var(--radix-accordion-content-height); }
|
|
18322
18616
|
to { height: 0; }
|
|
18323
18617
|
`;
|
|
18324
|
-
var slideDown =
|
|
18618
|
+
var slideDown = import_react75.keyframes`
|
|
18325
18619
|
from { height: 0; }
|
|
18326
18620
|
to { height: var(--radix-accordion-content-height); }
|
|
18327
18621
|
`;
|
|
18328
|
-
var StyledAccordionContent = (0,
|
|
18622
|
+
var StyledAccordionContent = (0, import_styled41.default)(Content22)(({ theme, $size }) => {
|
|
18329
18623
|
return {
|
|
18330
18624
|
overflow: "hidden",
|
|
18331
|
-
...theme.textStyle["semantic-textStyle-body-sm-normal"],
|
|
18332
18625
|
color: theme.color.semantic.object.bold,
|
|
18333
18626
|
willChange: "height",
|
|
18334
18627
|
"&[data-disabled]": {
|
|
@@ -18339,21 +18632,20 @@ var StyledAccordionContent = (0, import_styled40.default)(Content22)(({ theme })
|
|
|
18339
18632
|
},
|
|
18340
18633
|
'&[data-state="closed"]': {
|
|
18341
18634
|
animation: `${slideUp} ${theme.environment.semantic.duration[300]} ${theme.environment.semantic.motion.fluent}`
|
|
18342
|
-
}
|
|
18635
|
+
},
|
|
18636
|
+
...theme.textStyle[accordionSizeMap[$size].contentTextStyle]
|
|
18343
18637
|
};
|
|
18344
18638
|
});
|
|
18345
|
-
var StyledAccordionContentText = (0,
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
})
|
|
18350
|
-
);
|
|
18639
|
+
var StyledAccordionContentText = (0, import_styled41.default)("div")(({ theme, $isStretched }) => ({
|
|
18640
|
+
marginTop: theme.scheme.semantic.spacing[12],
|
|
18641
|
+
padding: $isStretched ? 0 : `0 ${theme.scheme.semantic.spacing[16]}`
|
|
18642
|
+
}));
|
|
18351
18643
|
|
|
18352
18644
|
// src/components/Accordion/accordionContext.ts
|
|
18353
|
-
var
|
|
18354
|
-
var AccordionContext = (0,
|
|
18645
|
+
var import_react76 = require("react");
|
|
18646
|
+
var AccordionContext = (0, import_react76.createContext)(void 0);
|
|
18355
18647
|
var useAccordionContext2 = () => {
|
|
18356
|
-
const context = (0,
|
|
18648
|
+
const context = (0, import_react76.useContext)(AccordionContext);
|
|
18357
18649
|
if (!context) {
|
|
18358
18650
|
throw new Error("Accordion \uCEF4\uD3EC\uB10C\uD2B8\uB294 Accordion.Root \uB0B4\uBD80\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4");
|
|
18359
18651
|
}
|
|
@@ -18361,36 +18653,36 @@ var useAccordionContext2 = () => {
|
|
|
18361
18653
|
};
|
|
18362
18654
|
|
|
18363
18655
|
// src/components/Accordion/Accordion.tsx
|
|
18364
|
-
var
|
|
18365
|
-
var AccordionRoot = (0,
|
|
18656
|
+
var import_jsx_runtime204 = require("@emotion/react/jsx-runtime");
|
|
18657
|
+
var AccordionRoot = (0, import_react77.forwardRef)(
|
|
18366
18658
|
({ children, isStretched = true, size = "lg", ...props }, ref) => {
|
|
18367
|
-
const contextValue = (0,
|
|
18368
|
-
return /* @__PURE__ */ (0,
|
|
18659
|
+
const contextValue = (0, import_react77.useMemo)(() => ({ isStretched, size }), [isStretched, size]);
|
|
18660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Root22, { ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(StyledAccordionRoot, { children }) }) });
|
|
18369
18661
|
}
|
|
18370
18662
|
);
|
|
18371
18663
|
AccordionRoot.displayName = "Accordion.Root";
|
|
18372
|
-
var AccordionItem2 = (0,
|
|
18373
|
-
({ children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
18664
|
+
var AccordionItem2 = (0, import_react77.forwardRef)(
|
|
18665
|
+
({ children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Item2, { ...props, ref, children })
|
|
18374
18666
|
);
|
|
18375
18667
|
AccordionItem2.displayName = "Accordion.Item";
|
|
18376
|
-
var AccordionTrigger2 = (0,
|
|
18668
|
+
var AccordionTrigger2 = (0, import_react77.forwardRef)(
|
|
18377
18669
|
({ children, withPrefixIcon, ...props }, ref) => {
|
|
18378
18670
|
const { isStretched, size } = useAccordionContext2();
|
|
18379
18671
|
const { iconSize, labelSize } = accordionSizeMap[size];
|
|
18380
|
-
return /* @__PURE__ */ (0,
|
|
18381
|
-
/* @__PURE__ */ (0,
|
|
18382
|
-
withPrefixIcon && /* @__PURE__ */ (0,
|
|
18383
|
-
/* @__PURE__ */ (0,
|
|
18672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Header, { children: /* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(StyledAccordionTrigger, { ...props, ref, $isStretched: isStretched, children: [
|
|
18673
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsxs)(StyledAccordionLabelContainer, { children: [
|
|
18674
|
+
withPrefixIcon && /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Icon, { size: iconSize, name: withPrefixIcon, "aria-hidden": true }),
|
|
18675
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(StyleLabel, { as: "span", size: labelSize, textAlign: "left", weight: "normal", children })
|
|
18384
18676
|
] }),
|
|
18385
|
-
/* @__PURE__ */ (0,
|
|
18677
|
+
/* @__PURE__ */ (0, import_jsx_runtime204.jsx)(StyledAccordionChevron, { className: "arrowIcon", children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(Icon, { size: iconSize, name: "arrow-down-s-line", "aria-hidden": true }) })
|
|
18386
18678
|
] }) });
|
|
18387
18679
|
}
|
|
18388
18680
|
);
|
|
18389
18681
|
AccordionTrigger2.displayName = "Accordion.Trigger";
|
|
18390
|
-
var AccordionContent2 = (0,
|
|
18682
|
+
var AccordionContent2 = (0, import_react77.forwardRef)(
|
|
18391
18683
|
({ children, ...props }, ref) => {
|
|
18392
|
-
const { isStretched } = useAccordionContext2();
|
|
18393
|
-
return /* @__PURE__ */ (0,
|
|
18684
|
+
const { isStretched, size } = useAccordionContext2();
|
|
18685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(StyledAccordionContent, { ...props, ref, $size: size, children: /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(StyledAccordionContentText, { $isStretched: isStretched, children }) });
|
|
18394
18686
|
}
|
|
18395
18687
|
);
|
|
18396
18688
|
AccordionContent2.displayName = "Accordion.Content";
|