@tmlmobilidade/ui 20250305.1816.36 → 20250306.1249.35
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/cjs/index.js +7 -20
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/common/Menu/index.d.ts +4 -2
- package/dist/cjs/types/src/components/layout/AppWrapper/Header/index.d.ts +2 -1
- package/dist/cjs/types/src/components/layout/AppWrapper/index.d.ts +6 -3
- package/dist/esm/index.js +8 -21
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/common/Menu/index.d.ts +4 -2
- package/dist/esm/types/src/components/layout/AppWrapper/Header/index.d.ts +2 -1
- package/dist/esm/types/src/components/layout/AppWrapper/index.d.ts +6 -3
- package/dist/index.d.ts +9 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -1275,8 +1275,8 @@ Menu.Target = function MenuTarget(props) {
|
|
1275
1275
|
Menu.Dropdown = function MenuDropdown(props) {
|
1276
1276
|
return jsxRuntimeExports.jsx(core.Menu.Dropdown, { ...props, className: styles$i.dropdown });
|
1277
1277
|
};
|
1278
|
-
Menu.Item = function MenuItem(props) {
|
1279
|
-
return jsxRuntimeExports.jsx(core.Menu.Item, {
|
1278
|
+
Menu.Item = function MenuItem({ href, ...props }) {
|
1279
|
+
return (jsxRuntimeExports.jsx(core.Menu.Item, { className: styles$i.item, component: href ? 'a' : undefined, href: href, ...props }));
|
1280
1280
|
};
|
1281
1281
|
Menu.Divider = function MenuDivider(props) {
|
1282
1282
|
return jsxRuntimeExports.jsx(core.Menu.Divider, { ...props, className: styles$i.divider });
|
@@ -1565,7 +1565,7 @@ function useIsActiveDomain(domain) {
|
|
1565
1565
|
React.useEffect(() => {
|
1566
1566
|
const handleRouteChange = () => {
|
1567
1567
|
const currentDomain = window.location.hostname;
|
1568
|
-
if (domain
|
1568
|
+
if (domain.includes(currentDomain)) {
|
1569
1569
|
setIsActive(true);
|
1570
1570
|
}
|
1571
1571
|
else {
|
@@ -1612,45 +1612,32 @@ function SidebarItem({ classNames, disabled, href, icon, label, }) {
|
|
1612
1612
|
}), children: typeof icon === 'string' ? generateIcon(icon) : icon }) }) }));
|
1613
1613
|
}
|
1614
1614
|
|
1615
|
-
/* * */
|
1616
|
-
function AppOptions() {
|
1617
|
-
//
|
1618
|
-
//
|
1619
|
-
// A. Setup variables
|
1620
|
-
//
|
1621
|
-
// B. Handle actions
|
1622
|
-
//
|
1623
|
-
// C. Render components
|
1624
|
-
return (jsxRuntimeExports.jsxs(Menu, { offset: 15, position: "bottom-end", shadow: "lg", children: [jsxRuntimeExports.jsx(Menu.Target, { children: jsxRuntimeExports.jsx(ActionIcon, { color: "gray", variant: "muted", children: jsxRuntimeExports.jsx(Icon.IconSettings, { size: 20 }) }) }), jsxRuntimeExports.jsxs(Menu.Dropdown, { children: [jsxRuntimeExports.jsx(Menu.Divider, {}), jsxRuntimeExports.jsxs(Menu.Item, { color: "red", children: [jsxRuntimeExports.jsx(Icon.IconLogin, { size: 20 }), "Logout"] }), jsxRuntimeExports.jsx(Menu.Divider, {})] })] }));
|
1625
|
-
//
|
1626
|
-
}
|
1627
|
-
|
1628
1615
|
var styles$6 = {"container":"styles-module_container__G0H4W","greeting":"styles-module_greeting__Zw9r-","options":"styles-module_options__RyJJ1"};
|
1629
1616
|
|
1630
1617
|
/* * */
|
1631
1618
|
const greetings = ['Olá', 'Hi', 'Hey', 'Oi', 'Hallo', 'Ciao', 'Hej'];
|
1632
1619
|
/* * */
|
1633
|
-
function Header() {
|
1620
|
+
function Header({ user_name }) {
|
1634
1621
|
//
|
1635
1622
|
//
|
1636
1623
|
// A. Setup variables
|
1637
1624
|
const [drawnGreeting] = React.useState(greetings[(greetings.length * Math.random()) | 0]);
|
1638
1625
|
//
|
1639
1626
|
// B. Render components
|
1640
|
-
return (jsxRuntimeExports.jsxs("div", { className: styles$6.container, children: [jsxRuntimeExports.
|
1627
|
+
return (jsxRuntimeExports.jsxs("div", { className: styles$6.container, children: [jsxRuntimeExports.jsxs("p", { className: styles$6.greeting, children: [drawnGreeting, " ", user_name] }), jsxRuntimeExports.jsx("div", { className: styles$6.options })] }));
|
1641
1628
|
//
|
1642
1629
|
}
|
1643
1630
|
|
1644
1631
|
var styles$5 = {"container":"styles-module_container__V2XNO","appIcon":"styles-module_appIcon__QFZYG","content":"styles-module_content__N1Zgw"};
|
1645
1632
|
|
1646
|
-
function AppWrapper({ children, icon, sidebarItems, }) {
|
1633
|
+
function AppWrapper({ children, headerProps, icon, sidebarItems, }) {
|
1647
1634
|
const appIcon = () => {
|
1648
1635
|
if (icon && typeof icon === 'object' && 'href' in icon) {
|
1649
1636
|
return jsxRuntimeExports.jsx("a", { href: icon.href, children: icon.icon });
|
1650
1637
|
}
|
1651
1638
|
return icon;
|
1652
1639
|
};
|
1653
|
-
return (jsxRuntimeExports.jsxs("div", { className: styles$5.container, children: [jsxRuntimeExports.jsx("div", { className: styles$5.appIcon, children: appIcon() }), jsxRuntimeExports.jsx(Header, {}), jsxRuntimeExports.jsx(Sidebar, { items: sidebarItems }), jsxRuntimeExports.jsx("div", { className: styles$5.content, children: children })] }));
|
1640
|
+
return (jsxRuntimeExports.jsxs("div", { className: styles$5.container, children: [jsxRuntimeExports.jsx("div", { className: styles$5.appIcon, children: appIcon() }), jsxRuntimeExports.jsx(Header, { ...headerProps }), jsxRuntimeExports.jsx(Sidebar, { items: sidebarItems }), jsxRuntimeExports.jsx("div", { className: styles$5.content, children: children })] }));
|
1654
1641
|
}
|
1655
1642
|
|
1656
1643
|
var styles$4 = {"container":"styles-module_container__u-Ao-","hAlignstart":"styles-module_hAlignstart__Poz-6","hAligncenter":"styles-module_hAligncenter__-8-PQ","hAlignend":"styles-module_hAlignend__9-hiG","vAlignstart":"styles-module_vAlignstart__UHr2W","vAligncenter":"styles-module_vAligncenter__AI3ka","vAlignend":"styles-module_vAlignend__Ufwik","gapnone":"styles-module_gapnone__yv7lm","gapxs":"styles-module_gapxs__qCDUv","gapsm":"styles-module_gapsm__9Pnop","gapmd":"styles-module_gapmd__9lCqV","gaplg":"styles-module_gaplg__kvQt9","gapxl":"styles-module_gapxl__5-mrY","a":"styles-module_a__NDsdd","aab":"styles-module_aab__xvehZ","ab":"styles-module_ab__JtDDA","abb":"styles-module_abb__jlnJf","abc":"styles-module_abc__XRK-M","abcd":"styles-module_abcd__3jl83"};
|