@modul/mbui 0.0.9 → 0.0.10-beta-pv-52970-94a621d3

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.
Files changed (49) hide show
  1. package/dist/BottomNavigation/BottomNavigation.js +1 -1
  2. package/dist/BottomNavigation/BottomNavigation.js.map +1 -1
  3. package/dist/Button/Button.js +2 -2
  4. package/dist/Button/index.d.ts +1 -1
  5. package/dist/Button/index.js +2 -1
  6. package/dist/Button/index.js.map +1 -1
  7. package/dist/Chip/Chip.d.ts +11 -0
  8. package/dist/Chip/Chip.js +38 -0
  9. package/dist/Chip/Chip.js.map +1 -0
  10. package/dist/Chip/index.d.ts +1 -0
  11. package/dist/Chip/index.js +6 -0
  12. package/dist/Chip/index.js.map +1 -0
  13. package/dist/{DasboardDrawer → DashboardDrawer}/DashboardDrawer.d.ts +2 -1
  14. package/dist/{DasboardDrawer → DashboardDrawer}/DashboardDrawer.js +11 -8
  15. package/dist/DashboardDrawer/DashboardDrawer.js.map +1 -0
  16. package/dist/DashboardDrawer/index.js.map +1 -0
  17. package/dist/Page/Page.d.ts +4 -3
  18. package/dist/Page/Page.js +7 -1
  19. package/dist/Page/Page.js.map +1 -1
  20. package/dist/Page/index.d.ts +1 -1
  21. package/dist/Page/index.js +2 -1
  22. package/dist/Page/index.js.map +1 -1
  23. package/dist/index.d.ts +4 -2
  24. package/dist/index.js +12 -8
  25. package/dist/index.js.map +1 -1
  26. package/package.json +14 -11
  27. package/src/@/config/index.ts +22 -9
  28. package/src/@/config/label.ts +89 -0
  29. package/src/BottomNavigation/BottomNavigation.tsx +1 -2
  30. package/src/Button/Button.tsx +2 -2
  31. package/src/Button/index.ts +1 -1
  32. package/src/Chip/Chip.tsx +54 -0
  33. package/src/Chip/index.ts +1 -0
  34. package/src/DashboardDrawer/DashboardDrawer.tsx +119 -0
  35. package/src/Drawer/BottomDrawer.tsx +108 -0
  36. package/src/{DasboardDrawer → Drawer}/DashboardDrawer.tsx +4 -2
  37. package/src/Label/Label.tsx +20 -0
  38. package/src/Label/index.ts +1 -0
  39. package/src/Page/Page.tsx +13 -3
  40. package/src/Page/index.ts +1 -1
  41. package/src/assets/css/global.css +24 -6
  42. package/src/index.ts +6 -2
  43. package/src/input/Input.tsx +35 -0
  44. package/src/input/index.ts +1 -0
  45. package/dist/DasboardDrawer/DashboardDrawer.js.map +0 -1
  46. package/dist/DasboardDrawer/index.js.map +0 -1
  47. /package/dist/{DasboardDrawer → DashboardDrawer}/index.d.ts +0 -0
  48. /package/dist/{DasboardDrawer → DashboardDrawer}/index.js +0 -0
  49. /package/src/{DasboardDrawer → DashboardDrawer}/index.ts +0 -0
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = (0, tslib_1.__importStar)(require("react"));
6
6
  const react_slot_1 = require("@radix-ui/react-slot");
7
7
  const utils_1 = require("../@/lib/utils");
