@pautena/react-design-system 1.0.1 → 2.0.0-alpha.0

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.
Files changed (98) hide show
  1. package/README.md +0 -6
  2. package/dist/Drawerx/Drawer.types.d.ts +3 -3
  3. package/dist/Drawerx/Drawer.types.mjs.map +1 -1
  4. package/dist/Drawerx/DrawerContent/DrawerContent.mjs +2 -4
  5. package/dist/Drawerx/DrawerContent/DrawerContent.mjs.map +1 -1
  6. package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs +23 -23
  7. package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs.map +1 -1
  8. package/dist/ListPanel/ListPanel.mjs +8 -8
  9. package/dist/ListPanel/ListPanel.mjs.map +1 -1
  10. package/dist/SkeletonGrid/SkeletonGrid.mjs +1 -1
  11. package/dist/SkeletonGrid/SkeletonGrid.mjs.map +1 -1
  12. package/dist/ValueItem/ValueItem.mjs.map +1 -1
  13. package/dist/ValueLabel/ValueLabel.d.ts +3 -7
  14. package/dist/ValueLabel/ValueLabel.mjs +20 -23
  15. package/dist/ValueLabel/ValueLabel.mjs.map +1 -1
  16. package/dist/components/badge/badge.d.ts +21 -0
  17. package/dist/components/badge/badge.mjs +19 -0
  18. package/dist/components/badge/badge.mjs.map +1 -0
  19. package/dist/components/badge/index.d.ts +2 -0
  20. package/dist/{Bullet/Bullet.d.ts → components/bullet/bullet.d.ts} +3 -4
  21. package/dist/components/bullet/bullet.mjs +44 -0
  22. package/dist/components/bullet/bullet.mjs.map +1 -0
  23. package/dist/components/bullet/index.d.ts +2 -0
  24. package/dist/components/button/button.d.ts +18 -0
  25. package/dist/components/button/button.mjs +23 -0
  26. package/dist/components/button/button.mjs.map +1 -0
  27. package/dist/components/button/index.d.ts +2 -0
  28. package/dist/components/ui/badge.d.ts +7 -0
  29. package/dist/components/ui/badge.mjs +48 -0
  30. package/dist/components/ui/badge.mjs.map +1 -0
  31. package/dist/components/ui/button.d.ts +8 -0
  32. package/dist/components/ui/button.mjs +53 -0
  33. package/dist/components/ui/button.mjs.map +1 -0
  34. package/dist/hooks/use-mobile.d.ts +1 -0
  35. package/dist/index.d.ts +7 -4
  36. package/dist/index.mjs +126 -122
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/lib/utils.d.ts +2 -0
  39. package/dist/lib/utils.mjs +9 -0
  40. package/dist/lib/utils.mjs.map +1 -0
  41. package/dist/node_modules/@base-ui/react/esm/button/Button.mjs +32 -0
  42. package/dist/node_modules/@base-ui/react/esm/button/Button.mjs.map +1 -0
  43. package/dist/node_modules/@base-ui/react/esm/composite/root/CompositeRootContext.mjs +15 -0
  44. package/dist/node_modules/@base-ui/react/esm/composite/root/CompositeRootContext.mjs.map +1 -0
  45. package/dist/node_modules/@base-ui/react/esm/merge-props/mergeProps.mjs +83 -0
  46. package/dist/node_modules/@base-ui/react/esm/merge-props/mergeProps.mjs.map +1 -0
  47. package/dist/node_modules/@base-ui/react/esm/use-button/useButton.mjs +101 -0
  48. package/dist/node_modules/@base-ui/react/esm/use-button/useButton.mjs.map +1 -0
  49. package/dist/node_modules/@base-ui/react/esm/use-render/useRender.mjs +8 -0
  50. package/dist/node_modules/@base-ui/react/esm/use-render/useRender.mjs.map +1 -0
  51. package/dist/node_modules/@base-ui/react/esm/utils/getStateAttributesProps.mjs +17 -0
  52. package/dist/node_modules/@base-ui/react/esm/utils/getStateAttributesProps.mjs.map +1 -0
  53. package/dist/node_modules/@base-ui/react/esm/utils/resolveClassName.mjs +7 -0
  54. package/dist/node_modules/@base-ui/react/esm/utils/resolveClassName.mjs.map +1 -0
  55. package/dist/node_modules/@base-ui/react/esm/utils/resolveStyle.mjs +7 -0
  56. package/dist/node_modules/@base-ui/react/esm/utils/resolveStyle.mjs.map +1 -0
  57. package/dist/node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.mjs +25 -0
  58. package/dist/node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.mjs.map +1 -0
  59. package/dist/node_modules/@base-ui/react/esm/utils/useRenderElement.mjs +64 -0
  60. package/dist/node_modules/@base-ui/react/esm/utils/useRenderElement.mjs.map +1 -0
  61. package/dist/node_modules/@base-ui/utils/esm/empty.mjs +5 -0
  62. package/dist/node_modules/@base-ui/utils/esm/empty.mjs.map +1 -0
  63. package/dist/node_modules/@base-ui/utils/esm/error.mjs +12 -0
  64. package/dist/node_modules/@base-ui/utils/esm/error.mjs.map +1 -0
  65. package/dist/node_modules/@base-ui/utils/esm/formatErrorMessage.mjs +8 -0
  66. package/dist/node_modules/@base-ui/utils/esm/formatErrorMessage.mjs.map +1 -0
  67. package/dist/node_modules/@base-ui/utils/esm/getReactElementRef.mjs +12 -0
  68. package/dist/node_modules/@base-ui/utils/esm/getReactElementRef.mjs.map +1 -0
  69. package/dist/node_modules/@base-ui/utils/esm/mergeObjects.mjs +15 -0
  70. package/dist/node_modules/@base-ui/utils/esm/mergeObjects.mjs.map +1 -0
  71. package/dist/node_modules/@base-ui/utils/esm/reactVersion.mjs +9 -0
  72. package/dist/node_modules/@base-ui/utils/esm/reactVersion.mjs.map +1 -0
  73. package/dist/node_modules/@base-ui/utils/esm/safeReact.mjs +8 -0
  74. package/dist/node_modules/@base-ui/utils/esm/safeReact.mjs.map +1 -0
  75. package/dist/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.mjs +7 -0
  76. package/dist/node_modules/@base-ui/utils/esm/useIsoLayoutEffect.mjs.map +1 -0
  77. package/dist/node_modules/@base-ui/utils/esm/useMergedRefs.mjs +70 -0
  78. package/dist/node_modules/@base-ui/utils/esm/useMergedRefs.mjs.map +1 -0
  79. package/dist/node_modules/@base-ui/utils/esm/useRefWithInit.mjs +10 -0
  80. package/dist/node_modules/@base-ui/utils/esm/useRefWithInit.mjs.map +1 -0
  81. package/dist/node_modules/@base-ui/utils/esm/useStableCallback.mjs +33 -0
  82. package/dist/node_modules/@base-ui/utils/esm/useStableCallback.mjs.map +1 -0
  83. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +15 -0
  84. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.map +1 -0
  85. package/dist/node_modules/class-variance-authority/dist/index.mjs +36 -0
  86. package/dist/node_modules/class-variance-authority/dist/index.mjs.map +1 -0
  87. package/dist/node_modules/clsx/dist/clsx.mjs +17 -0
  88. package/dist/node_modules/clsx/dist/clsx.mjs.map +1 -0
  89. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.mjs +2766 -0
  90. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.mjs.map +1 -0
  91. package/package.json +38 -18
  92. package/dist/Bullet/Bullet.mjs +0 -24
  93. package/dist/Bullet/Bullet.mjs.map +0 -1
  94. package/dist/Bullet/index.d.ts +0 -2
  95. package/dist/Label/Label.d.ts +0 -35
  96. package/dist/Label/Label.mjs +0 -61
  97. package/dist/Label/Label.mjs.map +0 -1
  98. package/dist/Label/index.d.ts +0 -2
package/README.md CHANGED
@@ -27,12 +27,6 @@ npm:
27
27
  npm install @pautena/react-design-system @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-data-grid
28
28
  ```
29
29
 
30
- yarn:
31
-
32
- ```bash
33
- yarn add @pautena/react-design-system @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/x-data-grid react-dom
34
- ```
35
-
36
30
  Now you are going to be able to import the components and use it in your React project.
37
31
 
38
32
  ```javascript
@@ -1,8 +1,8 @@
1
1
  import { DrawerProps as MuiDrawerProps } from '@mui/material/Drawer';
2
2
  import { Theme } from '@mui/material/styles';
3
3
  import { CSSProperties, FunctionComponent, PropsWithChildren, ReactElement } from 'react';
4
- import { BulletVariant } from '../Bullet';
5
- import { LabelVariant } from '../Label';
4
+ import { BadgeVariant } from '../components/badge';
5
+ import { BulletVariant } from '../components/bullet';
6
6
  import { DrawerAppBarProps } from './DrawerAppBar';
7
7
  /**
8
8
  * Drawer display variants
@@ -40,7 +40,7 @@ export interface DrawerItemLabel {
40
40
  /**
41
41
  * Label color variant
42
42
  */
43
- variant: LabelVariant;
43
+ variant: BadgeVariant;
44
44
  }
