react-better-html 1.1.217 → 1.1.218

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.mjs CHANGED
@@ -21,13 +21,13 @@ import {
21
21
  } from "react-better-core";
22
22
 
23
23
  // src/components/BetterHtmlProvider.tsx
24
- import { createContext, memo as memo11, useCallback as useCallback5, useContext, useEffect as useEffect5, useMemo as useMemo3, useState as useState3 } from "react";
24
+ import { createContext, memo as memo12, useCallback as useCallback6, useContext, useEffect as useEffect5, useMemo as useMemo3, useState as useState4 } from "react";
25
25
  import {
26
26
  useBooleanState as useBooleanState2,
27
27
  colorThemeControls,
28
- useTheme as useTheme12,
28
+ useTheme as useTheme13,
29
29
  BetterCoreProvider,
30
- useBetterCoreContext as useBetterCoreContext4
30
+ useBetterCoreContext as useBetterCoreContext5
31
31
  } from "react-better-core";
32
32
  import { createGlobalStyle } from "styled-components";
33
33
 
@@ -38,6 +38,9 @@ var appConfig = {
38
38
  var defaultAlertDuration = 2.3 * 1e3;
39
39
  var defaultSideMenuWidth = 300;
40
40
 
41
+ // src/constants/theme.ts
42
+ var theme = {};
43
+
41
44
  // src/constants/icons.ts
42
45
  var icons = {
43
46
  uploadCloud: {
@@ -116,13 +119,13 @@ var icons = {
116
119
  var assets = {};
117
120
 
118
121
  // src/components/alerts/AlertsHolder.tsx
119
- import { memo as memo10 } from "react";
120
- import { useTheme as useTheme11 } from "react-better-core";
122
+ import { memo as memo11 } from "react";
123
+ import { useTheme as useTheme12 } from "react-better-core";
121
124
 
122
125
  // src/components/Div.tsx
123
- import { forwardRef as forwardRef5, memo as memo5, useCallback as useCallback2 } from "react";
124
- import { useTheme as useTheme6 } from "react-better-core";
125
- import styled3 from "styled-components";
126
+ import { forwardRef as forwardRef6, memo as memo6, useCallback as useCallback2 } from "react";
127
+ import { useTheme as useTheme7 } from "react-better-core";
128
+ import styled4 from "styled-components";
126
129
 
127
130
  // src/constants.ts
128
131
  var isMobileDevice = /Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
@@ -804,7 +807,7 @@ var cssPropsToExclude = /* @__PURE__ */ new Set([
804
807
 
805
808
  // src/utils/hooks.ts
806
809
  function useComponentPropsGrouper(props, excludeStyleProps) {
807
- const theme = useTheme();
810
+ const theme2 = useTheme();
808
811
  return useMemo(() => {
809
812
  const style = {};
810
813
  const hoverStyle = {};
@@ -831,8 +834,8 @@ function useComponentPropsGrouper(props, excludeStyleProps) {
831
834
  }
832
835
  }
833
836
  if (haveHover && !style.transition) {
834
- style.transition = theme.styles.transition;
835
- style.WebkitTransition = theme.styles.transition;
837
+ style.transition = theme2.styles.transition;
838
+ style.WebkitTransition = theme2.styles.transition;
836
839
  }
837
840
  return {
838
841
  style,
@@ -854,7 +857,7 @@ function useComponentPropsWithPrefix(props, prefix) {
854
857
  }, [props, prefix]);
855
858
  }
856
859
  function useComponentInputFieldDateProps(props, holderRef, disabled) {
857
- const theme = useTheme();
860
+ const theme2 = useTheme();
858
861
  const [isOpen, setIsOpen] = useBooleanState();
859
862
  const [isOpenLate, setIsOpenLate] = useBooleanState();
860
863
  const [isFocused, setIsFocused] = useBooleanState();
@@ -885,13 +888,13 @@ function useComponentInputFieldDateProps(props, holderRef, disabled) {
885
888
  );
886
889
  const insideInputFieldComponentProps = useMemo(
887
890
  () => ({
888
- border: `1px solid ${isFocused ? theme.colors.primary : theme.colors.border}`,
891
+ border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
889
892
  borderTop: "none",
890
893
  opacity: !isOpen ? 0 : void 0,
891
894
  pointerEvents: !isOpen ? "none" : void 0,
892
895
  transform: `translateY(${!isOpen ? -10 : 0}px)`,
893
896
  zIndex: 1e3,
894
- transition: theme.styles.transition
897
+ transition: theme2.styles.transition
895
898
  }),
896
899
  [isOpen, isFocused]
897
900
  );
@@ -1311,8 +1314,8 @@ var TextComponent = forwardRef(function Text({ htmlContentTranslate, children, .
1311
1314
  );
1312
1315
  });
1313
1316
  TextComponent.unknown = forwardRef(function Unknown(props, ref) {
1314
- const theme = useTheme2();
1315
- return /* @__PURE__ */ jsx(TextComponent, { fontStyle: "italic", textAlign: "center", color: theme.colors.textSecondary, ref, ...props });
1317
+ const theme2 = useTheme2();
1318
+ return /* @__PURE__ */ jsx(TextComponent, { fontStyle: "italic", textAlign: "center", color: theme2.colors.textSecondary, ref, ...props });
1316
1319
  });
1317
1320
  TextComponent.oneLine = forwardRef(function OneLine(props, ref) {
1318
1321
  return /* @__PURE__ */ jsx(TextComponent, { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", ref, ...props });
@@ -1327,14 +1330,14 @@ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
1327
1330
  var Divider_default = {
1328
1331
  vertical: memo2(
1329
1332
  forwardRef2(function Divider({ width = 1, backgroundColor, height, ...props }, ref) {
1330
- const theme = useTheme3();
1333
+ const theme2 = useTheme3();
1331
1334
  return /* @__PURE__ */ jsx2(
1332
1335
  Div_default,
1333
1336
  {
1334
1337
  width,
1335
1338
  height: height ?? "100%",
1336
1339
  flexShrink: 0,
1337
- backgroundColor: backgroundColor ?? theme.colors.border,
1340
+ backgroundColor: backgroundColor ?? theme2.colors.border,
1338
1341
  ...props,
1339
1342
  ref
1340
1343
  }
@@ -1343,19 +1346,19 @@ var Divider_default = {
1343
1346
  ),
1344
1347
  horizontal: memo2(
1345
1348
  forwardRef2(function Divider2({ width = 1, backgroundColor, text, textFontSize, textColor, ...props }, ref) {
1346
- const theme = useTheme3();
1347
- return /* @__PURE__ */ jsxs(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme.styles.space : void 0, ...props, ref, children: [
1348
- /* @__PURE__ */ jsx2(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme.colors.border }),
1349
- text && /* @__PURE__ */ jsx2(Text_default, { fontSize: textFontSize, color: textColor ?? theme.colors.textSecondary, children: text }),
1350
- /* @__PURE__ */ jsx2(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme.colors.border })
1349
+ const theme2 = useTheme3();
1350
+ return /* @__PURE__ */ jsxs(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
1351
+ /* @__PURE__ */ jsx2(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
1352
+ text && /* @__PURE__ */ jsx2(Text_default, { fontSize: textFontSize, color: textColor ?? theme2.colors.textSecondary, children: text }),
1353
+ /* @__PURE__ */ jsx2(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
1351
1354
  ] });
1352
1355
  })
1353
1356
  )
1354
1357
  };
1355
1358
 
1356
1359
  // src/components/PageHeader.tsx
1357
- import { forwardRef as forwardRef4, memo as memo4 } from "react";
1358
- import { useTheme as useTheme5 } from "react-better-core";
1360
+ import { forwardRef as forwardRef5, memo as memo5 } from "react";
1361
+ import { useTheme as useTheme6 } from "react-better-core";
1359
1362
 
1360
1363
  // src/components/Image.tsx
1361
1364
  import { forwardRef as forwardRef3, memo as memo3, useEffect as useEffect2 } from "react";
@@ -1401,19 +1404,19 @@ var Image = forwardRef3(function Image2({ name, src, ...props }, ref) {
1401
1404
  );
1402
1405
  });
1403
1406
  Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, backgroundColor, ...props }, ref) {
1404
- const theme = useTheme4();
1407
+ const theme2 = useTheme4();
1405
1408
  return letters ? /* @__PURE__ */ jsx3(
1406
1409
  Div_default.row,
1407
1410
  {
1408
- width: size,
1409
- height: size,
1410
- backgroundColor: backgroundColor ?? theme.colors.backgroundSecondary,
1411
- border: `solid 1px ${theme.colors.border}`,
1411
+ backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
1412
+ border: `solid 1px ${theme2.colors.border}`,
1412
1413
  borderRadius: 999,
1413
1414
  alignItems: "center",
1414
1415
  justifyContent: "center",
1415
1416
  ref,
1416
1417
  ...props,
1418
+ width: size,
1419
+ height: size,
1417
1420
  children: /* @__PURE__ */ jsx3(Text_default, { fontSize: size / 2.5, fontWeight: 700, children: letters.toUpperCase().slice(0, 2) })
1418
1421
  }
1419
1422
  ) : /* @__PURE__ */ jsx3(
@@ -1421,7 +1424,7 @@ Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, bac
1421
1424
  {
1422
1425
  width: size,
1423
1426
  height: size,
1424
- border: `solid 1px ${theme.colors.border}`,
1427
+ border: `solid 1px ${theme2.colors.border}`,
1425
1428
  borderRadius: 999,
1426
1429
  objectFit: "cover",
1427
1430
  ref,
@@ -1433,11 +1436,89 @@ var MemoizedImage = memo3(Image);
1433
1436
  MemoizedImage.profileImage = Image.profileImage;
1434
1437
  var Image_default = { Image: MemoizedImage }.Image;
1435
1438
 
1439
+ // src/components/Icon.tsx
1440
+ import { forwardRef as forwardRef4, memo as memo4, useEffect as useEffect3 } from "react";
1441
+ import { useBetterCoreContext as useBetterCoreContext2, useTheme as useTheme5 } from "react-better-core";
1442
+ import styled3 from "styled-components";
1443
+ import { jsx as jsx4 } from "react/jsx-runtime";
1444
+ import { createElement } from "react";
1445
+ var IconElement = styled3.svg.withConfig({
1446
+ shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "hoverColor"].includes(prop)
1447
+ })`
1448
+ ${(props) => props.style}
1449
+
1450
+ path {
1451
+ ${(props) => props.hoverColor ? `transition: ${props.theme.styles.transition};` : ""}
1452
+ }
1453
+
1454
+ &:hover {
1455
+ path.react-better-html-icon-path-with-fill {
1456
+ fill: ${(props) => props.hoverColor};
1457
+ }
1458
+
1459
+ path.react-better-html-icon-path-with-stroke {
1460
+ stroke: ${(props) => props.hoverColor};
1461
+ }
1462
+ }
1463
+
1464
+ &:hover {
1465
+ ${(props) => props.hoverStyle}
1466
+ }
1467
+ `;
1468
+ var Icon = forwardRef4(function Icon2({ name, size = 16, ...props }, ref) {
1469
+ const theme2 = useTheme5();
1470
+ const { icons: icons2 } = useBetterCoreContext2();
1471
+ const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
1472
+ const dataProps = useComponentPropsWithPrefix(restProps, "data");
1473
+ const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
1474
+ const svgColor = props.color ?? theme2.colors.textPrimary;
1475
+ const svgHoverColorColor = props.colorHover;
1476
+ useEffect3(() => {
1477
+ if (!icons2[name.toString()])
1478
+ console.warn(
1479
+ `The icon \`${name}\` you are trying to use does not exist. Make sure to add it to the \`icons\` object in \`<BetterHtmlProvider>\` config value prop.`
1480
+ );
1481
+ }, [icons2, name]);
1482
+ return /* @__PURE__ */ jsx4(
1483
+ IconElement,
1484
+ {
1485
+ width: size,
1486
+ height: size,
1487
+ viewBox: `0 0 ${icons2[name.toString()]?.width ?? 0} ${icons2[name.toString()]?.height ?? 0}`,
1488
+ fill: "none",
1489
+ xmlns: "http://www.w3.org/2000/svg",
1490
+ theme: theme2,
1491
+ hoverColor: svgHoverColorColor,
1492
+ style,
1493
+ hoverStyle,
1494
+ ...restProps,
1495
+ ...dataProps,
1496
+ ...ariaProps,
1497
+ ref,
1498
+ children: icons2[name.toString()]?.paths.map((path) => /* @__PURE__ */ createElement(
1499
+ "path",
1500
+ {
1501
+ ...path,
1502
+ className: path.type === "fill" ? "react-better-html-icon-path-with-fill" : "react-better-html-icon-path-with-stroke",
1503
+ fill: path.type === "fill" ? svgColor : void 0,
1504
+ stroke: path.type === "stroke" ? svgColor : void 0,
1505
+ key: path.d
1506
+ }
1507
+ ))
1508
+ }
1509
+ );
1510
+ });
1511
+ var MemoizedIcon = memo4(Icon);
1512
+ var Icon_default = { Icon: MemoizedIcon }.Icon;
1513
+
1436
1514
  // src/components/PageHeader.tsx
1437
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1438
- var PageHeaderComponent = forwardRef4(function PageHeader({
1515
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
1516
+ var PageHeaderComponent = forwardRef5(function PageHeader({
1517
+ icon,
1518
+ image,
1439
1519
  imageUrl,
1440
1520
  imageSize = 60,
1521
+ imageAzProfileImage,
1441
1522
  title,
1442
1523
  titleAs = "h1",
1443
1524
  titleColor,
@@ -1449,38 +1530,51 @@ var PageHeaderComponent = forwardRef4(function PageHeader({
1449
1530
  lightMode,
1450
1531
  marginBottom
1451
1532
  }, ref) {
1452
- const theme = useTheme5();
1533
+ const theme2 = useTheme6();
1453
1534
  const { app } = useBetterHtmlContextInternal();
1454
1535
  const mediaQuery = useMediaQuery();
1536
+ const ImageTag = imageAzProfileImage ? Image_default.profileImage : Image_default;
1537
+ const readyImageSize = imageSize ?? (mediaQuery.size600 ? 46 : 60);
1455
1538
  return /* @__PURE__ */ jsxs2(
1456
1539
  Div_default.row,
1457
1540
  {
1458
1541
  alignItems: "center",
1459
- gap: theme.styles.space,
1460
- marginBottom: marginBottom ?? theme.styles.space * 2,
1542
+ gap: theme2.styles.space,
1543
+ marginBottom: marginBottom ?? theme2.styles.space * 2,
1461
1544
  ref,
1462
1545
  children: [
1463
- imageUrl && /* @__PURE__ */ jsx4(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
1546
+ icon && /* @__PURE__ */ jsx5(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
1547
+ (image || imageUrl) && /* @__PURE__ */ jsx5(
1548
+ ImageTag,
1549
+ {
1550
+ name: image,
1551
+ src: imageUrl,
1552
+ width: readyImageSize,
1553
+ height: readyImageSize,
1554
+ size: readyImageSize,
1555
+ flexShrink: 0
1556
+ }
1557
+ ),
1464
1558
  /* @__PURE__ */ jsxs2(
1465
1559
  Div_default.column,
1466
1560
  {
1467
1561
  alignItems: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
1468
1562
  flex: 1,
1469
- gap: theme.styles.gap / 2,
1563
+ gap: theme2.styles.gap / 2,
1470
1564
  children: [
1471
1565
  /* @__PURE__ */ jsxs2(
1472
1566
  Div_default.row,
1473
1567
  {
1474
1568
  alignItems: "center",
1475
1569
  justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
1476
- gap: theme.styles.space,
1570
+ gap: theme2.styles.space,
1477
1571
  children: [
1478
- /* @__PURE__ */ jsx4(
1572
+ /* @__PURE__ */ jsx5(
1479
1573
  Text_default,
1480
1574
  {
1481
1575
  as: titleAs,
1482
1576
  textAlign,
1483
- color: titleColor ?? (lightMode ? theme.colors.base : theme.colors.textPrimary),
1577
+ color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
1484
1578
  children: title
1485
1579
  }
1486
1580
  ),
@@ -1488,12 +1582,12 @@ var PageHeaderComponent = forwardRef4(function PageHeader({
1488
1582
  ]
1489
1583
  }
1490
1584
  ),
1491
- description && /* @__PURE__ */ jsx4(
1585
+ description && /* @__PURE__ */ jsx5(
1492
1586
  Text_default,
1493
1587
  {
1494
1588
  maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
1495
1589
  textAlign,
1496
- color: descriptionColor ?? (lightMode ? theme.colors.base : theme.colors.textSecondary),
1590
+ color: descriptionColor ?? (lightMode ? theme2.colors.base : theme2.colors.textSecondary),
1497
1591
  opacity: lightMode ? 0.7 : void 0,
1498
1592
  children: description
1499
1593
  }
@@ -1506,12 +1600,12 @@ var PageHeaderComponent = forwardRef4(function PageHeader({
1506
1600
  }
1507
1601
  );
1508
1602
  });
1509
- var PageHeader2 = memo4(PageHeaderComponent);
1603
+ var PageHeader2 = memo5(PageHeaderComponent);
1510
1604
  var PageHeader_default = PageHeader2;
1511
1605
 
1512
1606
  // src/components/Div.tsx
1513
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1514
- var DivStyledComponent = styled3.div.withConfig({
1607
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
1608
+ var DivStyledComponent = styled4.div.withConfig({
1515
1609
  shouldForwardProp: (prop) => !["style", "hoverStyle"].includes(prop)
1516
1610
  })`
1517
1611
  ${(props) => props.style}
@@ -1520,7 +1614,7 @@ var DivStyledComponent = styled3.div.withConfig({
1520
1614
  ${(props) => props.hoverStyle}
1521
1615
  }
1522
1616
  `;
1523
- var DivComponent = forwardRef5(function Div({
1617
+ var DivComponent = forwardRef6(function Div({
1524
1618
  as = "div",
1525
1619
  value,
1526
1620
  isTabAccessed,
@@ -1553,7 +1647,7 @@ var DivComponent = forwardRef5(function Div({
1553
1647
  },
1554
1648
  [onKeyDown, isTabAccessed]
1555
1649
  );
1556
- return /* @__PURE__ */ jsx5(
1650
+ return /* @__PURE__ */ jsx6(
1557
1651
  DivStyledComponent,
1558
1652
  {
1559
1653
  as,
@@ -1572,9 +1666,9 @@ var DivComponent = forwardRef5(function Div({
1572
1666
  }
1573
1667
  );
1574
1668
  });
1575
- DivComponent.row = forwardRef5(function Row({ flexReverse, invertFlexDirection, ...props }, ref) {
1669
+ DivComponent.row = forwardRef6(function Row({ flexReverse, invertFlexDirection, ...props }, ref) {
1576
1670
  const reverseSuffix = flexReverse ? "-reverse" : "";
1577
- return /* @__PURE__ */ jsx5(
1671
+ return /* @__PURE__ */ jsx6(
1578
1672
  DivComponent,
1579
1673
  {
1580
1674
  display: "flex",
@@ -1584,9 +1678,9 @@ DivComponent.row = forwardRef5(function Row({ flexReverse, invertFlexDirection,
1584
1678
  }
1585
1679
  );
1586
1680
  });
1587
- DivComponent.column = forwardRef5(function Column({ flexReverse, invertFlexDirection, ...props }, ref) {
1681
+ DivComponent.column = forwardRef6(function Column({ flexReverse, invertFlexDirection, ...props }, ref) {
1588
1682
  const reverseSuffix = flexReverse ? "-reverse" : "";
1589
- return /* @__PURE__ */ jsx5(
1683
+ return /* @__PURE__ */ jsx6(
1590
1684
  DivComponent,
1591
1685
  {
1592
1686
  display: "flex",
@@ -1596,10 +1690,10 @@ DivComponent.column = forwardRef5(function Column({ flexReverse, invertFlexDirec
1596
1690
  }
1597
1691
  );
1598
1692
  });
1599
- DivComponent.grid = forwardRef5(function Grid(props, ref) {
1600
- return /* @__PURE__ */ jsx5(DivComponent, { display: "grid", ref, ...props });
1693
+ DivComponent.grid = forwardRef6(function Grid(props, ref) {
1694
+ return /* @__PURE__ */ jsx6(DivComponent, { display: "grid", ref, ...props });
1601
1695
  });
1602
- DivComponent.box = forwardRef5(function Box({
1696
+ DivComponent.box = forwardRef6(function Box({
1603
1697
  imageUrl,
1604
1698
  imageSize,
1605
1699
  title,
@@ -1616,20 +1710,20 @@ DivComponent.box = forwardRef5(function Box({
1616
1710
  children,
1617
1711
  ...props
1618
1712
  }, ref) {
1619
- const theme = useTheme6();
1713
+ const theme2 = useTheme7();
1620
1714
  const withClick = props.onClick || props.onClickWithValue;
1621
1715
  return /* @__PURE__ */ jsxs3(
1622
1716
  DivComponent,
1623
1717
  {
1624
- color: isActive ? theme.colors.base : void 0,
1625
- backgroundColor: isActive ? theme.colors.primary : theme.colors.backgroundContent,
1626
- border: `1px solid ${isActive ? theme.colors.primary : theme.colors.border}`,
1627
- borderRadius: theme.styles.borderRadius,
1628
- borderColorHover: withClick && !isActive ? theme.colors.primary : void 0,
1718
+ color: isActive ? theme2.colors.base : void 0,
1719
+ backgroundColor: isActive ? theme2.colors.primary : theme2.colors.backgroundContent,
1720
+ border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
1721
+ borderRadius: theme2.styles.borderRadius,
1722
+ borderColorHover: withClick && !isActive ? theme2.colors.primary : void 0,
1629
1723
  filterHover: withClick && isActive ? "brightness(0.9)" : void 0,
1630
1724
  cursor: withClick ? "pointer" : void 0,
1631
- paddingBlock: title ? theme.styles.space : theme.styles.gap,
1632
- paddingInline: theme.styles.space,
1725
+ paddingBlock: title ? theme2.styles.space : theme2.styles.gap,
1726
+ paddingInline: theme2.styles.space,
1633
1727
  ref,
1634
1728
  ...props,
1635
1729
  children: [
@@ -1637,15 +1731,15 @@ DivComponent.box = forwardRef5(function Box({
1637
1731
  Div2,
1638
1732
  {
1639
1733
  backgroundColor: headerBackgroundColor,
1640
- borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme.styles.borderRadius - 1,
1641
- borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme.styles.borderRadius - 1,
1642
- marginInline: -theme.styles.space,
1643
- marginTop: -theme.styles.space,
1644
- marginBottom: theme.styles.space,
1645
- paddingInline: theme.styles.space,
1646
- paddingTop: theme.styles.space,
1734
+ borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1735
+ borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
1736
+ marginInline: -theme2.styles.space,
1737
+ marginTop: -theme2.styles.space,
1738
+ marginBottom: theme2.styles.space,
1739
+ paddingInline: theme2.styles.space,
1740
+ paddingTop: theme2.styles.space,
1647
1741
  children: [
1648
- /* @__PURE__ */ jsx5(
1742
+ /* @__PURE__ */ jsx6(
1649
1743
  PageHeader_default,
1650
1744
  {
1651
1745
  imageUrl,
@@ -1659,10 +1753,10 @@ DivComponent.box = forwardRef5(function Box({
1659
1753
  textAlign,
1660
1754
  rightElement,
1661
1755
  lightMode,
1662
- marginBottom: theme.styles.space
1756
+ marginBottom: theme2.styles.space
1663
1757
  }
1664
1758
  ),
1665
- /* @__PURE__ */ jsx5(Div2, { width: `calc(100% + ${theme.styles.space * 2}px)`, marginLeft: -theme.styles.space, children: /* @__PURE__ */ jsx5(Divider_default.horizontal, {}) })
1759
+ /* @__PURE__ */ jsx6(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ jsx6(Divider_default.horizontal, {}) })
1666
1760
  ]
1667
1761
  }
1668
1762
  ),
@@ -1671,7 +1765,7 @@ DivComponent.box = forwardRef5(function Box({
1671
1765
  }
1672
1766
  );
1673
1767
  });
1674
- var Div2 = memo5(DivComponent);
1768
+ var Div2 = memo6(DivComponent);
1675
1769
  Div2.row = DivComponent.row;
1676
1770
  Div2.column = DivComponent.column;
1677
1771
  Div2.grid = DivComponent.grid;
@@ -1679,9 +1773,9 @@ Div2.box = DivComponent.box;
1679
1773
  var Div_default = Div2;
1680
1774
 
1681
1775
  // src/components/alerts/Alert.tsx
1682
- import { memo as memo9, useCallback as useCallback4, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef2, useState as useState2 } from "react";
1683
- import { useTheme as useTheme10 } from "react-better-core";
1684
- import styled7 from "styled-components";
1776
+ import { memo as memo10, useCallback as useCallback5, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
1777
+ import { useTheme as useTheme11 } from "react-better-core";
1778
+ import styled8 from "styled-components";
1685
1779
 
1686
1780
  // src/plugins/alerts.ts
1687
1781
  var defaultAlertsPluginOptions = {
@@ -1738,81 +1832,6 @@ var localStoragePlugin = (options) => ({
1738
1832
  })
1739
1833
  });
1740
1834
 
1741
- // src/components/Icon.tsx
1742
- import { forwardRef as forwardRef6, memo as memo6, useEffect as useEffect3 } from "react";
1743
- import { useBetterCoreContext as useBetterCoreContext2, useTheme as useTheme7 } from "react-better-core";
1744
- import styled4 from "styled-components";
1745
- import { jsx as jsx6 } from "react/jsx-runtime";
1746
- import { createElement } from "react";
1747
- var IconElement = styled4.svg.withConfig({
1748
- shouldForwardProp: (prop) => !["theme", "style", "hoverStyle", "hoverColor"].includes(prop)
1749
- })`
1750
- ${(props) => props.style}
1751
-
1752
- path {
1753
- ${(props) => props.hoverColor ? `transition: ${props.theme.styles.transition};` : ""}
1754
- }
1755
-
1756
- &:hover {
1757
- path.react-better-html-icon-path-with-fill {
1758
- fill: ${(props) => props.hoverColor};
1759
- }
1760
-
1761
- path.react-better-html-icon-path-with-stroke {
1762
- stroke: ${(props) => props.hoverColor};
1763
- }
1764
- }
1765
-
1766
- &:hover {
1767
- ${(props) => props.hoverStyle}
1768
- }
1769
- `;
1770
- var Icon = forwardRef6(function Icon2({ name, size = 16, ...props }, ref) {
1771
- const theme = useTheme7();
1772
- const { icons: icons2 } = useBetterCoreContext2();
1773
- const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
1774
- const dataProps = useComponentPropsWithPrefix(restProps, "data");
1775
- const ariaProps = useComponentPropsWithPrefix(restProps, "aria");
1776
- const svgColor = props.color ?? theme.colors.textPrimary;
1777
- const svgHoverColorColor = props.colorHover;
1778
- useEffect3(() => {
1779
- if (!icons2[name.toString()])
1780
- console.warn(
1781
- `The icon \`${name}\` you are trying to use does not exist. Make sure to add it to the \`icons\` object in \`<BetterHtmlProvider>\` config value prop.`
1782
- );
1783
- }, [icons2, name]);
1784
- return /* @__PURE__ */ jsx6(
1785
- IconElement,
1786
- {
1787
- width: size,
1788
- height: size,
1789
- viewBox: `0 0 ${icons2[name.toString()]?.width ?? 0} ${icons2[name.toString()]?.height ?? 0}`,
1790
- fill: "none",
1791
- xmlns: "http://www.w3.org/2000/svg",
1792
- theme,
1793
- hoverColor: svgHoverColorColor,
1794
- style,
1795
- hoverStyle,
1796
- ...restProps,
1797
- ...dataProps,
1798
- ...ariaProps,
1799
- ref,
1800
- children: icons2[name.toString()]?.paths.map((path) => /* @__PURE__ */ createElement(
1801
- "path",
1802
- {
1803
- ...path,
1804
- className: path.type === "fill" ? "react-better-html-icon-path-with-fill" : "react-better-html-icon-path-with-stroke",
1805
- fill: path.type === "fill" ? svgColor : void 0,
1806
- stroke: path.type === "stroke" ? svgColor : void 0,
1807
- key: path.d
1808
- }
1809
- ))
1810
- }
1811
- );
1812
- });
1813
- var MemoizedIcon = memo6(Icon);
1814
- var Icon_default = { Icon: MemoizedIcon }.Icon;
1815
-
1816
1835
  // src/components/Button.tsx
1817
1836
  import { memo as memo8, useCallback as useCallback3 } from "react";
1818
1837
  import {
@@ -1847,8 +1866,8 @@ var LoaderComponent = function Loader({
1847
1866
  disabled,
1848
1867
  ...props
1849
1868
  }) {
1850
- const theme = useTheme8();
1851
- const readyColor = color ?? theme.colors.textPrimary;
1869
+ const theme2 = useTheme8();
1870
+ const readyColor = color ?? theme2.colors.textPrimary;
1852
1871
  const readyWidth = width ?? size / 3;
1853
1872
  const mask = `radial-gradient(farthest-side, #0000 calc(100% - ${readyWidth}px), #000 0)`;
1854
1873
  return /* @__PURE__ */ jsx7(StyledDiv, { children: /* @__PURE__ */ jsx7(
@@ -1867,17 +1886,17 @@ var LoaderComponent = function Loader({
1867
1886
  ) });
1868
1887
  };
1869
1888
  LoaderComponent.box = function Box2({ text = "Loading...", size = 20, ...props }) {
1870
- const theme = useTheme8();
1871
- return /* @__PURE__ */ jsxs4(Div_default.column, { width: "100%", alignItems: "center", gap: theme.styles.gap, children: [
1889
+ const theme2 = useTheme8();
1890
+ return /* @__PURE__ */ jsxs4(Div_default.column, { width: "100%", alignItems: "center", gap: theme2.styles.gap, children: [
1872
1891
  /* @__PURE__ */ jsx7(Loader2, { size, ...props }),
1873
- text && /* @__PURE__ */ jsx7(Text_default, { textAlign: "center", color: props.color ?? theme.colors.textSecondary, children: text })
1892
+ text && /* @__PURE__ */ jsx7(Text_default, { textAlign: "center", color: props.color ?? theme2.colors.textSecondary, children: text })
1874
1893
  ] });
1875
1894
  };
1876
1895
  LoaderComponent.text = function LoaderText({ text = "Loading...", size = 14, ...props }) {
1877
- const theme = useTheme8();
1878
- return /* @__PURE__ */ jsxs4(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
1896
+ const theme2 = useTheme8();
1897
+ return /* @__PURE__ */ jsxs4(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
1879
1898
  /* @__PURE__ */ jsx7(Loader2, { size, ...props }),
1880
- text && /* @__PURE__ */ jsx7(Text_default, { textAlign: "center", color: props.color ?? theme.colors.textSecondary, children: text })
1899
+ text && /* @__PURE__ */ jsx7(Text_default, { textAlign: "center", color: props.color ?? theme2.colors.textSecondary, children: text })
1881
1900
  ] });
1882
1901
  };
1883
1902
  var Loader2 = memo7(LoaderComponent);
@@ -1961,7 +1980,7 @@ var ButtonComponent = function Button({
1961
1980
  onClickWithValue,
1962
1981
  ...props
1963
1982
  }) {
1964
- const theme = useTheme9();
1983
+ const theme2 = useTheme9();
1965
1984
  const isLoadingHook = useLoader(loaderName);
1966
1985
  const { components } = useBetterHtmlContextInternal();
1967
1986
  const { colorTheme } = useBetterCoreContext3();
@@ -1983,7 +2002,7 @@ var ButtonComponent = function Button({
1983
2002
  Icon_default,
1984
2003
  {
1985
2004
  name: icon,
1986
- color: iconColor ?? props.color ?? theme.colors.base,
2005
+ color: iconColor ?? props.color ?? theme2.colors.base,
1987
2006
  size: iconSize ?? parseInt(style.fontSize?.toString() ?? "16")
1988
2007
  }
1989
2008
  ) }) : void 0;
@@ -1991,7 +2010,7 @@ var ButtonComponent = function Button({
1991
2010
  Image_default,
1992
2011
  {
1993
2012
  name: image,
1994
- color: iconColor ?? props.color ?? theme.colors.base,
2013
+ color: iconColor ?? props.color ?? theme2.colors.base,
1995
2014
  width: imageWidth ?? parseInt(style.fontSize?.toString() ?? "16"),
1996
2015
  height: imageHeight
1997
2016
  }
@@ -2002,7 +2021,7 @@ var ButtonComponent = function Button({
2002
2021
  ButtonElement,
2003
2022
  {
2004
2023
  as: href ? linkComponentTag : buttonComponentTag,
2005
- theme,
2024
+ theme: theme2,
2006
2025
  colorTheme,
2007
2026
  isSmall,
2008
2027
  withText: text !== void 0,
@@ -2028,7 +2047,7 @@ var ButtonComponent = function Button({
2028
2047
  gap: 10,
2029
2048
  pointerEvents: "none",
2030
2049
  opacity: isLoadingElement ? 0 : 1,
2031
- transition: theme.styles.transition,
2050
+ transition: theme2.styles.transition,
2032
2051
  children: [
2033
2052
  iconPosition === "left" && iconComponent,
2034
2053
  imagePosition === "left" && imageComponent,
@@ -2050,11 +2069,11 @@ var ButtonComponent = function Button({
2050
2069
  alignItems: "center",
2051
2070
  justifyContent: "center",
2052
2071
  opacity: isLoadingElement ? 1 : 0,
2053
- transition: theme.styles.transition,
2072
+ transition: theme2.styles.transition,
2054
2073
  children: /* @__PURE__ */ jsx8(
2055
2074
  Loader_default,
2056
2075
  {
2057
- color: props.color ?? theme.colors.base,
2076
+ color: props.color ?? theme2.colors.base,
2058
2077
  size: loaderSize,
2059
2078
  disabled: !isLoadingElement
2060
2079
  }
@@ -2066,43 +2085,43 @@ var ButtonComponent = function Button({
2066
2085
  );
2067
2086
  };
2068
2087
  ButtonComponent.secondary = function Secondary({ className, ...props }) {
2069
- const theme = useTheme9();
2088
+ const theme2 = useTheme9();
2070
2089
  const betterHtmlContext2 = useBetterHtmlContextInternal();
2071
2090
  return /* @__PURE__ */ jsx8(
2072
2091
  ButtonComponent,
2073
2092
  {
2074
2093
  ...betterHtmlContext2.components.button?.style?.secondary,
2075
2094
  className: `secondary${className ? ` ${className}` : ""}`,
2076
- color: theme.colors.textPrimary,
2095
+ color: theme2.colors.textPrimary,
2077
2096
  ...props
2078
2097
  }
2079
2098
  );
2080
2099
  };
2081
2100
  ButtonComponent.destructive = function Destructive(props) {
2082
- const theme = useTheme9();
2101
+ const theme2 = useTheme9();
2083
2102
  const betterHtmlContext2 = useBetterHtmlContextInternal();
2084
2103
  return /* @__PURE__ */ jsx8(
2085
2104
  ButtonComponent,
2086
2105
  {
2087
2106
  ...betterHtmlContext2.components.button?.style?.destructive,
2088
- backgroundColor: theme.colors.error,
2089
- color: theme.colors.base,
2107
+ backgroundColor: theme2.colors.error,
2108
+ color: theme2.colors.base,
2090
2109
  ...props
2091
2110
  }
2092
2111
  );
2093
2112
  };
2094
2113
  ButtonComponent.icon = function Icon3({ size = 16, backgroundButtonColor, ...props }) {
2095
- const theme = useTheme9();
2114
+ const theme2 = useTheme9();
2096
2115
  const betterHtmlContext2 = useBetterHtmlContextInternal();
2097
- const buttonSize = size + theme.styles.space;
2098
- const backgroundButtonColorReady = backgroundButtonColor ?? theme.colors.textPrimary;
2116
+ const buttonSize = size + theme2.styles.space;
2117
+ const backgroundButtonColorReady = backgroundButtonColor ?? theme2.colors.textPrimary;
2099
2118
  return /* @__PURE__ */ jsx8(
2100
2119
  ButtonComponent,
2101
2120
  {
2102
2121
  ...betterHtmlContext2.components.button?.style?.icon,
2103
2122
  width: buttonSize,
2104
2123
  height: buttonSize,
2105
- color: theme.colors.textPrimary,
2124
+ color: theme2.colors.textPrimary,
2106
2125
  backgroundColor: backgroundButtonColorReady + "00",
2107
2126
  backgroundImage: "none",
2108
2127
  backgroundColorHover: backgroundButtonColorReady + "20",
@@ -2146,108 +2165,440 @@ Button2.icon = ButtonComponent.icon;
2146
2165
  Button2.upload = ButtonComponent.upload;
2147
2166
  var Button_default = Button2;
2148
2167
 
2149
- // src/components/alerts/Alert.tsx
2150
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
2151
- var StyledDiv2 = styled7.div.withConfig({
2152
- shouldForwardProp: (prop) => !["theme"].includes(prop)
2168
+ // src/components/Modal.tsx
2169
+ import { memo as memo9, useCallback as useCallback4, forwardRef as forwardRef7, useImperativeHandle, useRef as useRef2, useState as useState2 } from "react";
2170
+ import { createPortal } from "react-dom";
2171
+ import {
2172
+ useBetterCoreContext as useBetterCoreContext4,
2173
+ useTheme as useTheme10
2174
+ } from "react-better-core";
2175
+ import styled7 from "styled-components";
2176
+ import { Fragment, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
2177
+ var DialogStylesElement = styled7.dialog.withConfig({
2178
+ shouldForwardProp: (prop) => !["theme", "colorTheme", "opacity"].includes(prop)
2153
2179
  })`
2154
- @keyframes fadeInFromLeft {
2155
- from {
2156
- opacity: 0;
2157
- transform: translateX(-${(props) => props.theme.styles.space}px);
2158
- }
2159
- to {
2160
- opacity: 1;
2161
- transform: translateX(0px);
2162
- }
2163
- }
2164
-
2165
- @keyframes fadeInFromRight {
2166
- from {
2167
- opacity: 0;
2168
- transform: translateX(${(props) => props.theme.styles.space}px);
2169
- }
2170
- to {
2171
- opacity: 1;
2172
- transform: translateX(0px);
2173
- }
2174
- }
2180
+ width: 100%;
2181
+ max-width: none;
2182
+ height: 100%;
2183
+ max-height: none;
2184
+ color: ${(props) => props.theme.colors.textPrimary};
2185
+ border: none;
2186
+ outline: none;
2187
+ background-color: transparent;
2188
+ margin: auto auto;
2189
+ padding-inline: ${(props) => props.theme.styles.gap}px;
2190
+ opacity: ${(props) => props.opacity};
2191
+ transition: ${(props) => props.theme.styles.transition};
2175
2192
 
2176
- @keyframes fadeInFromTop {
2177
- from {
2178
- opacity: 0;
2179
- transform: translateY(-${(props) => props.theme.styles.space}px);
2180
- }
2181
- to {
2182
- opacity: 1;
2183
- transform: translateX(0px);
2184
- }
2193
+ &::backdrop {
2194
+ background-color: ${(props) => props.colorTheme === "light" ? "#000000a0" : "#222222e0"};
2195
+ opacity: ${(props) => props.opacity};
2196
+ transition: ${(props) => props.theme.styles.transition};
2185
2197
  }
2186
2198
 
2187
- @keyframes fadeInFromBottom {
2199
+ @keyframes fadeInAnimation {
2188
2200
  from {
2189
- opacity: 0;
2190
2201
  transform: translateY(${(props) => props.theme.styles.space}px);
2191
2202
  }
2192
2203
  to {
2193
- opacity: 1;
2194
- transform: translateY(0px);
2195
- }
2196
- }
2197
-
2198
- @keyframes fadeOutToLeft {
2199
- from {
2200
- opacity: 1;
2201
- transform: translateX(0px);
2202
- }
2203
- to {
2204
- opacity: 0;
2205
- transform: translateX(-${(props) => props.theme.styles.space}px);
2206
- }
2207
- }
2208
-
2209
- @keyframes fadeOutToRight {
2210
- from {
2211
- opacity: 1;
2212
- transform: translateX(0px);
2213
- }
2214
- to {
2215
- opacity: 0;
2216
- transform: translateX(${(props) => props.theme.styles.space}px);
2217
- }
2218
- }
2219
-
2220
- @keyframes fadeOutToTop {
2221
- from {
2222
- opacity: 1;
2223
2204
  transform: translateY(0px);
2224
2205
  }
2225
- to {
2226
- opacity: 0;
2227
- transform: translateY(-${(props) => props.theme.styles.space}px);
2228
- }
2229
2206
  }
2230
2207
 
2231
- @keyframes fadeOutToBottom {
2208
+ @keyframes fadeOutAnimation {
2232
2209
  from {
2233
- opacity: 1;
2234
2210
  transform: translateY(0px);
2235
2211
  }
2236
2212
  to {
2237
- opacity: 0;
2238
2213
  transform: translateY(${(props) => props.theme.styles.space}px);
2239
2214
  }
2240
2215
  }
2241
2216
  `;
2242
- var minWidth = 250;
2243
- var updateInterval = 20;
2244
- var getAnimationInName = (position) => ({
2245
- left: "fadeInFromLeft",
2246
- right: "fadeInFromRight",
2247
- center: position === "top" ? "fadeInFromTop" : "fadeInFromBottom"
2248
- });
2249
- var getAnimationOutName = (position) => ({
2250
- left: "fadeOutToLeft",
2217
+ var ModalComponent = forwardRef7(function Modal({
2218
+ maxWidth,
2219
+ icon,
2220
+ title,
2221
+ titleColor,
2222
+ description,
2223
+ descriptionColor,
2224
+ headerTextAlign,
2225
+ headerBackgroundColor,
2226
+ backgroundColor,
2227
+ name,
2228
+ overflow,
2229
+ withoutCloseButton,
2230
+ onOpen,
2231
+ onClose,
2232
+ children
2233
+ }, ref) {
2234
+ const reactRouterDomPlugin2 = usePlugin("react-router-dom");
2235
+ const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
2236
+ const theme2 = useTheme10();
2237
+ const { app } = useBetterHtmlContextInternal();
2238
+ const { colorTheme } = useBetterCoreContext4();
2239
+ const dialogRef = useRef2(null);
2240
+ const [isOpened, setIsOpened] = useState2(false);
2241
+ const [isOpenedLate, setIsOpenedLate] = useState2(false);
2242
+ const onClickOpen = useCallback4(() => {
2243
+ dialogRef.current?.showModal();
2244
+ setIsOpened(true);
2245
+ setIsOpenedLate(true);
2246
+ if (urlQuery && name) {
2247
+ urlQuery.setQuery(
2248
+ {
2249
+ [`${name}-modal`]: "opened"
2250
+ },
2251
+ false
2252
+ );
2253
+ }
2254
+ onOpen?.();
2255
+ }, [onOpen, urlQuery, name]);
2256
+ const onClickClose = useCallback4(() => {
2257
+ setIsOpened(false);
2258
+ onClose?.();
2259
+ if (urlQuery && name) urlQuery.removeQuery(`${name}-modal`, false);
2260
+ setTimeout(() => {
2261
+ dialogRef.current?.close();
2262
+ setIsOpenedLate(false);
2263
+ }, 0.2 * 1e3);
2264
+ }, [onClose, urlQuery, name]);
2265
+ const onKeyDown = useCallback4(
2266
+ (event) => {
2267
+ if (event.key === "Escape") {
2268
+ if (!withoutCloseButton) return;
2269
+ event.preventDefault();
2270
+ }
2271
+ },
2272
+ [withoutCloseButton]
2273
+ );
2274
+ useImperativeHandle(
2275
+ ref,
2276
+ () => {
2277
+ return {
2278
+ open: onClickOpen,
2279
+ close: onClickClose,
2280
+ isOpened
2281
+ };
2282
+ },
2283
+ [onClickOpen, onClickClose, isOpened]
2284
+ );
2285
+ const headerVertical = headerTextAlign === "center";
2286
+ return createPortal(
2287
+ /* @__PURE__ */ jsx9(
2288
+ DialogStylesElement,
2289
+ {
2290
+ theme: theme2,
2291
+ colorTheme,
2292
+ opacity: !isOpened ? 0 : 1,
2293
+ onClose: onClickClose,
2294
+ onKeyDown,
2295
+ ref: dialogRef,
2296
+ children: isOpenedLate ? /* @__PURE__ */ jsx9(
2297
+ Div_default.column,
2298
+ {
2299
+ position: "relative",
2300
+ width: "100%",
2301
+ maxWidth: maxWidth ?? app.contentMaxWidth / 1.3,
2302
+ minHeight: `calc(100% - ${theme2.styles.space * 2}px)`,
2303
+ alignItems: "center",
2304
+ justifyContent: "center",
2305
+ marginBlock: theme2.styles.space,
2306
+ marginInline: "auto",
2307
+ transform: `translateY(${theme2.styles.space}px)`,
2308
+ transition: theme2.styles.transition,
2309
+ animation: isOpened ? "fadeInAnimation 0.2s ease forwards" : "fadeOutAnimation 0.2s ease forwards",
2310
+ children: /* @__PURE__ */ jsxs6(
2311
+ Div_default,
2312
+ {
2313
+ position: "relative",
2314
+ width: "100%",
2315
+ minHeight: 32 + theme2.styles.space * 2,
2316
+ backgroundColor: backgroundColor ?? theme2.colors.backgroundBase,
2317
+ borderRadius: theme2.styles.borderRadius * 2,
2318
+ padding: !title ? theme2.styles.space : void 0,
2319
+ overflow,
2320
+ children: [
2321
+ title ? /* @__PURE__ */ jsxs6(Fragment, { children: [
2322
+ /* @__PURE__ */ jsxs6(
2323
+ Div_default.row,
2324
+ {
2325
+ alignItems: "center",
2326
+ gap: theme2.styles.gap,
2327
+ backgroundColor: headerBackgroundColor,
2328
+ borderTopLeftRadius: theme2.styles.borderRadius * 2 - 1,
2329
+ borderTopRightRadius: theme2.styles.borderRadius * 2 - 1,
2330
+ paddingInline: theme2.styles.space,
2331
+ paddingBlock: theme2.styles.space,
2332
+ transition: theme2.styles.transition,
2333
+ children: [
2334
+ /* @__PURE__ */ jsxs6(
2335
+ Div_default.row,
2336
+ {
2337
+ flex: 1,
2338
+ alignItems: "center",
2339
+ gap: headerVertical ? theme2.styles.space * 2 : theme2.styles.space,
2340
+ invertFlexDirection: headerVertical,
2341
+ children: [
2342
+ icon && (headerVertical ? /* @__PURE__ */ jsx9(
2343
+ Div_default.row,
2344
+ {
2345
+ width: 76,
2346
+ height: 76,
2347
+ alignItems: "center",
2348
+ justifyContent: "center",
2349
+ backgroundColor: titleColor ?? theme2.colors.textPrimary,
2350
+ borderRadius: 999,
2351
+ children: /* @__PURE__ */ jsx9(
2352
+ Icon_default,
2353
+ {
2354
+ name: icon,
2355
+ size: 36,
2356
+ color: headerBackgroundColor ?? theme2.colors.backgroundBase,
2357
+ flexShrink: 0
2358
+ }
2359
+ )
2360
+ }
2361
+ ) : /* @__PURE__ */ jsx9(
2362
+ Icon_default,
2363
+ {
2364
+ name: icon,
2365
+ size: 24,
2366
+ color: titleColor ?? theme2.colors.textPrimary,
2367
+ flexShrink: 0
2368
+ }
2369
+ )),
2370
+ /* @__PURE__ */ jsxs6(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
2371
+ /* @__PURE__ */ jsx9(
2372
+ Text_default,
2373
+ {
2374
+ as: "h1",
2375
+ textAlign: headerTextAlign,
2376
+ color: titleColor ?? theme2.colors.textPrimary,
2377
+ transition: theme2.styles.transition,
2378
+ children: title
2379
+ }
2380
+ ),
2381
+ description && /* @__PURE__ */ jsx9(
2382
+ Text_default,
2383
+ {
2384
+ textAlign: headerTextAlign,
2385
+ color: descriptionColor ?? theme2.colors.textSecondary,
2386
+ transition: theme2.styles.transition,
2387
+ children: description
2388
+ }
2389
+ )
2390
+ ] })
2391
+ ]
2392
+ }
2393
+ ),
2394
+ !withoutCloseButton && /* @__PURE__ */ jsx9(
2395
+ Button_default.icon,
2396
+ {
2397
+ icon: "XMark",
2398
+ marginTop: 1,
2399
+ iconColor: titleColor,
2400
+ onClick: onClickClose,
2401
+ transition: theme2.styles.transition,
2402
+ zIndex: 10
2403
+ }
2404
+ )
2405
+ ]
2406
+ }
2407
+ ),
2408
+ /* @__PURE__ */ jsx9(Divider_default.horizontal, {})
2409
+ ] }) : /* @__PURE__ */ jsx9(Fragment, { children: !withoutCloseButton && /* @__PURE__ */ jsx9(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, zIndex: 10, children: /* @__PURE__ */ jsx9(Button_default.icon, { icon: "XMark", iconColor: titleColor, onClick: onClickClose }) }) }),
2410
+ /* @__PURE__ */ jsx9(Div_default, { padding: title ? theme2.styles.space : void 0, children })
2411
+ ]
2412
+ }
2413
+ )
2414
+ }
2415
+ ) : void 0
2416
+ }
2417
+ ),
2418
+ document.body
2419
+ );
2420
+ });
2421
+ ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonText = "Continue", continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
2422
+ const theme2 = useTheme10();
2423
+ const modalRef = useRef2(null);
2424
+ const onCancelElement = useCallback4(() => {
2425
+ onCancel?.();
2426
+ modalRef.current?.close();
2427
+ }, [onCancel]);
2428
+ const onContinueElement = useCallback4(() => {
2429
+ onContinue?.();
2430
+ modalRef.current?.close();
2431
+ }, [onContinue]);
2432
+ useImperativeHandle(ref, () => modalRef.current, []);
2433
+ return /* @__PURE__ */ jsxs6(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
2434
+ /* @__PURE__ */ jsx9(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
2435
+ /* @__PURE__ */ jsxs6(
2436
+ Div_default.row,
2437
+ {
2438
+ alignItems: "center",
2439
+ justifyContent: "flex-end",
2440
+ gap: theme2.styles.gap,
2441
+ marginTop: theme2.styles.space * 2,
2442
+ children: [
2443
+ /* @__PURE__ */ jsx9(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
2444
+ /* @__PURE__ */ jsx9(Button_default, { text: continueButtonText, loaderName: continueButtonLoaderName, onClick: onContinueElement })
2445
+ ]
2446
+ }
2447
+ )
2448
+ ] });
2449
+ });
2450
+ ModalComponent.destructive = forwardRef7(function Destructive2({
2451
+ message,
2452
+ deleteButtonText = "Delete",
2453
+ deleteButtonIconName = "trash",
2454
+ deleteButtonLoaderName,
2455
+ onDelete,
2456
+ onCancel,
2457
+ ...props
2458
+ }, ref) {
2459
+ const theme2 = useTheme10();
2460
+ const modalRef = useRef2(null);
2461
+ const onCancelElement = useCallback4(() => {
2462
+ onCancel?.();
2463
+ modalRef.current?.close();
2464
+ }, [onCancel]);
2465
+ const onDeleteElement = useCallback4(() => {
2466
+ onDelete?.();
2467
+ modalRef.current?.close();
2468
+ }, [onDelete]);
2469
+ useImperativeHandle(ref, () => modalRef.current, []);
2470
+ return /* @__PURE__ */ jsxs6(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
2471
+ /* @__PURE__ */ jsx9(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
2472
+ /* @__PURE__ */ jsxs6(
2473
+ Div_default.row,
2474
+ {
2475
+ alignItems: "center",
2476
+ justifyContent: "flex-end",
2477
+ gap: theme2.styles.gap,
2478
+ marginTop: theme2.styles.space * 2,
2479
+ children: [
2480
+ /* @__PURE__ */ jsx9(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
2481
+ /* @__PURE__ */ jsx9(
2482
+ Button_default.destructive,
2483
+ {
2484
+ icon: deleteButtonIconName,
2485
+ text: deleteButtonText,
2486
+ loaderName: deleteButtonLoaderName,
2487
+ onClick: onDeleteElement
2488
+ }
2489
+ )
2490
+ ]
2491
+ }
2492
+ )
2493
+ ] });
2494
+ });
2495
+ var Modal2 = memo9(ModalComponent);
2496
+ Modal2.confirmation = ModalComponent.confirmation;
2497
+ Modal2.destructive = ModalComponent.destructive;
2498
+ var Modal_default = Modal2;
2499
+
2500
+ // src/components/alerts/Alert.tsx
2501
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
2502
+ var StyledDiv2 = styled8.div.withConfig({
2503
+ shouldForwardProp: (prop) => !["theme"].includes(prop)
2504
+ })`
2505
+ @keyframes fadeInFromLeft {
2506
+ from {
2507
+ opacity: 0;
2508
+ transform: translateX(-${(props) => props.theme.styles.space}px);
2509
+ }
2510
+ to {
2511
+ opacity: 1;
2512
+ transform: translateX(0px);
2513
+ }
2514
+ }
2515
+
2516
+ @keyframes fadeInFromRight {
2517
+ from {
2518
+ opacity: 0;
2519
+ transform: translateX(${(props) => props.theme.styles.space}px);
2520
+ }
2521
+ to {
2522
+ opacity: 1;
2523
+ transform: translateX(0px);
2524
+ }
2525
+ }
2526
+
2527
+ @keyframes fadeInFromTop {
2528
+ from {
2529
+ opacity: 0;
2530
+ transform: translateY(-${(props) => props.theme.styles.space}px);
2531
+ }
2532
+ to {
2533
+ opacity: 1;
2534
+ transform: translateX(0px);
2535
+ }
2536
+ }
2537
+
2538
+ @keyframes fadeInFromBottom {
2539
+ from {
2540
+ opacity: 0;
2541
+ transform: translateY(${(props) => props.theme.styles.space}px);
2542
+ }
2543
+ to {
2544
+ opacity: 1;
2545
+ transform: translateY(0px);
2546
+ }
2547
+ }
2548
+
2549
+ @keyframes fadeOutToLeft {
2550
+ from {
2551
+ opacity: 1;
2552
+ transform: translateX(0px);
2553
+ }
2554
+ to {
2555
+ opacity: 0;
2556
+ transform: translateX(-${(props) => props.theme.styles.space}px);
2557
+ }
2558
+ }
2559
+
2560
+ @keyframes fadeOutToRight {
2561
+ from {
2562
+ opacity: 1;
2563
+ transform: translateX(0px);
2564
+ }
2565
+ to {
2566
+ opacity: 0;
2567
+ transform: translateX(${(props) => props.theme.styles.space}px);
2568
+ }
2569
+ }
2570
+
2571
+ @keyframes fadeOutToTop {
2572
+ from {
2573
+ opacity: 1;
2574
+ transform: translateY(0px);
2575
+ }
2576
+ to {
2577
+ opacity: 0;
2578
+ transform: translateY(-${(props) => props.theme.styles.space}px);
2579
+ }
2580
+ }
2581
+
2582
+ @keyframes fadeOutToBottom {
2583
+ from {
2584
+ opacity: 1;
2585
+ transform: translateY(0px);
2586
+ }
2587
+ to {
2588
+ opacity: 0;
2589
+ transform: translateY(${(props) => props.theme.styles.space}px);
2590
+ }
2591
+ }
2592
+ `;
2593
+ var minWidth = 250;
2594
+ var updateInterval = 20;
2595
+ var getAnimationInName = (position) => ({
2596
+ left: "fadeInFromLeft",
2597
+ right: "fadeInFromRight",
2598
+ center: position === "top" ? "fadeInFromTop" : "fadeInFromBottom"
2599
+ });
2600
+ var getAnimationOutName = (position) => ({
2601
+ left: "fadeOutToLeft",
2251
2602
  right: "fadeOutToRight",
2252
2603
  center: position === "top" ? "fadeOutToTop" : "fadeOutToBottom"
2253
2604
  });
@@ -2260,22 +2611,23 @@ var getAlertDurationFromAuto = (duration, alert) => {
2260
2611
  return duration;
2261
2612
  };
2262
2613
  function Alert2({ alert }) {
2263
- const theme = useTheme10();
2614
+ const theme2 = useTheme11();
2264
2615
  const alertControls2 = useAlertControls();
2265
2616
  const alertsPlugin2 = usePlugin("alerts");
2266
2617
  const pluginConfig = alertsPlugin2?.getConfig() ?? {};
2618
+ const modalRef = useRef3(null);
2267
2619
  const defaultAlertDurationNumber = getAlertDurationFromAuto(
2268
2620
  alert.duration ?? pluginConfig.defaultDuration ?? defaultAlertsPluginOptions.defaultDuration,
2269
2621
  alert
2270
2622
  );
2271
- const intervalRef = useRef2(void 0);
2272
- const startTimeRef = useRef2(Date.now());
2273
- const remainingTimeRef = useRef2(defaultAlertDurationNumber);
2274
- const calledOnCloseRef = useRef2(false);
2275
- const [isPaused, setIsPaused] = useState2(false);
2276
- const [progress, setProgress] = useState2(100);
2277
- const [isRemoved, setIsRemoved] = useState2(false);
2278
- const startProgressTimer = useCallback4(() => {
2623
+ const intervalRef = useRef3(void 0);
2624
+ const startTimeRef = useRef3(Date.now());
2625
+ const remainingTimeRef = useRef3(defaultAlertDurationNumber);
2626
+ const calledOnCloseRef = useRef3(false);
2627
+ const [isPaused, setIsPaused] = useState3(false);
2628
+ const [progress, setProgress] = useState3(100);
2629
+ const [isRemoved, setIsRemoved] = useState3(false);
2630
+ const startProgressTimer = useCallback5(() => {
2279
2631
  if (intervalRef.current) {
2280
2632
  clearInterval(intervalRef.current);
2281
2633
  }
@@ -2287,6 +2639,7 @@ function Alert2({ alert }) {
2287
2639
  setProgress(newProgress);
2288
2640
  if (newProgress <= 0) {
2289
2641
  if (intervalRef.current) clearInterval(intervalRef.current);
2642
+ if (alert.display === "prominent") return;
2290
2643
  setIsRemoved(true);
2291
2644
  setTimeout(() => {
2292
2645
  alertControls2.removeAlert(alert.id);
@@ -2298,7 +2651,7 @@ function Alert2({ alert }) {
2298
2651
  }
2299
2652
  }, updateInterval);
2300
2653
  }, [alert, progress]);
2301
- const onClickCloseAlert = useCallback4(() => {
2654
+ const onClickCloseAlert = useCallback5(() => {
2302
2655
  setIsRemoved(true);
2303
2656
  setTimeout(() => {
2304
2657
  alertControls2.removeAlert(alert.id);
@@ -2308,7 +2661,7 @@ function Alert2({ alert }) {
2308
2661
  }
2309
2662
  }, 0.2 * 1e3 - 10);
2310
2663
  }, [alert]);
2311
- const onMouseEnter = useCallback4(() => {
2664
+ const onMouseEnter = useCallback5(() => {
2312
2665
  setIsPaused(true);
2313
2666
  if (intervalRef.current) {
2314
2667
  clearInterval(intervalRef.current);
@@ -2316,35 +2669,53 @@ function Alert2({ alert }) {
2316
2669
  }
2317
2670
  remainingTimeRef.current = defaultAlertDurationNumber * (progress / 100);
2318
2671
  }, [defaultAlertDurationNumber, progress]);
2319
- const onMouseLeave = useCallback4(() => {
2672
+ const onMouseLeave = useCallback5(() => {
2320
2673
  setIsPaused(false);
2321
2674
  startProgressTimer();
2322
2675
  }, [startProgressTimer]);
2676
+ const onClickAlertModalDone = useCallback5(() => {
2677
+ setIsRemoved(true);
2678
+ modalRef.current?.close();
2679
+ setTimeout(() => {
2680
+ alertControls2.removeAlert(alert.id);
2681
+ if (!calledOnCloseRef.current) {
2682
+ alert.onClose?.(alert);
2683
+ calledOnCloseRef.current = true;
2684
+ }
2685
+ }, 0.2 * 1e3 - 10);
2686
+ }, [alert]);
2323
2687
  const alertData = useMemo2(
2324
2688
  () => ({
2325
2689
  info: {
2326
2690
  icon: "infoI",
2327
- backgroundColor: theme.colors.info,
2691
+ backgroundColor: theme2.colors.info,
2328
2692
  title: "Info"
2329
2693
  },
2330
2694
  success: {
2331
2695
  icon: "check",
2332
- backgroundColor: theme.colors.success,
2696
+ backgroundColor: theme2.colors.success,
2333
2697
  title: "Success"
2334
2698
  },
2335
2699
  warning: {
2336
2700
  icon: "warningTriangle",
2337
- backgroundColor: theme.colors.warn,
2701
+ backgroundColor: theme2.colors.warn,
2338
2702
  title: "Warning"
2339
2703
  },
2340
2704
  error: {
2341
2705
  icon: "XMark",
2342
- backgroundColor: theme.colors.error,
2706
+ backgroundColor: theme2.colors.error,
2343
2707
  title: "Error"
2344
2708
  }
2345
2709
  }),
2346
- [theme]
2710
+ [theme2]
2347
2711
  );
2712
+ useEffect4(() => {
2713
+ if (alert.display === "prominent") {
2714
+ setTimeout(() => {
2715
+ modalRef.current?.open();
2716
+ }, 0.1 * 1e3);
2717
+ }
2718
+ }, []);
2348
2719
  useEffect4(() => {
2349
2720
  startTimeRef.current = Date.now();
2350
2721
  remainingTimeRef.current = defaultAlertDurationNumber;
@@ -2353,8 +2724,30 @@ function Alert2({ alert }) {
2353
2724
  if (intervalRef.current) clearInterval(intervalRef.current);
2354
2725
  };
2355
2726
  }, [defaultAlertDurationNumber, startProgressTimer]);
2356
- const animation = `${isRemoved ? getAnimationOutName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align] : getAnimationInName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align]} ${theme.styles.transition}`;
2357
- return /* @__PURE__ */ jsx9(StyledDiv2, { theme, children: /* @__PURE__ */ jsx9(
2727
+ const animation = `${isRemoved ? getAnimationOutName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align] : getAnimationInName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align]} ${theme2.styles.transition}`;
2728
+ const alertTitle = alert.title ?? alertData[alert.type].title;
2729
+ return alert.display === "prominent" ? /* @__PURE__ */ jsx10(
2730
+ Modal_default,
2731
+ {
2732
+ icon: alertData[alert.type].icon,
2733
+ title: alertTitle,
2734
+ description: alert.message,
2735
+ titleColor: theme2.colors.base,
2736
+ descriptionColor: theme2.colors.base + "a0",
2737
+ headerTextAlign: "center",
2738
+ headerBackgroundColor: alertData[alert.type].backgroundColor,
2739
+ withoutCloseButton: true,
2740
+ ref: modalRef,
2741
+ children: /* @__PURE__ */ jsx10(Div_default.row, { width: "100%", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx10(
2742
+ Button_default,
2743
+ {
2744
+ text: "Close",
2745
+ backgroundColor: alertData[alert.type].backgroundColor,
2746
+ onClick: onClickAlertModalDone
2747
+ }
2748
+ ) })
2749
+ }
2750
+ ) : /* @__PURE__ */ jsx10(StyledDiv2, { theme: theme2, children: /* @__PURE__ */ jsx10(
2358
2751
  Div_default.box,
2359
2752
  {
2360
2753
  width: "fit-content",
@@ -2365,9 +2758,9 @@ function Alert2({ alert }) {
2365
2758
  onMouseMove: onMouseEnter,
2366
2759
  onMouseLeave,
2367
2760
  animation,
2368
- children: /* @__PURE__ */ jsxs6(Div_default.column, { gap: theme.styles.space, children: [
2369
- /* @__PURE__ */ jsxs6(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
2370
- /* @__PURE__ */ jsx9(
2761
+ children: /* @__PURE__ */ jsxs7(Div_default.column, { gap: theme2.styles.space, children: [
2762
+ /* @__PURE__ */ jsxs7(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
2763
+ /* @__PURE__ */ jsx10(
2371
2764
  Div_default.row,
2372
2765
  {
2373
2766
  width: 36,
@@ -2376,32 +2769,32 @@ function Alert2({ alert }) {
2376
2769
  justifyContent: "center",
2377
2770
  backgroundColor: alertData[alert.type].backgroundColor,
2378
2771
  borderRadius: 999,
2379
- marginTop: theme.styles.gap / 2,
2380
- children: /* @__PURE__ */ jsx9(
2772
+ marginTop: theme2.styles.gap / 2,
2773
+ children: /* @__PURE__ */ jsx10(
2381
2774
  Icon_default,
2382
2775
  {
2383
2776
  name: alertData[alert.type].icon,
2384
2777
  size: 18,
2385
- color: alertData[alert.type].iconColor ?? theme.colors.base
2778
+ color: alertData[alert.type].iconColor ?? theme2.colors.base
2386
2779
  }
2387
2780
  )
2388
2781
  }
2389
2782
  ),
2390
- /* @__PURE__ */ jsxs6(Div_default.column, { flex: 1, gap: theme.styles.gap / 2, children: [
2391
- /* @__PURE__ */ jsx9(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
2392
- /* @__PURE__ */ jsx9(Text_default, { color: theme.colors.textSecondary, children: alert.message })
2783
+ /* @__PURE__ */ jsxs7(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
2784
+ /* @__PURE__ */ jsx10(Text_default, { fontSize: 18, fontWeight: 700, children: alertTitle }),
2785
+ /* @__PURE__ */ jsx10(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
2393
2786
  ] }),
2394
- pluginConfig.withCloseButton && /* @__PURE__ */ jsx9(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
2787
+ pluginConfig.withCloseButton && /* @__PURE__ */ jsx10(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
2395
2788
  ] }),
2396
- pluginConfig.withLoaderBar && /* @__PURE__ */ jsx9(
2789
+ pluginConfig.withLoaderBar && /* @__PURE__ */ jsx10(
2397
2790
  Div_default,
2398
2791
  {
2399
2792
  width: "100%",
2400
2793
  height: 5,
2401
- backgroundColor: theme.colors.backgroundBase,
2794
+ backgroundColor: theme2.colors.backgroundBase,
2402
2795
  borderRadius: 999,
2403
2796
  overflow: "hidden",
2404
- children: /* @__PURE__ */ jsx9(
2797
+ children: /* @__PURE__ */ jsx10(
2405
2798
  Div_default,
2406
2799
  {
2407
2800
  width: `${progress}%`,
@@ -2417,20 +2810,20 @@ function Alert2({ alert }) {
2417
2810
  }
2418
2811
  ) });
2419
2812
  }
2420
- var Alert_default = memo9(Alert2);
2813
+ var Alert_default = memo10(Alert2);
2421
2814
 
2422
2815
  // src/components/alerts/AlertsHolder.tsx
2423
- import { jsx as jsx10 } from "react/jsx-runtime";
2816
+ import { jsx as jsx11 } from "react/jsx-runtime";
2424
2817
  function AlertsHolder() {
2425
- const theme = useTheme11();
2818
+ const theme2 = useTheme12();
2426
2819
  const alertsPlugin2 = usePlugin("alerts");
2427
2820
  const { alerts } = useBetterHtmlContextInternal();
2428
2821
  const pluginConfig = alertsPlugin2?.getConfig() ?? {};
2429
- const top = pluginConfig.position === "top" ? theme.styles.gap : void 0;
2430
- const bottom = pluginConfig.position === "bottom" ? theme.styles.gap : void 0;
2431
- const left = pluginConfig.align === "left" ? theme.styles.space : pluginConfig.align === "center" ? "50%" : void 0;
2432
- const right = pluginConfig.align === "right" ? theme.styles.space : void 0;
2433
- return /* @__PURE__ */ jsx10(
2822
+ const top = pluginConfig.position === "top" ? theme2.styles.gap : void 0;
2823
+ const bottom = pluginConfig.position === "bottom" ? theme2.styles.gap : void 0;
2824
+ const left = pluginConfig.align === "left" ? theme2.styles.space : pluginConfig.align === "center" ? "50%" : void 0;
2825
+ const right = pluginConfig.align === "right" ? theme2.styles.space : void 0;
2826
+ return /* @__PURE__ */ jsx11(
2434
2827
  Div_default.column,
2435
2828
  {
2436
2829
  position: "fixed",
@@ -2438,18 +2831,18 @@ function AlertsHolder() {
2438
2831
  bottom,
2439
2832
  left,
2440
2833
  right,
2441
- gap: theme.styles.gap,
2834
+ gap: theme2.styles.gap,
2442
2835
  alignItems: pluginConfig.align === "center" ? "center" : pluginConfig.align === "right" ? "flex-end" : void 0,
2443
2836
  transform: pluginConfig.align === "center" ? "translateX(-50%)" : void 0,
2444
2837
  zIndex: 1e3,
2445
- children: alerts.map((alert) => /* @__PURE__ */ jsx10(Alert_default, { alert }, alert.id))
2838
+ children: alerts.map((alert) => /* @__PURE__ */ jsx11(Alert_default, { alert }, alert.id))
2446
2839
  }
2447
2840
  );
2448
2841
  }
2449
- var AlertsHolder_default = memo10(AlertsHolder);
2842
+ var AlertsHolder_default = memo11(AlertsHolder);
2450
2843
 
2451
2844
  // src/components/BetterHtmlProvider.tsx
2452
- import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
2845
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
2453
2846
  var GlobalStyle = createGlobalStyle`
2454
2847
  html {
2455
2848
  background-color: ${(props) => props.backgroundColor};
@@ -2481,7 +2874,7 @@ var betterHtmlContext = createContext(void 0);
2481
2874
  var externalBetterCoreContextValue;
2482
2875
  var externalBetterHtmlContextValue;
2483
2876
  var useBetterHtmlContext = () => {
2484
- const coreContext = useBetterCoreContext4();
2877
+ const coreContext = useBetterCoreContext5();
2485
2878
  const context = useContext(betterHtmlContext);
2486
2879
  if (context === void 0)
2487
2880
  throw new Error(
@@ -2507,7 +2900,7 @@ var useAlertControls = () => {
2507
2900
  throw new Error(
2508
2901
  "`useAlertControls()` must be used within a `<BetterHtmlProvider>`. Make sure to add one at the root of your component tree."
2509
2902
  );
2510
- const createAlert = useCallback5((alert) => {
2903
+ const createAlert = useCallback6((alert) => {
2511
2904
  const readyAlert = {
2512
2905
  id: crypto.randomUUID(),
2513
2906
  ...alert
@@ -2515,7 +2908,7 @@ var useAlertControls = () => {
2515
2908
  context.setAlerts((oldValue) => [...oldValue, readyAlert]);
2516
2909
  return readyAlert;
2517
2910
  }, []);
2518
- const removeAlert = useCallback5((alertId) => {
2911
+ const removeAlert = useCallback6((alertId) => {
2519
2912
  context.setAlerts((oldValue) => oldValue.filter((alert) => alert.id !== alertId));
2520
2913
  }, []);
2521
2914
  return {
@@ -2536,28 +2929,28 @@ var usePlugin = (pluginName) => {
2536
2929
  );
2537
2930
  };
2538
2931
  function BetterHtmlProviderInternalContent({ children }) {
2539
- const theme = useTheme12();
2932
+ const theme2 = useTheme13();
2540
2933
  const alertsPlugin2 = usePlugin("alerts");
2541
- return /* @__PURE__ */ jsxs7(Fragment, { children: [
2542
- /* @__PURE__ */ jsx11(
2934
+ return /* @__PURE__ */ jsxs8(Fragment2, { children: [
2935
+ /* @__PURE__ */ jsx12(
2543
2936
  GlobalStyle,
2544
2937
  {
2545
- fontFamily: theme.styles.fontFamily,
2546
- color: theme.colors.textPrimary,
2547
- backgroundColor: theme.colors.backgroundBase
2938
+ fontFamily: theme2.styles.fontFamily,
2939
+ color: theme2.colors.textPrimary,
2940
+ backgroundColor: theme2.colors.backgroundBase
2548
2941
  }
2549
2942
  ),
2550
2943
  children,
2551
- alertsPlugin2 && /* @__PURE__ */ jsx11(AlertsHolder_default, {})
2944
+ alertsPlugin2 && /* @__PURE__ */ jsx12(AlertsHolder_default, {})
2552
2945
  ] });
2553
2946
  }
2554
2947
  function BetterHtmlProviderInternal({ config, plugins, children }) {
2555
- const betterCoreContext = useBetterCoreContext4();
2556
- const [alerts, setAlerts] = useState3([]);
2948
+ const betterCoreContext = useBetterCoreContext5();
2949
+ const [alerts, setAlerts] = useState4([]);
2557
2950
  const [sideMenuIsCollapsed, setSideMenuIsCollapsed] = useBooleanState2();
2558
2951
  const [sideMenuIsOpenMobile, setSideMenuIsOpenMobile] = useBooleanState2();
2559
- const [tabGroups, setTabGroups] = useState3([]);
2560
- const [tabsWithDots, setTabsWithDots] = useState3([]);
2952
+ const [tabGroups, setTabGroups] = useState4([]);
2953
+ const [tabsWithDots, setTabsWithDots] = useState4([]);
2561
2954
  const readyConfig = useMemo3(
2562
2955
  () => ({
2563
2956
  app: {
@@ -2593,12 +2986,15 @@ function BetterHtmlProviderInternal({ config, plugins, children }) {
2593
2986
  }, []);
2594
2987
  externalBetterCoreContextValue = betterCoreContext;
2595
2988
  externalBetterHtmlContextValue = readyConfig;
2596
- return /* @__PURE__ */ jsx11(betterHtmlContext.Provider, { value: readyConfig, children: /* @__PURE__ */ jsx11(BetterHtmlProviderInternalContent, { children }) });
2989
+ return /* @__PURE__ */ jsx12(betterHtmlContext.Provider, { value: readyConfig, children: /* @__PURE__ */ jsx12(BetterHtmlProviderInternalContent, { children }) });
2597
2990
  }
2598
2991
  function BetterHtmlProvider({ config, ...props }) {
2599
2992
  const coreConfig = useMemo3(
2600
2993
  () => ({
2601
- theme: config?.theme,
2994
+ theme: {
2995
+ ...theme,
2996
+ ...config?.theme
2997
+ },
2602
2998
  colorTheme: config?.colorTheme ?? (localStorage.getItem("theme") === "dark" ? "dark" : "light"),
2603
2999
  icons: {
2604
3000
  ...icons,
@@ -2642,9 +3038,9 @@ function BetterHtmlProvider({ config, ...props }) {
2642
3038
  observer.disconnect();
2643
3039
  };
2644
3040
  }, []);
2645
- return /* @__PURE__ */ jsx11(BetterCoreProvider, { config: coreConfig, children: /* @__PURE__ */ jsx11(BetterHtmlProviderInternal, { config: htmlConfig, ...props }) });
3041
+ return /* @__PURE__ */ jsx12(BetterCoreProvider, { config: coreConfig, children: /* @__PURE__ */ jsx12(BetterHtmlProviderInternal, { config: htmlConfig, ...props }) });
2646
3042
  }
2647
- var BetterHtmlProvider_default = memo11(BetterHtmlProvider);
3043
+ var BetterHtmlProvider_default = memo12(BetterHtmlProvider);
2648
3044
 
2649
3045
  // src/utils/functions.ts
2650
3046
  import CryptoJS from "crypto-js";
@@ -2831,300 +3227,12 @@ function generateLocalStorage() {
2831
3227
  };
2832
3228
  }
2833
3229
 
2834
- // src/components/Modal.tsx
2835
- import { memo as memo12, useCallback as useCallback6, forwardRef as forwardRef7, useImperativeHandle, useRef as useRef3, useState as useState4 } from "react";
2836
- import { createPortal } from "react-dom";
2837
- import {
2838
- useBetterCoreContext as useBetterCoreContext5,
2839
- useTheme as useTheme13
2840
- } from "react-better-core";
2841
- import styled8 from "styled-components";
2842
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
2843
- var DialogStylesElement = styled8.dialog.withConfig({
2844
- shouldForwardProp: (prop) => !["theme", "colorTheme", "opacity"].includes(prop)
2845
- })`
2846
- width: 100%;
2847
- max-width: none;
2848
- height: 100%;
2849
- max-height: none;
2850
- color: ${(props) => props.theme.colors.textPrimary};
2851
- border: none;
2852
- outline: none;
2853
- background-color: transparent;
2854
- margin: auto auto;
2855
- padding-inline: ${(props) => props.theme.styles.gap}px;
2856
- opacity: ${(props) => props.opacity};
2857
- transition: ${(props) => props.theme.styles.transition};
2858
-
2859
- &::backdrop {
2860
- background-color: ${(props) => props.colorTheme === "light" ? "#000000a0" : "#222222e0"};
2861
- opacity: ${(props) => props.opacity};
2862
- transition: ${(props) => props.theme.styles.transition};
2863
- }
2864
-
2865
- @keyframes fadeInAnimation {
2866
- from {
2867
- transform: translateY(${(props) => props.theme.styles.space}px);
2868
- }
2869
- to {
2870
- transform: translateY(0px);
2871
- }
2872
- }
2873
-
2874
- @keyframes fadeOutAnimation {
2875
- from {
2876
- transform: translateY(0px);
2877
- }
2878
- to {
2879
- transform: translateY(${(props) => props.theme.styles.space}px);
2880
- }
2881
- }
2882
- `;
2883
- var ModalComponent = forwardRef7(function Modal({
2884
- maxWidth,
2885
- title,
2886
- titleColor,
2887
- description,
2888
- descriptionColor,
2889
- headerBackgroundColor,
2890
- backgroundColor,
2891
- name,
2892
- overflow,
2893
- withoutCloseButton,
2894
- onOpen,
2895
- onClose,
2896
- children
2897
- }, ref) {
2898
- const reactRouterDomPlugin2 = usePlugin("react-router-dom");
2899
- const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
2900
- const theme = useTheme13();
2901
- const { app } = useBetterHtmlContextInternal();
2902
- const { colorTheme } = useBetterCoreContext5();
2903
- const dialogRef = useRef3(null);
2904
- const [isOpened, setIsOpened] = useState4(false);
2905
- const [isOpenedLate, setIsOpenedLate] = useState4(false);
2906
- const onClickOpen = useCallback6(() => {
2907
- dialogRef.current?.showModal();
2908
- setIsOpened(true);
2909
- setIsOpenedLate(true);
2910
- if (urlQuery && name) {
2911
- urlQuery.setQuery(
2912
- {
2913
- [`${name}-modal`]: "opened"
2914
- },
2915
- false
2916
- );
2917
- }
2918
- onOpen?.();
2919
- }, [onOpen, urlQuery, name]);
2920
- const onClickClose = useCallback6(() => {
2921
- setIsOpened(false);
2922
- onClose?.();
2923
- if (urlQuery && name) urlQuery.removeQuery(`${name}-modal`, false);
2924
- setTimeout(() => {
2925
- dialogRef.current?.close();
2926
- setIsOpenedLate(false);
2927
- }, 0.2 * 1e3);
2928
- }, [onClose, urlQuery, name]);
2929
- const onKeyDown = useCallback6(
2930
- (event) => {
2931
- if (event.key === "Escape") {
2932
- if (!withoutCloseButton) return;
2933
- event.preventDefault();
2934
- }
2935
- },
2936
- [withoutCloseButton]
2937
- );
2938
- useImperativeHandle(
2939
- ref,
2940
- () => {
2941
- return {
2942
- open: onClickOpen,
2943
- close: onClickClose,
2944
- isOpened
2945
- };
2946
- },
2947
- [onClickOpen, onClickClose, isOpened]
2948
- );
2949
- return createPortal(
2950
- /* @__PURE__ */ jsx12(
2951
- DialogStylesElement,
2952
- {
2953
- theme,
2954
- colorTheme,
2955
- opacity: !isOpened ? 0 : 1,
2956
- onClose: onClickClose,
2957
- onKeyDown,
2958
- ref: dialogRef,
2959
- children: isOpenedLate ? /* @__PURE__ */ jsx12(
2960
- Div_default.column,
2961
- {
2962
- position: "relative",
2963
- width: "100%",
2964
- maxWidth: maxWidth ?? app.contentMaxWidth / 1.3,
2965
- minHeight: `calc(100% - ${theme.styles.space * 2}px)`,
2966
- alignItems: "center",
2967
- justifyContent: "center",
2968
- marginBlock: theme.styles.space,
2969
- marginInline: "auto",
2970
- transform: `translateY(${theme.styles.space}px)`,
2971
- transition: theme.styles.transition,
2972
- animation: isOpened ? "fadeInAnimation 0.2s ease forwards" : "fadeOutAnimation 0.2s ease forwards",
2973
- children: /* @__PURE__ */ jsxs8(
2974
- Div_default,
2975
- {
2976
- position: "relative",
2977
- width: "100%",
2978
- minHeight: 32 + theme.styles.space * 2,
2979
- backgroundColor: backgroundColor ?? theme.colors.backgroundBase,
2980
- borderRadius: theme.styles.borderRadius * 2,
2981
- padding: !title ? theme.styles.space : void 0,
2982
- overflow,
2983
- children: [
2984
- title ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
2985
- /* @__PURE__ */ jsxs8(
2986
- Div_default.row,
2987
- {
2988
- alignItems: "center",
2989
- gap: theme.styles.gap,
2990
- backgroundColor: headerBackgroundColor,
2991
- borderTopLeftRadius: theme.styles.borderRadius * 2 - 1,
2992
- borderTopRightRadius: theme.styles.borderRadius * 2 - 1,
2993
- paddingInline: theme.styles.space,
2994
- paddingBlock: theme.styles.space,
2995
- transition: theme.styles.transition,
2996
- children: [
2997
- /* @__PURE__ */ jsxs8(Div_default.column, { flex: 1, gap: theme.styles.gap / 2, children: [
2998
- /* @__PURE__ */ jsx12(
2999
- Text_default,
3000
- {
3001
- as: "h1",
3002
- color: titleColor ?? theme.colors.textPrimary,
3003
- transition: theme.styles.transition,
3004
- children: title
3005
- }
3006
- ),
3007
- description && /* @__PURE__ */ jsx12(
3008
- Text_default,
3009
- {
3010
- color: descriptionColor ?? theme.colors.textSecondary,
3011
- transition: theme.styles.transition,
3012
- children: description
3013
- }
3014
- )
3015
- ] }),
3016
- !withoutCloseButton && /* @__PURE__ */ jsx12(
3017
- Button_default.icon,
3018
- {
3019
- icon: "XMark",
3020
- marginTop: 1,
3021
- iconColor: titleColor,
3022
- onClick: onClickClose,
3023
- transition: theme.styles.transition,
3024
- zIndex: 10
3025
- }
3026
- )
3027
- ]
3028
- }
3029
- ),
3030
- /* @__PURE__ */ jsx12(Divider_default.horizontal, {})
3031
- ] }) : /* @__PURE__ */ jsx12(Fragment2, { children: !withoutCloseButton && /* @__PURE__ */ jsx12(Div_default, { position: "absolute", top: theme.styles.space, right: theme.styles.space, zIndex: 10, children: /* @__PURE__ */ jsx12(Button_default.icon, { icon: "XMark", iconColor: titleColor, onClick: onClickClose }) }) }),
3032
- /* @__PURE__ */ jsx12(Div_default, { padding: title ? theme.styles.space : void 0, children })
3033
- ]
3034
- }
3035
- )
3036
- }
3037
- ) : void 0
3038
- }
3039
- ),
3040
- document.body
3041
- );
3042
- });
3043
- ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonText = "Continue", continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3044
- const theme = useTheme13();
3045
- const modalRef = useRef3(null);
3046
- const onCancelElement = useCallback6(() => {
3047
- onCancel?.();
3048
- modalRef.current?.close();
3049
- }, [onCancel]);
3050
- const onContinueElement = useCallback6(() => {
3051
- onContinue?.();
3052
- modalRef.current?.close();
3053
- }, [onContinue]);
3054
- useImperativeHandle(ref, () => modalRef.current, []);
3055
- return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3056
- /* @__PURE__ */ jsx12(Text_default, { color: theme.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
3057
- /* @__PURE__ */ jsxs8(
3058
- Div_default.row,
3059
- {
3060
- alignItems: "center",
3061
- justifyContent: "flex-end",
3062
- gap: theme.styles.gap,
3063
- marginTop: theme.styles.space * 2,
3064
- children: [
3065
- /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
3066
- /* @__PURE__ */ jsx12(Button_default, { text: continueButtonText, loaderName: continueButtonLoaderName, onClick: onContinueElement })
3067
- ]
3068
- }
3069
- )
3070
- ] });
3071
- });
3072
- ModalComponent.destructive = forwardRef7(function Destructive2({
3073
- message,
3074
- deleteButtonText = "Delete",
3075
- deleteButtonIconName = "trash",
3076
- deleteButtonLoaderName,
3077
- onDelete,
3078
- onCancel,
3079
- ...props
3080
- }, ref) {
3081
- const theme = useTheme13();
3082
- const modalRef = useRef3(null);
3083
- const onCancelElement = useCallback6(() => {
3084
- onCancel?.();
3085
- modalRef.current?.close();
3086
- }, [onCancel]);
3087
- const onDeleteElement = useCallback6(() => {
3088
- onDelete?.();
3089
- modalRef.current?.close();
3090
- }, [onDelete]);
3091
- useImperativeHandle(ref, () => modalRef.current, []);
3092
- return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3093
- /* @__PURE__ */ jsx12(Text_default, { color: theme.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
3094
- /* @__PURE__ */ jsxs8(
3095
- Div_default.row,
3096
- {
3097
- alignItems: "center",
3098
- justifyContent: "flex-end",
3099
- gap: theme.styles.gap,
3100
- marginTop: theme.styles.space * 2,
3101
- children: [
3102
- /* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
3103
- /* @__PURE__ */ jsx12(
3104
- Button_default.destructive,
3105
- {
3106
- icon: deleteButtonIconName,
3107
- text: deleteButtonText,
3108
- loaderName: deleteButtonLoaderName,
3109
- onClick: onDeleteElement
3110
- }
3111
- )
3112
- ]
3113
- }
3114
- )
3115
- ] });
3116
- });
3117
- var Modal2 = memo12(ModalComponent);
3118
- Modal2.confirmation = ModalComponent.confirmation;
3119
- Modal2.destructive = ModalComponent.destructive;
3120
- var Modal_default = Modal2;
3121
-
3122
3230
  // src/components/PageHolder.tsx
3123
3231
  import { forwardRef as forwardRef8, memo as memo13 } from "react";
3124
3232
  import { useTheme as useTheme14 } from "react-better-core";
3125
3233
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
3126
3234
  var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, children, ...props }, ref) {
3127
- const theme = useTheme14();
3235
+ const theme2 = useTheme14();
3128
3236
  const { app } = useBetterHtmlContextInternal();
3129
3237
  return /* @__PURE__ */ jsx13(
3130
3238
  Div_default,
@@ -3133,7 +3241,7 @@ var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, c
3133
3241
  width: "100%",
3134
3242
  maxWidth: !noMaxContentWidth ? app.contentMaxWidth : void 0,
3135
3243
  margin: "0px auto",
3136
- padding: theme.styles.space,
3244
+ padding: theme2.styles.space,
3137
3245
  ...props,
3138
3246
  ref,
3139
3247
  children
@@ -3152,7 +3260,7 @@ PageHolderComponent.center = forwardRef8(function Center({
3152
3260
  children,
3153
3261
  ...props
3154
3262
  }, ref) {
3155
- const theme = useTheme14();
3263
+ const theme2 = useTheme14();
3156
3264
  const mediaQuery = useMediaQuery();
3157
3265
  const { app } = useBetterHtmlContextInternal();
3158
3266
  const breakingPoint = mediaQuery.size1000;
@@ -3186,10 +3294,10 @@ PageHolderComponent.center = forwardRef8(function Center({
3186
3294
  /* @__PURE__ */ jsx13(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx13(
3187
3295
  ContentTag,
3188
3296
  {
3189
- width: `calc(100% - ${theme.styles.space * 2}px)`,
3297
+ width: `calc(100% - ${theme2.styles.space * 2}px)`,
3190
3298
  maxWidth: !noMaxContentWidth ? contentMaxWidth ?? app.contentMaxWidth / 2 : void 0,
3191
- marginInline: theme.styles.space,
3192
- marginBlock: theme.styles.space,
3299
+ marginInline: theme2.styles.space,
3300
+ marginBlock: theme2.styles.space,
3193
3301
  ...props,
3194
3302
  ref,
3195
3303
  children
@@ -3232,7 +3340,7 @@ var ChipComponent = forwardRef9(function Chip({
3232
3340
  onClickWithValue,
3233
3341
  ...props
3234
3342
  }, ref) {
3235
- const theme = useTheme15();
3343
+ const theme2 = useTheme15();
3236
3344
  const onClickElement = useCallback7(
3237
3345
  (event) => {
3238
3346
  onClick?.(event);
@@ -3244,23 +3352,23 @@ var ChipComponent = forwardRef9(function Chip({
3244
3352
  Div_default,
3245
3353
  {
3246
3354
  width: "fit-content",
3247
- backgroundColor: backgroundColor ?? theme.colors.backgroundSecondary,
3248
- borderRadius: isCircle ? 999 : borderRadius ?? theme.styles.borderRadius / borderRadiusOffset,
3249
- paddingBlock: theme.styles.gap / 2,
3250
- paddingInline: theme.styles.space / 1.5,
3355
+ backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
3356
+ borderRadius: isCircle ? 999 : borderRadius ?? theme2.styles.borderRadius / borderRadiusOffset,
3357
+ paddingBlock: theme2.styles.gap / 2,
3358
+ paddingInline: theme2.styles.space / 1.5,
3251
3359
  filterHover: onClick || onClickWithValue ? filterHover().z1 : void 0,
3252
3360
  onClick: onClickElement,
3253
3361
  cursor: onClick || onClickWithValue ? "pointer" : void 0,
3254
3362
  ...props,
3255
3363
  ref,
3256
- children: /* @__PURE__ */ jsx14(Text_default, { color: color ?? theme.colors.textPrimary, children: text })
3364
+ children: /* @__PURE__ */ jsx14(Text_default, { color: color ?? theme2.colors.textPrimary, children: text })
3257
3365
  }
3258
3366
  );
3259
3367
  });
3260
3368
  ChipComponent.colored = forwardRef9(function Colored({ color, withWhiteBackground, ...props }, ref) {
3261
- const theme = useTheme15();
3369
+ const theme2 = useTheme15();
3262
3370
  const { colorTheme } = useBetterCoreContext6();
3263
- const readyColor = color ?? theme.colors.textSecondary;
3371
+ const readyColor = color ?? theme2.colors.textSecondary;
3264
3372
  const chip = /* @__PURE__ */ jsx14(
3265
3373
  ChipComponent,
3266
3374
  {
@@ -3276,7 +3384,7 @@ ChipComponent.colored = forwardRef9(function Colored({ color, withWhiteBackgroun
3276
3384
  {
3277
3385
  width: "fit-content",
3278
3386
  backgroundColor: withWhiteBackground ? colorTheme === "light" ? "#ffffff" : "#000000" : void 0,
3279
- borderRadius: withWhiteBackground ? props.borderRadius ?? theme.styles.borderRadius / borderRadiusOffset + 0.3 : void 0,
3387
+ borderRadius: withWhiteBackground ? props.borderRadius ?? theme2.styles.borderRadius / borderRadiusOffset + 0.3 : void 0,
3280
3388
  children: chip
3281
3389
  }
3282
3390
  ) : chip;
@@ -3303,7 +3411,7 @@ import { memo as memo15 } from "react";
3303
3411
  import { useTheme as useTheme16 } from "react-better-core";
3304
3412
  import { jsxs as jsxs10 } from "react/jsx-runtime";
3305
3413
  function Label({ text, required, isError, color, htmlFor }) {
3306
- const theme = useTheme16();
3414
+ const theme2 = useTheme16();
3307
3415
  return /* @__PURE__ */ jsxs10(
3308
3416
  Text_default,
3309
3417
  {
@@ -3311,12 +3419,12 @@ function Label({ text, required, isError, color, htmlFor }) {
3311
3419
  width: "fit-content",
3312
3420
  height: 16,
3313
3421
  fontSize: 14,
3314
- color: isError ? theme.colors.error : color ?? theme.colors.textSecondary,
3422
+ color: isError ? theme2.colors.error : color ?? theme2.colors.textSecondary,
3315
3423
  htmlFor,
3316
3424
  "aria-required": required,
3317
3425
  children: [
3318
3426
  text,
3319
- required && /* @__PURE__ */ jsxs10(Text_default, { as: "span", fontSize: 16, color: theme.colors.error, children: [
3427
+ required && /* @__PURE__ */ jsxs10(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
3320
3428
  " ",
3321
3429
  "*"
3322
3430
  ] })
@@ -3366,7 +3474,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3366
3474
  id,
3367
3475
  ...props
3368
3476
  }, ref) {
3369
- const theme = useTheme17();
3477
+ const theme2 = useTheme17();
3370
3478
  const inputFieldHolderRef = useRef4(null);
3371
3479
  const buttonsRef = useRef4(null);
3372
3480
  const inputRef = useRef4(null);
@@ -3496,12 +3604,12 @@ var DropdownComponent = forwardRef10(function Dropdown({
3496
3604
  /* @__PURE__ */ jsx15(
3497
3605
  Div_default,
3498
3606
  {
3499
- color: isDisabled ? theme.colors.textSecondary + "80" : isSelected ? theme.colors.base : theme.colors.textPrimary,
3500
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
3607
+ color: isDisabled ? theme2.colors.textSecondary + "80" : isSelected ? theme2.colors.base : theme2.colors.textPrimary,
3608
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
3501
3609
  filter: isFocused2 ? isDisabled ? "brightness(0.95)" : "brightness(0.9)" : void 0,
3502
3610
  filterHover: focusedOptionIndex === void 0 && !isDisabled ? "brightness(0.9)" : void 0,
3503
3611
  cursor: isDisabled ? "not-allowed" : "pointer",
3504
- padding: `${theme.styles.gap}px ${theme.styles.space}px`,
3612
+ padding: `${theme2.styles.gap}px ${theme2.styles.space}px`,
3505
3613
  value: option,
3506
3614
  onClickWithValue: onClickOption,
3507
3615
  onMouseMove: () => setFocusedOptionIndex(void 0),
@@ -3525,7 +3633,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3525
3633
  filteredOptions,
3526
3634
  value,
3527
3635
  focusedOptionIndex,
3528
- theme.colors,
3636
+ theme2.colors,
3529
3637
  onClickOption,
3530
3638
  renderOption,
3531
3639
  renderOptionDivider
@@ -3597,16 +3705,16 @@ var DropdownComponent = forwardRef10(function Dropdown({
3597
3705
  Div_default,
3598
3706
  {
3599
3707
  width: "100%",
3600
- backgroundColor: theme.colors.backgroundContent,
3601
- border: `solid 1px ${theme.colors.border}`,
3602
- borderColor: isFocused ? theme.colors.primary : void 0,
3708
+ backgroundColor: theme2.colors.backgroundContent,
3709
+ border: `solid 1px ${theme2.colors.border}`,
3710
+ borderColor: isFocused ? theme2.colors.primary : void 0,
3603
3711
  borderBottom: "none",
3604
- borderTopLeftRadius: theme.styles.borderRadius,
3605
- borderTopRightRadius: theme.styles.borderRadius,
3606
- paddingBlock: theme.styles.gap,
3607
- paddingInline: (theme.styles.space + theme.styles.gap) / 2,
3608
- transition: theme.styles.transition,
3609
- children: /* @__PURE__ */ jsx15(Div_default.row, { width: "100%", flexWrap: "wrap", gap: theme.styles.gap, children: selectedOption.map((option) => {
3712
+ borderTopLeftRadius: theme2.styles.borderRadius,
3713
+ borderTopRightRadius: theme2.styles.borderRadius,
3714
+ paddingBlock: theme2.styles.gap,
3715
+ paddingInline: (theme2.styles.space + theme2.styles.gap) / 2,
3716
+ transition: theme2.styles.transition,
3717
+ children: /* @__PURE__ */ jsx15(Div_default.row, { width: "100%", flexWrap: "wrap", gap: theme2.styles.gap, children: selectedOption.map((option) => {
3610
3718
  const ChipComponentTag = !option.renderType || option.renderType === "default" || option.renderType === "chip" ? Chip_default : option.renderType === "chip.colored" ? Chip_default.colored : Chip_default;
3611
3719
  return /* @__PURE__ */ createElement2(
3612
3720
  ChipComponentTag,
@@ -3629,21 +3737,21 @@ var DropdownComponent = forwardRef10(function Dropdown({
3629
3737
  left: 0,
3630
3738
  width: "100%",
3631
3739
  maxHeight: 300,
3632
- backgroundColor: theme.colors.backgroundContent,
3633
- border: `1px solid ${isFocused ? theme.colors.primary : theme.colors.border}`,
3740
+ backgroundColor: theme2.colors.backgroundContent,
3741
+ border: `1px solid ${isFocused ? theme2.colors.primary : theme2.colors.border}`,
3634
3742
  borderTop: "none",
3635
- borderBottomLeftRadius: theme.styles.borderRadius,
3636
- borderBottomRightRadius: theme.styles.borderRadius,
3743
+ borderBottomLeftRadius: theme2.styles.borderRadius,
3744
+ borderBottomRightRadius: theme2.styles.borderRadius,
3637
3745
  boxShadow: "0px 10px 20px #00000020",
3638
3746
  zIndex: 1e3,
3639
3747
  overflowY: "auto",
3640
3748
  opacity: !isOpen ? 0 : void 0,
3641
3749
  pointerEvents: !isOpen ? "none" : void 0,
3642
3750
  transform: `translateY(${!isOpen ? -10 : 0}px)`,
3643
- transition: theme.styles.transition,
3751
+ transition: theme2.styles.transition,
3644
3752
  role: "listbox",
3645
3753
  "aria-label": label,
3646
- children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ jsx15(Div_default, { padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`, children: /* @__PURE__ */ jsx15(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ jsx15(Fragment4, { children: (withoutRenderingOptionsWhenClosed ? isOpen || isOpenLate : true) ? renderedOptions : void 0 }) : /* @__PURE__ */ jsx15(Div_default, { padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`, children: /* @__PURE__ */ jsx15(Text_default.unknown, { textAlign: "left", children: debounceMinimumSymbolsRequired !== void 0 && searchQuery.length < debounceMinimumSymbolsRequired ? `Enter at least ${debounceMinimumSymbolsRequired} characters` : "No options" }) })
3754
+ children: isLoadingDebouncedSearchQuery || debounceIsLoading ? /* @__PURE__ */ jsx15(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx15(Loader_default.text, {}) }) : filteredOptions.length ? /* @__PURE__ */ jsx15(Fragment4, { children: (withoutRenderingOptionsWhenClosed ? isOpen || isOpenLate : true) ? renderedOptions : void 0 }) : /* @__PURE__ */ jsx15(Div_default, { padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`, children: /* @__PURE__ */ jsx15(Text_default.unknown, { textAlign: "left", children: debounceMinimumSymbolsRequired !== void 0 && searchQuery.length < debounceMinimumSymbolsRequired ? `Enter at least ${debounceMinimumSymbolsRequired} characters` : "No options" }) })
3647
3755
  }
3648
3756
  ),
3649
3757
  /* @__PURE__ */ jsxs11(
@@ -3651,9 +3759,9 @@ var DropdownComponent = forwardRef10(function Dropdown({
3651
3759
  {
3652
3760
  position: "absolute",
3653
3761
  top: 46 / 2,
3654
- right: theme.styles.space + 1,
3762
+ right: theme2.styles.space + 1,
3655
3763
  alignItems: "center",
3656
- gap: theme.styles.gap,
3764
+ gap: theme2.styles.gap,
3657
3765
  transform: "translateY(-50%)",
3658
3766
  pointerEvents: "none",
3659
3767
  filter: disabled ? "brightness(0.9)" : void 0,
@@ -3680,9 +3788,9 @@ var DropdownComponent = forwardRef10(function Dropdown({
3680
3788
  name: "chevronDown",
3681
3789
  position: "relative",
3682
3790
  size: 16,
3683
- color: theme.colors.textSecondary,
3791
+ color: theme2.colors.textSecondary,
3684
3792
  transform: `rotate(${isOpen ? 180 : 0}deg)`,
3685
- transition: theme.styles.transition,
3793
+ transition: theme2.styles.transition,
3686
3794
  pointerEvents: "none",
3687
3795
  "aria-hidden": true
3688
3796
  }
@@ -3703,9 +3811,9 @@ var DropdownComponent = forwardRef10(function Dropdown({
3703
3811
  ) });
3704
3812
  });
3705
3813
  DropdownComponent.countries = forwardRef10(function Countries({ ...props }, ref) {
3706
- const theme = useTheme17();
3814
+ const theme2 = useTheme17();
3707
3815
  const renderOption = useCallback8(
3708
- (option, index, isSelected) => /* @__PURE__ */ jsxs11(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
3816
+ (option, index, isSelected) => /* @__PURE__ */ jsxs11(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
3709
3817
  /* @__PURE__ */ jsx15(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
3710
3818
  /* @__PURE__ */ jsx15(Text_default, { children: option.label })
3711
3819
  ] }),
@@ -3792,7 +3900,7 @@ var SelectComponent = styled9.select.withConfig({
3792
3900
  opacity: 0;
3793
3901
  `;
3794
3902
  function Calendar({ value, minDate, maxDate, onChange }) {
3795
- const theme = useTheme18();
3903
+ const theme2 = useTheme18();
3796
3904
  const internalYearSelectId = useId();
3797
3905
  const [currentDate, setCurrentDate] = useState6(value ? new Date(value) : void 0);
3798
3906
  const [currentMonth, setCurrentMonth] = useState6(currentDate?.getMonth() ?? (/* @__PURE__ */ new Date()).getMonth());
@@ -3856,7 +3964,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3856
3964
  setCurrentMonth(date.getMonth());
3857
3965
  setCurrentYear(date.getFullYear());
3858
3966
  }, [value]);
3859
- return /* @__PURE__ */ jsxs12(Div_default.column, { width: "100%", maxWidth: 320, gap: theme.styles.gap, padding: theme.styles.space / 2, userSelect: "none", children: [
3967
+ return /* @__PURE__ */ jsxs12(Div_default.column, { width: "100%", maxWidth: 320, gap: theme2.styles.gap, padding: theme2.styles.space / 2, userSelect: "none", children: [
3860
3968
  /* @__PURE__ */ jsxs12(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
3861
3969
  /* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronLeft", onClick: onClickPreviousMonthButton }),
3862
3970
  /* @__PURE__ */ jsxs12(Div_default.row, { alignItems: "center", gap: 4, children: [
@@ -3867,7 +3975,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3867
3975
  /* @__PURE__ */ jsx16(
3868
3976
  SelectComponent,
3869
3977
  {
3870
- theme,
3978
+ theme: theme2,
3871
3979
  value: currentYear,
3872
3980
  onChange: onChangeYearSelect,
3873
3981
  id: internalYearSelectId,
@@ -3878,7 +3986,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3878
3986
  ] }),
3879
3987
  /* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronRight", onClick: onClickNextMonthButton })
3880
3988
  ] }),
3881
- /* @__PURE__ */ jsxs12(Div_default.grid, { width: "100%", gridTemplateColumns: "repeat(7, 1fr)", gap: theme.styles.gap / 2, children: [
3989
+ /* @__PURE__ */ jsxs12(Div_default.grid, { width: "100%", gridTemplateColumns: "repeat(7, 1fr)", gap: theme2.styles.gap / 2, children: [
3882
3990
  weekDaysIndex.map((day) => /* @__PURE__ */ jsx16(Div_default.row, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx16(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", children: getWeekDayName(day, true) }) }, day)),
3883
3991
  days.map((day, index) => {
3884
3992
  const thisDayDate = new Date(currentYear, currentMonth, day);
@@ -3894,11 +4002,11 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3894
4002
  aspectRatio: "1",
3895
4003
  alignItems: "center",
3896
4004
  justifyContent: "center",
3897
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
4005
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
3898
4006
  filterHover: day && !isDisabled ? "brightness(0.9)" : void 0,
3899
- border: `1px solid ${isToday ? theme.colors.primary : theme.colors.primary + "00"}`,
3900
- borderRadius: theme.styles.borderRadius / 2,
3901
- padding: theme.styles.space / 2,
4007
+ border: `1px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
4008
+ borderRadius: theme2.styles.borderRadius / 2,
4009
+ padding: theme2.styles.space / 2,
3902
4010
  cursor: day ? !isDisabled ? "pointer" : "not-allowed" : void 0,
3903
4011
  value: day,
3904
4012
  onClickWithValue: !isDisabled ? onClickDay : void 0,
@@ -3908,7 +4016,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3908
4016
  {
3909
4017
  fontSize: 14,
3910
4018
  textAlign: "center",
3911
- color: isDisabled ? theme.colors.textSecondary + "80" : isSelected ? theme.colors.base : isWeekend ? theme.colors.textSecondary : void 0,
4019
+ color: isDisabled ? theme2.colors.textSecondary + "80" : isSelected ? theme2.colors.base : isWeekend ? theme2.colors.textSecondary : void 0,
3912
4020
  children: day
3913
4021
  }
3914
4022
  ),
@@ -3920,7 +4028,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3920
4028
  height: 1,
3921
4029
  top: "50%",
3922
4030
  left: "50%",
3923
- backgroundColor: theme.colors.textSecondary,
4031
+ backgroundColor: theme2.colors.textSecondary,
3924
4032
  borderRadius: 999,
3925
4033
  transform: "translate(-50%, -50%) rotate(45deg)"
3926
4034
  }
@@ -3937,8 +4045,8 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3937
4045
  {
3938
4046
  fontSize: 14,
3939
4047
  textDecorationHover: "underline",
3940
- color: theme.colors.textSecondary,
3941
- colorHover: theme.colors.textPrimary,
4048
+ color: theme2.colors.textSecondary,
4049
+ colorHover: theme2.colors.textPrimary,
3942
4050
  children: "Clear"
3943
4051
  }
3944
4052
  ) }),
@@ -3947,8 +4055,8 @@ function Calendar({ value, minDate, maxDate, onChange }) {
3947
4055
  {
3948
4056
  fontSize: 14,
3949
4057
  textDecorationHover: "underline",
3950
- color: theme.colors.textSecondary,
3951
- colorHover: theme.colors.textPrimary,
4058
+ color: theme2.colors.textSecondary,
4059
+ colorHover: theme2.colors.textPrimary,
3952
4060
  children: "Today"
3953
4061
  }
3954
4062
  ) })
@@ -4145,7 +4253,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4145
4253
  id,
4146
4254
  ...props
4147
4255
  }, ref) {
4148
- const theme = useTheme19();
4256
+ const theme2 = useTheme19();
4149
4257
  const internalId = useId2();
4150
4258
  const { colorTheme } = useBetterCoreContext7();
4151
4259
  const [_, debouncedValue, setDebouncedValue] = useDebounceState2(
@@ -4179,7 +4287,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4179
4287
  onChangeValue?.(debouncedValue);
4180
4288
  }, [withDebounce, onChangeValue, debouncedValue]);
4181
4289
  const readyId = id ?? internalId;
4182
- return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme.styles.gap / 2, ...excludeStyle, children: [
4290
+ return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, ...excludeStyle, children: [
4183
4291
  label && /* @__PURE__ */ jsx17(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
4184
4292
  /* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "stretch", width: "100%", children: [
4185
4293
  prefix && /* @__PURE__ */ jsx17(
@@ -4187,12 +4295,12 @@ var InputFieldComponent = forwardRef11(function InputField({
4187
4295
  {
4188
4296
  alignItems: "center",
4189
4297
  justifyContent: "center",
4190
- border: `1px solid ${theme.colors.border}`,
4298
+ border: `1px solid ${theme2.colors.border}`,
4191
4299
  borderRight: "none",
4192
- backgroundColor: prefixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme.colors.backgroundContent, 0.03) : lightenColor2(theme.colors.backgroundContent, 0.1)),
4193
- borderTopLeftRadius: theme.styles.borderRadius,
4194
- borderBottomLeftRadius: theme.styles.borderRadius,
4195
- paddingInline: theme.styles.space,
4300
+ backgroundColor: prefixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme2.colors.backgroundContent, 0.03) : lightenColor2(theme2.colors.backgroundContent, 0.1)),
4301
+ borderTopLeftRadius: theme2.styles.borderRadius,
4302
+ borderBottomLeftRadius: theme2.styles.borderRadius,
4303
+ paddingInline: theme2.styles.space,
4196
4304
  children: prefix
4197
4305
  }
4198
4306
  ),
@@ -4205,7 +4313,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4205
4313
  name: leftIcon,
4206
4314
  position: "absolute",
4207
4315
  top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
4208
- left: theme.styles.space + 1,
4316
+ left: theme2.styles.space + 1,
4209
4317
  transform: "translateY(-50%)",
4210
4318
  pointerEvents: "none",
4211
4319
  zIndex: leftIconZIndex
@@ -4214,7 +4322,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4214
4322
  /* @__PURE__ */ jsx17(
4215
4323
  InputElement,
4216
4324
  {
4217
- theme,
4325
+ theme: theme2,
4218
4326
  withLeftIcon: leftIcon !== void 0,
4219
4327
  withRightIcon: rightIcon !== void 0,
4220
4328
  withPrefix: prefix !== void 0,
@@ -4237,7 +4345,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4237
4345
  icon: rightIcon,
4238
4346
  position: "absolute",
4239
4347
  top: 46 / 2,
4240
- right: theme.styles.space + 1 - theme.styles.space / 2,
4348
+ right: theme2.styles.space + 1 - theme2.styles.space / 2,
4241
4349
  transform: "translateY(-50%)",
4242
4350
  onClick: onClickRightIcon
4243
4351
  }
@@ -4247,7 +4355,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4247
4355
  name: rightIcon,
4248
4356
  position: "absolute",
4249
4357
  top: 46 / 2,
4250
- right: theme.styles.space + 1,
4358
+ right: theme2.styles.space + 1,
4251
4359
  transform: "translateY(-50%)",
4252
4360
  pointerEvents: "none"
4253
4361
  }
@@ -4260,12 +4368,12 @@ var InputFieldComponent = forwardRef11(function InputField({
4260
4368
  {
4261
4369
  alignItems: "center",
4262
4370
  justifyContent: "center",
4263
- border: `1px solid ${theme.colors.border}`,
4371
+ border: `1px solid ${theme2.colors.border}`,
4264
4372
  borderLeft: "none",
4265
- backgroundColor: suffixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme.colors.backgroundContent, 0.03) : lightenColor2(theme.colors.backgroundContent, 0.1)),
4266
- borderTopRightRadius: theme.styles.borderRadius,
4267
- borderBottomRightRadius: theme.styles.borderRadius,
4268
- paddingInline: theme.styles.space,
4373
+ backgroundColor: suffixBackgroundColor ?? (colorTheme === "light" ? darkenColor2(theme2.colors.backgroundContent, 0.03) : lightenColor2(theme2.colors.backgroundContent, 0.1)),
4374
+ borderTopRightRadius: theme2.styles.borderRadius,
4375
+ borderBottomRightRadius: theme2.styles.borderRadius,
4376
+ paddingInline: theme2.styles.space,
4269
4377
  children: suffix
4270
4378
  }
4271
4379
  )
@@ -4276,7 +4384,7 @@ var InputFieldComponent = forwardRef11(function InputField({
4276
4384
  as: "span",
4277
4385
  display: "block",
4278
4386
  fontSize: 14,
4279
- color: errorText ? theme.colors.error : labelColor ?? theme.colors.textSecondary,
4387
+ color: errorText ? theme2.colors.error : labelColor ?? theme2.colors.textSecondary,
4280
4388
  children: errorText || infoText
4281
4389
  }
4282
4390
  )
@@ -4296,7 +4404,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4296
4404
  id,
4297
4405
  ...props
4298
4406
  }, ref) {
4299
- const theme = useTheme19();
4407
+ const theme2 = useTheme19();
4300
4408
  const internalId = useId2();
4301
4409
  const { style, hoverStyle, restProps } = useComponentPropsGrouper(props);
4302
4410
  const dataProps = useComponentPropsWithPrefix(restProps, "data");
@@ -4309,7 +4417,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4309
4417
  [onChange, onChangeValue]
4310
4418
  );
4311
4419
  const readyId = id ?? internalId;
4312
- return /* @__PURE__ */ jsxs13(Div_default.column, { gap: theme.styles.gap / 2, children: [
4420
+ return /* @__PURE__ */ jsxs13(Div_default.column, { gap: theme2.styles.gap / 2, children: [
4313
4421
  label && /* @__PURE__ */ jsx17(Label_default, { text: label, required, isError: !!errorText, htmlFor: readyId }),
4314
4422
  /* @__PURE__ */ jsxs13(Div_default, { position: "relative", width: "100%", children: [
4315
4423
  leftIcon && /* @__PURE__ */ jsx17(
@@ -4318,7 +4426,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4318
4426
  name: leftIcon,
4319
4427
  position: "absolute",
4320
4428
  top: 46 / 2,
4321
- left: theme.styles.space + 1,
4429
+ left: theme2.styles.space + 1,
4322
4430
  transform: "translateY(-50%)",
4323
4431
  pointerEvents: "none"
4324
4432
  }
@@ -4326,7 +4434,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4326
4434
  /* @__PURE__ */ jsx17(
4327
4435
  TextareaElement,
4328
4436
  {
4329
- theme,
4437
+ theme: theme2,
4330
4438
  withLeftIcon: leftIcon !== void 0,
4331
4439
  withRightIcon: rightIcon !== void 0,
4332
4440
  required,
@@ -4347,7 +4455,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4347
4455
  icon: rightIcon,
4348
4456
  position: "absolute",
4349
4457
  top: 46 / 2,
4350
- right: theme.styles.space + 1 - theme.styles.space / 2,
4458
+ right: theme2.styles.space + 1 - theme2.styles.space / 2,
4351
4459
  transform: "translateY(-50%)",
4352
4460
  onClick: onClickRightIcon
4353
4461
  }
@@ -4357,7 +4465,7 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4357
4465
  name: rightIcon,
4358
4466
  position: "absolute",
4359
4467
  top: 46 / 2,
4360
- right: theme.styles.space + 1,
4468
+ right: theme2.styles.space + 1,
4361
4469
  transform: "translateY(-50%)",
4362
4470
  pointerEvents: "none"
4363
4471
  }
@@ -4368,8 +4476,8 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
4368
4476
  {
4369
4477
  as: "span",
4370
4478
  display: "block",
4371
- marginTop: theme.styles.gap / 2,
4372
- color: errorText ? theme.colors.error : props.labelColor ?? theme.colors.textSecondary,
4479
+ marginTop: theme2.styles.gap / 2,
4480
+ color: errorText ? theme2.colors.error : props.labelColor ?? theme2.colors.textSecondary,
4373
4481
  fontSize: 14,
4374
4482
  children: errorText || infoText
4375
4483
  }
@@ -4451,12 +4559,12 @@ InputFieldComponent.search = forwardRef11(function Search({ value, onChangeValue
4451
4559
  );
4452
4560
  });
4453
4561
  InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, value, onChangeValue, labelColor, id, ...props }, ref) {
4454
- const theme = useTheme19();
4562
+ const theme2 = useTheme19();
4455
4563
  const internalId = useId2();
4456
4564
  const [dropdownValue, setDropdownValue] = useState7();
4457
4565
  const [inputFieldValue, setInputFieldValue] = useState7(value?.toString() ?? "");
4458
4566
  const renderOption = useCallback10(
4459
- (option, index, isSelected) => /* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
4567
+ (option, index, isSelected) => /* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
4460
4568
  /* @__PURE__ */ jsx17(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
4461
4569
  /* @__PURE__ */ jsx17(Text_default, { children: option.label })
4462
4570
  ] }),
@@ -4508,7 +4616,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
4508
4616
  setInputFieldValue(newValue.slice(country?.phoneNumberExtension.length + 1));
4509
4617
  }, [value]);
4510
4618
  const readyId = id ?? internalId;
4511
- return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme.styles.gap / 2, children: [
4619
+ return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
4512
4620
  label && /* @__PURE__ */ jsx17(
4513
4621
  Label_default,
4514
4622
  {
@@ -4554,7 +4662,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
4554
4662
  ] });
4555
4663
  });
4556
4664
  InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...props }, ref) {
4557
- const theme = useTheme19();
4665
+ const theme2 = useTheme19();
4558
4666
  const holderRef = useRef5(null);
4559
4667
  const isMobileIOS = isMobileDevice && getBrowser() === "safari";
4560
4668
  const { internalValue, setInternalValue, inputFieldProps, insideInputFieldComponentProps } = useComponentInputFieldDateProps(props, holderRef, isMobileIOS);
@@ -4576,9 +4684,9 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...pr
4576
4684
  top: "100%",
4577
4685
  left: 0,
4578
4686
  width: "fit-content",
4579
- backgroundColor: theme.colors.backgroundContent,
4580
- borderBottomLeftRadius: theme.styles.borderRadius,
4581
- borderBottomRightRadius: theme.styles.borderRadius,
4687
+ backgroundColor: theme2.colors.backgroundContent,
4688
+ borderBottomLeftRadius: theme2.styles.borderRadius,
4689
+ borderBottomRightRadius: theme2.styles.borderRadius,
4582
4690
  boxShadow: "0px 10px 20px #00000020",
4583
4691
  userSelect: "none",
4584
4692
  ...insideInputFieldComponentProps,
@@ -4593,7 +4701,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...pr
4593
4701
  );
4594
4702
  });
4595
4703
  InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, defaultDateAfterTimePick, defaultTimeAfterDatePick = "00:00", ...props }, ref) {
4596
- const theme = useTheme19();
4704
+ const theme2 = useTheme19();
4597
4705
  const holderRef = useRef5(null);
4598
4706
  const selectedHourRef = useRef5(null);
4599
4707
  const selectedMinuteRef = useRef5(null);
@@ -4635,7 +4743,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4635
4743
  }, [isOpen]);
4636
4744
  const valueHour = parseInt(internalValue?.toString().split("T")?.[1]?.split(":")?.[0]).toString();
4637
4745
  const valueMinute = parseInt(internalValue?.toString().split("T")?.[1]?.split(":")?.[1]).toString();
4638
- const topSpacing = 32 + theme.styles.space / 2 + theme.styles.gap;
4746
+ const topSpacing = 32 + theme2.styles.space / 2 + theme2.styles.gap;
4639
4747
  return /* @__PURE__ */ jsx17(
4640
4748
  InputFieldComponent,
4641
4749
  {
@@ -4647,32 +4755,32 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4647
4755
  top: "100%",
4648
4756
  left: 0,
4649
4757
  width: "fit-content",
4650
- backgroundColor: theme.colors.backgroundContent,
4651
- borderBottomLeftRadius: theme.styles.borderRadius,
4652
- borderBottomRightRadius: theme.styles.borderRadius,
4758
+ backgroundColor: theme2.colors.backgroundContent,
4759
+ borderBottomLeftRadius: theme2.styles.borderRadius,
4760
+ borderBottomRightRadius: theme2.styles.borderRadius,
4653
4761
  boxShadow: "0px 10px 20px #00000020",
4654
4762
  overflow: "hidden",
4655
4763
  userSelect: "none",
4656
4764
  ...insideInputFieldComponentProps,
4657
- children: /* @__PURE__ */ jsxs13(Div_default.row, { gap: theme.styles.space, children: [
4765
+ children: /* @__PURE__ */ jsxs13(Div_default.row, { gap: theme2.styles.space, children: [
4658
4766
  /* @__PURE__ */ jsx17(Calendar_default, { value: internalValue, minDate, maxDate, onChange }),
4659
4767
  /* @__PURE__ */ jsxs13(
4660
4768
  Div_default.row,
4661
4769
  {
4662
4770
  height: 276,
4663
- gap: theme.styles.gap / 2,
4771
+ gap: theme2.styles.gap / 2,
4664
4772
  paddingTop: topSpacing,
4665
- paddingBottom: theme.styles.space / 2,
4666
- paddingRight: theme.styles.space / 2,
4773
+ paddingBottom: theme2.styles.space / 2,
4774
+ paddingRight: theme2.styles.space / 2,
4667
4775
  children: [
4668
4776
  /* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
4669
- /* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme.styles.gap / 2, children: "H" }),
4777
+ /* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "H" }),
4670
4778
  /* @__PURE__ */ jsx17(
4671
4779
  Div_default,
4672
4780
  {
4673
4781
  className: "react-better-html-no-scrollbar",
4674
4782
  width: buttonWidth,
4675
- height: `calc(100% - ${16 + theme.styles.gap / 2}px)`,
4783
+ height: `calc(100% - ${16 + theme2.styles.gap / 2}px)`,
4676
4784
  overflowY: "auto",
4677
4785
  tabIndex: -1,
4678
4786
  children: hours.map((hour) => {
@@ -4682,12 +4790,12 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4682
4790
  {
4683
4791
  alignItems: "center",
4684
4792
  justifyContent: "center",
4685
- color: isSelected ? theme.colors.base : theme.colors.textPrimary,
4686
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
4687
- borderRadius: theme.styles.borderRadius / 2,
4793
+ color: isSelected ? theme2.colors.base : theme2.colors.textPrimary,
4794
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4795
+ borderRadius: theme2.styles.borderRadius / 2,
4688
4796
  filterHover: "brightness(0.9)",
4689
4797
  cursor: "pointer",
4690
- padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`,
4798
+ padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`,
4691
4799
  value: hour,
4692
4800
  onClickWithValue: onClickHour,
4693
4801
  ref: isSelected ? selectedHourRef : void 0,
@@ -4700,13 +4808,13 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4700
4808
  )
4701
4809
  ] }),
4702
4810
  /* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
4703
- /* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme.styles.gap / 2, children: "M" }),
4811
+ /* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "M" }),
4704
4812
  /* @__PURE__ */ jsx17(
4705
4813
  Div_default,
4706
4814
  {
4707
4815
  className: "react-better-html-no-scrollbar",
4708
4816
  width: buttonWidth,
4709
- height: `calc(100% - ${16 + theme.styles.gap / 2}px)`,
4817
+ height: `calc(100% - ${16 + theme2.styles.gap / 2}px)`,
4710
4818
  overflowY: "auto",
4711
4819
  tabIndex: -1,
4712
4820
  children: minutes.map((minute) => {
@@ -4716,12 +4824,12 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4716
4824
  {
4717
4825
  alignItems: "center",
4718
4826
  justifyContent: "center",
4719
- color: isSelected ? theme.colors.base : theme.colors.textPrimary,
4720
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
4721
- borderRadius: theme.styles.borderRadius / 2,
4827
+ color: isSelected ? theme2.colors.base : theme2.colors.textPrimary,
4828
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4829
+ borderRadius: theme2.styles.borderRadius / 2,
4722
4830
  filterHover: "brightness(0.9)",
4723
4831
  cursor: "pointer",
4724
- padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`,
4832
+ padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`,
4725
4833
  value: minute,
4726
4834
  onClickWithValue: onClickMinute,
4727
4835
  ref: isSelected ? selectedMinuteRef : void 0,
@@ -4747,7 +4855,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
4747
4855
  );
4748
4856
  });
4749
4857
  InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
4750
- const theme = useTheme19();
4858
+ const theme2 = useTheme19();
4751
4859
  const holderRef = useRef5(null);
4752
4860
  const selectedHourRef = useRef5(null);
4753
4861
  const selectedMinuteRef = useRef5(null);
@@ -4789,9 +4897,9 @@ InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
4789
4897
  left: 0,
4790
4898
  width: buttonWidth * 2 + 2,
4791
4899
  height: 300,
4792
- backgroundColor: theme.colors.backgroundContent,
4793
- borderBottomLeftRadius: theme.styles.borderRadius,
4794
- borderBottomRightRadius: theme.styles.borderRadius,
4900
+ backgroundColor: theme2.colors.backgroundContent,
4901
+ borderBottomLeftRadius: theme2.styles.borderRadius,
4902
+ borderBottomRightRadius: theme2.styles.borderRadius,
4795
4903
  boxShadow: "0px 10px 20px #00000020",
4796
4904
  overflowY: "auto",
4797
4905
  userSelect: "none",
@@ -4812,11 +4920,11 @@ InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
4812
4920
  {
4813
4921
  alignItems: "center",
4814
4922
  justifyContent: "center",
4815
- color: isSelected ? theme.colors.base : theme.colors.textPrimary,
4816
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
4923
+ color: isSelected ? theme2.colors.base : theme2.colors.textPrimary,
4924
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4817
4925
  filterHover: "brightness(0.9)",
4818
4926
  cursor: "pointer",
4819
- padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`,
4927
+ padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`,
4820
4928
  value: hour,
4821
4929
  onClickWithValue: onClickHour,
4822
4930
  ref: isSelected ? selectedHourRef : void 0,
@@ -4842,11 +4950,11 @@ InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
4842
4950
  {
4843
4951
  alignItems: "center",
4844
4952
  justifyContent: "center",
4845
- color: isSelected ? theme.colors.base : theme.colors.textPrimary,
4846
- backgroundColor: isSelected ? theme.colors.primary : theme.colors.backgroundContent,
4953
+ color: isSelected ? theme2.colors.base : theme2.colors.textPrimary,
4954
+ backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
4847
4955
  filterHover: "brightness(0.9)",
4848
4956
  cursor: "pointer",
4849
- padding: `${theme.styles.space / 2}px ${theme.styles.space + theme.styles.gap}px`,
4957
+ padding: `${theme2.styles.space / 2}px ${theme2.styles.space + theme2.styles.gap}px`,
4850
4958
  value: minute,
4851
4959
  onClickWithValue: onClickMinute,
4852
4960
  ref: isSelected ? selectedMinuteRef : void 0,
@@ -5031,7 +5139,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5031
5139
  id,
5032
5140
  ...props
5033
5141
  }, ref) {
5034
- const theme = useTheme20();
5142
+ const theme2 = useTheme20();
5035
5143
  const internalId = useId3();
5036
5144
  const { style, hoverStyle, excludeStyle, restProps } = useComponentPropsGrouper(props, true);
5037
5145
  const dataProps = useComponentPropsWithPrefix(restProps, "data");
@@ -5052,14 +5160,14 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5052
5160
  onChange?.(newIsChecked, value);
5053
5161
  }, [checked, controlledChecked, onChange, value]);
5054
5162
  const readyId = id ?? internalId;
5055
- return /* @__PURE__ */ jsxs14(Div_default.column, { gap: theme.styles.gap, ...excludeStyle, children: [
5163
+ return /* @__PURE__ */ jsxs14(Div_default.column, { gap: theme2.styles.gap, ...excludeStyle, children: [
5056
5164
  label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
5057
- /* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
5165
+ /* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
5058
5166
  /* @__PURE__ */ jsxs14(Div_default.row, { position: "relative", alignItems: "center", children: [
5059
5167
  /* @__PURE__ */ jsx18(
5060
5168
  InputElement2,
5061
5169
  {
5062
- theme,
5170
+ theme: theme2,
5063
5171
  type: props.type ?? "checkbox",
5064
5172
  checked,
5065
5173
  onChange: onChangeElement,
@@ -5078,12 +5186,12 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5078
5186
  position: "absolute",
5079
5187
  top: "50%",
5080
5188
  left: "50%",
5081
- color: theme.colors.base,
5189
+ color: theme2.colors.base,
5082
5190
  size: 14,
5083
5191
  transform: `translate(-50%, -50%)${checked ? "" : " scale(0.4)"}`,
5084
5192
  opacity: checked ? 1 : 0,
5085
5193
  pointerEvents: "none",
5086
- transition: theme.styles.transition
5194
+ transition: theme2.styles.transition
5087
5195
  }
5088
5196
  ) : props.type === "radio" ? /* @__PURE__ */ jsx18(
5089
5197
  Div_default,
@@ -5093,7 +5201,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5093
5201
  height: 10,
5094
5202
  top: "50%",
5095
5203
  left: "50%",
5096
- backgroundColor: theme.colors.base,
5204
+ backgroundColor: theme2.colors.base,
5097
5205
  borderRadius: 999,
5098
5206
  transform: `translate(-50%, -50%)${checked ? "" : " scale(0.4)"}`,
5099
5207
  opacity: checked ? 1 : 0,
@@ -5103,13 +5211,13 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5103
5211
  ] }),
5104
5212
  text ? /* @__PURE__ */ jsxs14(Text_default, { color, userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
5105
5213
  text,
5106
- required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme.colors.error, children: [
5214
+ required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
5107
5215
  " ",
5108
5216
  "*"
5109
5217
  ] })
5110
5218
  ] }) : textAdvanced ? /* @__PURE__ */ jsxs14(Div_default.row, { userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
5111
5219
  textAdvanced,
5112
- required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme.colors.error, marginLeft: 4, children: [
5220
+ required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, marginLeft: 4, children: [
5113
5221
  " ",
5114
5222
  "*"
5115
5223
  ] })
@@ -5121,7 +5229,7 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
5121
5229
  as: "span",
5122
5230
  display: "block",
5123
5231
  fontSize: 14,
5124
- color: errorText ? theme.colors.error : labelColor ?? theme.colors.textSecondary,
5232
+ color: errorText ? theme2.colors.error : labelColor ?? theme2.colors.textSecondary,
5125
5233
  children: errorText || infoText
5126
5234
  }
5127
5235
  )
@@ -5147,7 +5255,7 @@ var ToggleInput_default = {
5147
5255
  id,
5148
5256
  ...props
5149
5257
  }, ref) {
5150
- const theme = useTheme20();
5258
+ const theme2 = useTheme20();
5151
5259
  const internalId = useId3();
5152
5260
  const { style, hoverStyle, excludeStyle, restProps } = useComponentPropsGrouper(props, true);
5153
5261
  const dataProps = useComponentPropsWithPrefix(restProps, "data");
@@ -5162,13 +5270,13 @@ var ToggleInput_default = {
5162
5270
  onChange?.(newIsChecked, value);
5163
5271
  }, [disabled, checked, onChange, controlledChecked, value]);
5164
5272
  const readyId = id ?? internalId;
5165
- return /* @__PURE__ */ jsxs14(Div_default.column, { width: "fit-content", gap: theme.styles.gap, ...excludeStyle, children: [
5273
+ return /* @__PURE__ */ jsxs14(Div_default.column, { width: "fit-content", gap: theme2.styles.gap, ...excludeStyle, children: [
5166
5274
  label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
5167
5275
  /* @__PURE__ */ jsx18(
5168
5276
  Div_default.row,
5169
5277
  {
5170
5278
  alignItems: "center",
5171
- gap: theme.styles.gap,
5279
+ gap: theme2.styles.gap,
5172
5280
  borderRadius: 999,
5173
5281
  isTabAccessed: true,
5174
5282
  onClick: onClickElement,
@@ -5181,7 +5289,7 @@ var ToggleInput_default = {
5181
5289
  children: /* @__PURE__ */ jsx18(
5182
5290
  SwitchElement,
5183
5291
  {
5184
- theme,
5292
+ theme: theme2,
5185
5293
  checked,
5186
5294
  disabled: disabled ?? false,
5187
5295
  isMouseDown,
@@ -5204,7 +5312,7 @@ var ToggleInput_default = {
5204
5312
  as: "span",
5205
5313
  display: "block",
5206
5314
  fontSize: 14,
5207
- color: errorText ? theme.colors.error : labelColor ?? theme.colors.textSecondary,
5315
+ color: errorText ? theme2.colors.error : labelColor ?? theme2.colors.textSecondary,
5208
5316
  children: errorText || infoText
5209
5317
  }
5210
5318
  )
@@ -5239,7 +5347,7 @@ var FormComponent = forwardRef13(function Form({
5239
5347
  children,
5240
5348
  ...props
5241
5349
  }, ref) {
5242
- const theme = useTheme21();
5350
+ const theme2 = useTheme21();
5243
5351
  const submitButtonIsDisabledInternal = useMemo7(() => {
5244
5352
  if (!form || !form.requiredFields) return false;
5245
5353
  return Object.entries(form.values).some(
@@ -5249,7 +5357,7 @@ var FormComponent = forwardRef13(function Form({
5249
5357
  const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
5250
5358
  const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
5251
5359
  return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs15("form", { name, onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
5252
- gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme.styles.space : theme.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs15(Fragment5, { children: [
5360
+ gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs15(Fragment5, { children: [
5253
5361
  child,
5254
5362
  index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, {})
5255
5363
  ] }, index)) : children }) : children,
@@ -5258,8 +5366,8 @@ var FormComponent = forwardRef13(function Form({
5258
5366
  {
5259
5367
  alignItems: "center",
5260
5368
  justifyContent: actionButtonsLocation === "left" ? "flex-start" : actionButtonsLocation === "center" ? "center" : "flex-end",
5261
- gap: theme.styles.gap,
5262
- marginTop: theme.styles.space,
5369
+ gap: theme2.styles.gap,
5370
+ marginTop: theme2.styles.space,
5263
5371
  children: [
5264
5372
  renderActionButtons,
5265
5373
  onClickCancel && /* @__PURE__ */ jsx19(
@@ -5297,10 +5405,10 @@ import { forwardRef as forwardRef14, memo as memo20 } from "react";
5297
5405
  import { useTheme as useTheme22 } from "react-better-core";
5298
5406
  import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
5299
5407
  var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, asColumn, gap, children, ...props }, ref) {
5300
- const theme = useTheme22();
5408
+ const theme2 = useTheme22();
5301
5409
  const mediaQuery = useMediaQuery();
5302
5410
  const breakingPoint = asColumn ?? (!noBreakingPoint ? mediaQuery.size900 : false);
5303
- const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme.styles.gap : theme.styles.space * 2;
5411
+ const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme2.styles.gap : theme2.styles.space * 2;
5304
5412
  return /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: gap ?? readyGap, invertFlexDirection: breakingPoint, ...props, ref, children: [
5305
5413
  children,
5306
5414
  oneItemOnly && /* @__PURE__ */ jsx20(Div_default, { width: "100%" })
@@ -5324,21 +5432,21 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
5324
5432
  children,
5325
5433
  ...props
5326
5434
  }, ref) {
5327
- const theme = useTheme22();
5435
+ const theme2 = useTheme22();
5328
5436
  const mediaQuery = useMediaQuery();
5329
- const titleGap = theme.styles.space;
5437
+ const titleGap = theme2.styles.space;
5330
5438
  return /* @__PURE__ */ jsxs16(FormRowComponent, { ...props, ref, children: [
5331
5439
  /* @__PURE__ */ jsxs16(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
5332
5440
  icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
5333
- /* @__PURE__ */ jsxs16(Div_default.column, { flex: 1, gap: theme.styles.gap / 2, children: [
5441
+ /* @__PURE__ */ jsxs16(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
5334
5442
  /* @__PURE__ */ jsxs16(Text_default, { as: titleAs, fontSize: titleFontSize, children: [
5335
5443
  title,
5336
- required && /* @__PURE__ */ jsxs16(Text_default, { as: "span", fontSize: 16, color: theme.colors.error, children: [
5444
+ required && /* @__PURE__ */ jsxs16(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
5337
5445
  " ",
5338
5446
  "*"
5339
5447
  ] })
5340
5448
  ] }),
5341
- description && /* @__PURE__ */ jsx20(Text_default, { fontSize: descriptionFontSize, color: theme.colors.textSecondary, children: description })
5449
+ description && /* @__PURE__ */ jsx20(Text_default, { fontSize: descriptionFontSize, color: theme2.colors.textSecondary, children: description })
5342
5450
  ] }),
5343
5451
  isLoading && /* @__PURE__ */ jsx20(Div_default, { width: 26 - titleGap })
5344
5452
  ] }),
@@ -5349,14 +5457,14 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
5349
5457
  width: props.noBreakingPoint && mediaQuery.size900 ? void 0 : "100%",
5350
5458
  alignItems: "center",
5351
5459
  justifyContent: alignChildren,
5352
- gap: theme.styles.gap,
5460
+ gap: theme2.styles.gap,
5353
5461
  children: [
5354
5462
  /* @__PURE__ */ jsx20(
5355
5463
  Div_default,
5356
5464
  {
5357
5465
  position: "absolute",
5358
5466
  top: "50%",
5359
- right: `calc(100% + ${theme.styles.space}px)`,
5467
+ right: `calc(100% + ${theme2.styles.space}px)`,
5360
5468
  transform: "translateY(-50%)",
5361
5469
  opacity: !isLoading ? 0 : void 0,
5362
5470
  pointerEvents: !isLoading ? "none" : void 0,
@@ -5364,7 +5472,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
5364
5472
  }
5365
5473
  ),
5366
5474
  children,
5367
- withActions && /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
5475
+ withActions && /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
5368
5476
  onClickReset && /* @__PURE__ */ jsx20(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
5369
5477
  /* @__PURE__ */ jsx20(Button_default.icon, { icon: "check", loaderName: saveButtonLoaderName, onClick: onClickSave })
5370
5478
  ] })
@@ -5420,8 +5528,8 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
5420
5528
  );
5421
5529
  };
5422
5530
  ColorThemeSwitchComponent.withText = function WithText({ withMoon, className, ...props }) {
5423
- const theme = useTheme23();
5424
- return /* @__PURE__ */ jsxs17(Div_default.row, { width: "fit-content", alignItems: "center", gap: theme.styles.gap, userSelect: "none", ...props, children: [
5531
+ const theme2 = useTheme23();
5532
+ return /* @__PURE__ */ jsxs17(Div_default.row, { width: "fit-content", alignItems: "center", gap: theme2.styles.gap, userSelect: "none", ...props, children: [
5425
5533
  /* @__PURE__ */ jsx21(Text_default, { children: "Light" }),
5426
5534
  /* @__PURE__ */ jsx21(ColorThemeSwitchComponent, { withMoon, className }),
5427
5535
  /* @__PURE__ */ jsx21(Text_default, { children: "Dark" })
@@ -5460,7 +5568,7 @@ var PaginationComponent = function Pagination({
5460
5568
  onClickNextPage,
5461
5569
  onChangePage
5462
5570
  }) {
5463
- const theme = useTheme24();
5571
+ const theme2 = useTheme24();
5464
5572
  const mediaQuery = useMediaQuery();
5465
5573
  const [currentPageInternal, setCurrentPage] = useState10(currentPage);
5466
5574
  const pageCountInternal = pageCount ?? (itemsPerPage !== void 0 ? Math.ceil(itemsLength / itemsPerPage) : 1);
@@ -5496,7 +5604,7 @@ var PaginationComponent = function Pagination({
5496
5604
  setCurrentPage(currentPage);
5497
5605
  }, [currentPage]);
5498
5606
  const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages2 / 1.4;
5499
- return /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme.styles.gap * 2, children: [
5607
+ return /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
5500
5608
  pageCountInternal > maximumVisiblePages2 && /* @__PURE__ */ jsx22(
5501
5609
  Button_default.icon,
5502
5610
  {
@@ -5513,7 +5621,7 @@ var PaginationComponent = function Pagination({
5513
5621
  alignItems: "center",
5514
5622
  justifyContent: "center",
5515
5623
  flexWrap: mobileFooterBreakingPoint ? "wrap" : void 0,
5516
- gap: theme.styles.gap,
5624
+ gap: theme2.styles.gap,
5517
5625
  children: paginationItems.map((pageIndex) => {
5518
5626
  const isActive = currentPageInternal === pageIndex;
5519
5627
  return /* @__PURE__ */ jsx22(
@@ -5527,8 +5635,8 @@ var PaginationComponent = function Pagination({
5527
5635
  Text_default,
5528
5636
  {
5529
5637
  fontWeight: isActive ? 700 : 400,
5530
- color: isActive ? theme.colors.primary : theme.colors.textSecondary,
5531
- transition: theme.styles.transition,
5638
+ color: isActive ? theme2.colors.primary : theme2.colors.textSecondary,
5639
+ transition: theme2.styles.transition,
5532
5640
  children: pageIndex
5533
5641
  }
5534
5642
  )
@@ -5730,7 +5838,7 @@ var TableComponent = forwardRef15(function Table({
5730
5838
  onChangeFilterDataValue,
5731
5839
  ...props
5732
5840
  }, ref) {
5733
- const theme = useTheme25();
5841
+ const theme2 = useTheme25();
5734
5842
  const mediaQuery = useMediaQuery();
5735
5843
  const { colorTheme } = useBetterCoreContext8();
5736
5844
  const filterModalRef = useRef6(null);
@@ -5794,7 +5902,7 @@ var TableComponent = forwardRef15(function Table({
5794
5902
  }
5795
5903
  case "image": {
5796
5904
  const imageProps = (typeof column.getImageProps === "function" ? column.getImageProps?.(item, itemIndex) : column.getImageProps) ?? {};
5797
- return /* @__PURE__ */ jsx23(Image_default, { width: "100%", borderRadius: theme.styles.borderRadius / 2, ...imageProps });
5905
+ return /* @__PURE__ */ jsx23(Image_default, { width: "100%", borderRadius: theme2.styles.borderRadius / 2, ...imageProps });
5798
5906
  }
5799
5907
  case "checkbox": {
5800
5908
  const { onChange, ...toggleInputProps } = (typeof column.getToggleInputProps === "function" ? column.getToggleInputProps?.(item, itemIndex) : column.getToggleInputProps) ?? {};
@@ -5825,7 +5933,7 @@ var TableComponent = forwardRef15(function Table({
5825
5933
  {
5826
5934
  name: "chevronDown",
5827
5935
  transform: `rotate(${expandedRows[itemIndex] ? 180 : 0}deg)`,
5828
- transition: theme.styles.transition
5936
+ transition: theme2.styles.transition
5829
5937
  }
5830
5938
  ) });
5831
5939
  }
@@ -5834,7 +5942,7 @@ var TableComponent = forwardRef15(function Table({
5834
5942
  }
5835
5943
  }
5836
5944
  },
5837
- [theme, checkedItems, expandedRows]
5945
+ [theme2, checkedItems, expandedRows]
5838
5946
  );
5839
5947
  const onClickRowElement = useCallback14(
5840
5948
  (item, index) => {
@@ -6091,8 +6199,8 @@ var TableComponent = forwardRef15(function Table({
6091
6199
  /* @__PURE__ */ jsx23(
6092
6200
  Div_default,
6093
6201
  {
6094
- border: `1px solid ${theme.colors.border}`,
6095
- borderRadius: theme.styles.borderRadius * 2,
6202
+ border: `1px solid ${theme2.colors.border}`,
6203
+ borderRadius: theme2.styles.borderRadius * 2,
6096
6204
  overflow: !containsOverflowComponents ? "auto" : void 0,
6097
6205
  ...props,
6098
6206
  ref: wrapperComponentRef,
@@ -6103,7 +6211,7 @@ var TableComponent = forwardRef15(function Table({
6103
6211
  withHover: onClickRow !== void 0 || expandColumn !== void 0,
6104
6212
  withStickyHeader,
6105
6213
  colorTheme,
6106
- theme,
6214
+ theme: theme2,
6107
6215
  containsOverflowComponents,
6108
6216
  withFooter,
6109
6217
  children: [
@@ -6120,7 +6228,7 @@ var TableComponent = forwardRef15(function Table({
6120
6228
  width: "100%",
6121
6229
  alignItems: "center",
6122
6230
  justifyContent: column.filter ? "space-between" : column.align === "center" ? "center" : column.align === "right" ? "flex-end" : "flex-start",
6123
- gap: theme.styles.gap,
6231
+ gap: theme2.styles.gap,
6124
6232
  children: [
6125
6233
  column.type === "checkbox" && onClickAllCheckboxes ? /* @__PURE__ */ jsx23(
6126
6234
  ToggleInput_default.checkbox,
@@ -6134,7 +6242,7 @@ var TableComponent = forwardRef15(function Table({
6134
6242
  Button_default.icon,
6135
6243
  {
6136
6244
  icon: "filter",
6137
- color: filterData[index] ? theme.colors.primary : theme.colors.textSecondary,
6245
+ color: filterData[index] ? theme2.colors.primary : theme2.colors.textSecondary,
6138
6246
  value: index,
6139
6247
  onClickWithValue: onClickFilterButton
6140
6248
  }
@@ -6177,14 +6285,14 @@ var TableComponent = forwardRef15(function Table({
6177
6285
  width: "100%",
6178
6286
  justifyContent: "center",
6179
6287
  flexReverse: true,
6180
- gap: theme.styles.gap / 2,
6288
+ gap: theme2.styles.gap / 2,
6181
6289
  children: [
6182
6290
  /* @__PURE__ */ jsxs19(
6183
6291
  Text_default,
6184
6292
  {
6185
6293
  position: mobileFooterBreakingPoint ? "relative" : "absolute",
6186
6294
  top: !mobileFooterBreakingPoint ? "50%" : void 0,
6187
- color: theme.colors.textSecondary,
6295
+ color: theme2.colors.textSecondary,
6188
6296
  transform: !mobileFooterBreakingPoint ? "translateY(-50%)" : void 0,
6189
6297
  userSelect: "none",
6190
6298
  children: [
@@ -6236,7 +6344,7 @@ var TableComponent = forwardRef15(function Table({
6236
6344
  Form_default,
6237
6345
  {
6238
6346
  form: filterForm,
6239
- gap: theme.styles.gap,
6347
+ gap: theme2.styles.gap,
6240
6348
  submitButtonText: "Filter",
6241
6349
  cancelButtonText: "Clear",
6242
6350
  onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
@@ -6248,9 +6356,9 @@ var TableComponent = forwardRef15(function Table({
6248
6356
  /* @__PURE__ */ jsx23(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
6249
6357
  /* @__PURE__ */ jsx23(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
6250
6358
  ] }) }),
6251
- openedFilterColumn.presets && /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme.styles.gap / 2, children: [
6359
+ openedFilterColumn.presets && /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme2.styles.gap / 2, children: [
6252
6360
  /* @__PURE__ */ jsx23(Label_default, { text: "Presets" }),
6253
- /* @__PURE__ */ jsx23(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx23(
6361
+ /* @__PURE__ */ jsx23(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx23(
6254
6362
  Button_default.secondary,
6255
6363
  {
6256
6364
  text: filterPresetsText[preset],
@@ -6266,10 +6374,10 @@ var TableComponent = forwardRef15(function Table({
6266
6374
  ) : openedFilterColumn.filter === "list" ? /* @__PURE__ */ jsxs19(
6267
6375
  Form_default,
6268
6376
  {
6269
- gap: theme.styles.space,
6377
+ gap: theme2.styles.space,
6270
6378
  submitButtonText: "Filter",
6271
6379
  cancelButtonText: "Clear",
6272
- renderActionButtons: /* @__PURE__ */ jsxs19(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme.styles.gap, children: [
6380
+ renderActionButtons: /* @__PURE__ */ jsxs19(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
6273
6381
  /* @__PURE__ */ jsx23(
6274
6382
  Button_default.secondary,
6275
6383
  {
@@ -6300,9 +6408,9 @@ var TableComponent = forwardRef15(function Table({
6300
6408
  ...filterForm.getInputFieldProps("search")
6301
6409
  }
6302
6410
  ) }),
6303
- /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme.styles.gap / 2, children: [
6411
+ /* @__PURE__ */ jsxs19(Div_default.column, { gap: theme2.styles.gap / 2, children: [
6304
6412
  /* @__PURE__ */ jsx23(Label_default, { text: "Possible values" }),
6305
- /* @__PURE__ */ jsx23(Div_default.row, { flexWrap: "wrap", gap: theme.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
6413
+ /* @__PURE__ */ jsx23(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
6306
6414
  const isActive = filterListSelectedItems?.includes(value.value);
6307
6415
  return /* @__PURE__ */ jsx23(
6308
6416
  Div_default.box,
@@ -6310,13 +6418,13 @@ var TableComponent = forwardRef15(function Table({
6310
6418
  isActive,
6311
6419
  value: value.value,
6312
6420
  onClickWithValue: onClickFilterListItem,
6313
- children: /* @__PURE__ */ jsxs19(Div_default.row, { alignItems: "center", gap: theme.styles.gap / 2, children: [
6421
+ children: /* @__PURE__ */ jsxs19(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
6314
6422
  /* @__PURE__ */ jsx23(Text_default, { children: value.label || value.value }),
6315
6423
  openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs19(
6316
6424
  Text_default,
6317
6425
  {
6318
6426
  fontSize: 14,
6319
- color: isActive ? theme.colors.base + "c0" : theme.colors.textSecondary,
6427
+ color: isActive ? theme2.colors.base + "c0" : theme2.colors.textSecondary,
6320
6428
  children: [
6321
6429
  "(",
6322
6430
  value.count,
@@ -6448,14 +6556,14 @@ var arrowStyle = (props, borderWidth) => ({
6448
6556
  }
6449
6557
  });
6450
6558
  var Arrow = memo24(function Arrow2(props) {
6451
- const theme = useTheme26();
6559
+ const theme2 = useTheme26();
6452
6560
  const { position, size } = props;
6453
6561
  const outerProps = useMemo10(
6454
6562
  () => ({
6455
6563
  ...props,
6456
- color: theme.colors.border
6564
+ color: theme2.colors.border
6457
6565
  }),
6458
- [props, theme]
6566
+ [props, theme2]
6459
6567
  );
6460
6568
  const borderWidth = 1;
6461
6569
  return /* @__PURE__ */ jsx24(
@@ -6499,16 +6607,16 @@ var TooltipComponent = forwardRef16(function Tooltip({
6499
6607
  onClose,
6500
6608
  children
6501
6609
  }, ref) {
6502
- const theme = useTheme26();
6610
+ const theme2 = useTheme26();
6503
6611
  const triggerHolderRef = useRef7(null);
6504
6612
  const contentRef = useRef7(null);
6505
6613
  const tooltipContainerRef = useRef7(null);
6506
6614
  const closeTimerRef = useRef7(void 0);
6507
6615
  const [isOpen, setIsOpen] = useState12(false);
6508
6616
  const [isOpenLate, setIsOpenLate] = useState12(false);
6509
- const arrowSize = withArrow ? theme.styles.gap : 0;
6510
- const gap = theme.styles.gap / 2;
6511
- const outsideScreenGap = theme.styles.gap / 2;
6617
+ const arrowSize = withArrow ? theme2.styles.gap : 0;
6618
+ const gap = theme2.styles.gap / 2;
6619
+ const outsideScreenGap = theme2.styles.gap / 2;
6512
6620
  const totalGap = arrowSize + gap;
6513
6621
  const openTooltip = useCallback15(() => {
6514
6622
  if (disabled) return;
@@ -6611,7 +6719,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
6611
6719
  /* @__PURE__ */ jsx24(
6612
6720
  TooltipContainer,
6613
6721
  {
6614
- theme,
6722
+ theme: theme2,
6615
6723
  position,
6616
6724
  align,
6617
6725
  pointerEvents: contentPointerEvents,
@@ -6628,10 +6736,10 @@ var TooltipComponent = forwardRef16(function Tooltip({
6628
6736
  position: "relative",
6629
6737
  width: contentWidth,
6630
6738
  minWidth: contentMinWidth,
6631
- backgroundColor: backgroundColor ?? theme.colors.backgroundContent,
6739
+ backgroundColor: backgroundColor ?? theme2.colors.backgroundContent,
6632
6740
  boxShadow: "0px 10px 20px #00000020",
6633
- paddingBlock: isSmall ? theme.styles.gap / 2 : theme.styles.gap,
6634
- paddingInline: asContextMenu ? 0 : isSmall ? theme.styles.space / 2 : theme.styles.space,
6741
+ paddingBlock: isSmall ? theme2.styles.gap / 2 : theme2.styles.gap,
6742
+ paddingInline: asContextMenu ? 0 : isSmall ? theme2.styles.space / 2 : theme2.styles.space,
6635
6743
  overflow: asContextMenu ? "hidden" : void 0,
6636
6744
  children: content
6637
6745
  }
@@ -6655,9 +6763,9 @@ var TooltipComponent = forwardRef16(function Tooltip({
6655
6763
  {
6656
6764
  position,
6657
6765
  align,
6658
- sideSpace: theme.styles.borderRadius,
6766
+ sideSpace: theme2.styles.borderRadius,
6659
6767
  size: arrowSize,
6660
- color: backgroundColor ?? theme.colors.backgroundContent,
6768
+ color: backgroundColor ?? theme2.colors.backgroundContent,
6661
6769
  isOpen
6662
6770
  }
6663
6771
  )
@@ -6681,16 +6789,16 @@ TooltipComponent.item = forwardRef16(function Item({
6681
6789
  onClick,
6682
6790
  onClickWithValue
6683
6791
  }, ref) {
6684
- const theme = useTheme26();
6792
+ const theme2 = useTheme26();
6685
6793
  return /* @__PURE__ */ jsxs20(
6686
6794
  Div_default.row,
6687
6795
  {
6688
6796
  alignItems: "center",
6689
- gap: theme.styles.space,
6690
- backgroundColor: theme.colors.backgroundContent,
6797
+ gap: theme2.styles.space,
6798
+ backgroundColor: theme2.colors.backgroundContent,
6691
6799
  filterHover: !disabled ? "brightness(0.9)" : "brightness(0.94)",
6692
- paddingBlock: theme.styles.gap,
6693
- paddingInline: theme.styles.space,
6800
+ paddingBlock: theme2.styles.gap,
6801
+ paddingInline: theme2.styles.space,
6694
6802
  cursor: disabled ? "not-allowed" : "pointer",
6695
6803
  isTabAccessed: true,
6696
6804
  id,
@@ -6700,29 +6808,29 @@ TooltipComponent.item = forwardRef16(function Item({
6700
6808
  onClickWithValue: !disabled ? onClickWithValue : void 0,
6701
6809
  ref,
6702
6810
  children: [
6703
- icon && /* @__PURE__ */ jsx24(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme.colors.textSecondary : void 0) }),
6704
- /* @__PURE__ */ jsxs20(Div_default.column, { flex: 1, gap: theme.styles.gap / 2, children: [
6705
- /* @__PURE__ */ jsx24(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme.colors.textPrimary, children: text }),
6706
- description && /* @__PURE__ */ jsx24(Text_default, { fontSize: 14, color: theme.colors.textSecondary, children: description })
6811
+ icon && /* @__PURE__ */ jsx24(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
6812
+ /* @__PURE__ */ jsxs20(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
6813
+ /* @__PURE__ */ jsx24(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
6814
+ description && /* @__PURE__ */ jsx24(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
6707
6815
  ] })
6708
6816
  ]
6709
6817
  }
6710
6818
  );
6711
6819
  });
6712
6820
  TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
6713
- const theme = useTheme26();
6714
- return /* @__PURE__ */ jsx24(Divider_default.horizontal, { marginBlock: theme.styles.gap, ...props, ref });
6821
+ const theme2 = useTheme26();
6822
+ return /* @__PURE__ */ jsx24(Divider_default.horizontal, { marginBlock: theme2.styles.gap, ...props, ref });
6715
6823
  });
6716
6824
  TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...props }, ref) {
6717
- const theme = useTheme26();
6825
+ const theme2 = useTheme26();
6718
6826
  return /* @__PURE__ */ jsx24(
6719
6827
  Text_default,
6720
6828
  {
6721
6829
  fontSize: 12,
6722
6830
  fontWeight: 700,
6723
6831
  textTransform: "uppercase",
6724
- marginBlock: theme.styles.gap / 2,
6725
- marginInline: theme.styles.space,
6832
+ marginBlock: theme2.styles.gap / 2,
6833
+ marginInline: theme2.styles.space,
6726
6834
  ...props,
6727
6835
  ref,
6728
6836
  children: text
@@ -6744,7 +6852,7 @@ var tabDotSize = 6;
6744
6852
  var defaultTabName = "tab";
6745
6853
  var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style = "default", onChange, children, ...props }, ref) {
6746
6854
  const reactRouterDomPlugin2 = usePlugin("react-router-dom");
6747
- const theme = useTheme27();
6855
+ const theme2 = useTheme27();
6748
6856
  const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
6749
6857
  const { componentsState } = useBetterHtmlContextInternal();
6750
6858
  const { colorTheme } = useBetterCoreContext9();
@@ -6760,7 +6868,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
6760
6868
  return selectedTabValue;
6761
6869
  });
6762
6870
  const [rerenderState, setRerenderState] = useState13(0);
6763
- const tabsGap = style === "box" ? theme.styles.gap / 2 : 0;
6871
+ const tabsGap = style === "box" ? theme2.styles.gap / 2 : 0;
6764
6872
  const onClickTab = useCallback16(
6765
6873
  (tab) => {
6766
6874
  setSelectedTab(tab);
@@ -6838,7 +6946,7 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
6838
6946
  },
6839
6947
  [selectedTab, onClickTab]
6840
6948
  );
6841
- return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", gap: theme.styles.space, ...props, children: [
6949
+ return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
6842
6950
  /* @__PURE__ */ jsxs21(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
6843
6951
  /* @__PURE__ */ jsx25(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
6844
6952
  const selected = tab === selectedTab;
@@ -6847,14 +6955,14 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
6847
6955
  {
6848
6956
  position: "relative",
6849
6957
  width: "fit-content",
6850
- backgroundColor: style === "box" ? selected ? theme.colors.primary : theme.colors.backgroundContent : theme.colors.backgroundBase,
6851
- borderRadius: style === "box" ? theme.styles.borderRadius : void 0,
6852
- borderTopLeftRadius: style === "borderRadiusTop" ? theme.styles.borderRadius : void 0,
6853
- borderTopRightRadius: style === "borderRadiusTop" ? theme.styles.borderRadius : void 0,
6854
- border: style === "box" ? `1px solid ${selected ? "transparent" : theme.colors.border}` : void 0,
6958
+ backgroundColor: style === "box" ? selected ? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
6959
+ borderRadius: style === "box" ? theme2.styles.borderRadius : void 0,
6960
+ borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
6961
+ borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
6962
+ border: style === "box" ? `1px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
6855
6963
  filterHover: colorTheme === "dark" ? style === "box" ? "brightness(1.2)" : "brightness(2)" : "brightness(0.9)",
6856
- paddingInline: theme.styles.space,
6857
- paddingBlock: theme.styles.gap,
6964
+ paddingInline: theme2.styles.space,
6965
+ paddingBlock: theme2.styles.gap,
6858
6966
  value: tab,
6859
6967
  cursor: "pointer",
6860
6968
  isTabAccessed: true,
@@ -6867,21 +6975,21 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
6867
6975
  Div_default,
6868
6976
  {
6869
6977
  position: "absolute",
6870
- top: (theme.styles.space - tabDotSize) / 2,
6871
- right: (theme.styles.space - tabDotSize) / 2,
6978
+ top: (theme2.styles.space - tabDotSize) / 2,
6979
+ right: (theme2.styles.space - tabDotSize) / 2,
6872
6980
  width: tabDotSize,
6873
6981
  height: tabDotSize,
6874
- backgroundColor: style === "box" && selected ? theme.colors.base : theme.colors.primary,
6982
+ backgroundColor: style === "box" && selected ? theme2.colors.base : theme2.colors.primary,
6875
6983
  borderRadius: 999,
6876
- transition: theme.styles.transition
6984
+ transition: theme2.styles.transition
6877
6985
  }
6878
6986
  ),
6879
6987
  /* @__PURE__ */ jsx25(
6880
6988
  Text_default,
6881
6989
  {
6882
6990
  fontWeight: 700,
6883
- color: !selected ? theme.colors.textSecondary : style === "box" ? theme.colors.base : void 0,
6884
- transition: theme.styles.transition,
6991
+ color: !selected ? theme2.colors.textSecondary : style === "box" ? theme2.colors.base : void 0,
6992
+ transition: theme2.styles.transition,
6885
6993
  whiteSpace: "nowrap",
6886
6994
  children: tab
6887
6995
  }
@@ -6899,8 +7007,8 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
6899
7007
  height: tabBottomLineWidth,
6900
7008
  bottom: 0,
6901
7009
  left: leftSpacing,
6902
- backgroundColor: accentColor ?? theme.colors.primary,
6903
- transition: firstRenderPassedRef.current ? theme.styles.transition : "none"
7010
+ backgroundColor: accentColor ?? theme2.colors.primary,
7011
+ transition: firstRenderPassedRef.current ? theme2.styles.transition : "none"
6904
7012
  }
6905
7013
  )
6906
7014
  ] }),
@@ -6953,7 +7061,7 @@ var FoldableComponent = forwardRef18(function Foldable({
6953
7061
  children,
6954
7062
  ...props
6955
7063
  }, ref) {
6956
- const theme = useTheme28();
7064
+ const theme2 = useTheme28();
6957
7065
  const bodyRef = useRef9(null);
6958
7066
  const [internalIsOpen, setInternalIsOpen] = useBooleanState6(defaultOpen);
6959
7067
  const [bodyVirtualHeight, setBodyVirtualHeight] = useState14();
@@ -7011,31 +7119,31 @@ var FoldableComponent = forwardRef18(function Foldable({
7011
7119
  {
7012
7120
  width: "100%",
7013
7121
  alignItems: "center",
7014
- gap: theme.styles.space,
7015
- paddingBlock: headerPaddingBlock ?? theme.styles.gap,
7122
+ gap: theme2.styles.space,
7123
+ paddingBlock: headerPaddingBlock ?? theme2.styles.gap,
7016
7124
  paddingInline: headerPaddingInline,
7017
7125
  cursor: "pointer",
7018
7126
  onClick: toggleOpen,
7019
7127
  userSelect: "none",
7020
7128
  children: [
7021
- /* @__PURE__ */ jsxs22(Div_default.row, { flex: 1, alignItems: "center", gap: theme.styles.space, children: [
7129
+ /* @__PURE__ */ jsxs22(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
7022
7130
  icon && /* @__PURE__ */ jsx26(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
7023
7131
  image && /* @__PURE__ */ jsx26(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
7024
- /* @__PURE__ */ jsxs22(Div_default.column, { gap: theme.styles.gap / 2, children: [
7025
- title && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", gap: theme.styles.space, children: [
7132
+ /* @__PURE__ */ jsxs22(Div_default.column, { gap: theme2.styles.gap / 2, children: [
7133
+ title && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", gap: theme2.styles.space, children: [
7026
7134
  /* @__PURE__ */ jsx26(
7027
7135
  Text_default,
7028
7136
  {
7029
7137
  as: titleAs,
7030
7138
  fontWeight: 700,
7031
7139
  lineHeight: "20px",
7032
- color: titleColor ?? theme.colors.textPrimary,
7140
+ color: titleColor ?? theme2.colors.textPrimary,
7033
7141
  children: title
7034
7142
  }
7035
7143
  ),
7036
7144
  titleRightElement
7037
7145
  ] }),
7038
- description && /* @__PURE__ */ jsx26(Text_default, { color: descriptionColor ?? theme.colors.textSecondary, children: description })
7146
+ description && /* @__PURE__ */ jsx26(Text_default, { color: descriptionColor ?? theme2.colors.textSecondary, children: description })
7039
7147
  ] })
7040
7148
  ] }),
7041
7149
  rightElement,
@@ -7044,37 +7152,37 @@ var FoldableComponent = forwardRef18(function Foldable({
7044
7152
  {
7045
7153
  name: "chevronDown",
7046
7154
  transform: `rotate(${isOpen ? 180 : 0}deg)`,
7047
- transition: theme.styles.transition
7155
+ transition: theme2.styles.transition
7048
7156
  }
7049
7157
  )
7050
7158
  ]
7051
7159
  }
7052
7160
  ),
7053
- /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, {}) }),
7161
+ /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, {}) }),
7054
7162
  /* @__PURE__ */ jsx26(
7055
7163
  Div_default,
7056
7164
  {
7057
7165
  maxHeight: isOpen ? bodyVirtualHeight : 0,
7058
7166
  opacity: !isOpen ? 0 : void 0,
7059
- transition: `max-height ${isOpen ? animationDurationOpen : animationDurationClose}s ease, opacity ${theme.styles.transition}`,
7167
+ transition: `max-height ${isOpen ? animationDurationOpen : animationDurationClose}s ease, opacity ${theme2.styles.transition}`,
7060
7168
  overflow: !isOpen ? "hidden" : void 0,
7061
7169
  pointerEvents: !isOpen ? "none" : void 0,
7062
7170
  ref: bodyRef,
7063
- children: /* @__PURE__ */ jsx26(Div_default, { paddingBlock: theme.styles.gap, paddingInline: headerPaddingInline, children })
7171
+ children: /* @__PURE__ */ jsx26(Div_default, { paddingBlock: theme2.styles.gap, paddingInline: headerPaddingInline, children })
7064
7172
  }
7065
7173
  )
7066
7174
  ] });
7067
7175
  });
7068
7176
  FoldableComponent.box = forwardRef18(function Box3({ ...props }, ref) {
7069
- const theme = useTheme28();
7177
+ const theme2 = useTheme28();
7070
7178
  return /* @__PURE__ */ jsx26(
7071
7179
  FoldableComponent,
7072
7180
  {
7073
- backgroundColor: theme.colors.backgroundContent,
7074
- border: `1px solid ${theme.colors.border}`,
7075
- borderRadius: theme.styles.borderRadius,
7076
- headerPaddingBlock: (theme.styles.gap + theme.styles.space) / 2,
7077
- headerPaddingInline: theme.styles.space,
7181
+ backgroundColor: theme2.colors.backgroundContent,
7182
+ border: `1px solid ${theme2.colors.border}`,
7183
+ borderRadius: theme2.styles.borderRadius,
7184
+ headerPaddingBlock: (theme2.styles.gap + theme2.styles.space) / 2,
7185
+ headerPaddingInline: theme2.styles.space,
7078
7186
  ...props,
7079
7187
  ref
7080
7188
  }
@@ -7110,7 +7218,7 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7110
7218
  );
7111
7219
  }
7112
7220
  const reactRouterDomPluginConfig = reactRouterDomPlugin2.getConfig();
7113
- const theme = useTheme29();
7221
+ const theme2 = useTheme29();
7114
7222
  const mediaQuery = useMediaQuery();
7115
7223
  const location = reactRouterDomPluginConfig.useLocation();
7116
7224
  const { components, sideMenuIsCollapsed, setSideMenuIsCollapsed } = useBetterHtmlContextInternal();
@@ -7131,20 +7239,20 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7131
7239
  }
7132
7240
  }, [onClick, item, isCollapsed]);
7133
7241
  const isActive = activeItem && item.href && activeItem.href === item.href;
7134
- const readyBackgroundColor = backgroundColor ?? theme.colors.backgroundContent;
7242
+ const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
7135
7243
  const iconSize = 16;
7136
- const paddingBlock = theme.styles.gap;
7137
- const paddingLeft = theme.styles.gap + 2;
7138
- const iconGap = theme.styles.gap;
7244
+ const paddingBlock = theme2.styles.gap;
7245
+ const paddingLeft = theme2.styles.gap + 2;
7246
+ const iconGap = theme2.styles.gap;
7139
7247
  const lineHeight = 20;
7140
7248
  const lineWidth = 2;
7141
7249
  const lineEndRadius = iconSize / 2 + iconGap * 2;
7142
7250
  const content = /* @__PURE__ */ jsx27(
7143
7251
  Tooltip_default,
7144
7252
  {
7145
- content: /* @__PURE__ */ jsxs23(Div_default.row, { alignItems: "center", gap: theme.styles.gap, children: [
7253
+ content: /* @__PURE__ */ jsxs23(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
7146
7254
  /* @__PURE__ */ jsx27(Text_default, { whiteSpace: "nowrap", children: item.text }),
7147
- item.children && /* @__PURE__ */ jsx27(Icon_default, { name: "chevronDown", color: theme.colors.textSecondary, size: 14 })
7255
+ item.children && /* @__PURE__ */ jsx27(Icon_default, { name: "chevronDown", color: theme2.colors.textSecondary, size: 14 })
7148
7256
  ] }),
7149
7257
  contentPointerEvents: "none",
7150
7258
  withArrow: true,
@@ -7157,26 +7265,26 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7157
7265
  alignItems: "center",
7158
7266
  gap: iconGap,
7159
7267
  whiteSpace: "nowrap",
7160
- backgroundColor: isActive ? colorTheme === "dark" ? lightenColor3(theme.colors.primary, 0.7) : lightenColor3(theme.colors.primary, 0.85) : readyBackgroundColor,
7161
- borderRadius: theme.styles.borderRadius,
7268
+ backgroundColor: isActive ? colorTheme === "dark" ? lightenColor3(theme2.colors.primary, 0.7) : lightenColor3(theme2.colors.primary, 0.85) : readyBackgroundColor,
7269
+ borderRadius: theme2.styles.borderRadius,
7162
7270
  paddingBlock,
7163
- paddingLeft: isCollapsed ? theme.styles.space : paddingLeft,
7164
- paddingRight: theme.styles.space,
7271
+ paddingLeft: isCollapsed ? theme2.styles.space : paddingLeft,
7272
+ paddingRight: theme2.styles.space,
7165
7273
  filterHover: `brightness(${colorTheme === "dark" ? isActive ? 0.8 : 1.3 : isActive ? 0.8 : 0.95})`,
7166
7274
  overflow: isCollapsed ? "hidden" : void 0,
7167
7275
  cursor: item.disabled ? "not-allowed" : "pointer",
7168
7276
  opacity: item.disabled ? 0.6 : void 0,
7169
7277
  onClick: onClickElement,
7170
7278
  children: [
7171
- /* @__PURE__ */ jsx27(Icon_default, { name: item.iconName, color: theme.colors.primary, size: iconSize, flexShrink: 0 }),
7279
+ /* @__PURE__ */ jsx27(Icon_default, { name: item.iconName, color: theme2.colors.primary, size: iconSize, flexShrink: 0 }),
7172
7280
  /* @__PURE__ */ jsx27(
7173
7281
  Text_default,
7174
7282
  {
7175
7283
  flex: 1,
7176
7284
  lineHeight: `${lineHeight}px`,
7177
- color: isActive ? theme.colors.primary : theme.colors.textPrimary,
7285
+ color: isActive ? theme2.colors.primary : theme2.colors.textPrimary,
7178
7286
  opacity: isCollapsed ? 0 : void 0,
7179
- transition: theme.styles.transition,
7287
+ transition: theme2.styles.transition,
7180
7288
  children: item.text
7181
7289
  }
7182
7290
  ),
@@ -7184,10 +7292,10 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7184
7292
  Icon_default,
7185
7293
  {
7186
7294
  name: "chevronDown",
7187
- color: theme.colors.textSecondary,
7295
+ color: theme2.colors.textSecondary,
7188
7296
  size: 14,
7189
7297
  transform: isOpened ? "rotate(180deg)" : void 0,
7190
- transition: theme.styles.transition
7298
+ transition: theme2.styles.transition
7191
7299
  }
7192
7300
  )
7193
7301
  ]
@@ -7225,11 +7333,11 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7225
7333
  {
7226
7334
  position: "relative",
7227
7335
  maxHeight: isOpened ? 1e3 : 0,
7228
- gap: theme.styles.gap / 2,
7229
- marginTop: isOpened ? theme.styles.gap / 2 : void 0,
7336
+ gap: theme2.styles.gap / 2,
7337
+ marginTop: isOpened ? theme2.styles.gap / 2 : void 0,
7230
7338
  paddingLeft: paddingLeft + iconSize + iconGap,
7231
7339
  overflow: "hidden",
7232
- transition: `max-height ${theme.styles.transition}, margin-top ${theme.styles.transition}`,
7340
+ transition: `max-height ${theme2.styles.transition}, margin-top ${theme2.styles.transition}`,
7233
7341
  children: [
7234
7342
  item.children.map((child) => /* @__PURE__ */ jsx27(
7235
7343
  MenuItemComponent2,
@@ -7255,7 +7363,7 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7255
7363
  position: "relative",
7256
7364
  width: lineWidth,
7257
7365
  height: "100%",
7258
- backgroundColor: theme.colors.border,
7366
+ backgroundColor: theme2.colors.border,
7259
7367
  zIndex: 1
7260
7368
  }
7261
7369
  ),
@@ -7267,7 +7375,7 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7267
7375
  height: lineEndRadius,
7268
7376
  top: `calc(100% - ${lineEndRadius / 2}px)`,
7269
7377
  left: 0,
7270
- border: `${lineWidth}px solid ${theme.colors.border}`,
7378
+ border: `${lineWidth}px solid ${theme2.colors.border}`,
7271
7379
  borderRadius: 999,
7272
7380
  borderTopColor: readyBackgroundColor,
7273
7381
  borderLeftColor: readyBackgroundColor,
@@ -7300,7 +7408,7 @@ var SideMenuComponent = function SideMenu({
7300
7408
  backgroundColor,
7301
7409
  paddingTop
7302
7410
  }) {
7303
- const theme = useTheme29();
7411
+ const theme2 = useTheme29();
7304
7412
  const mediaQuery = useMediaQuery();
7305
7413
  const { components, sideMenuIsCollapsed, setSideMenuIsCollapsed, sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
7306
7414
  const [activeItem, setActiveItem] = useState15();
@@ -7320,9 +7428,9 @@ var SideMenuComponent = function SideMenu({
7320
7428
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
7321
7429
  const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
7322
7430
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
7323
- const sideMenuCollapsedWidth = theme.styles.space + theme.styles.space * 2 + 16 + theme.styles.space;
7324
- const readyBackgroundColor = backgroundColor ?? theme.colors.backgroundContent;
7325
- const logoSize = sideMenuCollapsedWidth - theme.styles.space * 2;
7431
+ const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
7432
+ const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
7433
+ const logoSize = sideMenuCollapsedWidth - theme2.styles.space * 2;
7326
7434
  return /* @__PURE__ */ jsx27(SideMenuContextProvider, { value: contextValue, children: /* @__PURE__ */ jsxs23(
7327
7435
  Div_default.column,
7328
7436
  {
@@ -7332,15 +7440,15 @@ var SideMenuComponent = function SideMenu({
7332
7440
  top: topSpace,
7333
7441
  left: 0,
7334
7442
  backgroundColor: readyBackgroundColor,
7335
- borderRight: `solid 1px ${theme.colors.border}`,
7443
+ borderRight: `solid 1px ${theme2.colors.border}`,
7336
7444
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
7337
- paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme.styles.gap : theme.styles.space),
7338
- transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme.styles.transition}` : "none" : theme.styles.transition,
7445
+ paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
7446
+ transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
7339
7447
  userSelect: "none",
7340
7448
  zIndex: 10,
7341
7449
  children: [
7342
- /* @__PURE__ */ jsxs23(Div_default.column, { width: "100%", height: "100%", gap: theme.styles.space, children: [
7343
- (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs23(Div_default.row, { alignItems: "center", paddingInline: theme.styles.space, children: [
7450
+ /* @__PURE__ */ jsxs23(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
7451
+ (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs23(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
7344
7452
  (logoAssetName || logoUrl) && /* @__PURE__ */ jsx27(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs23(
7345
7453
  Div_default.row,
7346
7454
  {
@@ -7348,7 +7456,7 @@ var SideMenuComponent = function SideMenu({
7348
7456
  width: sideMenuCollapsedWidth ? logoSize : void 0,
7349
7457
  height: logoSize,
7350
7458
  whiteSpace: "nowrap",
7351
- gap: theme.styles.gap,
7459
+ gap: theme2.styles.gap,
7352
7460
  children: [
7353
7461
  /* @__PURE__ */ jsx27(
7354
7462
  Image_default,
@@ -7367,7 +7475,7 @@ var SideMenuComponent = function SideMenu({
7367
7475
  fontSize: 22,
7368
7476
  fontWeight: 800,
7369
7477
  opacity: !isCollapsed ? 1 : 0,
7370
- transition: theme.styles.transition,
7478
+ transition: theme2.styles.transition,
7371
7479
  userSelect: "none",
7372
7480
  children: logoText
7373
7481
  }
@@ -7384,9 +7492,9 @@ var SideMenuComponent = function SideMenu({
7384
7492
  width: "100%",
7385
7493
  height: "100%",
7386
7494
  overflowY: !isCollapsed ? "auto" : void 0,
7387
- paddingInline: theme.styles.space,
7388
- paddingBottom: !isCollapsable && !readyBottomItems ? theme.styles.space : void 0,
7389
- children: /* @__PURE__ */ jsx27(Div_default.column, { gap: theme.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx27(
7495
+ paddingInline: theme2.styles.space,
7496
+ paddingBottom: !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0,
7497
+ children: /* @__PURE__ */ jsx27(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx27(
7390
7498
  MenuItemComponent,
7391
7499
  {
7392
7500
  item,
@@ -7400,12 +7508,12 @@ var SideMenuComponent = function SideMenu({
7400
7508
  readyBottomItems && /* @__PURE__ */ jsx27(
7401
7509
  Div_default.column,
7402
7510
  {
7403
- borderTop: mediaQuery.size1000 ? `solid 1px ${theme.colors.border}` : void 0,
7404
- gap: theme.styles.gap / 2,
7511
+ borderTop: mediaQuery.size1000 ? `solid 1px ${theme2.colors.border}` : void 0,
7512
+ gap: theme2.styles.gap / 2,
7405
7513
  marginTop: "auto",
7406
- paddingTop: mediaQuery.size1000 ? theme.styles.space : void 0,
7407
- paddingInline: theme.styles.space,
7408
- paddingBottom: !isCollapsable ? theme.styles.space : void 0,
7514
+ paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
7515
+ paddingInline: theme2.styles.space,
7516
+ paddingBottom: !isCollapsable ? theme2.styles.space : void 0,
7409
7517
  children: readyBottomItems.map((item) => /* @__PURE__ */ jsx27(
7410
7518
  MenuItemComponent,
7411
7519
  {
@@ -7422,30 +7530,30 @@ var SideMenuComponent = function SideMenu({
7422
7530
  isCollapsable && /* @__PURE__ */ jsx27(
7423
7531
  Div_default,
7424
7532
  {
7425
- borderTop: `solid 1px ${theme.colors.border}`,
7533
+ borderTop: `solid 1px ${theme2.colors.border}`,
7426
7534
  marginTop: !readyBottomItems ? "auto" : void 0,
7427
- paddingInline: theme.styles.space,
7428
- paddingBlock: theme.styles.space,
7535
+ paddingInline: theme2.styles.space,
7536
+ paddingBlock: theme2.styles.space,
7429
7537
  children: /* @__PURE__ */ jsx27(
7430
7538
  Div_default.row,
7431
7539
  {
7432
7540
  alignItems: "center",
7433
7541
  justifyContent: "center",
7434
7542
  backgroundColor: readyBackgroundColor,
7435
- borderRadius: theme.styles.borderRadius,
7543
+ borderRadius: theme2.styles.borderRadius,
7436
7544
  cursor: "pointer",
7437
7545
  filterHover: filterHover().z1,
7438
7546
  isTabAccessed: true,
7439
- paddingBlock: theme.styles.gap,
7547
+ paddingBlock: theme2.styles.gap,
7440
7548
  onClick: setSideMenuIsCollapsed.toggle,
7441
7549
  children: /* @__PURE__ */ jsx27(
7442
7550
  Icon_default,
7443
7551
  {
7444
7552
  name: "chevronRight",
7445
7553
  size: 20,
7446
- color: theme.colors.textSecondary,
7554
+ color: theme2.colors.textSecondary,
7447
7555
  transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
7448
- transition: theme.styles.transition
7556
+ transition: theme2.styles.transition
7449
7557
  }
7450
7558
  )
7451
7559
  }
@@ -7457,30 +7565,30 @@ var SideMenuComponent = function SideMenu({
7457
7565
  Div_default.row,
7458
7566
  {
7459
7567
  position: "absolute",
7460
- top: theme.styles.space,
7568
+ top: theme2.styles.space,
7461
7569
  left: "100%",
7462
7570
  backgroundColor: readyBackgroundColor,
7463
- border: `solid 1px ${theme.colors.border}`,
7571
+ border: `solid 1px ${theme2.colors.border}`,
7464
7572
  borderLeft: "none",
7465
- borderTopRightRadius: theme.styles.borderRadius,
7466
- borderBottomRightRadius: theme.styles.borderRadius,
7573
+ borderTopRightRadius: theme2.styles.borderRadius,
7574
+ borderBottomRightRadius: theme2.styles.borderRadius,
7467
7575
  alignItems: "center",
7468
7576
  cursor: "pointer",
7469
7577
  opacity: !mediaQuery.size1000 ? 0 : void 0,
7470
7578
  pointerEvents: !mediaQuery.size1000 ? "none" : void 0,
7471
- padding: theme.styles.gap,
7472
- paddingRight: (theme.styles.space + theme.styles.gap) / 2,
7579
+ padding: theme2.styles.gap,
7580
+ paddingRight: (theme2.styles.space + theme2.styles.gap) / 2,
7473
7581
  transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
7474
- transition: theme.styles.transition,
7582
+ transition: theme2.styles.transition,
7475
7583
  onClick: setSideMenuIsOpenMobile.toggle,
7476
7584
  children: /* @__PURE__ */ jsx27(
7477
7585
  Icon_default,
7478
7586
  {
7479
7587
  name: "chevronRight",
7480
7588
  size: 20,
7481
- color: theme.colors.textSecondary,
7589
+ color: theme2.colors.textSecondary,
7482
7590
  transform: sideMenuIsOpenMobile ? "rotate(180deg)" : void 0,
7483
- transition: theme.styles.transition
7591
+ transition: theme2.styles.transition
7484
7592
  }
7485
7593
  )
7486
7594
  }
@@ -7491,18 +7599,18 @@ var SideMenuComponent = function SideMenu({
7491
7599
  ) });
7492
7600
  };
7493
7601
  SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, ...props }) {
7494
- const theme = useTheme29();
7602
+ const theme2 = useTheme29();
7495
7603
  const mediaQuery = useMediaQuery();
7496
7604
  const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
7497
7605
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
7498
- const sideMenuCollapsedWidth = theme.styles.space + theme.styles.space * 2 + 16 + theme.styles.space;
7606
+ const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
7499
7607
  return /* @__PURE__ */ jsxs23(
7500
7608
  Div_default,
7501
7609
  {
7502
7610
  position: "relative",
7503
7611
  width: "100%",
7504
7612
  paddingLeft: !mediaQuery.size1000 ? !sideMenuIsCollapsed ? sideMenuWidth : sideMenuCollapsedWidth : void 0,
7505
- transition: theme.styles.transition,
7613
+ transition: theme2.styles.transition,
7506
7614
  children: [
7507
7615
  outsideComponent,
7508
7616
  /* @__PURE__ */ jsx27(PageHolder_default, { ...props })
@@ -7511,7 +7619,7 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({ outsideComponent, .
7511
7619
  );
7512
7620
  };
7513
7621
  SideMenuComponent.burgerButton = function BurgerButton() {
7514
- const theme = useTheme29();
7622
+ const theme2 = useTheme29();
7515
7623
  const { sideMenuIsOpenMobile, setSideMenuIsOpenMobile } = useBetterHtmlContextInternal();
7516
7624
  const [isHovered, setIsHovered] = useBooleanState7();
7517
7625
  const width = 2;
@@ -7535,10 +7643,10 @@ SideMenuComponent.burgerButton = function BurgerButton() {
7535
7643
  height: width,
7536
7644
  top: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
7537
7645
  left: 0,
7538
- backgroundColor: theme.colors.border,
7646
+ backgroundColor: theme2.colors.border,
7539
7647
  borderRadius: 999,
7540
7648
  transform: sideMenuIsOpenMobile ? "rotate(45deg)" : void 0,
7541
- transition: theme.styles.transition
7649
+ transition: theme2.styles.transition
7542
7650
  }
7543
7651
  ),
7544
7652
  /* @__PURE__ */ jsx27(
@@ -7549,11 +7657,11 @@ SideMenuComponent.burgerButton = function BurgerButton() {
7549
7657
  height: width,
7550
7658
  top: "50%",
7551
7659
  left: 0,
7552
- backgroundColor: theme.colors.border,
7660
+ backgroundColor: theme2.colors.border,
7553
7661
  borderRadius: 999,
7554
7662
  transform: "translateY(-50%)",
7555
7663
  opacity: sideMenuIsOpenMobile ? 0 : void 0,
7556
- transition: theme.styles.transition
7664
+ transition: theme2.styles.transition
7557
7665
  }
7558
7666
  ),
7559
7667
  /* @__PURE__ */ jsx27(
@@ -7564,10 +7672,10 @@ SideMenuComponent.burgerButton = function BurgerButton() {
7564
7672
  height: width,
7565
7673
  bottom: sideMenuIsOpenMobile ? `calc(50% - ${width / 2}px)` : 0,
7566
7674
  left: 0,
7567
- backgroundColor: theme.colors.border,
7675
+ backgroundColor: theme2.colors.border,
7568
7676
  borderRadius: 999,
7569
7677
  transform: sideMenuIsOpenMobile ? "rotate(-45deg)" : void 0,
7570
- transition: theme.styles.transition
7678
+ transition: theme2.styles.transition
7571
7679
  }
7572
7680
  )
7573
7681
  ]