@ttn-shared/ui 1.2.5 → 1.2.7

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.cjs CHANGED
@@ -319,6 +319,7 @@ var useIncomeGroups = ({
319
319
  filters?.corpclientId,
320
320
  filters?.contractId,
321
321
  filters?.affiliationTypeId,
322
+ filters?.enabled,
322
323
  filters?.eaccount
323
324
  ],
324
325
  queryFn: () => getIncomeGroups(token, baseUrl, filters),
@@ -405,7 +406,8 @@ var PatientVoluntaryInsuranceForm = ({
405
406
  eaccount: userInfo.accountId,
406
407
  corpclientId: Number(insuranceInfo.companyId) || void 0,
407
408
  contractId: Number(insuranceInfo.plan) || void 0,
408
- affiliationTypeId: Number(form.values.affiliationTypeId) || void 0
409
+ affiliationTypeId: Number(form.values.affiliationTypeId) || void 0,
410
+ enabled: 1
409
411
  }
410
412
  });
411
413
  const companyTypeOptions = (0, import_react2.useMemo)(() => {
@@ -1590,7 +1592,8 @@ var PatientForm = ({
1590
1592
  eaccount: userInfo.accountId,
1591
1593
  corpclientId: Number(form.values.mandatoryInsurance.companyId) || void 0,
1592
1594
  contractId: Number(form.values.mandatoryInsurance.plan) || void 0,
1593
- affiliationTypeId: Number(form.values.affiliationTypeId) || void 0
1595
+ affiliationTypeId: Number(form.values.affiliationTypeId) || void 0,
1596
+ enabled: 1
1594
1597
  }
1595
1598
  });
1596
1599
  const handleSubmit = (values) => {
@@ -2390,18 +2393,23 @@ var createPatientForm = (info) => {
2390
2393
  };
2391
2394
 
2392
2395
  // src/components/header/Header.tsx
2396
+ var import_react8 = require("react");
2393
2397
  var MC3 = __toESM(require("@mantine/core"), 1);
2394
2398
  var TI4 = __toESM(require("@tabler/icons-react"), 1);
2395
- var import_react8 = require("react");
2396
2399
 
2397
2400
  // src/components/header/HelpModal.tsx
2398
2401
  var MC = __toESM(require("@mantine/core"), 1);
2399
2402
  var TI2 = __toESM(require("@tabler/icons-react"), 1);
2403
+
2404
+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7xiGzcLweyOsdDtn2LWWLxWKxWCwWi8ViuW/8B6EJ4fqR8UVFAAAAAElFTkSuQmCC";
2406
+
2407
+ // src/components/header/HelpModal.tsx
2400
2408
  var import_jsx_runtime10 = require("react/jsx-runtime");
2401
- var HelpModal = ({ opened, onClose, enterpriseLogo }) => {
2409
+ var HelpModal = ({ opened, onClose }) => {
2402
2410
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MC.Modal, { title: "Ayuda", opened, onClose, "data-testid": "header-help-modal", children: [
2403
2411
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MC.Stack, { mb: "lg", align: "center", children: [
2404
- enterpriseLogo,
2412
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MC.Image, { src: logo_ttn_default, alt: "Enterprise Logo", draggable: false, w: 126 }),
2405
2413
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MC.Text, { fz: "lg", fw: "bold", children: "Informaci\xF3n de contacto" }),
2406
2414
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MC.Stack, { children: [
2407
2415
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MC.Group, { children: [
@@ -2490,7 +2498,6 @@ var import_jsx_runtime12 = require("react/jsx-runtime");
2490
2498
  var Header = ({
2491
2499
  moduleName,
2492
2500
  logo,
2493
- enterpriseLogo,
2494
2501
  accounts,
2495
2502
  currentSite,
2496
2503
  onBackHome,
@@ -2513,82 +2520,93 @@ var Header = ({
2513
2520
  return { currentAccount: currentAccount2, currentProfile: currentProfile2 };
2514
2521
  }, [accounts, userInfo]);
2515
2522
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
2516
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Flex, { w: "100%", px: 16, py: 6, justify: "space-between", align: "center", children: [
2517
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Group, { children: [
2518
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.UnstyledButton, { onClick: onBackHome, "data-testid": "header-logo-button", children: logo }),
2519
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Title, { order: 3, c: "gray.4", fw: "inherit", children: [
2520
- "\u2022 ",
2521
- moduleName
2522
- ] })
2523
- ] }),
2524
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Flex, { gap: "sm", children: [
2525
- Boolean(currentSite) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Flex, { align: "center", children: [
2526
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.ThemeIcon, { variant: "transparent", c: "dimmed", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TI4.IconMapPinFilled, { style: { width: 24, height: 24 } }) }),
2527
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { c: "gray.6", fz: "sm", children: currentSite?.name })
2528
- ] }),
2529
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Menu, { width: 216, position: "bottom-end", children: [
2530
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Target, { "data-testid": "header-account-menu-button", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2531
- MC3.Box,
2532
- {
2533
- w: 216,
2534
- style: (theme) => ({
2535
- display: "flex",
2536
- alignItems: "center",
2537
- border: `1px solid ${theme.colors.gray[3]}`,
2538
- borderRadius: theme.radius.sm,
2539
- padding: "4px 8px",
2540
- cursor: "pointer"
2541
- }),
2542
- children: [
2543
- Boolean(currentAccount) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.ThemeIcon, { variant: "transparent", c: "primary-color", size: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TI4.IconBuilding, { style: { width: 24, height: 24 } }) }),
2544
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { ml: 6, flex: 1, children: currentAccount?.name }),
2545
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Avatar, { src: userInfo?.imageUrl })
2546
- ]
2547
- }
2548
- ) }),
2549
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Menu.Dropdown, { children: [
2550
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Stack, { px: "md", py: "sm", gap: "xs", align: "center", children: [
2551
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Avatar, { src: userInfo?.imageUrl, size: "lg" }),
2552
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { fw: "bold", children: userInfo?.name }),
2553
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Text, { fw: "bold", ta: "center", c: "gray.4", children: [
2554
- currentAccount?.name,
2555
- " - ",
2556
- currentProfile?.name
2557
- ] })
2523
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2524
+ MC3.Flex,
2525
+ {
2526
+ w: "100%",
2527
+ px: 16,
2528
+ py: 8,
2529
+ justify: "space-between",
2530
+ align: "center",
2531
+ style: { borderBottom: "5px solid var(--mantine-primary-color-9)" },
2532
+ children: [
2533
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Group, { children: [
2534
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.UnstyledButton, { onClick: onBackHome, "data-testid": "header-logo-button", children: logo }),
2535
+ moduleName && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Title, { order: 3, c: "gray.4", fw: "inherit", children: [
2536
+ "\u2022 ",
2537
+ moduleName
2538
+ ] })
2539
+ ] }),
2540
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Flex, { gap: "sm", children: [
2541
+ Boolean(currentSite) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Flex, { align: "center", children: [
2542
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.ThemeIcon, { variant: "transparent", c: "dimmed", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TI4.IconMapPinFilled, { style: { width: 24, height: 24 } }) }),
2543
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { c: "gray.6", fz: "sm", children: currentSite?.name })
2558
2544
  ] }),
2559
- Boolean(currentAccount) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
2560
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2561
- MC3.Menu.Item,
2562
- {
2563
- onClick: () => setChangeAccountModalOpened(true),
2564
- "data-testid": "header-change-account-menu-item",
2565
- children: "Cambiar rol y cuenta"
2566
- }
2567
- ),
2568
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2569
- MC3.Menu.Item,
2545
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Menu, { width: 216, position: "bottom-end", children: [
2546
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Target, { "data-testid": "header-account-menu-button", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2547
+ MC3.Box,
2570
2548
  {
2571
- onClick: onClickMyPayroll,
2572
- "data-testid": "header-my-payroll-menu-item",
2573
- children: "Mi n\xF3mina"
2549
+ w: 216,
2550
+ style: (theme) => ({
2551
+ display: "flex",
2552
+ alignItems: "center",
2553
+ border: `1px solid ${theme.colors.gray[3]}`,
2554
+ borderRadius: theme.radius.sm,
2555
+ padding: "4px 8px",
2556
+ cursor: "pointer"
2557
+ }),
2558
+ children: [
2559
+ Boolean(currentAccount) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.ThemeIcon, { variant: "transparent", c: "primary-color", size: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TI4.IconBuilding, { style: { width: 24, height: 24 } }) }),
2560
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { ml: 6, flex: 1, children: currentAccount?.name }),
2561
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Avatar, { src: userInfo?.imageUrl })
2562
+ ]
2574
2563
  }
2575
- ),
2576
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Item, { onClick: onClickSettings, "data-testid": "header-settings-menu-item", children: "Configuraci\xF3n" })
2577
- ] }),
2578
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2579
- MC3.Menu.Item,
2580
- {
2581
- onClick: () => setHelpModalOpened(true),
2582
- "data-testid": "header-help-menu-item",
2583
- children: "Ayuda"
2584
- }
2585
- ),
2586
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Divider, {}),
2587
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Item, { onClick: onLogout, "data-testid": "header-logout-menu-item", children: "Cerrar sesi\xF3n" })
2564
+ ) }),
2565
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Menu.Dropdown, { children: [
2566
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Stack, { px: "md", py: "sm", gap: "xs", align: "center", children: [
2567
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Avatar, { src: userInfo?.imageUrl, size: "lg" }),
2568
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Text, { fw: "bold", children: userInfo?.name }),
2569
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(MC3.Text, { fw: "bold", ta: "center", c: "gray.4", children: [
2570
+ currentAccount?.name,
2571
+ " - ",
2572
+ currentProfile?.name
2573
+ ] })
2574
+ ] }),
2575
+ Boolean(currentAccount) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
2576
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2577
+ MC3.Menu.Item,
2578
+ {
2579
+ onClick: () => setChangeAccountModalOpened(true),
2580
+ "data-testid": "header-change-account-menu-item",
2581
+ children: "Cambiar rol y cuenta"
2582
+ }
2583
+ ),
2584
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2585
+ MC3.Menu.Item,
2586
+ {
2587
+ onClick: onClickMyPayroll,
2588
+ "data-testid": "header-my-payroll-menu-item",
2589
+ children: "Mi n\xF3mina"
2590
+ }
2591
+ ),
2592
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Item, { onClick: onClickSettings, "data-testid": "header-settings-menu-item", children: "Configuraci\xF3n" })
2593
+ ] }),
2594
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2595
+ MC3.Menu.Item,
2596
+ {
2597
+ onClick: () => setHelpModalOpened(true),
2598
+ "data-testid": "header-help-menu-item",
2599
+ children: "Ayuda"
2600
+ }
2601
+ ),
2602
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Divider, {}),
2603
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MC3.Menu.Item, { onClick: onLogout, "data-testid": "header-logout-menu-item", children: "Cerrar sesi\xF3n" })
2604
+ ] })
2605
+ ] })
2588
2606
  ] })