45
45
  /**
46
46
  * Bullet indicator configuration for drawer items
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.types.mjs","sources":["../../src/Drawerx/Drawer.types.ts"],"sourcesContent":["import type { DrawerProps as MuiDrawerProps } from \"@mui/material/Drawer\";\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n CSSProperties,\n FunctionComponent,\n PropsWithChildren,\n ReactElement,\n} from \"react\";\nimport type { BulletVariant } from \"../Bullet\";\nimport type { LabelVariant } from \"../Label\";\nimport type { DrawerAppBarProps } from \"./DrawerAppBar\";\n\n/**\n * Drawer display variants\n */\nexport type DrawerVariant = \"temporary\" | \"mini\" | \"persistent\";\n\n/**\n * Drawer open/close states\n */\nexport type DrawerState = \"open\" | \"collapse\" | \"close\";\n\n/**\n * Drawer size variants\n */\nexport type DrawerSize = \"small\" | \"medium\";\n\n/**\n * Avatar configuration for drawer items\n */\nexport interface DrawerItemAvatar {\n /**\n * Avatar image source URL\n */\n src: string;\n /**\n * Alt text for the avatar image\n */\n alt: string;\n}\n\n/**\n * Label configuration for drawer items\n */\nexport interface DrawerItemLabel {\n /**\n * Label text content\n */\n text: string;\n /**\n * Label color variant\n */\n variant: LabelVariant;\n}\n\n/**\n * Bullet indicator configuration for drawer items\n */\nexport interface DrawerItemBullet {\n /**\n * Bullet color variant\n */\n variant: BulletVariant;\n}\n\n/**\n * Navigation link item in the drawer\n */\nexport interface DrawerNavigationLink {\n /**\n * Item type discriminator\n */\n kind: \"link\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Display text\n */\n text: string;\n /**\n * Navigation URL\n */\n href: string;\n /**\n * Optional icon element\n */\n icon?: ReactElement;\n /**\n * Optional avatar configuration\n */\n avatar?: DrawerItemAvatar;\n /**\n * Optional label badge\n */\n label?: DrawerItemLabel;\n /**\n * Optional bullet indicator\n */\n bullet?: DrawerItemBullet;\n}\n\n/**\n * Collapsable navigation group with nested items\n */\nexport type DrawerNavigationCollapsable = Pick<\n DrawerNavigationLink,\n \"id\" | \"text\" | \"icon\"\n> & {\n /**\n * Item type discriminator\n */\n kind: \"collapsable\";\n /**\n * Nested navigation items\n */\n items: DrawerNavigationItem[];\n};\n\n/**\n * Section header in the drawer navigation\n */\nexport interface DrawerNavigationHeader {\n /**\n * Item type discriminator\n */\n kind: \"header\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Header text\n */\n text: string;\n}\n\n/**\n * Union of all possible drawer navigation item types\n */\nexport type DrawerNavigationItem =\n | DrawerNavigationLink\n | DrawerNavigationCollapsable\n | DrawerNavigationHeader;\n\n/**\n * Complete navigation structure for the drawer\n */\nexport type DrawerNavigation = DrawerNavigationItem[];\n\nexport interface DrawerContentProps {\n /**\n * Object with the content that has to be rendered\n */\n navigation: DrawerNavigation;\n}\n\n/**\n * DrawerContent component type\n */\nexport type DrawerContentComponent = FunctionComponent<DrawerContentProps>;\n\n/**\n * DrawerContent element type\n */\nexport type DrawerContentElement = ReactElement<\n DrawerContentProps,\n DrawerContentComponent\n>;\n\n/**\n * Props for the Drawer component\n *\n * @extends MuiDrawerProps\n */\nexport type DrawerProps = PropsWithChildren<MuiDrawerProps>;\n\n/**\n * Drawer component type\n */\nexport type DrawerComponent = FunctionComponent<DrawerProps>;\n\n/**\n * Drawer element type\n */\nexport type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;\n\n/**\n * Returns color and font weight styles for drawer items based on selection state\n *\n * @param theme - MUI theme object\n * @param selected - Whether the item is selected\n */\nexport const getDrawerItemColors = (\n theme: Theme,\n selected: boolean | undefined,\n): {\n color?: string;\n fontWeight: CSSProperties[\"fontWeight\"];\n} => ({\n color: selected ? theme.palette.primary.main : undefined,\n fontWeight: selected\n ? theme.typography.fontWeightBold\n : theme.typography.fontWeightMedium,\n});\n\n/**\n * DrawerAppBar component type\n */\nexport type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;\n\n/**\n * DrawerAppBar element type\n */\nexport type DrawerAppBarElement = ReactElement<\n DrawerAppBarProps,\n DrawerAppBarComponent\n>;\n"],"names":["getDrawerItemColors","theme","selected"],"mappings":"AAkMO,MAAMA,IAAsB,CACjCC,GACAC,OAII;AAAA,EACJ,OAAOA,IAAWD,EAAM,QAAQ,QAAQ,OAAO;AAAA,EAC/C,YAAYC,IACRD,EAAM,WAAW,iBACjBA,EAAM,WAAW;AACvB;"}
1
+ {"version":3,"file":"Drawer.types.mjs","sources":["../../src/Drawerx/Drawer.types.ts"],"sourcesContent":["import type { DrawerProps as MuiDrawerProps } from \"@mui/material/Drawer\";\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n CSSProperties,\n FunctionComponent,\n PropsWithChildren,\n ReactElement,\n} from \"react\";\nimport type { BadgeVariant } from \"../components/badge\";\nimport type { BulletVariant } from \"../components/bullet\";\nimport type { DrawerAppBarProps } from \"./DrawerAppBar\";\n\n/**\n * Drawer display variants\n */\nexport type DrawerVariant = \"temporary\" | \"mini\" | \"persistent\";\n\n/**\n * Drawer open/close states\n */\nexport type DrawerState = \"open\" | \"collapse\" | \"close\";\n\n/**\n * Drawer size variants\n */\nexport type DrawerSize = \"small\" | \"medium\";\n\n/**\n * Avatar configuration for drawer items\n */\nexport interface DrawerItemAvatar {\n /**\n * Avatar image source URL\n */\n src: string;\n /**\n * Alt text for the avatar image\n */\n alt: string;\n}\n\n/**\n * Label configuration for drawer items\n */\nexport interface DrawerItemLabel {\n /**\n * Label text content\n */\n text: string;\n /**\n * Label color variant\n */\n variant: BadgeVariant;\n}\n\n/**\n * Bullet indicator configuration for drawer items\n */\nexport interface DrawerItemBullet {\n /**\n * Bullet color variant\n */\n variant: BulletVariant;\n}\n\n/**\n * Navigation link item in the drawer\n */\nexport interface DrawerNavigationLink {\n /**\n * Item type discriminator\n */\n kind: \"link\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Display text\n */\n text: string;\n /**\n * Navigation URL\n */\n href: string;\n /**\n * Optional icon element\n */\n icon?: ReactElement;\n /**\n * Optional avatar configuration\n */\n avatar?: DrawerItemAvatar;\n /**\n * Optional label badge\n */\n label?: DrawerItemLabel;\n /**\n * Optional bullet indicator\n */\n bullet?: DrawerItemBullet;\n}\n\n/**\n * Collapsable navigation group with nested items\n */\nexport type DrawerNavigationCollapsable = Pick<\n DrawerNavigationLink,\n \"id\" | \"text\" | \"icon\"\n> & {\n /**\n * Item type discriminator\n */\n kind: \"collapsable\";\n /**\n * Nested navigation items\n */\n items: DrawerNavigationItem[];\n};\n\n/**\n * Section header in the drawer navigation\n */\nexport interface DrawerNavigationHeader {\n /**\n * Item type discriminator\n */\n kind: \"header\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Header text\n */\n text: string;\n}\n\n/**\n * Union of all possible drawer navigation item types\n */\nexport type DrawerNavigationItem =\n | DrawerNavigationLink\n | DrawerNavigationCollapsable\n | DrawerNavigationHeader;\n\n/**\n * Complete navigation structure for the drawer\n */\nexport type DrawerNavigation = DrawerNavigationItem[];\n\nexport interface DrawerContentProps {\n /**\n * Object with the content that has to be rendered\n */\n navigation: DrawerNavigation;\n}\n\n/**\n * DrawerContent component type\n */\nexport type DrawerContentComponent = FunctionComponent<DrawerContentProps>;\n\n/**\n * DrawerContent element type\n */\nexport type DrawerContentElement = ReactElement<\n DrawerContentProps,\n DrawerContentComponent\n>;\n\n/**\n * Props for the Drawer component\n *\n * @extends MuiDrawerProps\n */\nexport type DrawerProps = PropsWithChildren<MuiDrawerProps>;\n\n/**\n * Drawer component type\n */\nexport type DrawerComponent = FunctionComponent<DrawerProps>;\n\n/**\n * Drawer element type\n */\nexport type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;\n\n/**\n * Returns color and font weight styles for drawer items based on selection state\n *\n * @param theme - MUI theme object\n * @param selected - Whether the item is selected\n */\nexport const getDrawerItemColors = (\n theme: Theme,\n selected: boolean | undefined,\n): {\n color?: string;\n fontWeight: CSSProperties[\"fontWeight\"];\n} => ({\n color: selected ? theme.palette.primary.main : undefined,\n fontWeight: selected\n ? theme.typography.fontWeightBold\n : theme.typography.fontWeightMedium,\n});\n\n/**\n * DrawerAppBar component type\n */\nexport type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;\n\n/**\n * DrawerAppBar element type\n */\nexport type DrawerAppBarElement = ReactElement<\n DrawerAppBarProps,\n DrawerAppBarComponent\n>;\n"],"names":["getDrawerItemColors","theme","selected"],"mappings":"AAkMO,MAAMA,IAAsB,CACjCC,GACAC,OAII;AAAA,EACJ,OAAOA,IAAWD,EAAM,QAAQ,QAAQ,OAAO;AAAA,EAC/C,YAAYC,IACRD,EAAM,WAAW,iBACjBA,EAAM,WAAW;AACvB;"}
@@ -9,14 +9,12 @@ import "@mui/material/ListItemButton";
9
9
  import "@mui/material/ListItemIcon";
10
10
  import "@mui/material/ListItemText";
11
11
  import "@mui/material/styles";
12
- import "@mui/material/Badge";
13
- import "@mui/material/Box";
14
12
  import "@mui/icons-material/ChevronRight";
15
13
  import "@mui/icons-material/ExpandMore";
16
14
  import "@mui/material/Collapse";
17
15
  import "@mui/material/List";
18
16
  import "@mui/material/Popover";
