@tonyarbor/components 0.6.0 → 0.7.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/AvatarLogoLockup.d.mts +41 -0
- package/dist/AvatarLogoLockup.d.ts +41 -0
- package/dist/AvatarLogoLockup.js +344 -0
- package/dist/AvatarLogoLockup.js.map +1 -0
- package/dist/AvatarLogoLockup.mjs +9 -0
- package/dist/AvatarLogoLockup.mjs.map +1 -0
- package/dist/Button.d.mts +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +56 -0
- package/dist/Button.js.map +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/Modal.d.mts +73 -0
- package/dist/Modal.d.ts +73 -0
- package/dist/Modal.js +114 -0
- package/dist/Modal.js.map +1 -0
- package/dist/Modal.mjs +9 -0
- package/dist/Modal.mjs.map +1 -0
- package/dist/ModalFooter.d.mts +40 -0
- package/dist/ModalFooter.d.ts +40 -0
- package/dist/ModalFooter.js +73 -0
- package/dist/ModalFooter.js.map +1 -0
- package/dist/ModalFooter.mjs +7 -0
- package/dist/ModalFooter.mjs.map +1 -0
- package/dist/ModalHeader.d.mts +65 -0
- package/dist/ModalHeader.d.ts +65 -0
- package/dist/ModalHeader.js +257 -0
- package/dist/ModalHeader.js.map +1 -0
- package/dist/ModalHeader.mjs +8 -0
- package/dist/ModalHeader.mjs.map +1 -0
- package/dist/TopNavBar.d.mts +103 -0
- package/dist/TopNavBar.d.ts +103 -0
- package/dist/TopNavBar.js +994 -0
- package/dist/TopNavBar.js.map +1 -0
- package/dist/TopNavBar.mjs +13 -0
- package/dist/TopNavBar.mjs.map +1 -0
- package/dist/TopNavItem.d.mts +33 -0
- package/dist/TopNavItem.d.ts +33 -0
- package/dist/TopNavItem.js +108 -0
- package/dist/TopNavItem.js.map +1 -0
- package/dist/TopNavItem.mjs +7 -0
- package/dist/TopNavItem.mjs.map +1 -0
- package/dist/chunk-7JWINM2N.mjs +77 -0
- package/dist/chunk-7JWINM2N.mjs.map +1 -0
- package/dist/chunk-AVYGOALO.mjs +72 -0
- package/dist/chunk-AVYGOALO.mjs.map +1 -0
- package/dist/chunk-GIQDPHZQ.mjs +121 -0
- package/dist/chunk-GIQDPHZQ.mjs.map +1 -0
- package/dist/chunk-HG2ORLLW.mjs +116 -0
- package/dist/chunk-HG2ORLLW.mjs.map +1 -0
- package/dist/{chunk-ALEJXAZY.mjs → chunk-NOUFR6W2.mjs} +57 -1
- package/dist/chunk-NOUFR6W2.mjs.map +1 -0
- package/dist/chunk-P7RKUESQ.mjs +37 -0
- package/dist/chunk-P7RKUESQ.mjs.map +1 -0
- package/dist/chunk-YUXQQX7M.mjs +182 -0
- package/dist/chunk-YUXQQX7M.mjs.map +1 -0
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +628 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -2
- package/package.json +31 -1
- package/dist/chunk-ALEJXAZY.mjs.map +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
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/ModalHeader/index.ts
|
|
31
|
+
var ModalHeader_exports = {};
|
|
32
|
+
__export(ModalHeader_exports, {
|
|
33
|
+
ModalHeader: () => ModalHeader
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(ModalHeader_exports);
|
|
36
|
+
|
|
37
|
+
// src/ModalHeader/ModalHeader.tsx
|
|
38
|
+
var React2 = __toESM(require("react"));
|
|
39
|
+
var import_clsx2 = require("clsx");
|
|
40
|
+
|
|
41
|
+
// src/SectionIcon/SectionIcon.tsx
|
|
42
|
+
var React = __toESM(require("react"));
|
|
43
|
+
var import_clsx = require("clsx");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
var WarningIcon = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "14", height: "12", viewBox: "0 0 14 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
"path",
|
|
48
|
+
{
|
|
49
|
+
d: "M7 0.5L13.5 11.5H0.5L7 0.5Z",
|
|
50
|
+
stroke: color,
|
|
51
|
+
strokeWidth: "1.2",
|
|
52
|
+
strokeLinejoin: "round",
|
|
53
|
+
fill: "none"
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
+
"path",
|
|
58
|
+
{
|
|
59
|
+
d: "M7 4.5V7",
|
|
60
|
+
stroke: color,
|
|
61
|
+
strokeWidth: "1.2",
|
|
62
|
+
strokeLinecap: "round"
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "7", cy: "9", r: "0.75", fill: color })
|
|
66
|
+
] });
|
|
67
|
+
var InfoIcon = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "7", cy: "7", r: "6", stroke: color, strokeWidth: "1.2", fill: "none" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M7 6V10", stroke: color, strokeWidth: "1.2", strokeLinecap: "round" }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "7", cy: "4", r: "0.75", fill: color })
|
|
71
|
+
] });
|
|
72
|
+
var SuccessIcon = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "7", cy: "7", r: "6", stroke: color, strokeWidth: "1.2", fill: "none" }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 7L6 9L10 5", stroke: color, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
75
|
+
] });
|
|
76
|
+
var variantConfig = {
|
|
77
|
+
warning: {
|
|
78
|
+
backgroundColor: "#fffaf5",
|
|
79
|
+
iconColor: "#e4720d"
|
|
80
|
+
},
|
|
81
|
+
danger: {
|
|
82
|
+
backgroundColor: "#fff5f5",
|
|
83
|
+
iconColor: "#c93232"
|
|
84
|
+
},
|
|
85
|
+
info: {
|
|
86
|
+
backgroundColor: "#f5fbff",
|
|
87
|
+
iconColor: "#2c8bca"
|
|
88
|
+
},
|
|
89
|
+
success: {
|
|
90
|
+
backgroundColor: "#f5fff8",
|
|
91
|
+
iconColor: "#16a33d"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var sectionIconStyles = {
|
|
95
|
+
container: {
|
|
96
|
+
display: "inline-flex",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
padding: "4px",
|
|
100
|
+
borderRadius: "99px"
|
|
101
|
+
},
|
|
102
|
+
iconWrapper: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center",
|
|
106
|
+
width: "16px",
|
|
107
|
+
height: "16px"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
var SectionIcon = React.forwardRef(
|
|
111
|
+
({ variant = "info", className, style, ...props }, ref) => {
|
|
112
|
+
const config = variantConfig[variant];
|
|
113
|
+
const renderIcon = () => {
|
|
114
|
+
switch (variant) {
|
|
115
|
+
case "warning":
|
|
116
|
+
case "danger":
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WarningIcon, { color: config.iconColor });
|
|
118
|
+
case "success":
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SuccessIcon, { color: config.iconColor });
|
|
120
|
+
case "info":
|
|
121
|
+
default:
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoIcon, { color: config.iconColor });
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
ref,
|
|
129
|
+
className: (0, import_clsx.clsx)("arbor-section-icon", className),
|
|
130
|
+
style: {
|
|
131
|
+
...sectionIconStyles.container,
|
|
132
|
+
backgroundColor: config.backgroundColor,
|
|
133
|
+
...style
|
|
134
|
+
},
|
|
135
|
+
...props,
|
|
136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: sectionIconStyles.iconWrapper, children: renderIcon() })
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
SectionIcon.displayName = "SectionIcon";
|
|
142
|
+
|
|
143
|
+
// src/ModalHeader/ModalHeader.tsx
|
|
144
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
145
|
+
var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
146
|
+
"svg",
|
|
147
|
+
{
|
|
148
|
+
width: "10",
|
|
149
|
+
height: "10",
|
|
150
|
+
viewBox: "0 0 10 10",
|
|
151
|
+
fill: "none",
|
|
152
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
154
|
+
"path",
|
|
155
|
+
{
|
|
156
|
+
d: "M1 1L9 9M9 1L1 9",
|
|
157
|
+
stroke: "#2f2f2f",
|
|
158
|
+
strokeWidth: "1.5",
|
|
159
|
+
strokeLinecap: "round",
|
|
160
|
+
strokeLinejoin: "round"
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
var modalHeaderStyles = {
|
|
166
|
+
container: {
|
|
167
|
+
display: "flex",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
justifyContent: "space-between",
|
|
170
|
+
width: "100%",
|
|
171
|
+
padding: "16px",
|
|
172
|
+
backgroundColor: "#ffffff",
|
|
173
|
+
boxSizing: "border-box",
|
|
174
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
175
|
+
minHeight: "56px"
|
|
176
|
+
},
|
|
177
|
+
leftContent: {
|
|
178
|
+
display: "flex",
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
gap: "16px",
|
|
181
|
+
flex: 1
|
|
182
|
+
},
|
|
183
|
+
title: {
|
|
184
|
+
fontSize: "22px",
|
|
185
|
+
fontWeight: "600",
|
|
186
|
+
color: "#2f2f2f",
|
|
187
|
+
lineHeight: "1.25",
|
|
188
|
+
margin: 0
|
|
189
|
+
},
|
|
190
|
+
closeButton: {
|
|
191
|
+
display: "flex",
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
justifyContent: "center",
|
|
194
|
+
width: "32px",
|
|
195
|
+
height: "32px",
|
|
196
|
+
borderRadius: "16px",
|
|
197
|
+
backgroundColor: "#ffffff",
|
|
198
|
+
border: "none",
|
|
199
|
+
cursor: "pointer",
|
|
200
|
+
padding: 0,
|
|
201
|
+
flexShrink: 0,
|
|
202
|
+
transition: "background-color 0.15s ease-in-out"
|
|
203
|
+
},
|
|
204
|
+
closeButtonHover: {
|
|
205
|
+
backgroundColor: "#f8f8f8"
|
|
206
|
+
},
|
|
207
|
+
closeButtonFocus: {
|
|
208
|
+
outline: "3px solid #3cad51",
|
|
209
|
+
outlineOffset: "-3px"
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
var ModalHeader = React2.forwardRef(
|
|
213
|
+
({ title, icon, onClose, className, style, ...props }, ref) => {
|
|
214
|
+
const [isHovered, setIsHovered] = React2.useState(false);
|
|
215
|
+
const [isFocused, setIsFocused] = React2.useState(false);
|
|
216
|
+
const closeButtonStyle = {
|
|
217
|
+
...modalHeaderStyles.closeButton,
|
|
218
|
+
...isHovered && modalHeaderStyles.closeButtonHover,
|
|
219
|
+
...isFocused && modalHeaderStyles.closeButtonFocus
|
|
220
|
+
};
|
|
221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
ref,
|
|
225
|
+
className: (0, import_clsx2.clsx)("arbor-modal-header", className),
|
|
226
|
+
style: { ...modalHeaderStyles.container, ...style },
|
|
227
|
+
...props,
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: modalHeaderStyles.leftContent, children: [
|
|
230
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SectionIcon, { variant: icon }),
|
|
231
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { style: modalHeaderStyles.title, children: title })
|
|
232
|
+
] }),
|
|
233
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
234
|
+
"button",
|
|
235
|
+
{
|
|
236
|
+
type: "button",
|
|
237
|
+
onClick: onClose,
|
|
238
|
+
onMouseEnter: () => setIsHovered(true),
|
|
239
|
+
onMouseLeave: () => setIsHovered(false),
|
|
240
|
+
onFocus: () => setIsFocused(true),
|
|
241
|
+
onBlur: () => setIsFocused(false),
|
|
242
|
+
style: closeButtonStyle,
|
|
243
|
+
"aria-label": "Close modal",
|
|
244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {})
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
ModalHeader.displayName = "ModalHeader";
|
|
253
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
254
|
+
0 && (module.exports = {
|
|
255
|
+
ModalHeader
|
|
256
|
+
});
|
|
257
|
+
//# sourceMappingURL=ModalHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ModalHeader/index.ts","../src/ModalHeader/ModalHeader.tsx","../src/SectionIcon/SectionIcon.tsx"],"sourcesContent":["export { ModalHeader } from './ModalHeader';\nexport type { ModalHeaderProps } from './ModalHeader';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\nimport { SectionIcon, SectionIconVariant } from '../SectionIcon';\n\nexport interface ModalHeaderProps {\n /**\n * The title text for the modal header\n */\n title: string;\n /**\n * Optional icon variant to display before the title\n * Uses the SectionIcon component variants: 'warning', 'danger', 'info', 'success'\n */\n icon?: SectionIconVariant;\n /**\n * Callback when close button is clicked\n * If not provided, close button will not be shown\n */\n onClose?: () => void;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Close X icon\nconst CloseIcon = () => (\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 1L9 9M9 1L1 9\"\n stroke=\"#2f2f2f\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// Arbor Design System modal header styles\nconst modalHeaderStyles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n padding: '16px',\n backgroundColor: '#ffffff',\n boxSizing: 'border-box' as const,\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n minHeight: '56px',\n },\n leftContent: {\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n flex: 1,\n },\n title: {\n fontSize: '22px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.25',\n margin: 0,\n },\n closeButton: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '32px',\n height: '32px',\n borderRadius: '16px',\n backgroundColor: '#ffffff',\n border: 'none',\n cursor: 'pointer',\n padding: 0,\n flexShrink: 0,\n transition: 'background-color 0.15s ease-in-out',\n },\n closeButtonHover: {\n backgroundColor: '#f8f8f8',\n },\n closeButtonFocus: {\n outline: '3px solid #3cad51',\n outlineOffset: '-3px',\n },\n};\n\n/**\n * ModalHeader component - Arbor Design System\n *\n * The header part of a modal dialog with title, optional icon, and close button.\n * The icon uses SectionIcon variants (warning, danger, info, success).\n *\n * @example\n * ```tsx\n * // Basic modal header with close button\n * <ModalHeader\n * title=\"What would you like to do?\"\n * onClose={() => setIsOpen(false)}\n * />\n *\n * // Modal header with warning icon\n * <ModalHeader\n * title=\"Are you sure?\"\n * icon=\"warning\"\n * onClose={() => setIsOpen(false)}\n * />\n *\n * // Modal header with danger icon (error state)\n * <ModalHeader\n * title=\"Sorry, we can't find this page\"\n * icon=\"danger\"\n * onClose={() => setIsOpen(false)}\n * />\n *\n * // Modal header without close button\n * <ModalHeader\n * title=\"Processing...\"\n * icon=\"info\"\n * />\n * ```\n */\nexport const ModalHeader = React.forwardRef<HTMLDivElement, ModalHeaderProps>(\n ({ title, icon, onClose, className, style, ...props }, ref) => {\n const [isHovered, setIsHovered] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n\n const closeButtonStyle: React.CSSProperties = {\n ...modalHeaderStyles.closeButton,\n ...(isHovered && modalHeaderStyles.closeButtonHover),\n ...(isFocused && modalHeaderStyles.closeButtonFocus),\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-modal-header', className)}\n style={{ ...modalHeaderStyles.container, ...style }}\n {...props}\n >\n <div style={modalHeaderStyles.leftContent}>\n {icon && <SectionIcon variant={icon} />}\n <h2 style={modalHeaderStyles.title}>{title}</h2>\n </div>\n {onClose && (\n <button\n type=\"button\"\n onClick={onClose}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n style={closeButtonStyle}\n aria-label=\"Close modal\"\n >\n <CloseIcon />\n </button>\n )}\n </div>\n );\n }\n);\n\nModalHeader.displayName = 'ModalHeader';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport type SectionIconVariant = 'warning' | 'danger' | 'info' | 'success';\n\nexport interface SectionIconProps {\n /**\n * The variant/style of the section icon\n * @default 'info'\n */\n variant?: SectionIconVariant;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Warning triangle icon\nconst WarningIcon = ({ color }: { color: string }) => (\n <svg width=\"14\" height=\"12\" viewBox=\"0 0 14 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7 0.5L13.5 11.5H0.5L7 0.5Z\"\n stroke={color}\n strokeWidth=\"1.2\"\n strokeLinejoin=\"round\"\n fill=\"none\"\n />\n <path\n d=\"M7 4.5V7\"\n stroke={color}\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n />\n <circle cx=\"7\" cy=\"9\" r=\"0.75\" fill={color} />\n </svg>\n);\n\n// Info circle icon\nconst InfoIcon = ({ color }: { color: string }) => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"7\" cy=\"7\" r=\"6\" stroke={color} strokeWidth=\"1.2\" fill=\"none\" />\n <path d=\"M7 6V10\" stroke={color} strokeWidth=\"1.2\" strokeLinecap=\"round\" />\n <circle cx=\"7\" cy=\"4\" r=\"0.75\" fill={color} />\n </svg>\n);\n\n// Success checkmark icon\nconst SuccessIcon = ({ color }: { color: string }) => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"7\" cy=\"7\" r=\"6\" stroke={color} strokeWidth=\"1.2\" fill=\"none\" />\n <path d=\"M4 7L6 9L10 5\" stroke={color} strokeWidth=\"1.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\n// Variant configurations\nconst variantConfig: Record<SectionIconVariant, { backgroundColor: string; iconColor: string }> = {\n warning: {\n backgroundColor: '#fffaf5',\n iconColor: '#e4720d',\n },\n danger: {\n backgroundColor: '#fff5f5',\n iconColor: '#c93232',\n },\n info: {\n backgroundColor: '#f5fbff',\n iconColor: '#2c8bca',\n },\n success: {\n backgroundColor: '#f5fff8',\n iconColor: '#16a33d',\n },\n};\n\n// Arbor Design System section icon styles\nconst sectionIconStyles = {\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: '4px',\n borderRadius: '99px',\n },\n iconWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '16px',\n height: '16px',\n },\n};\n\n/**\n * SectionIcon component - Arbor Design System\n *\n * A small badge-like icon used in section headings to indicate status or alerts.\n * Available in 4 variants: warning (orange), danger (red), info (blue), success (green).\n *\n * @example\n * ```tsx\n * <SectionIcon variant=\"warning\" />\n * <SectionIcon variant=\"danger\" />\n * <SectionIcon variant=\"info\" />\n * <SectionIcon variant=\"success\" />\n * ```\n */\nexport const SectionIcon = React.forwardRef<HTMLDivElement, SectionIconProps>(\n ({ variant = 'info', className, style, ...props }, ref) => {\n const config = variantConfig[variant];\n\n const renderIcon = () => {\n switch (variant) {\n case 'warning':\n case 'danger':\n return <WarningIcon color={config.iconColor} />;\n case 'success':\n return <SuccessIcon color={config.iconColor} />;\n case 'info':\n default:\n return <InfoIcon color={config.iconColor} />;\n }\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-section-icon', className)}\n style={{\n ...sectionIconStyles.container,\n backgroundColor: config.backgroundColor,\n ...style,\n }}\n {...props}\n >\n <div style={sectionIconStyles.iconWrapper}>\n {renderIcon()}\n </div>\n </div>\n );\n }\n);\n\nSectionIcon.displayName = 'SectionIcon';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AACvB,IAAAC,eAAqB;;;ACDrB,YAAuB;AACvB,kBAAqB;AAsBnB;AADF,IAAM,cAAc,CAAC,EAAE,MAAM,MAC3B,6CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BA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A,IACrC;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,mBAAK,sBAAsB,SAAS;AAAA,QAC/C,OAAO,EAAE,GAAG,kBAAkB,WAAW,GAAG,MAAM;AAAA,QACjD,GAAG;AAAA,QAEJ;AAAA,wDAAC,SAAI,OAAO,kBAAkB,aAC3B;AAAA,oBAAQ,6CAAC,eAAY,SAAS,MAAM;AAAA,YACrC,6CAAC,QAAG,OAAO,kBAAkB,OAAQ,iBAAM;AAAA,aAC7C;AAAA,UACC,WACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS;AAAA,cACT,cAAc,MAAM,aAAa,IAAI;AAAA,cACrC,cAAc,MAAM,aAAa,KAAK;AAAA,cACtC,SAAS,MAAM,aAAa,IAAI;AAAA,cAChC,QAAQ,MAAM,aAAa,KAAK;AAAA,cAChC,OAAO;AAAA,cACP,cAAW;AAAA,cAEX,uDAAC,aAAU;AAAA;AAAA,UACb;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["React","import_clsx","import_jsx_runtime"]}
|
|
@@ -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 };
|
|
@@ -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 };
|