2589
- ] })
2590
- ] })
2591
- ] }),
2607
+ ]
2608
+ }
2609
+ ),
2592
2610
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2593
2611
  ChangeAccountModal,
2594
2612
  {
@@ -2598,24 +2616,18 @@ var Header = ({
2598
2616
  onChangeAccount
2599
2617
  }
2600
2618
  ),
2601
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2602
- HelpModal,
2603
- {
2604
- opened: helpModalOpened,
2605
- onClose: () => setHelpModalOpened(false),
2606
- enterpriseLogo
2607
- }
2608
- )
2619
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HelpModal, { opened: helpModalOpened, onClose: () => setHelpModalOpened(false) })
2609
2620
  ] });
2610
2621
  };
2611
2622
 
2612
2623
  // src/components/sidebar/Sidebar.tsx
2613
2624
  var import_react9 = require("react");
2614
2625
  var MC5 = __toESM(require("@mantine/core"), 1);
2615
- var TI5 = __toESM(require("@tabler/icons-react"), 1);
2626
+ var TI6 = __toESM(require("@tabler/icons-react"), 1);
2616
2627
 
2617
2628
  // src/components/sidebar/SidebarMenu.tsx
2618
2629
  var MC4 = __toESM(require("@mantine/core"), 1);
2630
+ var TI5 = __toESM(require("@tabler/icons-react"), 1);
2619
2631
  var import_jsx_runtime13 = require("react/jsx-runtime");