19
- function X({ navigation: m }) {
17
+ function I({ navigation: m }) {
20
18
  const { size: o } = s(), { spacing: r } = p();
21
19
  return /* @__PURE__ */ i(
22
20
  e,
@@ -30,6 +28,6 @@ function X({ navigation: m }) {
30
28
  );
31
29
  }
32
30
  export {
33
- X as default
31
+ I as default
34
32
  };
35
33
  //# sourceMappingURL=DrawerContent.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.mjs","sources":["../../../src/Drawerx/DrawerContent/DrawerContent.tsx"],"sourcesContent":["import { List, useTheme } from \"@mui/material\";\nimport type { DrawerContentProps } from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\nimport DrawerItem from \"../DrawerItem\";\n\n/**\n * Content to be shown inside a navigation\n */\nexport default function DrawerContent({ navigation }: DrawerContentProps) {\n const { size } = useDrawer();\n const { spacing } = useTheme();\n\n return (\n <List\n sx={{\n paddingTop: size === \"small\" ? spacing(0.5) : undefined,\n paddingX: size === \"small\" ? spacing(0.5) : spacing(1),\n }}\n >\n {navigation.map((item) => (\n <DrawerItem key={item.id} item={item} />\n ))}\n </List>\n );\n}\n"],"names":["DrawerContent","navigation","size","useDrawer","spacing","useTheme","jsx","List","item","DrawerItem"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,SAAwBA,EAAc,EAAE,YAAAC,KAAkC;AACxE,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACX,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAEpB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,YAAYL,MAAS,UAAUE,EAAQ,GAAG,IAAI;AAAA,QAC9C,UAA6BA,EAAnBF,MAAS,UAAkB,MAAe,CAAZ;AAAA,MAAa;AAAA,MAGtD,UAAAD,EAAW,IAAI,CAACO,wBACdC,GAAA,EAAyB,MAAAD,EAAA,GAATA,EAAK,EAAgB,CACvC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"DrawerContent.mjs","sources":["../../../src/Drawerx/DrawerContent/DrawerContent.tsx"],"sourcesContent":["import { List, useTheme } from \"@mui/material\";\nimport type { DrawerContentProps } from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\nimport DrawerItem from \"../DrawerItem\";\n\n/**\n * Content to be shown inside a navigation\n */\nexport default function DrawerContent({ navigation }: DrawerContentProps) {\n const { size } = useDrawer();\n const { spacing } = useTheme();\n\n return (\n <List\n sx={{\n paddingTop: size === \"small\" ? spacing(0.5) : undefined,\n paddingX: size === \"small\" ? spacing(0.5) : spacing(1),\n }}\n >\n {navigation.map((item) => (\n <DrawerItem key={item.id} item={item} />\n ))}\n </List>\n );\n}\n"],"names":["DrawerContent","navigation","size","useDrawer","spacing","useTheme","jsx","List","item","DrawerItem"],"mappings":";;;;;;;;;;;;;;;;AAQA,SAAwBA,EAAc,EAAE,YAAAC,KAAkC;AACxE,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACX,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAEpB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,YAAYL,MAAS,UAAUE,EAAQ,GAAG,IAAI;AAAA,QAC9C,UAA6BA,EAAnBF,MAAS,UAAkB,MAAe,CAAZ;AAAA,MAAa;AAAA,MAGtD,UAAAD,EAAW,IAAI,CAACO,wBACdC,GAAA,EAAyB,MAAAD,EAAA,GAATA,EAAK,EAAgB,CACvC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1,13 +1,13 @@
1
1
  import { jsxs as I, jsx as o } from "react/jsx-runtime";
2
- import L from "@mui/material/Avatar";
3
- import y from "@mui/material/ListItemAvatar";
2
+ import y from "@mui/material/Avatar";
3
+ import L from "@mui/material/ListItemAvatar";
4
4
  import w from "@mui/material/ListItemButton";
5
5
  import C from "@mui/material/ListItemIcon";
6
6
  import j from "@mui/material/ListItemText";
7
7
  import { useTheme as v } from "@mui/material/styles";
8
- import { Bullet as D } from "../../Bullet/Bullet.mjs";
9
- import { Label as T } from "../../Label/Label.mjs";
10
- import { getDrawerItemColors as k } from "../Drawer.types.mjs";
8
+ import { Badge as B } from "../../components/badge/badge.mjs";
9
+ import { Bullet as D } from "../../components/bullet/bullet.mjs";
10
+ import { getDrawerItemColors as T } from "../Drawer.types.mjs";
11
11
  import "@mui/material";
12
12
  import "react";
13
13
  import { useDrawer as h } from "../DrawerContext/DrawerContext.mjs";
@@ -15,28 +15,28 @@ const f = {
15
15
  minWidth: 0,
16
16
  justifyContent: "center",
17
17
  marginRight: "auto"
18
- }, M = ({
18
+ }, K = ({
19
19
  text: e,
20
20
  icon: m,
21
21
  avatar: i,
22
22
  label: s,
23
- bullet: n,
24
- href: x,
25
- selected: p,
23
+ bullet: a,
24
+ href: d,
25
+ selected: n,
26
26
  level: r,
27
- sx: d
27
+ sx: x
28
28
  }) => {
29
- const { state: t, size: a } = h(), c = v(), { color: l, fontWeight: u } = k(c, p), { LinkComponent: g } = h();
29
+ const { state: t, size: p } = h(), c = v(), { color: l, fontWeight: g } = T(c, n), { LinkComponent: u } = h();
30
30
  return /* @__PURE__ */ I(
31
31
  w,
32
32
  {
33
- dense: a === "small",
34
- LinkComponent: g,
33
+ dense: p === "small",
34
+ LinkComponent: u,
35
35
  "aria-label": e,
36
- href: x,
37
- selected: p,
36
+ href: d,
37
+ selected: n,
38
38
  sx: {
39
- ...d,
39
+ ...x,
40
40
  borderRadius: 2,
41
41
  pl: t === "open" ? c.spacing(2 + 1.5 * r) : void 0,
42
42
  ...t === "collapse" && {
@@ -56,18 +56,18 @@ const f = {
56
56
  }
57
57
  ),
58
58
  i && /* @__PURE__ */ o(
59
- y,
59
+ L,
60
60
  {
61
61
  sx: {
62
62
  ...t === "collapse" && r === 0 && f
63
63
  },
64
64
  children: /* @__PURE__ */ o(
65
- L,
65
+ y,
66
66
  {
67
67
  alt: i.alt,
68
68
  src: i.src,
69
69
  sx: {
70
- ...a === "small" && { width: 24, height: 24 },
70
+ ...p === "small" && { width: 24, height: 24 },
71
71
  ...t === "collapse" && { width: 30, height: 30 }
72
72
  }
73
73
  }
@@ -81,18 +81,18 @@ const f = {
81
81
  primary: e,
82
82
  sx: {
83
83
  color: l,
84
- fontWeight: u,
84
+ fontWeight: g,
85
85
  opacity: t === "collapse" && r === 0 ? 0 : void 0
86
86
  }
87
87
  }
88
88
  ),
89
- s && t === "open" && /* @__PURE__ */ o(T, { text: s.text, variant: s.variant, sx: { ml: 2 } }),
90
- n && t === "open" && /* @__PURE__ */ o(D, { variant: n.variant, sx: { ml: 2 } })
89
+ s && t === "open" && /* @__PURE__ */ o(B, { text: s.text, variant: s.variant, className: "ml-2" }),
90
+ a && t === "open" && /* @__PURE__ */ o(D, { variant: a.variant, className: "ml-4" })
91
91
  ]
92
92
  }
93
93
  );
94
94
  };
95
95
  export {
96
- M as DrawerItemLink
96
+ K as DrawerItemLink
97
97
  };
98
98
  //# sourceMappingURL=DrawerItemLink.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerItemLink.mjs","sources":["../../../src/Drawerx/DrawerItem/DrawerItemLink.tsx"],"sourcesContent":["import Avatar from \"@mui/material/Avatar\";\nimport ListItemAvatar from \"@mui/material/ListItemAvatar\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { type SxProps, type Theme, useTheme } from \"@mui/material/styles\";\nimport type { ReactElement } from \"react\";\nimport { Bullet } from \"../../Bullet\";\nimport { Label } from \"../../Label\";\nimport {\n type DrawerItemAvatar,\n type DrawerItemBullet,\n type DrawerItemLabel,\n getDrawerItemColors,\n} from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\n\nexport interface DrawerItemLinkProps {\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Url where the user is going to be redirected\n * if the item is clicked\n */\n href: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * Avatar displayed to the left\n */\n avatar?: DrawerItemAvatar;\n /**\n * Label with extra info displayed to the right\n */\n label?: DrawerItemLabel;\n /**\n * Bullet to attract the user attention displyed to the right\n */\n bullet?: DrawerItemBullet;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\nconst sxCollapsedIcon = {\n minWidth: 0,\n justifyContent: \"center\",\n marginRight: \"auto\",\n};\n\n/**\n * Clicable item inside a drawer\n */\nexport const DrawerItemLink = ({\n text,\n icon,\n avatar,\n label,\n bullet,\n href,\n selected,\n level,\n sx,\n}: DrawerItemLinkProps) => {\n const { state, size } = useDrawer();\n const theme = useTheme();\n const { color, fontWeight } = getDrawerItemColors(theme, selected);\n const { LinkComponent } = useDrawer();\n\n return (\n <ListItemButton\n dense={size === \"small\"}\n LinkComponent={LinkComponent}\n aria-label={text}\n href={href}\n selected={selected}\n sx={{\n ...sx,\n borderRadius: 2,\n pl: state === \"open\" ? theme.spacing(2 + 1.5 * level) : undefined,\n ...(state === \"collapse\" && {\n px: 2.5,\n justifyContent: \"center\",\n }),\n }}\n >\n {icon && (\n <ListItemIcon\n sx={{\n color,\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n {icon}\n </ListItemIcon>\n )}\n {avatar && (\n <ListItemAvatar\n sx={{\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n <Avatar\n alt={avatar.alt}\n src={avatar.src}\n sx={{\n ...(size === \"small\" && { width: 24, height: 24 }),\n ...(state === \"collapse\" && { width: 30, height: 30 }),\n }}\n />\n </ListItemAvatar>\n )}\n <ListItemText\n disableTypography\n primary={text}\n sx={{\n color,\n fontWeight,\n opacity: state === \"collapse\" && level === 0 ? 0 : undefined,\n }}\n />\n {label && state === \"open\" && (\n <Label text={label.text} variant={label.variant} sx={{ ml: 2 }} />\n )}\n {bullet && state === \"open\" && (\n <Bullet variant={bullet.variant} sx={{ ml: 2 }} />\n )}\n </ListItemButton>\n );\n};\n"],"names":["sxCollapsedIcon","DrawerItemLink","text","icon","avatar","label","bullet","href","selected","level","sx","state","size","useDrawer","theme","useTheme","color","fontWeight","getDrawerItemColors","LinkComponent","jsxs","ListItemButton","jsx","ListItemIcon","ListItemAvatar","Avatar","ListItemText","Label","Bullet"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAkB;AAAA,EACtB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AACf,GAKaC,IAAiB,CAAC;AAAA,EAC7B,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,IAAAC;AACF,MAA2B;AACzB,QAAM,EAAE,OAAAC,GAAO,MAAAC,EAAA,IAASC,EAAA,GAClBC,IAAQC,EAAA,GACR,EAAE,OAAAC,GAAO,YAAAC,EAAA,IAAeC,EAAoBJ,GAAON,CAAQ,GAC3D,EAAE,eAAAW,EAAA,IAAkBN,EAAA;AAE1B,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOT,MAAS;AAAA,MAChB,eAAAO;AAAA,MACA,cAAYjB;AAAA,MACZ,MAAAK;AAAA,MACA,UAAAC;AAAA,MACA,IAAI;AAAA,QACF,GAAGE;AAAA,QACH,cAAc;AAAA,QACd,IAAIC,MAAU,SAASG,EAAM,QAAQ,IAAI,MAAML,CAAK,IAAI;AAAA,QACxD,GAAIE,MAAU,cAAc;AAAA,UAC1B,IAAI;AAAA,UACJ,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,MAGD,UAAA;AAAA,QAAAR,KACC,gBAAAmB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,OAAAP;AAAA,cACA,GAAIL,MAAU,cAAcF,MAAU,KAAKT;AAAA,YAAA;AAAA,YAG5C,UAAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJC,KACC,gBAAAkB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,GAAIb,MAAU,cAAcF,MAAU,KAAKT;AAAA,YAAA;AAAA,YAG7C,UAAA,gBAAAsB;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,KAAKrB,EAAO;AAAA,gBACZ,KAAKA,EAAO;AAAA,gBACZ,IAAI;AAAA,kBACF,GAAIQ,MAAS,WAAW,EAAE,OAAO,IAAI,QAAQ,GAAA;AAAA,kBAC7C,GAAID,MAAU,cAAc,EAAE,OAAO,IAAI,QAAQ,GAAA;AAAA,gBAAG;AAAA,cACtD;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,QAGJ,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,mBAAiB;AAAA,YACjB,SAASxB;AAAA,YACT,IAAI;AAAA,cACF,OAAAc;AAAA,cACA,YAAAC;AAAA,cACA,SAASN,MAAU,cAAcF,MAAU,IAAI,IAAI;AAAA,YAAA;AAAA,UACrD;AAAA,QAAA;AAAA,QAEDJ,KAASM,MAAU,UAClB,gBAAAW,EAACK,KAAM,MAAMtB,EAAM,MAAM,SAASA,EAAM,SAAS,IAAI,EAAE,IAAI,KAAK;AAAA,QAEjEC,KAAUK,MAAU,UACnB,gBAAAW,EAACM,GAAA,EAAO,SAAStB,EAAO,SAAS,IAAI,EAAE,IAAI,EAAA,EAAE,CAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIxD;"}
1
+ {"version":3,"file":"DrawerItemLink.mjs","sources":["../../../src/Drawerx/DrawerItem/DrawerItemLink.tsx"],"sourcesContent":["import Avatar from \"@mui/material/Avatar\";\nimport ListItemAvatar from \"@mui/material/ListItemAvatar\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport { type SxProps, type Theme, useTheme } from \"@mui/material/styles\";\nimport type { ReactElement } from \"react\";\nimport { Badge } from \"../../components/badge\";\nimport { Bullet } from \"../../components/bullet\";\nimport {\n type DrawerItemAvatar,\n type DrawerItemBullet,\n type DrawerItemLabel,\n getDrawerItemColors,\n} from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\n\nexport interface DrawerItemLinkProps {\n /**\n * Text displayed inside the item\n */\n text: string;\n /**\n * Url where the user is going to be redirected\n * if the item is clicked\n */\n href: string;\n /**\n * Icon displayed to the left\n */\n icon?: ReactElement;\n /**\n * Avatar displayed to the left\n */\n avatar?: DrawerItemAvatar;\n /**\n * Label with extra info displayed to the right\n */\n label?: DrawerItemLabel;\n /**\n * Bullet to attract the user attention displyed to the right\n */\n bullet?: DrawerItemBullet;\n /**\n * The item has to be marked as selected\n */\n selected?: boolean;\n /**\n * Deep level of this item inside the submenus\n */\n level: number;\n /**\n * Custom styles\n */\n sx?: SxProps<Theme>;\n}\n\nconst sxCollapsedIcon = {\n minWidth: 0,\n justifyContent: \"center\",\n marginRight: \"auto\",\n};\n\n/**\n * Clicable item inside a drawer\n */\nexport const DrawerItemLink = ({\n text,\n icon,\n avatar,\n label,\n bullet,\n href,\n selected,\n level,\n sx,\n}: DrawerItemLinkProps) => {\n const { state, size } = useDrawer();\n const theme = useTheme();\n const { color, fontWeight } = getDrawerItemColors(theme, selected);\n const { LinkComponent } = useDrawer();\n\n return (\n <ListItemButton\n dense={size === \"small\"}\n LinkComponent={LinkComponent}\n aria-label={text}\n href={href}\n selected={selected}\n sx={{\n ...sx,\n borderRadius: 2,\n pl: state === \"open\" ? theme.spacing(2 + 1.5 * level) : undefined,\n ...(state === \"collapse\" && {\n px: 2.5,\n justifyContent: \"center\",\n }),\n }}\n >\n {icon && (\n <ListItemIcon\n sx={{\n color,\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n {icon}\n </ListItemIcon>\n )}\n {avatar && (\n <ListItemAvatar\n sx={{\n ...(state === \"collapse\" && level === 0 && sxCollapsedIcon),\n }}\n >\n <Avatar\n alt={avatar.alt}\n src={avatar.src}\n sx={{\n ...(size === \"small\" && { width: 24, height: 24 }),\n ...(state === \"collapse\" && { width: 30, height: 30 }),\n }}\n />\n </ListItemAvatar>\n )}\n <ListItemText\n disableTypography\n primary={text}\n sx={{\n color,\n fontWeight,\n opacity: state === \"collapse\" && level === 0 ? 0 : undefined,\n }}\n />\n {label && state === \"open\" && (\n <Badge text={label.text} variant={label.variant} className=\"ml-2\" />\n )}\n {bullet && state === \"open\" && (\n <Bullet variant={bullet.variant} className=\"ml-4\" />\n )}\n </ListItemButton>\n );\n};\n"],"names":["sxCollapsedIcon","DrawerItemLink","text","icon","avatar","label","bullet","href","selected","level","sx","state","size","useDrawer","theme","useTheme","color","fontWeight","getDrawerItemColors","LinkComponent","jsxs","ListItemButton","jsx","ListItemIcon","ListItemAvatar","Avatar","ListItemText","Badge","Bullet"],"mappings":";;;;;;;;;;;;;AAyDA,MAAMA,IAAkB;AAAA,EACtB,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,aAAa;AACf,GAKaC,IAAiB,CAAC;AAAA,EAC7B,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,IAAAC;AACF,MAA2B;AACzB,QAAM,EAAE,OAAAC,GAAO,MAAAC,EAAA,IAASC,EAAA,GAClBC,IAAQC,EAAA,GACR,EAAE,OAAAC,GAAO,YAAAC,EAAA,IAAeC,EAAoBJ,GAAON,CAAQ,GAC3D,EAAE,eAAAW,EAAA,IAAkBN,EAAA;AAE1B,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOT,MAAS;AAAA,MAChB,eAAAO;AAAA,MACA,cAAYjB;AAAA,MACZ,MAAAK;AAAA,MACA,UAAAC;AAAA,MACA,IAAI;AAAA,QACF,GAAGE;AAAA,QACH,cAAc;AAAA,QACd,IAAIC,MAAU,SAASG,EAAM,QAAQ,IAAI,MAAML,CAAK,IAAI;AAAA,QACxD,GAAIE,MAAU,cAAc;AAAA,UAC1B,IAAI;AAAA,UACJ,gBAAgB;AAAA,QAAA;AAAA,MAClB;AAAA,MAGD,UAAA;AAAA,QAAAR,KACC,gBAAAmB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,OAAAP;AAAA,cACA,GAAIL,MAAU,cAAcF,MAAU,KAAKT;AAAA,YAAA;AAAA,YAG5C,UAAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJC,KACC,gBAAAkB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,GAAIb,MAAU,cAAcF,MAAU,KAAKT;AAAA,YAAA;AAAA,YAG7C,UAAA,gBAAAsB;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,KAAKrB,EAAO;AAAA,gBACZ,KAAKA,EAAO;AAAA,gBACZ,IAAI;AAAA,kBACF,GAAIQ,MAAS,WAAW,EAAE,OAAO,IAAI,QAAQ,GAAA;AAAA,kBAC7C,GAAID,MAAU,cAAc,EAAE,OAAO,IAAI,QAAQ,GAAA;AAAA,gBAAG;AAAA,cACtD;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,QAGJ,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,mBAAiB;AAAA,YACjB,SAASxB;AAAA,YACT,IAAI;AAAA,cACF,OAAAc;AAAA,cACA,YAAAC;AAAA,cACA,SAASN,MAAU,cAAcF,MAAU,IAAI,IAAI;AAAA,YAAA;AAAA,UACrD;AAAA,QAAA;AAAA,QAEDJ,KAASM,MAAU,UAClB,gBAAAW,EAACK,GAAA,EAAM,MAAMtB,EAAM,MAAM,SAASA,EAAM,SAAS,WAAU,OAAA,CAAO;AAAA,QAEnEC,KAAUK,MAAU,UACnB,gBAAAW,EAACM,KAAO,SAAStB,EAAO,SAAS,WAAU,OAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAI1D;"}
@@ -1,5 +1,5 @@
1
- import { jsx as t, jsxs as y } from "react/jsx-runtime";
2
- import { useState as P, createElement as k } from "react";
1
+ import { jsx as t, jsxs as P } from "react/jsx-runtime";
2
+ import { useState as k, createElement as x } from "react";
3
3
  import { useTheme as L, Link as b } from "@mui/material";
4
4
  import { grey as v } from "@mui/material/colors";
5
5
  import r from "@mui/material/Grid";
@@ -19,15 +19,15 @@ function O({
19
19
  onSelectedItemChange: c = () => null
20
20
  }) {
21
21
  o.map((e) => e.path).filter(Boolean);
22
- const h = w(), { palette: f } = L(), [u, d] = P(p), g = (e) => {
22
+ const h = w(), { palette: f } = L(), [u, d] = k(p), g = (e) => {
23
23
  d(e), c(e);
24
24
  };
25
- return /* @__PURE__ */ t(z, { value: u, children: /* @__PURE__ */ y(r, { container: !0, bgcolor: h, height: 1, children: [
26
- /* @__PURE__ */ t(r, { size: { xs: i }, pl: 1, height: 1, children: /* @__PURE__ */ t(C, { sx: { height: 1, overflowY: "auto" }, children: o.map(({ id: e, text: n, tooltip: l, href: x }) => {
27
- const m = /* @__PURE__ */ k(
25
+ return /* @__PURE__ */ t(z, { value: u, children: /* @__PURE__ */ P(r, { container: !0, bgcolor: h, height: 1, children: [
26
+ /* @__PURE__ */ t(r, { size: i, pl: 1, height: 1, children: /* @__PURE__ */ t(C, { sx: { height: 1, overflowY: "auto" }, children: o.map(({ id: e, text: n, tooltip: l, href: y }) => {
27
+ const m = /* @__PURE__ */ x(
28
28
  I,
29
29
  {
30
- ...a === "navigation" ? { component: b, href: x } : {},
30
+ ...a === "navigation" ? { component: b, href: y } : {},
31
31
  key: e,
32
32
  dense: !0,
33
33
  onClick: () => g(e),
@@ -54,7 +54,7 @@ function O({
54
54
  e
55
55
  ) : m;
56
56
  }) }) }),
57
- /* @__PURE__ */ t(r, { size: { xs: 12 - i }, pl: 1, py: 1, pr: 1, children: /* @__PURE__ */ t(
57
+ /* @__PURE__ */ t(r, { size: 12 - i, pl: 1, py: 1, pr: 1, children: /* @__PURE__ */ t(
58
58
  S,
59
59
  {
60
60
  elevation: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"ListPanel.mjs","sources":["../../src/ListPanel/ListPanel.tsx"],"sourcesContent":["import { Link, useTheme } from \"@mui/material\";\nimport { grey } from \"@mui/material/colors\";\nimport Grid from \"@mui/material/Grid\";\nimport List from \"@mui/material/List\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { useState } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ListPanelContextProvider } from \"./ListPanel.context\";\n\nexport interface ListPanelItem {\n id: string;\n text: string;\n tooltip?: string;\n href?: string;\n path?: string;\n}\n\nexport interface ListPanelProps {\n /**\n * The ID of the item that should be selected by default.\n */\n defaultSelectedItem?: string;\n /**\n * The list of items to be displayed in the panel.\n */\n items: ListPanelItem[];\n /**\n * The mode of the list, either \"panel\" or \"navigation\".\n */\n listMode?: \"panel\" | \"navigation\";\n /**\n * The breakpoint for column layout.\n */\n colBreakpoint?: number;\n /**\n * Callback function that is called when the selected item changes.\n */\n onSelectedItemChange?: (id: string) => void;\n /**\n * Content to display in the panel area\n */\n children?: React.ReactNode;\n}\n\n/**\n * ListPanel component renders a panel with a list of items and a content area.\n */\nexport function ListPanel({\n items,\n defaultSelectedItem,\n colBreakpoint = 3,\n listMode = \"panel\",\n children,\n onSelectedItemChange = () => null,\n}: ListPanelProps) {\n const _paths = items.map((item) => item.path).filter(Boolean) as string[];\n\n const bgColor = useGetDefaultThemeColor();\n const { palette } = useTheme();\n const [selectedItem, setSelectedItem] = useState(defaultSelectedItem);\n\n const handleSelectItem = (id: string) => {\n setSelectedItem(id);\n onSelectedItemChange(id);\n };\n\n return (\n <ListPanelContextProvider value={selectedItem}>\n <Grid container bgcolor={bgColor} height={1}>\n <Grid size={{ xs: colBreakpoint }} pl={1} height={1}>\n <List sx={{ height: 1, overflowY: \"auto\" }}>\n {items.map(({ id, text, tooltip, href }) => {\n const linkProps =\n listMode === \"navigation\" ? { component: Link, href } : {};\n\n const contentEl = (\n <ListItemButton\n {...linkProps}\n key={id}\n dense\n onClick={() => handleSelectItem(id)}\n aria-label={text}\n >\n <ListItemText\n primary={text}\n primaryTypographyProps={{\n color: grey[600],\n }}\n />\n </ListItemButton>\n );\n\n return tooltip ? (\n <Tooltip\n key={id}\n title={tooltip}\n enterDelay={1500}\n placement=\"right\"\n >\n {contentEl}\n </Tooltip>\n ) : (\n contentEl\n );\n })}\n </List>\n </Grid>\n <Grid size={{ xs: 12 - colBreakpoint }} pl={1} py={1} pr={1}>\n <Paper\n elevation={0}\n sx={{\n width: 1,\n height: 1,\n backgroundColor: palette.background.paper,\n }}\n >\n {children}\n </Paper>\n </Grid>\n </Grid>\n </ListPanelContextProvider>\n );\n}\n\nexport default ListPanel;\n"],"names":["ListPanel","items","defaultSelectedItem","colBreakpoint","listMode","children","onSelectedItemChange","item","bgColor","useGetDefaultThemeColor","palette","useTheme","selectedItem","setSelectedItem","useState","handleSelectItem","id","jsx","ListPanelContextProvider","jsxs","Grid","List","text","tooltip","href","contentEl","createElement","ListItemButton","Link","ListItemText","grey","Tooltip","Paper"],"mappings":";;;;;;;;;;;;AAkDO,SAASA,EAAU;AAAA,EACxB,OAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,sBAAAC,IAAuB,MAAM;AAC/B,GAAmB;AACF,EAAAL,EAAM,IAAI,CAACM,MAASA,EAAK,IAAI,EAAE,OAAO,OAAO;AAE5D,QAAMC,IAAUC,EAAA,GACV,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,CAACC,GAAcC,CAAe,IAAIC,EAASZ,CAAmB,GAE9Da,IAAmB,CAACC,MAAe;AACvC,IAAAH,EAAgBG,CAAE,GAClBV,EAAqBU,CAAE;AAAA,EACzB;AAEA,SACE,gBAAAC,EAACC,GAAA,EAAyB,OAAON,GAC/B,UAAA,gBAAAO,EAACC,GAAA,EAAK,WAAS,IAAC,SAASZ,GAAS,QAAQ,GACxC,UAAA;AAAA,IAAA,gBAAAS,EAACG,GAAA,EAAK,MAAM,EAAE,IAAIjB,EAAA,GAAiB,IAAI,GAAG,QAAQ,GAChD,UAAA,gBAAAc,EAACI,GAAA,EAAK,IAAI,EAAE,QAAQ,GAAG,WAAW,OAAA,GAC/B,UAAApB,EAAM,IAAI,CAAC,EAAE,IAAAe,GAAI,MAAAM,GAAM,SAAAC,GAAS,MAAAC,EAAA,MAAW;AAI1C,YAAMC,IACJ,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAJHvB,MAAa,eAAe,EAAE,WAAWwB,GAAM,MAAAJ,EAAA,IAAS,CAAA;AAAA,UAKtD,KAAKR;AAAA,UACL,OAAK;AAAA,UACL,SAAS,MAAMD,EAAiBC,CAAE;AAAA,UAClC,cAAYM;AAAA,QAAA;AAAA,QAEZ,gBAAAL;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,SAASP;AAAA,YACT,wBAAwB;AAAA,cACtB,OAAOQ,EAAK,GAAG;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MACF;AAIJ,aAAOP,IACL,gBAAAN;AAAA,QAACc;AAAA,QAAA;AAAA,UAEC,OAAOR;AAAA,UACP,YAAY;AAAA,UACZ,WAAU;AAAA,UAET,UAAAE;AAAA,QAAA;AAAA,QALIT;AAAA,MAAA,IAQPS;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,IACA,gBAAAR,EAACG,GAAA,EAAK,MAAM,EAAE,IAAI,KAAKjB,EAAA,GAAiB,IAAI,GAAG,IAAI,GAAG,IAAI,GACxD,UAAA,gBAAAc;AAAA,MAACe;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,QACX,IAAI;AAAA,UACF,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,iBAAiBtB,EAAQ,WAAW;AAAA,QAAA;AAAA,QAGrC,UAAAL;AAAA,MAAA;AAAA,IAAA,EACH,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"ListPanel.mjs","sources":["../../src/ListPanel/ListPanel.tsx"],"sourcesContent":["import { Link, useTheme } from \"@mui/material\";\nimport { grey } from \"@mui/material/colors\";\nimport Grid from \"@mui/material/Grid\";\nimport List from \"@mui/material/List\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { useState } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\nimport { ListPanelContextProvider } from \"./ListPanel.context\";\n\nexport interface ListPanelItem {\n id: string;\n text: string;\n tooltip?: string;\n href?: string;\n path?: string;\n}\n\nexport interface ListPanelProps {\n /**\n * The ID of the item that should be selected by default.\n */\n defaultSelectedItem?: string;\n /**\n * The list of items to be displayed in the panel.\n */\n items: ListPanelItem[];\n /**\n * The mode of the list, either \"panel\" or \"navigation\".\n */\n listMode?: \"panel\" | \"navigation\";\n /**\n * The breakpoint for column layout.\n */\n colBreakpoint?: number;\n /**\n * Callback function that is called when the selected item changes.\n */\n onSelectedItemChange?: (id: string) => void;\n /**\n * Content to display in the panel area\n */\n children?: React.ReactNode;\n}\n\n/**\n * ListPanel component renders a panel with a list of items and a content area.\n */\nexport function ListPanel({\n items,\n defaultSelectedItem,\n colBreakpoint = 3,\n listMode = \"panel\",\n children,\n onSelectedItemChange = () => null,\n}: ListPanelProps) {\n const _paths = items.map((item) => item.path).filter(Boolean) as string[];\n\n const bgColor = useGetDefaultThemeColor();\n const { palette } = useTheme();\n const [selectedItem, setSelectedItem] = useState(defaultSelectedItem);\n\n const handleSelectItem = (id: string) => {\n setSelectedItem(id);\n onSelectedItemChange(id);\n };\n\n return (\n <ListPanelContextProvider value={selectedItem}>\n <Grid container bgcolor={bgColor} height={1}>\n <Grid size={colBreakpoint} pl={1} height={1}>\n <List sx={{ height: 1, overflowY: \"auto\" }}>\n {items.map(({ id, text, tooltip, href }) => {\n const linkProps =\n listMode === \"navigation\" ? { component: Link, href } : {};\n\n const contentEl = (\n <ListItemButton\n {...linkProps}\n key={id}\n dense\n onClick={() => handleSelectItem(id)}\n aria-label={text}\n >\n <ListItemText\n primary={text}\n primaryTypographyProps={{\n color: grey[600],\n }}\n />\n </ListItemButton>\n );\n\n return tooltip ? (\n <Tooltip\n key={id}\n title={tooltip}\n enterDelay={1500}\n placement=\"right\"\n >\n {contentEl}\n </Tooltip>\n ) : (\n contentEl\n );\n })}\n </List>\n </Grid>\n <Grid size={12 - colBreakpoint} pl={1} py={1} pr={1}>\n <Paper\n elevation={0}\n sx={{\n width: 1,\n height: 1,\n backgroundColor: palette.background.paper,\n }}\n >\n {children}\n </Paper>\n </Grid>\n </Grid>\n </ListPanelContextProvider>\n );\n}\n\nexport default ListPanel;\n"],"names":["ListPanel","items","defaultSelectedItem","colBreakpoint","listMode","children","onSelectedItemChange","item","bgColor","useGetDefaultThemeColor","palette","useTheme","selectedItem","setSelectedItem","useState","handleSelectItem","id","jsx","ListPanelContextProvider","jsxs","Grid","List","text","tooltip","href","contentEl","createElement","ListItemButton","Link","ListItemText","grey","Tooltip","Paper"],"mappings":";;;;;;;;;;;;AAkDO,SAASA,EAAU;AAAA,EACxB,OAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,sBAAAC,IAAuB,MAAM;AAC/B,GAAmB;AACF,EAAAL,EAAM,IAAI,CAACM,MAASA,EAAK,IAAI,EAAE,OAAO,OAAO;AAE5D,QAAMC,IAAUC,EAAA,GACV,EAAE,SAAAC,EAAA,IAAYC,EAAA,GACd,CAACC,GAAcC,CAAe,IAAIC,EAASZ,CAAmB,GAE9Da,IAAmB,CAACC,MAAe;AACvC,IAAAH,EAAgBG,CAAE,GAClBV,EAAqBU,CAAE;AAAA,EACzB;AAEA,SACE,gBAAAC,EAACC,GAAA,EAAyB,OAAON,GAC/B,UAAA,gBAAAO,EAACC,GAAA,EAAK,WAAS,IAAC,SAASZ,GAAS,QAAQ,GACxC,UAAA;AAAA,IAAA,gBAAAS,EAACG,GAAA,EAAK,MAAMjB,GAAe,IAAI,GAAG,QAAQ,GACxC,UAAA,gBAAAc,EAACI,GAAA,EAAK,IAAI,EAAE,QAAQ,GAAG,WAAW,OAAA,GAC/B,UAAApB,EAAM,IAAI,CAAC,EAAE,IAAAe,GAAI,MAAAM,GAAM,SAAAC,GAAS,MAAAC,EAAA,MAAW;AAI1C,YAAMC,IACJ,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAJHvB,MAAa,eAAe,EAAE,WAAWwB,GAAM,MAAAJ,EAAA,IAAS,CAAA;AAAA,UAKtD,KAAKR;AAAA,UACL,OAAK;AAAA,UACL,SAAS,MAAMD,EAAiBC,CAAE;AAAA,UAClC,cAAYM;AAAA,QAAA;AAAA,QAEZ,gBAAAL;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,SAASP;AAAA,YACT,wBAAwB;AAAA,cACtB,OAAOQ,EAAK,GAAG;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MACF;AAIJ,aAAOP,IACL,gBAAAN;AAAA,QAACc;AAAA,QAAA;AAAA,UAEC,OAAOR;AAAA,UACP,YAAY;AAAA,UACZ,WAAU;AAAA,UAET,UAAAE;AAAA,QAAA;AAAA,QALIT;AAAA,MAAA,IAQPS;AAAA,IAEJ,CAAC,GACH,GACF;AAAA,IACA,gBAAAR,EAACG,GAAA,EAAK,MAAM,KAAKjB,GAAe,IAAI,GAAG,IAAI,GAAG,IAAI,GAChD,UAAA,gBAAAc;AAAA,MAACe;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,QACX,IAAI;AAAA,UACF,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,iBAAiBtB,EAAQ,WAAW;AAAA,QAAA;AAAA,QAGrC,UAAAL;AAAA,MAAA;AAAA,IAAA,EACH,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -4,7 +4,7 @@ import { SkeletonCard as o } from "../SkeletonCard/SkeletonCard.mjs";
4
4
  import { newArrayWithSize as n } from "../utils/arrays.mjs";
5
5
  import "@mui/material";
6
6
  function l({ size: t = 20 }) {
7
- return /* @__PURE__ */ r(i, { container: !0, spacing: 2, children: n(t, 0).map((m, e) => /* @__PURE__ */ r(i, { size: { xs: 4 }, children: /* @__PURE__ */ r(o, { width: 1 }) }, e)) });
7
+ return /* @__PURE__ */ r(i, { container: !0, spacing: 2, children: n(t, 0).map((m, e) => /* @__PURE__ */ r(i, { size: 4, children: /* @__PURE__ */ r(o, { width: 1 }) }, e)) });
8
8
  }
9
9
  export {
10
10
  l as SkeletonGrid,
@@ -1 +1 @@
1
- {"version":3,"file":"SkeletonGrid.mjs","sources":["../../src/SkeletonGrid/SkeletonGrid.tsx"],"sourcesContent":["import Grid from \"@mui/material/Grid\";\nimport SkeletonCard from \"../SkeletonCard\";\nimport { newArrayWithSize } from \"../utils\";\n\n/**\n * Props for the SkeletonGrid component.\n */\nexport interface SkeletonGridProps {\n /**\n * Optional size of the skeleton grid.\n */\n size?: number;\n}\nexport interface SkeletonGridProps {\n size?: number;\n}\n\n/**\n * SkeletonGrid component renders a grid of skeleton cards.\n */\nexport function SkeletonGrid({ size = 20 }: SkeletonGridProps) {\n return (\n <Grid container spacing={2}>\n {newArrayWithSize(size, 0).map((_, i) => (\n <Grid key={i} size={{ xs: 4 }}>\n <SkeletonCard width={1} />\n </Grid>\n ))}\n </Grid>\n );\n}\n\nexport default SkeletonGrid;\n"],"names":["SkeletonGrid","size","jsx","Grid","newArrayWithSize","_","i","SkeletonCard"],"mappings":";;;;;AAoBO,SAASA,EAAa,EAAE,MAAAC,IAAO,MAAyB;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAK,WAAS,IAAC,SAAS,GACtB,UAAAC,EAAiBH,GAAM,CAAC,EAAE,IAAI,CAACI,GAAGC,MACjC,gBAAAJ,EAACC,GAAA,EAAa,MAAM,EAAE,IAAI,EAAA,GACxB,UAAA,gBAAAD,EAACK,GAAA,EAAa,OAAO,EAAA,CAAG,EAAA,GADfD,CAEX,CACD,GACH;AAEJ;"}
1
+ {"version":3,"file":"SkeletonGrid.mjs","sources":["../../src/SkeletonGrid/SkeletonGrid.tsx"],"sourcesContent":["import Grid from \"@mui/material/Grid\";\nimport SkeletonCard from \"../SkeletonCard\";\nimport { newArrayWithSize } from \"../utils\";\n\n/**\n * Props for the SkeletonGrid component.\n */\nexport interface SkeletonGridProps {\n /**\n * Optional size of the skeleton grid.\n */\n size?: number;\n}\nexport interface SkeletonGridProps {\n size?: number;\n}\n\n/**\n * SkeletonGrid component renders a grid of skeleton cards.\n */\nexport function SkeletonGrid({ size = 20 }: SkeletonGridProps) {\n return (\n <Grid container spacing={2}>\n {newArrayWithSize(size, 0).map((_, i) => (\n <Grid key={i} size={4}>\n <SkeletonCard width={1} />\n </Grid>\n ))}\n </Grid>\n );\n}\n\nexport default SkeletonGrid;\n"],"names":["SkeletonGrid","size","jsx","Grid","newArrayWithSize","_","i","SkeletonCard"],"mappings":";;;;;AAoBO,SAASA,EAAa,EAAE,MAAAC,IAAO,MAAyB;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAK,WAAS,IAAC,SAAS,GACtB,UAAAC,EAAiBH,GAAM,CAAC,EAAE,IAAI,CAACI,GAAGC,MACjC,gBAAAJ,EAACC,GAAA,EAAa,MAAM,GAClB,UAAA,gBAAAD,EAACK,GAAA,EAAa,OAAO,EAAA,CAAG,EAAA,GADfD,CAEX,CACD,EAAA,CACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ValueItem.mjs","sources":["../../src/ValueItem/ValueItem.tsx"],"sourcesContent":["import Box from \"@mui/material/Box\";\nimport Grid, { type GridProps } from \"@mui/material/Grid\";\nimport type { ResponsiveStyleValue } from \"@mui/system\";\nimport type { FunctionComponent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\n/**\n * Props for the ValueItem component\n */\nexport interface ValueItemProps extends Omit<GridProps, \"item\" | \"container\"> {\n /**\n * Whether to display a border\n */\n bordered?: ResponsiveStyleValue<boolean>;\n /**\n * Content to display\n */\n children?: React.ReactNode;\n}\n\n/**\n * ValueItem component type\n */\nexport type ValueItemComponent = FunctionComponent<ValueItemProps>;\n\n/**\n * ValueItem element type\n */\nexport type ValueItemElement = ReactElement<ValueItemProps, ValueItemComponent>;\n\nexport const valueItemClasses = {\n root: \"RdsValueItem-root\",\n content: \"RdsValueItem-content\",\n};\n\nconst resolveBorderStyle = (\n bordered: ResponsiveStyleValue<boolean>,\n color: string,\n) => {\n const borderStyle = `solid ${color} 1px`;\n const noBorder = \"none\";\n\n if (!bordered) {\n return undefined;\n }\n\n if (Array.isArray(bordered)) {\n return bordered.map((b) => (b ? borderStyle : noBorder));\n }\n\n if (typeof bordered === \"object\") {\n const style: Record<string, string | undefined> = {};\n Object.entries(bordered).forEach(([key, value]) => {\n style[key] = value ? borderStyle : noBorder;\n });\n return style;\n }\n\n return borderStyle;\n};\n\n/**\n * `ValueItem` is a component to wrap your value components\n */\nconst ValueItem: ValueItemComponent = ({\n children,\n bordered = true,\n ...rest\n}: ValueItemProps) => {\n const defaultColor = useGetDefaultThemeColor({\n lightWeight: 200,\n darkWeight: 800,\n });\n const borderLeft = resolveBorderStyle(bordered, defaultColor);\n return (\n <Grid className={valueItemClasses.root} {...rest}>\n <Box className={valueItemClasses.content} px={1} borderLeft={borderLeft}>\n {children}\n </Box>\n </Grid>\n );\n};\n\nexport default ValueItem;\n"],"names":["valueItemClasses","resolveBorderStyle","bordered","color","borderStyle","noBorder","b","style","key","value","ValueItem","children","rest","defaultColor","useGetDefaultThemeColor","borderLeft","Grid","jsx","Box"],"mappings":";;;;AA8BO,MAAMA,IAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AACX,GAEMC,IAAqB,CACzBC,GACAC,MACG;AACH,QAAMC,IAAc,SAASD,CAAK,QAC5BE,IAAW;AAEjB,MAAKH,GAIL;AAAA,QAAI,MAAM,QAAQA,CAAQ;AACxB,aAAOA,EAAS,IAAI,CAACI,MAAOA,IAAIF,IAAcC,CAAS;AAGzD,QAAI,OAAOH,KAAa,UAAU;AAChC,YAAMK,IAA4C,CAAA;AAClD,oBAAO,QAAQL,CAAQ,EAAE,QAAQ,CAAC,CAACM,GAAKC,CAAK,MAAM;AACjD,QAAAF,EAAMC,CAAG,IAAIC,IAAQL,IAAcC;AAAA,MACrC,CAAC,GACME;AAAA,IACT;AAEA,WAAOH;AAAA;AACT,GAKMM,IAAgC,CAAC;AAAA,EACrC,UAAAC;AAAA,EACA,UAAAT,IAAW;AAAA,EACX,GAAGU;AACL,MAAsB;AACpB,QAAMC,IAAeC,EAAwB;AAAA,IAC3C,aAAa;AAAA,IACb,YAAY;AAAA,EAAA,CACb,GACKC,IAAad,EAAmBC,GAAUW,CAAY;AAC5D,2BACGG,GAAA,EAAK,WAAWhB,EAAiB,MAAO,GAAGY,GAC1C,UAAA,gBAAAK,EAACC,GAAA,EAAI,WAAWlB,EAAiB,SAAS,IAAI,GAAG,YAAAe,GAC9C,UAAAJ,GACH,GACF;AAEJ;"}
1
+ {"version":3,"file":"ValueItem.mjs","sources":["../../src/ValueItem/ValueItem.tsx"],"sourcesContent":["import Box from \"@mui/material/Box\";\nimport Grid, { type GridProps } from \"@mui/material/Grid\";\nimport type { ResponsiveStyleValue } from \"@mui/system\";\nimport type { FunctionComponent, ReactElement } from \"react\";\nimport { useGetDefaultThemeColor } from \"../utils\";\n\n/**\n * Props for the ValueItem component\n */\nexport interface ValueItemProps extends Omit<GridProps, \"item\" | \"container\"> {\n /**\n * Whether to display a border\n */\n bordered?: ResponsiveStyleValue<boolean>;\n /**\n * Content to display\n */\n children?: React.ReactNode;\n}\n\n/**\n * ValueItem component type\n */\nexport type ValueItemComponent = FunctionComponent<ValueItemProps>;\n\n/**\n * ValueItem element type\n */\nexport type ValueItemElement = ReactElement<ValueItemProps, ValueItemComponent>;\n\nexport const valueItemClasses = {\n root: \"RdsValueItem-root\",\n content: \"RdsValueItem-content\",\n};\n\nconst resolveBorderStyle = (\n bordered: ResponsiveStyleValue<boolean>,\n color: string,\n) => {\n const borderStyle = `solid ${color} 1px`;\n const noBorder = \"none\";\n\n if (!bordered) {\n return undefined;\n }\n\n if (Array.isArray(bordered)) {\n return bordered.map((b) => (b ? borderStyle : noBorder));\n }\n\n if (typeof bordered === \"object\") {\n const style: Record<string, string | undefined> = {};\n Object.entries(bordered).forEach(([key, value]) => {\n style[key] = value ? borderStyle : noBorder;\n });\n return style;\n }\n\n return borderStyle;\n};\n\n/**\n * `ValueItem` is a component to wrap your value components\n */\nconst ValueItem: ValueItemComponent = ({\n children,\n bordered = true,\n ...rest\n}: ValueItemProps) => {\n const defaultColor = useGetDefaultThemeColor({\n lightWeight: 200,\n darkWeight: 800,\n });\n const borderLeft = resolveBorderStyle(bordered, defaultColor);\n\n return (\n <Grid className={valueItemClasses.root} {...rest}>\n <Box className={valueItemClasses.content} px={1} borderLeft={borderLeft}>\n {children}\n </Box>\n </Grid>\n );\n};\n\nexport default ValueItem;\n"],"names":["valueItemClasses","resolveBorderStyle","bordered","color","borderStyle","noBorder","b","style","key","value","ValueItem","children","rest","defaultColor","useGetDefaultThemeColor","borderLeft","Grid","jsx","Box"],"mappings":";;;;AA8BO,MAAMA,IAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AACX,GAEMC,IAAqB,CACzBC,GACAC,MACG;AACH,QAAMC,IAAc,SAASD,CAAK,QAC5BE,IAAW;AAEjB,MAAKH,GAIL;AAAA,QAAI,MAAM,QAAQA,CAAQ;AACxB,aAAOA,EAAS,IAAI,CAACI,MAAOA,IAAIF,IAAcC,CAAS;AAGzD,QAAI,OAAOH,KAAa,UAAU;AAChC,YAAMK,IAA4C,CAAA;AAClD,oBAAO,QAAQL,CAAQ,EAAE,QAAQ,CAAC,CAACM,GAAKC,CAAK,MAAM;AACjD,QAAAF,EAAMC,CAAG,IAAIC,IAAQL,IAAcC;AAAA,MACrC,CAAC,GACME;AAAA,IACT;AAEA,WAAOH;AAAA;AACT,GAKMM,IAAgC,CAAC;AAAA,EACrC,UAAAC;AAAA,EACA,UAAAT,IAAW;AAAA,EACX,GAAGU;AACL,MAAsB;AACpB,QAAMC,IAAeC,EAAwB;AAAA,IAC3C,aAAa;AAAA,IACb,YAAY;AAAA,EAAA,CACb,GACKC,IAAad,EAAmBC,GAAUW,CAAY;AAE5D,2BACGG,GAAA,EAAK,WAAWhB,EAAiB,MAAO,GAAGY,GAC1C,UAAA,gBAAAK,EAACC,GAAA,EAAI,WAAWlB,EAAiB,SAAS,IAAI,GAAG,YAAAe,GAC9C,UAAAJ,GACH,GACF;AAEJ;"}
@@ -1,4 +1,4 @@
1
- import { LabelVariant } from '../Label';
1
+ import { BadgeVariant } from '../components/badge';
2
2
  import { BaseValueProps } from '../ValueBase';
3
3
  /**
4
4
  * Props for the ValueLabel component
@@ -9,14 +9,10 @@ export type ValueLabelProps = BaseValueProps<string | number | string[] | number
9
9
  /**
10
10
  * Label color variant or array of variants for multiple labels
11
11
  */
12
- variant?: LabelVariant | LabelVariant[];
13
- /**
14
- * Custom color or array of colors for multiple labels
15
- */
16
- color?: string | string[];
12
+ variant?: BadgeVariant | BadgeVariant[];
17
13
  };
18
14
  /**
19
15
  * Displays a label component value with a label
20
16
  */
21
- export declare function ValueLabel({ label, value: valueProp, placeholder, color, variant, }: ValueLabelProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ValueLabel({ label, value: valueProp, placeholder, variant, }: ValueLabelProps): import("react/jsx-runtime").JSX.Element;
22
18
  export default ValueLabel;
@@ -1,35 +1,32 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import f from "@mui/material/Grid";
3
- import { Label as o } from "../Label/Label.mjs";
4
- import { DefaultPlaceholder as l } from "../ValueBase/ValueDisplays.types.mjs";
5
- import { getValueContentLabelId as u, ValueContent as d } from "../ValueContent/ValueContent.mjs";
6
- function L({
7
- label: n,
8
- value: a,
9
- placeholder: m = l,
10
- color: r,
11
- variant: t
3
+ import { Badge as n } from "../components/badge/badge.mjs";
4
+ import { DefaultPlaceholder as u } from "../ValueBase/ValueDisplays.types.mjs";
5
+ import { getValueContentLabelId as s, ValueContent as y } from "../ValueContent/ValueContent.mjs";
6
+ function b({
7
+ label: o,
8
+ value: e,
9
+ placeholder: a = u,
10
+ variant: r
12
11
  }) {
13
- const y = u(n), A = Array.isArray(a) ? a.map((s, i) => /* @__PURE__ */ e(
14
- o,
12
+ const m = s(o), l = Array.isArray(e) ? e.map((d, i) => /* @__PURE__ */ t(
13
+ n,
15
14
  {
16
- text: s.toString() || m,
17
- variant: Array.isArray(t) ? t[i] : t,
18
- color: Array.isArray(r) ? r[i] : r
15
+ text: d.toString() || a,
16
+ variant: Array.isArray(r) ? r[i] : r
19
17
  },
20
18
  i
21
- )) : /* @__PURE__ */ e(
22
- o,
19
+ )) : /* @__PURE__ */ t(
20
+ n,
23
21
  {
24
- text: a?.toString() || m,
25
- variant: Array.isArray(t) ? t[0] : t,
26
- color: Array.isArray(r) ? r[0] : r
22
+ text: e?.toString() || a,
23
+ variant: Array.isArray(r) ? r[0] : r
27
24
  }
28
25
  );
29
- return /* @__PURE__ */ e(d, { label: n, children: /* @__PURE__ */ e(f, { container: !0, gap: 1, "aria-labelledby": y, children: A }) });
26
+ return /* @__PURE__ */ t(y, { label: o, children: /* @__PURE__ */ t(f, { container: !0, gap: 1, "aria-labelledby": m, children: l }) });
30
27
  }
31
28
  export {
32
- L as ValueLabel,
33
- L as default
29
+ b as ValueLabel,
30
+ b as default
34
31
  };
35
32
  //# sourceMappingURL=ValueLabel.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValueLabel.mjs","sources":["../../src/ValueLabel/ValueLabel.tsx"],"sourcesContent":["import Grid from \"@mui/material/Grid\";\nimport Label, { type LabelVariant } from \"../Label\";\nimport { type BaseValueProps, DefaultPlaceholder } from \"../ValueBase\";\nimport ValueContent, { getValueContentLabelId } from \"../ValueContent\";\n\n/**\n * Props for the ValueLabel component\n *\n * @extends BaseValueProps\n */\nexport type ValueLabelProps = BaseValueProps<\n string | number | string[] | number[]\n> & {\n /**\n * Label color variant or array of variants for multiple labels\n */\n variant?: LabelVariant | LabelVariant[];\n /**\n * Custom color or array of colors for multiple labels\n */\n color?: string | string[];\n};\n\n/**\n * Displays a label component value with a label\n */\nexport function ValueLabel({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n color,\n variant,\n}: ValueLabelProps) {\n const id = getValueContentLabelId(label);\n const value = Array.isArray(valueProp) ? (\n valueProp.map((value, i) => (\n <Label\n text={value.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[i] : variant}\n color={Array.isArray(color) ? color[i] : color}\n key={i}\n />\n ))\n ) : (\n <Label\n text={valueProp?.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[0] : variant}\n color={Array.isArray(color) ? color[0] : color}\n />\n );\n\n return (\n <ValueContent label={label}>\n <Grid container gap={1} aria-labelledby={id}>\n {value}\n </Grid>\n </ValueContent>\n );\n}\n\nexport default ValueLabel;\n"],"names":["ValueLabel","label","valueProp","placeholder","DefaultPlaceholder","color","variant","id","getValueContentLabelId","value","jsx","Label","ValueContent","Grid"],"mappings":";;;;;AA0BO,SAASA,EAAW;AAAA,EACzB,OAAAC;AAAA,EACA,OAAOC;AAAA,EACP,aAAAC,IAAcC;AAAA,EACd,OAAAC;AAAA,EACA,SAAAC;AACF,GAAoB;AAClB,QAAMC,IAAKC,EAAuBP,CAAK,GACjCQ,IAAQ,MAAM,QAAQP,CAAS,IACnCA,EAAU,IAAI,CAACO,GAAO,MACpB,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMF,EAAM,SAAA,KAAcN;AAAA,MAC1B,SAAS,MAAM,QAAQG,CAAO,IAAIA,EAAQ,CAAC,IAAIA;AAAA,MAC/C,OAAO,MAAM,QAAQD,CAAK,IAAIA,EAAM,CAAC,IAAIA;AAAA,IAAA;AAAA,IACpC;AAAA,EAAA,CAER,IAED,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMT,GAAW,SAAA,KAAcC;AAAA,MAC/B,SAAS,MAAM,QAAQG,CAAO,IAAIA,EAAQ,CAAC,IAAIA;AAAA,MAC/C,OAAO,MAAM,QAAQD,CAAK,IAAIA,EAAM,CAAC,IAAIA;AAAA,IAAA;AAAA,EAAA;AAI7C,SACE,gBAAAK,EAACE,GAAA,EAAa,OAAAX,GACZ,UAAA,gBAAAS,EAACG,GAAA,EAAK,WAAS,IAAC,KAAK,GAAG,mBAAiBN,GACtC,UAAAE,EAAA,CACH,GACF;AAEJ;"}
1
+ {"version":3,"file":"ValueLabel.mjs","sources":["../../src/ValueLabel/ValueLabel.tsx"],"sourcesContent":["import Grid from \"@mui/material/Grid\";\nimport Badge, { type BadgeVariant } from \"../components/badge\";\nimport { type BaseValueProps, DefaultPlaceholder } from \"../ValueBase\";\nimport ValueContent, { getValueContentLabelId } from \"../ValueContent\";\n\n/**\n * Props for the ValueLabel component\n *\n * @extends BaseValueProps\n */\nexport type ValueLabelProps = BaseValueProps<\n string | number | string[] | number[]\n> & {\n /**\n * Label color variant or array of variants for multiple labels\n */\n variant?: BadgeVariant | BadgeVariant[];\n};\n\n/**\n * Displays a label component value with a label\n */\nexport function ValueLabel({\n label,\n value: valueProp,\n placeholder = DefaultPlaceholder,\n variant,\n}: ValueLabelProps) {\n const id = getValueContentLabelId(label);\n const value = Array.isArray(valueProp) ? (\n valueProp.map((value, i) => (\n <Badge\n text={value.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[i] : variant}\n key={i}\n />\n ))\n ) : (\n <Badge\n text={valueProp?.toString() || placeholder}\n variant={Array.isArray(variant) ? variant[0] : variant}\n />\n );\n\n return (\n <ValueContent label={label}>\n <Grid container gap={1} aria-labelledby={id}>\n {value}\n </Grid>\n </ValueContent>\n );\n}\n\nexport default ValueLabel;\n"],"names":["ValueLabel","label","valueProp","placeholder","DefaultPlaceholder","variant","id","getValueContentLabelId","value","jsx","Badge","ValueContent","Grid"],"mappings":";;;;;AAsBO,SAASA,EAAW;AAAA,EACzB,OAAAC;AAAA,EACA,OAAOC;AAAA,EACP,aAAAC,IAAcC;AAAA,EACd,SAAAC;AACF,GAAoB;AAClB,QAAMC,IAAKC,EAAuBN,CAAK,GACjCO,IAAQ,MAAM,QAAQN,CAAS,IACnCA,EAAU,IAAI,CAACM,GAAO,MACpB,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMF,EAAM,SAAA,KAAcL;AAAA,MAC1B,SAAS,MAAM,QAAQE,CAAO,IAAIA,EAAQ,CAAC,IAAIA;AAAA,IAAA;AAAA,IAC1C;AAAA,EAAA,CAER,IAED,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMR,GAAW,SAAA,KAAcC;AAAA,MAC/B,SAAS,MAAM,QAAQE,CAAO,IAAIA,EAAQ,CAAC,IAAIA;AAAA,IAAA;AAAA,EAAA;AAInD,SACE,gBAAAI,EAACE,GAAA,EAAa,OAAAV,GACZ,UAAA,gBAAAQ,EAACG,GAAA,EAAK,WAAS,IAAC,KAAK,GAAG,mBAAiBN,GACtC,UAAAE,EAAA,CACH,GACF;AAEJ;"}
@@ -0,0 +1,21 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Badge as UiBadge } from '../ui/badge';
3
+ export type BadgeVariant = "primary" | "secondary" | "default" | "info" | "warning" | "error" | "success";
4
+ /**
5
+ * Props for the Badge component
6
+ */
7
+ export interface BadgeProps extends Omit<ComponentProps<typeof UiBadge>, "children" | "variant"> {
8
+ /**
9
+ * Content of the component
10
+ */
11
+ text: string;
12
+ /**
13
+ * Color palette used to draw the component
14
+ */
15
+ variant?: BadgeVariant;
16
+ }
17
+ /**
18
+ * Compact badge wrapper for consumer-facing API
19
+ */
20
+ export declare function Badge({ text, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
21
+ export default Badge;
@@ -0,0 +1,19 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Badge as n } from "../ui/badge.mjs";
3
+ const o = {
4
+ default: "default",
5
+ primary: "default",
6
+ secondary: "secondary",
7
+ info: "outline",
8
+ warning: "outline",
9
+ error: "destructive",
10
+ success: "secondary"
11
+ };
12
+ function s({ text: a, variant: e = "default", ...r }) {
13
+ return /* @__PURE__ */ t(n, { variant: o[e], ...r, children: a });
14
+ }
15
+ export {
16
+ s as Badge,
17
+ s as default
18
+ };
19
+ //# sourceMappingURL=badge.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.mjs","sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { Badge as UiBadge } from \"@/components/ui/badge\";\n\nexport type BadgeVariant =\n | \"primary\"\n | \"secondary\"\n | \"default\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nconst variantMap: Record<\n BadgeVariant,\n ComponentProps<typeof UiBadge>[\"variant\"]\n> = {\n default: \"default\",\n primary: \"default\",\n secondary: \"secondary\",\n info: \"outline\",\n warning: \"outline\",\n error: \"destructive\",\n success: \"secondary\",\n};\n\n/**\n * Props for the Badge component\n */\nexport interface BadgeProps\n extends Omit<ComponentProps<typeof UiBadge>, \"children\" | \"variant\"> {\n /**\n * Content of the component\n */\n text: string;\n /**\n * Color palette used to draw the component\n */\n variant?: BadgeVariant;\n}\n\n/**\n * Compact badge wrapper for consumer-facing API\n */\nexport function Badge({ text, variant = \"default\", ...props }: BadgeProps) {\n return (\n <UiBadge variant={variantMap[variant]} {...props}>\n {text}\n </UiBadge>\n );\n}\n\nexport default Badge;\n"],"names":["variantMap","Badge","text","variant","props","jsx","UiBadge"],"mappings":";;AAYA,MAAMA,IAGF;AAAA,EACF,SAAS;AAAA,EACT,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAoBO,SAASC,EAAM,EAAE,MAAAC,GAAM,SAAAC,IAAU,WAAW,GAAGC,KAAqB;AACzE,SACE,gBAAAC,EAACC,KAAQ,SAASN,EAAWG,CAAO,GAAI,GAAGC,GACxC,UAAAF,GACH;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ export type { BadgeProps, BadgeVariant } from './badge';
2
+ export { default, default as Badge } from './badge';
@@ -1,4 +1,3 @@
1
- import { SxProps, Theme } from '@mui/material/styles';
2
1
  export type BulletVariant = "primary" | "secondary" | "default" | "info" | "warning" | "error";
3
2
  export declare const bulletClasses: {
4
3
  root: string;
@@ -12,12 +11,12 @@ export interface BulletProps {
12
11
  */
13
12
  variant?: BulletVariant;
14
13
  /**
15
- * Custom styles
14
+ * Additional CSS classes for custom styling
16
15
  */
17
- sx?: SxProps<Theme>;
16
+ className?: string;
18
17
  }
19
18
  /**
20
19
  * Dot to attract the user attention
21
20
  */
22
- export declare function Bullet({ variant, sx }: BulletProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function Bullet({ variant, className }: BulletProps): import("react/jsx-runtime").JSX.Element;
23
22
  export default Bullet;
@@ -0,0 +1,44 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { cva as t } from "../../node_modules/class-variance-authority/dist/index.mjs";
3
+ import { Badge as o } from "../ui/badge.mjs";
4
+ import { cn as i } from "../../lib/utils.mjs";
5
+ const l = {
6
+ root: "RdsBullet-root"
7
+ }, n = t("bg-primary", {
8
+ variants: {
9
+ variant: {
10
+ primary: "bg-blue-500",
11
+ secondary: "bg-violet-500",
12
+ default: "bg-zinc-400",
13
+ info: "bg-sky-500",
14
+ warning: "bg-amber-500",
15
+ error: "bg-red-500"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ variant: "primary"
20
+ }
21
+ });
22
+ function d({ variant: r = "primary", className: a }) {
23
+ return /* @__PURE__ */ e(
24
+ o,
25
+ {
26
+ variant: "outline",
27
+ className: i(
28
+ l.root,
29
+ "inline-flex size-2.5 min-w-0 rounded-full border-0 p-0",
30
+ n({ variant: r }),
31
+ a
32
+ ),
33
+ role: "status",
34
+ "aria-label": `${r} bullet`,
35
+ "aria-describedby": r
36
+ }
37
+ );
38
+ }
39
+ export {
40
+ d as Bullet,
41
+ l as bulletClasses,
42
+ d as default
43
+ };
44
+ //# sourceMappingURL=bullet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bullet.mjs","sources":["../../../src/components/bullet/bullet.tsx"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { cn } from \"@/lib/utils\";\n\nexport type BulletVariant =\n | \"primary\"\n | \"secondary\"\n | \"default\"\n | \"info\"\n | \"warning\"\n | \"error\";\n\nexport const bulletClasses = {\n root: \"RdsBullet-root\",\n};\n\nconst bulletVariants = cva(\"bg-primary\", {\n variants: {\n variant: {\n primary: \"bg-blue-500\",\n secondary: \"bg-violet-500\",\n default: \"bg-zinc-400\",\n info: \"bg-sky-500\",\n warning: \"bg-amber-500\",\n error: \"bg-red-500\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n },\n});\n\n/**\n * Props for the Bullet component\n */\nexport interface BulletProps {\n /**\n * Color palette used to draw the component\n */\n variant?: BulletVariant;\n /**\n * Additional CSS classes for custom styling\n */\n className?: string;\n}\n\n/**\n * Dot to attract the user attention\n */\nexport function Bullet({ variant = \"primary\", className }: BulletProps) {\n return (\n <Badge\n variant=\"outline\"\n className={cn(\n bulletClasses.root,\n \"inline-flex size-2.5 min-w-0 rounded-full border-0 p-0\",\n bulletVariants({ variant }),\n className,\n )}\n role=\"status\"\n aria-label={`${variant} bullet`}\n aria-describedby={variant}\n />\n );\n}\n\nexport default Bullet;\n"],"names":["bulletClasses","bulletVariants","cva","Bullet","variant","className","jsx","Badge","cn"],"mappings":";;;;AAYO,MAAMA,IAAgB;AAAA,EAC3B,MAAM;AACR,GAEMC,IAAiBC,EAAI,cAAc;AAAA,EACvC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAmBM,SAASC,EAAO,EAAE,SAAAC,IAAU,WAAW,WAAAC,KAA0B;AACtE,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAWC;AAAA,QACTR,EAAc;AAAA,QACd;AAAA,QACAC,EAAe,EAAE,SAAAG,GAAS;AAAA,QAC1BC;AAAA,MAAA;AAAA,MAEF,MAAK;AAAA,MACL,cAAY,GAAGD,CAAO;AAAA,MACtB,oBAAkBA;AAAA,IAAA;AAAA,EAAA;AAGxB;"}
@@ -0,0 +1,2 @@
1
+ export * from './bullet';
2
+ export { default, default as Bullet } from './bullet';
@@ -0,0 +1,18 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Button as UiButton } from '../ui/button';
3
+ export type ButtonVariant = "primary" | "secondary" | "default" | "info" | "warning" | "error" | "success" | "outline" | "ghost" | "destructive" | "link";
4
+ /**
5
+ * Props for the Button component
6
+ */
7
+ export interface ButtonProps extends Omit<ComponentProps<typeof UiButton>, "variant"> {
8
+ /**
9
+ * Color palette used to draw the component
10
+ * @default "default"
11
+ */
12
+ variant?: ButtonVariant;
13
+ }
14
+ /**
15
+ * Consumer-facing button wrapper for public package API
16
+ */
17
+ export declare function Button({ variant, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
18
+ export default Button;
@@ -0,0 +1,23 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Button as o } from "../ui/button.mjs";
3
+ const r = {
4
+ default: "default",
5
+ primary: "default",
6
+ secondary: "secondary",
7
+ info: "outline",
8
+ warning: "outline",
9
+ error: "destructive",
10
+ success: "secondary",
11
+ outline: "outline",
12
+ ghost: "ghost",
13
+ destructive: "destructive",
14
+ link: "link"
15
+ };
16
+ function i({ variant: t = "default", ...e }) {
17
+ return /* @__PURE__ */ n(o, { variant: r[t], ...e });
18
+ }
19
+ export {
20
+ i as Button,
21
+ i as default
22
+ };
23
+ //# sourceMappingURL=button.mjs.map