@tonyarbor/components 0.2.1 → 0.6.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 (118) hide show
  1. package/dist/Avatar.d.mts +42 -0
  2. package/dist/Avatar.d.ts +42 -0
  3. package/dist/Avatar.js +158 -0
  4. package/dist/Avatar.js.map +1 -0
  5. package/dist/Avatar.mjs +7 -0
  6. package/dist/Avatar.mjs.map +1 -0
  7. package/dist/Breadcrumbs.d.mts +51 -0
  8. package/dist/Breadcrumbs.d.ts +51 -0
  9. package/dist/Breadcrumbs.js +276 -0
  10. package/dist/Breadcrumbs.js.map +1 -0
  11. package/dist/Breadcrumbs.mjs +7 -0
  12. package/dist/Breadcrumbs.mjs.map +1 -0
  13. package/dist/ButtonSegmented.d.mts +61 -0
  14. package/dist/ButtonSegmented.d.ts +61 -0
  15. package/dist/ButtonSegmented.js +167 -0
  16. package/dist/ButtonSegmented.js.map +1 -0
  17. package/dist/ButtonSegmented.mjs +7 -0
  18. package/dist/ButtonSegmented.mjs.map +1 -0
  19. package/dist/ListRow.d.mts +72 -0
  20. package/dist/ListRow.d.ts +72 -0
  21. package/dist/ListRow.js +194 -0
  22. package/dist/ListRow.js.map +1 -0
  23. package/dist/ListRow.mjs +7 -0
  24. package/dist/ListRow.mjs.map +1 -0
  25. package/dist/ListRowMultiLine.d.mts +56 -0
  26. package/dist/ListRowMultiLine.d.ts +56 -0
  27. package/dist/ListRowMultiLine.js +182 -0
  28. package/dist/ListRowMultiLine.js.map +1 -0
  29. package/dist/ListRowMultiLine.mjs +7 -0
  30. package/dist/ListRowMultiLine.mjs.map +1 -0
  31. package/dist/Logo.d.mts +39 -0
  32. package/dist/Logo.d.ts +39 -0
  33. package/dist/Logo.js +119 -0
  34. package/dist/Logo.js.map +1 -0
  35. package/dist/Logo.mjs +7 -0
  36. package/dist/Logo.mjs.map +1 -0
  37. package/dist/SearchGlobal.d.mts +45 -0
  38. package/dist/SearchGlobal.d.ts +45 -0
  39. package/dist/SearchGlobal.js +209 -0
  40. package/dist/SearchGlobal.js.map +1 -0
  41. package/dist/SearchGlobal.mjs +7 -0
  42. package/dist/SearchGlobal.mjs.map +1 -0
  43. package/dist/SearchOnPage.d.mts +45 -0
  44. package/dist/SearchOnPage.d.ts +45 -0
  45. package/dist/SearchOnPage.js +171 -0
  46. package/dist/SearchOnPage.js.map +1 -0
  47. package/dist/SearchOnPage.mjs +7 -0
  48. package/dist/SearchOnPage.mjs.map +1 -0
  49. package/dist/Section.d.mts +57 -0
  50. package/dist/Section.d.ts +57 -0
  51. package/dist/Section.js +72 -0
  52. package/dist/Section.js.map +1 -0
  53. package/dist/Section.mjs +7 -0
  54. package/dist/Section.mjs.map +1 -0
  55. package/dist/SectionHeading.d.mts +111 -0
  56. package/dist/SectionHeading.d.ts +111 -0
  57. package/dist/SectionHeading.js +385 -0
  58. package/dist/SectionHeading.js.map +1 -0
  59. package/dist/SectionHeading.mjs +8 -0
  60. package/dist/SectionHeading.mjs.map +1 -0
  61. package/dist/SectionHeadingInteractive.d.mts +67 -0
  62. package/dist/SectionHeadingInteractive.d.ts +67 -0
  63. package/dist/SectionHeadingInteractive.js +225 -0
  64. package/dist/SectionHeadingInteractive.js.map +1 -0
  65. package/dist/SectionHeadingInteractive.mjs +7 -0
  66. package/dist/SectionHeadingInteractive.mjs.map +1 -0
  67. package/dist/SectionIcon.d.mts +35 -0
  68. package/dist/SectionIcon.d.ts +35 -0
  69. package/dist/SectionIcon.js +142 -0
  70. package/dist/SectionIcon.js.map +1 -0
  71. package/dist/SectionIcon.mjs +7 -0
  72. package/dist/SectionIcon.mjs.map +1 -0
  73. package/dist/SubSectionHeading.d.mts +75 -0
  74. package/dist/SubSectionHeading.d.ts +75 -0
  75. package/dist/SubSectionHeading.js +225 -0
  76. package/dist/SubSectionHeading.js.map +1 -0
  77. package/dist/SubSectionHeading.mjs +7 -0
  78. package/dist/SubSectionHeading.mjs.map +1 -0
  79. package/dist/SubSectionInteractive.d.mts +65 -0
  80. package/dist/SubSectionInteractive.d.ts +65 -0
  81. package/dist/SubSectionInteractive.js +211 -0
  82. package/dist/SubSectionInteractive.js.map +1 -0
  83. package/dist/SubSectionInteractive.mjs +7 -0
  84. package/dist/SubSectionInteractive.mjs.map +1 -0
  85. package/dist/chunk-7NYBJKJS.mjs +106 -0
  86. package/dist/chunk-7NYBJKJS.mjs.map +1 -0
  87. package/dist/chunk-ALLCJATI.mjs +189 -0
  88. package/dist/chunk-ALLCJATI.mjs.map +1 -0
  89. package/dist/chunk-B7RX3TPX.mjs +135 -0
  90. package/dist/chunk-B7RX3TPX.mjs.map +1 -0
  91. package/dist/chunk-F6JVEIWC.mjs +158 -0
  92. package/dist/chunk-F6JVEIWC.mjs.map +1 -0
  93. package/dist/chunk-GHATS25Y.mjs +249 -0
  94. package/dist/chunk-GHATS25Y.mjs.map +1 -0
  95. package/dist/chunk-ILLGBZ6R.mjs +131 -0
  96. package/dist/chunk-ILLGBZ6R.mjs.map +1 -0
  97. package/dist/chunk-JSG27ZZS.mjs +122 -0
  98. package/dist/chunk-JSG27ZZS.mjs.map +1 -0
  99. package/dist/chunk-NNYU4DPD.mjs +83 -0
  100. package/dist/chunk-NNYU4DPD.mjs.map +1 -0
  101. package/dist/chunk-ODKT7LGV.mjs +146 -0
  102. package/dist/chunk-ODKT7LGV.mjs.map +1 -0
  103. package/dist/chunk-RL4G7MR3.mjs +189 -0
  104. package/dist/chunk-RL4G7MR3.mjs.map +1 -0
  105. package/dist/chunk-RQP6ZGD7.mjs +240 -0
  106. package/dist/chunk-RQP6ZGD7.mjs.map +1 -0
  107. package/dist/chunk-UPBHDBAK.mjs +173 -0
  108. package/dist/chunk-UPBHDBAK.mjs.map +1 -0
  109. package/dist/chunk-X2CW5GF3.mjs +175 -0
  110. package/dist/chunk-X2CW5GF3.mjs.map +1 -0
  111. package/dist/chunk-YJ36ZZJQ.mjs +36 -0
  112. package/dist/chunk-YJ36ZZJQ.mjs.map +1 -0
  113. package/dist/index.d.mts +14 -0
  114. package/dist/index.d.ts +14 -0
  115. package/dist/index.js +2102 -0
  116. package/dist/index.js.map +1 -1
  117. package/dist/index.mjs +56 -0
  118. package/package.json +71 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ListRow/ListRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface ListRowProps {\n /**\n * The main value/content text (required)\n */\n value: string;\n /**\n * Optional label text displayed on the left\n */\n label?: string;\n /**\n * Optional note text displayed on the right (italic)\n */\n note?: string;\n /**\n * Show the right arrow icon - enables hover state and indicates row is clickable\n * @default false\n */\n icon?: boolean;\n /**\n * Click handler - typically used with icon prop for navigation\n */\n onClick?: () => void;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Caret/Arrow icon - transforms on hover\nconst CaretIcon = ({ isHovered }: { isHovered: boolean }) => {\n if (isHovered) {\n // Arrow pointing right on hover\n return (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M6 4L10 8L6 12\"\n stroke=\"#2f2f2f\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n }\n // Default caret (chevron right)\n return (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M6 4L10 8L6 12\"\n stroke=\"#b3b3b3\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n};\n\n// Arbor Design System list row styles\nconst listRowStyles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n borderBottom: '1px solid #f8f8f8',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n boxSizing: 'border-box' as const,\n borderRadius: '8px',\n transition: 'background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out',\n outline: 'none',\n },\n containerHover: {\n backgroundColor: '#f8f8f8',\n },\n containerFocus: {\n outline: '3px solid #3cad51',\n outlineOffset: '-3px',\n },\n containerClickable: {\n cursor: 'pointer',\n },\n content: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n padding: '4px 8px',\n minHeight: '28px',\n },\n label: {\n fontSize: '13px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.5',\n width: '190px',\n flexShrink: 0,\n },\n valueContainer: {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n },\n value: {\n fontSize: '13px',\n fontWeight: '400',\n color: '#2f2f2f',\n lineHeight: '1.5',\n },\n rightContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gap: '8px',\n flexShrink: 0,\n },\n note: {\n fontSize: '13px',\n fontWeight: '400',\n fontStyle: 'italic',\n color: '#2f2f2f',\n lineHeight: '1.5',\n textAlign: 'right' as const,\n },\n iconWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '16px',\n height: '16px',\n flexShrink: 0,\n },\n};\n\n/**\n * ListRow component - Arbor Design System\n *\n * A flexible list row component for displaying content within sections.\n * Supports optional label, note, and icon props.\n * Hover state is only enabled when icon is present (indicating clickable row).\n *\n * @example\n * ```tsx\n * // Basic row with just value\n * <ListRow value=\"John Smith\" />\n *\n * // With label\n * <ListRow label=\"Name\" value=\"John Smith\" />\n *\n * // With label and note\n * <ListRow label=\"Name\" value=\"John Smith\" note=\"Primary contact\" />\n *\n * // Clickable row with icon\n * <ListRow\n * label=\"Name\"\n * value=\"John Smith\"\n * icon\n * onClick={() => navigate('/user/123')}\n * />\n *\n * // All props\n * <ListRow\n * label=\"Name\"\n * value=\"John Smith\"\n * note=\"View profile\"\n * icon\n * onClick={() => navigate('/user/123')}\n * />\n * ```\n */\nexport const ListRow = React.forwardRef<HTMLDivElement, ListRowProps>(\n ({ value, label, note, icon = false, onClick, className, style, ...props }, ref) => {\n const [isHovered, setIsHovered] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n\n // Only enable hover state when icon is present\n const showHoverState = icon && isHovered;\n const isClickable = icon && onClick;\n\n const containerStyle: React.CSSProperties = {\n ...listRowStyles.container,\n ...(showHoverState && listRowStyles.containerHover),\n ...(isFocused && listRowStyles.containerFocus),\n ...(isClickable && listRowStyles.containerClickable),\n ...style,\n };\n\n const handleClick = () => {\n if (isClickable && onClick) {\n onClick();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (isClickable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n onClick?.();\n }\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-list-row', className)}\n style={containerStyle}\n onClick={handleClick}\n onMouseEnter={() => icon && setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n onKeyDown={handleKeyDown}\n tabIndex={isClickable ? 0 : undefined}\n role={isClickable ? 'button' : undefined}\n {...props}\n >\n <div style={listRowStyles.content}>\n {label && <div style={listRowStyles.label}>{label}</div>}\n <div style={listRowStyles.valueContainer}>\n <span style={listRowStyles.value}>{value}</span>\n </div>\n <div style={listRowStyles.rightContainer}>\n {note && <span style={listRowStyles.note}>{note}</span>}\n {icon && (\n <div style={listRowStyles.iconWrapper}>\n <CaretIcon isHovered={isHovered} />\n </div>\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\nListRow.displayName = 'ListRow';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAwCb,cAyLE,YAzLF;AALR,IAAM,YAAY,CAAC,EAAE,UAAU,MAA8B;AAC3D,MAAI,WAAW;AAEb,WACE,oBAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,MAAC;AAAA;A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,MAAM,aAAa,KAAK;AAAA,QAChC,WAAW;AAAA,QACX,UAAU,cAAc,IAAI;AAAA,QAC5B,MAAM,cAAc,WAAW;AAAA,QAC9B,GAAG;AAAA,QAEJ,+BAAC,SAAI,OAAO,cAAc,SACvB;AAAA,mBAAS,oBAAC,SAAI,OAAO,cAAc,OAAQ,iBAAM;AAAA,UAClD,oBAAC,SAAI,OAAO,cAAc,gBACxB,8BAAC,UAAK,OAAO,cAAc,OAAQ,iBAAM,GAC3C;AAAA,UACA,qBAAC,SAAI,OAAO,cAAc,gBACvB;AAAA,oBAAQ,oBAAC,UAAK,OAAO,cAAc,MAAO,gBAAK;AAAA,YAC/C,QACC,oBAAC,SAAI,OAAO,cAAc,aACxB,8BAAC,aAAU,WAAsB,GACnC;AAAA,aAEJ;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,QAAQ,cAAc;","names":[]}
@@ -0,0 +1,249 @@
1
+ import {
2
+ SectionIcon
3
+ } from "./chunk-7NYBJKJS.mjs";
4
+
5
+ // src/SectionHeading/SectionHeading.tsx
6
+ import * as React from "react";
7
+ import { clsx } from "clsx";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var AvatarPlaceholder = () => /* @__PURE__ */ jsxs("svg", { width: "22", height: "33", viewBox: "0 0 22 33", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
10
+ /* @__PURE__ */ jsx("circle", { cx: "11", cy: "7", r: "7", fill: "#d1d1d1" }),
11
+ /* @__PURE__ */ jsx("ellipse", { cx: "11", cy: "33", rx: "11", ry: "11", fill: "#d1d1d1" })
12
+ ] });
13
+ var sectionHeadingStyles = {
14
+ container: {
15
+ display: "flex",
16
+ alignItems: "center",
17
+ gap: "12px",
18
+ padding: "8px",
19
+ borderBottom: "1px solid #f8f8f8",
20
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
21
+ minHeight: "56px",
22
+ boxSizing: "border-box"
23
+ },
24
+ title: {
25
+ fontSize: "22px",
26
+ fontWeight: "600",
27
+ color: "#2f2f2f",
28
+ lineHeight: "1.25",
29
+ flex: 1,
30
+ overflow: "hidden",
31
+ textOverflow: "ellipsis",
32
+ whiteSpace: "nowrap",
33
+ margin: 0
34
+ },
35
+ titleWithIcon: {
36
+ display: "flex",
37
+ alignItems: "center",
38
+ gap: "8px",
39
+ flex: 1
40
+ },
41
+ iconBadge: {
42
+ display: "flex",
43
+ alignItems: "center",
44
+ flexShrink: 0
45
+ },
46
+ avatar: {
47
+ width: "48px",
48
+ height: "48px",
49
+ borderRadius: "8px",
50
+ border: "1px solid #efefef",
51
+ backgroundColor: "#f8f8f8",
52
+ flexShrink: 0,
53
+ overflow: "hidden",
54
+ display: "flex",
55
+ alignItems: "center",
56
+ justifyContent: "center"
57
+ },
58
+ avatarImage: {
59
+ width: "100%",
60
+ height: "100%",
61
+ objectFit: "cover"
62
+ },
63
+ avatarInitials: {
64
+ fontSize: "18px",
65
+ fontWeight: "600",
66
+ color: "#595959"
67
+ },
68
+ button: {
69
+ display: "inline-flex",
70
+ alignItems: "center",
71
+ justifyContent: "center",
72
+ gap: "8px",
73
+ height: "32px",
74
+ padding: "0 16px",
75
+ backgroundColor: "#0e8a0e",
76
+ color: "#ffffff",
77
+ border: "none",
78
+ borderRadius: "99px",
79
+ fontSize: "13px",
80
+ fontWeight: "600",
81
+ cursor: "pointer",
82
+ transition: "background-color 0.15s ease-in-out",
83
+ whiteSpace: "nowrap",
84
+ flexShrink: 0
85
+ },
86
+ buttonHover: {
87
+ backgroundColor: "#005700"
88
+ },
89
+ buttonGroup: {
90
+ container: {
91
+ display: "inline-flex",
92
+ alignItems: "center",
93
+ gap: "8px",
94
+ padding: "8px",
95
+ backgroundColor: "#ffffff",
96
+ border: "1px solid #efefef",
97
+ borderRadius: "99px",
98
+ flexShrink: 0
99
+ },
100
+ button: {
101
+ base: {
102
+ display: "inline-flex",
103
+ alignItems: "center",
104
+ justifyContent: "center",
105
+ gap: "8px",
106
+ padding: "8px 16px",
107
+ borderRadius: "99px",
108
+ border: "none",
109
+ cursor: "pointer",
110
+ fontSize: "13px",
111
+ fontWeight: "600",
112
+ lineHeight: "1.5",
113
+ transition: "all 0.15s ease-in-out",
114
+ outline: "none",
115
+ whiteSpace: "nowrap"
116
+ },
117
+ default: {
118
+ backgroundColor: "transparent",
119
+ color: "#595959"
120
+ },
121
+ hover: {
122
+ backgroundColor: "#f8f8f8",
123
+ color: "#2f2f2f"
124
+ },
125
+ active: {
126
+ backgroundColor: "#0e8a0e",
127
+ color: "#ffffff"
128
+ },
129
+ activeHover: {
130
+ backgroundColor: "#005700",
131
+ color: "#ffffff"
132
+ }
133
+ }
134
+ }
135
+ };
136
+ var SectionHeading = React.forwardRef(
137
+ ({ title, icon, avatar, button, buttonGroup, className, style, ...props }, ref) => {
138
+ const [buttonHovered, setButtonHovered] = React.useState(false);
139
+ const [hoveredGroupIndex, setHoveredGroupIndex] = React.useState(null);
140
+ if (button && buttonGroup) {
141
+ console.warn("SectionHeading: button and buttonGroup are mutually exclusive. Only button will be rendered.");
142
+ }
143
+ const renderAvatar = () => {
144
+ if (!avatar) return null;
145
+ return /* @__PURE__ */ jsx("div", { style: sectionHeadingStyles.avatar, children: avatar.src ? /* @__PURE__ */ jsx(
146
+ "img",
147
+ {
148
+ src: avatar.src,
149
+ alt: avatar.alt || "Avatar",
150
+ style: sectionHeadingStyles.avatarImage
151
+ }
152
+ ) : avatar.initials ? /* @__PURE__ */ jsx("span", { style: sectionHeadingStyles.avatarInitials, children: avatar.initials }) : /* @__PURE__ */ jsx(AvatarPlaceholder, {}) });
153
+ };
154
+ const renderTitle = () => {
155
+ if (icon) {
156
+ const iconVariant = typeof icon === "string" ? icon : "info";
157
+ return /* @__PURE__ */ jsxs("div", { style: sectionHeadingStyles.titleWithIcon, children: [
158
+ /* @__PURE__ */ jsx("h2", { style: { ...sectionHeadingStyles.title, flex: "none" }, children: title }),
159
+ /* @__PURE__ */ jsx("div", { style: sectionHeadingStyles.iconBadge, children: /* @__PURE__ */ jsx(SectionIcon, { variant: iconVariant }) })
160
+ ] });
161
+ }
162
+ return /* @__PURE__ */ jsx("h2", { style: sectionHeadingStyles.title, children: title });
163
+ };
164
+ const renderButton = () => {
165
+ if (!button) return null;
166
+ return /* @__PURE__ */ jsxs(
167
+ "button",
168
+ {
169
+ type: "button",
170
+ style: {
171
+ ...sectionHeadingStyles.button,
172
+ ...buttonHovered && sectionHeadingStyles.buttonHover
173
+ },
174
+ onClick: button.onClick,
175
+ onMouseEnter: () => setButtonHovered(true),
176
+ onMouseLeave: () => setButtonHovered(false),
177
+ children: [
178
+ button.icon && /* @__PURE__ */ jsx("span", { style: { display: "flex", alignItems: "center", width: "16px", height: "16px" }, children: button.icon }),
179
+ button.label
180
+ ]
181
+ }
182
+ );
183
+ };
184
+ const renderButtonGroup = () => {
185
+ if (!buttonGroup || button) return null;
186
+ const { items, activeIndex = 0, onChange } = buttonGroup;
187
+ return /* @__PURE__ */ jsx("div", { style: sectionHeadingStyles.buttonGroup.container, children: items.slice(0, 4).map((item, index) => {
188
+ const isActive = index === activeIndex;
189
+ const isHovered = hoveredGroupIndex === index;
190
+ let btnStyle = {
191
+ ...sectionHeadingStyles.buttonGroup.button.base
192
+ };
193
+ if (isActive) {
194
+ btnStyle = {
195
+ ...btnStyle,
196
+ ...sectionHeadingStyles.buttonGroup.button.active,
197
+ ...isHovered && sectionHeadingStyles.buttonGroup.button.activeHover
198
+ };
199
+ } else {
200
+ btnStyle = {
201
+ ...btnStyle,
202
+ ...sectionHeadingStyles.buttonGroup.button.default,
203
+ ...isHovered && sectionHeadingStyles.buttonGroup.button.hover
204
+ };
205
+ }
206
+ return /* @__PURE__ */ jsxs(
207
+ "button",
208
+ {
209
+ type: "button",
210
+ style: btnStyle,
211
+ onClick: () => {
212
+ if (index !== activeIndex && onChange) {
213
+ onChange(index);
214
+ }
215
+ },
216
+ onMouseEnter: () => setHoveredGroupIndex(index),
217
+ onMouseLeave: () => setHoveredGroupIndex(null),
218
+ children: [
219
+ item.icon && /* @__PURE__ */ jsx("span", { style: { display: "flex", alignItems: "center", width: "16px", height: "16px" }, children: item.icon }),
220
+ item.label
221
+ ]
222
+ },
223
+ item.value || index
224
+ );
225
+ }) });
226
+ };
227
+ return /* @__PURE__ */ jsxs(
228
+ "div",
229
+ {
230
+ ref,
231
+ className: clsx("arbor-section-heading", className),
232
+ style: { ...sectionHeadingStyles.container, ...style },
233
+ ...props,
234
+ children: [
235
+ renderAvatar(),
236
+ renderTitle(),
237
+ renderButton(),
238
+ renderButtonGroup()
239
+ ]
240
+ }
241
+ );
242
+ }
243
+ );
244
+ SectionHeading.displayName = "SectionHeading";
245
+
246
+ export {
247
+ SectionHeading
248
+ };
249
+ //# sourceMappingURL=chunk-GHATS25Y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SectionHeading/SectionHeading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { clsx } from 'clsx';\nimport { SectionIcon, SectionIconVariant } from '../SectionIcon';\n\nexport interface SectionHeadingButton {\n /**\n * The label for the button\n */\n label: string;\n /**\n * Optional icon to display before the label\n */\n icon?: React.ReactNode;\n /**\n * Click handler for the button\n */\n onClick?: () => void;\n}\n\nexport interface SectionHeadingButtonGroupItem {\n /**\n * The label for the button\n */\n label: string;\n /**\n * Optional icon to display before the label\n */\n icon?: React.ReactNode;\n /**\n * Optional value identifier\n */\n value?: string;\n}\n\nexport interface SectionHeadingProps {\n /**\n * The heading title text\n */\n title: string;\n /**\n * Show an icon badge next to the title.\n * Can be a boolean (defaults to 'info') or a specific variant.\n * Available variants: 'warning', 'danger', 'info', 'success'\n */\n icon?: boolean | SectionIconVariant;\n /**\n * Avatar configuration - can be an image URL or initials\n */\n avatar?: {\n src?: string;\n initials?: string;\n alt?: string;\n };\n /**\n * Primary button configuration (mutually exclusive with buttonGroup)\n */\n button?: SectionHeadingButton;\n /**\n * Button group configuration (mutually exclusive with button)\n */\n buttonGroup?: {\n items: SectionHeadingButtonGroupItem[];\n activeIndex?: number;\n onChange?: (index: number) => void;\n };\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Placeholder icon for avatar\nconst AvatarPlaceholder = () => (\n <svg width=\"22\" height=\"33\" viewBox=\"0 0 22 33\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"11\" cy=\"7\" r=\"7\" fill=\"#d1d1d1\" />\n <ellipse cx=\"11\" cy=\"33\" rx=\"11\" ry=\"11\" fill=\"#d1d1d1\" />\n </svg>\n);\n\n// Arbor Design System section heading styles\nconst sectionHeadingStyles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n padding: '8px',\n borderBottom: '1px solid #f8f8f8',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n minHeight: '56px',\n boxSizing: 'border-box' as const,\n },\n title: {\n fontSize: '22px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.25',\n flex: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap' as const,\n margin: 0,\n },\n titleWithIcon: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n flex: 1,\n },\n iconBadge: {\n display: 'flex',\n alignItems: 'center',\n flexShrink: 0,\n },\n avatar: {\n width: '48px',\n height: '48px',\n borderRadius: '8px',\n border: '1px solid #efefef',\n backgroundColor: '#f8f8f8',\n flexShrink: 0,\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n avatarImage: {\n width: '100%',\n height: '100%',\n objectFit: 'cover' as const,\n },\n avatarInitials: {\n fontSize: '18px',\n fontWeight: '600',\n color: '#595959',\n },\n button: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n height: '32px',\n padding: '0 16px',\n backgroundColor: '#0e8a0e',\n color: '#ffffff',\n border: 'none',\n borderRadius: '99px',\n fontSize: '13px',\n fontWeight: '600',\n cursor: 'pointer',\n transition: 'background-color 0.15s ease-in-out',\n whiteSpace: 'nowrap' as const,\n flexShrink: 0,\n },\n buttonHover: {\n backgroundColor: '#005700',\n },\n buttonGroup: {\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '8px',\n padding: '8px',\n backgroundColor: '#ffffff',\n border: '1px solid #efefef',\n borderRadius: '99px',\n flexShrink: 0,\n },\n button: {\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n padding: '8px 16px',\n borderRadius: '99px',\n border: 'none',\n cursor: 'pointer',\n fontSize: '13px',\n fontWeight: '600',\n lineHeight: '1.5',\n transition: 'all 0.15s ease-in-out',\n outline: 'none',\n whiteSpace: 'nowrap' as const,\n },\n default: {\n backgroundColor: 'transparent',\n color: '#595959',\n },\n hover: {\n backgroundColor: '#f8f8f8',\n color: '#2f2f2f',\n },\n active: {\n backgroundColor: '#0e8a0e',\n color: '#ffffff',\n },\n activeHover: {\n backgroundColor: '#005700',\n color: '#ffffff',\n },\n },\n },\n};\n\n/**\n * SectionHeading component - Arbor Design System\n *\n * A flexible section heading component that can include an icon, avatar,\n * button, or button group. Button and button group are mutually exclusive.\n *\n * @example\n * ```tsx\n * // Basic heading\n * <SectionHeading title=\"Section Title\" />\n *\n * // With icon\n * <SectionHeading title=\"Section Title\" icon />\n *\n * // With avatar\n * <SectionHeading\n * title=\"User Profile\"\n * avatar={{ src: \"/avatar.jpg\", alt: \"User\" }}\n * />\n *\n * // With button\n * <SectionHeading\n * title=\"Section Title\"\n * button={{ label: \"Add Item\", onClick: () => {} }}\n * />\n *\n * // With button group\n * <SectionHeading\n * title=\"Section Title\"\n * buttonGroup={{\n * items: [{ label: \"Day\" }, { label: \"Week\" }],\n * activeIndex: 0,\n * onChange: (index) => {}\n * }}\n * />\n * ```\n */\nexport const SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>(\n ({ title, icon, avatar, button, buttonGroup, className, style, ...props }, ref) => {\n const [buttonHovered, setButtonHovered] = React.useState(false);\n const [hoveredGroupIndex, setHoveredGroupIndex] = React.useState<number | null>(null);\n\n // Warn if both button and buttonGroup are provided\n if (button && buttonGroup) {\n console.warn('SectionHeading: button and buttonGroup are mutually exclusive. Only button will be rendered.');\n }\n\n const renderAvatar = () => {\n if (!avatar) return null;\n\n return (\n <div style={sectionHeadingStyles.avatar}>\n {avatar.src ? (\n <img\n src={avatar.src}\n alt={avatar.alt || 'Avatar'}\n style={sectionHeadingStyles.avatarImage}\n />\n ) : avatar.initials ? (\n <span style={sectionHeadingStyles.avatarInitials}>{avatar.initials}</span>\n ) : (\n <AvatarPlaceholder />\n )}\n </div>\n );\n };\n\n const renderTitle = () => {\n if (icon) {\n // Determine the icon variant - default to 'info' if boolean true\n const iconVariant: SectionIconVariant = typeof icon === 'string' ? icon : 'info';\n\n return (\n <div style={sectionHeadingStyles.titleWithIcon}>\n <h2 style={{ ...sectionHeadingStyles.title, flex: 'none' }}>{title}</h2>\n <div style={sectionHeadingStyles.iconBadge}>\n <SectionIcon variant={iconVariant} />\n </div>\n </div>\n );\n }\n\n return <h2 style={sectionHeadingStyles.title}>{title}</h2>;\n };\n\n const renderButton = () => {\n if (!button) return null;\n\n return (\n <button\n type=\"button\"\n style={{\n ...sectionHeadingStyles.button,\n ...(buttonHovered && sectionHeadingStyles.buttonHover),\n }}\n onClick={button.onClick}\n onMouseEnter={() => setButtonHovered(true)}\n onMouseLeave={() => setButtonHovered(false)}\n >\n {button.icon && (\n <span style={{ display: 'flex', alignItems: 'center', width: '16px', height: '16px' }}>\n {button.icon}\n </span>\n )}\n {button.label}\n </button>\n );\n };\n\n const renderButtonGroup = () => {\n if (!buttonGroup || button) return null;\n\n const { items, activeIndex = 0, onChange } = buttonGroup;\n\n return (\n <div style={sectionHeadingStyles.buttonGroup.container}>\n {items.slice(0, 4).map((item, index) => {\n const isActive = index === activeIndex;\n const isHovered = hoveredGroupIndex === index;\n\n let btnStyle: React.CSSProperties = {\n ...sectionHeadingStyles.buttonGroup.button.base,\n };\n\n if (isActive) {\n btnStyle = {\n ...btnStyle,\n ...sectionHeadingStyles.buttonGroup.button.active,\n ...(isHovered && sectionHeadingStyles.buttonGroup.button.activeHover),\n };\n } else {\n btnStyle = {\n ...btnStyle,\n ...sectionHeadingStyles.buttonGroup.button.default,\n ...(isHovered && sectionHeadingStyles.buttonGroup.button.hover),\n };\n }\n\n return (\n <button\n key={item.value || index}\n type=\"button\"\n style={btnStyle}\n onClick={() => {\n if (index !== activeIndex && onChange) {\n onChange(index);\n }\n }}\n onMouseEnter={() => setHoveredGroupIndex(index)}\n onMouseLeave={() => setHoveredGroupIndex(null)}\n >\n {item.icon && (\n <span style={{ display: 'flex', alignItems: 'center', width: '16px', height: '16px' }}>\n {item.icon}\n </span>\n )}\n {item.label}\n </button>\n );\n })}\n </div>\n );\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-section-heading', className)}\n style={{ ...sectionHeadingStyles.container, ...style }}\n {...props}\n >\n {renderAvatar()}\n {renderTitle()}\n {renderButton()}\n {renderButtonGroup()}\n </div>\n );\n }\n);\n\nSectionHeading.displayName = 'SectionHeading';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AA4EnB,SACE,KADF;AADF,IAAM,oBAAoB,MACxB,qBAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,sBAAC,YAAO,IAAG,MAAK,IAAG,KAAI,GAAE,KAAI,MAAK,WAAU;AAAA,EAC5C,oBAAC,aAAQ,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,IAAG,MAAK,MAAK,WAAU;AAAA,GAC1D;AAIF,IAAM,uBAAuB;AAAA,EAC3B,WAAW;AAAA,IACT,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,SAAS;AAAA,IACT,cAAc;AAAA,IACd,YAAY;AAA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YAAY,OAAO;AAAA,QAC7C;AAEA,YAAI,UAAU;AACZ,qBAAW;AAAA,YACT,GAAG;AAAA,YACH,GAAG,qBAAqB,YAAY,OAAO;AAAA,YAC3C,GAAI,aAAa,qBAAqB,YAAY,OAAO;AAAA,UAC3D;AAAA,QACF,OAAO;AACL,qBAAW;AAAA,YACT,GAAG;AAAA,YACH,GAAG,qBAAqB,YAAY,OAAO;AAAA,YAC3C,GAAI,aAAa,qBAAqB,YAAY,OAAO;AAAA,UAC3D;AAAA,QACF;AAEA,eACE;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,OAAO;AAAA,YACP,SAAS,MAAM;AACb,kBAAI,UAAU,eAAe,UAAU;AACrC,yBAAS,KAAK;AAAA,cAChB;AAAA,YACF;AAAA,YACA,cAAc,MAAM,qBAAqB,KAAK;AAAA,YAC9C,cAAc,MAAM,qBAAqB,IAAI;AAAA,YAE5C;AAAA,mBAAK,QACJ,oBAAC,UAAK,OAAO,EAAE,SAAS,QAAQ,YAAY,UAAU,OAAO,QAAQ,QAAQ,OAAO,GACjF,eAAK,MACR;AAAA,cAED,KAAK;AAAA;AAAA;AAAA,UAhBD,KAAK,SAAS;AAAA,QAiBrB;AAAA,MAEJ,CAAC,GACH;AAAA,IAEJ;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,KAAK,yBAAyB,SAAS;AAAA,QAClD,OAAO,EAAE,GAAG,qBAAqB,WAAW,GAAG,MAAM;AAAA,QACpD,GAAG;AAAA,QAEH;AAAA,uBAAa;AAAA,UACb,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,kBAAkB;AAAA;AAAA;AAAA,IACrB;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;","names":[]}
@@ -0,0 +1,131 @@
1
+ // src/ButtonSegmented/ButtonSegmented.tsx
2
+ import * as React from "react";
3
+ import { clsx } from "clsx";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ var segmentedStyles = {
6
+ container: {
7
+ display: "inline-flex",
8
+ alignItems: "center",
9
+ gap: "8px",
10
+ padding: "8px",
11
+ backgroundColor: "#ffffff",
12
+ border: "1px solid #efefef",
13
+ borderRadius: "99px",
14
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
15
+ },
16
+ button: {
17
+ base: {
18
+ display: "inline-flex",
19
+ alignItems: "center",
20
+ justifyContent: "center",
21
+ gap: "8px",
22
+ padding: "8px 16px",
23
+ borderRadius: "99px",
24
+ border: "none",
25
+ cursor: "pointer",
26
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
27
+ fontSize: "13px",
28
+ fontWeight: "600",
29
+ lineHeight: "1.5",
30
+ transition: "all 0.15s ease-in-out",
31
+ outline: "none",
32
+ whiteSpace: "nowrap"
33
+ },
34
+ default: {
35
+ backgroundColor: "transparent",
36
+ color: "#595959"
37
+ },
38
+ hover: {
39
+ backgroundColor: "#f8f8f8",
40
+ color: "#2f2f2f"
41
+ },
42
+ active: {
43
+ backgroundColor: "#0e8a0e",
44
+ color: "#ffffff"
45
+ },
46
+ activeHover: {
47
+ backgroundColor: "#005700",
48
+ color: "#ffffff"
49
+ }
50
+ }
51
+ };
52
+ var ButtonSegmented = React.forwardRef(
53
+ ({ items, activeIndex = 0, onChange, className, style, ...props }, ref) => {
54
+ const [hoveredIndex, setHoveredIndex] = React.useState(null);
55
+ const validItems = items.slice(0, 4);
56
+ if (validItems.length < 2) {
57
+ console.warn("ButtonSegmented requires at least 2 items");
58
+ }
59
+ const hasIcons = validItems.some((item) => item.icon);
60
+ const handleClick = (index) => {
61
+ if (index !== activeIndex && onChange) {
62
+ onChange(index, validItems[index]);
63
+ }
64
+ };
65
+ return /* @__PURE__ */ jsx(
66
+ "div",
67
+ {
68
+ ref,
69
+ className: clsx("arbor-button-segmented", className),
70
+ style: { ...segmentedStyles.container, ...style },
71
+ role: "group",
72
+ "aria-label": "Segmented button group",
73
+ ...props,
74
+ children: validItems.map((item, index) => {
75
+ const isActive = index === activeIndex;
76
+ const isHovered = hoveredIndex === index;
77
+ let buttonStyle = {
78
+ ...segmentedStyles.button.base
79
+ };
80
+ if (isActive) {
81
+ buttonStyle = {
82
+ ...buttonStyle,
83
+ ...segmentedStyles.button.active,
84
+ ...isHovered && segmentedStyles.button.activeHover
85
+ };
86
+ } else {
87
+ buttonStyle = {
88
+ ...buttonStyle,
89
+ ...segmentedStyles.button.default,
90
+ ...isHovered && segmentedStyles.button.hover
91
+ };
92
+ }
93
+ return /* @__PURE__ */ jsxs(
94
+ "button",
95
+ {
96
+ type: "button",
97
+ style: buttonStyle,
98
+ onClick: () => handleClick(index),
99
+ onMouseEnter: () => setHoveredIndex(index),
100
+ onMouseLeave: () => setHoveredIndex(null),
101
+ "aria-pressed": isActive,
102
+ children: [
103
+ hasIcons && item.icon && /* @__PURE__ */ jsx(
104
+ "span",
105
+ {
106
+ style: {
107
+ display: "flex",
108
+ alignItems: "center",
109
+ justifyContent: "center",
110
+ width: "16px",
111
+ height: "16px"
112
+ },
113
+ children: item.icon
114
+ }
115
+ ),
116
+ item.label
117
+ ]
118
+ },
119
+ item.value || index
120
+ );
121
+ })
122
+ }
123
+ );
124
+ }
125
+ );
126
+ ButtonSegmented.displayName = "ButtonSegmented";
127
+
128
+ export {
129
+ ButtonSegmented
130
+ };
131
+ //# sourceMappingURL=chunk-ILLGBZ6R.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ButtonSegmented/ButtonSegmented.tsx"],"sourcesContent":["import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface ButtonSegmentedItem {\n /**\n * The label text for the button\n */\n label: string;\n /**\n * Optional icon to display before the label\n */\n icon?: React.ReactNode;\n /**\n * Optional value identifier for the button\n */\n value?: string;\n}\n\nexport interface ButtonSegmentedProps {\n /**\n * Array of button items (minimum 2, maximum 4)\n */\n items: ButtonSegmentedItem[];\n /**\n * The index of the currently active button\n * @default 0\n */\n activeIndex?: number;\n /**\n * Callback when a button is clicked\n */\n onChange?: (index: number, item: ButtonSegmentedItem) => void;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Arbor Design System segmented button styles\nconst segmentedStyles = {\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '8px',\n padding: '8px',\n backgroundColor: '#ffffff',\n border: '1px solid #efefef',\n borderRadius: '99px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n },\n button: {\n base: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n padding: '8px 16px',\n borderRadius: '99px',\n border: 'none',\n cursor: 'pointer',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontSize: '13px',\n fontWeight: '600',\n lineHeight: '1.5',\n transition: 'all 0.15s ease-in-out',\n outline: 'none',\n whiteSpace: 'nowrap' as const,\n },\n default: {\n backgroundColor: 'transparent',\n color: '#595959',\n },\n hover: {\n backgroundColor: '#f8f8f8',\n color: '#2f2f2f',\n },\n active: {\n backgroundColor: '#0e8a0e',\n color: '#ffffff',\n },\n activeHover: {\n backgroundColor: '#005700',\n color: '#ffffff',\n },\n },\n};\n\n/**\n * ButtonSegmented component - Arbor Design System\n *\n * A segmented button group where one button is always active.\n * Supports 2-4 buttons with optional icons.\n *\n * @example\n * ```tsx\n * <ButtonSegmented\n * items={[\n * { label: 'Day' },\n * { label: 'Week' },\n * { label: 'Month' },\n * ]}\n * activeIndex={0}\n * onChange={(index, item) => console.log(index, item)}\n * />\n * ```\n */\nexport const ButtonSegmented = React.forwardRef<HTMLDivElement, ButtonSegmentedProps>(\n ({ items, activeIndex = 0, onChange, className, style, ...props }, ref) => {\n const [hoveredIndex, setHoveredIndex] = React.useState<number | null>(null);\n\n // Validate items count (2-4)\n const validItems = items.slice(0, 4);\n if (validItems.length < 2) {\n console.warn('ButtonSegmented requires at least 2 items');\n }\n\n // Check if any item has an icon - if so, all should have icons\n const hasIcons = validItems.some((item) => item.icon);\n\n const handleClick = (index: number) => {\n if (index !== activeIndex && onChange) {\n onChange(index, validItems[index]);\n }\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-button-segmented', className)}\n style={{ ...segmentedStyles.container, ...style }}\n role=\"group\"\n aria-label=\"Segmented button group\"\n {...props}\n >\n {validItems.map((item, index) => {\n const isActive = index === activeIndex;\n const isHovered = hoveredIndex === index;\n\n let buttonStyle: React.CSSProperties = {\n ...segmentedStyles.button.base,\n };\n\n if (isActive) {\n buttonStyle = {\n ...buttonStyle,\n ...segmentedStyles.button.active,\n ...(isHovered && segmentedStyles.button.activeHover),\n };\n } else {\n buttonStyle = {\n ...buttonStyle,\n ...segmentedStyles.button.default,\n ...(isHovered && segmentedStyles.button.hover),\n };\n }\n\n return (\n <button\n key={item.value || index}\n type=\"button\"\n style={buttonStyle}\n onClick={() => handleClick(index)}\n onMouseEnter={() => setHoveredIndex(index)}\n onMouseLeave={() => setHoveredIndex(null)}\n aria-pressed={isActive}\n >\n {hasIcons && item.icon && (\n <span\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '16px',\n height: '16px',\n }}\n >\n {item.icon}\n </span>\n )}\n {item.label}\n </button>\n );\n })}\n </div>\n );\n }\n);\n\nButtonSegmented.displayName = 'ButtonSegmented';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAgKT,SAUI,KAVJ;AAtHZ,IAAM,kBAAkB;AAAA,EACtB,WAAW;AAAA,IACT,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,YAAY;AAAA,EACd;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AA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C,cAAI,cAAmC;AAAA,YACrC,GAAG,gBAAgB,OAAO;AAAA,UAC5B;AAEA,cAAI,UAAU;AACZ,0BAAc;AAAA,cACZ,GAAG;AAAA,cACH,GAAG,gBAAgB,OAAO;AAAA,cAC1B,GAAI,aAAa,gBAAgB,OAAO;AAAA,YAC1C;AAAA,UACF,OAAO;AACL,0BAAc;AAAA,cACZ,GAAG;AAAA,cACH,GAAG,gBAAgB,OAAO;AAAA,cAC1B,GAAI,aAAa,gBAAgB,OAAO;AAAA,YAC1C;AAAA,UACF;AAEA,iBACE;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,OAAO;AAAA,cACP,SAAS,MAAM,YAAY,KAAK;AAAA,cAChC,cAAc,MAAM,gBAAgB,KAAK;AAAA,cACzC,cAAc,MAAM,gBAAgB,IAAI;AAAA,cACxC,gBAAc;AAAA,cAEb;AAAA,4BAAY,KAAK,QAChB;AAAA,kBAAC;AAAA;AAAA,oBACC,OAAO;AAAA,sBACL,SAAS;AAAA,sBACT,YAAY;AAAA,sBACZ,gBAAgB;AAAA,sBAChB,OAAO;AAAA,sBACP,QAAQ;AAAA,oBACV;AAAA,oBAEC,eAAK;AAAA;AAAA,gBACR;AAAA,gBAED,KAAK;AAAA;AAAA;AAAA,YArBD,KAAK,SAAS;AAAA,UAsBrB;AAAA,QAEJ,CAAC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,gBAAgB,cAAc;","names":[]}
@@ -0,0 +1,122 @@
1
+ // src/Avatar/Avatar.tsx
2
+ import * as React from "react";
3
+ import { User } from "lucide-react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ var sizeConfig = {
6
+ small: {
7
+ size: 20,
8
+ fontSize: 0,
9
+ // Too small for initials
10
+ fontWeight: 400,
11
+ iconSize: 12,
12
+ borderRadius: "99px"
13
+ },
14
+ medium: {
15
+ size: 32,
16
+ fontSize: 13,
17
+ fontWeight: 400,
18
+ iconSize: 16,
19
+ borderRadius: "99px"
20
+ },
21
+ large: {
22
+ size: 48,
23
+ fontSize: 13,
24
+ fontWeight: 400,
25
+ iconSize: 24,
26
+ borderRadius: "4px"
27
+ },
28
+ "extra-large": {
29
+ size: 96,
30
+ fontSize: 27,
31
+ fontWeight: 600,
32
+ iconSize: 48,
33
+ borderRadius: "8px"
34
+ }
35
+ };
36
+ var Avatar = React.forwardRef(
37
+ ({
38
+ size = "medium",
39
+ src,
40
+ initials,
41
+ alt = "Avatar",
42
+ className,
43
+ style,
44
+ "data-testid": dataTestId
45
+ }, ref) => {
46
+ const [isHovered, setIsHovered] = React.useState(false);
47
+ const [imageError, setImageError] = React.useState(false);
48
+ const config = sizeConfig[size];
49
+ const hasHoverState = size === "small";
50
+ const containerStyles = {
51
+ width: `${config.size}px`,
52
+ height: `${config.size}px`,
53
+ borderRadius: config.borderRadius,
54
+ border: "1px solid #efefef",
55
+ overflow: "hidden",
56
+ position: "relative",
57
+ backgroundColor: "#f8f8f8",
58
+ display: "flex",
59
+ alignItems: "center",
60
+ justifyContent: "center",
61
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
62
+ cursor: "default",
63
+ boxSizing: "border-box",
64
+ ...style
65
+ };
66
+ const hoverOverlayStyles = {
67
+ position: "absolute",
68
+ inset: 0,
69
+ pointerEvents: "none",
70
+ boxShadow: isHovered && hasHoverState ? "inset 0px 4px 100px 0px rgba(32, 32, 32, 0.3)" : "none",
71
+ borderRadius: config.borderRadius,
72
+ transition: "box-shadow 0.2s ease-in-out"
73
+ };
74
+ const imageStyles = {
75
+ width: "100%",
76
+ height: "100%",
77
+ objectFit: "cover"
78
+ };
79
+ const initialsStyles = {
80
+ fontSize: `${config.fontSize}px`,
81
+ fontWeight: config.fontWeight,
82
+ color: "#2f2f2f",
83
+ lineHeight: 1.5,
84
+ textAlign: "center",
85
+ userSelect: "none"
86
+ };
87
+ const showImage = src && !imageError;
88
+ const showInitials = !showImage && initials && size !== "small";
89
+ const showPlaceholder = !showImage && !showInitials;
90
+ return /* @__PURE__ */ jsxs(
91
+ "div",
92
+ {
93
+ ref,
94
+ className,
95
+ style: containerStyles,
96
+ onMouseEnter: () => setIsHovered(true),
97
+ onMouseLeave: () => setIsHovered(false),
98
+ "data-testid": dataTestId,
99
+ children: [
100
+ showImage && /* @__PURE__ */ jsx(
101
+ "img",
102
+ {
103
+ src,
104
+ alt,
105
+ style: imageStyles,
106
+ onError: () => setImageError(true)
107
+ }
108
+ ),
109
+ showInitials && /* @__PURE__ */ jsx("span", { style: initialsStyles, children: initials.slice(0, 2).toUpperCase() }),
110
+ showPlaceholder && /* @__PURE__ */ jsx(User, { size: config.iconSize, color: "#d1d1d1", strokeWidth: 2 }),
111
+ /* @__PURE__ */ jsx("div", { style: hoverOverlayStyles })
112
+ ]
113
+ }
114
+ );
115
+ }
116
+ );
117
+ Avatar.displayName = "Avatar";
118
+
119
+ export {
120
+ Avatar
121
+ };
122
+ //# sourceMappingURL=chunk-JSG27ZZS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Avatar/Avatar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { User } from 'lucide-react';\n\nexport type AvatarSize = 'small' | 'medium' | 'large' | 'extra-large';\n\nexport interface AvatarProps {\n /**\n * Size of the avatar\n */\n size?: AvatarSize;\n /**\n * Image source URL\n */\n src?: string;\n /**\n * Initials to display (2 characters) when no image is provided\n */\n initials?: string;\n /**\n * Alt text for the image\n */\n alt?: string;\n /**\n * Custom className\n */\n className?: string;\n /**\n * Custom style\n */\n style?: React.CSSProperties;\n /**\n * Test ID for testing\n */\n 'data-testid'?: string;\n}\n\nconst sizeConfig = {\n small: {\n size: 20,\n fontSize: 0, // Too small for initials\n fontWeight: 400,\n iconSize: 12,\n borderRadius: '99px',\n },\n medium: {\n size: 32,\n fontSize: 13,\n fontWeight: 400,\n iconSize: 16,\n borderRadius: '99px',\n },\n large: {\n size: 48,\n fontSize: 13,\n fontWeight: 400,\n iconSize: 24,\n borderRadius: '4px',\n },\n 'extra-large': {\n size: 96,\n fontSize: 27,\n fontWeight: 600,\n iconSize: 48,\n borderRadius: '8px',\n },\n};\n\n/**\n * Avatar component - Arbor Design System\n *\n * Displays a user avatar with support for images, initials, or a placeholder icon.\n * Features hover state with inner shadow effect.\n */\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n (\n {\n size = 'medium',\n src,\n initials,\n alt = 'Avatar',\n className,\n style,\n 'data-testid': dataTestId,\n },\n ref\n ) => {\n const [isHovered, setIsHovered] = React.useState(false);\n const [imageError, setImageError] = React.useState(false);\n const config = sizeConfig[size];\n\n // Only apply hover state for small size\n const hasHoverState = size === 'small';\n\n const containerStyles: React.CSSProperties = {\n width: `${config.size}px`,\n height: `${config.size}px`,\n borderRadius: config.borderRadius,\n border: '1px solid #efefef',\n overflow: 'hidden',\n position: 'relative',\n backgroundColor: '#f8f8f8',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n cursor: 'default',\n boxSizing: 'border-box',\n ...style,\n };\n\n const hoverOverlayStyles: React.CSSProperties = {\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n boxShadow: isHovered && hasHoverState ? 'inset 0px 4px 100px 0px rgba(32, 32, 32, 0.3)' : 'none',\n borderRadius: config.borderRadius,\n transition: 'box-shadow 0.2s ease-in-out',\n };\n\n const imageStyles: React.CSSProperties = {\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n };\n\n const initialsStyles: React.CSSProperties = {\n fontSize: `${config.fontSize}px`,\n fontWeight: config.fontWeight,\n color: '#2f2f2f',\n lineHeight: 1.5,\n textAlign: 'center',\n userSelect: 'none',\n };\n\n // Determine what to display\n const showImage = src && !imageError;\n const showInitials = !showImage && initials && size !== 'small';\n const showPlaceholder = !showImage && !showInitials;\n\n return (\n <div\n ref={ref}\n className={className}\n style={containerStyles}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n data-testid={dataTestId}\n >\n {showImage && (\n <img\n src={src}\n alt={alt}\n style={imageStyles}\n onError={() => setImageError(true)}\n />\n )}\n\n {showInitials && (\n <span style={initialsStyles}>\n {initials.slice(0, 2).toUpperCase()}\n </span>\n )}\n\n {showPlaceholder && (\n <User size={config.iconSize} color=\"#d1d1d1\" strokeWidth={2} />\n )}\n\n <div style={hoverOverlayStyles} />\n </div>\n );\n }\n);\n\nAvatar.displayName = 'Avatar';\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AA2If,SASI,KATJ;AAxGN,IAAM,aAAa;AAAA,EACjB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,eAAe;AAAA,IACb,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AACF;AAQO,IAAM,SAAe;AAAA,EAC1B,CACE;AAAA,IACE,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACjB,GACA,QACG;AACH,UAAM,CAAC,WAAW,YAAY,IAAU,eAAS,KAAK;AACtD,UAAM,CAAC,YAAY,aAAa,IAAU,eAAS,KAAK;AACxD,UAAM,SAAS,WAAW,IAAI;AAG9B,UAAM,gBAAgB,SAAS;AAE/B,UAAM,kBAAuC;AAAA,MAC3C,OAAO,GAAG,OAAO,IAAI;A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