@tonyarbor/components 0.8.0 → 0.9.1
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/Button.js +2 -0
- package/dist/Button.js.map +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/SideNavBar.d.mts +15 -0
- package/dist/SideNavBar.d.ts +15 -0
- package/dist/SideNavBar.js +111 -55
- package/dist/SideNavBar.js.map +1 -1
- package/dist/SideNavBar.mjs +1 -1
- package/dist/TopNavBar.js +2 -0
- package/dist/TopNavBar.js.map +1 -1
- package/dist/TopNavBar.mjs +2 -2
- package/dist/{chunk-NOUFR6W2.mjs → chunk-NXCJQPN2.mjs} +3 -1
- package/dist/chunk-NXCJQPN2.mjs.map +1 -0
- package/dist/chunk-XHHK23VA.mjs +163 -0
- package/dist/chunk-XHHK23VA.mjs.map +1 -0
- package/dist/{chunk-YUXQQX7M.mjs → chunk-ZJKDUWEH.mjs} +2 -2
- package/dist/index.d.mts +69 -2
- package/dist/index.d.ts +69 -2
- package/dist/index.js +281 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +170 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-GO2UDHKM.mjs +0 -107
- package/dist/chunk-GO2UDHKM.mjs.map +0 -1
- package/dist/chunk-NOUFR6W2.mjs.map +0 -1
- /package/dist/{chunk-YUXQQX7M.mjs.map → chunk-ZJKDUWEH.mjs.map} +0 -0
package/dist/Button.js
CHANGED
|
@@ -44,6 +44,8 @@ var buttonStyles = {
|
|
|
44
44
|
display: "inline-flex",
|
|
45
45
|
alignItems: "center",
|
|
46
46
|
justifyContent: "center",
|
|
47
|
+
gap: "8px",
|
|
48
|
+
// Consistent spacing between icon and text
|
|
47
49
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
48
50
|
fontWeight: "500",
|
|
49
51
|
borderRadius: "99px",
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Button/index.ts","../src/Button/Button.tsx"],"sourcesContent":["export { Button } from './Button';\nexport type { ButtonProps } from './Button';\n","import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { clsx } from 'clsx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'destructive-secondary' | 'ghost';\nexport type ButtonSize = 'small' | 'medium';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The visual style variant of the button\n * @default 'primary'\n */\n variant?: ButtonVariant;\n /**\n * The size of the button\n * @default 'medium'\n */\n size?: ButtonSize;\n /**\n * If true, the component will be rendered as a child element\n * and merge its props with the child\n */\n asChild?: boolean;\n /**\n * The content of the button\n */\n children: React.ReactNode;\n}\n\n// Arbor Design System button styles\nconst buttonStyles = {\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: '500',\n borderRadius: '99px', // Pill shape\n border: 'none',\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n outline: 'none',\n },\n variants: {\n primary: {\n backgroundColor: '#0e8a0e', // brand-600\n color: '#ffffff',\n ':hover': {\n backgroundColor: '#005700', // brand-800\n },\n ':active': {\n backgroundColor: '#024002', // brand-900\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#b3b3b3', // grey-400\n cursor: 'not-allowed',\n },\n },\n secondary: {\n backgroundColor: '#ffffff',\n color: '#2f2f2f', // grey-900\n border: '1px solid #d1d1d1', // grey-300\n ':hover': {\n backgroundColor: '#f8f8f8', // grey-050\n },\n ':active': {\n backgroundColor: '#efefef', // grey-100\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#f8f8f8',\n color: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n tertiary: {\n backgroundColor: '#efefef', // grey-100\n color: '#2f2f2f', // grey-900\n ':hover': {\n backgroundColor: '#dfdfdf', // grey-200\n },\n ':active': {\n backgroundColor: '#d1d1d1', // grey-300\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#f8f8f8', // grey-050\n color: '#b3b3b3', // grey-400\n cursor: 'not-allowed',\n },\n },\n destructive: {\n backgroundColor: '#c93232', // destructive-500\n color: '#ffffff',\n ':hover': {\n backgroundColor: '#920a0a', // destructive-700\n },\n ':active': {\n backgroundColor: '#610202', // destructive-800\n },\n ':focus-visible': {\n outline: '3px solid #e86565', // destructive-300\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n 'destructive-secondary': {\n backgroundColor: '#ffffff',\n color: '#a62323', // destructive-600\n border: '1px solid #c93232', // destructive-500\n ':hover': {\n backgroundColor: '#a62323', // destructive-600\n color: '#ffffff',\n border: '1px solid #a62323',\n },\n ':active': {\n backgroundColor: '#920a0a', // destructive-700\n color: '#ffffff',\n border: '1px solid #920a0a',\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500 (green focus ring)\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#ffffff',\n color: '#b3b3b3',\n border: '1px solid #d1d1d1',\n cursor: 'not-allowed',\n },\n },\n ghost: {\n backgroundColor: 'transparent',\n color: '#0b800b', // brand-700 for link style\n textDecoration: 'underline',\n ':hover': {\n color: '#005700', // brand-800\n },\n ':active': {\n color: '#024002', // brand-900\n },\n ':focus-visible': {\n outline: '3px solid #3cad51',\n outlineOffset: '2px',\n },\n ':disabled': {\n color: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n },\n sizes: {\n small: {\n height: '32px',\n fontSize: '13px',\n padding: '8px 16px',\n },\n medium: {\n height: '36px',\n fontSize: '13px',\n padding: '8px 16px',\n },\n },\n};\n\n/**\n * Button component - Arbor Design System\n *\n * A flexible button component with pill-shaped design following Arbor's design system.\n * Supports primary (green), secondary (outlined), destructive (red), and ghost (link-style) variants.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"medium\">\n * Save Changes\n * </Button>\n * ```\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'primary',\n size = 'medium',\n asChild = false,\n className,\n disabled,\n style,\n children,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button';\n const [isHovered, setIsHovered] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n\n const variantStyles = buttonStyles.variants[variant];\n const sizeStyles = buttonStyles.sizes[size];\n\n const combinedStyle: React.CSSProperties = {\n ...buttonStyles.base,\n ...variantStyles,\n ...sizeStyles,\n ...(isHovered && !disabled && variantStyles[':hover']),\n ...(isFocused && !disabled && variantStyles[':focus-visible']),\n ...(disabled && variantStyles[':disabled']),\n ...style,\n };\n\n const handleMouseEnter = (e: React.MouseEvent<HTMLButtonElement>) => {\n setIsHovered(true);\n onMouseEnter?.(e);\n };\n\n const handleMouseLeave = (e: React.MouseEvent<HTMLButtonElement>) => {\n setIsHovered(false);\n onMouseLeave?.(e);\n };\n\n const handleFocus = (e: React.FocusEvent<HTMLButtonElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLButtonElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n };\n\n return (\n <Comp\n ref={ref}\n className={clsx('arbor-button', className)}\n style={combinedStyle}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n >\n {children}\n </Comp>\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"mappings":";;;;;;;;;;;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;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAK,gBAAgB,SAAS;AAAA,QACzC,OAAO;AAAA,QACP;AAAA,QACA,cAAc;AAAA,QACd,cAAc;AAAA,QACd,SAAS;AAAA,QACT,QAAQ;AAAA,QACP,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/Button/index.ts","../src/Button/Button.tsx"],"sourcesContent":["export { Button } from './Button';\nexport type { ButtonProps } from './Button';\n","import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { clsx } from 'clsx';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'destructive-secondary' | 'ghost';\nexport type ButtonSize = 'small' | 'medium';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The visual style variant of the button\n * @default 'primary'\n */\n variant?: ButtonVariant;\n /**\n * The size of the button\n * @default 'medium'\n */\n size?: ButtonSize;\n /**\n * If true, the component will be rendered as a child element\n * and merge its props with the child\n */\n asChild?: boolean;\n /**\n * The content of the button\n */\n children: React.ReactNode;\n}\n\n// Arbor Design System button styles\nconst buttonStyles = {\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px', // Consistent spacing between icon and text\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: '500',\n borderRadius: '99px', // Pill shape\n border: 'none',\n cursor: 'pointer',\n transition: 'all 0.2s ease-in-out',\n outline: 'none',\n },\n variants: {\n primary: {\n backgroundColor: '#0e8a0e', // brand-600\n color: '#ffffff',\n ':hover': {\n backgroundColor: '#005700', // brand-800\n },\n ':active': {\n backgroundColor: '#024002', // brand-900\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#b3b3b3', // grey-400\n cursor: 'not-allowed',\n },\n },\n secondary: {\n backgroundColor: '#ffffff',\n color: '#2f2f2f', // grey-900\n border: '1px solid #d1d1d1', // grey-300\n ':hover': {\n backgroundColor: '#f8f8f8', // grey-050\n },\n ':active': {\n backgroundColor: '#efefef', // grey-100\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#f8f8f8',\n color: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n tertiary: {\n backgroundColor: '#efefef', // grey-100\n color: '#2f2f2f', // grey-900\n ':hover': {\n backgroundColor: '#dfdfdf', // grey-200\n },\n ':active': {\n backgroundColor: '#d1d1d1', // grey-300\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#f8f8f8', // grey-050\n color: '#b3b3b3', // grey-400\n cursor: 'not-allowed',\n },\n },\n destructive: {\n backgroundColor: '#c93232', // destructive-500\n color: '#ffffff',\n ':hover': {\n backgroundColor: '#920a0a', // destructive-700\n },\n ':active': {\n backgroundColor: '#610202', // destructive-800\n },\n ':focus-visible': {\n outline: '3px solid #e86565', // destructive-300\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n 'destructive-secondary': {\n backgroundColor: '#ffffff',\n color: '#a62323', // destructive-600\n border: '1px solid #c93232', // destructive-500\n ':hover': {\n backgroundColor: '#a62323', // destructive-600\n color: '#ffffff',\n border: '1px solid #a62323',\n },\n ':active': {\n backgroundColor: '#920a0a', // destructive-700\n color: '#ffffff',\n border: '1px solid #920a0a',\n },\n ':focus-visible': {\n outline: '3px solid #3cad51', // brand-500 (green focus ring)\n outlineOffset: '0px',\n },\n ':disabled': {\n backgroundColor: '#ffffff',\n color: '#b3b3b3',\n border: '1px solid #d1d1d1',\n cursor: 'not-allowed',\n },\n },\n ghost: {\n backgroundColor: 'transparent',\n color: '#0b800b', // brand-700 for link style\n textDecoration: 'underline',\n ':hover': {\n color: '#005700', // brand-800\n },\n ':active': {\n color: '#024002', // brand-900\n },\n ':focus-visible': {\n outline: '3px solid #3cad51',\n outlineOffset: '2px',\n },\n ':disabled': {\n color: '#b3b3b3',\n cursor: 'not-allowed',\n },\n },\n },\n sizes: {\n small: {\n height: '32px',\n fontSize: '13px',\n padding: '8px 16px',\n },\n medium: {\n height: '36px',\n fontSize: '13px',\n padding: '8px 16px',\n },\n },\n};\n\n/**\n * Button component - Arbor Design System\n *\n * A flexible button component with pill-shaped design following Arbor's design system.\n * Supports primary (green), secondary (outlined), destructive (red), and ghost (link-style) variants.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"medium\">\n * Save Changes\n * </Button>\n * ```\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'primary',\n size = 'medium',\n asChild = false,\n className,\n disabled,\n style,\n children,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button';\n const [isHovered, setIsHovered] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n\n const variantStyles = buttonStyles.variants[variant];\n const sizeStyles = buttonStyles.sizes[size];\n\n const combinedStyle: React.CSSProperties = {\n ...buttonStyles.base,\n ...variantStyles,\n ...sizeStyles,\n ...(isHovered && !disabled && variantStyles[':hover']),\n ...(isFocused && !disabled && variantStyles[':focus-visible']),\n ...(disabled && variantStyles[':disabled']),\n ...style,\n };\n\n const handleMouseEnter = (e: React.MouseEvent<HTMLButtonElement>) => {\n setIsHovered(true);\n onMouseEnter?.(e);\n };\n\n const handleMouseLeave = (e: React.MouseEvent<HTMLButtonElement>) => {\n setIsHovered(false);\n onMouseLeave?.(e);\n };\n\n const handleFocus = (e: React.FocusEvent<HTMLButtonElement>) => {\n setIsFocused(true);\n onFocus?.(e);\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLButtonElement>) => {\n setIsFocused(false);\n onBlur?.(e);\n };\n\n return (\n <Comp\n ref={ref}\n className={clsx('arbor-button', className)}\n style={combinedStyle}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n >\n {children}\n </Comp>\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,wBAAqB;AACrB,kBAAqB;AAsPf;AA1NN,IAAM,eAAe;AAAA,EACnB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,KAAK;AAAA;AAAA,IACL,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,iBAAiB;AAAA;AAAA,MACjB,OAAO;AAAA,MACP,UAAU;AAAA,QACR,iBAAiB;AAAA;AAAA,MACnB;AAAA,MACA,WAAW;AAAA,QACT,iBAAiB;AAAA;AAAA,MACnB;AAAA,MACA,kBAAkB;AAAA,QAChB,SAAS;AAAA;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,MACA,aAAa;AAAA,QACX,iBAAiB;AAAA;AAAA,QACjB,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,iBAAiB;AAAA,MACjB,OAAO;AAAA;AAAA,MACP,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA,QACR,iBAAiB;AAAA;AAAA,MACnB;AAAA,MACA,WAAW;AAAA,QACT,iBAAiB;AAAA;AAAA,MACnB;AAAA,MACA,kBAAkB;AAAA,QAChB,SAAS;AAAA;AAAA,QACT,eAAe;AAAA,MACjB;AAAA,MACA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A,IAClB;AAEA,UAAM,mBAAmB,CAAC,MAA2C;AACnE,mBAAa,KAAK;AAClB,qBAAe,CAAC;AAAA,IAClB;AAEA,UAAM,cAAc,CAAC,MAA2C;AAC9D,mBAAa,IAAI;AACjB,gBAAU,CAAC;AAAA,IACb;AAEA,UAAM,aAAa,CAAC,MAA2C;AAC7D,mBAAa,KAAK;AAClB,eAAS,CAAC;AAAA,IACZ;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAK,gBAAgB,SAAS;AAAA,QACzC,OAAO;AAAA,QACP;AAAA,QACA,cAAc;AAAA,QACd,cAAc;AAAA,QACd,SAAS;AAAA,QACT,QAAQ;AAAA,QACP,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
|
package/dist/Button.mjs
CHANGED
package/dist/SideNavBar.d.mts
CHANGED
|
@@ -3,6 +3,19 @@ import { SideNavButtonIcon } from './SideNavButton.mjs';
|
|
|
3
3
|
|
|
4
4
|
type SideNavBarIcon = Exclude<SideNavButtonIcon, 'home'>;
|
|
5
5
|
interface SideNavBarProps {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the navigation panel is open (showing title and children)
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Title displayed in the header when open (e.g., "Attendance")
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Navigation items to display when open (typically SideNavItem components)
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
6
19
|
/**
|
|
7
20
|
* The currently selected/active icon (if any)
|
|
8
21
|
*/
|
|
@@ -29,6 +42,8 @@ interface SideNavBarProps {
|
|
|
29
42
|
* - Middle: Favourite, Notifications, Calendar
|
|
30
43
|
* - Lower: Emergency alert
|
|
31
44
|
* - Bottom (pushed down): Help
|
|
45
|
+
*
|
|
46
|
+
* When open, displays a content panel with a title header and navigation items.
|
|
32
47
|
*/
|
|
33
48
|
declare const SideNavBar: React.FC<SideNavBarProps>;
|
|
34
49
|
|
package/dist/SideNavBar.d.ts
CHANGED
|
@@ -3,6 +3,19 @@ import { SideNavButtonIcon } from './SideNavButton.js';
|
|
|
3
3
|
|
|
4
4
|
type SideNavBarIcon = Exclude<SideNavButtonIcon, 'home'>;
|
|
5
5
|
interface SideNavBarProps {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the navigation panel is open (showing title and children)
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Title displayed in the header when open (e.g., "Attendance")
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Navigation items to display when open (typically SideNavItem components)
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
6
19
|
/**
|
|
7
20
|
* The currently selected/active icon (if any)
|
|
8
21
|
*/
|
|
@@ -29,6 +42,8 @@ interface SideNavBarProps {
|
|
|
29
42
|
* - Middle: Favourite, Notifications, Calendar
|
|
30
43
|
* - Lower: Emergency alert
|
|
31
44
|
* - Bottom (pushed down): Help
|
|
45
|
+
*
|
|
46
|
+
* When open, displays a content panel with a title header and navigation items.
|
|
32
47
|
*/
|
|
33
48
|
declare const SideNavBar: React.FC<SideNavBarProps>;
|
|
34
49
|
|
package/dist/SideNavBar.js
CHANGED
|
@@ -133,12 +133,20 @@ SideNavButton.displayName = "SideNavButton";
|
|
|
133
133
|
// src/SideNavBar/SideNavBar.tsx
|
|
134
134
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
135
135
|
var SideNavBar = ({
|
|
136
|
+
isOpen = false,
|
|
137
|
+
title,
|
|
138
|
+
children,
|
|
136
139
|
selectedIcon,
|
|
137
140
|
onIconClick,
|
|
138
141
|
className,
|
|
139
142
|
style
|
|
140
143
|
}) => {
|
|
141
|
-
const
|
|
144
|
+
const wrapperStyles = {
|
|
145
|
+
display: "flex",
|
|
146
|
+
height: "100%",
|
|
147
|
+
...style
|
|
148
|
+
};
|
|
149
|
+
const iconBarStyles = {
|
|
142
150
|
display: "flex",
|
|
143
151
|
flexDirection: "column",
|
|
144
152
|
alignItems: "center",
|
|
@@ -150,7 +158,7 @@ var SideNavBar = ({
|
|
|
150
158
|
height: "100%",
|
|
151
159
|
width: "58px",
|
|
152
160
|
boxSizing: "border-box",
|
|
153
|
-
|
|
161
|
+
flexShrink: 0
|
|
154
162
|
};
|
|
155
163
|
const topSectionStyles = {
|
|
156
164
|
display: "flex",
|
|
@@ -163,68 +171,116 @@ var SideNavBar = ({
|
|
|
163
171
|
height: "1px",
|
|
164
172
|
backgroundColor: "#efefef"
|
|
165
173
|
};
|
|
174
|
+
const contentPanelStyles = {
|
|
175
|
+
display: "flex",
|
|
176
|
+
flexDirection: "column",
|
|
177
|
+
backgroundColor: "#ffffff",
|
|
178
|
+
borderLeft: "1px solid #f8f8f8",
|
|
179
|
+
height: "100%",
|
|
180
|
+
width: "232px",
|
|
181
|
+
boxSizing: "border-box",
|
|
182
|
+
flexShrink: 0,
|
|
183
|
+
minWidth: 0,
|
|
184
|
+
minHeight: 0
|
|
185
|
+
};
|
|
186
|
+
const headerStyles = {
|
|
187
|
+
display: "flex",
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
height: "62px",
|
|
190
|
+
paddingLeft: "20px",
|
|
191
|
+
paddingRight: "16px",
|
|
192
|
+
paddingTop: "4px",
|
|
193
|
+
paddingBottom: "4px",
|
|
194
|
+
borderBottom: "1px solid #f8f8f8",
|
|
195
|
+
boxSizing: "border-box",
|
|
196
|
+
flexShrink: 0
|
|
197
|
+
};
|
|
198
|
+
const titleStyles = {
|
|
199
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
200
|
+
fontSize: "13px",
|
|
201
|
+
fontWeight: 600,
|
|
202
|
+
color: "#2f2f2f",
|
|
203
|
+
lineHeight: 1.5
|
|
204
|
+
};
|
|
205
|
+
const navListStyles = {
|
|
206
|
+
display: "flex",
|
|
207
|
+
flexDirection: "column",
|
|
208
|
+
gap: "4px",
|
|
209
|
+
flex: 1,
|
|
210
|
+
minHeight: 0,
|
|
211
|
+
overflowX: "hidden",
|
|
212
|
+
overflowY: "auto",
|
|
213
|
+
padding: "8px",
|
|
214
|
+
boxSizing: "border-box"
|
|
215
|
+
};
|
|
166
216
|
const handleClick = (icon) => {
|
|
167
217
|
onIconClick?.(icon);
|
|
168
218
|
};
|
|
169
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className, style:
|
|
170
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style:
|
|
171
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className, style: wrapperStyles, children: [
|
|
220
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: iconBarStyles, children: [
|
|
221
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: topSectionStyles, children: [
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
223
|
+
SideNavButton,
|
|
224
|
+
{
|
|
225
|
+
icon: "side-menu",
|
|
226
|
+
selected: selectedIcon === "side-menu",
|
|
227
|
+
onClick: () => handleClick("side-menu"),
|
|
228
|
+
"aria-label": "Side menu"
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: dividerStyles }),
|
|
232
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
233
|
+
SideNavButton,
|
|
234
|
+
{
|
|
235
|
+
icon: "favourite",
|
|
236
|
+
selected: selectedIcon === "favourite",
|
|
237
|
+
onClick: () => handleClick("favourite"),
|
|
238
|
+
"aria-label": "Favourites"
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
242
|
+
SideNavButton,
|
|
243
|
+
{
|
|
244
|
+
icon: "notifications",
|
|
245
|
+
selected: selectedIcon === "notifications",
|
|
246
|
+
onClick: () => handleClick("notifications"),
|
|
247
|
+
"aria-label": "Notifications"
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
251
|
+
SideNavButton,
|
|
252
|
+
{
|
|
253
|
+
icon: "calendar",
|
|
254
|
+
selected: selectedIcon === "calendar",
|
|
255
|
+
onClick: () => handleClick("calendar"),
|
|
256
|
+
"aria-label": "Calendar"
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: dividerStyles }),
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
261
|
+
SideNavButton,
|
|
262
|
+
{
|
|
263
|
+
icon: "emergency-alert",
|
|
264
|
+
selected: selectedIcon === "emergency-alert",
|
|
265
|
+
onClick: () => handleClick("emergency-alert"),
|
|
266
|
+
"aria-label": "Emergency alerts"
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
] }),
|
|
181
270
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
182
271
|
SideNavButton,
|
|
183
272
|
{
|
|
184
|
-
icon: "
|
|
185
|
-
selected: selectedIcon === "
|
|
186
|
-
onClick: () => handleClick("
|
|
187
|
-
"aria-label": "
|
|
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"
|
|
273
|
+
icon: "help",
|
|
274
|
+
selected: selectedIcon === "help",
|
|
275
|
+
onClick: () => handleClick("help"),
|
|
276
|
+
"aria-label": "Help"
|
|
216
277
|
}
|
|
217
278
|
)
|
|
218
279
|
] }),
|
|
219
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
selected: selectedIcon === "help",
|
|
224
|
-
onClick: () => handleClick("help"),
|
|
225
|
-
"aria-label": "Help"
|
|
226
|
-
}
|
|
227
|
-
)
|
|
280
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: contentPanelStyles, children: [
|
|
281
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: headerStyles, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: titleStyles, children: title }) }),
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: navListStyles, children })
|
|
283
|
+
] })
|
|
228
284
|
] });
|
|
229
285
|
};
|
|
230
286
|
SideNavBar.displayName = "SideNavBar";
|
package/dist/SideNavBar.js.map
CHANGED
|
@@ -1 +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,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,iBAAiB,mBAAmB;AAAA,MACpC,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,WAAW,UAAU,4BAA4B;AAAA,MACjD,GAAG;AAAA,IAC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;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"]}
|
|
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 * Whether the navigation panel is open (showing title and children)\n * @default false\n */\n isOpen?: boolean;\n /**\n * Title displayed in the header when open (e.g., \"Attendance\")\n */\n title?: string;\n /**\n * Navigation items to display when open (typically SideNavItem components)\n */\n children?: React.ReactNode;\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 *\n * When open, displays a content panel with a title header and navigation items.\n */\nexport const SideNavBar: React.FC<SideNavBarProps> = ({\n isOpen = false,\n title,\n children,\n selectedIcon,\n onIconClick,\n className,\n style,\n}) => {\n const wrapperStyles: React.CSSProperties = {\n display: 'flex',\n height: '100%',\n ...style,\n };\n\n const iconBarStyles: 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 flexShrink: 0,\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 contentPanelStyles: React.CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: '#ffffff',\n borderLeft: '1px solid #f8f8f8',\n height: '100%',\n width: '232px',\n boxSizing: 'border-box',\n flexShrink: 0,\n minWidth: 0,\n minHeight: 0,\n };\n\n const headerStyles: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n height: '62px',\n paddingLeft: '20px',\n paddingRight: '16px',\n paddingTop: '4px',\n paddingBottom: '4px',\n borderBottom: '1px solid #f8f8f8',\n boxSizing: 'border-box',\n flexShrink: 0,\n };\n\n const titleStyles: React.CSSProperties = {\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontSize: '13px',\n fontWeight: 600,\n color: '#2f2f2f',\n lineHeight: 1.5,\n };\n\n const navListStyles: React.CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n gap: '4px',\n flex: 1,\n minHeight: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n padding: '8px',\n boxSizing: 'border-box',\n };\n\n const handleClick = (icon: SideNavBarIcon) => {\n onIconClick?.(icon);\n };\n\n return (\n <div className={className} style={wrapperStyles}>\n {/* Icon Bar */}\n <div style={iconBarStyles}>\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 {/* Content Panel (only shown when open) */}\n {isOpen && (\n <div style={contentPanelStyles}>\n {/* Header with title */}\n {title && (\n <div style={headerStyles}>\n <span style={titleStyles}>{title}</span>\n </div>\n )}\n\n {/* Navigation list container */}\n <div style={navListStyles}>\n {children}\n </div>\n </div>\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,QAAQ;AAAA,MACR,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,iBAAiB,mBAAmB;AAAA,MACpC,QAAQ;AAAA,MACR,S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MACb;AAAA,OACF;AAAA,IAGC,UACC,8CAAC,SAAI,OAAO,oBAET;AAAA,eACC,6CAAC,SAAI,OAAO,cACV,uDAAC,UAAK,OAAO,aAAc,iBAAM,GACnC;AAAA,MAIF,6CAAC,SAAI,OAAO,eACT,UACH;AAAA,OACF;AAAA,KAEJ;AAEJ;AAEA,WAAW,cAAc;","names":["import_jsx_runtime"]}
|
package/dist/SideNavBar.mjs
CHANGED
package/dist/TopNavBar.js
CHANGED
|
@@ -285,6 +285,8 @@ var buttonStyles = {
|
|
|
285
285
|
display: "inline-flex",
|
|
286
286
|
alignItems: "center",
|
|
287
287
|
justifyContent: "center",
|
|
288
|
+
gap: "8px",
|
|
289
|
+
// Consistent spacing between icon and text
|
|
288
290
|
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
289
291
|
fontWeight: "500",
|
|
290
292
|
borderRadius: "99px",
|