@modul/mbui 0.0.4-beta-pv-52894-f69534e1 → 0.0.4-beta-pv-52894-1ceaef74

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.
@@ -19,4 +19,4 @@ declare const DrawerListItem: React.FC<DrawerListItemProps>;
19
19
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
20
  onAnimationEnd?: (open: boolean) => void;
21
21
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
- export { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem };
22
+ export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem };
@@ -1,7 +1,6 @@
1
- 'use client';
2
1
  "use strict";
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DrawerListItem = exports.DrawerList = exports.DrawerContent = exports.DrawerClose = exports.DrawerTrigger = exports.Drawer = void 0;
3
+ exports.DrawerListItem = exports.DrawerList = exports.DrawerClose = exports.DrawerContent = exports.DrawerTrigger = exports.Drawer = void 0;
5
4
  const tslib_1 = require("tslib");
6
5
  const React = (0, tslib_1.__importStar)(require("react"));
7
6
  const vaul_1 = require("vaul");
@@ -14,24 +13,26 @@ exports.DrawerTrigger = DrawerTrigger;
14
13
  const DrawerPortal = vaul_1.Drawer.Portal;
15
14
  const DrawerClose = vaul_1.Drawer.Close;
16
15
  exports.DrawerClose = DrawerClose;
17
- const DrawerFooter = () => (React.createElement("div", { className: "p-[16px] cursor-pointer" },
18
- React.createElement("svg", { className: "block mx-auto", width: "38", height: "10", viewBox: "0 0 38 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
19
- React.createElement("path", { d: "M0 7.39774C0 8.68678 1.25226 9.60455 2.48147 9.21638L17.7955 4.38038C18.5794 4.13282 19.4206 4.13282 20.2045 4.38038L35.5185 9.21638C36.7477 9.60455 38 8.68678 38 7.39774C38 6.56568 37.4606 5.82966 36.6671 5.5791L20.2045 0.380377C19.4206 0.132817 18.5794 0.132817 17.7955 0.380377L1.33286 5.5791C0.539422 5.82966 0 6.56568 0 7.39774Z", fill: "#243036", "fill-opacity": "0.24" }))));
16
+ const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => (React.createElement(vaul_1.Drawer.Title, { ref: ref, className: (0, utils_1.cn)(className), ...props })));
17
+ DrawerTitle.displayName = vaul_1.Drawer.Title.displayName;
18
+ const DrawerFooter = () => (React.createElement(DrawerClose, { className: "p-[16px]" },
19
+ React.createElement("svg", { className: "mx-auto", width: "38", height: "10", viewBox: "0 0 38 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
20
+ React.createElement("path", { d: "M0 7.39774C0 8.68678 1.25226 9.60455 2.48147 9.21638L17.7955 4.38038C18.5794 4.13282 19.4206 4.13282 20.2045 4.38038L35.5185 9.21638C36.7477 9.60455 38 8.68678 38 7.39774C38 6.56568 37.4606 5.82966 36.6671 5.5791L20.2045 0.380377C19.4206 0.132817 18.5794 0.132817 17.7955 0.380377L1.33286 5.5791C0.539422 5.82966 0 6.56568 0 7.39774Z", fill: "#243036", fillOpacity: "0.24" }))));
20
21
  const DrawerList = ({ children }) => {
21
22
  return (React.createElement("div", { role: "listbox", className: "px-[12px] py-[20px]" }, children));
22
23
  };
23
24
  exports.DrawerList = DrawerList;
24
25
  const DrawerListItem = ({ label, value, isSelected }) => {
25
- return (React.createElement("div", { role: "option", "aria-labelledby": "", "aria-selected": isSelected, className: "flex", tabIndex: 0 },
26
+ return (React.createElement("div", { role: "option", "aria-labelledby": "1", "aria-selected": isSelected, className: "flex", tabIndex: 0 },
26
27
  React.createElement("div", { className: "shrink-0" },
27
- React.createElement("p", { className: "font-medium text-[14px] text-muted leading-[1.4]", id: "" }, label),
28
+ React.createElement("p", { className: "font-medium text-[14px] text-muted leading-[1.4]", id: "1" }, label),
28
29
  React.createElement("p", { className: "font-bold text-[20px] leading-[1.2]" }, value)),
29
30
  isSelected && React.createElement("span", null)));
30
31
  };
31
32
  exports.DrawerListItem = DrawerListItem;
32
- // const Drawer
33
33
  const DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => (React.createElement(DrawerPortal, null,
34
- React.createElement(vaul_1.Drawer.Content, { ref: ref, className: (0, utils_1.cn)('fixed inset-x-0 top-0 flex h-auto flex-col bg-app', className), ...props },
34
+ React.createElement(vaul_1.Drawer.Content, { ref: ref, className: (0, utils_1.cn)('fixed inset-x-0 top-0 flex h-auto flex-col bg-app bg-[#fff] shadow-sm rounded-[8px] #24303614; 0px 0px 16px 4px', className), ...props },
35
+ React.createElement(DrawerTitle, { className: "sr-only" }, "\u0412\u044B\u0431\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438"),
35
36
  children,
36
37
  React.createElement(DrawerFooter, null)))));
37
38
  exports.DrawerContent = DrawerContent;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardDrawer.js","sourceRoot":"","sources":["../../src/DasboardDrawer/DashboardDrawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;AAEZ,0DAA8B;AAC9B,+BAAgD;AAChD,0CAAmC;AAEnC,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,EAAqD,EAAE,EAAE,CAAC,oBAAC,aAAe,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AAqF9G,wBAAM;AApFf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,MAAM,aAAa,GAAG,aAAe,CAAC,OAAO,CAAA;AAkF5B,sCAAa;AAhF9B,MAAM,YAAY,GAAG,aAAe,CAAC,MAAM,CAAA;AAE3C,MAAM,WAAW,GAAG,aAAe,CAAC,KAAK,CAAA;AA8ET,kCAAW;AA5E3C,MAAM,YAAY,GAAa,GAAG,EAAE,CAAC,CACpC,6BAAK,SAAS,EAAC,yBAAyB;IACvC,6BACC,SAAS,EA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GAA8B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,CACN,6BACC,IAAI,EAAC,SAAS,EACd,SAAS,EAAC,qBAAqB,IAE9B,QAAQ,CACJ,CACN,CAAA;AACF,CAAC,CAAA;AAkD2D,gCAAU;AA5CtE,MAAM,cAAc,GAAkC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;IACtF,OAAO,CACN,6BACC,IAAI,EAAC,QAAQ,qBACG,GAAG,mBACJ,UAAU,EACzB,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,CAAC;QAEX,6BAAK,SAAS,EAAC,UAAU;YACxB,2BACC,SAAS,EAAC,kDAAkD,EAC5D,EAAE,EAAC,GAAG,IAEL,KAAK,CACH;YACJ,2BAAG,SAAS,EAAC,qCAAqC,IAAE,KAAK,CAAK,CACzD;QACL,UAAU,IAAI,iCAAa,CACvB,CACN,CAAA;AACF,CAAC,CAAA;AAuBuE,wCAAc;AArBtF,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7C,oBAAC,YAAY;IACZ,oBAAC,aAAe,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACZ,iHAAiH,EACjH,SAAS,CACT,KACG,KAAK;QAET,oBAAC,WAAW,IAAC,SAAS,EAAC,SAAS,sFAA6B;QAC5D,QAAQ;QACT,oBAAC,YAAY,OAAG,CACS,CACZ,CACf,CAAC,CAAA;AAG8B,sCAAa;AAF7C,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
@@ -3,15 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DrawerListItem = exports.DrawerList = exports.DrawerContent = exports.DrawerClose = exports.DrawerTrigger = exports.Drawer = void 0;
4
4
  var DashboardDrawer_1 = require("./DashboardDrawer");
5
5
  Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return DashboardDrawer_1.Drawer; } });
