@modul/mbui 0.0.5 → 0.0.6-beta-pv-52894-3a6d5f54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BottomNavigation/BottomNavigation.d.ts +13 -5
- package/dist/BottomNavigation/BottomNavigation.js +19 -28
- package/dist/BottomNavigation/BottomNavigation.js.map +1 -1
- package/dist/BottomNavigation/index.d.ts +1 -3
- package/dist/BottomNavigation/index.js +5 -3
- package/dist/BottomNavigation/index.js.map +1 -1
- package/package.json +1 -1
- package/src/BottomNavigation/BottomNavigation.tsx +45 -51
- package/src/BottomNavigation/index.ts +1 -6
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface BottomNavigationLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare type IProps = {
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const BottomNavigationLink: React.ForwardRefExoticComponent<BottomNavigationLinkProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const BottomNavigationListItem: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
11
|
+
declare const BottomNavigationList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
12
|
+
declare const BottomNavigation: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
13
|
+
export { BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink };
|
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BottomNavigation = void 0;
|
|
3
|
+
exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"\u0418\u0441\u0442\u043E\u0440\u0438\u044F")),
|
|
24
|
-
React.createElement("li", { className: "" },
|
|
25
|
-
React.createElement("a", { className: btnClasses, href: "" },
|
|
26
|
-
React.createElement(Icon_1.Services, { width: "24px", height: "24px", className: iconClasses }),
|
|
27
|
-
"\u0421\u0435\u0440\u0432\u0438\u0441\u044B")),
|
|
28
|
-
React.createElement("li", { className: "" },
|
|
29
|
-
React.createElement("button", { className: btnClasses },
|
|
30
|
-
React.createElement(Icon_1.ChatSolid, { width: "24px", height: "24px", className: iconClasses }),
|
|
31
|
-
"\u0427\u0430\u0442")))));
|
|
6
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
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';
|
|
9
|
+
const BottomNavigationLink = React.forwardRef(({ className, asChild, ...props }, ref) => {
|
|
10
|
+
const Comp = asChild ? react_slot_1.Slot : "button";
|
|
11
|
+
return (React.createElement(Comp, { className: (0, utils_1.cn)(btnClasses, className), ref: ref, ...props }));
|
|
12
|
+
});
|
|
13
|
+
exports.BottomNavigationLink = BottomNavigationLink;
|
|
14
|
+
BottomNavigationLink.displayName = 'BottomNavigationLink';
|
|
15
|
+
const BottomNavigationListItem = React.forwardRef(({ className, children }, ref) => (React.createElement("li", { className: className }, children)));
|
|
16
|
+
exports.BottomNavigationListItem = BottomNavigationListItem;
|
|
17
|
+
BottomNavigationListItem.displayName = 'BottomNavigationListItem';
|
|
18
|
+
const BottomNavigationList = React.forwardRef(({ className, children }, ref) => (React.createElement("ul", { className: "grid grid-flow-col" }, children)));
|
|
19
|
+
exports.BottomNavigationList = BottomNavigationList;
|
|
20
|
+
BottomNavigationList.displayName = 'BottomNavigationList';
|
|
21
|
+
const BottomNavigation = React.forwardRef(({ className, children }, ref) => {
|
|
22
|
+
return React.createElement("nav", { className: className }, children);
|
|
32
23
|
});
|
|
33
24
|
exports.BottomNavigation = BottomNavigation;
|
|
34
|
-
BottomNavigation.displayName =
|
|
25
|
+
BottomNavigation.displayName = 'BottomNavigation';
|
|
35
26
|
//# sourceMappingURL=BottomNavigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNavigation.js","sourceRoot":"","sources":["../../src/BottomNavigation/BottomNavigation.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,
|
|
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,KAAK,CAAC,UAAU,CAA+C,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrI,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,iBAAI,CAAC,CAAC,CAAC,QAAQ,CAAA;IACtC,OAAO,CACN,oBAAC,IAAI,IACJ,SAAS,EAAE,IAAA,UAAE,EAAC,UAAU,EAAE,SAAS,CAAC,EACpC,GAAG,EAAE,GAAG,KACJ,KAAK,GACR,CACF,CAAA;AACF,CAAC,CAAC,CAAA;AAmByE,oDAAoB;AAjB/F,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAEzD,MAAM,wBAAwB,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAU,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3F,4BAAI,SAAS,EAAE,SAAS,IAAG,QAAQ,CAAM,CACzC,CAAC,CAAA;AAa+C,4DAAwB;AAZzE,wBAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAA;AAEjE,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAU,EAAE,GAAG,EAAE,EAAE,CAAC,CACvF,4BAAI,SAAS,EAAC,oBAAoB,IAAE,QAAQ,CAAM,CAClD,CAAC,CAAA;AAQyB,oDAAoB;AAP/C,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAEzD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAU,EAAE,GAAG,EAAE,EAAE;IAClF,OAAO,6BAAK,SAAS,EAAE,SAAS,IAAG,QAAQ,CAAO,CAAA;AACnD,CAAC,CAAC,CAAA;AAGO,4CAAgB;AAFzB,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BottomNavigation = void 0;
|
|
4
|
-
|
|
3
|
+
exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = void 0;
|
|
4
|
+
var BottomNavigation_1 = require("./BottomNavigation");
|
|
5
5
|
Object.defineProperty(exports, "BottomNavigation", { enumerable: true, get: function () { return BottomNavigation_1.BottomNavigation; } });
|
|
6
|
-
exports
|
|
6
|
+
Object.defineProperty(exports, "BottomNavigationList", { enumerable: true, get: function () { return BottomNavigation_1.BottomNavigationList; } });
|
|
7
|
+
Object.defineProperty(exports, "BottomNavigationListItem", { enumerable: true, get: function () { return BottomNavigation_1.BottomNavigationListItem; } });
|
|
8
|
+
Object.defineProperty(exports, "BottomNavigationLink", { enumerable: true, get: function () { return BottomNavigation_1.BottomNavigationLink; } });
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/BottomNavigation/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/BottomNavigation/index.ts"],"names":[],"mappings":";;;AAAA,uDAA2H;AAAlH,oHAAA,gBAAgB,OAAA;AAAE,wHAAA,oBAAoB,OAAA;AAAE,4HAAA,wBAAwB,OAAA;AAAE,wHAAA,oBAAoB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,51 +1,45 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
BottomNavigation.displayName = "BottomNavigation"
|
|
50
|
-
|
|
51
|
-
export { BottomNavigation }
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
+
import { cn } from '../@/lib/utils'
|
|
4
|
+
|
|
5
|
+
export interface BottomNavigationLinkProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
asChild?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type IProps = {
|
|
10
|
+
className?: string
|
|
11
|
+
children: React.ReactNode
|
|
12
|
+
}
|
|
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'
|
|
16
|
+
|
|
17
|
+
const BottomNavigationLink = React.forwardRef<HTMLButtonElement, BottomNavigationLinkProps>(({ className, asChild, ...props }, ref) => {
|
|
18
|
+
const Comp = asChild ? Slot : "button"
|
|
19
|
+
return (
|
|
20
|
+
<Comp
|
|
21
|
+
className={cn(btnClasses, className)}
|
|
22
|
+
ref={ref}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
BottomNavigationLink.displayName = 'BottomNavigationLink'
|
|
29
|
+
|
|
30
|
+
const BottomNavigationListItem = React.forwardRef(({ className, children }: IProps, ref) => (
|
|
31
|
+
<li className={className}>{children}</li>
|
|
32
|
+
))
|
|
33
|
+
BottomNavigationListItem.displayName = 'BottomNavigationListItem'
|
|
34
|
+
|
|
35
|
+
const BottomNavigationList = React.forwardRef(({ className, children }: IProps, ref) => (
|
|
36
|
+
<ul className="grid grid-flow-col">{children}</ul>
|
|
37
|
+
))
|
|
38
|
+
BottomNavigationList.displayName = 'BottomNavigationList'
|
|
39
|
+
|
|
40
|
+
const BottomNavigation = React.forwardRef(({ className, children }: IProps, ref) => {
|
|
41
|
+
return <nav className={className}>{children}</nav>
|
|
42
|
+
})
|
|
43
|
+
BottomNavigation.displayName = 'BottomNavigation'
|
|
44
|
+
|
|
45
|
+
export { BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink }
|