@tecsinapse/cortex-react 1.9.4 → 1.9.6

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.
@@ -7,7 +7,8 @@ const Drawer = ({
7
7
  children,
8
8
  onClose,
9
9
  open,
10
- position = "right"
10
+ position = "right",
11
+ className
11
12
  }) => {
12
13
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
13
14
  "div",
@@ -22,7 +23,8 @@ const Drawer = ({
22
23
  "data-testid": "drawer",
23
24
  className: cortexCore.drawer({
24
25
  position,
25
- open
26
+ open,
27
+ className
26
28
  })
27
29
  },
28
30
  children
@@ -15,29 +15,37 @@ const GroupButton = (props) => {
15
15
  renderOption,
16
16
  onChange,
17
17
  customStyles,
18
- disableAllOptions
18
+ disableAllOptions,
19
+ className
19
20
  } = props;
20
- return /* @__PURE__ */ React.createElement("div", { className: container(), "data-testid": "group-button-container" }, options.map((option) => {
21
- const key = renderKey?.(option.value);
22
- const isActive = key === renderKey?.(value);
23
- return /* @__PURE__ */ React.createElement(
24
- "button",
25
- {
26
- disabled: disableAllOptions,
27
- value: String(value),
28
- onClick: () => onChange(option.value),
29
- className: clsx(
30
- button(),
31
- firstButton({ className: customStyles?.firstButton }),
32
- lastButton({ className: customStyles?.lastButton }),
33
- !isActive && inactive({ className: customStyles?.inactive }),
34
- isActive && active({ className: customStyles?.active })
35
- ),
36
- key
37
- },
38
- renderOption(option.value)
39
- );
40
- }));
21
+ return /* @__PURE__ */ React.createElement(
22
+ "div",
23
+ {
24
+ className: container({ className }),
25
+ "data-testid": "group-button-container"
26
+ },
27
+ options.map((option) => {
28
+ const key = renderKey?.(option.value);
29
+ const isActive = key === renderKey?.(value);
30
+ return /* @__PURE__ */ React.createElement(
31
+ "button",
32
+ {
33
+ disabled: disableAllOptions,
34
+ value: String(value),
35
+ onClick: () => onChange(option.value),
36
+ className: clsx(
37
+ button(),
38
+ firstButton({ className: customStyles?.firstButton }),
39
+ lastButton({ className: customStyles?.lastButton }),
40
+ !isActive && inactive({ className: customStyles?.inactive }),
41
+ isActive && active({ className: customStyles?.active })
42
+ ),
43
+ key
44
+ },
45
+ renderOption(option.value)
46
+ );
47
+ })
48
+ );
41
49
  };
42
50
 
43
51
  exports.GroupButton = GroupButton;
@@ -4,7 +4,7 @@ var tailwindVariants = require('tailwind-variants');
4
4
 
5
5
  const menubar = tailwindVariants.tv({
6
6
  slots: {
7
- header: "relative w-screen px-kilo py-deca flex flex-row md:justify-between bg-white z-sidebar sm:justify-start",
7
+ header: "relative w-screen px-kilo py-deca flex flex-row md:justify-between bg-white z-header sm:justify-start",
8
8
  left: "flex items-center w-fit",
9
9
  right: "flex items-center gap-x-deca hidden sm:flex",
10
10
  dropdown: "w-full bg-white flex-1 shadow-default z-popover px-[8vw] absolute"
@@ -5,7 +5,8 @@ const Drawer = ({
5
5
  children,
6
6
  onClose,
7
7
  open,
8
- position = "right"
8
+ position = "right",
9
+ className
9
10
  }) => {
10
11
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
11
12
  "div",
@@ -20,7 +21,8 @@ const Drawer = ({
20
21
  "data-testid": "drawer",
21
22
  className: drawer({
22
23
  position,
23
- open
24
+ open,
25
+ className
24
26
  })
25
27
  },
26
28
  children
@@ -13,29 +13,37 @@ const GroupButton = (props) => {
13
13
  renderOption,
14
14
  onChange,
15
15
  customStyles,
16
- disableAllOptions
16
+ disableAllOptions,
17
+ className
17
18
  } = props;
18
- return /* @__PURE__ */ React__default.createElement("div", { className: container(), "data-testid": "group-button-container" }, options.map((option) => {
19
- const key = renderKey?.(option.value);
20
- const isActive = key === renderKey?.(value);
21
- return /* @__PURE__ */ React__default.createElement(
22
- "button",
23
- {
24
- disabled: disableAllOptions,
25
- value: String(value),
26
- onClick: () => onChange(option.value),
27
- className: clsx(
28
- button(),
29
- firstButton({ className: customStyles?.firstButton }),
30
- lastButton({ className: customStyles?.lastButton }),
31
- !isActive && inactive({ className: customStyles?.inactive }),
32
- isActive && active({ className: customStyles?.active })
33
- ),
34
- key
35
- },
36
- renderOption(option.value)
37
- );
38
- }));
19
+ return /* @__PURE__ */ React__default.createElement(
20
+ "div",
21
+ {
22
+ className: container({ className }),
23
+ "data-testid": "group-button-container"
24
+ },
25
+ options.map((option) => {
26
+ const key = renderKey?.(option.value);
27
+ const isActive = key === renderKey?.(value);
28
+ return /* @__PURE__ */ React__default.createElement(
29
+ "button",
30
+ {
31
+ disabled: disableAllOptions,
32
+ value: String(value),
33
+ onClick: () => onChange(option.value),
34
+ className: clsx(
35
+ button(),
36
+ firstButton({ className: customStyles?.firstButton }),
37
+ lastButton({ className: customStyles?.lastButton }),
38
+ !isActive && inactive({ className: customStyles?.inactive }),
39
+ isActive && active({ className: customStyles?.active })
40
+ ),
41
+ key
42
+ },
43
+ renderOption(option.value)
44
+ );
45
+ })
46
+ );
39
47
  };
40
48
 
41
49
  export { GroupButton };
@@ -2,7 +2,7 @@ import { tv } from 'tailwind-variants';
2
2
 
3
3
  const menubar = tv({
4
4
  slots: {
5
- header: "relative w-screen px-kilo py-deca flex flex-row md:justify-between bg-white z-sidebar sm:justify-start",
5
+ header: "relative w-screen px-kilo py-deca flex flex-row md:justify-between bg-white z-header sm:justify-start",
6
6
  left: "flex items-center w-fit",
7
7
  right: "flex items-center gap-x-deca hidden sm:flex",
8
8
  dropdown: "w-full bg-white flex-1 shadow-default z-popover px-[8vw] absolute"
@@ -4,5 +4,6 @@ export interface DrawerProps {
4
4
  onClose: () => void;
5
5
  position?: 'left' | 'right';
6
6
  children?: React.ReactNode;
7
+ className?: string;
7
8
  }
8
- export declare const Drawer: ({ children, onClose, open, position, }: DrawerProps) => JSX.Element;
9
+ export declare const Drawer: ({ children, onClose, open, position, className, }: DrawerProps) => JSX.Element;
@@ -15,5 +15,6 @@ export interface GroupButtonProps<T> {
15
15
  inactive?: string;
16
16
  };
17
17
  disableAllOptions?: boolean;
18
+ className?: string;
18
19
  }
19
20
  export declare const GroupButton: <T>(props: GroupButtonProps<T>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/cortex-react",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "React components based in @tecsinapse/cortex-core",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@floating-ui/react": "^0.26.18",
22
22
  "@internationalized/date": "*",
23
- "@tecsinapse/cortex-core": "0.4.3",
23
+ "@tecsinapse/cortex-core": "0.4.4",
24
24
  "clsx": "*",
25
25
  "currency.js": "~2.0.4",
26
26
  "react-aria": "^3.33.1",
@@ -48,5 +48,5 @@
48
48
  "react-dom": ">=18.0.0",
49
49
  "tailwind": ">=3.3.0"
50
50
  },
51
- "gitHead": "38e77d1e02141b6ada9add7199a4e2dae99d2ed3"
51
+ "gitHead": "40d92dcbe6978ebd9d475b791f92b95dccda014b"
52
52
  }