@giddaa-housing/ui 3.0.1 → 3.1.0
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/css/generated/shared.css +1 -1
- package/css/giddaa.css +162 -0
- package/css/preset.css +8 -1
- package/dist/activity-timeline.js +3 -3
- package/dist/auth-layout.js +18 -18
- package/dist/bar-chart.d.ts +1 -1
- package/dist/bullet-chart.d.ts +1 -1
- package/dist/button-group.d.ts +1 -1
- package/dist/carousel.d.ts +1 -1
- package/dist/chart.d.ts +1 -1
- package/dist/combobox.d.ts +1 -1
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/footer.d.ts +4 -2
- package/dist/footer.js +38 -34
- package/dist/funnel-chart.d.ts +1 -1
- package/dist/heatmap-chart.d.ts +1 -1
- package/dist/input-group.js +4 -5
- package/dist/input-size-context.js +4 -2
- package/dist/input.js +1 -1
- package/dist/line-chart.d.ts +1 -1
- package/dist/mask-input.d.ts +61 -0
- package/dist/mask-input.js +0 -0
- package/dist/mobile-sidebar.d.ts +57 -0
- package/dist/mobile-sidebar.js +196 -0
- package/dist/number-input.d.ts +1 -1
- package/dist/phone-input.d.ts +1 -1
- package/dist/pie-chart.d.ts +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/radar-chart.d.ts +1 -1
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/{size-context-D4mYvcg8.d.ts → size-context-BX6kAdVj.d.ts} +2 -1
- package/dist/size-context.d.ts +2 -2
- package/dist/size-context.js +5 -2
- package/dist/sparkline.d.ts +1 -1
- package/dist/styles.css +505 -111
- package/dist/table.js +2 -2
- package/dist/tabs.d.ts +1 -1
- package/dist/tag.d.ts +1 -1
- package/dist/top-navbar.d.ts +100 -0
- package/dist/top-navbar.js +295 -0
- package/dist/tree-map.d.ts +1 -1
- package/dist/waterfall-chart.d.ts +1 -1
- package/package.json +13 -1
package/dist/table.js
CHANGED
|
@@ -16,7 +16,7 @@ function getPinnedDividerClassName(pinnedSide) {
|
|
|
16
16
|
function Table({ className, containerClassName, ...props }) {
|
|
17
17
|
return /* @__PURE__ */ jsx("div", {
|
|
18
18
|
"data-slot": "table-container",
|
|
19
|
-
className: cn("relative w-full overflow-x-auto rounded-2xl border border-line-subtle bg-canvas", containerClassName),
|
|
19
|
+
className: cn("relative isolate w-full overflow-x-auto rounded-2xl border border-line-subtle bg-canvas", containerClassName),
|
|
20
20
|
children: /* @__PURE__ */ jsx("table", {
|
|
21
21
|
"data-slot": "table",
|
|
22
22
|
className: cn("min-w-full caption-bottom", className),
|
|
@@ -79,7 +79,7 @@ function TableRow({ className, ...props }) {
|
|
|
79
79
|
function TableHead({ className, pinnedSide, ...props }) {
|
|
80
80
|
return /* @__PURE__ */ jsx("th", {
|
|
81
81
|
"data-slot": "table-head",
|
|
82
|
-
className: cn("relative h-14 px-6 py-4 text-left align-middle bg-surface-raised", "text-gdt-sm font-semibold text-fg-secondary", "break-words has-[[role=checkbox]]:pr-0", getPinnedDividerClassName(pinnedSide), className),
|
|
82
|
+
className: cn("relative h-14 px-6 py-4 text-left align-middle bg-surface-raised first:rounded-tl-2xl last:rounded-tr-2xl", "text-gdt-sm font-semibold text-fg-secondary", "break-words has-[[role=checkbox]]:pr-0", getPinnedDividerClassName(pinnedSide), className),
|
|
83
83
|
...props
|
|
84
84
|
});
|
|
85
85
|
}
|
package/dist/tabs.d.ts
CHANGED
package/dist/tag.d.ts
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
4
|
+
//#region src/top-navbar.d.ts
|
|
5
|
+
type TopNavbarRootProps = React.ComponentProps<"header">;
|
|
6
|
+
declare function TopNavbarRoot({ className, children, ...props }: TopNavbarRootProps): React.JSX.Element;
|
|
7
|
+
declare function TopNavbarContainer({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function TopNavbarLeading({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function TopNavbarBrand({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
declare function TopNavbarNavigation({ className, ...props }: NavigationMenu.Root.Props): React.JSX.Element;
|
|
11
|
+
declare function TopNavbarList({ className, ...props }: NavigationMenu.List.Props): React.JSX.Element;
|
|
12
|
+
declare function TopNavbarItem(props: NavigationMenu.Item.Props): React.JSX.Element;
|
|
13
|
+
type TopNavbarTriggerProps = NavigationMenu.Trigger.Props & {
|
|
14
|
+
active?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare function TopNavbarTrigger({ active, className, children, ...props }: TopNavbarTriggerProps): React.JSX.Element;
|
|
17
|
+
type TopNavbarLinkProps = NavigationMenu.Link.Props & {
|
|
18
|
+
active?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function TopNavbarLink({ active, className, ...props }: TopNavbarLinkProps): React.JSX.Element;
|
|
21
|
+
declare function TopNavbarContent({ className, ...props }: NavigationMenu.Content.Props): React.JSX.Element;
|
|
22
|
+
declare function TopNavbarMenuGrid({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
23
|
+
type TopNavbarMenuLinkProps = NavigationMenu.Link.Props & {
|
|
24
|
+
featured?: boolean;
|
|
25
|
+
showArrow?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare function TopNavbarMenuLink({ featured, showArrow, className, children, ...props }: TopNavbarMenuLinkProps): React.JSX.Element;
|
|
28
|
+
declare function TopNavbarMenuIcon({ featured, className, ...props }: React.ComponentProps<"span"> & {
|
|
29
|
+
featured?: boolean;
|
|
30
|
+
}): React.JSX.Element;
|
|
31
|
+
declare function TopNavbarMenuText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
32
|
+
declare function TopNavbarMenuTitle({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
33
|
+
declare function TopNavbarMenuDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
34
|
+
type TopNavbarViewportProps = Omit<NavigationMenu.Popup.Props, "className"> & {
|
|
35
|
+
className?: string;
|
|
36
|
+
portalProps?: NavigationMenu.Portal.Props;
|
|
37
|
+
positionerProps?: Omit<NavigationMenu.Positioner.Props, "className"> & {
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
viewportProps?: Omit<NavigationMenu.Viewport.Props, "className"> & {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
declare function TopNavbarViewport({ className, children, portalProps, positionerProps, viewportProps, ...props }: TopNavbarViewportProps): React.JSX.Element;
|
|
45
|
+
declare function TopNavbarActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
46
|
+
declare function TopNavbarActionGroup({ className, surface, ...props }: React.ComponentProps<"div"> & {
|
|
47
|
+
surface?: boolean;
|
|
48
|
+
}): React.JSX.Element;
|
|
49
|
+
declare function TopNavbarActionLink({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
50
|
+
type TopNavbarMenuItem = {
|
|
51
|
+
title: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
href: string;
|
|
54
|
+
icon?: React.ReactNode;
|
|
55
|
+
featured?: boolean;
|
|
56
|
+
render?: React.ReactElement;
|
|
57
|
+
};
|
|
58
|
+
type TopNavbarItemData = {
|
|
59
|
+
label: string;
|
|
60
|
+
href: string;
|
|
61
|
+
active?: boolean;
|
|
62
|
+
icon?: React.ReactNode;
|
|
63
|
+
menu?: readonly TopNavbarMenuItem[];
|
|
64
|
+
render?: React.ReactElement;
|
|
65
|
+
};
|
|
66
|
+
type TopNavbarProps = Omit<TopNavbarRootProps, "children"> & {
|
|
67
|
+
brand: React.ReactNode;
|
|
68
|
+
brandHref?: string;
|
|
69
|
+
brandLabel?: string;
|
|
70
|
+
brandRender?: React.ReactElement;
|
|
71
|
+
items: readonly TopNavbarItemData[];
|
|
72
|
+
actions?: React.ReactNode;
|
|
73
|
+
mobileActions?: React.ReactNode;
|
|
74
|
+
mobileMenuLabel?: string;
|
|
75
|
+
};
|
|
76
|
+
declare function TopNavbarComponent({ brand, brandHref, brandLabel, brandRender, items, actions, mobileActions, mobileMenuLabel, ...props }: TopNavbarProps): React.JSX.Element;
|
|
77
|
+
declare const TopNavbar: typeof TopNavbarComponent & {
|
|
78
|
+
Root: typeof TopNavbarRoot;
|
|
79
|
+
Container: typeof TopNavbarContainer;
|
|
80
|
+
Leading: typeof TopNavbarLeading;
|
|
81
|
+
Brand: typeof TopNavbarBrand;
|
|
82
|
+
Navigation: typeof TopNavbarNavigation;
|
|
83
|
+
List: typeof TopNavbarList;
|
|
84
|
+
Item: typeof TopNavbarItem;
|
|
85
|
+
Trigger: typeof TopNavbarTrigger;
|
|
86
|
+
Link: typeof TopNavbarLink;
|
|
87
|
+
Content: typeof TopNavbarContent;
|
|
88
|
+
MenuGrid: typeof TopNavbarMenuGrid;
|
|
89
|
+
MenuLink: typeof TopNavbarMenuLink;
|
|
90
|
+
MenuIcon: typeof TopNavbarMenuIcon;
|
|
91
|
+
MenuText: typeof TopNavbarMenuText;
|
|
92
|
+
MenuTitle: typeof TopNavbarMenuTitle;
|
|
93
|
+
MenuDescription: typeof TopNavbarMenuDescription;
|
|
94
|
+
Viewport: typeof TopNavbarViewport;
|
|
95
|
+
Actions: typeof TopNavbarActions;
|
|
96
|
+
ActionGroup: typeof TopNavbarActionGroup;
|
|
97
|
+
ActionLink: typeof TopNavbarActionLink;
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { TopNavbar, TopNavbarActionGroup, TopNavbarActionLink, TopNavbarActions, TopNavbarBrand, TopNavbarContainer, TopNavbarContent, TopNavbarItem, type TopNavbarItemData, TopNavbarLeading, TopNavbarLink, TopNavbarList, TopNavbarMenuDescription, TopNavbarMenuGrid, TopNavbarMenuIcon, type TopNavbarMenuItem, TopNavbarMenuLink, TopNavbarMenuText, TopNavbarMenuTitle, TopNavbarNavigation, type TopNavbarProps, TopNavbarRoot, type TopNavbarRootProps, TopNavbarTrigger, TopNavbarViewport };
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
+
import { MobileSidebar } from "./mobile-sidebar.js";
|
|
4
|
+
import { ArrowUpRightIcon, ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
9
|
+
//#region src/top-navbar.tsx
|
|
10
|
+
function TopNavbarRoot({ className, children, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("header", {
|
|
12
|
+
"data-slot": "top-navbar",
|
|
13
|
+
className: cn("relative z-40 w-full border-b border-line-subtle bg-canvas text-fg-primary @container/top-navbar", className),
|
|
14
|
+
...props,
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function TopNavbarContainer({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
"data-slot": "top-navbar-container",
|
|
21
|
+
className: cn("flex h-16 w-full items-center justify-between px-5 @5xl/top-navbar:h-[81px] @5xl/top-navbar:px-10 @7xl/top-navbar:px-20", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function TopNavbarLeading({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx("div", {
|
|
27
|
+
"data-slot": "top-navbar-leading",
|
|
28
|
+
className: cn("flex min-w-0 items-center gap-6 @7xl/top-navbar:gap-10", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function TopNavbarBrand({ className, render, ...props }) {
|
|
33
|
+
return useRender({
|
|
34
|
+
defaultTagName: "a",
|
|
35
|
+
props: mergeProps({ className: cn("shrink-0 text-fg-brand outline-none focus-visible:rounded-md focus-visible:shadow-[0_0_0_2px_var(--color-line-focus)] [&>svg]:h-[38px] [&>svg]:w-[90px]", className) }, props),
|
|
36
|
+
render,
|
|
37
|
+
state: { slot: "top-navbar-brand" }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function TopNavbarNavigation({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Root, {
|
|
42
|
+
"data-slot": "top-navbar-navigation",
|
|
43
|
+
className: cn("hidden min-w-0 @5xl/top-navbar:block", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function TopNavbarList({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(NavigationMenu.List, {
|
|
49
|
+
"data-slot": "top-navbar-list",
|
|
50
|
+
className: cn("flex min-w-0 items-center gap-2 @7xl/top-navbar:gap-4", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function TopNavbarItem(props) {
|
|
55
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Item, {
|
|
56
|
+
"data-slot": "top-navbar-item",
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function navigationItemClass(active) {
|
|
61
|
+
return cn("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-2.5 text-gdt-sm text-fg-secondary transition-[background-color,color,border-color,box-shadow] duration-(--duration-motion-press) ease-gdt-out outline-none hover:text-fg-primary focus-visible:shadow-[0_0_0_2px_var(--color-line-focus)]", active && "border border-line bg-surface-raised px-4 font-bold text-fg-brand hover:text-fg-brand");
|
|
62
|
+
}
|
|
63
|
+
function TopNavbarTrigger({ active = false, className, children, ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsxs(NavigationMenu.Trigger, {
|
|
65
|
+
"data-slot": "top-navbar-trigger",
|
|
66
|
+
"data-active": active || void 0,
|
|
67
|
+
className: cn(navigationItemClass(active), className),
|
|
68
|
+
...props,
|
|
69
|
+
children: [children, /* @__PURE__ */ jsx(NavigationMenu.Icon, {
|
|
70
|
+
className: "transition-transform duration-(--duration-motion-press) ease-gdt-out data-popup-open:rotate-180 motion-reduce:transition-none",
|
|
71
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
72
|
+
"aria-hidden": "true",
|
|
73
|
+
className: "size-3.5"
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function TopNavbarLink({ active = false, className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Link, {
|
|
80
|
+
"data-slot": "top-navbar-link",
|
|
81
|
+
active,
|
|
82
|
+
className: cn(navigationItemClass(active), className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function TopNavbarContent({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Content, {
|
|
88
|
+
"data-slot": "top-navbar-content",
|
|
89
|
+
className: cn("w-[min(42rem,calc(100vw-2.5rem))] p-2", className),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function TopNavbarMenuGrid({ className, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
95
|
+
"data-slot": "top-navbar-menu-grid",
|
|
96
|
+
className: cn("grid grid-cols-2 gap-1.5", className),
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function TopNavbarMenuLink({ featured = false, showArrow = true, className, children, ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsxs(NavigationMenu.Link, {
|
|
102
|
+
"data-slot": "top-navbar-menu-link",
|
|
103
|
+
"data-featured": featured || void 0,
|
|
104
|
+
className: cn("group/top-navbar-card grid min-h-22 grid-cols-[auto_1fr_auto] items-start gap-3 rounded-xl p-3 text-left outline-none transition-[background-color,color,box-shadow,translate] duration-(--duration-motion-press) ease-gdt-out hover:bg-surface focus-visible:bg-surface focus-visible:shadow-[0_0_0_2px_var(--color-line-focus)] active:translate-y-px motion-reduce:active:translate-y-0", featured && "bg-surface-brand-subtle", className),
|
|
105
|
+
...props,
|
|
106
|
+
children: [children, showArrow ? /* @__PURE__ */ jsx(ArrowUpRightIcon, {
|
|
107
|
+
"aria-hidden": "true",
|
|
108
|
+
className: "mt-1 size-4 text-fg-caption-placeholder transition-[color,translate] duration-(--duration-motion-press) ease-gdt-out group-hover/top-navbar-card:translate-x-0.5 group-hover/top-navbar-card:-translate-y-0.5 group-hover/top-navbar-card:text-fg-brand motion-reduce:transition-colors"
|
|
109
|
+
}) : null]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function TopNavbarMenuIcon({ featured = false, className, ...props }) {
|
|
113
|
+
return /* @__PURE__ */ jsx("span", {
|
|
114
|
+
"data-slot": "top-navbar-menu-icon",
|
|
115
|
+
className: cn("flex size-10 items-center justify-center rounded-xl bg-surface-brand-subtle text-fg-brand [&>svg]:size-4.5", featured && "bg-surface-brand text-fg-on-brand", className),
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function TopNavbarMenuText({ className, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsx("span", {
|
|
121
|
+
"data-slot": "top-navbar-menu-text",
|
|
122
|
+
className: cn("min-w-0", className),
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function TopNavbarMenuTitle({ className, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx("span", {
|
|
128
|
+
"data-slot": "top-navbar-menu-title",
|
|
129
|
+
className: cn("block text-gdt-sm font-bold text-fg-primary", className),
|
|
130
|
+
...props
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function TopNavbarMenuDescription({ className, ...props }) {
|
|
134
|
+
return /* @__PURE__ */ jsx("span", {
|
|
135
|
+
"data-slot": "top-navbar-menu-description",
|
|
136
|
+
className: cn("mt-0.5 block text-gdt-xs text-fg-secondary", className),
|
|
137
|
+
...props
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function TopNavbarViewport({ className, children, portalProps, positionerProps, viewportProps, ...props }) {
|
|
141
|
+
const { className: positionerClassName, sideOffset = 10, collisionPadding = {
|
|
142
|
+
top: 8,
|
|
143
|
+
right: 20,
|
|
144
|
+
bottom: 8,
|
|
145
|
+
left: 20
|
|
146
|
+
}, collisionAvoidance = { side: "none" }, ...resolvedPositionerProps } = positionerProps ?? {};
|
|
147
|
+
const { className: viewportClassName, ...resolvedViewportProps } = viewportProps ?? {};
|
|
148
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Portal, {
|
|
149
|
+
...portalProps,
|
|
150
|
+
children: /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
|
|
151
|
+
sideOffset,
|
|
152
|
+
collisionPadding,
|
|
153
|
+
collisionAvoidance,
|
|
154
|
+
className: cn("isolate z-50 outline-none", positionerClassName),
|
|
155
|
+
...resolvedPositionerProps,
|
|
156
|
+
children: /* @__PURE__ */ jsxs(NavigationMenu.Popup, {
|
|
157
|
+
"data-slot": "top-navbar-popup",
|
|
158
|
+
className: cn("w-[min(42rem,calc(100vw-2.5rem))] origin-(--transform-origin) overflow-hidden rounded-2xl border border-line-subtle bg-surface-overlay text-fg-primary shadow-(--elevation-e3-shadow) transition-[opacity,scale,translate] duration-[var(--duration-motion-popup)] ease-gdt-out data-instant:transition-none data-starting-style:translate-y-1.5 data-starting-style:scale-[0.98] data-starting-style:opacity-0 data-ending-style:translate-y-1.5 data-ending-style:scale-[0.98] data-ending-style:opacity-0 motion-reduce:data-starting-style:translate-y-0 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:translate-y-0 motion-reduce:data-ending-style:scale-100", className),
|
|
159
|
+
...props,
|
|
160
|
+
children: [children, /* @__PURE__ */ jsx(NavigationMenu.Viewport, {
|
|
161
|
+
"data-slot": "top-navbar-viewport",
|
|
162
|
+
className: cn("relative overflow-hidden", viewportClassName),
|
|
163
|
+
...resolvedViewportProps
|
|
164
|
+
})]
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function TopNavbarActions({ className, ...props }) {
|
|
170
|
+
return /* @__PURE__ */ jsx("div", {
|
|
171
|
+
"data-slot": "top-navbar-actions",
|
|
172
|
+
className: cn("hidden shrink-0 items-center gap-3 @5xl/top-navbar:flex", className),
|
|
173
|
+
...props
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function TopNavbarActionGroup({ className, surface = false, ...props }) {
|
|
177
|
+
return /* @__PURE__ */ jsx("div", {
|
|
178
|
+
"data-slot": "top-navbar-action-group",
|
|
179
|
+
"data-surface": surface || void 0,
|
|
180
|
+
className: cn("flex items-center gap-3", surface && "rounded-2xl bg-surface-raised px-4 py-1.5", className),
|
|
181
|
+
...props
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function TopNavbarActionLink({ className, render, ...props }) {
|
|
185
|
+
return useRender({
|
|
186
|
+
defaultTagName: "a",
|
|
187
|
+
props: mergeProps({ className: cn("inline-flex min-h-8 items-center rounded-full px-2 text-gdt-xs font-bold text-fg-brand outline-none transition-[color,background-color,translate] duration-(--duration-motion-press) ease-gdt-out hover:bg-surface-brand-subtle focus-visible:shadow-[0_0_0_2px_var(--color-line-focus)] active:translate-y-px motion-reduce:active:translate-y-0", className) }, props),
|
|
188
|
+
render,
|
|
189
|
+
state: { slot: "top-navbar-action-link" }
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function TopNavbarComponent({ brand, brandHref = "/", brandLabel = "Home", brandRender, items, actions, mobileActions, mobileMenuLabel = "Main navigation", ...props }) {
|
|
193
|
+
const hasMenu = items.some((item) => item.menu?.length);
|
|
194
|
+
return /* @__PURE__ */ jsx(TopNavbarRoot, {
|
|
195
|
+
...props,
|
|
196
|
+
children: /* @__PURE__ */ jsxs(TopNavbarContainer, { children: [
|
|
197
|
+
/* @__PURE__ */ jsxs(TopNavbarLeading, { children: [/* @__PURE__ */ jsx(TopNavbarBrand, {
|
|
198
|
+
render: brandRender,
|
|
199
|
+
href: brandHref,
|
|
200
|
+
"aria-label": brandLabel,
|
|
201
|
+
children: brand
|
|
202
|
+
}), /* @__PURE__ */ jsxs(TopNavbarNavigation, {
|
|
203
|
+
"aria-label": mobileMenuLabel,
|
|
204
|
+
children: [/* @__PURE__ */ jsx(TopNavbarList, { children: items.map((item) => /* @__PURE__ */ jsx(TopNavbarItem, {
|
|
205
|
+
value: item.label,
|
|
206
|
+
children: item.menu?.length ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TopNavbarTrigger, {
|
|
207
|
+
active: item.active,
|
|
208
|
+
children: item.label
|
|
209
|
+
}), /* @__PURE__ */ jsx(TopNavbarContent, { children: /* @__PURE__ */ jsx(TopNavbarMenuGrid, { children: item.menu.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(TopNavbarMenuLink, {
|
|
210
|
+
render: link.render,
|
|
211
|
+
href: link.href,
|
|
212
|
+
featured: link.featured,
|
|
213
|
+
children: [link.icon ? /* @__PURE__ */ jsx(TopNavbarMenuIcon, {
|
|
214
|
+
featured: link.featured,
|
|
215
|
+
children: link.icon
|
|
216
|
+
}) : null, /* @__PURE__ */ jsxs(TopNavbarMenuText, { children: [/* @__PURE__ */ jsx(TopNavbarMenuTitle, { children: link.title }), link.description ? /* @__PURE__ */ jsx(TopNavbarMenuDescription, { children: link.description }) : null] })]
|
|
217
|
+
}) }, `${link.title}-${link.href}`)) }) })] }) : /* @__PURE__ */ jsx(TopNavbarLink, {
|
|
218
|
+
render: item.render,
|
|
219
|
+
href: item.href,
|
|
220
|
+
active: item.active,
|
|
221
|
+
children: item.label
|
|
222
|
+
})
|
|
223
|
+
}, `${item.label}-${item.href}`)) }), hasMenu ? /* @__PURE__ */ jsx(TopNavbarViewport, {}) : null]
|
|
224
|
+
})] }),
|
|
225
|
+
actions ? /* @__PURE__ */ jsx(TopNavbarActions, { children: actions }) : null,
|
|
226
|
+
/* @__PURE__ */ jsxs(MobileSidebar.Root, { children: [/* @__PURE__ */ jsx(MobileSidebar.Trigger, {
|
|
227
|
+
"aria-label": mobileMenuLabel,
|
|
228
|
+
className: "size-8 @5xl/top-navbar:hidden"
|
|
229
|
+
}), /* @__PURE__ */ jsxs(MobileSidebar.Content, { children: [
|
|
230
|
+
/* @__PURE__ */ jsxs(MobileSidebar.Header, { children: [
|
|
231
|
+
/* @__PURE__ */ jsx(TopNavbarBrand, {
|
|
232
|
+
render: brandRender,
|
|
233
|
+
href: brandHref,
|
|
234
|
+
"aria-label": brandLabel,
|
|
235
|
+
children: brand
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsx(MobileSidebar.Title, { children: mobileMenuLabel }),
|
|
238
|
+
/* @__PURE__ */ jsx(MobileSidebar.Close, { "aria-label": "Close navigation" })
|
|
239
|
+
] }),
|
|
240
|
+
/* @__PURE__ */ jsx(MobileSidebar.Body, { children: /* @__PURE__ */ jsx(MobileSidebar.Nav, {
|
|
241
|
+
"aria-label": mobileMenuLabel,
|
|
242
|
+
children: /* @__PURE__ */ jsx(MobileSidebar.List, { children: items.map((item) => /* @__PURE__ */ jsx(MobileSidebar.Item, { children: item.menu?.length ? /* @__PURE__ */ jsxs(MobileSidebar.Group, {
|
|
243
|
+
defaultOpen: item.active,
|
|
244
|
+
children: [/* @__PURE__ */ jsx(MobileSidebar.GroupTrigger, {
|
|
245
|
+
active: item.active,
|
|
246
|
+
icon: item.icon,
|
|
247
|
+
children: item.label
|
|
248
|
+
}), /* @__PURE__ */ jsx(MobileSidebar.GroupPanel, { children: /* @__PURE__ */ jsx(MobileSidebar.SubList, { children: item.menu.map((link) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(MobileSidebar.SubLink, {
|
|
249
|
+
render: link.render,
|
|
250
|
+
href: link.href,
|
|
251
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
252
|
+
className: "block",
|
|
253
|
+
children: link.title
|
|
254
|
+
}), link.description ? /* @__PURE__ */ jsx("span", {
|
|
255
|
+
className: "mt-0.5 block text-gdt-xs text-fg-caption-placeholder",
|
|
256
|
+
children: link.description
|
|
257
|
+
}) : null]
|
|
258
|
+
}) }, `${link.title}-${link.href}`)) }) })]
|
|
259
|
+
}) : /* @__PURE__ */ jsx(MobileSidebar.Link, {
|
|
260
|
+
render: item.render,
|
|
261
|
+
href: item.href,
|
|
262
|
+
active: item.active,
|
|
263
|
+
icon: item.icon,
|
|
264
|
+
children: item.label
|
|
265
|
+
}) }, `${item.label}-${item.href}`)) })
|
|
266
|
+
}) }),
|
|
267
|
+
mobileActions ? /* @__PURE__ */ jsx(MobileSidebar.Footer, { children: mobileActions }) : null
|
|
268
|
+
] })] })
|
|
269
|
+
] })
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
const TopNavbar = Object.assign(TopNavbarComponent, {
|
|
273
|
+
Root: TopNavbarRoot,
|
|
274
|
+
Container: TopNavbarContainer,
|
|
275
|
+
Leading: TopNavbarLeading,
|
|
276
|
+
Brand: TopNavbarBrand,
|
|
277
|
+
Navigation: TopNavbarNavigation,
|
|
278
|
+
List: TopNavbarList,
|
|
279
|
+
Item: TopNavbarItem,
|
|
280
|
+
Trigger: TopNavbarTrigger,
|
|
281
|
+
Link: TopNavbarLink,
|
|
282
|
+
Content: TopNavbarContent,
|
|
283
|
+
MenuGrid: TopNavbarMenuGrid,
|
|
284
|
+
MenuLink: TopNavbarMenuLink,
|
|
285
|
+
MenuIcon: TopNavbarMenuIcon,
|
|
286
|
+
MenuText: TopNavbarMenuText,
|
|
287
|
+
MenuTitle: TopNavbarMenuTitle,
|
|
288
|
+
MenuDescription: TopNavbarMenuDescription,
|
|
289
|
+
Viewport: TopNavbarViewport,
|
|
290
|
+
Actions: TopNavbarActions,
|
|
291
|
+
ActionGroup: TopNavbarActionGroup,
|
|
292
|
+
ActionLink: TopNavbarActionLink
|
|
293
|
+
});
|
|
294
|
+
//#endregion
|
|
295
|
+
export { TopNavbar, TopNavbarActionGroup, TopNavbarActionLink, TopNavbarActions, TopNavbarBrand, TopNavbarContainer, TopNavbarContent, TopNavbarItem, TopNavbarLeading, TopNavbarLink, TopNavbarList, TopNavbarMenuDescription, TopNavbarMenuGrid, TopNavbarMenuIcon, TopNavbarMenuLink, TopNavbarMenuText, TopNavbarMenuTitle, TopNavbarNavigation, TopNavbarRoot, TopNavbarTrigger, TopNavbarViewport };
|
package/dist/tree-map.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giddaa-housing/ui",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Giddaa reusable UI component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -217,6 +217,10 @@
|
|
|
217
217
|
"types": "./dist/map-indicator.d.ts",
|
|
218
218
|
"import": "./dist/map-indicator.js"
|
|
219
219
|
},
|
|
220
|
+
"./mask-input": {
|
|
221
|
+
"types": "./dist/mask-input.d.ts",
|
|
222
|
+
"import": "./dist/mask-input.js"
|
|
223
|
+
},
|
|
220
224
|
"./media-gallery-hero": {
|
|
221
225
|
"types": "./dist/media-gallery-hero.d.ts",
|
|
222
226
|
"import": "./dist/media-gallery-hero.js"
|
|
@@ -229,6 +233,10 @@
|
|
|
229
233
|
"types": "./dist/message.d.ts",
|
|
230
234
|
"import": "./dist/message.js"
|
|
231
235
|
},
|
|
236
|
+
"./mobile-sidebar": {
|
|
237
|
+
"types": "./dist/mobile-sidebar.d.ts",
|
|
238
|
+
"import": "./dist/mobile-sidebar.js"
|
|
239
|
+
},
|
|
232
240
|
"./multi-step-form": {
|
|
233
241
|
"types": "./dist/multi-step-form.d.ts",
|
|
234
242
|
"import": "./dist/multi-step-form.js"
|
|
@@ -377,6 +385,10 @@
|
|
|
377
385
|
"types": "./dist/toast.d.ts",
|
|
378
386
|
"import": "./dist/toast.js"
|
|
379
387
|
},
|
|
388
|
+
"./top-navbar": {
|
|
389
|
+
"types": "./dist/top-navbar.d.ts",
|
|
390
|
+
"import": "./dist/top-navbar.js"
|
|
391
|
+
},
|
|
380
392
|
"./tooltip": {
|
|
381
393
|
"types": "./dist/tooltip.d.ts",
|
|
382
394
|
"import": "./dist/tooltip.js"
|