6
- // DrawerPortal,
7
- // DrawerOverlay,
8
6
  Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerTrigger; } });
9
7
  Object.defineProperty(exports, "DrawerClose", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerClose; } });
10
8
  Object.defineProperty(exports, "DrawerContent", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerContent; } });
11
- // DrawerHeader,
12
- // DrawerFooter,
13
- // DrawerTitle,
14
- // DrawerDescription,
15
9
  Object.defineProperty(exports, "DrawerList", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerList; } });
16
10
  Object.defineProperty(exports, "DrawerListItem", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerListItem; } });
17
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DasboardDrawer/index.ts"],"names":[],"mappings":";;;AAAA,qDAa4B;AAZ3B,yGAAA,MAAM,OAAA;AACN,gBAAgB;AAChB,iBAAiB;AACjB,gHAAA,aAAa,OAAA;AACb,8GAAA,WAAW,OAAA;AACX,gHAAA,aAAa,OAAA;AACb,gBAAgB;AAChB,gBAAgB;AAChB,eAAe;AACf,qBAAqB;AACrB,6GAAA,UAAU,OAAA;AACV,iHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DasboardDrawer/index.ts"],"names":[],"mappings":";;;AAAA,qDAO4B;AAN3B,yGAAA,MAAM,OAAA;AACN,gHAAA,aAAa,OAAA;AACb,8GAAA,WAAW,OAAA;AACX,gHAAA,aAAa,OAAA;AACb,6GAAA,UAAU,OAAA;AACV,iHAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.4-beta-pv-52894-f69534e1",
3
+ "version": "0.0.4-beta-pv-52894-1ceaef74",
4
4
  "packageManager": "yarn@3.5.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +1,3 @@