2620
2632
  var import_react_router_dom = require("react-router-dom");
2621
2633
  var import_jsx_runtime14 = require("react/jsx-runtime");
@@ -2630,22 +2642,25 @@ var SidebarMenu = ({
2630
2642
  onClickExternalScreen
2631
2643
  }) => {
2632
2644
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
2633
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2645
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2634
2646
  MC4.UnstyledButton,
2635
2647
  {
2636
2648
  onClick: () => onClickMenu(id),
2637
2649
  className: "ttn-sidebar-menu",
2638
2650
  "data-testid": `sidebar-menu-${label}`,
2639
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(MC4.Flex, { align: "center", children: [
2640
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MC4.Center, { w: 40, h: 40, me: 10, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2641
- MC4.Box,
2642
- {
2643
- className: "ttn-sidebar-menu-icon",
2644
- style: { maskImage: `url(${icon})`, WebkitMaskImage: `url(${icon})` }
2645
- }
2646
- ) }),
2647
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MC4.Text, { size: "sm", c: "gray.7", lineClamp: 1, children: label })
2648
- ] })
2651
+ children: [
2652
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(MC4.Flex, { align: "center", flex: 1, children: [
2653
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MC4.Center, { w: 40, h: 40, me: 10, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2654
+ MC4.Box,
2655
+ {
2656
+ className: "ttn-sidebar-menu-icon",
2657
+ style: { maskImage: `url(${icon})`, WebkitMaskImage: `url(${icon})` }
2658
+ }
2659
+ ) }),
2660
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MC4.Text, { size: "sm", c: "gray.7", lineClamp: 1, children: label })
2661
+ ] }),
2662
+ active ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TI5.IconChevronDown, { style: { width: 20, height: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TI5.IconChevronRight, { style: { width: 20, height: 20 } })
2663
+ ]
2649
2664
  }
2650
2665
  ),
2651
2666
  Boolean(screens?.length) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MC4.Collapse, { in: active ?? false, children: screens?.map((screen) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime13.Fragment, { children: [
@@ -2689,24 +2704,27 @@ var Sidebar = ({ modules, onClickExternalScreen }) => {
2689
2704
  MC5.ActionIcon,
2690
2705
  {
2691
2706
  variant: "white",
2692
- c: "gray.6",
2707
+ size: "md",
2708
+ mt: 15,
2709
+ c: "gray.4",
2693
2710
  onClick: handleCloseSidebar,
2694
2711
  style: { alignSelf: "flex-end" },
2695
2712
  "data-testid": "sidebar-close-button",
2696
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TI5.IconX, { style: { width: 20, height: 20 } })
2713
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TI6.IconX, { style: { width: 20, height: 20, strokeWidth: 3 } })
2697
2714
  }
2698
2715
  ),
2699
2716
  !opened && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MC5.Center, { w: 80, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2700
2717
  MC5.ActionIcon,
2701
2718
  {
2719
+ variant: "outline",
2720
+ my: "xs",
2702
2721
  w: 32,
2703
2722
  h: 32,
2704
- variant: "outline",
2705
2723
  radius: "xs",
2706
2724
  onClick: () => setOpened(true),
2707
2725
  style: { alignSelf: "flex-end", borderWidth: 2 },
2708
2726
  "data-testid": "sidebar-open-button",
2709
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TI5.IconMenu2, { style: { width: 20, height: 20, strokeWidth: 2 } })
2727
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TI6.IconMenu2, { style: { width: 20, height: 20, strokeWidth: 3 } })
2710
2728
  }
2711
2729
  ) })
2712
2730
  ] }),
@@ -2723,7 +2741,8 @@ var Sidebar = ({ modules, onClickExternalScreen }) => {
2723
2741
  onClickExternalScreen: handleClickExternalScreen
2724
2742
  },
2725
2743
  module2.id
2726
- ))
2744
+ )),
2745
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MC5.Box, { mih: 82 })
2727
2746
  ] });
2728
2747
  };
