mayak-common-library 0.0.47 → 0.0.49
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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +97 -86
- package/dist/index.mjs +100 -87
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ import { SliderProps } from '@mui/material/Slider/Slider';
|
|
|
16
16
|
import { MenuItemProps } from '@mui/material/MenuItem/MenuItem';
|
|
17
17
|
import { InputProps } from '@mui/material/Input';
|
|
18
18
|
import { PatternFormatProps } from 'react-number-format/types/types';
|
|
19
|
-
import { UseControllerProps } from 'react-hook-form';
|
|
19
|
+
import { UseControllerProps, FieldValues } from 'react-hook-form';
|
|
20
20
|
export { default as MapIcon } from '@/icons/map-search.svg';
|
|
21
21
|
import { ListProps } from '@mui/material/List/List';
|
|
22
22
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
@@ -53,6 +53,7 @@ interface SelectProProps {
|
|
|
53
53
|
fullWidth?: boolean;
|
|
54
54
|
freeChildWidth?: boolean;
|
|
55
55
|
isOpen?: boolean;
|
|
56
|
+
intermediateChild?: ReactElement;
|
|
56
57
|
}
|
|
57
58
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
58
59
|
|
|
@@ -215,7 +216,7 @@ type Values = {
|
|
|
215
216
|
title: string;
|
|
216
217
|
}[];
|
|
217
218
|
|
|
218
|
-
interface ToggleButtonsMultipleProps
|
|
219
|
+
interface ToggleButtonsMultipleProps extends ToggleButtonGroupProps$1 {
|
|
219
220
|
values: Values;
|
|
220
221
|
textView?: boolean;
|
|
221
222
|
collapseOnClick?: boolean;
|
|
@@ -223,7 +224,7 @@ interface ToggleButtonsMultipleProps<T> extends ToggleButtonGroupProps$1 {
|
|
|
223
224
|
label?: string;
|
|
224
225
|
flexDirection?: "row" | "col";
|
|
225
226
|
}
|
|
226
|
-
declare const ToggleButtonsWithLabel: <T extends
|
|
227
|
+
declare const ToggleButtonsWithLabel: <T extends FieldValues>(props: ToggleButtonsMultipleProps & UseControllerProps<T>) => react_jsx_runtime.JSX.Element;
|
|
227
228
|
|
|
228
229
|
declare const ToggleButton: FC<ToggleButtonProps & {
|
|
229
230
|
textView?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { SliderProps } from '@mui/material/Slider/Slider';
|
|
|
16
16
|
import { MenuItemProps } from '@mui/material/MenuItem/MenuItem';
|
|
17
17
|
import { InputProps } from '@mui/material/Input';
|
|
18
18
|
import { PatternFormatProps } from 'react-number-format/types/types';
|
|
19
|
-
import { UseControllerProps } from 'react-hook-form';
|
|
19
|
+
import { UseControllerProps, FieldValues } from 'react-hook-form';
|
|
20
20
|
export { default as MapIcon } from '@/icons/map-search.svg';
|
|
21
21
|
import { ListProps } from '@mui/material/List/List';
|
|
22
22
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
@@ -53,6 +53,7 @@ interface SelectProProps {
|
|
|
53
53
|
fullWidth?: boolean;
|
|
54
54
|
freeChildWidth?: boolean;
|
|
55
55
|
isOpen?: boolean;
|
|
56
|
+
intermediateChild?: ReactElement;
|
|
56
57
|
}
|
|
57
58
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
58
59
|
|
|
@@ -215,7 +216,7 @@ type Values = {
|
|
|
215
216
|
title: string;
|
|
216
217
|
}[];
|
|
217
218
|
|
|
218
|
-
interface ToggleButtonsMultipleProps
|
|
219
|
+
interface ToggleButtonsMultipleProps extends ToggleButtonGroupProps$1 {
|
|
219
220
|
values: Values;
|
|
220
221
|
textView?: boolean;
|
|
221
222
|
collapseOnClick?: boolean;
|
|
@@ -223,7 +224,7 @@ interface ToggleButtonsMultipleProps<T> extends ToggleButtonGroupProps$1 {
|
|
|
223
224
|
label?: string;
|
|
224
225
|
flexDirection?: "row" | "col";
|
|
225
226
|
}
|
|
226
|
-
declare const ToggleButtonsWithLabel: <T extends
|
|
227
|
+
declare const ToggleButtonsWithLabel: <T extends FieldValues>(props: ToggleButtonsMultipleProps & UseControllerProps<T>) => react_jsx_runtime.JSX.Element;
|
|
227
228
|
|
|
228
229
|
declare const ToggleButton: FC<ToggleButtonProps & {
|
|
229
230
|
textView?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -303,7 +303,8 @@ var SelectPro = ({
|
|
|
303
303
|
small = false,
|
|
304
304
|
fullWidth = false,
|
|
305
305
|
freeChildWidth = false,
|
|
306
|
-
isOpen
|
|
306
|
+
isOpen,
|
|
307
|
+
intermediateChild
|
|
307
308
|
}) => {
|
|
308
309
|
const [btn, setAnchorEl] = (0, import_react2.useState)(null);
|
|
309
310
|
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
@@ -318,7 +319,6 @@ var SelectPro = ({
|
|
|
318
319
|
setOpen(!open);
|
|
319
320
|
};
|
|
320
321
|
const handleClose = () => {
|
|
321
|
-
if (isOpen) return;
|
|
322
322
|
setOpen(false);
|
|
323
323
|
setTimeout(() => {
|
|
324
324
|
setAnchorEl(null);
|
|
@@ -327,83 +327,92 @@ var SelectPro = ({
|
|
|
327
327
|
const childrenWithHandleChange = (0, import_react2.isValidElement)(children) ? (0, import_react2.cloneElement)(children, {
|
|
328
328
|
collapseParent: handleClose
|
|
329
329
|
}) : children;
|
|
330
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
import_material4.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
className:
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
331
|
+
import_material4.ClickAwayListener,
|
|
332
|
+
{
|
|
333
|
+
onClickAway: isOpen ? () => {
|
|
334
|
+
return;
|
|
335
|
+
} : handleClose,
|
|
336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { width: fullWidth ? "100%" : "inherit", children: [
|
|
337
|
+
clickComponent ? (0, import_react2.cloneElement)(clickComponent, {
|
|
338
|
+
ref: btn,
|
|
339
|
+
onClick: handleClick,
|
|
340
|
+
collapse: open
|
|
341
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
342
|
+
import_material4.Button,
|
|
343
|
+
{
|
|
344
|
+
ref: btn,
|
|
345
|
+
"aria-controls": open ? "basic-menu" : void 0,
|
|
346
|
+
"aria-haspopup": "true",
|
|
347
|
+
"aria-expanded": open ? "true" : void 0,
|
|
348
|
+
onClick: handleClick,
|
|
349
|
+
disableRipple: true,
|
|
350
|
+
fullWidth: true,
|
|
351
|
+
sx: {
|
|
352
|
+
height: small ? "34px" : "38px",
|
|
353
|
+
padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
|
|
354
|
+
},
|
|
355
|
+
className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
358
|
+
import_material4.Typography,
|
|
359
|
+
{
|
|
360
|
+
width: "200px",
|
|
361
|
+
className: "text-sm leading-4 truncate text-left",
|
|
362
|
+
children: placeholder
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
colorBorder ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(search_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
366
|
+
dropdown_arrow_default,
|
|
367
|
+
{
|
|
368
|
+
style: {
|
|
369
|
+
transform: open ? "scaleY(-1)" : "scaleY(1)",
|
|
370
|
+
transition: "0.3s ease-in-out"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
),
|
|
377
|
+
btn ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
378
|
+
import_material4.Paper,
|
|
379
|
+
{
|
|
380
|
+
sx: {
|
|
381
|
+
position: "absolute",
|
|
382
|
+
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
383
|
+
left: fullContainerWidth ? 0 : "initial",
|
|
384
|
+
right: fullContainerWidth ? 0 : "initial",
|
|
385
|
+
top: overButton ? 0 : "initial"
|
|
386
|
+
},
|
|
387
|
+
className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
|
|
388
|
+
children: [
|
|
389
|
+
intermediateChild ? intermediateChild : null,
|
|
390
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
|
|
391
|
+
overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
392
|
+
IconButton_default,
|
|
393
|
+
{
|
|
394
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
395
|
+
onClick: isOpen ? () => {
|
|
396
|
+
return;
|
|
397
|
+
} : handleClose,
|
|
398
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
|
|
399
|
+
}
|
|
400
|
+
) : null,
|
|
401
|
+
childTitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
402
|
+
import_material4.Typography,
|
|
403
|
+
{
|
|
404
|
+
className: "text-sm font-normal text-accent-silver-2",
|
|
405
|
+
children: childTitle
|
|
406
|
+
}
|
|
407
|
+
) : null,
|
|
408
|
+
childrenWithHandleChange
|
|
409
|
+
] })
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
) : null
|
|
413
|
+
] })
|
|
414
|
+
}
|
|
415
|
+
);
|
|
407
416
|
};
|
|
408
417
|
var SelectPro_default = SelectPro;
|
|
409
418
|
|
|
@@ -413,7 +422,8 @@ var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
|
413
422
|
var StyledChip = (0, import_material5.styled)(import_material5.Chip)(({ theme: theme2 }) => ({
|
|
414
423
|
borderRadius: theme2.shape.borderRadius,
|
|
415
424
|
".MuiChip-label": { padding: 0 },
|
|
416
|
-
".MuiChip-icon": { margin: "0 6px 0 0" }
|
|
425
|
+
".MuiChip-icon": { margin: "0 6px 0 0" },
|
|
426
|
+
".MuiChip-deleteIcon": { margin: "0 0 0 10px" }
|
|
417
427
|
}));
|
|
418
428
|
var ChipViews = {
|
|
419
429
|
black: "bg-accent-dark text-accent-white py-1.5 px-4",
|
|
@@ -425,9 +435,11 @@ var CustomChip = (props) => {
|
|
|
425
435
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
426
436
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
427
437
|
StyledChip,
|
|
428
|
-
__spreadValues({
|
|
429
|
-
className: `rounded-none w-fit
|
|
430
|
-
}, rest)
|
|
438
|
+
__spreadProps(__spreadValues({
|
|
439
|
+
className: `rounded-none w-fit px-2.5 py-0 text-14 h-[28px] ${ChipViews[view]}`
|
|
440
|
+
}, rest), {
|
|
441
|
+
deleteIcon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(close_default, {})
|
|
442
|
+
})
|
|
431
443
|
);
|
|
432
444
|
};
|
|
433
445
|
var Chip_default = CustomChip;
|
|
@@ -1327,7 +1339,6 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1327
1339
|
} = props;
|
|
1328
1340
|
const { field } = (0, import_react_hook_form3.useController)(props);
|
|
1329
1341
|
const handleFormat = (_event, newFormats) => {
|
|
1330
|
-
console.log(newFormats);
|
|
1331
1342
|
if (newFormats !== null) field.onChange(newFormats);
|
|
1332
1343
|
if (collapseOnClick && collapseParent) collapseParent();
|
|
1333
1344
|
};
|
|
@@ -1364,7 +1375,7 @@ var BpCheckedIcon = (0, import_material31.styled)(BpIcon)({
|
|
|
1364
1375
|
width: 16,
|
|
1365
1376
|
height: 16,
|
|
1366
1377
|
display: "flex",
|
|
1367
|
-
alignItems: "center",
|
|
1378
|
+
// alignItems: "center",
|
|
1368
1379
|
justifyContent: "center",
|
|
1369
1380
|
content: `url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.66667L4.82353 8L11 1' stroke='%23343434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`
|
|
1370
1381
|
}
|
|
@@ -1375,7 +1386,7 @@ var CustomCheckbox = (props) => {
|
|
|
1375
1386
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1376
1387
|
import_material31.FormControlLabel,
|
|
1377
1388
|
__spreadProps(__spreadValues({
|
|
1378
|
-
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1389
|
+
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1379
1390
|
control: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1380
1391
|
import_Checkbox.default,
|
|
1381
1392
|
__spreadProps(__spreadValues({}, checkboxProps), {
|
package/dist/index.mjs
CHANGED
|
@@ -243,7 +243,8 @@ var SelectPro = ({
|
|
|
243
243
|
small = false,
|
|
244
244
|
fullWidth = false,
|
|
245
245
|
freeChildWidth = false,
|
|
246
|
-
isOpen
|
|
246
|
+
isOpen,
|
|
247
|
+
intermediateChild
|
|
247
248
|
}) => {
|
|
248
249
|
const [btn, setAnchorEl] = useState2(null);
|
|
249
250
|
const [open, setOpen] = useState2(false);
|
|
@@ -258,7 +259,6 @@ var SelectPro = ({
|
|
|
258
259
|
setOpen(!open);
|
|
259
260
|
};
|
|
260
261
|
const handleClose = () => {
|
|
261
|
-
if (isOpen) return;
|
|
262
262
|
setOpen(false);
|
|
263
263
|
setTimeout(() => {
|
|
264
264
|
setAnchorEl(null);
|
|
@@ -267,83 +267,92 @@ var SelectPro = ({
|
|
|
267
267
|
const childrenWithHandleChange = isValidElement(children) ? cloneElement(children, {
|
|
268
268
|
collapseParent: handleClose
|
|
269
269
|
}) : children;
|
|
270
|
-
return /* @__PURE__ */ jsx7(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
className:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
270
|
+
return /* @__PURE__ */ jsx7(
|
|
271
|
+
ClickAwayListener,
|
|
272
|
+
{
|
|
273
|
+
onClickAway: isOpen ? () => {
|
|
274
|
+
return;
|
|
275
|
+
} : handleClose,
|
|
276
|
+
children: /* @__PURE__ */ jsxs3(Box, { width: fullWidth ? "100%" : "inherit", children: [
|
|
277
|
+
clickComponent ? cloneElement(clickComponent, {
|
|
278
|
+
ref: btn,
|
|
279
|
+
onClick: handleClick,
|
|
280
|
+
collapse: open
|
|
281
|
+
}) : /* @__PURE__ */ jsxs3(
|
|
282
|
+
Button2,
|
|
283
|
+
{
|
|
284
|
+
ref: btn,
|
|
285
|
+
"aria-controls": open ? "basic-menu" : void 0,
|
|
286
|
+
"aria-haspopup": "true",
|
|
287
|
+
"aria-expanded": open ? "true" : void 0,
|
|
288
|
+
onClick: handleClick,
|
|
289
|
+
disableRipple: true,
|
|
290
|
+
fullWidth: true,
|
|
291
|
+
sx: {
|
|
292
|
+
height: small ? "34px" : "38px",
|
|
293
|
+
padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
|
|
294
|
+
},
|
|
295
|
+
className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ jsx7(
|
|
298
|
+
Typography2,
|
|
299
|
+
{
|
|
300
|
+
width: "200px",
|
|
301
|
+
className: "text-sm leading-4 truncate text-left",
|
|
302
|
+
children: placeholder
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
colorBorder ? /* @__PURE__ */ jsx7(search_default, {}) : /* @__PURE__ */ jsx7(
|
|
306
|
+
dropdown_arrow_default,
|
|
307
|
+
{
|
|
308
|
+
style: {
|
|
309
|
+
transform: open ? "scaleY(-1)" : "scaleY(1)",
|
|
310
|
+
transition: "0.3s ease-in-out"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
btn ? /* @__PURE__ */ jsxs3(
|
|
318
|
+
Paper,
|
|
319
|
+
{
|
|
320
|
+
sx: {
|
|
321
|
+
position: "absolute",
|
|
322
|
+
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
323
|
+
left: fullContainerWidth ? 0 : "initial",
|
|
324
|
+
right: fullContainerWidth ? 0 : "initial",
|
|
325
|
+
top: overButton ? 0 : "initial"
|
|
326
|
+
},
|
|
327
|
+
className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
|
|
328
|
+
children: [
|
|
329
|
+
intermediateChild ? intermediateChild : null,
|
|
330
|
+
/* @__PURE__ */ jsxs3(Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
|
|
331
|
+
overButton ? /* @__PURE__ */ jsx7(
|
|
332
|
+
IconButton_default,
|
|
333
|
+
{
|
|
334
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
335
|
+
onClick: isOpen ? () => {
|
|
336
|
+
return;
|
|
337
|
+
} : handleClose,
|
|
338
|
+
children: /* @__PURE__ */ jsx7(close_default, {})
|
|
339
|
+
}
|
|
340
|
+
) : null,
|
|
341
|
+
childTitle ? /* @__PURE__ */ jsx7(
|
|
342
|
+
Typography2,
|
|
343
|
+
{
|
|
344
|
+
className: "text-sm font-normal text-accent-silver-2",
|
|
345
|
+
children: childTitle
|
|
346
|
+
}
|
|
347
|
+
) : null,
|
|
348
|
+
childrenWithHandleChange
|
|
349
|
+
] })
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
) : null
|
|
353
|
+
] })
|
|
354
|
+
}
|
|
355
|
+
);
|
|
347
356
|
};
|
|
348
357
|
var SelectPro_default = SelectPro;
|
|
349
358
|
|
|
@@ -353,7 +362,8 @@ import { jsx as jsx8 } from "react/jsx-runtime";
|
|
|
353
362
|
var StyledChip = styled4(Chip)(({ theme: theme2 }) => ({
|
|
354
363
|
borderRadius: theme2.shape.borderRadius,
|
|
355
364
|
".MuiChip-label": { padding: 0 },
|
|
356
|
-
".MuiChip-icon": { margin: "0 6px 0 0" }
|
|
365
|
+
".MuiChip-icon": { margin: "0 6px 0 0" },
|
|
366
|
+
".MuiChip-deleteIcon": { margin: "0 0 0 10px" }
|
|
357
367
|
}));
|
|
358
368
|
var ChipViews = {
|
|
359
369
|
black: "bg-accent-dark text-accent-white py-1.5 px-4",
|
|
@@ -365,9 +375,11 @@ var CustomChip = (props) => {
|
|
|
365
375
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
366
376
|
return /* @__PURE__ */ jsx8(
|
|
367
377
|
StyledChip,
|
|
368
|
-
__spreadValues({
|
|
369
|
-
className: `rounded-none w-fit
|
|
370
|
-
}, rest)
|
|
378
|
+
__spreadProps(__spreadValues({
|
|
379
|
+
className: `rounded-none w-fit px-2.5 py-0 text-14 h-[28px] ${ChipViews[view]}`
|
|
380
|
+
}, rest), {
|
|
381
|
+
deleteIcon: /* @__PURE__ */ jsx8(close_default, {})
|
|
382
|
+
})
|
|
371
383
|
);
|
|
372
384
|
};
|
|
373
385
|
var Chip_default = CustomChip;
|
|
@@ -1191,7 +1203,9 @@ var ListItem_default = ListItem;
|
|
|
1191
1203
|
|
|
1192
1204
|
// src/components/ToggleButton/ToggleButtonsWithLabel.tsx
|
|
1193
1205
|
import { Stack as Stack6 } from "@mui/material";
|
|
1194
|
-
import {
|
|
1206
|
+
import {
|
|
1207
|
+
useController as useController3
|
|
1208
|
+
} from "react-hook-form";
|
|
1195
1209
|
import Typography17 from "@mui/material/Typography";
|
|
1196
1210
|
|
|
1197
1211
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
@@ -1279,7 +1293,6 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1279
1293
|
} = props;
|
|
1280
1294
|
const { field } = useController3(props);
|
|
1281
1295
|
const handleFormat = (_event, newFormats) => {
|
|
1282
|
-
console.log(newFormats);
|
|
1283
1296
|
if (newFormats !== null) field.onChange(newFormats);
|
|
1284
1297
|
if (collapseOnClick && collapseParent) collapseParent();
|
|
1285
1298
|
};
|
|
@@ -1316,7 +1329,7 @@ var BpCheckedIcon = styled11(BpIcon)({
|
|
|
1316
1329
|
width: 16,
|
|
1317
1330
|
height: 16,
|
|
1318
1331
|
display: "flex",
|
|
1319
|
-
alignItems: "center",
|
|
1332
|
+
// alignItems: "center",
|
|
1320
1333
|
justifyContent: "center",
|
|
1321
1334
|
content: `url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.66667L4.82353 8L11 1' stroke='%23343434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`
|
|
1322
1335
|
}
|
|
@@ -1327,7 +1340,7 @@ var CustomCheckbox = (props) => {
|
|
|
1327
1340
|
return /* @__PURE__ */ jsx47(
|
|
1328
1341
|
FormControlLabel2,
|
|
1329
1342
|
__spreadProps(__spreadValues({
|
|
1330
|
-
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1343
|
+
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1331
1344
|
control: /* @__PURE__ */ jsx47(
|
|
1332
1345
|
Checkbox,
|
|
1333
1346
|
__spreadProps(__spreadValues({}, checkboxProps), {
|