8
- const btnClasses = 'inline-flex flex-col gap-y-[8px] place-items-center hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active p-[8px] w-full text-[10px] text-center hover:text-primary leading-[1.33] transition duration-300';
8
+ const btnClasses = 'inline-flex flex-col place-items-center gap-y-[8px] hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active p-[8px] w-full text-[10px] text-center text-light hover:text-primary data-[status=active]:text-primary leading-[1.33] transition duration-300';
9
9
  const BottomNavigationLink = React.forwardRef(({ className, asChild, ...props }, ref) => {
10
10
  const Comp = asChild ? react_slot_1.Slot : "button";
11
11
  return (React.createElement(Comp, { className: (0, utils_1.cn)(btnClasses, className), ref: ref, ...props }));
@@ -1 +1 @@
1
- {"version":3,"file":"BottomNavigation.js","sourceRoot":"","sources":["../../src/BottomNavigation/BottomNavigation.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,qDAA2C;AAC3C,0CAAmC;AAWnC,MAAM,UAAU,GACf,mOAAmO,CAAA;AAEpO,MAAM,oBAAoB,GAAG,KAA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AAS,IAAG,QAAQ,CAAO,CAAA;AACnD,CAAC,CAAC,CAAA;AAGO,4CAAgB;AAFzB,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA"}
@@ -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)))));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashboardDrawer.js","sourceRoot":"","sources":["../../src/DashboardDrawer/DashboardDrawer.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,+BAAgD;AAChD,kCAA+B;AAC/B,0CAAmC;AAEnC,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,EAAqD,EAAE,EAAE,CAAC,oBAAC,aAAe,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AAiH9G,wBAAM;AA/Gf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,MAAM,aAAa,GAAG,aAAe,CAAC,OAAO,CAAA;AA6G5B,sCAAa;AA3G9B,MAAM,YAAY,GAAG,aAAe,CAAC,MAAM,CAAA;AAE3C,MAAM,WAAW,GAAG,aAAe,CAAC,KAAK,CAAA;AAyGM,kCAAW;AAvG1D,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,SAAS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AAC,CAC7C,oBAAC,YAAY;IACZ,oBAAC,aAAe,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACZ,4GAA4G,EAC5G,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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/DashboardDrawer/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"}
@@ -1,7 +1,8 @@
1
1
  import React, { FC } from 'react';
2
- declare type IPageProps = {
2
+ declare type IProps = {
3
3
  children?: React.ReactNode;
4
4
  className?: string;
5
5
  };
6
- declare const Page: FC<IPageProps>;
7
- export { Page };
6
+ declare const PageNavbar: FC<IProps>;
7
+ declare const Page: FC<IProps>;
8
+ export { Page, PageNavbar };
package/dist/Page/Page.js CHANGED
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Page = void 0;
3
+ exports.PageNavbar = exports.Page = void 0;
4
4
  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
+ const PageNavbar = ({ children, className }) => {
8
+ return react_1.default.createElement("div", { className: (0, utils_1.cn)('flex items-center h-[44px] px-[20px]', className) }, children);
9
+ };
10
+ exports.PageNavbar = PageNavbar;
11
+ PageNavbar.displayName = 'PageNavbar';
7
12
  const Page = ({ children, className }) => {
8
13
  return (react_1.default.createElement("div", { className: (0, utils_1.cn)('sm:container bg-page h-screen', className) }, children));
9
14
  };
10
15
  exports.Page = Page;
16
+ Page.displayName = 'Page';
11
17
  //# 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,+BAA+B,EAAE,SAAS,CAAC,IAC5D,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,UAAU,GAAe,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,EAAE,EAAE;IACxD,OAAO,uCAAK,SAAS,EAAE,IAAA,UAAE,EAAC,sCAAsC,EAAE,SAAS,CAAC,IAC1E,QAAQ,CACJ,CAAA;AACP,CAAC,CAAA;AAcc,gCAAU;AAZzB,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,MAAM,IAAI,GAAe,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAC,EAAE,EAAE;IAClD,OAAO,CACN,uCAAK,SAAS,EAAE,IAAA,UAAE,EAAC,+BAA+B,EAAE,SAAS,CAAC,IAC5D,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAA;AAIQ,oBAAI;AAFb,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA"}
@@ -1 +1 @@
1
- export { Page } from './Page';
1
+ export { Page, PageNavbar } from './Page';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Page = void 0;
3
+ exports.PageNavbar = exports.Page = void 0;
4
4
  var Page_1 = require("./Page");
5
5
  Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
6
+ Object.defineProperty(exports, "PageNavbar", { enumerable: true, get: function () { return Page_1.PageNavbar; } });
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Page/index.ts"],"names":[],"mappings":";;;AAAA,+BAA6B;AAApB,4FAAA,IAAI,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Page/index.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AAAhC,4FAAA,IAAI,OAAA;AAAE,kGAAA,UAAU,OAAA"}
package/dist/index.d.ts CHANGED
@@ -12,6 +12,8 @@ import { Button } from "./Button";
12
12
  import { Input } from "./Base/Input";
13
13
  import { Audio } from "./Audio";
14
14
  import { cn } from "./@/lib/utils";
15
- import { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem } from './DasboardDrawer';
15
+ import { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerList, DrawerListItem } from './DashboardDrawer';
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 { PageNavbar } from "./Page";
18
+ import { Chip } from "./Chip";
19
+ 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, PageNavbar, 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.PageNavbar = 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; } });
@@ -42,13 +42,17 @@ const Audio_1 = require("./Audio");
42
42
  Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return Audio_1.Audio; } });
43
43
  const utils_1 = require("./@/lib/utils");
44
44
  Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return utils_1.cn; } });
