@modul/mbui 0.0.4-beta-pv-52894-f5bcf45d → 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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = (0, tslib_1.__importStar)(require("react"));
6
6
  const vaul_1 = require("vaul");
@@ -13,23 +13,26 @@ exports.DrawerTrigger = DrawerTrigger;
13
13
  const DrawerPortal = vaul_1.Drawer.Portal;
14
14
  const DrawerClose = vaul_1.Drawer.Close;
15
15
  exports.DrawerClose = DrawerClose;
16
- const DrawerFooter = () => (React.createElement("div", { className: "p-[16px] cursor-pointer" },
17
- 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" },
18
- 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" }))));
19
21
  const DrawerList = ({ children }) => {
20
22
  return (React.createElement("div", { role: "listbox", className: "px-[12px] py-[20px]" }, children));
21
23
  };
22
24
  exports.DrawerList = DrawerList;
23
25
  const DrawerListItem = ({ label, value, isSelected }) => {
24
- 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 },
25
27
  React.createElement("div", { className: "shrink-0" },
26
- 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),
27
29
  React.createElement("p", { className: "font-bold text-[20px] leading-[1.2]" }, value)),
28
30
  isSelected && React.createElement("span", null)));
29
31
  };
30
32
  exports.DrawerListItem = DrawerListItem;
31
33
  const DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => (React.createElement(DrawerPortal, null,
32
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"),
33
36
  children,
34
37
  React.createElement(DrawerFooter, null)))));
35
38
  exports.DrawerContent = DrawerContent;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardDrawer.js","sourceRoot":"","sources":["../../src/DasboardDrawer/DashboardDrawer.tsx"],"names":[],"mappings":";;;;AAAA,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,EAAC,eAAe,EACzB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B;QAElC,8B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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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.4-beta-pv-52894-f5bcf45d",
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",
@@ -11,10 +11,22 @@ const DrawerPortal = DrawerPrimitive.Portal
11
11
 
12
12
  const DrawerClose = DrawerPrimitive.Close
13
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
+
14
26
  const DrawerFooter: React.FC = () => (
15
- <div className="p-[16px] cursor-pointer">
27
+ <DrawerClose className="p-[16px]">
16
28
  <svg
17
- className="block mx-auto"
29
+ className="mx-auto"
18
30
  width="38"
19
31
  height="10"
20
32
  viewBox="0 0 38 10"
@@ -24,10 +36,10 @@ const DrawerFooter: React.FC = () => (
24
36
  <path
25
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"
26
38
  fill="#243036"
27
- fill-opacity="0.24"
39
+ fillOpacity="0.24"
28
40
  />
29
41
  </svg>
30
- </div>
42
+ </DrawerClose>
31
43
  )
32
44
  type DrawerListProps = {
33
45
  children: React.ReactNode
@@ -45,13 +57,13 @@ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
45
57
  type DrawerListItemProps = {
46
58
  value: string
47
59
  label: string | JSX.Element
48
- isSelected?: boolean
60
+ isSelected?: boolean,
49
61
  }
50
62
  const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
51
63
  return (
52
64
  <div
53
65
  role="option"
54
- aria-labelledby=""
66
+ aria-labelledby="1"
55
67
  aria-selected={isSelected}
56
68
  className="flex"
57
69
  tabIndex={0}
@@ -59,7 +71,7 @@ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelecte
59
71
  <div className="shrink-0">
60
72
  <p
61
73
  className="font-medium text-[14px] text-muted leading-[1.4]"
62
- id=""
74
+ id="1"
63
75
  >
64
76
  {label}
65
77
  </p>
@@ -77,9 +89,13 @@ const DrawerContent = React.forwardRef<
77
89
  <DrawerPortal>
78
90
  <DrawerPrimitive.Content
79
91
  ref={ref}
80
- className={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)}
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
+ )}
81
96
  {...props}
82
97
  >
98
+ <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
83
99
  {children}
84
100
  <DrawerFooter />
85
101
  </DrawerPrimitive.Content>
@@ -87,4 +103,4 @@ const DrawerContent = React.forwardRef<
87
103
  ))
88
104
  DrawerContent.displayName = 'DrawerContent'
89
105
 
90
- export { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem }
106
+ export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }