mayak-common-library 0.0.87 → 0.0.89

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.d.mts CHANGED
@@ -53,6 +53,7 @@ interface SelectProProps {
53
53
  small?: boolean;
54
54
  fullWidth?: boolean;
55
55
  freeChildWidth?: boolean;
56
+ disableCloseButton?: boolean;
56
57
  openUp?: boolean;
57
58
  intermediateChild?: ReactElement;
58
59
  accentBgColor?: true;
package/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ interface SelectProProps {
53
53
  small?: boolean;
54
54
  fullWidth?: boolean;
55
55
  freeChildWidth?: boolean;
56
+ disableCloseButton?: boolean;
56
57
  openUp?: boolean;
57
58
  intermediateChild?: ReactElement;
58
59
  accentBgColor?: true;
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
  {
@@ -305,6 +332,7 @@ var SelectPro = ({
305
332
  small = false,
306
333
  fullWidth = false,
307
334
  freeChildWidth = false,
335
+ disableCloseButton = false,
308
336
  openUp,
309
337
  intermediateChild,
310
338
  accentBgColor,
@@ -400,7 +428,7 @@ var SelectPro = ({
400
428
  className: `flex flex-col py-3 px-4 gap-2 shadow-sm`,
401
429
  sx: childContainerSx,
402
430
  children: [
403
- overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
431
+ !disableCloseButton && overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
404
432
  IconButton_default,
405
433
  {
406
434
  className: "bg-accent-silver p-1 self-end absolute",
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
  {
@@ -246,6 +273,7 @@ var SelectPro = ({
246
273
  small = false,
247
274
  fullWidth = false,
248
275
  freeChildWidth = false,
276
+ disableCloseButton = false,
249
277
  openUp,
250
278
  intermediateChild,
251
279
  accentBgColor,
@@ -341,7 +369,7 @@ var SelectPro = ({
341
369
  className: `flex flex-col py-3 px-4 gap-2 shadow-sm`,
342
370
  sx: childContainerSx,
343
371
  children: [
344
- overButton ? /* @__PURE__ */ jsx7(
372
+ !disableCloseButton && overButton ? /* @__PURE__ */ jsx7(
345
373
  IconButton_default,
346
374
  {
347
375
  className: "bg-accent-silver p-1 self-end absolute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
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",