@tonyarbor/components 0.7.0 → 0.8.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.
Files changed (46) hide show
  1. package/dist/AvatarLogoLockup.d.mts +41 -0
  2. package/dist/AvatarLogoLockup.d.ts +41 -0
  3. package/dist/AvatarLogoLockup.js +344 -0
  4. package/dist/AvatarLogoLockup.js.map +1 -0
  5. package/dist/AvatarLogoLockup.mjs +9 -0
  6. package/dist/AvatarLogoLockup.mjs.map +1 -0
  7. package/dist/SideNavBar.d.mts +35 -0
  8. package/dist/SideNavBar.d.ts +35 -0
  9. package/dist/SideNavBar.js +235 -0
  10. package/dist/SideNavBar.js.map +1 -0
  11. package/dist/SideNavBar.mjs +8 -0
  12. package/dist/SideNavBar.mjs.map +1 -0
  13. package/dist/SideNavButton.d.mts +42 -0
  14. package/dist/SideNavButton.d.ts +42 -0
  15. package/dist/SideNavButton.js +136 -0
  16. package/dist/SideNavButton.js.map +1 -0
  17. package/dist/SideNavButton.mjs +7 -0
  18. package/dist/SideNavButton.mjs.map +1 -0
  19. package/dist/TopNavBar.d.mts +103 -0
  20. package/dist/TopNavBar.d.ts +103 -0
  21. package/dist/TopNavBar.js +994 -0
  22. package/dist/TopNavBar.js.map +1 -0
  23. package/dist/TopNavBar.mjs +13 -0
  24. package/dist/TopNavBar.mjs.map +1 -0
  25. package/dist/TopNavItem.d.mts +33 -0
  26. package/dist/TopNavItem.d.ts +33 -0
  27. package/dist/TopNavItem.js +108 -0
  28. package/dist/TopNavItem.js.map +1 -0
  29. package/dist/TopNavItem.mjs +7 -0
  30. package/dist/TopNavItem.mjs.map +1 -0
  31. package/dist/chunk-AVYGOALO.mjs +72 -0
  32. package/dist/chunk-AVYGOALO.mjs.map +1 -0
  33. package/dist/chunk-GO2UDHKM.mjs +107 -0
  34. package/dist/chunk-GO2UDHKM.mjs.map +1 -0
  35. package/dist/chunk-HG2ORLLW.mjs +116 -0
  36. package/dist/chunk-HG2ORLLW.mjs.map +1 -0
  37. package/dist/chunk-I4ZVW4AI.mjs +100 -0
  38. package/dist/chunk-I4ZVW4AI.mjs.map +1 -0
  39. package/dist/chunk-YUXQQX7M.mjs +182 -0
  40. package/dist/chunk-YUXQQX7M.mjs.map +1 -0
  41. package/dist/index.d.mts +5 -0
  42. package/dist/index.d.ts +5 -0
  43. package/dist/index.js +545 -2
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +21 -1
  46. package/package.json +26 -1
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/SideNavBar/index.ts
31
+ var SideNavBar_exports = {};
32
+ __export(SideNavBar_exports, {
33
+ SideNavBar: () => SideNavBar
34
+ });
35
+ module.exports = __toCommonJS(SideNavBar_exports);
36
+
37
+ // src/SideNavButton/SideNavButton.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_lucide_react = require("lucide-react");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var SideNavButton = React.forwardRef(
42
+ ({
43
+ icon,
44
+ selected = false,
45
+ focused = false,
46
+ onClick,
47
+ "aria-label": ariaLabel,
48
+ className,
49
+ style
50
+ }, ref) => {
51
+ const [isHovered, setIsHovered] = React.useState(false);
52
+ const [isActive, setIsActive] = React.useState(false);
53
+ const getIconColor = () => {
54
+ if (selected) return "#0e8a0e";
55
+ if (isActive || isHovered) return "#2f2f2f";
56
+ return "#7e7e7e";
57
+ };
58
+ const getBackgroundColor = () => {
59
+ if (selected) return "#f0faf3";
60
+ if (isActive) return "#efefef";
61
+ if (isHovered) return "#f8f8f8";
62
+ return "transparent";
63
+ };
64
+ const buttonStyles = {
65
+ display: "flex",
66
+ alignItems: "center",
67
+ justifyContent: "center",
68
+ width: "42px",
69
+ height: "42px",
70
+ borderRadius: "99px",
71
+ border: "none",
72
+ backgroundColor: getBackgroundColor(),
73
+ cursor: "pointer",
74
+ padding: 0,
75
+ outline: "none",
76
+ transition: "background-color 150ms ease, box-shadow 150ms ease",
77
+ boxShadow: focused ? "0px 0px 0px 3px #3cad51" : "none",
78
+ ...style
79
+ };
80
+ const renderIcon = () => {
81
+ const iconColor = getIconColor();
82
+ const iconSize = 20;
83
+ const strokeWidth = 2;
84
+ const iconProps = {
85
+ size: iconSize,
86
+ color: iconColor,
87
+ strokeWidth
88
+ };
89
+ switch (icon) {
90
+ case "side-menu":
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Menu, { ...iconProps });
92
+ case "home":
93
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Home, { ...iconProps });
94
+ case "favourite":
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Star, { ...iconProps });
96
+ case "calendar":
97
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Calendar, { ...iconProps });
98
+ case "notifications":
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Bell, { ...iconProps });
100
+ case "emergency-alert":
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertTriangle, { ...iconProps });
102
+ case "help":
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HelpCircle, { ...iconProps });
104
+ default:
105
+ return null;
106
+ }
107
+ };
108
+ const defaultAriaLabel = icon.charAt(0).toUpperCase() + icon.slice(1);
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ "button",
111
+ {
112
+ ref,
113
+ type: "button",
114
+ className,
115
+ style: buttonStyles,
116
+ onClick,
117
+ onMouseEnter: () => setIsHovered(true),
118
+ onMouseLeave: () => {
119
+ setIsHovered(false);
120
+ setIsActive(false);
121
+ },
122
+ onMouseDown: () => setIsActive(true),
123
+ onMouseUp: () => setIsActive(false),
124
+ "aria-label": ariaLabel || defaultAriaLabel,
125
+ "aria-pressed": selected,
126
+ children: renderIcon()
127
+ }
128
+ );
129
+ }
130
+ );
131
+ SideNavButton.displayName = "SideNavButton";
132
+
133
+ // src/SideNavBar/SideNavBar.tsx
134
+ var import_jsx_runtime2 = require("react/jsx-runtime");
135
+ var SideNavBar = ({
136
+ selectedIcon,
137
+ onIconClick,
138
+ className,
139
+ style
140
+ }) => {
141
+ const containerStyles = {
142
+ display: "flex",
143
+ flexDirection: "column",
144
+ alignItems: "center",
145
+ justifyContent: "space-between",
146
+ backgroundColor: "#ffffff",
147
+ padding: "8px",
148
+ borderTopLeftRadius: "8px",
149
+ borderBottomLeftRadius: "8px",
150
+ height: "100%",
151
+ width: "58px",
152
+ boxSizing: "border-box",
153
+ ...style
154
+ };
155
+ const topSectionStyles = {
156
+ display: "flex",
157
+ flexDirection: "column",
158
+ alignItems: "center",
159
+ gap: "16px"
160
+ };
161
+ const dividerStyles = {
162
+ width: "24.5px",
163
+ height: "1px",
164
+ backgroundColor: "#efefef"
165
+ };
166
+ const handleClick = (icon) => {
167
+ onIconClick?.(icon);
168
+ };
169
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className, style: containerStyles, children: [
170
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: topSectionStyles, children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
172
+ SideNavButton,
173
+ {
174
+ icon: "side-menu",
175
+ selected: selectedIcon === "side-menu",
176
+ onClick: () => handleClick("side-menu"),
177
+ "aria-label": "Side menu"
178
+ }
179
+ ),
180
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: dividerStyles }),
181
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
182
+ SideNavButton,
183
+ {
184
+ icon: "favourite",
185
+ selected: selectedIcon === "favourite",
186
+ onClick: () => handleClick("favourite"),
187
+ "aria-label": "Favourites"
188
+ }
189
+ ),
190
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
191
+ SideNavButton,
192
+ {
193
+ icon: "notifications",
194
+ selected: selectedIcon === "notifications",
195
+ onClick: () => handleClick("notifications"),
196
+ "aria-label": "Notifications"
197
+ }
198
+ ),
199
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
200
+ SideNavButton,
201
+ {
202
+ icon: "calendar",
203
+ selected: selectedIcon === "calendar",
204
+ onClick: () => handleClick("calendar"),
205
+ "aria-label": "Calendar"
206
+ }
207
+ ),
208
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: dividerStyles }),
209
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
210
+ SideNavButton,
211
+ {
212
+ icon: "emergency-alert",
213
+ selected: selectedIcon === "emergency-alert",
214
+ onClick: () => handleClick("emergency-alert"),
215
+ "aria-label": "Emergency alerts"
216
+ }
217
+ )
218
+ ] }),
219
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
220
+ SideNavButton,
221
+ {
222
+ icon: "help",
223
+ selected: selectedIcon === "help",
224
+ onClick: () => handleClick("help"),
225
+ "aria-label": "Help"
226
+ }
227
+ )
228
+ ] });
229
+ };
230
+ SideNavBar.displayName = "SideNavBar";
231
+ // Annotate the CommonJS export names for ESM import in node:
232
+ 0 && (module.exports = {
233
+ SideNavBar
234
+ });
235
+ //# sourceMappingURL=SideNavBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SideNavBar/index.ts","../src/SideNavButton/SideNavButton.tsx","../src/SideNavBar/SideNavBar.tsx"],"sourcesContent":["export { SideNavBar } from './SideNavBar';\nexport type { SideNavBarProps, SideNavBarIcon } from './SideNavBar';\n","import * as React from 'react';\nimport { Home, Menu, Star, Calendar, Bell, AlertTriangle, HelpCircle } from 'lucide-react';\n\nexport type SideNavButtonIcon = 'side-menu' | 'home' | 'favourite' | 'calendar' | 'notifications' | 'emergency-alert' | 'help';\n\nexport interface SideNavButtonProps {\n /**\n * The icon to display\n */\n icon: SideNavButtonIcon;\n /**\n * Whether the button is selected/active\n */\n selected?: boolean;\n /**\n * Whether the button is focused (shows green ring)\n */\n focused?: boolean;\n /**\n * Click handler\n */\n onClick?: () => void;\n /**\n * Accessible label for the button\n */\n 'aria-label'?: string;\n /**\n * Custom className\n */\n className?: string;\n /**\n * Custom style\n */\n style?: React.CSSProperties;\n}\n\n/**\n * SideNavButton component - Arbor Design System\n *\n * A circular navigation button used in the side navigation bar.\n * Supports different icons and states (default, hover, active, selected, focused).\n */\nexport const SideNavButton = React.forwardRef<HTMLButtonElement, SideNavButtonProps>(\n (\n {\n icon,\n selected = false,\n focused = false,\n onClick,\n 'aria-label': ariaLabel,\n className,\n style,\n },\n ref\n ) => {\n const [isHovered, setIsHovered] = React.useState(false);\n const [isActive, setIsActive] = React.useState(false);\n\n // Determine icon color based on state\n const getIconColor = () => {\n if (selected) return '#0e8a0e'; // Green for selected\n if (isActive || isHovered) return '#2f2f2f'; // Dark gray for hover/active\n return '#7e7e7e'; // Gray for default\n };\n\n // Determine background color based on state\n const getBackgroundColor = () => {\n if (selected) return '#f0faf3'; // Light green for selected\n if (isActive) return '#efefef'; // Darker gray for active\n if (isHovered) return '#f8f8f8'; // Light gray for hover\n return 'transparent'; // Transparent for default\n };\n\n const buttonStyles: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '42px',\n height: '42px',\n borderRadius: '99px',\n border: 'none',\n backgroundColor: getBackgroundColor(),\n cursor: 'pointer',\n padding: 0,\n outline: 'none',\n transition: 'background-color 150ms ease, box-shadow 150ms ease',\n boxShadow: focused ? '0px 0px 0px 3px #3cad51' : 'none',\n ...style,\n };\n\n // Get the appropriate icon component\n const renderIcon = () => {\n const iconColor = getIconColor();\n const iconSize = 20;\n const strokeWidth = 2;\n\n // All icons are stroke-only (outline), no fill - just color changes\n const iconProps = {\n size: iconSize,\n color: iconColor,\n strokeWidth,\n };\n\n switch (icon) {\n case 'side-menu':\n return <Menu {...iconProps} />;\n case 'home':\n return <Home {...iconProps} />;\n case 'favourite':\n return <Star {...iconProps} />;\n case 'calendar':\n return <Calendar {...iconProps} />;\n case 'notifications':\n return <Bell {...iconProps} />;\n case 'emergency-alert':\n return <AlertTriangle {...iconProps} />;\n case 'help':\n return <HelpCircle {...iconProps} />;\n default:\n return null;\n }\n };\n\n // Default aria-label based on icon\n const defaultAriaLabel = icon.charAt(0).toUpperCase() + icon.slice(1);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={className}\n style={buttonStyles}\n onClick={onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => {\n setIsHovered(false);\n setIsActive(false);\n }}\n onMouseDown={() => setIsActive(true)}\n onMouseUp={() => setIsActive(false)}\n aria-label={ariaLabel || defaultAriaLabel}\n aria-pressed={selected}\n >\n {renderIcon()}\n </button>\n );\n }\n);\n\nSideNavButton.displayName = 'SideNavButton';\n","import * as React from 'react';\nimport { SideNavButton, SideNavButtonIcon } from '../SideNavButton';\n\nexport type SideNavBarIcon = Exclude<SideNavButtonIcon, 'home'>;\n\nexport interface SideNavBarProps {\n /**\n * The currently selected/active icon (if any)\n */\n selectedIcon?: SideNavBarIcon;\n /**\n * Click handler for icon buttons - receives the icon type that was clicked\n */\n onIconClick?: (icon: SideNavBarIcon) => void;\n /**\n * Custom className for the container\n */\n className?: string;\n /**\n * Custom style for the container\n */\n style?: React.CSSProperties;\n}\n\n/**\n * SideNavBar component - Arbor Design System\n *\n * A vertical side navigation bar with fixed icon layout.\n * Icons are grouped with dividers:\n * - Top: Side menu\n * - Middle: Favourite, Notifications, Calendar\n * - Lower: Emergency alert\n * - Bottom (pushed down): Help\n */\nexport const SideNavBar: React.FC<SideNavBarProps> = ({\n selectedIcon,\n onIconClick,\n className,\n style,\n}) => {\n const containerStyles: React.CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'space-between',\n backgroundColor: '#ffffff',\n padding: '8px',\n borderTopLeftRadius: '8px',\n borderBottomLeftRadius: '8px',\n height: '100%',\n width: '58px',\n boxSizing: 'border-box',\n ...style,\n };\n\n const topSectionStyles: React.CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n gap: '16px',\n };\n\n const dividerStyles: React.CSSProperties = {\n width: '24.5px',\n height: '1px',\n backgroundColor: '#efefef',\n };\n\n const handleClick = (icon: SideNavBarIcon) => {\n onIconClick?.(icon);\n };\n\n return (\n <div className={className} style={containerStyles}>\n {/* Top section with icon groups */}\n <div style={topSectionStyles}>\n {/* Side menu */}\n <SideNavButton\n icon=\"side-menu\"\n selected={selectedIcon === 'side-menu'}\n onClick={() => handleClick('side-menu')}\n aria-label=\"Side menu\"\n />\n\n {/* Divider */}\n <div style={dividerStyles} />\n\n {/* Main navigation group */}\n <SideNavButton\n icon=\"favourite\"\n selected={selectedIcon === 'favourite'}\n onClick={() => handleClick('favourite')}\n aria-label=\"Favourites\"\n />\n <SideNavButton\n icon=\"notifications\"\n selected={selectedIcon === 'notifications'}\n onClick={() => handleClick('notifications')}\n aria-label=\"Notifications\"\n />\n <SideNavButton\n icon=\"calendar\"\n selected={selectedIcon === 'calendar'}\n onClick={() => handleClick('calendar')}\n aria-label=\"Calendar\"\n />\n\n {/* Divider */}\n <div style={dividerStyles} />\n\n {/* Emergency alert */}\n <SideNavButton\n icon=\"emergency-alert\"\n selected={selectedIcon === 'emergency-alert'}\n onClick={() => handleClick('emergency-alert')}\n aria-label=\"Emergency alerts\"\n />\n </div>\n\n {/* Bottom section - Help */}\n <SideNavButton\n icon=\"help\"\n selected={selectedIcon === 'help'}\n onClick={() => handleClick('help')}\n aria-label=\"Help\"\n />\n </div>\n );\n};\n\nSideNavBar.displayName = 'SideNavBar';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,0BAA4E;AAwG3D;AA/DV,IAAM,gBAAsB;AAAA,EACjC,CACE;AAAA,IACE;AAAA,IACA,WAAW;AAAA,IACX,UAAU;AAAA,IACV;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,EACF,GACA,QACG;AACH,UAAM,CAAC,WAAW,YAAY,IAAU,eAAS,KAAK;AACtD,UAAM,CAAC,UAAU,WAAW,IAAU,eAAS,KAAK;AAGpD,UAAM,eAAe,MAAM;AACzB,UAAI,SAAU,QAAO;AACrB,UAAI,YAAY,UAAW,QAAO;AAClC,aAAO;AAAA,IACT;AAGA,UAAM,qBAAqB,MAAM;AAC/B,UAAI,SAAU,QAAO;AACrB,UAAI,SAAU,QAAO;AACrB,UAAI,UAAW,QAAO;AACtB,aAAO;AAAA,IACT;AAEA,UAAM,eAAoC;AAAA,MACxC,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,Q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AA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,iBAAiB;AAAA,UAC3B,SAAS,MAAM,YAAY,UAAU;AAAA,UACrC,cAAW;AAAA;AAAA,MACb;AAAA,MAGA,6CAAC,SAAI,OAAO,eAAe;AAAA,MAG3B;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,iBAAiB;AAAA,UAC3B,SAAS,MAAM,YAAY,iBAAiB;AAAA,UAC5C,cAAW;AAAA;AAAA,MACb;AAAA,OACF;AAAA,IAGA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU,iBAAiB;AAAA,QAC3B,SAAS,MAAM,YAAY,MAAM;AAAA,QACjC,cAAW;AAAA;AAAA,IACb;AAAA,KACF;AAEJ;AAEA,WAAW,cAAc;","names":["import_jsx_runtime"]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ SideNavBar
3
+ } from "./chunk-GO2UDHKM.mjs";
4
+ import "./chunk-I4ZVW4AI.mjs";
5
+ export {
6
+ SideNavBar
7
+ };
8
+ //# sourceMappingURL=SideNavBar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+
3
+ type SideNavButtonIcon = 'side-menu' | 'home' | 'favourite' | 'calendar' | 'notifications' | 'emergency-alert' | 'help';
4
+ interface SideNavButtonProps {
5
+ /**
6
+ * The icon to display
7
+ */
8
+ icon: SideNavButtonIcon;
9
+ /**
10
+ * Whether the button is selected/active
11
+ */
12
+ selected?: boolean;
13
+ /**
14
+ * Whether the button is focused (shows green ring)
15
+ */
16
+ focused?: boolean;
17
+ /**
18
+ * Click handler
19
+ */
20
+ onClick?: () => void;
21
+ /**
22
+ * Accessible label for the button
23
+ */
24
+ 'aria-label'?: string;
25
+ /**
26
+ * Custom className
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Custom style
31
+ */
32
+ style?: React.CSSProperties;
33
+ }
34
+ /**
35
+ * SideNavButton component - Arbor Design System
36
+ *
37
+ * A circular navigation button used in the side navigation bar.
38
+ * Supports different icons and states (default, hover, active, selected, focused).
39
+ */
40
+ declare const SideNavButton: React.ForwardRefExoticComponent<SideNavButtonProps & React.RefAttributes<HTMLButtonElement>>;
41
+
42
+ export { SideNavButton, type SideNavButtonIcon, type SideNavButtonProps };
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+
3
+ type SideNavButtonIcon = 'side-menu' | 'home' | 'favourite' | 'calendar' | 'notifications' | 'emergency-alert' | 'help';
4
+ interface SideNavButtonProps {
5
+ /**
6
+ * The icon to display
7
+ */
8
+ icon: SideNavButtonIcon;
9
+ /**
10
+ * Whether the button is selected/active
11
+ */
12
+ selected?: boolean;
13
+ /**
14
+ * Whether the button is focused (shows green ring)
15
+ */
16
+ focused?: boolean;
17
+ /**
18
+ * Click handler
19
+ */
20
+ onClick?: () => void;
21
+ /**
22
+ * Accessible label for the button
23
+ */
24
+ 'aria-label'?: string;
25
+ /**
26
+ * Custom className
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Custom style
31
+ */
32
+ style?: React.CSSProperties;
33
+ }
34
+ /**
35
+ * SideNavButton component - Arbor Design System
36
+ *
37
+ * A circular navigation button used in the side navigation bar.
38
+ * Supports different icons and states (default, hover, active, selected, focused).
39
+ */
40
+ declare const SideNavButton: React.ForwardRefExoticComponent<SideNavButtonProps & React.RefAttributes<HTMLButtonElement>>;
41
+
42
+ export { SideNavButton, type SideNavButtonIcon, type SideNavButtonProps };
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/SideNavButton/index.ts
31
+ var SideNavButton_exports = {};
32
+ __export(SideNavButton_exports, {
33
+ SideNavButton: () => SideNavButton
34
+ });
35
+ module.exports = __toCommonJS(SideNavButton_exports);
36
+
37
+ // src/SideNavButton/SideNavButton.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_lucide_react = require("lucide-react");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var SideNavButton = React.forwardRef(
42
+ ({
43
+ icon,
44
+ selected = false,
45
+ focused = false,
46
+ onClick,
47
+ "aria-label": ariaLabel,
48
+ className,
49
+ style
50
+ }, ref) => {
51
+ const [isHovered, setIsHovered] = React.useState(false);
52
+ const [isActive, setIsActive] = React.useState(false);
53
+ const getIconColor = () => {
54
+ if (selected) return "#0e8a0e";
55
+ if (isActive || isHovered) return "#2f2f2f";
56
+ return "#7e7e7e";
57
+ };
58
+ const getBackgroundColor = () => {
59
+ if (selected) return "#f0faf3";
60
+ if (isActive) return "#efefef";
61
+ if (isHovered) return "#f8f8f8";
62
+ return "transparent";
63
+ };
64
+ const buttonStyles = {
65
+ display: "flex",
66
+ alignItems: "center",
67
+ justifyContent: "center",
68
+ width: "42px",
69
+ height: "42px",
70
+ borderRadius: "99px",
71
+ border: "none",
72
+ backgroundColor: getBackgroundColor(),
73
+ cursor: "pointer",
74
+ padding: 0,
75
+ outline: "none",
76
+ transition: "background-color 150ms ease, box-shadow 150ms ease",
77
+ boxShadow: focused ? "0px 0px 0px 3px #3cad51" : "none",
78
+ ...style
79
+ };
80
+ const renderIcon = () => {
81
+ const iconColor = getIconColor();
82
+ const iconSize = 20;
83
+ const strokeWidth = 2;
84
+ const iconProps = {
85
+ size: iconSize,
86
+ color: iconColor,
87
+ strokeWidth
88
+ };
89
+ switch (icon) {
90
+ case "side-menu":
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Menu, { ...iconProps });
92
+ case "home":
93
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Home, { ...iconProps });
94
+ case "favourite":
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Star, { ...iconProps });
96
+ case "calendar":
97
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Calendar, { ...iconProps });
98
+ case "notifications":
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Bell, { ...iconProps });
100
+ case "emergency-alert":
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertTriangle, { ...iconProps });
102
+ case "help":
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HelpCircle, { ...iconProps });
104
+ default:
105
+ return null;
106
+ }
107
+ };
108
+ const defaultAriaLabel = icon.charAt(0).toUpperCase() + icon.slice(1);
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ "button",
111
+ {
112
+ ref,
113
+ type: "button",
114
+ className,
115
+ style: buttonStyles,
116
+ onClick,
117
+ onMouseEnter: () => setIsHovered(true),
118
+ onMouseLeave: () => {
119
+ setIsHovered(false);
120
+ setIsActive(false);
121
+ },
122
+ onMouseDown: () => setIsActive(true),
123
+ onMouseUp: () => setIsActive(false),
124
+ "aria-label": ariaLabel || defaultAriaLabel,
125
+ "aria-pressed": selected,
126
+ children: renderIcon()
127
+ }
128
+ );
129
+ }
130
+ );
131
+ SideNavButton.displayName = "SideNavButton";
132
+ // Annotate the CommonJS export names for ESM import in node:
133
+ 0 && (module.exports = {
134
+ SideNavButton
135
+ });
136
+ //# sourceMappingURL=SideNavButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SideNavButton/index.ts","../src/SideNavButton/SideNavButton.tsx"],"sourcesContent":["export { SideNavButton } from './SideNavButton';\nexport type { SideNavButtonProps, SideNavButtonIcon } from './SideNavButton';\n","import * as React from 'react';\nimport { Home, Menu, Star, Calendar, Bell, AlertTriangle, HelpCircle } from 'lucide-react';\n\nexport type SideNavButtonIcon = 'side-menu' | 'home' | 'favourite' | 'calendar' | 'notifications' | 'emergency-alert' | 'help';\n\nexport interface SideNavButtonProps {\n /**\n * The icon to display\n */\n icon: SideNavButtonIcon;\n /**\n * Whether the button is selected/active\n */\n selected?: boolean;\n /**\n * Whether the button is focused (shows green ring)\n */\n focused?: boolean;\n /**\n * Click handler\n */\n onClick?: () => void;\n /**\n * Accessible label for the button\n */\n 'aria-label'?: string;\n /**\n * Custom className\n */\n className?: string;\n /**\n * Custom style\n */\n style?: React.CSSProperties;\n}\n\n/**\n * SideNavButton component - Arbor Design System\n *\n * A circular navigation button used in the side navigation bar.\n * Supports different icons and states (default, hover, active, selected, focused).\n */\nexport const SideNavButton = React.forwardRef<HTMLButtonElement, SideNavButtonProps>(\n (\n {\n icon,\n selected = false,\n focused = false,\n onClick,\n 'aria-label': ariaLabel,\n className,\n style,\n },\n ref\n ) => {\n const [isHovered, setIsHovered] = React.useState(false);\n const [isActive, setIsActive] = React.useState(false);\n\n // Determine icon color based on state\n const getIconColor = () => {\n if (selected) return '#0e8a0e'; // Green for selected\n if (isActive || isHovered) return '#2f2f2f'; // Dark gray for hover/active\n return '#7e7e7e'; // Gray for default\n };\n\n // Determine background color based on state\n const getBackgroundColor = () => {\n if (selected) return '#f0faf3'; // Light green for selected\n if (isActive) return '#efefef'; // Darker gray for active\n if (isHovered) return '#f8f8f8'; // Light gray for hover\n return 'transparent'; // Transparent for default\n };\n\n const buttonStyles: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '42px',\n height: '42px',\n borderRadius: '99px',\n border: 'none',\n backgroundColor: getBackgroundColor(),\n cursor: 'pointer',\n padding: 0,\n outline: 'none',\n transition: 'background-color 150ms ease, box-shadow 150ms ease',\n boxShadow: focused ? '0px 0px 0px 3px #3cad51' : 'none',\n ...style,\n };\n\n // Get the appropriate icon component\n const renderIcon = () => {\n const iconColor = getIconColor();\n const iconSize = 20;\n const strokeWidth = 2;\n\n // All icons are stroke-only (outline), no fill - just color changes\n const iconProps = {\n size: iconSize,\n color: iconColor,\n strokeWidth,\n };\n\n switch (icon) {\n case 'side-menu':\n return <Menu {...iconProps} />;\n case 'home':\n return <Home {...iconProps} />;\n case 'favourite':\n return <Star {...iconProps} />;\n case 'calendar':\n return <Calendar {...iconProps} />;\n case 'notifications':\n return <Bell {...iconProps} />;\n case 'emergency-alert':\n return <AlertTriangle {...iconProps} />;\n case 'help':\n return <HelpCircle {...iconProps} />;\n default:\n return null;\n }\n };\n\n // Default aria-label based on icon\n const defaultAriaLabel = icon.charAt(0).toUpperCase() + icon.slice(1);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={className}\n style={buttonStyles}\n onClick={onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => {\n setIsHovered(false);\n setIsActive(false);\n }}\n onMouseDown={() => setIsActive(true)}\n onMouseUp={() => setIsActive(false)}\n aria-label={ariaLabel || defaultAriaLabel}\n aria-pressed={selected}\n >\n {renderIcon()}\n </button>\n );\n }\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KAAK;AACH,iBAAO,4CAAC,4BAAM,GAAG,WAAW;AAAA,QAC9B,KAAK;AACH,iBAAO,4CAAC,gCAAU,GAAG,WAAW;AAAA,QAClC,KAAK;AACH,iBAAO,4CAAC,4BAAM,GAAG,WAAW;AAAA,QAC9B,KAAK;AACH,iBAAO,4CAAC,qCAAe,GAAG,WAAW;AAAA,QACvC,KAAK;AACH,iBAAO,4CAAC,kCAAY,GAAG,WAAW;AAAA,QACpC;AACE,iBAAO;AAAA,MACX;AAAA,IACF;AAGA,UAAM,mBAAmB,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC;AAEpE,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL;AAAA,QACA,OAAO;AAAA,QACP;AAAA,QACA,cAAc,MAAM,aAAa,IAAI;AAAA,QACrC,cAAc,MAAM;AAClB,uBAAa,KAAK;AAClB,sBAAY,KAAK;AAAA,QACnB;AAAA,QACA,aAAa,MAAM,YAAY,IAAI;AAAA,QACnC,WAAW,MAAM,YAAY,KAAK;AAAA,QAClC,cAAY,aAAa;AAAA,QACzB,gBAAc;AAAA,QAEb,qBAAW;AAAA;AAAA,IACd;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ SideNavButton
3
+ } from "./chunk-I4ZVW4AI.mjs";
4
+ export {
5
+ SideNavButton
6
+ };
7
+ //# sourceMappingURL=SideNavButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,103 @@
1
+ import * as React from 'react';
2
+
3
+ interface NavItem {
4
+ /**
5
+ * Unique identifier for the nav item
6
+ */
7
+ id: string;
8
+ /**
9
+ * Display label for the nav item
10
+ */
11
+ label: string;
12
+ /**
13
+ * Whether this nav item is currently active
14
+ */
15
+ active?: boolean;
16
+ }
17
+ interface TopNavBarProps {
18
+ /**
19
+ * School logo image source URL
20
+ */
21
+ schoolLogoSrc?: string;
22
+ /**
23
+ * Alt text for school logo
24
+ */
25
+ schoolLogoAlt?: string;
26
+ /**
27
+ * Click handler for school logo
28
+ */
29
+ onSchoolLogoClick?: () => void;
30
+ /**
31
+ * Array of navigation items
32
+ */
33
+ navItems?: NavItem[];
34
+ /**
35
+ * Callback when a nav item is clicked
36
+ */
37
+ onNavItemClick?: (item: NavItem) => void;
38
+ /**
39
+ * Search value
40
+ */
41
+ searchValue?: string;
42
+ /**
43
+ * Search change handler
44
+ */
45
+ onSearchChange?: (value: string) => void;
46
+ /**
47
+ * Search submit handler
48
+ */
49
+ onSearchSubmit?: (value: string) => void;
50
+ /**
51
+ * Search clear handler
52
+ */
53
+ onSearchClear?: () => void;
54
+ /**
55
+ * Action button label (e.g., "Ask Arbor")
56
+ */
57
+ actionButtonLabel?: string;
58
+ /**
59
+ * Action button click handler
60
+ */
61
+ onActionButtonClick?: () => void;
62
+ /**
63
+ * Whether to show the action button
64
+ */
65
+ showActionButton?: boolean;
66
+ /**
67
+ * User avatar image source URL
68
+ */
69
+ avatarSrc?: string;
70
+ /**
71
+ * User avatar initials (fallback when no image)
72
+ */
73
+ avatarInitials?: string;
74
+ /**
75
+ * User avatar alt text
76
+ */
77
+ avatarAlt?: string;
78
+ /**
79
+ * Avatar section click handler
80
+ */
81
+ onAvatarClick?: () => void;
82
+ /**
83
+ * Logo section click handler
84
+ */
85
+ onLogoClick?: () => void;
86
+ /**
87
+ * Custom className
88
+ */
89
+ className?: string;
90
+ /**
91
+ * Custom style
92
+ */
93
+ style?: React.CSSProperties;
94
+ }
95
+ /**
96
+ * TopNavBar component - Arbor Design System
97
+ *
98
+ * A full-width navigation bar fixed to the top of the page.
99
+ * Contains school logo, navigation items, search, action button, and avatar-logo lockup.
100
+ */
101
+ declare const TopNavBar: React.ForwardRefExoticComponent<TopNavBarProps & React.RefAttributes<HTMLElement>>;
102
+
103
+ export { type NavItem, TopNavBar, type TopNavBarProps };