1
- 'use client'
2
-
3
1
  import * as React from 'react'
4
2
  import { Drawer as DrawerPrimitive } from 'vaul'
5
3
  import { cn } from '../@/lib/utils'
@@ -13,10 +11,22 @@ const DrawerPortal = DrawerPrimitive.Portal
13
11
 
14
12
  const DrawerClose = DrawerPrimitive.Close
15
13
 
14
+ const DrawerTitle = React.forwardRef<
15
+ React.ElementRef<typeof DrawerPrimitive.Title>,
16
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
17
+ >(({ className, ...props }, ref) => (
18
+ <DrawerPrimitive.Title
19
+ ref={ref}
20
+ className={cn(className)}
21
+ {...props}
22
+ />
23
+ ))
24
+ DrawerTitle.displayName = DrawerPrimitive.Title.displayName
25
+
16
26
  const DrawerFooter: React.FC = () => (
17
- <div className="p-[16px] cursor-pointer">
27
+ <DrawerClose className="p-[16px]">
18
28
  <svg
19
- className="block mx-auto"
29
+ className="mx-auto"
20
30
  width="38"
21
31
  height="10"
22
32
  viewBox="0 0 38 10"
@@ -26,10 +36,10 @@ const DrawerFooter: React.FC = () => (
26
36
  <path
27
37
  d="M0 7.39774C0 8.68678 1.25226 9.60455 2.48147 9.21638L17.7955 4.38038C18.5794 4.13282 19.4206 4.13282 20.2045 4.38038L35.5185 9.21638C36.7477 9.60455 38 8.68678 38 7.39774C38 6.56568 37.4606 5.82966 36.6671 5.5791L20.2045 0.380377C19.4206 0.132817 18.5794 0.132817 17.7955 0.380377L1.33286 5.5791C0.539422 5.82966 0 6.56568 0 7.39774Z"
28
38
  fill="#243036"
29
- fill-opacity="0.24"
39
+ fillOpacity="0.24"
30
40
  />
31
41
  </svg>
32
- </div>
42
+ </DrawerClose>
33
43
  )
34
44
  type DrawerListProps = {
35
45
  children: React.ReactNode
@@ -47,13 +57,13 @@ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
47
57
  type DrawerListItemProps = {
48
58
  value: string
49
59
  label: string | JSX.Element
50
- isSelected?: boolean
60
+ isSelected?: boolean,
51
61
  }
52
62
  const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
53
63
  return (
54
64
  <div
55
65
  role="option"
56
- aria-labelledby=""
66
+ aria-labelledby="1"
57
67
  aria-selected={isSelected}
58
68
  className="flex"
59
69
  tabIndex={0}
@@ -61,7 +71,7 @@ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelecte
61
71
  <div className="shrink-0">
62
72
  <p
63
73
  className="font-medium text-[14px] text-muted leading-[1.4]"
64
- id=""
74
+ id="1"
65
75
  >
66
76
  {label}
67
77
  </p>
@@ -71,7 +81,7 @@ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelecte
71
81
  </div>
72
82
  )
73
83
  }
74
- // const Drawer
84
+
75
85
  const DrawerContent = React.forwardRef<
76
86
  React.ElementRef<typeof DrawerPrimitive.Content>,
77
87
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
@@ -79,9 +89,13 @@ const DrawerContent = React.forwardRef<
79
89
  <DrawerPortal>
80
90
  <DrawerPrimitive.Content
81
91
  ref={ref}
82
- className={cn('fixed inset-x-0 top-0 flex h-auto flex-col bg-app', className)}
92
+ className={cn(
93
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-app bg-[#fff] shadow-sm rounded-[8px] #24303614; 0px 0px 16px 4px',
94
+ className
95
+ )}
83
96
  {...props}
84
97
  >
98
+ <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
85
99
  {children}
86
100
  <DrawerFooter />
87
101
  </DrawerPrimitive.Content>
@@ -89,4 +103,4 @@ const DrawerContent = React.forwardRef<
89
103
  ))
90
104
  DrawerContent.displayName = 'DrawerContent'
91
105
 
92
- export { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem }
106
+ export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }
@@ -1,14 +1,8 @@
1
1
  export {
2
2
  Drawer,
3
- // DrawerPortal,
4
- // DrawerOverlay,
5
3
  DrawerTrigger,
6
4
  DrawerClose,
7
5
  DrawerContent,
8
- // DrawerHeader,
9
- // DrawerFooter,
10
- // DrawerTitle,
11
- // DrawerDescription,
12
6
  DrawerList,
13
7
  DrawerListItem
14
8
  } from './DashboardDrawer'