mayak-common-library 0.0.50 → 0.0.52

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
@@ -327,96 +327,85 @@ var SelectPro = ({
327
327
  const childrenWithHandleChange = (0, import_react2.isValidElement)(children) ? (0, import_react2.cloneElement)(children, {
328
328
  collapseParent: handleClose
329
329
  }) : children;
330
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
331
- import_material4.ClickAwayListener,
332
- {
333
- onClickAway: isOpen ? () => {
334
- return;
335
- } : handleClose,
336
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { width: fullWidth ? "100%" : "inherit", children: [
337
- clickComponent ? (0, import_react2.cloneElement)(clickComponent, {
338
- ref: btn,
339
- onClick: isOpen ? () => {
340
- return;
341
- } : handleClick,
342
- collapse: open
343
- }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
344
- import_material4.Button,
345
- {
346
- ref: btn,
347
- "aria-controls": open ? "basic-menu" : void 0,
348
- "aria-haspopup": "true",
349
- "aria-expanded": open ? "true" : void 0,
350
- onClick: isOpen ? () => {
351
- return;
352
- } : handleClick,
353
- disableRipple: true,
354
- fullWidth: true,
355
- sx: {
356
- height: small ? "34px" : "38px",
357
- padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
358
- },
359
- className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
360
- children: [
361
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
362
- import_material4.Typography,
363
- {
364
- width: "200px",
365
- className: "text-sm leading-4 truncate text-left",
366
- children: placeholder
367
- }
368
- ),
369
- colorBorder ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(search_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
370
- dropdown_arrow_default,
371
- {
372
- style: {
373
- transform: open ? "scaleY(-1)" : "scaleY(1)",
374
- transition: "0.3s ease-in-out"
375
- }
376
- }
377
- )
378
- ]
379
- }
380
- ),
381
- btn ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
382
- import_material4.Paper,
383
- {
384
- sx: {
385
- position: "absolute",
386
- width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
387
- left: fullContainerWidth ? 0 : "initial",
388
- right: fullContainerWidth ? 0 : "initial",
389
- top: overButton ? 0 : "initial"
390
- },
391
- className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
392
- children: [
393
- intermediateChild ? intermediateChild : null,
394
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
395
- overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
396
- IconButton_default,
397
- {
398
- className: "bg-accent-silver p-1 self-end absolute",
399
- onClick: isOpen ? () => {
400
- return;
401
- } : handleClose,
402
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
403
- }
404
- ) : null,
405
- childTitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
406
- import_material4.Typography,
407
- {
408
- className: "text-sm font-normal text-accent-silver-2",
409
- children: childTitle
410
- }
411
- ) : null,
412
- childrenWithHandleChange
413
- ] })
414
- ]
415
- }
416
- ) : null
417
- ] })
418
- }
419
- );
330
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material4.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { width: fullWidth ? "100%" : "inherit", children: [
331
+ clickComponent ? (0, import_react2.cloneElement)(clickComponent, {
332
+ ref: btn,
333
+ onClick: handleClick,
334
+ onClose: handleClose,
335
+ collapse: open
336
+ }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
337
+ import_material4.Button,
338
+ {
339
+ ref: btn,
340
+ "aria-controls": open ? "basic-menu" : void 0,
341
+ "aria-haspopup": "true",
342
+ "aria-expanded": open ? "true" : void 0,
343
+ onClick: handleClick,
344
+ disableRipple: true,
345
+ fullWidth: true,
346
+ sx: {
347
+ height: small ? "34px" : "38px",
348
+ padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
349
+ },
350
+ className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
351
+ children: [
352
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
353
+ import_material4.Typography,
354
+ {
355
+ width: "200px",
356
+ className: "text-sm leading-4 truncate text-left",
357
+ children: placeholder
358
+ }
359
+ ),
360
+ colorBorder ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(search_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
361
+ dropdown_arrow_default,
362
+ {
363
+ style: {
364
+ transform: open ? "scaleY(-1)" : "scaleY(1)",
365
+ transition: "0.3s ease-in-out"
366
+ }
367
+ }
368
+ )
369
+ ]
370
+ }
371
+ ),
372
+ btn ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
373
+ import_material4.Paper,
374
+ {
375
+ sx: {
376
+ position: "absolute",
377
+ width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
378
+ left: fullContainerWidth ? 0 : "initial",
379
+ right: fullContainerWidth ? 0 : "initial",
380
+ top: overButton ? 0 : "initial"
381
+ },
382
+ className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
383
+ children: [
384
+ intermediateChild ? intermediateChild : null,
385
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
386
+ overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
387
+ IconButton_default,
388
+ {
389
+ className: "bg-accent-silver p-1 self-end absolute",
390
+ onClick: isOpen ? () => {
391
+ return;
392
+ } : handleClose,
393
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
394
+ }
395
+ ) : null,
396
+ childTitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
397
+ import_material4.Typography,
398
+ {
399
+ className: "text-sm font-normal text-accent-silver-2",
400
+ children: childTitle
401
+ }
402
+ ) : null,
403
+ childrenWithHandleChange
404
+ ] })
405
+ ]
406
+ }
407
+ ) : null
408
+ ] }) });
420
409
  };
421
410
  var SelectPro_default = SelectPro;
422
411
 