45
- const DasboardDrawer_1 = require("./DasboardDrawer");
46
- Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return DasboardDrawer_1.Drawer; } });
47
- Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerTrigger; } });
48
- Object.defineProperty(exports, "DrawerClose", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerClose; } });
49
- Object.defineProperty(exports, "DrawerContent", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerContent; } });
50
- Object.defineProperty(exports, "DrawerList", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerList; } });
51
- Object.defineProperty(exports, "DrawerListItem", { enumerable: true, get: function () { return DasboardDrawer_1.DrawerListItem; } });
45
+ const DashboardDrawer_1 = require("./DashboardDrawer");
46
+ Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return DashboardDrawer_1.Drawer; } });
47
+ Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerTrigger; } });
48
+ Object.defineProperty(exports, "DrawerClose", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerClose; } });
49
+ Object.defineProperty(exports, "DrawerContent", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerContent; } });
50
+ Object.defineProperty(exports, "DrawerList", { enumerable: true, get: function () { return DashboardDrawer_1.DrawerList; } });
51
+ Object.defineProperty(exports, "DrawerListItem", { enumerable: true, get: function () { return DashboardDrawer_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 Page_2 = require("./Page");
55
+ Object.defineProperty(exports, "PageNavbar", { enumerable: true, get: function () { return Page_2.PageNavbar; } });
56
+ const Chip_1 = require("./Chip");
57
+ Object.defineProperty(exports, "Chip", { enumerable: true, get: function () { return Chip_1.Chip; } });
54
58
  //# 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,aAAK,OAgCR;AA/BN,mCAAgC;AAgC/B,sFAhCQ,aAAK,OAgCR;AA/BN,yCAAmC;AAgClC,mFA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N,mCAAgC;AAkC/B,sFAlCQ,aAAK,OAkCR;AAjCN,yCAAmC;AAkClC,mFAlCQ,UAAE,OAkCR;AAjCH,uDAO0B;AA4BzB,uFAlCA,wBAAM,OAkCA;AACN,8FAlCA,+BAAa,OAkCA;AACb,4FAlCA,6BAAW,OAkCA;AACX,8FAlCA,+BAAa,OAkCA;AACb,2FAlCA,4BAAU,OAkCA;AACV,+FAlCA,gCAAc,OAkCA;AAhCf,iCAA8B;AAqC7B,qFArCQ,WAAI,OAqCR;AApCL,iCAAoC;AAqCnC,2FArCQ,iBAAU,OAqCR;AApCX,iCAA8B;AAqC7B,qFArCQ,WAAI,OAqCR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.9",
3
+ "version": "0.0.10-beta-pv-52970-94a621d3",
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,16 @@ export default {
9
10
  },
10
11
  extend: {
11
12
  colors: {
12
- muted: 'var(--muted)',
13
+ light: 'var(--light)',
14
+ dark: 'var(--dark)',
13
15
  primary: {
14
16
  DEFAULT: 'var(--primary)',
15
17
  hover: 'var(--primary-hover)',
16
18
  focus: 'var(var(--primary-focus)',
17
19
  active: 'var(--primary-active)',
20
+ light: {
21
+ DEFAULT: 'var(--primary-light)'
22
+ }
18
23
  },
19
24
  success: {
20
25
  DEFAULT: 'var(--success)',
@@ -28,20 +33,28 @@ export default {
28
33
  focus: 'var(var(--secondary-focus)',
29
34
  active: 'var(--secondary-active)',
30
35
  },
36
+ muted: 'var(--muted)',
31
37
  transparent: 'transparent',
32
38
  current: 'currentColor',
33
39
  },
34
40
  textColor: {
35
- ...button.textColor
41
+ ...button.textColor,
42
+ ...label.textColor
36
43
  },
37
44
  backgroundColor: {
38
- page: {
39
- DEFAULT: 'var(--page-bg)'
40
- },
41
- primary: {
42
- DEFAULT: 'var(--primary-bg)'
43
- },
44
- ...button.backgroundColor
45
+ page: 'var(--page-bg)',
46
+ ...button.backgroundColor,
47
+ ...label.backgroundColor
48
+ },
49
+ dropShadow: {
50
+ '1': 'var(--shadow-1)',
51
+ '2': 'var(--shadow-2)',
52
+ },
53
+ borderColor: {
54
+ ...button.borderColor
55
+ },
56
+ borderRadius: {
57
+ '1': 'var(--border-radius-1)',
45
58
  },
46
59
  keyframes: {
47
60
  '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
+ }
@@ -11,8 +11,7 @@ export type IProps = {
11
11
  children: React.ReactNode
12
12
  }
13
13
 
14
- const btnClasses =
15
- 'inline-flex flex-col gap-y-[8px] place-items-center hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active p-[8px] w-full text-[10px] text-center hover:text-primary leading-[1.33] transition duration-300'
14
+ const btnClasses = 'inline-flex flex-col place-items-center gap-y-[8px] hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active p-[8px] w-full text-[10px] text-center text-light hover:text-primary data-[status=active]:text-primary leading-[1.33] transition duration-300'
16
15
 
17
16
  const BottomNavigationLink = React.forwardRef<HTMLButtonElement, BottomNavigationLinkProps>(({ className, asChild, ...props }, ref) => {
18
17
  const Comp = asChild ? Slot : "button"
@@ -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'
@@ -0,0 +1,119 @@
1
+ import * as React from 'react'
2
+ import { Drawer as DrawerPrimitive } from 'vaul'
3
+ import { Check } from '../Icon'
4
+ import { cn } from '../@/lib/utils'
5
+
6
+ const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
7
+
8
+ Drawer.displayName = 'Drawer'
9
+
10
+ const DrawerTrigger = DrawerPrimitive.Trigger
11
+
12
+ const DrawerPortal = DrawerPrimitive.Portal
13
+
14
+ const DrawerClose = DrawerPrimitive.Close
15
+
16
+ const DrawerTitle = React.forwardRef<
17
+ React.ElementRef<typeof DrawerPrimitive.Title>,
18
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
19
+ >(({ className, ...props }, ref) => (
20
+ <DrawerPrimitive.Title
21
+ ref={ref}
22
+ className={cn(className)}
23
+ {...props}
24
+ />
25
+ ))
26
+ DrawerTitle.displayName = DrawerPrimitive.Title.displayName
27
+
28
+ const DrawerFooter: React.FC = () => (
29
+ <DrawerClose className="p-[16px]">
30
+ <svg
31
+ className="mx-auto"
32
+ width="38"
33
+ height="10"
34
+ viewBox="0 0 38 10"
35
+ fill="none"
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ >
38
+ <path
39
+ 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"
40
+ fill="#243036"
41
+ fillOpacity="0.24"
42
+ />
43
+ </svg>
44
+ </DrawerClose>
45
+ )
46
+ type DrawerListProps = {
47
+ children: React.ReactNode
48
+ }
49
+ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
50
+ return (
51
+ <div
52
+ role="list"
53
+ className="px-[20px] divide-y"
54
+ >
55
+ {children}
56
+ </div>
57
+ )
58
+ }
59
+ type DrawerListItemProps = {
60
+ value: string
61
+ label: string | JSX.Element
62
+ isActive?: boolean
63
+ onClick?: () => void
64
+ }
65
+ const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isActive, onClick }) => {
66
+ return (
67
+ <button
68
+ className="flex py-[16px] w-full text-left"
69
+ role="listitem"
70
+ aria-selected={isActive}
71
+ aria-labelledby="1"
72
+ onClick={onClick}
73
+ >
74
+ <span className="w-[calc(100%-50px)]">
75
+ <span
76
+ className="flex [&+span]:mt-[4px] font-medium text-[14px] text-muted leading-[1.28]"
77
+ id="1"
78
+ >
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>
95
+ )
96
+ }
97
+
98
+ const DrawerContent = React.forwardRef<
99
+ React.ElementRef<typeof DrawerPrimitive.Content>,
100
+ React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
101
+ >(({ className, children, ...props }, ref) => (
102
+ <DrawerPortal>
103
+ <DrawerPrimitive.Content
104
+ ref={ref}
105
+ className={cn(
106
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
107
+ className
108
+ )}
109
+ {...props}
110
+ >
111
+ <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
112
+ {children}
113
+ <DrawerFooter />
114
+ </DrawerPrimitive.Content>
115
+ </DrawerPortal>
116
+ ))
117
+ DrawerContent.displayName = 'DrawerContent'
118
+
119
+ 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 }
@@ -3,6 +3,7 @@ import { Drawer as DrawerPrimitive } from 'vaul'
3
3
  import { cn } from '../@/lib/utils'
4
4
 
5
5
  const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
6
+
6
7
  Drawer.displayName = 'Drawer'
7
8
 
8
9
  const DrawerTrigger = DrawerPrimitive.Trigger
@@ -48,7 +49,7 @@ const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
48
49
  return (
49
50
  <div
50
51
  role="listbox"
51
- className="px-[12px] py-[20px]"
52
+ className="px-[20px]"
52
53
  >
53
54
  {children}
54
55
  </div>
@@ -90,9 +91,10 @@ const DrawerContent = React.forwardRef<
90
91
  <DrawerPrimitive.Content
91
92
  ref={ref}
92
93
  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
+ 'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
94
95
  className
95
96
  )}
97
+
96
98
  {...props}
97
99
  >
98
100
  <DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
@@ -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
@@ -1,12 +1,20 @@
1
1
  import React, {FC} from 'react';
2
2
  import { cn } from '../@/lib/utils';
3
3
 
4
- type IPageProps = {
4
+ type IProps = {
5
5
  children?: React.ReactNode,
6
6
  className?: string
7
7
  }
8
8
 
9
- const Page: FC<IPageProps> = ({children, className}) => {
9
+ const PageNavbar: FC<IProps> = ({children, className}) => {
10
+ return <div className={cn('flex items-center h-[44px] px-[20px]', className)}>
11
+ {children}
12
+ </div>
13
+ }
14
+
15
+ PageNavbar.displayName = 'PageNavbar'
16
+
17
+ const Page: FC<IProps> = ({children, className}) => {
10
18
  return (
11
19
  <div className={cn('sm:container bg-page h-screen', className)}>
12
20
  {children}
@@ -14,4 +22,6 @@ const Page: FC<IPageProps> = ({children, className}) => {
14
22
  );
15
23
  }
16
24
 
17
- export { Page };
25
+ Page.displayName = 'Page'
26
+
27
+ export { Page, PageNavbar };
package/src/Page/index.ts CHANGED
@@ -1 +1 @@
1
- export { Page } from './Page'
1
+ export { Page, PageNavbar } from './Page'
@@ -73,19 +73,21 @@
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
- --tertiary: var(--cl-graphite-3);
82
- --muted: var(--cl-graphite-3);
82
+ --light: var(--cl-graphite-3);
83
+ --dark: var(--cl-graphite-2);
84
+ --disabled: var(--cl-graphite-4);
83
85
  /* --text-quaternary:; */
84
86
 
85
87
  --page-bg: var(--cl-white);
86
88
 
87
89
  /* ЦВЕТ КНОПОК */
88
-
90
+ /* =========================================== */
89
91
  --btn-primary: var(--cl-white);
90
92
  --btn-primary-bg: var(--cl-blue-2);
91
93
  --btn-primary-hover-bg: var(--cl-blue-3);
@@ -119,7 +121,23 @@
119
121
  --btn-txt-primary-hover: var(--cl-blue-3);
120
122
  --btn-txt-primary-focus: var(--cl-blue-3);
121
123
  --btn-txt-primary-active: var(--cl-blue-1);
124
+ /* =========================================== */
125
+ /* ЦВЕТ КНОПОК */
126
+
127
+
128
+ /* ЦВЕТ ПОЛЯ ВВОДА */
129
+ /* =========================================== */
130
+ --input-border-color: var(--cl-graphite-5);
131
+ /* --input-bg: var(); */
132
+ /* =========================================== */
133
+ /* ЦВЕТ ПОЛЯ ВВОДА */
134
+
135
+ --border-radius-1: 8px;
136
+
137
+ --shadow-1: 0px 4px 16px rgba(36, 48, 54, 0.08);
138
+ --shadow-2: 0 2px 10px rgba(36, 48, 54, 0.12);
122
139
  }
123
140
 
141
+
124
142
  .dark {}
125
143
  }
package/src/index.ts CHANGED
@@ -38,8 +38,10 @@ import {
38
38
  DrawerContent,
39
39
  DrawerList,
40
40
  DrawerListItem
41
- } from './DasboardDrawer'
41
+ } from './DashboardDrawer'
42
42
  import { Page } from "./Page";
43
+ import { PageNavbar } from "./Page";
44
+ import { Chip } from "./Chip";
43
45
 
44
46
  export {
45
47
  Tooltip,
@@ -74,5 +76,7 @@ export {
74
76
  BottomNavigationList,
75
77
  BottomNavigationListItem,
76
78
  BottomNavigationLink,
77
- Page
79
+ Page,
80
+ PageNavbar,
81
+ Chip,
78
82
  };
@@ -0,0 +1,35 @@
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
+ const InputField = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(({ className, type, ...props }, ref) => {
20
+ return (
21
+ <input
22
+ type={type}
23
+ className={cn(
24
+ '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',
25
+ className
26
+ )}
27
+ ref={ref}
28
+ {...props}
29
+ />
30
+ )
31
+ })
32
+
33
+ InputField.displayName = 'InputField'
34
+
35
+ export { InputField, InputLabel }
@@ -0,0 +1 @@
1
+ export { InputField, InputLabel } from './Input'
@@ -1 +0,0 @@
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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