@modul/mbui 0.0.7-beta-pv-52960-c02a9972 → 0.0.7-beta-pv-52970-532db2dc

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.
@@ -7,7 +7,7 @@ const react_slot_1 = require("@radix-ui/react-slot");
7
7
  const class_variance_authority_1 = require("class-variance-authority");
8
8
  const utils_1 = require("../@/lib/utils");
9
9
  // import { cn } from "@/lib/utils" порешать с алиасами
10
- const buttonVariants = (0, class_variance_authority_1.cva)('inline-flex items-center border-[2px] justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring ring-offset-1 disabled:pointer-events-none disabled:opacity-[.24]', {
10
+ const buttonVariants = (0, class_variance_authority_1.cva)('inline-flex justify-center items-center border-[2px] disabled:opacity-[.24] focus-visible:ring ring-offset-1 font-medium whitespace-nowrap transition-colors focus-visible:outline-none disabled:pointer-events-none', {
11
11
  variants: {
12
12
  variant: {
13
13
  primary: 'text-btn-primary bg-btn-primary hover:bg-btn-primary-hover focus:bg-btn-primary-focus active:bg-btn-primary-active border-btn-primary hover:border-btn-primary-hover focus:border-btn-primary-focus active:border-btn-primary-active',
@@ -32,7 +32,7 @@ const buttonVariants = (0, class_variance_authority_1.cva)('inline-flex items-ce
32
32
  },
33
33
  });
34
34
  exports.buttonVariants = buttonVariants;
35
- const textVariants = (0, class_variance_authority_1.cva)('inline-flex whitespace-nowrap transition-colors focus-visible:outline-current rounded-[.25em] disabled:pointer-events-none disabled:opacity-[.24]', {
35
+ const textVariants = (0, class_variance_authority_1.cva)('inline-flex whitespace-nowrap transition-colors focus-visible:outline-current disabled:opacity-[.24] rounded-[.25em] disabled:pointer-events-none', {
36
36
  variants: {
37
37
  variant: {
38
38
  primary: 'text-primary hover:text-primary-hover focus:text-primary-focus active:text-primary-active disabled:pointer-events-none',
@@ -1 +1 @@
1
- export { Button } from './Button';
1
+ export { Button, buttonVariants } from './Button';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Button = void 0;
3
+ exports.buttonVariants = exports.Button = void 0;
4
4
  var Button_1 = require("./Button");
5
5
  Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
6
+ Object.defineProperty(exports, "buttonVariants", { enumerable: true, get: function () { return Button_1.buttonVariants; } });
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Button/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAAvB,gGAAA,MAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Button/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAAvC,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const chipVariants: (props?: {
4
+ variant?: "outline" | "success" | "primary" | "secondary" | "primary-outline" | "ghost";
5
+ size?: "lg" | "md" | "sm" | "xs" | "xxs";
6
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
7
+ export interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Chip: React.ForwardRefExoticComponent<IChipProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Chip };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Chip = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = (0, tslib_1.__importDefault)(require("react"));
6
+ const class_variance_authority_1 = require("class-variance-authority");
7
+ const react_slot_1 = require("@radix-ui/react-slot");
8
+ const utils_1 = require("../@/lib/utils");
9
+ // import { cn } from "@/lib/utils" порешать с алиасами
10
+ const chipVariants = (0, class_variance_authority_1.cva)('inline-flex items-center border-[2px] justify-center rounded-full whitespace-nowrap font-medium transition-colors ring-offset-1 disabled:pointer-events-none disabled:opacity-[.24]', {
11
+ variants: {
12
+ variant: {
13
+ primary: 'text-btn-primary bg-btn-primary hover:bg-btn-primary-hover focus:bg-btn-primary-focus active:bg-btn-primary-active border-btn-primary hover:border-btn-primary-hover focus:border-btn-primary-focus active:border-btn-primary-active',
14
+ secondary: 'text-btn-secondary bg-btn-secondary hover:bg-btn-secondary-hover focus:bg-btn-secondary-focus active:bg-btn-secondary-active border-btn-secondary hover:border-btn-secondary-hover focus:border-btn-secondary-focus active:border-btn-secondary-active',
15
+ success: 'text-btn-success bg-btn-success hover:bg-btn-success-hover focus:bg-btn-success-focus active:bg-btn-success-active border-btn-success hover:border-btn-success-hover focus:border-btn-success-focus active:border-btn-success-active',
16
+ 'primary-outline': 'text-btn-primary-outline hover:text-btn-primary-outline-hover focus:text-btn-primary-outline-focus active:text-btn-primary-outline-active bg-btn-primary-outline hover:bg-btn-primary-outline-hover focus:bg-btn-primary-outline-focus active:bg-btn-primary-outline-active border-btn-primary-outline hover:border-btn-primary-outline-hover focus:border-btn-primary-outline-focus active:border-btn-primary-outline-active',
17
+ outline: 'border-[1px] text-btn-outline border-btn-outline ring-[currentColor]',
18
+ ghost: 'text-btn-ghost bg-btn-ghost hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active border-transparent',
19
+ },
20
+ size: {
21
+ lg: '',
22
+ md: '',
23
+ sm: 'h-[14px] px-[20px] text-[10px] leading-[1.4]',
24
+ xs: '',
25
+ xxs: '',
26
+ },
27
+ },
28
+ defaultVariants: {
29
+ variant: 'secondary',
30
+ size: 'sm',
31
+ },
32
+ });
33
+ const Chip = react_1.default.forwardRef(({ children, variant, size, className, asChild = false, ...props }, ref) => {
34
+ const Comp = asChild ? react_slot_1.Slot : "span";
35
+ return (react_1.default.createElement(Comp, { className: (0, utils_1.cn)(chipVariants({ variant, size, className })), ref: ref, ...props }));
36
+ });
37
+ exports.Chip = Chip;
38
+ //# sourceMappingURL=Chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../src/Chip/Chip.tsx"],"names":[],"mappings":";;;;AAAA,+DAAoD;AACpD,uEAAiE;AACjE,qDAA2C;AAC3C,0CAAmC;AACnC,uDAAuD;AAEvD,MAAM,YAAY,GAAG,IAAA,8BAAG,EACvB,sLAAsL,EACtL;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EACN,sOAAsO;YACvO,SAAS,EACR,wPAAwP;YACzP,OAAO,EACN,sOAAsO;YACvO,iBAAiB,EAChB,+ZAA+Z;YACha,OAAO,EAAE,sEAAsE;YAC/E,KAAK,EAAE,6HAA6H;SACpI;QACD,IAAI,EAAE;YACL,EAAE,EAAE,EAAE;YACN,EAAE,EAAE,EAAE;YACN,EAAE,EAAE,8CAA8C;YAClD,EAAE,EAAE,EAAE;YACN,GAAG,EAAE,EAAE;SACP;KACD;IACD,eAAe,EAAE;QAChB,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,IAAI;KACV;CACD,CACD,CAAA;AAMD,MAAM,IAAI,GAAG,eAAK,CAAC,UAAU,CAAgC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACpI,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,iBAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEvC,OAAO,CACN,8BAAC,IAAI,IACC,SAAS,EAAE,IAAA,UAAE,EAAC,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EACzD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACN,CAAA;AACF,CAAC,CAAC,CAAA;AAEO,oBAAI"}
@@ -0,0 +1 @@
1
+ export { Chip } from './Chip';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Chip = void 0;
4
+ var Chip_1 = require("./Chip");
5
+ Object.defineProperty(exports, "Chip", { enumerable: true, get: function () { return Chip_1.Chip; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Chip/index.ts"],"names":[],"mappings":";;;AAAA,+BAA6B;AAApB,4FAAA,IAAI,OAAA"}
@@ -13,7 +13,8 @@ declare const DrawerList: React.FC<DrawerListProps>;
13
13
  declare type DrawerListItemProps = {
14
14
  value: string;
15
15
  label: string | JSX.Element;
16
- isSelected?: boolean;
16
+ isActive?: boolean;
17
+ onClick?: () => void;
17
18
  };
18
19
  declare const DrawerListItem: React.FC<DrawerListItemProps>;
19
20
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
@@ -4,6 +4,7 @@ exports.DrawerListItem = exports.DrawerList = exports.DrawerClose = exports.Draw
4
4
  const tslib_1 = require("tslib");
5
5
  const React = (0, tslib_1.__importStar)(require("react"));
6
6
  const vaul_1 = require("vaul");
7
+ const Icon_1 = require("../Icon");
7
8
  const utils_1 = require("../@/lib/utils");
8
9
  const Drawer = ({ ...props }) => React.createElement(vaul_1.Drawer.Root, { ...props });
9
10
  exports.Drawer = Drawer;
@@ -19,19 +20,21 @@ const DrawerFooter = () => (React.createElement(DrawerClose, { className: "p-[16
19
20
  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
21
  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" }))));
21
22
  const DrawerList = ({ children }) => {
22
- return (React.createElement("div", { role: "listbox", className: "px-[12px] py-[20px]" }, children));
23
+ return (React.createElement("div", { role: "list", className: "px-[20px] divide-y" }, children));
23
24
  };
24
25
  exports.DrawerList = DrawerList;
25
- const DrawerListItem = ({ label, value, isSelected }) => {
26
- return (React.createElement("div", { role: "option", "aria-labelledby": "1", "aria-selected": isSelected, className: "flex", tabIndex: 0 },
27
- React.createElement("div", { className: "shrink-0" },
28
- React.createElement("p", { className: "font-medium text-[14px] text-muted leading-[1.4]", id: "1" }, label),
29
- React.createElement("p", { className: "font-bold text-[20px] leading-[1.2]" }, value)),
30
- isSelected && React.createElement("span", null)));
26
+ const DrawerListItem = ({ label, value, isActive, onClick }) => {
27
+ return (React.createElement("button", { className: "flex py-[16px] w-full text-left", role: "listitem", "aria-selected": isActive, "aria-labelledby": "1", onClick: onClick },
28
+ React.createElement("span", { className: "w-[calc(100%-50px)]" },
29
+ React.createElement("span", { className: "flex [&+span]:mt-[4px] font-medium text-[14px] text-muted leading-[1.28]", id: "1" },
30
+ React.createElement("span", { className: "[&+span]:ml-[8px] truncate" }, label),
31
+ React.createElement("span", { className: "inline-flex bg-[#EE7C2D] px-[4px] rounded-full h-[16px] text-[#fff] text-[12px] truncate leading-[16px] shrink-0" }, "23")),
32
+ React.createElement("span", { className: "block font-bold text-[20px] leading-[1.2]" }, value)),
33
+ isActive && (React.createElement(Icon_1.Check, { width: 16, height: 16, className: "ml-auto text-primary self-center" }))));
31
34
  };
32
35
  exports.DrawerListItem = DrawerListItem;
33
36
  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 bg-[#fff] shadow-sm rounded-[8px] #24303614; 0px 0px 16px 4px', className), ...props },
37
+ 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-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px', className), ...props },
35
38
  React.createElement(DrawerTitle, { className: "sr-only" }, "\u0412\u044B\u0431\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438"),
36
39
  children,
37
40
  React.createElement(DrawerFooter, null)))));
@@ -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;AAqG9G,wBAAM;AApGf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,MAAM,aAAa,GAAG,aAAe,CAAC,OAAO,CAAA;AAkG5B,sCAAa;AAhG9B,MAAM,YAAY,GAAG,aAAe,CAAC,MAAM,CAAA;AAE3C,MAAM,WAAW,GAAG,aAAe,CAAC,KAAK,CAAA;AA8FM,kCAAW;AA5F1D,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,aAAe,CAAC,KAAK,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EAAC,SAAS,CAAC,KACpB,KAAK,GACR,CACF,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,GAAG,aAAe,CAAC,KAAK,CAAC,WAAW,CAAA;AAE3D,MAAM,YAAY,GAAa,GAAG,EAAE,CAAC,CACpC,oBAAC,WAAW,IAAC,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AS,EAAC,SAAS,sFAA6B;QAC5D,QAAQ;QACT,oBAAC,YAAY,OAAG,CACS,CACZ,CACf,CAAC,CAAA;AAG8B,sCAAa;AAF7C,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
package/dist/Page/Page.js CHANGED
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = (0, tslib_1.__importDefault)(require("react"));
6
6
  const utils_1 = require("../@/lib/utils");
7
7
  const Page = ({ children, className }) => {
8
- return (react_1.default.createElement("div", { className: (0, utils_1.cn)('sm:container bg-dashboard h-screen', className) }, children));
8
+ return (react_1.default.createElement("div", { className: (0, utils_1.cn)('sm:container bg-page h-screen', className) }, children));
9
9
  };
10
10
  exports.Page = Page;
11
11
  //# sourceMappingURL=Page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/Page/Page.tsx"],"names":[],"mappings":";;;;AAAA,+DAAgC;AAChC,0CAAoC;AAOpC,MAAM,IAAI,GAAmB,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,EAAE,EAAE;IACtD,OAAO,CACN,uCAAK,SAAS,EAAE,IAAA,UAAE,EAAC,oCAAoC,EAAE,SAAS,CAAC,IACjE,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAA;AAEQ,oBAAI"}
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/Page/Page.tsx"],"names":[],"mappings":";;;;AAAA,+DAAgC;AAChC,0CAAoC;AAOpC,MAAM,IAAI,GAAmB,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,EAAE,EAAE;IACtD,OAAO,CACN,uCAAK,SAAS,EAAE,IAAA,UAAE,EAAC,+BAA+B,EAAE,SAAS,CAAC,IAC5D,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAA;AAEQ,oBAAI"}
@@ -4,10 +4,22 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = (0, tslib_1.__importDefault)(require("react"));
5
5
  const classnames_1 = (0, tslib_1.__importDefault)(require("classnames"));
6
6
  const TooltipPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-tooltip"));
7
+ //
8
+ const cssClass = `z-50 overflow-hidden
9
+ rounded-md border bg-popover px-3 py-1.5 text-sm
10
+ text-popover-foreground
11
+ shadow-md animate-in fade-in-0 zoom-in-95
12
+ data-[state=closed]:animate-out
13
+ data-[state=closed]:fade-out-0
14
+ data-[state=closed]:zoom-out-95
15
+ data-[side=bottom]:slide-in-from-top-2
16
+ data-[side=left]:slide-in-from-right-2
17
+ data-[side=right]:slide-in-from-left-2
18
+ data-[side=top]:slide-in-from-bottom-2`;
7
19
  const Tooltip = ({ ...props }) => react_1.default.createElement(TooltipPrimitive.Root, { ...props });
8
20
  const TooltipProvider = TooltipPrimitive.Provider;
9
21
  const TooltipTrigger = TooltipPrimitive.Trigger;
10
- const TooltipContent = react_1.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (react_1.default.createElement(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, classnames_1.default)('z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
22
+ const TooltipContent = react_1.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (react_1.default.createElement(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, classnames_1.default)(cssClass, className), ...props })));
11
23
  Tooltip.Provider = TooltipProvider;
12
24
  Tooltip.Trigger = TooltipTrigger;
13
25
  Tooltip.Content = TooltipContent;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;AAAA,+D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,GAAG,eAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnD,8BAAC,gBAAgB,CAAC,OAAO,IACxB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAA,oBAAE,EAAC,QAAQ,EAAE,SAAS,CAAC,KAC9B,KAAK,GACR,CACF,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,GAAG,eAAe,CAAA;AAClC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAA;AAChC,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAE7C,kBAAe,OAAO,CAAA"}
package/dist/index.d.ts CHANGED
@@ -14,4 +14,5 @@ import { Audio } from "./Audio";
14
14
  import { cn } from "./@/lib/utils";
15
15
  import { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem } from './DasboardDrawer';
16
16
  import { Page } from "./Page";
17
- export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, Input, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page };
17
+ import { Chip } from "./Chip";
18
+ export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, Input, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerListItem = exports.DrawerList = exports.DrawerContent = exports.DrawerClose = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.Input = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
3
+ exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerListItem = exports.DrawerList = exports.DrawerContent = exports.DrawerClose = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.Input = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Tooltip_1 = require("./Tooltip");
6
6
  Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
@@ -51,4 +51,6 @@ Object.defineProperty(exports, "DrawerList", { enumerable: true, get: function (
51
51
  Object.defineProperty(exports, "DrawerListItem", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerListItem; } });
52
52
  const Page_1 = require("./Page");
53
53
  Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
54
+ const Chip_1 = require("./Chip");
55
+ Object.defineProperty(exports, "Chip", { enumerable: true, get: function () { return Chip_1.Chip; } });
54
56
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,uCAAoC;AA4CnC,wFA5CQ,iBAAO,OA4CR;AA3CR,iCAA8B;AA4C7B,qFA5CQ,WAAI,OA4CR;AA3CL,qCAAkC;AA4CjC,uFA5CQ,eAAM,OA4CR;AA3CP,uCAAoC;AA4CnC,wFA5CQ,iBAAO,OA4CR;AA3CR,+DAA0B;AA4CzB,eA5CM,cAAI,CA4CN;AA3CL,2CAIqB;AAwCpB,yFA5CQ,oBAAQ,OA4CR;AACR,8FA5CA,yBAAa,OA4CA;AACb,6FA5CA,wBAAY,OA4CA;AACZ,kGA5CA,6BAAiB,OA4CA;AA1ClB,yDAK4B;AAyD3B,iGA7DA,mCAAgB,OA6DA;AAChB,qGA7DA,uCAAoB,OA6DA;AACpB,yGA7DA,2CAAwB,OA6DA;AACxB,qGA7DA,uCAAoB,OA6DA;AA3DrB,0DAA+B;AAiD9B,oBAAI;AAhDL,+CAIuB;AAgCtB,4FAnCA,yBAAW,OAmCA;AACX,mGAnCA,gCAAkB,OAmCA;AAClB,mGAnCA,gCAAkB,OAmCA;AAjCnB,+CAMuB;AA4BtB,mGAjCA,gCAAkB,OAiCA;AAClB,yGAjCA,sCAAwB,OAiCA;AACxB,0GAjCA,uCAAyB,OAiCA;AACzB,0GAjCA,uCAAyB,OAiCA;AACzB,8GAjCA,2CAA6B,OAiCA;AA/B9B,qCAAkC;AAgCjC,uFAhCQ,eAAM,OAgCR;AA/BP,wCAAqC;AAgCpC,sFAhCQ,aAA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AAiCjC,uFAjCQ,eAAM,OAiCR;AAhCP,wCAAqC;AAiCpC,sFAjCQ,aAAK,OAiCR;AAhCN,mCAAgC;AAiC/B,sFAjCQ,aAAK,OAiCR;AAhCN,yCAAmC;AAiClC,mFAjCQ,UAAE,OAiCR;AAhCH,qDAOyB;AA2BxB,uFAjCA,uBAAM,OAiCA;AACN,8FAjCA,8BAAa,OAiCA;AACb,4FAjCA,4BAAW,OAiCA;AACX,8FAjCA,8BAAa,OAiCA;AACb,2FAjCA,2BAAU,OAiCA;AACV,+FAjCA,+BAAc,OAiCA;AA/Bf,iCAA8B;AAoC7B,qFApCQ,WAAI,OAoCR;AAnCL,iCAA8B;AAoC7B,qFApCQ,WAAI,OAoCR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.7-beta-pv-52960-c02a9972",
3
+ "version": "0.0.7-beta-pv-52970-532db2dc",
4
4
  "packageManager": "yarn@3.5.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -24,6 +24,7 @@
24
24
  "@radix-ui/react-accordion": "^1.2.0",
25
25
  "@radix-ui/react-collapsible": "1.1.0",
26
26
  "@radix-ui/react-dropdown-menu": "2.1.1",
27
+ "@radix-ui/react-label": "2.1.0",
27
28
  "@radix-ui/react-popover": "^1.1.1",
28
29
  "@radix-ui/react-select": "2.1.1",
29
30
  "@radix-ui/react-slider": "^1.2.0",
@@ -47,14 +48,16 @@
47
48
  "@babel/preset-env": "^7.9.5",
48
49
  "@babel/preset-react": "^7.9.4",
49
50
  "@babel/preset-typescript": "^7.21.5",
50
- "@storybook/addon-essentials": "^7.4.0",
51
- "@storybook/addon-interactions": "^7.4.0",
52
- "@storybook/addon-links": "^7.4.0",
53
- "@storybook/addon-onboarding": "^1.0.8",
54
- "@storybook/blocks": "^7.4.0",
55
- "@storybook/react": "^7.4.0",
56
- "@storybook/react-webpack5": "^7.4.0",
57
- "@storybook/testing-library": "^0.2.0",
51
+ "@chromatic-com/storybook": "^1",
52
+ "@storybook/addon-essentials": "^8.2.8",
53
+ "@storybook/addon-interactions": "^8.2.8",
54
+ "@storybook/addon-links": "^8.2.8",
55
+ "@storybook/addon-onboarding": "^8.2.8",
56
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
57
+ "@storybook/blocks": "^8.2.8",
58
+ "@storybook/react": "^8.2.8",
59
+ "@storybook/react-webpack5": "^8.2.8",
60
+ "@storybook/test": "^8.2.8",
58
61
  "@tailwindcss/forms": "^0.5.7",
59
62
  "@types/node": "18.11.9",
60
63
  "@types/react": "^18.2.6",
@@ -81,7 +84,7 @@
81
84
  "eslint-plugin-prettier": "4.2.1",
82
85
  "eslint-plugin-react": "7.31.10",
83
86
  "eslint-plugin-react-hooks": "4.6.0",
84
- "eslint-plugin-storybook": "^0.6.13",
87
+ "eslint-plugin-storybook": "^0.8.0",
85
88
  "glob": "^10.2.4",
86
89
  "html-webpack-plugin": "5.5.1",
87
90
  "image-minimizer-webpack-plugin": "^4.0.2",
@@ -97,7 +100,7 @@
97
100
  "prettier": "2.7.1",
98
101
  "react": "18.2.0",
99
102
  "react-dom": "^18.2.0",
100
- "storybook": "^7.4.0",
103
+ "storybook": "^8.2.8",
101
104
  "style-loader": "^3.3.3",
102
105
  "stylus": "^0.59.0",
103
106
  "stylus-loader": "^7.1.3",
@@ -1,4 +1,5 @@
1
1
  import button from "./button"
2
+ import label from "./label"
2
3
 
3
4
  export default {
4
5
  container: {
@@ -9,12 +10,14 @@ export default {
9
10
  },
10
11
  extend: {
11
12
  colors: {
12
- muted: 'var(--muted)',
13
13
  primary: {
14
14
  DEFAULT: 'var(--primary)',
15
15
  hover: 'var(--primary-hover)',
16
16
  focus: 'var(var(--primary-focus)',
17
17
  active: 'var(--primary-active)',
18
+ light: {
19
+ DEFAULT: 'var(--primary-light)'
20
+ }
18
21
  },
19
22
  success: {
20
23
  DEFAULT: 'var(--success)',
@@ -28,17 +31,28 @@ export default {
28
31
  focus: 'var(var(--secondary-focus)',
29
32
  active: 'var(--secondary-active)',
30
33
  },
34
+ muted: 'var(--muted)',
31
35
  transparent: 'transparent',
32
36
  current: 'currentColor',
33
37
  },
34
38
  textColor: {
35
- ...button.textColor
39
+ ...button.textColor,
40
+ ...label.textColor
36
41
  },
37
42
  backgroundColor: {
38
- primary: {
39
- DEFAULT: 'var(--primary-bg)'
40
- },
41
- ...button.backgroundColor
43
+ page: 'var(--page-bg)',
44
+ ...button.backgroundColor,
45
+ ...label.backgroundColor
46
+ },
47
+ dropShadow: {
48
+ '1': 'var(--shadow-1)',
49
+ '2': 'var(--shadow-2)',
50
+ },
51
+ borderColor: {
52
+ ...button.borderColor
53
+ },
54
+ borderRadius: {
55
+ '1': 'var(--border-radius-1)',
42
56
  },
43
57
  keyframes: {
44
58
  'accordion-down': {
@@ -0,0 +1,89 @@
1
+ export default {
2
+ textColor: {
3
+ label: {
4
+ primary: {
5
+ DEFAULT: 'var(--btn-primary)',
6
+ outline: {
7
+ DEFAULT: 'var(--btn-primary-bg)',
8
+ hover: 'var(--btn-primary-hover-bg)',
9
+ focus: 'var(var(--btn-primary-focus-bg)',
10
+ active: 'var(--btn-primary-active-bg)',
11
+ }
12
+ },
13
+ secondary: 'var(--btn-secondary)',
14
+ success: 'var(--btn-success)',
15
+ ghost: 'var(--btn-ghost)',
16
+ outline: {
17
+ DEFAULT: 'var(--btn-ghost)',
18
+ hover: 'var(--btn-ghost-hover-bg)',
19
+ focus: 'var(var(--btn-ghost-focus-bg)',
20
+ active: 'var(--btn-ghost-active-bg)',
21
+ }
22
+ }
23
+ },
24
+ backgroundColor: {
25
+ label: {
26
+ primary: {
27
+ DEFAULT: 'var(--btn-primary-bg)',
28
+ hover: 'var(--btn-primary-hover-bg)',
29
+ focus: 'var(var(--btn-primary-focus-bg)',
30
+ active: 'var(--btn-primary-active-bg)',
31
+ },
32
+ secondary: {
33
+ DEFAULT: 'var(--btn-secondary-bg)',
34
+ hover: 'var(--btn-secondary-hover-bg)',
35
+ focus: 'var(var(--btn-secondary-focus-bg)',
36
+ active: 'var(--btn-secondary-active-bg)',
37
+ },
38
+ success: {
39
+ DEFAULT: 'var(--btn-success-bg)',
40
+ hover: 'var(--btn-success-hover-bg)',
41
+ focus: 'var(var(--btn-success-focus-bg)',
42
+ active: 'var(--btn-success-active-bg)',
43
+ },
44
+ ghost: {
45
+ DEFAULT: 'var(--btn-ghost-bg)',
46
+ hover: 'var(--btn-ghost-hover-bg)',
47
+ focus: 'var(var(--btn-ghost-focus-bg)',
48
+ active: 'var(--btn-ghost-active-bg)',
49
+ }
50
+ }
51
+ },
52
+ borderColor: {
53
+ btn: {
54
+ primary: {
55
+ DEFAULT: 'var(--btn-primary-bg)',
56
+ hover: 'var(--btn-primary-hover-bg)',
57
+ focus: 'var(var(--btn-primary-focus-bg)',
58
+ active: 'var(--btn-primary-active-bg)',
59
+ outline: {
60
+ DEFAULT: 'var(--btn-primary-bg)',
61
+ hover: 'var(--btn-primary-hover-bg)',
62
+ focus: 'var(var(--btn-primary-focus-bg)',
63
+ active: 'var(--btn-primary-active-bg)',
64
+ }
65
+ },
66
+ secondary: {
67
+ DEFAULT: 'var(--btn-secondary-bg)',
68
+ hover: 'var(--btn-secondary-hover-bg)',
69
+ focus: 'var(var(--btn-secondary-focus-bg)',
70
+ active: 'var(--btn-secondary-active-bg)',
71
+ },
72
+ success: {
73
+ DEFAULT: 'var(--btn-success-bg)',
74
+ hover: 'var(--btn-success-hover-bg)',
75
+ focus: 'var(var(--btn-success-focus-bg)',
76
+ active: 'var(--btn-success-active-bg)',
77
+ },
78
+ ghost: {
79
+ DEFAULT: 'var(--btn-ghost-bg)',
80
+ hover: 'var(--btn-ghost-hover-bg)',
81
+ focus: 'var(var(--btn-ghost-focus-bg)',
82
+ active: 'var(--btn-ghost-active-bg)',
83
+ },
84
+ outline: {
85
+ DEFAULT: 'var(--btn-ghost)',
86
+ }
87
+ }
88
+ }
89
+ }
@@ -6,7 +6,7 @@ import { cn } from '../@/lib/utils'
6
6
  // import { cn } from "@/lib/utils" порешать с алиасами
7
7
 
8
8
  const buttonVariants = cva(
9
- 'inline-flex items-center border-[2px] justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring ring-offset-1 disabled:pointer-events-none disabled:opacity-[.24]',
9
+ 'inline-flex justify-center items-center border-[2px] disabled:opacity-[.24] focus-visible:ring ring-offset-1 font-medium whitespace-nowrap transition-colors focus-visible:outline-none disabled:pointer-events-none',
10
10
  {
11
11
  variants: {
12
12
  variant: {
@@ -37,7 +37,7 @@ const buttonVariants = cva(
37
37
  }
38
38
  )
39
39
  const textVariants = cva(
40
- 'inline-flex whitespace-nowrap transition-colors focus-visible:outline-current rounded-[.25em] disabled:pointer-events-none disabled:opacity-[.24]',
40
+ 'inline-flex whitespace-nowrap transition-colors focus-visible:outline-current disabled:opacity-[.24] rounded-[.25em] disabled:pointer-events-none',
41
41
  {
42
42
  variants: {
43
43
  variant: {
@@ -1 +1 @@
1
- export {Button} from './Button'
1
+ export {Button, buttonVariants} from './Button'
@@ -0,0 +1,54 @@
1
+ import React, { FC, PropsWithChildren } from 'react'
2
+ import { cva, type VariantProps } from 'class-variance-authority'
3
+ import { Slot } from '@radix-ui/react-slot'
4
+ import { cn } from '../@/lib/utils'
5
+ // import { cn } from "@/lib/utils" порешать с алиасами
6
+
7
+ const chipVariants = cva(
8
+ 'inline-flex items-center border-[2px] justify-center rounded-full whitespace-nowrap font-medium transition-colors ring-offset-1 disabled:pointer-events-none disabled:opacity-[.24]',
9
+ {
10
+ variants: {
11
+ variant: {
12
+ primary:
13
+ 'text-btn-primary bg-btn-primary hover:bg-btn-primary-hover focus:bg-btn-primary-focus active:bg-btn-primary-active border-btn-primary hover:border-btn-primary-hover focus:border-btn-primary-focus active:border-btn-primary-active',
14
+ secondary:
15
+ 'text-btn-secondary bg-btn-secondary hover:bg-btn-secondary-hover focus:bg-btn-secondary-focus active:bg-btn-secondary-active border-btn-secondary hover:border-btn-secondary-hover focus:border-btn-secondary-focus active:border-btn-secondary-active',
16
+ success:
17
+ 'text-btn-success bg-btn-success hover:bg-btn-success-hover focus:bg-btn-success-focus active:bg-btn-success-active border-btn-success hover:border-btn-success-hover focus:border-btn-success-focus active:border-btn-success-active',
18
+ 'primary-outline':
19
+ 'text-btn-primary-outline hover:text-btn-primary-outline-hover focus:text-btn-primary-outline-focus active:text-btn-primary-outline-active bg-btn-primary-outline hover:bg-btn-primary-outline-hover focus:bg-btn-primary-outline-focus active:bg-btn-primary-outline-active border-btn-primary-outline hover:border-btn-primary-outline-hover focus:border-btn-primary-outline-focus active:border-btn-primary-outline-active',
20
+ outline: 'border-[1px] text-btn-outline border-btn-outline ring-[currentColor]',
21
+ ghost: 'text-btn-ghost bg-btn-ghost hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active border-transparent',
22
+ },
23
+ size: {
24
+ lg: '',
25
+ md: '',
26
+ sm: 'h-[14px] px-[20px] text-[10px] leading-[1.4]',
27
+ xs: '',
28
+ xxs: '',
29
+ },
30
+ },
31
+ defaultVariants: {
32
+ variant: 'secondary',
33
+ size: 'sm',
34
+ },
35
+ }
36
+ )
37
+
38
+ export interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
39
+ asChild?: boolean
40
+ }
41
+
42
+ const Chip = React.forwardRef<HTMLButtonElement, IChipProps>(({ children, variant, size, className, asChild = false, ...props }, ref) => {
43
+ const Comp = asChild ? Slot : "span"
44
+
45
+ return (
46
+ <Comp
47
+ className={cn(chipVariants({ variant, size, className }))}
48
+ ref={ref}
49
+ {...props}
50
+ />
51
+ )
52
+ })
53
+
54
+ export { Chip }
@@ -0,0 +1 @@
1
+ export { Chip } from './Chip'
@@ -1,8 +1,10 @@
1
1
  import * as React from 'react'
2
2
  import { Drawer as DrawerPrimitive } from 'vaul'
3
+ import { Check } from '../Icon'
3
4
  import { cn } from '../@/lib/utils'
4
5
 
5
6
  const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
7
+
6
8
  Drawer.displayName = 'Drawer'
7
9
 
8
10
  const DrawerTrigger = DrawerPrimitive.Trigger
@@ -47,8 +49,8 @@ type DrawerListProps = {
47
49
  const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
48
50
  return (
49
51
  <div
50
- role="listbox"
51
- className="px-[12px] py-[20px]"
52
+ role="list"
53
+ className="px-[20px] divide-y"
52
54
  >
53
55
  {children}
54
56
  </div>
@@ -57,28 +59,39 @@ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
57
59
  type DrawerListItemProps = {
58
60
  value: string
59
61
  label: string | JSX.Element
60
- isSelected?: boolean,
62
+ isActive?: boolean
63
+ onClick?: () => void
61
64
  }
62
- const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
65
+ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isActive, onClick }) => {
63
66
  return (
64
- <div
65
- role="option"
67
+ <button
68
+ className="flex py-[16px] w-full text-left"
69
+ role="listitem"
70
+ aria-selected={isActive}
66
71
  aria-labelledby="1"
67
- aria-selected={isSelected}
68
- className="flex"
69
- tabIndex={0}
72
+ onClick={onClick}
70
73
  >
71
- <div className="shrink-0">
72
- <p
73
- className="font-medium text-[14px] text-muted leading-[1.4]"
74
+ <span className="w-[calc(100%-50px)]">
75
+ <span
76
+ className="flex [&+span]:mt-[4px] font-medium text-[14px] text-muted leading-[1.28]"
74
77
  id="1"
75
78
  >
76
- {label}
77
- </p>
78
- <p className="font-bold text-[20px] leading-[1.2]">{value}</p>
79
- </div>
80
- {isSelected && <span></span>}
81
- </div>
79
+ <span className="[&+span]:ml-[8px] truncate">{label}</span>
80
+
81
+ <span className="inline-flex bg-[#EE7C2D] px-[4px] rounded-full h-[16px] text-[#fff] text-[12px] truncate leading-[16px] shrink-0">
82
+ 23
83
+ </span>
84
+ </span>
85
+ <span className="block font-bold text-[20px] leading-[1.2]">{value}</span>
86
+ </span>
87
+ {isActive && (
88
+ <Check
89
+ width={16}
90
+ height={16}
91
+ className="ml-auto text-primary self-center"
92
+ />
93
+ )}
94
+ </button>
82
95
  )
83
96
  }
84
97
 
@@ -90,7 +103,7 @@ const DrawerContent = React.forwardRef<
90
103
  <DrawerPrimitive.Content
91
104
  ref={ref}
92
105
  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',
106
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
94
107
  className
95
108
  )}
96
109
  {...props}
@@ -0,0 +1,108 @@
1
+ import * as React from 'react'
2
+ import { Drawer as DrawerPrimitive } from 'vaul'
3
+ import { cn } from '../@/lib/utils'
4
+
5
+ const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
6
+
7
+ Drawer.displayName = 'Drawer'
8
+
9
+ const DrawerTrigger = DrawerPrimitive.Trigger
10
+
11
+ const DrawerPortal = DrawerPrimitive.Portal
12
+
13
+ const DrawerClose = DrawerPrimitive.Close
14
+
15
+ const DrawerTitle = React.forwardRef<
16
+ React.ElementRef<typeof DrawerPrimitive.Title>,
17
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
18
+ >(({ className, ...props }, ref) => (
19
+ <DrawerPrimitive.Title
20
+ ref={ref}
21
+ className={cn(className)}
22
+ {...props}
23
+ />
24
+ ))
25
+ DrawerTitle.displayName = DrawerPrimitive.Title.displayName
26
+
27
+ const DrawerFooter: React.FC = () => (
28
+ <DrawerClose className="p-[16px]">
29
+ <svg
30
+ className="mx-auto"
31
+ width="38"
32
+ height="10"
33
+ viewBox="0 0 38 10"
34
+ fill="none"
35
+ xmlns="http://www.w3.org/2000/svg"
36
+ >
37
+ <path
38
+ 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"
39
+ fill="#243036"
40
+ fillOpacity="0.24"
41
+ />
42
+ </svg>
43
+ </DrawerClose>
44
+ )
45
+ type DrawerListProps = {
46
+ children: React.ReactNode
47
+ }
48
+ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
49
+ return (
50
+ <div
51
+ role="listbox"
52
+ className="px-[20px]"
53
+ >
54
+ {children}
55
+ </div>
56
+ )
57
+ }
58
+ type DrawerListItemProps = {
59
+ value: string
60
+ label: string | JSX.Element
61
+ isSelected?: boolean,
62
+ }
63
+ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
64
+ return (
65
+ <div
66
+ role="option"
67
+ aria-labelledby="1"
68
+ aria-selected={isSelected}
69
+ className="flex"
70
+ tabIndex={0}
71
+ >
72
+ <div className="shrink-0">
73
+ <p
74
+ className="font-medium text-[14px] text-muted leading-[1.4]"
75
+ id="1"
76
+ >
77
+ {label}
78
+ </p>
79
+ <p className="font-bold text-[20px] leading-[1.2]">{value}</p>
80
+ </div>
81
+ {isSelected && <span></span>}
82
+ </div>
83
+ )
84
+ }
85
+
86
+ const DrawerContent = React.forwardRef<
87
+ React.ElementRef<typeof DrawerPrimitive.Content>,
88
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
89
+ >(({ className, children, ...props }, ref) => (
90
+ <DrawerPortal>
91
+ <DrawerPrimitive.Content
92
+ ref={ref}
93
+ className={cn(
94
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
95
+ className
96
+ )}
97
+
98
+ {...props}
99
+ >
100
+ <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
101
+ {children}
102
+ <DrawerFooter />
103
+ </DrawerPrimitive.Content>
104
+ </DrawerPortal>
105
+ ))
106
+ DrawerContent.displayName = 'DrawerContent'
107
+
108
+ export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }
@@ -0,0 +1,108 @@
1
+ import * as React from 'react'
2
+ import { Drawer as DrawerPrimitive } from 'vaul'
3
+ import { cn } from '../@/lib/utils'
4
+
5
+ const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
6
+
7
+ Drawer.displayName = 'Drawer'
8
+
9
+ const DrawerTrigger = DrawerPrimitive.Trigger
10
+
11
+ const DrawerPortal = DrawerPrimitive.Portal
12
+
13
+ const DrawerClose = DrawerPrimitive.Close
14
+
15
+ const DrawerTitle = React.forwardRef<
16
+ React.ElementRef<typeof DrawerPrimitive.Title>,
17
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
18
+ >(({ className, ...props }, ref) => (
19
+ <DrawerPrimitive.Title
20
+ ref={ref}
21
+ className={cn(className)}
22
+ {...props}
23
+ />
24
+ ))
25
+ DrawerTitle.displayName = DrawerPrimitive.Title.displayName
26
+
27
+ const DrawerFooter: React.FC = () => (
28
+ <DrawerClose className="p-[16px]">
29
+ <svg
30
+ className="mx-auto"
31
+ width="38"
32
+ height="10"
33
+ viewBox="0 0 38 10"
34
+ fill="none"
35
+ xmlns="http://www.w3.org/2000/svg"
36
+ >
37
+ <path
38
+ 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"
39
+ fill="#243036"
40
+ fillOpacity="0.24"
41
+ />
42
+ </svg>
43
+ </DrawerClose>
44
+ )
45
+ type DrawerListProps = {
46
+ children: React.ReactNode
47
+ }
48
+ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
49
+ return (
50
+ <div
51
+ role="listbox"
52
+ className="px-[20px]"
53
+ >
54
+ {children}
55
+ </div>
56
+ )
57
+ }
58
+ type DrawerListItemProps = {
59
+ value: string
60
+ label: string | JSX.Element
61
+ isSelected?: boolean,
62
+ }
63
+ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
64
+ return (
65
+ <div
66
+ role="option"
67
+ aria-labelledby="1"
68
+ aria-selected={isSelected}
69
+ className="flex"
70
+ tabIndex={0}
71
+ >
72
+ <div className="shrink-0">
73
+ <p
74
+ className="font-medium text-[14px] text-muted leading-[1.4]"
75
+ id="1"
76
+ >
77
+ {label}
78
+ </p>
79
+ <p className="font-bold text-[20px] leading-[1.2]">{value}</p>
80
+ </div>
81
+ {isSelected && <span></span>}
82
+ </div>
83
+ )
84
+ }
85
+
86
+ const DrawerContent = React.forwardRef<
87
+ React.ElementRef<typeof DrawerPrimitive.Content>,
88
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
89
+ >(({ className, children, ...props }, ref) => (
90
+ <DrawerPortal>
91
+ <DrawerPrimitive.Content
92
+ ref={ref}
93
+ className={cn(
94
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
95
+ className
96
+ )}
97
+
98
+ {...props}
99
+ >
100
+ <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
101
+ {children}
102
+ <DrawerFooter />
103
+ </DrawerPrimitive.Content>
104
+ </DrawerPortal>
105
+ ))
106
+ DrawerContent.displayName = 'DrawerContent'
107
+
108
+ export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }
@@ -0,0 +1,20 @@
1
+ import * as React from 'react'
2
+ import * as LabelPrimitive from '@radix-ui/react-label'
3
+ import { cva, type VariantProps } from 'class-variance-authority'
4
+ import { cn } from '../@/lib/utils'
5
+
6
+ const labelVariants = cva('peer-disabled:opacity-70 font-medium text-[12px] leading-[1.33] peer-disabled:cursor-not-allowed')
7
+
8
+ const Label = React.forwardRef<
9
+ React.ElementRef<typeof LabelPrimitive.Root>,
10
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
11
+ >(({ className, ...props }, ref) => (
12
+ <LabelPrimitive.Root
13
+ ref={ref}
14
+ className={cn(labelVariants(), className)}
15
+ {...props}
16
+ />
17
+ ))
18
+ Label.displayName = LabelPrimitive.Root.displayName
19
+
20
+ export { Label }
@@ -0,0 +1 @@
1
+ export { Label } from './Label'
package/src/Page/Page.tsx CHANGED
@@ -8,7 +8,7 @@ type IPageProps = {
8
8
 
9
9
  const Page: FC<IPageProps> = ({children, className}) => {
10
10
  return (
11
- <div className={cn('sm:container bg-dashboard h-screen', className)}>
11
+ <div className={cn('sm:container bg-page h-screen', className)}>
12
12
  {children}
13
13
  </div>
14
14
  );
@@ -2,6 +2,18 @@ import React from 'react'
2
2
  import cn from 'classnames'
3
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip'
4
4
  import {TooltipProps} from "@radix-ui/react-tooltip";
5
+ //
6
+ const cssClass = `z-50 overflow-hidden
7
+ rounded-md border bg-popover px-3 py-1.5 text-sm
8
+ text-popover-foreground
9
+ shadow-md animate-in fade-in-0 zoom-in-95
10
+ data-[state=closed]:animate-out
11
+ data-[state=closed]:fade-out-0
12
+ data-[state=closed]:zoom-out-95
13
+ data-[side=bottom]:slide-in-from-top-2
14
+ data-[side=left]:slide-in-from-right-2
15
+ data-[side=right]:slide-in-from-left-2
16
+ data-[side=top]:slide-in-from-bottom-2`
5
17
  // import './ant-tooltip.styl'
6
18
 
7
19
  // "_error": mdStyle === "error",
@@ -31,10 +43,7 @@ const TooltipContent = React.forwardRef<
31
43
  <TooltipPrimitive.Content
32
44
  ref={ref}
33
45
  sideOffset={sideOffset}
34
- className={cn(
35
- 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
36
- className
37
- )}
46
+ className={cn(cssClass, className)}
38
47
  {...props}
39
48
  />
40
49
  ))
@@ -73,20 +73,20 @@
73
73
  --cl-red-6: #f9c1bd;
74
74
  --cl-red-7: #ffe9e9;
75
75
 
76
- /* --text-base: var(--cl-graphite-1); */
76
+ --text-base: var(--cl-graphite-1);
77
77
  --primary: var(--cl-blue-2);
78
- --primary-bg: var(--cl-blue-7);
79
- --success: var(--cl-graphite-1);
78
+ --primary-light: var(--cl-blue-7);
79
+ --success: var(--cl-green-3);
80
+ --success-light: var(--cl-green-7);
80
81
  --seconady: var(--cl-graphite-2);
81
82
  --tertiary: var(--cl-graphite-3);
82
83
  --muted: var(--cl-graphite-3);
83
84
  /* --text-quaternary:; */
84
85
 
85
- --app-bg: var(--cl-white);
86
- --app-cl: var(--text-cl);
86
+ --page-bg: var(--cl-white);
87
87
 
88
88
  /* ЦВЕТ КНОПОК */
89
-
89
+ /* =========================================== */
90
90
  --btn-primary: var(--cl-white);
91
91
  --btn-primary-bg: var(--cl-blue-2);
92
92
  --btn-primary-hover-bg: var(--cl-blue-3);
@@ -120,7 +120,23 @@
120
120
  --btn-txt-primary-hover: var(--cl-blue-3);
121
121
  --btn-txt-primary-focus: var(--cl-blue-3);
122
122
  --btn-txt-primary-active: var(--cl-blue-1);
123
+ /* =========================================== */
124
+ /* ЦВЕТ КНОПОК */
125
+
126
+
127
+ /* ЦВЕТ ПОЛЯ ВВОДА */
128
+ /* =========================================== */
129
+ --input-border-color: var(--cl-graphite-5);
130
+ /* --input-bg: var(); */
131
+ /* =========================================== */
132
+ /* ЦВЕТ ПОЛЯ ВВОДА */
133
+
134
+ --border-radius-1: 8px;
135
+
136
+ --shadow-1: 0px 4px 16px rgba(36, 48, 54, 0.08);
137
+ --shadow-2: 0 2px 10px rgba(36, 48, 54, 0.12);
123
138
  }
124
139
 
140
+
125
141
  .dark {}
126
142
  }
package/src/index.ts CHANGED
@@ -40,6 +40,7 @@ import {
40
40
  DrawerListItem
41
41
  } from './DasboardDrawer'
42
42
  import { Page } from "./Page";
43
+ import { Chip } from "./Chip";
43
44
 
44
45
  export {
45
46
  Tooltip,
@@ -74,5 +75,6 @@ export {
74
75
  BottomNavigationList,
75
76
  BottomNavigationListItem,
76
77
  BottomNavigationLink,
77
- Page
78
+ Page,
79
+ Chip,
78
80
  };
@@ -0,0 +1,37 @@
1
+ import * as React from 'react'
2
+ import { cn } from '../@/lib/utils'
3
+
4
+ const InputLabel = React.forwardRef<HTMLLabelElement, React.LabelHTMLAttributes<HTMLLabelElement>>(
5
+ ({ className, children, ...props }) => {
6
+ return (
7
+ <label
8
+ className={cn('text-[12px] leading-[1.33]', className)}
9
+ {...props}
10
+ >
11
+ {children}
12
+ </label>
13
+ )
14
+ }
15
+ )
16
+
17
+ InputLabel.displayName = 'InputLabel'
18
+
19
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
20
+
21
+ const InputField = React.forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {
22
+ return (
23
+ <input
24
+ type={type}
25
+ className={cn(
26
+ 'h-[44px] leading-[1.17] rounded-1 w-full border border-input bg-transparent transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
27
+ className
28
+ )}
29
+ ref={ref}
30
+ {...props}
31
+ />
32
+ )
33
+ })
34
+
35
+ InputField.displayName = 'InputField'
36
+
37
+ export { InputField, InputLabel }
@@ -0,0 +1 @@
1
+ export { InputField, InputLabel } from './Input'