package/dist/index.mjs CHANGED
@@ -267,96 +267,85 @@ var SelectPro = ({
267
267
  const childrenWithHandleChange = isValidElement(children) ? cloneElement(children, {
268
268
  collapseParent: handleClose
269
269
  }) : children;
270
- return /* @__PURE__ */ jsx7(
271
- ClickAwayListener,
272
- {
273
- onClickAway: isOpen ? () => {
274
- return;
275
- } : handleClose,
276
- children: /* @__PURE__ */ jsxs3(Box, { width: fullWidth ? "100%" : "inherit", children: [
277
- clickComponent ? cloneElement(clickComponent, {
278
- ref: btn,
279
- onClick: isOpen ? () => {
280
- return;
281
- } : handleClick,
282
- collapse: open
283
- }) : /* @__PURE__ */ jsxs3(
284
- Button2,
285
- {
286
- ref: btn,
287
- "aria-controls": open ? "basic-menu" : void 0,
288
- "aria-haspopup": "true",
289
- "aria-expanded": open ? "true" : void 0,
290
- onClick: isOpen ? () => {
291
- return;
292
- } : handleClick,
293
- disableRipple: true,
294
- fullWidth: true,
295
- sx: {
296
- height: small ? "34px" : "38px",
297
- padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
298
- },
299
- className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
300
- children: [
301
- /* @__PURE__ */ jsx7(
302
- Typography2,
303
- {
304
- width: "200px",
305
- className: "text-sm leading-4 truncate text-left",
306
- children: placeholder
307
- }
308
- ),
309
- colorBorder ? /* @__PURE__ */ jsx7(search_default, {}) : /* @__PURE__ */ jsx7(
310
- dropdown_arrow_default,
311
- {
312
- style: {
313
- transform: open ? "scaleY(-1)" : "scaleY(1)",
314
- transition: "0.3s ease-in-out"
315
- }
316
- }
317
- )
318
- ]
319
- }
320
- ),
321
- btn ? /* @__PURE__ */ jsxs3(
322
- Paper,
323
- {
324
- sx: {
325
- position: "absolute",
326
- width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
327
- left: fullContainerWidth ? 0 : "initial",
328
- right: fullContainerWidth ? 0 : "initial",
329
- top: overButton ? 0 : "initial"
330
- },
331
- className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
332
- children: [
333
- intermediateChild ? intermediateChild : null,
334
- /* @__PURE__ */ jsxs3(Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
335
- overButton ? /* @__PURE__ */ jsx7(
336
- IconButton_default,
337
- {
338
- className: "bg-accent-silver p-1 self-end absolute",
339
- onClick: isOpen ? () => {
340
- return;
341
- } : handleClose,
342
- children: /* @__PURE__ */ jsx7(close_default, {})
343
- }
344
- ) : null,
345
- childTitle ? /* @__PURE__ */ jsx7(
346
- Typography2,
347
- {
348
- className: "text-sm font-normal text-accent-silver-2",
349
- children: childTitle
350
- }
351
- ) : null,
352
- childrenWithHandleChange
353
- ] })
354
- ]
355
- }
356
- ) : null
357
- ] })
358
- }
359
- );
270
+ return /* @__PURE__ */ jsx7(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxs3(Box, { width: fullWidth ? "100%" : "inherit", children: [
271
+ clickComponent ? cloneElement(clickComponent, {
272
+ ref: btn,
273
+ onClick: handleClick,
274
+ onClose: handleClose,
275
+ collapse: open
276
+ }) : /* @__PURE__ */ jsxs3(
277
+ Button2,
278
+ {
279
+ ref: btn,
280
+ "aria-controls": open ? "basic-menu" : void 0,
281
+ "aria-haspopup": "true",
282
+ "aria-expanded": open ? "true" : void 0,
283
+ onClick: handleClick,
284
+ disableRipple: true,
285
+ fullWidth: true,
286
+ sx: {
287
+ height: small ? "34px" : "38px",
288
+ padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
289
+ },
290
+ className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
291
+ children: [
292
+ /* @__PURE__ */ jsx7(
293
+ Typography2,
294
+ {
295
+ width: "200px",
296
+ className: "text-sm leading-4 truncate text-left",
297
+ children: placeholder
298
+ }
299
+ ),
300
+ colorBorder ? /* @__PURE__ */ jsx7(search_default, {}) : /* @__PURE__ */ jsx7(
301
+ dropdown_arrow_default,
302
+ {
303
+ style: {
304
+ transform: open ? "scaleY(-1)" : "scaleY(1)",
305
+ transition: "0.3s ease-in-out"
306
+ }
307
+ }
308
+ )
309
+ ]
310
+ }
311
+ ),
312
+ btn ? /* @__PURE__ */ jsxs3(
313
+ Paper,
314
+ {
315
+ sx: {
316
+ position: "absolute",
317
+ width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
318
+ left: fullContainerWidth ? 0 : "initial",
319
+ right: fullContainerWidth ? 0 : "initial",
320
+ top: overButton ? 0 : "initial"
321
+ },
322
+ className: `select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
323
+ children: [
324
+ intermediateChild ? intermediateChild : null,
325
+ /* @__PURE__ */ jsxs3(Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
326
+ overButton ? /* @__PURE__ */ jsx7(
327
+ IconButton_default,
328
+ {
329
+ className: "bg-accent-silver p-1 self-end absolute",
330
+ onClick: isOpen ? () => {
331
+ return;
332
+ } : handleClose,
333
+ children: /* @__PURE__ */ jsx7(close_default, {})
334
+ }
335
+ ) : null,
336
+ childTitle ? /* @__PURE__ */ jsx7(
337
+ Typography2,
338
+ {
339
+ className: "text-sm font-normal text-accent-silver-2",
340
+ children: childTitle
341
+ }
342
+ ) : null,
343
+ childrenWithHandleChange
344
+ ] })
345
+ ]
346
+ }
347
+ ) : null
348
+ ] }) });
360
349
  };
361
350
  var SelectPro_default = SelectPro;
362
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",