design-zystem 1.0.342 → 1.0.344
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +196 -195
- package/dist/index.mjs +186 -185
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -1
- package/dist/ui/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -817,8 +817,142 @@ var Divider = (_a) => {
|
|
|
817
817
|
);
|
|
818
818
|
};
|
|
819
819
|
|
|
820
|
-
// src/ui-legacy/Components/
|
|
820
|
+
// src/ui-legacy/Components/Tooltip/Tooltip.tsx
|
|
821
|
+
var import_react3 = require("react");
|
|
822
|
+
var import_styled_components8 = __toESM(require("styled-components"));
|
|
821
823
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
824
|
+
var StyledTooltipWrapper = import_styled_components8.default.div`
|
|
825
|
+
position: relative;
|
|
826
|
+
display: ${(props) => props.$fullWidth ? "block" : "inline-block"};
|
|
827
|
+
width: ${(props) => props.$fullWidth ? "100%" : "auto"};
|
|
828
|
+
cursor: pointer;
|
|
829
|
+
`;
|
|
830
|
+
var StyledTooltipContent = import_styled_components8.default.div`
|
|
831
|
+
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
832
|
+
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
833
|
+
color: ${colors.white};
|
|
834
|
+
text-align: center;
|
|
835
|
+
padding: 8px;
|
|
836
|
+
border-radius: 4px;
|
|
837
|
+
position: absolute;
|
|
838
|
+
width: ${(props) => props.$width || "200px"};
|
|
839
|
+
height: ${(props) => props.$height || "auto"};
|
|
840
|
+
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
841
|
+
transition: opacity 0.3s;
|
|
842
|
+
z-index: 1;
|
|
843
|
+
display: flex;
|
|
844
|
+
flex-direction: column;
|
|
845
|
+
align-items: center;
|
|
846
|
+
gap: 4px;
|
|
847
|
+
|
|
848
|
+
${(props) => {
|
|
849
|
+
switch (props.$direction) {
|
|
850
|
+
case "top":
|
|
851
|
+
return `
|
|
852
|
+
bottom: 125%;
|
|
853
|
+
left: 50%;
|
|
854
|
+
transform: translateX(-50%);
|
|
855
|
+
&::after {
|
|
856
|
+
content: "";
|
|
857
|
+
position: absolute;
|
|
858
|
+
top: 100%;
|
|
859
|
+
left: 50%;
|
|
860
|
+
transform: translateX(-50%);
|
|
861
|
+
border-width: 5px;
|
|
862
|
+
border-style: solid;
|
|
863
|
+
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
864
|
+
}
|
|
865
|
+
`;
|
|
866
|
+
case "bottom":
|
|
867
|
+
return `
|
|
868
|
+
top: 125%;
|
|
869
|
+
left: 50%;
|
|
870
|
+
transform: translateX(-50%);
|
|
871
|
+
&::after {
|
|
872
|
+
content: "";
|
|
873
|
+
position: absolute;
|
|
874
|
+
bottom: 100%;
|
|
875
|
+
left: 50%;
|
|
876
|
+
transform: translateX(-50%);
|
|
877
|
+
border-width: 5px;
|
|
878
|
+
border-style: solid;
|
|
879
|
+
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
880
|
+
}
|
|
881
|
+
`;
|
|
882
|
+
case "left":
|
|
883
|
+
return `
|
|
884
|
+
top: 50%;
|
|
885
|
+
right: 125%;
|
|
886
|
+
transform: translateY(-50%);
|
|
887
|
+
&::after {
|
|
888
|
+
content: "";
|
|
889
|
+
position: absolute;
|
|
890
|
+
top: 50%;
|
|
891
|
+
left: 100%;
|
|
892
|
+
transform: translateY(-50%);
|
|
893
|
+
border-width: 5px;
|
|
894
|
+
border-style: solid;
|
|
895
|
+
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
896
|
+
}
|
|
897
|
+
`;
|
|
898
|
+
case "right":
|
|
899
|
+
default:
|
|
900
|
+
return `
|
|
901
|
+
top: 50%;
|
|
902
|
+
left: 125%;
|
|
903
|
+
transform: translateY(-50%);
|
|
904
|
+
&::after {
|
|
905
|
+
content: "";
|
|
906
|
+
position: absolute;
|
|
907
|
+
top: 50%;
|
|
908
|
+
right: 100%;
|
|
909
|
+
transform: translateY(-50%);
|
|
910
|
+
border-width: 5px;
|
|
911
|
+
border-style: solid;
|
|
912
|
+
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
913
|
+
}
|
|
914
|
+
`;
|
|
915
|
+
}
|
|
916
|
+
}}
|
|
917
|
+
`;
|
|
918
|
+
var Tooltip = ({
|
|
919
|
+
backgroundColor,
|
|
920
|
+
data = [],
|
|
921
|
+
width,
|
|
922
|
+
height,
|
|
923
|
+
direction = "top",
|
|
924
|
+
fullWidth = false,
|
|
925
|
+
children
|
|
926
|
+
}) => {
|
|
927
|
+
const [isVisible, setIsVisible] = (0, import_react3.useState)(false);
|
|
928
|
+
const handleMouseEnter = () => setIsVisible(true);
|
|
929
|
+
const handleMouseLeave = () => setIsVisible(false);
|
|
930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
931
|
+
StyledTooltipWrapper,
|
|
932
|
+
{
|
|
933
|
+
$fullWidth: fullWidth,
|
|
934
|
+
onMouseEnter: handleMouseEnter,
|
|
935
|
+
onMouseLeave: handleMouseLeave,
|
|
936
|
+
children: [
|
|
937
|
+
children,
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
939
|
+
StyledTooltipContent,
|
|
940
|
+
{
|
|
941
|
+
$isVisible: isVisible,
|
|
942
|
+
$backgroundColor: backgroundColor,
|
|
943
|
+
$width: width,
|
|
944
|
+
$height: height,
|
|
945
|
+
$direction: direction,
|
|
946
|
+
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
]
|
|
950
|
+
}
|
|
951
|
+
);
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
// src/ui-legacy/Components/Bulk/Bulk.tsx
|
|
955
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
822
956
|
var Bulk = ({
|
|
823
957
|
onClose,
|
|
824
958
|
leftTitle,
|
|
@@ -830,7 +964,7 @@ var Bulk = ({
|
|
|
830
964
|
const mainColor = colors[variant] || colors.blue_700;
|
|
831
965
|
const textColorStyle = colors[textColor] || colors.white;
|
|
832
966
|
const hoverColorStyle = colors[hoverColor] || colors.blue_900;
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
834
968
|
Box,
|
|
835
969
|
{
|
|
836
970
|
background: mainColor,
|
|
@@ -842,11 +976,11 @@ var Bulk = ({
|
|
|
842
976
|
zIndex: 500,
|
|
843
977
|
borderRadius: "12px"
|
|
844
978
|
},
|
|
845
|
-
children: /* @__PURE__ */ (0,
|
|
846
|
-
leftTitle && /* @__PURE__ */ (0,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
848
|
-
/* @__PURE__ */ (0,
|
|
849
|
-
/* @__PURE__ */ (0,
|
|
979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Row, { alignItems: "center", children: [
|
|
980
|
+
leftTitle && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Row, { gap: 24, alignItems: "center", children: [
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "xmark", color: "white", size: "l", onClick: onClose }),
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { color: textColorStyle, weight: "bold", size: "s", wrap: "nowrap", children: leftTitle }),
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
850
984
|
Divider,
|
|
851
985
|
{
|
|
852
986
|
orientation: "vertical",
|
|
@@ -856,9 +990,9 @@ var Bulk = ({
|
|
|
856
990
|
}
|
|
857
991
|
)
|
|
858
992
|
] }),
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
993
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Row, { alignItems: "center", children: sections.map((section, idx) => {
|
|
860
994
|
const isLast = idx === sections.length - 1;
|
|
861
|
-
|
|
995
|
+
const sectionButton = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
862
996
|
Row,
|
|
863
997
|
{
|
|
864
998
|
gap: 6,
|
|
@@ -883,7 +1017,7 @@ var Bulk = ({
|
|
|
883
1017
|
e.currentTarget.style.background = mainColor;
|
|
884
1018
|
},
|
|
885
1019
|
children: [
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
1020
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
887
1021
|
Icon,
|
|
888
1022
|
{
|
|
889
1023
|
name: section.icon,
|
|
@@ -892,7 +1026,7 @@ var Bulk = ({
|
|
|
892
1026
|
family: "regular"
|
|
893
1027
|
}
|
|
894
1028
|
),
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
896
1030
|
Text,
|
|
897
1031
|
{
|
|
898
1032
|
color: textColorStyle,
|
|
@@ -906,6 +1040,7 @@ var Bulk = ({
|
|
|
906
1040
|
},
|
|
907
1041
|
section.title
|
|
908
1042
|
);
|
|
1043
|
+
return section.disabled && section.disabledTooltip ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Tooltip, { data: [section.disabledTooltip], children: sectionButton }, section.title) : sectionButton;
|
|
909
1044
|
}) })
|
|
910
1045
|
] })
|
|
911
1046
|
}
|
|
@@ -913,22 +1048,22 @@ var Bulk = ({
|
|
|
913
1048
|
};
|
|
914
1049
|
|
|
915
1050
|
// src/ui-legacy/Components/Collapse/Collapse.tsx
|
|
916
|
-
var
|
|
917
|
-
var
|
|
918
|
-
var
|
|
919
|
-
var Wrapper =
|
|
1051
|
+
var import_react4 = require("react");
|
|
1052
|
+
var import_styled_components9 = __toESM(require("styled-components"));
|
|
1053
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1054
|
+
var Wrapper = import_styled_components9.default.div`
|
|
920
1055
|
overflow: hidden;
|
|
921
1056
|
transition: height 0.25s ease;
|
|
922
1057
|
height: ${(p) => p.$height}px;
|
|
923
1058
|
`;
|
|
924
|
-
var Inner =
|
|
1059
|
+
var Inner = import_styled_components9.default.div`
|
|
925
1060
|
max-height: ${(p) => p.$maxHeight ? `${p.$maxHeight}px` : "none"};
|
|
926
1061
|
overflow-y: ${(p) => p.$maxHeight ? "auto" : "visible"};
|
|
927
1062
|
`;
|
|
928
1063
|
var Collapse = ({ open, children, maxHeight }) => {
|
|
929
|
-
const innerRef = (0,
|
|
930
|
-
const [height, setHeight] = (0,
|
|
931
|
-
const recalc = (0,
|
|
1064
|
+
const innerRef = (0, import_react4.useRef)(null);
|
|
1065
|
+
const [height, setHeight] = (0, import_react4.useState)(0);
|
|
1066
|
+
const recalc = (0, import_react4.useCallback)(() => {
|
|
932
1067
|
if (open && innerRef.current) {
|
|
933
1068
|
const full = innerRef.current.scrollHeight;
|
|
934
1069
|
setHeight(maxHeight ? Math.min(full, maxHeight) : full);
|
|
@@ -936,20 +1071,20 @@ var Collapse = ({ open, children, maxHeight }) => {
|
|
|
936
1071
|
setHeight(0);
|
|
937
1072
|
}
|
|
938
1073
|
}, [open, maxHeight]);
|
|
939
|
-
(0,
|
|
940
|
-
(0,
|
|
1074
|
+
(0, import_react4.useEffect)(recalc, [recalc]);
|
|
1075
|
+
(0, import_react4.useEffect)(() => {
|
|
941
1076
|
if (!open || !innerRef.current) return;
|
|
942
1077
|
const observer = new ResizeObserver(recalc);
|
|
943
1078
|
observer.observe(innerRef.current);
|
|
944
1079
|
return () => observer.disconnect();
|
|
945
1080
|
}, [open, recalc]);
|
|
946
|
-
return /* @__PURE__ */ (0,
|
|
1081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Wrapper, { $height: height, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Inner, { ref: innerRef, $maxHeight: maxHeight, children }) });
|
|
947
1082
|
};
|
|
948
1083
|
|
|
949
1084
|
// src/ui-legacy/Components/Button/Button.tsx
|
|
950
|
-
var
|
|
951
|
-
var
|
|
952
|
-
var
|
|
1085
|
+
var import_react5 = require("react");
|
|
1086
|
+
var import_styled_components10 = __toESM(require("styled-components"));
|
|
1087
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
953
1088
|
var defaultSizes = {
|
|
954
1089
|
xs: { height: 32, paddingX: 16, textSize: "xs" },
|
|
955
1090
|
s: { height: 36, paddingX: 16, textSize: "s" },
|
|
@@ -978,7 +1113,7 @@ var shouldForwardProp4 = (p) => ![
|
|
|
978
1113
|
"iconOnlySize",
|
|
979
1114
|
"noHover"
|
|
980
1115
|
].includes(p);
|
|
981
|
-
var StyledButton =
|
|
1116
|
+
var StyledButton = import_styled_components10.default.button.withConfig({
|
|
982
1117
|
shouldForwardProp: shouldForwardProp4
|
|
983
1118
|
})`
|
|
984
1119
|
position: relative;
|
|
@@ -1070,7 +1205,7 @@ var StyledButton = import_styled_components9.default.button.withConfig({
|
|
|
1070
1205
|
border-radius: 6px;
|
|
1071
1206
|
`}
|
|
1072
1207
|
`;
|
|
1073
|
-
var Loader =
|
|
1208
|
+
var Loader = import_styled_components10.default.span`
|
|
1074
1209
|
border: 3px solid transparent;
|
|
1075
1210
|
border-top: 3px solid currentColor;
|
|
1076
1211
|
border-radius: 50%;
|
|
@@ -1121,9 +1256,9 @@ var Button = (_a) => {
|
|
|
1121
1256
|
"noHover",
|
|
1122
1257
|
"iconOnlySize"
|
|
1123
1258
|
]);
|
|
1124
|
-
const ref = (0,
|
|
1259
|
+
const ref = (0, import_react5.useRef)(null);
|
|
1125
1260
|
const sizeConfig = defaultSizes[size];
|
|
1126
|
-
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
1261
|
+
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1127
1262
|
Icon,
|
|
1128
1263
|
{
|
|
1129
1264
|
name: icon,
|
|
@@ -1132,7 +1267,7 @@ var Button = (_a) => {
|
|
|
1132
1267
|
color: iconColor != null ? iconColor : outline ? variant : colors.white
|
|
1133
1268
|
}
|
|
1134
1269
|
) : icon;
|
|
1135
|
-
return /* @__PURE__ */ (0,
|
|
1270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1136
1271
|
StyledButton,
|
|
1137
1272
|
__spreadProps(__spreadValues({
|
|
1138
1273
|
ref,
|
|
@@ -1150,10 +1285,10 @@ var Button = (_a) => {
|
|
|
1150
1285
|
iconOnlySize
|
|
1151
1286
|
}, rest), {
|
|
1152
1287
|
children: [
|
|
1153
|
-
isLoading && /* @__PURE__ */ (0,
|
|
1154
|
-
!isLoading && /* @__PURE__ */ (0,
|
|
1288
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Loader, {}),
|
|
1289
|
+
!isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Row, { gap: "8", fullwidth: true, justifyContent: "center", alignItems: "center", children: [
|
|
1155
1290
|
iconLeft && renderIconSlot(iconLeft),
|
|
1156
|
-
label && /* @__PURE__ */ (0,
|
|
1291
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1157
1292
|
Text,
|
|
1158
1293
|
{
|
|
1159
1294
|
size: sizeConfig.textSize,
|
|
@@ -1171,11 +1306,11 @@ var Button = (_a) => {
|
|
|
1171
1306
|
};
|
|
1172
1307
|
|
|
1173
1308
|
// src/ui-legacy/Components/Modal/Modal.tsx
|
|
1174
|
-
var
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1309
|
+
var import_react6 = require("react");
|
|
1310
|
+
var import_styled_components11 = __toESM(require("styled-components"));
|
|
1311
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1177
1312
|
var shouldForwardProp5 = (prop) => !["width", "height", "minHeight", "padding", "backgroundColor"].includes(prop);
|
|
1178
|
-
var ModalBackdrop =
|
|
1313
|
+
var ModalBackdrop = import_styled_components11.default.div`
|
|
1179
1314
|
position: fixed;
|
|
1180
1315
|
top: 0;
|
|
1181
1316
|
left: 0;
|
|
@@ -1185,7 +1320,7 @@ var ModalBackdrop = import_styled_components10.default.div`
|
|
|
1185
1320
|
backdrop-filter: blur(5px);
|
|
1186
1321
|
z-index: 4;
|
|
1187
1322
|
`;
|
|
1188
|
-
var ModalContainer =
|
|
1323
|
+
var ModalContainer = import_styled_components11.default.div.withConfig({ shouldForwardProp: shouldForwardProp5 })`
|
|
1189
1324
|
position: fixed;
|
|
1190
1325
|
top: 50%;
|
|
1191
1326
|
left: 50%;
|
|
@@ -1208,7 +1343,7 @@ var ModalContainer = import_styled_components10.default.div.withConfig({ shouldF
|
|
|
1208
1343
|
max-height: 90%;
|
|
1209
1344
|
overflow: auto;
|
|
1210
1345
|
`;
|
|
1211
|
-
var ModalHeader =
|
|
1346
|
+
var ModalHeader = import_styled_components11.default.div`
|
|
1212
1347
|
display: flex;
|
|
1213
1348
|
justify-content: space-between;
|
|
1214
1349
|
align-items: center;
|
|
@@ -1216,14 +1351,14 @@ var ModalHeader = import_styled_components10.default.div`
|
|
|
1216
1351
|
border-bottom: 1px solid #ddd;
|
|
1217
1352
|
width: 100%;
|
|
1218
1353
|
`;
|
|
1219
|
-
var ModalCore =
|
|
1354
|
+
var ModalCore = import_styled_components11.default.div`
|
|
1220
1355
|
padding: 20px;
|
|
1221
1356
|
background-color: white;
|
|
1222
1357
|
border-radius: 0 0 10px 10px;
|
|
1223
1358
|
overflow: auto;
|
|
1224
1359
|
height: 100%;
|
|
1225
1360
|
`;
|
|
1226
|
-
var ModalClose =
|
|
1361
|
+
var ModalClose = import_styled_components11.default.span`
|
|
1227
1362
|
font-size: 32px;
|
|
1228
1363
|
color: #fff;
|
|
1229
1364
|
cursor: pointer;
|
|
@@ -1247,7 +1382,7 @@ var Modal = (props) => {
|
|
|
1247
1382
|
const hideModal = () => {
|
|
1248
1383
|
closeModal == null ? void 0 : closeModal();
|
|
1249
1384
|
};
|
|
1250
|
-
(0,
|
|
1385
|
+
(0, import_react6.useEffect)(() => {
|
|
1251
1386
|
if (showModal) {
|
|
1252
1387
|
document.body.classList.add("modal-open");
|
|
1253
1388
|
} else {
|
|
@@ -1257,9 +1392,9 @@ var Modal = (props) => {
|
|
|
1257
1392
|
document.body.classList.remove("modal-open");
|
|
1258
1393
|
};
|
|
1259
1394
|
}, [showModal]);
|
|
1260
|
-
return showModal && /* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1395
|
+
return showModal && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalBackdrop, { onClick: hideModal }),
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1263
1398
|
ModalContainer,
|
|
1264
1399
|
{
|
|
1265
1400
|
width,
|
|
@@ -1268,11 +1403,11 @@ var Modal = (props) => {
|
|
|
1268
1403
|
backgroundColor,
|
|
1269
1404
|
minHeight,
|
|
1270
1405
|
children: [
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1272
|
-
/* @__PURE__ */ (0,
|
|
1273
|
-
/* @__PURE__ */ (0,
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(ModalHeader, { children: [
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text_default, { color: "white", weight: "700", children: title ? title : "DELIVERY CAR" }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalClose, { onClick: hideModal, children: "\xD7" })
|
|
1274
1409
|
] }),
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
1410
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ModalCore, { children })
|
|
1276
1411
|
]
|
|
1277
1412
|
}
|
|
1278
1413
|
)
|
|
@@ -1280,15 +1415,15 @@ var Modal = (props) => {
|
|
|
1280
1415
|
};
|
|
1281
1416
|
|
|
1282
1417
|
// src/ui-legacy/Components/ModalConfirmation/ModalConfirmation.tsx
|
|
1283
|
-
var
|
|
1418
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1284
1419
|
var ModalConfirmation = (props) => {
|
|
1285
1420
|
const { isOpen, onConfirm, onCancel, isLoading, width } = props;
|
|
1286
1421
|
if (!isOpen) return null;
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modal, { showModal: isOpen, closeModal: onCancel, width, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Col, { gap: "16", justifyContent: "center", alignItems: "center", fullWidth: true, children: [
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { align: "center", margin: "1em 0", size: "xl", children: "\xCAtes-vous s\xFBr de vouloir faire cette action ?" }) }),
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Row, { gap: "8", justifyContent: "center", children: [
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { onClick: onCancel, variant: "danger", children: "Annuler" }),
|
|
1426
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { variant: "success", onClick: onConfirm, isLoading, children: "Confirmer" })
|
|
1292
1427
|
] })
|
|
1293
1428
|
] }) });
|
|
1294
1429
|
};
|
|
@@ -1297,8 +1432,8 @@ var ModalConfirmation = (props) => {
|
|
|
1297
1432
|
var import_react7 = require("react");
|
|
1298
1433
|
|
|
1299
1434
|
// src/ui-legacy/Components/Bubble/Bubble.tsx
|
|
1300
|
-
var
|
|
1301
|
-
var
|
|
1435
|
+
var import_styled_components12 = __toESM(require("styled-components"));
|
|
1436
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1302
1437
|
var textSizes3 = {
|
|
1303
1438
|
xxs: ".4em",
|
|
1304
1439
|
xs: ".6em",
|
|
@@ -1318,7 +1453,7 @@ var paddingSizes = {
|
|
|
1318
1453
|
xxl: "10px 20px"
|
|
1319
1454
|
};
|
|
1320
1455
|
var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
|
|
1321
|
-
var pulseAnimation =
|
|
1456
|
+
var pulseAnimation = import_styled_components12.keyframes`
|
|
1322
1457
|
0% {
|
|
1323
1458
|
transform: scale(1);
|
|
1324
1459
|
box-shadow: 0 0 0 0 var(--bubble-pulse-color);
|
|
@@ -1345,7 +1480,7 @@ var shouldForwardProp6 = (prop) => ![
|
|
|
1345
1480
|
"pulse",
|
|
1346
1481
|
"pointer"
|
|
1347
1482
|
].includes(prop);
|
|
1348
|
-
var StyledBubble =
|
|
1483
|
+
var StyledBubble = import_styled_components12.default.span.withConfig({
|
|
1349
1484
|
shouldForwardProp: shouldForwardProp6
|
|
1350
1485
|
})`
|
|
1351
1486
|
color: ${(props) => resolveColor2(props.color, "inherit")};
|
|
@@ -1362,7 +1497,7 @@ var StyledBubble = import_styled_components11.default.span.withConfig({
|
|
|
1362
1497
|
text-overflow: ellipsis;
|
|
1363
1498
|
max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
|
|
1364
1499
|
white-space: nowrap;
|
|
1365
|
-
${(props) => props.pulse &&
|
|
1500
|
+
${(props) => props.pulse && import_styled_components12.css`
|
|
1366
1501
|
--bubble-pulse-color: ${resolveColor2(
|
|
1367
1502
|
props.backgroundColor,
|
|
1368
1503
|
colors.grey_600
|
|
@@ -1378,141 +1513,7 @@ var StyledBubble = import_styled_components11.default.span.withConfig({
|
|
|
1378
1513
|
`;
|
|
1379
1514
|
var Bubble = (_a) => {
|
|
1380
1515
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
|
1381
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
-
};
|
|
1383
|
-
|
|
1384
|
-
// src/ui-legacy/Components/Tooltip/Tooltip.tsx
|
|
1385
|
-
var import_react6 = require("react");
|
|
1386
|
-
var import_styled_components12 = __toESM(require("styled-components"));
|
|
1387
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1388
|
-
var StyledTooltipWrapper = import_styled_components12.default.div`
|
|
1389
|
-
position: relative;
|
|
1390
|
-
display: ${(props) => props.$fullWidth ? "block" : "inline-block"};
|
|
1391
|
-
width: ${(props) => props.$fullWidth ? "100%" : "auto"};
|
|
1392
|
-
cursor: pointer;
|
|
1393
|
-
`;
|
|
1394
|
-
var StyledTooltipContent = import_styled_components12.default.div`
|
|
1395
|
-
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
1396
|
-
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
1397
|
-
color: ${colors.white};
|
|
1398
|
-
text-align: center;
|
|
1399
|
-
padding: 8px;
|
|
1400
|
-
border-radius: 4px;
|
|
1401
|
-
position: absolute;
|
|
1402
|
-
width: ${(props) => props.$width || "200px"};
|
|
1403
|
-
height: ${(props) => props.$height || "auto"};
|
|
1404
|
-
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
1405
|
-
transition: opacity 0.3s;
|
|
1406
|
-
z-index: 1;
|
|
1407
|
-
display: flex;
|
|
1408
|
-
flex-direction: column;
|
|
1409
|
-
align-items: center;
|
|
1410
|
-
gap: 4px;
|
|
1411
|
-
|
|
1412
|
-
${(props) => {
|
|
1413
|
-
switch (props.$direction) {
|
|
1414
|
-
case "top":
|
|
1415
|
-
return `
|
|
1416
|
-
bottom: 125%;
|
|
1417
|
-
left: 50%;
|
|
1418
|
-
transform: translateX(-50%);
|
|
1419
|
-
&::after {
|
|
1420
|
-
content: "";
|
|
1421
|
-
position: absolute;
|
|
1422
|
-
top: 100%;
|
|
1423
|
-
left: 50%;
|
|
1424
|
-
transform: translateX(-50%);
|
|
1425
|
-
border-width: 5px;
|
|
1426
|
-
border-style: solid;
|
|
1427
|
-
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
1428
|
-
}
|
|
1429
|
-
`;
|
|
1430
|
-
case "bottom":
|
|
1431
|
-
return `
|
|
1432
|
-
top: 125%;
|
|
1433
|
-
left: 50%;
|
|
1434
|
-
transform: translateX(-50%);
|
|
1435
|
-
&::after {
|
|
1436
|
-
content: "";
|
|
1437
|
-
position: absolute;
|
|
1438
|
-
bottom: 100%;
|
|
1439
|
-
left: 50%;
|
|
1440
|
-
transform: translateX(-50%);
|
|
1441
|
-
border-width: 5px;
|
|
1442
|
-
border-style: solid;
|
|
1443
|
-
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
1444
|
-
}
|
|
1445
|
-
`;
|
|
1446
|
-
case "left":
|
|
1447
|
-
return `
|
|
1448
|
-
top: 50%;
|
|
1449
|
-
right: 125%;
|
|
1450
|
-
transform: translateY(-50%);
|
|
1451
|
-
&::after {
|
|
1452
|
-
content: "";
|
|
1453
|
-
position: absolute;
|
|
1454
|
-
top: 50%;
|
|
1455
|
-
left: 100%;
|
|
1456
|
-
transform: translateY(-50%);
|
|
1457
|
-
border-width: 5px;
|
|
1458
|
-
border-style: solid;
|
|
1459
|
-
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
1460
|
-
}
|
|
1461
|
-
`;
|
|
1462
|
-
case "right":
|
|
1463
|
-
default:
|
|
1464
|
-
return `
|
|
1465
|
-
top: 50%;
|
|
1466
|
-
left: 125%;
|
|
1467
|
-
transform: translateY(-50%);
|
|
1468
|
-
&::after {
|
|
1469
|
-
content: "";
|
|
1470
|
-
position: absolute;
|
|
1471
|
-
top: 50%;
|
|
1472
|
-
right: 100%;
|
|
1473
|
-
transform: translateY(-50%);
|
|
1474
|
-
border-width: 5px;
|
|
1475
|
-
border-style: solid;
|
|
1476
|
-
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
1477
|
-
}
|
|
1478
|
-
`;
|
|
1479
|
-
}
|
|
1480
|
-
}}
|
|
1481
|
-
`;
|
|
1482
|
-
var Tooltip = ({
|
|
1483
|
-
backgroundColor,
|
|
1484
|
-
data = [],
|
|
1485
|
-
width,
|
|
1486
|
-
height,
|
|
1487
|
-
direction = "top",
|
|
1488
|
-
fullWidth = false,
|
|
1489
|
-
children
|
|
1490
|
-
}) => {
|
|
1491
|
-
const [isVisible, setIsVisible] = (0, import_react6.useState)(false);
|
|
1492
|
-
const handleMouseEnter = () => setIsVisible(true);
|
|
1493
|
-
const handleMouseLeave = () => setIsVisible(false);
|
|
1494
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1495
|
-
StyledTooltipWrapper,
|
|
1496
|
-
{
|
|
1497
|
-
$fullWidth: fullWidth,
|
|
1498
|
-
onMouseEnter: handleMouseEnter,
|
|
1499
|
-
onMouseLeave: handleMouseLeave,
|
|
1500
|
-
children: [
|
|
1501
|
-
children,
|
|
1502
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1503
|
-
StyledTooltipContent,
|
|
1504
|
-
{
|
|
1505
|
-
$isVisible: isVisible,
|
|
1506
|
-
$backgroundColor: backgroundColor,
|
|
1507
|
-
$width: width,
|
|
1508
|
-
$height: height,
|
|
1509
|
-
$direction: direction,
|
|
1510
|
-
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
1511
|
-
}
|
|
1512
|
-
)
|
|
1513
|
-
]
|
|
1514
|
-
}
|
|
1515
|
-
);
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledBubble, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
1516
1517
|
};
|
|
1517
1518
|
|
|
1518
1519
|
// src/ui-legacy/Components/NewModal/NewModal.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -674,8 +674,142 @@ var Divider = (_a) => {
|
|
|
674
674
|
);
|
|
675
675
|
};
|
|
676
676
|
|
|
677
|
-
// src/ui-legacy/Components/
|
|
677
|
+
// src/ui-legacy/Components/Tooltip/Tooltip.tsx
|
|
678
|
+
import { useState } from "react";
|
|
679
|
+
import styled8 from "styled-components";
|
|
678
680
|
import { jsx as jsx9, jsxs } from "react/jsx-runtime";
|
|
681
|
+
var StyledTooltipWrapper = styled8.div`
|
|
682
|
+
position: relative;
|
|
683
|
+
display: ${(props) => props.$fullWidth ? "block" : "inline-block"};
|
|
684
|
+
width: ${(props) => props.$fullWidth ? "100%" : "auto"};
|
|
685
|
+
cursor: pointer;
|
|
686
|
+
`;
|
|
687
|
+
var StyledTooltipContent = styled8.div`
|
|
688
|
+
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
689
|
+
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
690
|
+
color: ${colors.white};
|
|
691
|
+
text-align: center;
|
|
692
|
+
padding: 8px;
|
|
693
|
+
border-radius: 4px;
|
|
694
|
+
position: absolute;
|
|
695
|
+
width: ${(props) => props.$width || "200px"};
|
|
696
|
+
height: ${(props) => props.$height || "auto"};
|
|
697
|
+
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
698
|
+
transition: opacity 0.3s;
|
|
699
|
+
z-index: 1;
|
|
700
|
+
display: flex;
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
align-items: center;
|
|
703
|
+
gap: 4px;
|
|
704
|
+
|
|
705
|
+
${(props) => {
|
|
706
|
+
switch (props.$direction) {
|
|
707
|
+
case "top":
|
|
708
|
+
return `
|
|
709
|
+
bottom: 125%;
|
|
710
|
+
left: 50%;
|
|
711
|
+
transform: translateX(-50%);
|
|
712
|
+
&::after {
|
|
713
|
+
content: "";
|
|
714
|
+
position: absolute;
|
|
715
|
+
top: 100%;
|
|
716
|
+
left: 50%;
|
|
717
|
+
transform: translateX(-50%);
|
|
718
|
+
border-width: 5px;
|
|
719
|
+
border-style: solid;
|
|
720
|
+
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
721
|
+
}
|
|
722
|
+
`;
|
|
723
|
+
case "bottom":
|
|
724
|
+
return `
|
|
725
|
+
top: 125%;
|
|
726
|
+
left: 50%;
|
|
727
|
+
transform: translateX(-50%);
|
|
728
|
+
&::after {
|
|
729
|
+
content: "";
|
|
730
|
+
position: absolute;
|
|
731
|
+
bottom: 100%;
|
|
732
|
+
left: 50%;
|
|
733
|
+
transform: translateX(-50%);
|
|
734
|
+
border-width: 5px;
|
|
735
|
+
border-style: solid;
|
|
736
|
+
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
737
|
+
}
|
|
738
|
+
`;
|
|
739
|
+
case "left":
|
|
740
|
+
return `
|
|
741
|
+
top: 50%;
|
|
742
|
+
right: 125%;
|
|
743
|
+
transform: translateY(-50%);
|
|
744
|
+
&::after {
|
|
745
|
+
content: "";
|
|
746
|
+
position: absolute;
|
|
747
|
+
top: 50%;
|
|
748
|
+
left: 100%;
|
|
749
|
+
transform: translateY(-50%);
|
|
750
|
+
border-width: 5px;
|
|
751
|
+
border-style: solid;
|
|
752
|
+
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
753
|
+
}
|
|
754
|
+
`;
|
|
755
|
+
case "right":
|
|
756
|
+
default:
|
|
757
|
+
return `
|
|
758
|
+
top: 50%;
|
|
759
|
+
left: 125%;
|
|
760
|
+
transform: translateY(-50%);
|
|
761
|
+
&::after {
|
|
762
|
+
content: "";
|
|
763
|
+
position: absolute;
|
|
764
|
+
top: 50%;
|
|
765
|
+
right: 100%;
|
|
766
|
+
transform: translateY(-50%);
|
|
767
|
+
border-width: 5px;
|
|
768
|
+
border-style: solid;
|
|
769
|
+
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
770
|
+
}
|
|
771
|
+
`;
|
|
772
|
+
}
|
|
773
|
+
}}
|
|
774
|
+
`;
|
|
775
|
+
var Tooltip = ({
|
|
776
|
+
backgroundColor,
|
|
777
|
+
data = [],
|
|
778
|
+
width,
|
|
779
|
+
height,
|
|
780
|
+
direction = "top",
|
|
781
|
+
fullWidth = false,
|
|
782
|
+
children
|
|
783
|
+
}) => {
|
|
784
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
785
|
+
const handleMouseEnter = () => setIsVisible(true);
|
|
786
|
+
const handleMouseLeave = () => setIsVisible(false);
|
|
787
|
+
return /* @__PURE__ */ jsxs(
|
|
788
|
+
StyledTooltipWrapper,
|
|
789
|
+
{
|
|
790
|
+
$fullWidth: fullWidth,
|
|
791
|
+
onMouseEnter: handleMouseEnter,
|
|
792
|
+
onMouseLeave: handleMouseLeave,
|
|
793
|
+
children: [
|
|
794
|
+
children,
|
|
795
|
+
/* @__PURE__ */ jsx9(
|
|
796
|
+
StyledTooltipContent,
|
|
797
|
+
{
|
|
798
|
+
$isVisible: isVisible,
|
|
799
|
+
$backgroundColor: backgroundColor,
|
|
800
|
+
$width: width,
|
|
801
|
+
$height: height,
|
|
802
|
+
$direction: direction,
|
|
803
|
+
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx9(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx9(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
804
|
+
}
|
|
805
|
+
)
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/ui-legacy/Components/Bulk/Bulk.tsx
|
|
812
|
+
import { jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
679
813
|
var Bulk = ({
|
|
680
814
|
onClose,
|
|
681
815
|
leftTitle,
|
|
@@ -687,7 +821,7 @@ var Bulk = ({
|
|
|
687
821
|
const mainColor = colors[variant] || colors.blue_700;
|
|
688
822
|
const textColorStyle = colors[textColor] || colors.white;
|
|
689
823
|
const hoverColorStyle = colors[hoverColor] || colors.blue_900;
|
|
690
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ jsx10(
|
|
691
825
|
Box,
|
|
692
826
|
{
|
|
693
827
|
background: mainColor,
|
|
@@ -699,11 +833,11 @@ var Bulk = ({
|
|
|
699
833
|
zIndex: 500,
|
|
700
834
|
borderRadius: "12px"
|
|
701
835
|
},
|
|
702
|
-
children: /* @__PURE__ */
|
|
703
|
-
leftTitle && /* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
836
|
+
children: /* @__PURE__ */ jsxs2(Row, { alignItems: "center", children: [
|
|
837
|
+
leftTitle && /* @__PURE__ */ jsxs2(Row, { gap: 24, alignItems: "center", children: [
|
|
838
|
+
/* @__PURE__ */ jsx10(Icon, { name: "xmark", color: "white", size: "l", onClick: onClose }),
|
|
839
|
+
/* @__PURE__ */ jsx10(Text, { color: textColorStyle, weight: "bold", size: "s", wrap: "nowrap", children: leftTitle }),
|
|
840
|
+
/* @__PURE__ */ jsx10(
|
|
707
841
|
Divider,
|
|
708
842
|
{
|
|
709
843
|
orientation: "vertical",
|
|
@@ -713,9 +847,9 @@ var Bulk = ({
|
|
|
713
847
|
}
|
|
714
848
|
)
|
|
715
849
|
] }),
|
|
716
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ jsx10(Row, { alignItems: "center", children: sections.map((section, idx) => {
|
|
717
851
|
const isLast = idx === sections.length - 1;
|
|
718
|
-
|
|
852
|
+
const sectionButton = /* @__PURE__ */ jsxs2(
|
|
719
853
|
Row,
|
|
720
854
|
{
|
|
721
855
|
gap: 6,
|
|
@@ -740,7 +874,7 @@ var Bulk = ({
|
|
|
740
874
|
e.currentTarget.style.background = mainColor;
|
|
741
875
|
},
|
|
742
876
|
children: [
|
|
743
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ jsx10(
|
|
744
878
|
Icon,
|
|
745
879
|
{
|
|
746
880
|
name: section.icon,
|
|
@@ -749,7 +883,7 @@ var Bulk = ({
|
|
|
749
883
|
family: "regular"
|
|
750
884
|
}
|
|
751
885
|
),
|
|
752
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ jsx10(
|
|
753
887
|
Text,
|
|
754
888
|
{
|
|
755
889
|
color: textColorStyle,
|
|
@@ -763,6 +897,7 @@ var Bulk = ({
|
|
|
763
897
|
},
|
|
764
898
|
section.title
|
|
765
899
|
);
|
|
900
|
+
return section.disabled && section.disabledTooltip ? /* @__PURE__ */ jsx10(Tooltip, { data: [section.disabledTooltip], children: sectionButton }, section.title) : sectionButton;
|
|
766
901
|
}) })
|
|
767
902
|
] })
|
|
768
903
|
}
|
|
@@ -770,21 +905,21 @@ var Bulk = ({
|
|
|
770
905
|
};
|
|
771
906
|
|
|
772
907
|
// src/ui-legacy/Components/Collapse/Collapse.tsx
|
|
773
|
-
import { useState, useRef, useEffect, useCallback } from "react";
|
|
774
|
-
import
|
|
775
|
-
import { jsx as
|
|
776
|
-
var Wrapper =
|
|
908
|
+
import { useState as useState2, useRef, useEffect, useCallback } from "react";
|
|
909
|
+
import styled9 from "styled-components";
|
|
910
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
911
|
+
var Wrapper = styled9.div`
|
|
777
912
|
overflow: hidden;
|
|
778
913
|
transition: height 0.25s ease;
|
|
779
914
|
height: ${(p) => p.$height}px;
|
|
780
915
|
`;
|
|
781
|
-
var Inner =
|
|
916
|
+
var Inner = styled9.div`
|
|
782
917
|
max-height: ${(p) => p.$maxHeight ? `${p.$maxHeight}px` : "none"};
|
|
783
918
|
overflow-y: ${(p) => p.$maxHeight ? "auto" : "visible"};
|
|
784
919
|
`;
|
|
785
920
|
var Collapse = ({ open, children, maxHeight }) => {
|
|
786
921
|
const innerRef = useRef(null);
|
|
787
|
-
const [height, setHeight] =
|
|
922
|
+
const [height, setHeight] = useState2(0);
|
|
788
923
|
const recalc = useCallback(() => {
|
|
789
924
|
if (open && innerRef.current) {
|
|
790
925
|
const full = innerRef.current.scrollHeight;
|
|
@@ -800,13 +935,13 @@ var Collapse = ({ open, children, maxHeight }) => {
|
|
|
800
935
|
observer.observe(innerRef.current);
|
|
801
936
|
return () => observer.disconnect();
|
|
802
937
|
}, [open, recalc]);
|
|
803
|
-
return /* @__PURE__ */
|
|
938
|
+
return /* @__PURE__ */ jsx11(Wrapper, { $height: height, children: /* @__PURE__ */ jsx11(Inner, { ref: innerRef, $maxHeight: maxHeight, children }) });
|
|
804
939
|
};
|
|
805
940
|
|
|
806
941
|
// src/ui-legacy/Components/Button/Button.tsx
|
|
807
942
|
import { useRef as useRef2 } from "react";
|
|
808
|
-
import
|
|
809
|
-
import { jsx as
|
|
943
|
+
import styled10 from "styled-components";
|
|
944
|
+
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
810
945
|
var defaultSizes = {
|
|
811
946
|
xs: { height: 32, paddingX: 16, textSize: "xs" },
|
|
812
947
|
s: { height: 36, paddingX: 16, textSize: "s" },
|
|
@@ -835,7 +970,7 @@ var shouldForwardProp4 = (p) => ![
|
|
|
835
970
|
"iconOnlySize",
|
|
836
971
|
"noHover"
|
|
837
972
|
].includes(p);
|
|
838
|
-
var StyledButton =
|
|
973
|
+
var StyledButton = styled10.button.withConfig({
|
|
839
974
|
shouldForwardProp: shouldForwardProp4
|
|
840
975
|
})`
|
|
841
976
|
position: relative;
|
|
@@ -927,7 +1062,7 @@ var StyledButton = styled9.button.withConfig({
|
|
|
927
1062
|
border-radius: 6px;
|
|
928
1063
|
`}
|
|
929
1064
|
`;
|
|
930
|
-
var Loader =
|
|
1065
|
+
var Loader = styled10.span`
|
|
931
1066
|
border: 3px solid transparent;
|
|
932
1067
|
border-top: 3px solid currentColor;
|
|
933
1068
|
border-radius: 50%;
|
|
@@ -980,7 +1115,7 @@ var Button = (_a) => {
|
|
|
980
1115
|
]);
|
|
981
1116
|
const ref = useRef2(null);
|
|
982
1117
|
const sizeConfig = defaultSizes[size];
|
|
983
|
-
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */
|
|
1118
|
+
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ jsx12(
|
|
984
1119
|
Icon,
|
|
985
1120
|
{
|
|
986
1121
|
name: icon,
|
|
@@ -989,7 +1124,7 @@ var Button = (_a) => {
|
|
|
989
1124
|
color: iconColor != null ? iconColor : outline ? variant : colors.white
|
|
990
1125
|
}
|
|
991
1126
|
) : icon;
|
|
992
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ jsxs3(
|
|
993
1128
|
StyledButton,
|
|
994
1129
|
__spreadProps(__spreadValues({
|
|
995
1130
|
ref,
|
|
@@ -1007,10 +1142,10 @@ var Button = (_a) => {
|
|
|
1007
1142
|
iconOnlySize
|
|
1008
1143
|
}, rest), {
|
|
1009
1144
|
children: [
|
|
1010
|
-
isLoading && /* @__PURE__ */
|
|
1011
|
-
!isLoading && /* @__PURE__ */
|
|
1145
|
+
isLoading && /* @__PURE__ */ jsx12(Loader, {}),
|
|
1146
|
+
!isLoading && /* @__PURE__ */ jsxs3(Row, { gap: "8", fullwidth: true, justifyContent: "center", alignItems: "center", children: [
|
|
1012
1147
|
iconLeft && renderIconSlot(iconLeft),
|
|
1013
|
-
label && /* @__PURE__ */
|
|
1148
|
+
label && /* @__PURE__ */ jsx12(
|
|
1014
1149
|
Text,
|
|
1015
1150
|
{
|
|
1016
1151
|
size: sizeConfig.textSize,
|
|
@@ -1029,10 +1164,10 @@ var Button = (_a) => {
|
|
|
1029
1164
|
|
|
1030
1165
|
// src/ui-legacy/Components/Modal/Modal.tsx
|
|
1031
1166
|
import { useEffect as useEffect2 } from "react";
|
|
1032
|
-
import
|
|
1033
|
-
import { Fragment, jsx as
|
|
1167
|
+
import styled11 from "styled-components";
|
|
1168
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1034
1169
|
var shouldForwardProp5 = (prop) => !["width", "height", "minHeight", "padding", "backgroundColor"].includes(prop);
|
|
1035
|
-
var ModalBackdrop =
|
|
1170
|
+
var ModalBackdrop = styled11.div`
|
|
1036
1171
|
position: fixed;
|
|
1037
1172
|
top: 0;
|
|
1038
1173
|
left: 0;
|
|
@@ -1042,7 +1177,7 @@ var ModalBackdrop = styled10.div`
|
|
|
1042
1177
|
backdrop-filter: blur(5px);
|
|
1043
1178
|
z-index: 4;
|
|
1044
1179
|
`;
|
|
1045
|
-
var ModalContainer =
|
|
1180
|
+
var ModalContainer = styled11.div.withConfig({ shouldForwardProp: shouldForwardProp5 })`
|
|
1046
1181
|
position: fixed;
|
|
1047
1182
|
top: 50%;
|
|
1048
1183
|
left: 50%;
|
|
@@ -1065,7 +1200,7 @@ var ModalContainer = styled10.div.withConfig({ shouldForwardProp: shouldForwardP
|
|
|
1065
1200
|
max-height: 90%;
|
|
1066
1201
|
overflow: auto;
|
|
1067
1202
|
`;
|
|
1068
|
-
var ModalHeader =
|
|
1203
|
+
var ModalHeader = styled11.div`
|
|
1069
1204
|
display: flex;
|
|
1070
1205
|
justify-content: space-between;
|
|
1071
1206
|
align-items: center;
|
|
@@ -1073,14 +1208,14 @@ var ModalHeader = styled10.div`
|
|
|
1073
1208
|
border-bottom: 1px solid #ddd;
|
|
1074
1209
|
width: 100%;
|
|
1075
1210
|
`;
|
|
1076
|
-
var ModalCore =
|
|
1211
|
+
var ModalCore = styled11.div`
|
|
1077
1212
|
padding: 20px;
|
|
1078
1213
|
background-color: white;
|
|
1079
1214
|
border-radius: 0 0 10px 10px;
|
|
1080
1215
|
overflow: auto;
|
|
1081
1216
|
height: 100%;
|
|
1082
1217
|
`;
|
|
1083
|
-
var ModalClose =
|
|
1218
|
+
var ModalClose = styled11.span`
|
|
1084
1219
|
font-size: 32px;
|
|
1085
1220
|
color: #fff;
|
|
1086
1221
|
cursor: pointer;
|
|
@@ -1114,9 +1249,9 @@ var Modal = (props) => {
|
|
|
1114
1249
|
document.body.classList.remove("modal-open");
|
|
1115
1250
|
};
|
|
1116
1251
|
}, [showModal]);
|
|
1117
|
-
return showModal && /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1252
|
+
return showModal && /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1253
|
+
/* @__PURE__ */ jsx13(ModalBackdrop, { onClick: hideModal }),
|
|
1254
|
+
/* @__PURE__ */ jsxs4(
|
|
1120
1255
|
ModalContainer,
|
|
1121
1256
|
{
|
|
1122
1257
|
width,
|
|
@@ -1125,11 +1260,11 @@ var Modal = (props) => {
|
|
|
1125
1260
|
backgroundColor,
|
|
1126
1261
|
minHeight,
|
|
1127
1262
|
children: [
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ jsxs4(ModalHeader, { children: [
|
|
1264
|
+
/* @__PURE__ */ jsx13(Text_default, { color: "white", weight: "700", children: title ? title : "DELIVERY CAR" }),
|
|
1265
|
+
/* @__PURE__ */ jsx13(ModalClose, { onClick: hideModal, children: "\xD7" })
|
|
1131
1266
|
] }),
|
|
1132
|
-
/* @__PURE__ */
|
|
1267
|
+
/* @__PURE__ */ jsx13(ModalCore, { children })
|
|
1133
1268
|
]
|
|
1134
1269
|
}
|
|
1135
1270
|
)
|
|
@@ -1137,15 +1272,15 @@ var Modal = (props) => {
|
|
|
1137
1272
|
};
|
|
1138
1273
|
|
|
1139
1274
|
// src/ui-legacy/Components/ModalConfirmation/ModalConfirmation.tsx
|
|
1140
|
-
import { jsx as
|
|
1275
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1141
1276
|
var ModalConfirmation = (props) => {
|
|
1142
1277
|
const { isOpen, onConfirm, onCancel, isLoading, width } = props;
|
|
1143
1278
|
if (!isOpen) return null;
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ jsx14(Modal, { showModal: isOpen, closeModal: onCancel, width, children: /* @__PURE__ */ jsxs5(Col, { gap: "16", justifyContent: "center", alignItems: "center", fullWidth: true, children: [
|
|
1280
|
+
/* @__PURE__ */ jsx14(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ jsx14(Text, { align: "center", margin: "1em 0", size: "xl", children: "\xCAtes-vous s\xFBr de vouloir faire cette action ?" }) }),
|
|
1281
|
+
/* @__PURE__ */ jsxs5(Row, { gap: "8", justifyContent: "center", children: [
|
|
1282
|
+
/* @__PURE__ */ jsx14(Button, { onClick: onCancel, variant: "danger", children: "Annuler" }),
|
|
1283
|
+
/* @__PURE__ */ jsx14(Button, { variant: "success", onClick: onConfirm, isLoading, children: "Confirmer" })
|
|
1149
1284
|
] })
|
|
1150
1285
|
] }) });
|
|
1151
1286
|
};
|
|
@@ -1154,8 +1289,8 @@ var ModalConfirmation = (props) => {
|
|
|
1154
1289
|
import { useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
|
|
1155
1290
|
|
|
1156
1291
|
// src/ui-legacy/Components/Bubble/Bubble.tsx
|
|
1157
|
-
import
|
|
1158
|
-
import { jsx as
|
|
1292
|
+
import styled12, { css, keyframes } from "styled-components";
|
|
1293
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1159
1294
|
var textSizes3 = {
|
|
1160
1295
|
xxs: ".4em",
|
|
1161
1296
|
xs: ".6em",
|
|
@@ -1202,7 +1337,7 @@ var shouldForwardProp6 = (prop) => ![
|
|
|
1202
1337
|
"pulse",
|
|
1203
1338
|
"pointer"
|
|
1204
1339
|
].includes(prop);
|
|
1205
|
-
var StyledBubble =
|
|
1340
|
+
var StyledBubble = styled12.span.withConfig({
|
|
1206
1341
|
shouldForwardProp: shouldForwardProp6
|
|
1207
1342
|
})`
|
|
1208
1343
|
color: ${(props) => resolveColor2(props.color, "inherit")};
|
|
@@ -1235,141 +1370,7 @@ var StyledBubble = styled11.span.withConfig({
|
|
|
1235
1370
|
`;
|
|
1236
1371
|
var Bubble = (_a) => {
|
|
1237
1372
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
|
1238
|
-
return /* @__PURE__ */
|
|
1239
|
-
};
|
|
1240
|
-
|
|
1241
|
-
// src/ui-legacy/Components/Tooltip/Tooltip.tsx
|
|
1242
|
-
import { useState as useState2 } from "react";
|
|
1243
|
-
import styled12 from "styled-components";
|
|
1244
|
-
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1245
|
-
var StyledTooltipWrapper = styled12.div`
|
|
1246
|
-
position: relative;
|
|
1247
|
-
display: ${(props) => props.$fullWidth ? "block" : "inline-block"};
|
|
1248
|
-
width: ${(props) => props.$fullWidth ? "100%" : "auto"};
|
|
1249
|
-
cursor: pointer;
|
|
1250
|
-
`;
|
|
1251
|
-
var StyledTooltipContent = styled12.div`
|
|
1252
|
-
visibility: ${(props) => props.$isVisible ? "visible" : "hidden"};
|
|
1253
|
-
background-color: ${(props) => props.$backgroundColor || colors.black};
|
|
1254
|
-
color: ${colors.white};
|
|
1255
|
-
text-align: center;
|
|
1256
|
-
padding: 8px;
|
|
1257
|
-
border-radius: 4px;
|
|
1258
|
-
position: absolute;
|
|
1259
|
-
width: ${(props) => props.$width || "200px"};
|
|
1260
|
-
height: ${(props) => props.$height || "auto"};
|
|
1261
|
-
opacity: ${(props) => props.$isVisible ? 1 : 0};
|
|
1262
|
-
transition: opacity 0.3s;
|
|
1263
|
-
z-index: 1;
|
|
1264
|
-
display: flex;
|
|
1265
|
-
flex-direction: column;
|
|
1266
|
-
align-items: center;
|
|
1267
|
-
gap: 4px;
|
|
1268
|
-
|
|
1269
|
-
${(props) => {
|
|
1270
|
-
switch (props.$direction) {
|
|
1271
|
-
case "top":
|
|
1272
|
-
return `
|
|
1273
|
-
bottom: 125%;
|
|
1274
|
-
left: 50%;
|
|
1275
|
-
transform: translateX(-50%);
|
|
1276
|
-
&::after {
|
|
1277
|
-
content: "";
|
|
1278
|
-
position: absolute;
|
|
1279
|
-
top: 100%;
|
|
1280
|
-
left: 50%;
|
|
1281
|
-
transform: translateX(-50%);
|
|
1282
|
-
border-width: 5px;
|
|
1283
|
-
border-style: solid;
|
|
1284
|
-
border-color: ${props.$backgroundColor || colors.black} transparent transparent transparent;
|
|
1285
|
-
}
|
|
1286
|
-
`;
|
|
1287
|
-
case "bottom":
|
|
1288
|
-
return `
|
|
1289
|
-
top: 125%;
|
|
1290
|
-
left: 50%;
|
|
1291
|
-
transform: translateX(-50%);
|
|
1292
|
-
&::after {
|
|
1293
|
-
content: "";
|
|
1294
|
-
position: absolute;
|
|
1295
|
-
bottom: 100%;
|
|
1296
|
-
left: 50%;
|
|
1297
|
-
transform: translateX(-50%);
|
|
1298
|
-
border-width: 5px;
|
|
1299
|
-
border-style: solid;
|
|
1300
|
-
border-color: transparent transparent ${props.$backgroundColor || colors.black} transparent;
|
|
1301
|
-
}
|
|
1302
|
-
`;
|
|
1303
|
-
case "left":
|
|
1304
|
-
return `
|
|
1305
|
-
top: 50%;
|
|
1306
|
-
right: 125%;
|
|
1307
|
-
transform: translateY(-50%);
|
|
1308
|
-
&::after {
|
|
1309
|
-
content: "";
|
|
1310
|
-
position: absolute;
|
|
1311
|
-
top: 50%;
|
|
1312
|
-
left: 100%;
|
|
1313
|
-
transform: translateY(-50%);
|
|
1314
|
-
border-width: 5px;
|
|
1315
|
-
border-style: solid;
|
|
1316
|
-
border-color: transparent transparent transparent ${props.$backgroundColor || colors.black};
|
|
1317
|
-
}
|
|
1318
|
-
`;
|
|
1319
|
-
case "right":
|
|
1320
|
-
default:
|
|
1321
|
-
return `
|
|
1322
|
-
top: 50%;
|
|
1323
|
-
left: 125%;
|
|
1324
|
-
transform: translateY(-50%);
|
|
1325
|
-
&::after {
|
|
1326
|
-
content: "";
|
|
1327
|
-
position: absolute;
|
|
1328
|
-
top: 50%;
|
|
1329
|
-
right: 100%;
|
|
1330
|
-
transform: translateY(-50%);
|
|
1331
|
-
border-width: 5px;
|
|
1332
|
-
border-style: solid;
|
|
1333
|
-
border-color: transparent ${props.$backgroundColor || colors.black} transparent transparent;
|
|
1334
|
-
}
|
|
1335
|
-
`;
|
|
1336
|
-
}
|
|
1337
|
-
}}
|
|
1338
|
-
`;
|
|
1339
|
-
var Tooltip = ({
|
|
1340
|
-
backgroundColor,
|
|
1341
|
-
data = [],
|
|
1342
|
-
width,
|
|
1343
|
-
height,
|
|
1344
|
-
direction = "top",
|
|
1345
|
-
fullWidth = false,
|
|
1346
|
-
children
|
|
1347
|
-
}) => {
|
|
1348
|
-
const [isVisible, setIsVisible] = useState2(false);
|
|
1349
|
-
const handleMouseEnter = () => setIsVisible(true);
|
|
1350
|
-
const handleMouseLeave = () => setIsVisible(false);
|
|
1351
|
-
return /* @__PURE__ */ jsxs5(
|
|
1352
|
-
StyledTooltipWrapper,
|
|
1353
|
-
{
|
|
1354
|
-
$fullWidth: fullWidth,
|
|
1355
|
-
onMouseEnter: handleMouseEnter,
|
|
1356
|
-
onMouseLeave: handleMouseLeave,
|
|
1357
|
-
children: [
|
|
1358
|
-
children,
|
|
1359
|
-
/* @__PURE__ */ jsx15(
|
|
1360
|
-
StyledTooltipContent,
|
|
1361
|
-
{
|
|
1362
|
-
$isVisible: isVisible,
|
|
1363
|
-
$backgroundColor: backgroundColor,
|
|
1364
|
-
$width: width,
|
|
1365
|
-
$height: height,
|
|
1366
|
-
$direction: direction,
|
|
1367
|
-
children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx15(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx15(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
|
|
1368
|
-
}
|
|
1369
|
-
)
|
|
1370
|
-
]
|
|
1371
|
-
}
|
|
1372
|
-
);
|
|
1373
|
+
return /* @__PURE__ */ jsx15(StyledBubble, __spreadProps(__spreadValues({}, otherProps), { children }));
|
|
1373
1374
|
};
|
|
1374
1375
|
|
|
1375
1376
|
// src/ui-legacy/Components/NewModal/NewModal.tsx
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -662,7 +662,7 @@ interface RadioProps extends VariantProps<typeof radioVariants> {
|
|
|
662
662
|
declare const Radio: ({ items, value, onChange, disabled, color, width, className, }: RadioProps) => react.JSX.Element;
|
|
663
663
|
|
|
664
664
|
declare const trackVariants: (props?: ({
|
|
665
|
-
height?: "sm" | "md" | "lg" | null | undefined;
|
|
665
|
+
height?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
666
666
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
667
667
|
interface ProgressBarProps extends VariantProps<typeof trackVariants> {
|
|
668
668
|
/** Sur la plage `min`–`max`, clampée. */
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -662,7 +662,7 @@ interface RadioProps extends VariantProps<typeof radioVariants> {
|
|
|
662
662
|
declare const Radio: ({ items, value, onChange, disabled, color, width, className, }: RadioProps) => react.JSX.Element;
|
|
663
663
|
|
|
664
664
|
declare const trackVariants: (props?: ({
|
|
665
|
-
height?: "sm" | "md" | "lg" | null | undefined;
|
|
665
|
+
height?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
666
666
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
667
667
|
interface ProgressBarProps extends VariantProps<typeof trackVariants> {
|
|
668
668
|
/** Sur la plage `min`–`max`, clampée. */
|
package/dist/ui/index.js
CHANGED
package/dist/ui/index.mjs
CHANGED