mayak-common-library 0.0.86 → 0.0.88

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.js CHANGED
@@ -114,6 +114,7 @@ function Greet(props) {
114
114
  var import_Button = __toESM(require("@mui/material/Button"));
115
115
  var import_material = require("@mui/material");
116
116
  var import_Typography = __toESM(require("@mui/material/Typography"));
117
+ var import_classnames = __toESM(require("classnames"));
117
118
  var import_jsx_runtime2 = require("react/jsx-runtime");
118
119
  var StyledButton = (0, import_material.styled)(import_Button.default)(() => ({
119
120
  textTransform: "none",
@@ -133,16 +134,42 @@ var StyledButton = (0, import_material.styled)(import_Button.default)(() => ({
133
134
  }
134
135
  }));
135
136
  var Button = (props) => {
136
- const _a = props, { children, base, color, bolt, border, medium, small, large } = _a, rest = __objRest(_a, ["children", "base", "color", "bolt", "border", "medium", "small", "large"]);
137
+ const _a = props, {
138
+ children,
139
+ base,
140
+ color,
141
+ bolt,
142
+ border,
143
+ medium,
144
+ small,
145
+ large,
146
+ className
147
+ } = _a, rest = __objRest(_a, [
148
+ "children",
149
+ "base",
150
+ "color",
151
+ "bolt",
152
+ "border",
153
+ "medium",
154
+ "small",
155
+ "large",
156
+ "className"
157
+ ]);
158
+ const buttonClassName = (0, import_classnames.default)(
159
+ {
160
+ "bg-accent-dark text-accent-white flex gap-[10px] items-center rounded-none w-fit p-3 px-7.5 normal-case min-w-[145px] hover:bg-accent-beige hover:text-accent-white shadow-none": base,
161
+ "py-1.5 px-4": small,
162
+ "py-3.5 px-4": medium,
163
+ "h-[38px] py-3.5 px-10": large,
164
+ "text-accent-silver-3 border-b border-solid rounded-none border-accent-silver-3 hover:text-accent-black hover:border-b-2 hover:border-accent-black": border
165
+ },
166
+ className
167
+ );
137
168
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
138
169
  StyledButton,
139
170
  __spreadProps(__spreadValues({}, rest), {
140
171
  disableRipple: true,
141
- className: `${base ? "bg-accent-dark text-accent-white flex gap-[10px] items-center rounded-none w-fit p-3 px-7.5 normal-case min-w-[145px] hover:bg-accent-beige hover:text-accent-white shadow-none" : ""}
142
- ${small ? "py-1.5 px-4" : ""}
143
- ${medium ? "py-3.5 px-4" : ""}
144
- ${large ? "h-[38px] py-3.5 px-10" : ""}
145
- ${border ? "text-accent-silver-3 border-b border-solid rounded-none border-accent-silver-3 hover:text-accent-black hover:border-b-2 hover:border-accent-black" : ""}`,
172
+ className: buttonClassName,
146
173
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
147
174
  import_Typography.default,
148
175
  {
@@ -391,7 +418,7 @@ var SelectPro = ({
391
418
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
392
419
  }
393
420
  }, paperSx),
394
- className: `absolute select ${open ? `${reverseAnimation ? "select--open-reverse" : "select--open-reverse"}` : `${reverseAnimation ? "select--close-reverse" : "select--close-reverse"}`} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
421
+ className: `absolute select ${open ? `${reverseAnimation ? "select--open-reverse" : "select--open"}` : `${reverseAnimation ? "select--close-reverse" : "select--close"}`} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
395
422
  children: [
396
423
  intermediateChild ? intermediateChild : null,
397
424
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
package/dist/index.mjs CHANGED
@@ -44,6 +44,7 @@ function Greet(props) {
44
44
  import ButtonMUI from "@mui/material/Button";
45
45
  import { styled } from "@mui/material";
46
46
  import Typography from "@mui/material/Typography";
47
+ import classNames from "classnames";
47
48
  import { jsx } from "react/jsx-runtime";
48
49
  var StyledButton = styled(ButtonMUI)(() => ({
49
50
  textTransform: "none",
@@ -63,16 +64,42 @@ var StyledButton = styled(ButtonMUI)(() => ({
63
64
  }
64
65
  }));
65
66
  var Button = (props) => {
66
- const _a = props, { children, base, color, bolt, border, medium, small, large } = _a, rest = __objRest(_a, ["children", "base", "color", "bolt", "border", "medium", "small", "large"]);
67
+ const _a = props, {
68
+ children,
69
+ base,
70
+ color,
71
+ bolt,
72
+ border,
73
+ medium,
74
+ small,
75
+ large,
76
+ className
77
+ } = _a, rest = __objRest(_a, [
78
+ "children",
79
+ "base",
80
+ "color",
81
+ "bolt",
82
+ "border",
83
+ "medium",
84
+ "small",
85
+ "large",
86
+ "className"
87
+ ]);
88
+ const buttonClassName = classNames(
89
+ {
90
+ "bg-accent-dark text-accent-white flex gap-[10px] items-center rounded-none w-fit p-3 px-7.5 normal-case min-w-[145px] hover:bg-accent-beige hover:text-accent-white shadow-none": base,
91
+ "py-1.5 px-4": small,
92
+ "py-3.5 px-4": medium,
93
+ "h-[38px] py-3.5 px-10": large,
94
+ "text-accent-silver-3 border-b border-solid rounded-none border-accent-silver-3 hover:text-accent-black hover:border-b-2 hover:border-accent-black": border
95
+ },
96
+ className
97
+ );
67
98
  return /* @__PURE__ */ jsx(
68
99
  StyledButton,
69
100
  __spreadProps(__spreadValues({}, rest), {
70
101
  disableRipple: true,
71
- className: `${base ? "bg-accent-dark text-accent-white flex gap-[10px] items-center rounded-none w-fit p-3 px-7.5 normal-case min-w-[145px] hover:bg-accent-beige hover:text-accent-white shadow-none" : ""}
72
- ${small ? "py-1.5 px-4" : ""}
73
- ${medium ? "py-3.5 px-4" : ""}
74
- ${large ? "h-[38px] py-3.5 px-10" : ""}
75
- ${border ? "text-accent-silver-3 border-b border-solid rounded-none border-accent-silver-3 hover:text-accent-black hover:border-b-2 hover:border-accent-black" : ""}`,
102
+ className: buttonClassName,
76
103
  children: /* @__PURE__ */ jsx(
77
104
  Typography,
78
105
  {
@@ -332,7 +359,7 @@ var SelectPro = ({
332
359
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
333
360
  }
334
361
  }, paperSx),
335
- className: `absolute select ${open ? `${reverseAnimation ? "select--open-reverse" : "select--open-reverse"}` : `${reverseAnimation ? "select--close-reverse" : "select--close-reverse"}`} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
362
+ className: `absolute select ${open ? `${reverseAnimation ? "select--open-reverse" : "select--open"}` : `${reverseAnimation ? "select--close-reverse" : "select--close"}`} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
336
363
  children: [
337
364
  intermediateChild ? intermediateChild : null,
338
365
  /* @__PURE__ */ jsxs3(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,6 +17,7 @@
17
17
  "@emotion/react": "^11.13.3",
18
18
  "@emotion/styled": "^11.13.0",
19
19
  "@mui/material": "^6.1.1",
20
+ "classnames": "^2.5.1",
20
21
  "date-fns": "^3.6.0",
21
22
  "next": "14.2.4",
22
23
  "react": "^18",