2729
2748
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.d.cts CHANGED
@@ -250,7 +250,6 @@ interface UserAccount {
250
250
  interface HeaderProps {
251
251
  moduleName: string;
252
252
  logo?: ReactNode;
253
- enterpriseLogo?: ReactNode;
254
253
  accounts: UserAccount[];
255
254
  currentSite?: {
256
255
  id: string;
@@ -262,7 +261,7 @@ interface HeaderProps {
262
261
  onClickSettings: () => void;
263
262
  onLogout: () => void;
264
263
  }
265
- declare const Header: ({ moduleName, logo, enterpriseLogo, accounts, currentSite, onBackHome, onChangeAccount, onClickMyPayroll, onClickSettings, onLogout, }: HeaderProps) => react_jsx_runtime.JSX.Element;
264
+ declare const Header: ({ moduleName, logo, accounts, currentSite, onBackHome, onChangeAccount, onClickMyPayroll, onClickSettings, onLogout, }: HeaderProps) => react_jsx_runtime.JSX.Element;
266
265
 
267
266
  interface ChangeAccountModalProps {
268
267
  opened: boolean;
@@ -275,9 +274,8 @@ declare const ChangeAccountModal: ({ opened, onClose, accounts, onChangeAccount,
275
274
  interface HelpModalProps {
276
275
  opened: boolean;
277
276
  onClose: () => void;
278
- enterpriseLogo?: ReactNode;
279
277
  }
280
- declare const HelpModal: ({ opened, onClose, enterpriseLogo }: HelpModalProps) => react_jsx_runtime.JSX.Element;
278
+ declare const HelpModal: ({ opened, onClose }: HelpModalProps) => react_jsx_runtime.JSX.Element;
281
279
 
282
280
  interface SidebarModuleScreen {
283
281
  id: number;
package/dist/index.d.ts CHANGED
@@ -250,7 +250,6 @@ interface UserAccount {
250
250
  interface HeaderProps {
251
251
  moduleName: string;
252
252
  logo?: ReactNode;
253
- enterpriseLogo?: ReactNode;
254
253
  accounts: UserAccount[];
255
254
  currentSite?: {
256
255
  id: string;
@@ -262,7 +261,7 @@ interface HeaderProps {
262
261
  onClickSettings: () => void;
263
262
  onLogout: () => void;
264
263
  }
265
- declare const Header: ({ moduleName, logo, enterpriseLogo, accounts, currentSite, onBackHome, onChangeAccount, onClickMyPayroll, onClickSettings, onLogout, }: HeaderProps) => react_jsx_runtime.JSX.Element;
264
+ declare const Header: ({ moduleName, logo, accounts, currentSite, onBackHome, onChangeAccount, onClickMyPayroll, onClickSettings, onLogout, }: HeaderProps) => react_jsx_runtime.JSX.Element;
266
265
 
267
266
  interface ChangeAccountModalProps {
268
267
  opened: boolean;
@@ -275,9 +274,8 @@ declare const ChangeAccountModal: ({ opened, onClose, accounts, onChangeAccount,
275
274
  interface HelpModalProps {
276
275
  opened: boolean;
277
276
  onClose: () => void;
278
- enterpriseLogo?: ReactNode;
279
277
  }
280
- declare const HelpModal: ({ opened, onClose, enterpriseLogo }: HelpModalProps) => react_jsx_runtime.JSX.Element;
278
+ declare const HelpModal: ({ opened, onClose }: HelpModalProps) => react_jsx_runtime.JSX.Element;
281
279
 
282
280
  interface SidebarModuleScreen {
283
281
  id: number;
package/dist/index.js CHANGED
@@ -287,6 +287,7 @@ var useIncomeGroups = ({
287
287
  filters?.corpclientId,
288
288
  filters?.contractId,
289
289
  filters?.affiliationTypeId,
290
+ filters?.enabled,
290
291
  filters?.eaccount
291
292
  ],
292
293
  queryFn: () => getIncomeGroups(token, baseUrl, filters),
@@ -373,7 +374,8 @@ var PatientVoluntaryInsuranceForm = ({
373
374
  eaccount: userInfo.accountId,
374
375
  corpclientId: Number(insuranceInfo.companyId) || void 0,
375
376
  contractId: Number(insuranceInfo.plan) || void 0,
376
- affiliationTypeId: Number(form.values.affiliationTypeId) || void 0
377
+ affiliationTypeId: Number(form.values.affiliationTypeId) || void 0,
378
+ enabled: 1
377
379
  }
378
380
  });
379
381
  const companyTypeOptions = useMemo(() => {
@@ -1602,7 +1604,8 @@ var PatientForm = ({
1602
1604
  eaccount: userInfo.accountId,
1603
1605
  corpclientId: Number(form.values.mandatoryInsurance.companyId) || void 0,
1604
1606
  contractId: Number(form.values.mandatoryInsurance.plan) || void 0,
1605
- affiliationTypeId: Number(form.values.affiliationTypeId) || void 0
1607
+ affiliationTypeId: Number(form.values.affiliationTypeId) || void 0,
1608
+ enabled: 1
1606
1609
  }
1607
1610
  });
1608
1611
  const handleSubmit = (values) => {
@@ -2402,18 +2405,23 @@ var createPatientForm = (info) => {
2402
2405
  };
2403
2406
 
2404
2407
  // src/components/header/Header.tsx
2408
+ import { useMemo as useMemo5, useState as useState6 } from "react";
2405
2409
  import * as MC3 from "@mantine/core";
2406
2410
  import * as TI4 from "@tabler/icons-react";
2407
- import { useMemo as useMemo5, useState as useState6 } from "react";
2408
2411
 
2409
2412
  // src/components/header/HelpModal.tsx
2410
2413
  import * as MC from "@mantine/core";
2411
2414
  import * as TI2 from "@tabler/icons-react";
2415
+
2416
+ // src/assets/logo-ttn.png
2417
+ var logo_ttn_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAAAsCAYAAACjZQx0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAX1SURBVHgB7ZxhVttGEMdn1iaQNG3JCaqcIPQElU9Q+qW1Ie9FPkHhBDU3ICeQ/F7i+hv0BFZPUHIC1BPg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O7P5u8g3XizqiUXyJ6BAW4E92SNZr5TupzOmTOAECwmcKEZUVrwBeo8vrEBtEOwNEPRLlWBSHY1Sw3zeiGKCzj1DMA2Vhqh1mr+o+AFrdUSvf34CgZgGy/MwPH9xwrDtQVfkG22DC4mMLxUl2d1DIDgDzDA9rZXs79MDefcRu/3/6PVWFkuuAwZwaWfPqxstkSigA3gtNwAVGVVM42VGxvvzOawBFs19sE/DxqNF8nWeYngchIjtnijLPtiTJGrXxjAJH+hoeiuMdVYiS1f1rHBIIRXRysivls+JKezaUnw/PtotF6ByzeRr+NwLhjv82zPndFkNo2TrU+T3s5z2RiyXBat+R5cUkXDq9NubzdKnxOIh6PRq9Lm0U8B5uy/FyIFx5bc7XN1husIv4BvLP4q2vHRb7yI/9ZdV7Lo0uUtuz31e3AR6L8TkBkXx/ETuDvoh7mKgi+o3F69tOcL6KTOHuvcgw3I/Mqf4vuxN6DReJEg2t/puPTcy6EmcwMQqdWiXonycn0tkDtbYJRWAPeCNVdnlFx/QYPKnkr4mrNRv/HiOAimFKPReDoevwrZGkNYcUTzMm0WRQjOCE/0oVaXClV8ceLdRvsw6YoxiBC0b96TfFo4LzeyMbNM6zB9RNFs+Y2M0yFUpWJjpZz1bIkdk+KPRqMTBOqsrPiGGi9uk7xjp9giF+rB73+CquLH1Vup5Z51Ir7BXjgpPsWz71fT7XPabBAWfcjpt7KTV53Ocawm2fMtvyQhqRnLyk9hJWlat/EiER/A42LNgEjsoXR1WNZOTFONe3a63ecu/+e3de4phFB9t0xUfE1b5/toItB9rlh7xiGzcLweyOsdDtn2LWWLxWKxWCwWi8ViuW/8B6EJ4fqR8UVFAAAAAElFTkSuQmCC";
2418
+
2419
+ // src/components/header/HelpModal.tsx
2412
2420
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2413
- var HelpModal = ({ opened, onClose, enterpriseLogo }) => {
2421
+ var HelpModal = ({ opened, onClose }) => {
2414
2422
  return /* @__PURE__ */ jsxs9(MC.Modal, { title: "Ayuda", opened, onClose, "data-testid": "header-help-modal", children: [
2415
2423
  /* @__PURE__ */ jsxs9(MC.Stack, { mb: "lg", align: "center", children: [
2416
- enterpriseLogo,
2424
+ /* @__PURE__ */ jsx10(MC.Image, { src: logo_ttn_default, alt: "Enterprise Logo", draggable: false, w: 126 }),
2417
2425
  /* @__PURE__ */ jsx10(MC.Text, { fz: "lg", fw: "bold", children: "Informaci\xF3n de contacto" }),
2418
2426
  /* @__PURE__ */ jsxs9(MC.Stack, { children: [
2419
2427
  /* @__PURE__ */ jsxs9(MC.Group, { children: [
@@ -2502,7 +2510,6 @@ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-r
2502
2510
  var Header = ({
2503
2511
  moduleName,
2504
2512
  logo,
2505
- enterpriseLogo,
2506
2513
  accounts,
2507
2514
  currentSite,
2508
2515
  onBackHome,
@@ -2525,82 +2532,93 @@ var Header = ({
2525
2532
  return { currentAccount: currentAccount2, currentProfile: currentProfile2 };
2526
2533
  }, [accounts, userInfo]);
2527
2534
  return /* @__PURE__ */ jsxs11(Fragment3, { children: [
2528
- /* @__PURE__ */ jsxs11(MC3.Flex, { w: "100%", px: 16, py: 6, justify: "space-between", align: "center", children: [
2529
- /* @__PURE__ */ jsxs11(MC3.Group, { children: [
2530
- /* @__PURE__ */ jsx12(MC3.UnstyledButton, { onClick: onBackHome, "data-testid": "header-logo-button", children: logo }),
2531
- /* @__PURE__ */ jsxs11(MC3.Title, { order: 3, c: "gray.4", fw: "inherit", children: [
2532
- "\u2022 ",
2533
- moduleName
2534
- ] })
2535
- ] }),
2536
- /* @__PURE__ */ jsxs11(MC3.Flex, { gap: "sm", children: [
2537
- Boolean(currentSite) && /* @__PURE__ */ jsxs11(MC3.Flex, { align: "center", children: [
2538
- /* @__PURE__ */ jsx12(MC3.ThemeIcon, { variant: "transparent", c: "dimmed", children: /* @__PURE__ */ jsx12(TI4.IconMapPinFilled, { style: { width: 24, height: 24 } }) }),
2539
- /* @__PURE__ */ jsx12(MC3.Text, { c: "gray.6", fz: "sm", children: currentSite?.name })
2540
- ] }),
2541
- /* @__PURE__ */ jsxs11(MC3.Menu, { width: 216, position: "bottom-end", children: [
2542
- /* @__PURE__ */ jsx12(MC3.Menu.Target, { "data-testid": "header-account-menu-button", children: /* @__PURE__ */ jsxs11(
2543
- MC3.Box,
2544
- {
2545
- w: 216,
2546
- style: (theme) => ({
2547
- display: "flex",
2548
- alignItems: "center",
2549
- border: `1px solid ${theme.colors.gray[3]}`,
2550
- borderRadius: theme.radius.sm,
2551
- padding: "4px 8px",
2552
- cursor: "pointer"
2553
- }),
2554
- children: [
2555
- Boolean(currentAccount) && /* @__PURE__ */ jsx12(MC3.ThemeIcon, { variant: "transparent", c: "primary-color", size: "lg", children: /* @__PURE__ */ jsx12(TI4.IconBuilding, { style: { width: 24, height: 24 } }) }),
2556
- /* @__PURE__ */ jsx12(MC3.Text, { ml: 6, flex: 1, children: currentAccount?.name }),
2557
- /* @__PURE__ */ jsx12(MC3.Avatar, { src: userInfo?.imageUrl })
2558
- ]
2559
- }
2560
- ) }),
2561
- /* @__PURE__ */ jsxs11(MC3.Menu.Dropdown, { children: [
2562
- /* @__PURE__ */ jsxs11(MC3.Stack, { px: "md", py: "sm", gap: "xs", align: "center", children: [
2563
- /* @__PURE__ */ jsx12(MC3.Avatar, { src: userInfo?.imageUrl, size: "lg" }),
2564
- /* @__PURE__ */ jsx12(MC3.Text, { fw: "bold", children: userInfo?.name }),
2565
- /* @__PURE__ */ jsxs11(MC3.Text, { fw: "bold", ta: "center", c: "gray.4", children: [
2566
- currentAccount?.name,
2567
- " - ",
2568
- currentProfile?.name
2569
- ] })
2535
+ /* @__PURE__ */ jsxs11(
2536
+ MC3.Flex,
2537
+ {
2538
+ w: "100%",
2539
+ px: 16,
2540
+ py: 8,
2541
+ justify: "space-between",
2542
+ align: "center",
2543
+ style: { borderBottom: "5px solid var(--mantine-primary-color-9)" },
2544
+ children: [
2545
+ /* @__PURE__ */ jsxs11(MC3.Group, { children: [
2546
+ /* @__PURE__ */ jsx12(MC3.UnstyledButton, { onClick: onBackHome, "data-testid": "header-logo-button", children: logo }),
2547
+ moduleName && /* @__PURE__ */ jsxs11(MC3.Title, { order: 3, c: "gray.4", fw: "inherit", children: [
2548
+ "\u2022 ",
2549
+ moduleName
2550
+ ] })
2551
+ ] }),
2552
+ /* @__PURE__ */ jsxs11(MC3.Flex, { gap: "sm", children: [
2553
+ Boolean(currentSite) && /* @__PURE__ */ jsxs11(MC3.Flex, { align: "center", children: [
2554
+ /* @__PURE__ */ jsx12(MC3.ThemeIcon, { variant: "transparent", c: "dimmed", children: /* @__PURE__ */ jsx12(TI4.IconMapPinFilled, { style: { width: 24, height: 24 } }) }),
2555
+ /* @__PURE__ */ jsx12(MC3.Text, { c: "gray.6", fz: "sm", children: currentSite?.name })
2570
2556
  ] }),
2571
- Boolean(currentAccount) && /* @__PURE__ */ jsxs11(Fragment3, { children: [
2572
- /* @__PURE__ */ jsx12(
2573
- MC3.Menu.Item,
2574
- {
2575
- onClick: () => setChangeAccountModalOpened(true),
2576
- "data-testid": "header-change-account-menu-item",
2577
- children: "Cambiar rol y cuenta"
2578
- }
2579
- ),
2580
- /* @__PURE__ */ jsx12(
2581
- MC3.Menu.Item,
2557
+ /* @__PURE__ */ jsxs11(MC3.Menu, { width: 216, position: "bottom-end", children: [
2558
+ /* @__PURE__ */ jsx12(MC3.Menu.Target, { "data-testid": "header-account-menu-button", children: /* @__PURE__ */ jsxs11(
2559
+ MC3.Box,
2582
2560
  {
2583
- onClick: onClickMyPayroll,
2584
- "data-testid": "header-my-payroll-menu-item",
2585
- children: "Mi n\xF3mina"
2561
+ w: 216,
2562
+ style: (theme) => ({
2563
+ display: "flex",
2564
+ alignItems: "center",
2565
+ border: `1px solid ${theme.colors.gray[3]}`,
2566
+ borderRadius: theme.radius.sm,
2567
+ padding: "4px 8px",
2568
+ cursor: "pointer"
2569
+ }),
2570
+ children: [
2571
+ Boolean(currentAccount) && /* @__PURE__ */ jsx12(MC3.ThemeIcon, { variant: "transparent", c: "primary-color", size: "lg", children: /* @__PURE__ */ jsx12(TI4.IconBuilding, { style: { width: 24, height: 24 } }) }),
2572
+ /* @__PURE__ */ jsx12(MC3.Text, { ml: 6, flex: 1, children: currentAccount?.name }),
2573
+ /* @__PURE__ */ jsx12(MC3.Avatar, { src: userInfo?.imageUrl })
2574
+ ]
2586
2575
  }
2587
- ),
2588
- /* @__PURE__ */ jsx12(MC3.Menu.Item, { onClick: onClickSettings, "data-testid": "header-settings-menu-item", children: "Configuraci\xF3n" })
2589
- ] }),
2590
- /* @__PURE__ */ jsx12(
2591
- MC3.Menu.Item,
2592
- {
2593
- onClick: () => setHelpModalOpened(true),
2594
- "data-testid": "header-help-menu-item",
2595
- children: "Ayuda"
2596
- }
2597
- ),
2598
- /* @__PURE__ */ jsx12(MC3.Menu.Divider, {}),
2599
- /* @__PURE__ */ jsx12(MC3.Menu.Item, { onClick: onLogout, "data-testid": "header-logout-menu-item", children: "Cerrar sesi\xF3n" })
2576
+ ) }),
2577
+ /* @__PURE__ */ jsxs11(MC3.Menu.Dropdown, { children: [
2578
+ /* @__PURE__ */ jsxs11(MC3.Stack, { px: "md", py: "sm", gap: "xs", align: "center", children: [
2579
+ /* @__PURE__ */ jsx12(MC3.Avatar, { src: userInfo?.imageUrl, size: "lg" }),
2580
+ /* @__PURE__ */ jsx12(MC3.Text, { fw: "bold", children: userInfo?.name }),
2581
+ /* @__PURE__ */ jsxs11(MC3.Text, { fw: "bold", ta: "center", c: "gray.4", children: [
2582
+ currentAccount?.name,
2583
+ " - ",
2584
+ currentProfile?.name
2585
+ ] })
2586
+ ] }),
2587
+ Boolean(currentAccount) && /* @__PURE__ */ jsxs11(Fragment3, { children: [
2588
+ /* @__PURE__ */ jsx12(
2589
+ MC3.Menu.Item,
2590
+ {
2591
+ onClick: () => setChangeAccountModalOpened(true),
2592
+ "data-testid": "header-change-account-menu-item",
2593
+ children: "Cambiar rol y cuenta"
2594
+ }
2595
+ ),
2596
+ /* @__PURE__ */ jsx12(
2597
+ MC3.Menu.Item,
2598
+ {
2599
+ onClick: onClickMyPayroll,
2600
+ "data-testid": "header-my-payroll-menu-item",
2601
+ children: "Mi n\xF3mina"
2602
+ }
2603
+ ),
2604
+ /* @__PURE__ */ jsx12(MC3.Menu.Item, { onClick: onClickSettings, "data-testid": "header-settings-menu-item", children: "Configuraci\xF3n" })
2605
+ ] }),
2606
+ /* @__PURE__ */ jsx12(
2607
+ MC3.Menu.Item,
2608
+ {
2609
+ onClick: () => setHelpModalOpened(true),
2610
+ "data-testid": "header-help-menu-item",
2611
+ children: "Ayuda"
2612
+ }
2613
+ ),
2614
+ /* @__PURE__ */ jsx12(MC3.Menu.Divider, {}),
2615
+ /* @__PURE__ */ jsx12(MC3.Menu.Item, { onClick: onLogout, "data-testid": "header-logout-menu-item", children: "Cerrar sesi\xF3n" })
2616
+ ] })
2617
+ ] })
2600
2618
  ] })
2601
- ] })
2602
- ] })
2603
- ] }),
2619
+ ]
2620
+ }
2621
+ ),
2604
2622
  /* @__PURE__ */ jsx12(
2605
2623
  ChangeAccountModal,
2606
2624
  {
@@ -2610,24 +2628,18 @@ var Header = ({
2610
2628
  onChangeAccount
2611
2629
  }
2612
2630
  ),
2613
- /* @__PURE__ */ jsx12(
2614
- HelpModal,
2615
- {
2616
- opened: helpModalOpened,
2617
- onClose: () => setHelpModalOpened(false),
2618
- enterpriseLogo
2619
- }
2620
- )
2631
+ /* @__PURE__ */ jsx12(HelpModal, { opened: helpModalOpened, onClose: () => setHelpModalOpened(false) })
2621
2632
  ] });
2622
2633
  };
2623
2634
 
2624
2635
  // src/components/sidebar/Sidebar.tsx
2625
2636
  import { useState as useState7 } from "react";
2626
2637
  import * as MC5 from "@mantine/core";
2627
- import * as TI5 from "@tabler/icons-react";
2638
+ import * as TI6 from "@tabler/icons-react";
2628
2639
 
2629
2640
  // src/components/sidebar/SidebarMenu.tsx
2630
2641
  import * as MC4 from "@mantine/core";
2642
+ import * as TI5 from "@tabler/icons-react";
2631
2643
  import { Fragment as Fragment4 } from "react/jsx-runtime";
2632
2644
  import { NavLink } from "react-router-dom";
2633
2645
  import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -2642,22 +2654,25 @@ var SidebarMenu = ({
2642
2654
  onClickExternalScreen
2643
2655
  }) => {
2644
2656
  return /* @__PURE__ */ jsxs12(Fragment5, { children: [
2645
- /* @__PURE__ */ jsx13(
2657
+ /* @__PURE__ */ jsxs12(
2646
2658
  MC4.UnstyledButton,
2647
2659
  {
2648
2660
  onClick: () => onClickMenu(id),
2649
2661
  className: "ttn-sidebar-menu",
2650
2662
  "data-testid": `sidebar-menu-${label}`,
2651
- children: /* @__PURE__ */ jsxs12(MC4.Flex, { align: "center", children: [
2652
- /* @__PURE__ */ jsx13(MC4.Center, { w: 40, h: 40, me: 10, children: /* @__PURE__ */ jsx13(
2653
- MC4.Box,
2654
- {
2655
- className: "ttn-sidebar-menu-icon",
2656
- style: { maskImage: `url(${icon})`, WebkitMaskImage: `url(${icon})` }
2657
- }
2658
- ) }),
2659
- /* @__PURE__ */ jsx13(MC4.Text, { size: "sm", c: "gray.7", lineClamp: 1, children: label })
2660
- ] })
2663
+ children: [
2664
+ /* @__PURE__ */ jsxs12(MC4.Flex, { align: "center", flex: 1, children: [
2665
+ /* @__PURE__ */ jsx13(MC4.Center, { w: 40, h: 40, me: 10, children: /* @__PURE__ */ jsx13(
2666
+ MC4.Box,
2667
+ {
2668
+ className: "ttn-sidebar-menu-icon",
2669
+ style: { maskImage: `url(${icon})`, WebkitMaskImage: `url(${icon})` }
2670
+ }
2671
+ ) }),
2672
+ /* @__PURE__ */ jsx13(MC4.Text, { size: "sm", c: "gray.7", lineClamp: 1, children: label })
2673
+ ] }),
2674
+ active ? /* @__PURE__ */ jsx13(TI5.IconChevronDown, { style: { width: 20, height: 20 } }) : /* @__PURE__ */ jsx13(TI5.IconChevronRight, { style: { width: 20, height: 20 } })
2675
+ ]
2661
2676
  }
2662
2677
  ),
2663
2678
  Boolean(screens?.length) && /* @__PURE__ */ jsx13(MC4.Collapse, { in: active ?? false, children: screens?.map((screen) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
@@ -2701,24 +2716,27 @@ var Sidebar = ({ modules, onClickExternalScreen }) => {
2701
2716
  MC5.ActionIcon,
2702
2717
  {
2703
2718
  variant: "white",
2704
- c: "gray.6",
2719
+ size: "md",
2720
+ mt: 15,
2721
+ c: "gray.4",
2705
2722
  onClick: handleCloseSidebar,
2706
2723
  style: { alignSelf: "flex-end" },
2707
2724
  "data-testid": "sidebar-close-button",
2708
- children: /* @__PURE__ */ jsx14(TI5.IconX, { style: { width: 20, height: 20 } })
2725
+ children: /* @__PURE__ */ jsx14(TI6.IconX, { style: { width: 20, height: 20, strokeWidth: 3 } })
2709
2726
  }
2710
2727
  ),
2711
2728
  !opened && /* @__PURE__ */ jsx14(MC5.Center, { w: 80, children: /* @__PURE__ */ jsx14(
2712
2729
  MC5.ActionIcon,
2713
2730
  {
2731
+ variant: "outline",
2732
+ my: "xs",
2714
2733
  w: 32,
2715
2734
  h: 32,
2716
- variant: "outline",
2717
2735
  radius: "xs",
2718
2736
  onClick: () => setOpened(true),
2719
2737
  style: { alignSelf: "flex-end", borderWidth: 2 },
2720
2738
  "data-testid": "sidebar-open-button",
2721
- children: /* @__PURE__ */ jsx14(TI5.IconMenu2, { style: { width: 20, height: 20, strokeWidth: 2 } })
2739
+ children: /* @__PURE__ */ jsx14(TI6.IconMenu2, { style: { width: 20, height: 20, strokeWidth: 3 } })
2722
2740
  }
2723
2741
  ) })
2724
2742
  ] }),
@@ -2735,7 +2753,8 @@ var Sidebar = ({ modules, onClickExternalScreen }) => {
2735
2753
  onClickExternalScreen: handleClickExternalScreen
2736
2754
  },
2737
2755
  module.id
2738
- ))
2756
+ )),
2757
+ /* @__PURE__ */ jsx14(MC5.Box, { mih: 82 })
2739
2758
  ] });
2740
2759
  };
2741
2760
  export {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@ttn-shared/ui",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "styles.css"
8
9
  ],
9
10
  "keywords": [
10
11
  "ttn",
@@ -15,7 +16,7 @@
15
16
  ],
16
17
  "description": "A shared UI component library for TTN projects.",
17
18
  "scripts": {
18
- "build": "tsup src/index.ts",
19
+ "build": "tsup src/index.ts && node scripts/postbuild.mjs",
19
20
  "lint": "eslint src/**/*.{ts,tsx} --fix",
20
21
  "format": "prettier --write src/**/*.{ts,tsx,js,json,md}"
21
22
  },
@@ -34,7 +35,7 @@
34
35
  "default": "./dist/index.cjs"
35
36
  }
36
37
  },
37
- "./styles.css": "./dist/index.css"
38
+ "./styles.css": "./styles.css"
38
39
  },
39
40
  "dependencies": {
40
41
  "axios": "1.13.3",
package/styles.css ADDED
@@ -0,0 +1,56 @@
1
+ /* src/components/sidebar/sidebar.css */
2
+ .ttn-sidebar {
3
+ width: 335px;
4
+ height: 100%;
5
+ display: flex;
6
+ flex-direction: column;
7
+ padding-right: 20px;
8
+ box-shadow: 10px 0px 20px rgba(0, 0, 0, 0.06);
9
+ overflow-x: hidden;
10
+ overflow-y: auto;
11
+ transition: width 0.3s ease;
12
+ &.closed {
13
+ width: 80px;
14
+ overflow: hidden;
15
+ }
16
+ }
17
+ .ttn-sidebar-menu {
18
+ width: 100%;
19
+ min-height: 56px;
20
+ display: flex;
21
+ align-items: center;
22
+ padding: 8px 10px 8px 20px !important;
23
+ overflow: hidden;
24
+ }
25
+ .ttn-sidebar-menu-icon {
26
+ width: 24px;
27
+ height: 24px;
28
+ background-color: var(--mantine-color-gray-6);
29
+ mask-repeat: no-repeat;
30
+ mask-size: contain;
31
+ mask-position: center;
32
+ -webkit-mask-repeat: no-repeat;
33
+ -webkit-mask-size: contain;
34
+ -webkit-mask-position: center;
35
+ &.active,
36
+ &:hover {
37
+ background-color: var(--mantine-primary-color-9);
38
+ }
39
+ }
40
+ .ttn-sidebar-menu-item {
41
+ display: block;
42
+ font-size: 16px;
43
+ color: inherit;
44
+ text-decoration: none;
45
+ text-transform: uppercase;
46
+ padding: 5px 0 5px 10px;
47
+ margin-left: 70px;
48
+ border-left: 3px solid transparent;
49
+ white-space: nowrap;
50
+ cursor: pointer;
51
+ &.active,
52
+ &:hover {
53
+ border-color: var(--mantine-primary-color-9);
54
+ color: var(--mantine-primary-color-9);
55
+ }
56
+ }