@tonyarbor/components 0.4.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/ButtonSegmented.d.mts +61 -0
- package/dist/ButtonSegmented.d.ts +61 -0
- package/dist/ButtonSegmented.js +167 -0
- package/dist/ButtonSegmented.js.map +1 -0
- package/dist/ButtonSegmented.mjs +7 -0
- package/dist/ButtonSegmented.mjs.map +1 -0
- package/dist/ListRow.d.mts +72 -0
- package/dist/ListRow.d.ts +72 -0
- package/dist/ListRow.js +194 -0
- package/dist/ListRow.js.map +1 -0
- package/dist/ListRow.mjs +7 -0
- package/dist/ListRow.mjs.map +1 -0
- package/dist/ListRowMultiLine.d.mts +56 -0
- package/dist/ListRowMultiLine.d.ts +56 -0
- package/dist/ListRowMultiLine.js +182 -0
- package/dist/ListRowMultiLine.js.map +1 -0
- package/dist/ListRowMultiLine.mjs +7 -0
- package/dist/ListRowMultiLine.mjs.map +1 -0
- package/dist/Logo.d.mts +39 -0
- package/dist/Logo.d.ts +39 -0
- package/dist/Logo.js +119 -0
- package/dist/Logo.js.map +1 -0
- package/dist/Logo.mjs +7 -0
- package/dist/Logo.mjs.map +1 -0
- 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/Section.d.mts +57 -0
- package/dist/Section.d.ts +57 -0
- package/dist/Section.js +72 -0
- package/dist/Section.js.map +1 -0
- package/dist/Section.mjs +7 -0
- package/dist/Section.mjs.map +1 -0
- package/dist/SectionHeading.d.mts +111 -0
- package/dist/SectionHeading.d.ts +111 -0
- package/dist/SectionHeading.js +385 -0
- package/dist/SectionHeading.js.map +1 -0
- package/dist/SectionHeading.mjs +8 -0
- package/dist/SectionHeading.mjs.map +1 -0
- package/dist/SectionHeadingInteractive.d.mts +67 -0
- package/dist/SectionHeadingInteractive.d.ts +67 -0
- package/dist/SectionHeadingInteractive.js +225 -0
- package/dist/SectionHeadingInteractive.js.map +1 -0
- package/dist/SectionHeadingInteractive.mjs +7 -0
- package/dist/SectionHeadingInteractive.mjs.map +1 -0
- package/dist/SectionIcon.d.mts +35 -0
- package/dist/SectionIcon.d.ts +35 -0
- package/dist/SectionIcon.js +142 -0
- package/dist/SectionIcon.js.map +1 -0
- package/dist/SectionIcon.mjs +7 -0
- package/dist/SectionIcon.mjs.map +1 -0
- package/dist/SubSectionHeading.d.mts +75 -0
- package/dist/SubSectionHeading.d.ts +75 -0
- package/dist/SubSectionHeading.js +225 -0
- package/dist/SubSectionHeading.js.map +1 -0
- package/dist/SubSectionHeading.mjs +7 -0
- package/dist/SubSectionHeading.mjs.map +1 -0
- package/dist/SubSectionInteractive.d.mts +65 -0
- package/dist/SubSectionInteractive.d.ts +65 -0
- package/dist/SubSectionInteractive.js +211 -0
- package/dist/SubSectionInteractive.js.map +1 -0
- package/dist/SubSectionInteractive.mjs +7 -0
- package/dist/SubSectionInteractive.mjs.map +1 -0
- package/dist/chunk-7JWINM2N.mjs +77 -0
- package/dist/chunk-7JWINM2N.mjs.map +1 -0
- package/dist/chunk-7NYBJKJS.mjs +106 -0
- package/dist/chunk-7NYBJKJS.mjs.map +1 -0
- package/dist/chunk-ALLCJATI.mjs +189 -0
- package/dist/chunk-ALLCJATI.mjs.map +1 -0
- package/dist/chunk-F6JVEIWC.mjs +158 -0
- package/dist/chunk-F6JVEIWC.mjs.map +1 -0
- package/dist/chunk-GHATS25Y.mjs +249 -0
- package/dist/chunk-GHATS25Y.mjs.map +1 -0
- package/dist/chunk-GIQDPHZQ.mjs +121 -0
- package/dist/chunk-GIQDPHZQ.mjs.map +1 -0
- package/dist/chunk-ILLGBZ6R.mjs +131 -0
- package/dist/chunk-ILLGBZ6R.mjs.map +1 -0
- package/dist/chunk-NNYU4DPD.mjs +83 -0
- package/dist/chunk-NNYU4DPD.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-ODKT7LGV.mjs +146 -0
- package/dist/chunk-ODKT7LGV.mjs.map +1 -0
- package/dist/chunk-P7RKUESQ.mjs +37 -0
- package/dist/chunk-P7RKUESQ.mjs.map +1 -0
- package/dist/chunk-RL4G7MR3.mjs +189 -0
- package/dist/chunk-RL4G7MR3.mjs.map +1 -0
- package/dist/chunk-X2CW5GF3.mjs +175 -0
- package/dist/chunk-X2CW5GF3.mjs.map +1 -0
- package/dist/chunk-YJ36ZZJQ.mjs +36 -0
- package/dist/chunk-YJ36ZZJQ.mjs.map +1 -0
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +1722 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -1
- package/package.json +66 -1
- package/dist/chunk-ALEJXAZY.mjs.map +0 -1
package/dist/ListRow.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
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/ListRow/index.ts
|
|
31
|
+
var ListRow_exports = {};
|
|
32
|
+
__export(ListRow_exports, {
|
|
33
|
+
ListRow: () => ListRow
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(ListRow_exports);
|
|
36
|
+
|
|
37
|
+
// src/ListRow/ListRow.tsx
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_clsx = require("clsx");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
var CaretIcon = ({ isHovered }) => {
|
|
42
|
+
if (isHovered) {
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
d: "M6 4L10 8L6 12",
|
|
47
|
+
stroke: "#2f2f2f",
|
|
48
|
+
strokeWidth: "1.2",
|
|
49
|
+
strokeLinecap: "round",
|
|
50
|
+
strokeLinejoin: "round"
|
|
51
|
+
}
|
|
52
|
+
) });
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
"path",
|
|
56
|
+
{
|
|
57
|
+
d: "M6 4L10 8L6 12",
|
|
58
|
+
stroke: "#b3b3b3",
|
|
59
|
+
strokeWidth: "1.2",
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round"
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
};
|
|
65
|
+
var listRowStyles = {
|
|
66
|
+
container: {
|
|
67
|
+
display: "flex",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
width: "100%",
|
|
70
|
+
borderBottom: "1px solid #f8f8f8",
|
|
71
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
72
|
+
boxSizing: "border-box",
|
|
73
|
+
borderRadius: "8px",
|
|
74
|
+
transition: "background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",
|
|
75
|
+
outline: "none"
|
|
76
|
+
},
|
|
77
|
+
containerHover: {
|
|
78
|
+
backgroundColor: "#f8f8f8"
|
|
79
|
+
},
|
|
80
|
+
containerFocus: {
|
|
81
|
+
outline: "3px solid #3cad51",
|
|
82
|
+
outlineOffset: "-3px"
|
|
83
|
+
},
|
|
84
|
+
containerClickable: {
|
|
85
|
+
cursor: "pointer"
|
|
86
|
+
},
|
|
87
|
+
content: {
|
|
88
|
+
display: "flex",
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
justifyContent: "space-between",
|
|
91
|
+
width: "100%",
|
|
92
|
+
padding: "4px 8px",
|
|
93
|
+
minHeight: "28px"
|
|
94
|
+
},
|
|
95
|
+
label: {
|
|
96
|
+
fontSize: "13px",
|
|
97
|
+
fontWeight: "600",
|
|
98
|
+
color: "#2f2f2f",
|
|
99
|
+
lineHeight: "1.5",
|
|
100
|
+
width: "190px",
|
|
101
|
+
flexShrink: 0
|
|
102
|
+
},
|
|
103
|
+
valueContainer: {
|
|
104
|
+
flex: 1,
|
|
105
|
+
display: "flex",
|
|
106
|
+
alignItems: "center"
|
|
107
|
+
},
|
|
108
|
+
value: {
|
|
109
|
+
fontSize: "13px",
|
|
110
|
+
fontWeight: "400",
|
|
111
|
+
color: "#2f2f2f",
|
|
112
|
+
lineHeight: "1.5"
|
|
113
|
+
},
|
|
114
|
+
rightContainer: {
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
justifyContent: "flex-end",
|
|
118
|
+
gap: "8px",
|
|
119
|
+
flexShrink: 0
|
|
120
|
+
},
|
|
121
|
+
note: {
|
|
122
|
+
fontSize: "13px",
|
|
123
|
+
fontWeight: "400",
|
|
124
|
+
fontStyle: "italic",
|
|
125
|
+
color: "#2f2f2f",
|
|
126
|
+
lineHeight: "1.5",
|
|
127
|
+
textAlign: "right"
|
|
128
|
+
},
|
|
129
|
+
iconWrapper: {
|
|
130
|
+
display: "flex",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
justifyContent: "center",
|
|
133
|
+
width: "16px",
|
|
134
|
+
height: "16px",
|
|
135
|
+
flexShrink: 0
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var ListRow = React.forwardRef(
|
|
139
|
+
({ value, label, note, icon = false, onClick, className, style, ...props }, ref) => {
|
|
140
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
141
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
142
|
+
const showHoverState = icon && isHovered;
|
|
143
|
+
const isClickable = icon && onClick;
|
|
144
|
+
const containerStyle = {
|
|
145
|
+
...listRowStyles.container,
|
|
146
|
+
...showHoverState && listRowStyles.containerHover,
|
|
147
|
+
...isFocused && listRowStyles.containerFocus,
|
|
148
|
+
...isClickable && listRowStyles.containerClickable,
|
|
149
|
+
...style
|
|
150
|
+
};
|
|
151
|
+
const handleClick = () => {
|
|
152
|
+
if (isClickable && onClick) {
|
|
153
|
+
onClick();
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const handleKeyDown = (event) => {
|
|
157
|
+
if (isClickable && (event.key === "Enter" || event.key === " ")) {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
onClick?.();
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
ref,
|
|
166
|
+
className: (0, import_clsx.clsx)("arbor-list-row", className),
|
|
167
|
+
style: containerStyle,
|
|
168
|
+
onClick: handleClick,
|
|
169
|
+
onMouseEnter: () => icon && setIsHovered(true),
|
|
170
|
+
onMouseLeave: () => setIsHovered(false),
|
|
171
|
+
onFocus: () => setIsFocused(true),
|
|
172
|
+
onBlur: () => setIsFocused(false),
|
|
173
|
+
onKeyDown: handleKeyDown,
|
|
174
|
+
tabIndex: isClickable ? 0 : void 0,
|
|
175
|
+
role: isClickable ? "button" : void 0,
|
|
176
|
+
...props,
|
|
177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: listRowStyles.content, children: [
|
|
178
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: listRowStyles.label, children: label }),
|
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: listRowStyles.valueContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: listRowStyles.value, children: value }) }),
|
|
180
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: listRowStyles.rightContainer, children: [
|
|
181
|
+
note && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: listRowStyles.note, children: note }),
|
|
182
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: listRowStyles.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CaretIcon, { isHovered }) })
|
|
183
|
+
] })
|
|
184
|
+
] })
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
ListRow.displayName = "ListRow";
|
|
190
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
191
|
+
0 && (module.exports = {
|
|
192
|
+
ListRow
|
|
193
|
+
});
|
|
194
|
+
//# sourceMappingURL=ListRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ListRow/index.ts","../src/ListRow/ListRow.tsx"],"sourcesContent":["export { ListRow } from './ListRow';\nexport type { ListRowProps } from './ListRow';\n","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;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AAwCb;AALR,IAAM,YAAY,CAAC,EAAE,UAAU,MAA8B;AAC3D,MAAI,WAAW;AAEb,WACE,4CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,MAAC;AAAA;AAAA,QACC,GAAE;AAAA,QACF,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA;AAAA,IACjB,GACF;AAAA,EAEJ;AAEA,SACE,4CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA;AAAA,EACjB,GACF;AAEJ;AAGA,IAAM,gBAAgB;AAAA,EACpB,WAAW;AAAA,IACT,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AAAA,EACA,gBAAgB;AAAA,IACd,iBAAiB;AAAA,EACnB;A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0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ListRowMultiLineProps {
|
|
4
|
+
/**
|
|
5
|
+
* The heading/title text (displayed on line 1, larger and bold)
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* The description text (displayed on line 2, smaller and regular weight)
|
|
10
|
+
*/
|
|
11
|
+
description: string;
|
|
12
|
+
/**
|
|
13
|
+
* Show the right arrow icon - enables hover state and indicates row is clickable
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
icon?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Click handler - typically used with icon prop for navigation
|
|
19
|
+
*/
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Additional CSS class name
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Additional inline styles
|
|
27
|
+
*/
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* ListRowMultiLine component - Arbor Design System
|
|
32
|
+
*
|
|
33
|
+
* A list row component with content displayed on two vertical lines.
|
|
34
|
+
* Cannot be mixed with single-line ListRow in the same section.
|
|
35
|
+
* Hover state is only enabled when icon is present (indicating clickable row).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Basic multi-line row (not clickable)
|
|
40
|
+
* <ListRowMultiLine
|
|
41
|
+
* title="Section Title"
|
|
42
|
+
* description="A brief description of this section"
|
|
43
|
+
* />
|
|
44
|
+
*
|
|
45
|
+
* // Clickable multi-line row with icon
|
|
46
|
+
* <ListRowMultiLine
|
|
47
|
+
* title="View Details"
|
|
48
|
+
* description="Click to see more information"
|
|
49
|
+
* icon
|
|
50
|
+
* onClick={() => navigate('/details')}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare const ListRowMultiLine: React.ForwardRefExoticComponent<ListRowMultiLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
|
|
56
|
+
export { ListRowMultiLine, type ListRowMultiLineProps };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ListRowMultiLineProps {
|
|
4
|
+
/**
|
|
5
|
+
* The heading/title text (displayed on line 1, larger and bold)
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* The description text (displayed on line 2, smaller and regular weight)
|
|
10
|
+
*/
|
|
11
|
+
description: string;
|
|
12
|
+
/**
|
|
13
|
+
* Show the right arrow icon - enables hover state and indicates row is clickable
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
icon?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Click handler - typically used with icon prop for navigation
|
|
19
|
+
*/
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Additional CSS class name
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Additional inline styles
|
|
27
|
+
*/
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* ListRowMultiLine component - Arbor Design System
|
|
32
|
+
*
|
|
33
|
+
* A list row component with content displayed on two vertical lines.
|
|
34
|
+
* Cannot be mixed with single-line ListRow in the same section.
|
|
35
|
+
* Hover state is only enabled when icon is present (indicating clickable row).
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Basic multi-line row (not clickable)
|
|
40
|
+
* <ListRowMultiLine
|
|
41
|
+
* title="Section Title"
|
|
42
|
+
* description="A brief description of this section"
|
|
43
|
+
* />
|
|
44
|
+
*
|
|
45
|
+
* // Clickable multi-line row with icon
|
|
46
|
+
* <ListRowMultiLine
|
|
47
|
+
* title="View Details"
|
|
48
|
+
* description="Click to see more information"
|
|
49
|
+
* icon
|
|
50
|
+
* onClick={() => navigate('/details')}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare const ListRowMultiLine: React.ForwardRefExoticComponent<ListRowMultiLineProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
|
|
56
|
+
export { ListRowMultiLine, type ListRowMultiLineProps };
|
|
@@ -0,0 +1,182 @@
|
|
|
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/ListRowMultiLine/index.ts
|
|
31
|
+
var ListRowMultiLine_exports = {};
|
|
32
|
+
__export(ListRowMultiLine_exports, {
|
|
33
|
+
ListRowMultiLine: () => ListRowMultiLine
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(ListRowMultiLine_exports);
|
|
36
|
+
|
|
37
|
+
// src/ListRowMultiLine/ListRowMultiLine.tsx
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_clsx = require("clsx");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
var CaretIcon = ({ isHovered }) => {
|
|
42
|
+
if (isHovered) {
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
d: "M6 4L10 8L6 12",
|
|
47
|
+
stroke: "#2f2f2f",
|
|
48
|
+
strokeWidth: "1.2",
|
|
49
|
+
strokeLinecap: "round",
|
|
50
|
+
strokeLinejoin: "round"
|
|
51
|
+
}
|
|
52
|
+
) });
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
"path",
|
|
56
|
+
{
|
|
57
|
+
d: "M6 4L10 8L6 12",
|
|
58
|
+
stroke: "#b3b3b3",
|
|
59
|
+
strokeWidth: "1.2",
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round"
|
|
62
|
+
}
|
|
63
|
+
) });
|
|
64
|
+
};
|
|
65
|
+
var listRowMultiLineStyles = {
|
|
66
|
+
container: {
|
|
67
|
+
display: "flex",
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
width: "100%",
|
|
70
|
+
borderBottom: "1px solid #f8f8f8",
|
|
71
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
72
|
+
boxSizing: "border-box",
|
|
73
|
+
borderRadius: "8px",
|
|
74
|
+
transition: "background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",
|
|
75
|
+
outline: "none"
|
|
76
|
+
},
|
|
77
|
+
containerHover: {
|
|
78
|
+
backgroundColor: "#f8f8f8"
|
|
79
|
+
},
|
|
80
|
+
containerFocus: {
|
|
81
|
+
outline: "3px solid #3cad51",
|
|
82
|
+
outlineOffset: "-3px"
|
|
83
|
+
},
|
|
84
|
+
containerClickable: {
|
|
85
|
+
cursor: "pointer"
|
|
86
|
+
},
|
|
87
|
+
content: {
|
|
88
|
+
display: "flex",
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
justifyContent: "space-between",
|
|
91
|
+
width: "100%",
|
|
92
|
+
padding: "4px 8px",
|
|
93
|
+
minHeight: "44px"
|
|
94
|
+
},
|
|
95
|
+
textContent: {
|
|
96
|
+
display: "flex",
|
|
97
|
+
flexDirection: "column",
|
|
98
|
+
alignItems: "flex-start",
|
|
99
|
+
justifyContent: "center",
|
|
100
|
+
flex: 1,
|
|
101
|
+
gap: "0px"
|
|
102
|
+
},
|
|
103
|
+
title: {
|
|
104
|
+
fontSize: "16px",
|
|
105
|
+
fontWeight: "600",
|
|
106
|
+
color: "#2f2f2f",
|
|
107
|
+
lineHeight: "1.5",
|
|
108
|
+
margin: 0
|
|
109
|
+
},
|
|
110
|
+
description: {
|
|
111
|
+
fontSize: "13px",
|
|
112
|
+
fontWeight: "400",
|
|
113
|
+
color: "#2f2f2f",
|
|
114
|
+
lineHeight: "1.5",
|
|
115
|
+
margin: 0
|
|
116
|
+
},
|
|
117
|
+
iconWrapper: {
|
|
118
|
+
display: "flex",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
justifyContent: "center",
|
|
121
|
+
width: "16px",
|
|
122
|
+
height: "16px",
|
|
123
|
+
flexShrink: 0,
|
|
124
|
+
marginLeft: "8px"
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
var ListRowMultiLine = React.forwardRef(
|
|
128
|
+
({ title, description, icon = false, onClick, className, style, ...props }, ref) => {
|
|
129
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
130
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
131
|
+
const showHoverState = icon && isHovered;
|
|
132
|
+
const isClickable = icon && onClick;
|
|
133
|
+
const containerStyle = {
|
|
134
|
+
...listRowMultiLineStyles.container,
|
|
135
|
+
...showHoverState && listRowMultiLineStyles.containerHover,
|
|
136
|
+
...isFocused && listRowMultiLineStyles.containerFocus,
|
|
137
|
+
...isClickable && listRowMultiLineStyles.containerClickable,
|
|
138
|
+
...style
|
|
139
|
+
};
|
|
140
|
+
const handleClick = () => {
|
|
141
|
+
if (isClickable && onClick) {
|
|
142
|
+
onClick();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const handleKeyDown = (event) => {
|
|
146
|
+
if (isClickable && (event.key === "Enter" || event.key === " ")) {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
onClick?.();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
ref,
|
|
155
|
+
className: (0, import_clsx.clsx)("arbor-list-row-multi-line", className),
|
|
156
|
+
style: containerStyle,
|
|
157
|
+
onClick: handleClick,
|
|
158
|
+
onMouseEnter: () => icon && setIsHovered(true),
|
|
159
|
+
onMouseLeave: () => setIsHovered(false),
|
|
160
|
+
onFocus: () => setIsFocused(true),
|
|
161
|
+
onBlur: () => setIsFocused(false),
|
|
162
|
+
onKeyDown: handleKeyDown,
|
|
163
|
+
tabIndex: isClickable ? 0 : void 0,
|
|
164
|
+
role: isClickable ? "button" : void 0,
|
|
165
|
+
...props,
|
|
166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: listRowMultiLineStyles.content, children: [
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: listRowMultiLineStyles.textContent, children: [
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: listRowMultiLineStyles.title, children: title }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: listRowMultiLineStyles.description, children: description })
|
|
170
|
+
] }),
|
|
171
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: listRowMultiLineStyles.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CaretIcon, { isHovered }) })
|
|
172
|
+
] })
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
ListRowMultiLine.displayName = "ListRowMultiLine";
|
|
178
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
179
|
+
0 && (module.exports = {
|
|
180
|
+
ListRowMultiLine
|
|
181
|
+
});
|
|
182
|
+
//# sourceMappingURL=ListRowMultiLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ListRowMultiLine/index.ts","../src/ListRowMultiLine/ListRowMultiLine.tsx"],"sourcesContent":["export { ListRowMultiLine } from './ListRowMultiLine';\nexport type { ListRowMultiLineProps } from './ListRowMultiLine';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface ListRowMultiLineProps {\n /**\n * The heading/title text (displayed on line 1, larger and bold)\n */\n title: string;\n /**\n * The description text (displayed on line 2, smaller and regular weight)\n */\n description: 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 multiple lines styles\nconst listRowMultiLineStyles = {\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: '44px',\n },\n textContent: {\n display: 'flex',\n flexDirection: 'column' as const,\n alignItems: 'flex-start',\n justifyContent: 'center',\n flex: 1,\n gap: '0px',\n },\n title: {\n fontSize: '16px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.5',\n margin: 0,\n },\n description: {\n fontSize: '13px',\n fontWeight: '400',\n color: '#2f2f2f',\n lineHeight: '1.5',\n margin: 0,\n },\n iconWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '16px',\n height: '16px',\n flexShrink: 0,\n marginLeft: '8px',\n },\n};\n\n/**\n * ListRowMultiLine component - Arbor Design System\n *\n * A list row component with content displayed on two vertical lines.\n * Cannot be mixed with single-line ListRow in the same section.\n * Hover state is only enabled when icon is present (indicating clickable row).\n *\n * @example\n * ```tsx\n * // Basic multi-line row (not clickable)\n * <ListRowMultiLine\n * title=\"Section Title\"\n * description=\"A brief description of this section\"\n * />\n *\n * // Clickable multi-line row with icon\n * <ListRowMultiLine\n * title=\"View Details\"\n * description=\"Click to see more information\"\n * icon\n * onClick={() => navigate('/details')}\n * />\n * ```\n */\nexport const ListRowMultiLine = React.forwardRef<HTMLDivElement, ListRowMultiLineProps>(\n ({ title, description, 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 ...listRowMultiLineStyles.container,\n ...(showHoverState && listRowMultiLineStyles.containerHover),\n ...(isFocused && listRowMultiLineStyles.containerFocus),\n ...(isClickable && listRowMultiLineStyles.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-multi-line', 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={listRowMultiLineStyles.content}>\n <div style={listRowMultiLineStyles.textContent}>\n <span style={listRowMultiLineStyles.title}>{title}</span>\n <span style={listRowMultiLineStyles.description}>{description}</span>\n </div>\n {icon && (\n <div style={listRowMultiLineStyles.iconWrapper}>\n <CaretIcon isHovered={isHovered} />\n </div>\n )}\n </div>\n </div>\n );\n }\n);\n\nListRowMultiLine.displayName = 'ListRowMultiLine';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AAoCb;AALR,IAAM,YAAY,CAAC,EAAE,UAAU,MAA8B;AAC3D,MAAI,WAAW;AAEb,WACE,4CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,MAAC;AAAA;AAAA,QACC,GAAE;AAAA,QACF,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA;AAAA,IACjB,GACF;AAAA,EAEJ;AAEA,SACE,4CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA;AAAA,EACjB,GACF;AAEJ;AAGA,IAAM,yBAAyB;AAAA,EAC7B,WAAW;AAAA,IACT,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,YAAY;AA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AAA,MACxC,GAAI,eAAe,uBAAuB;AAAA,MAC1C,GAAG;AAAA,IACL;AAEA,UAAM,cAAc,MAAM;AACxB,UAAI,eAAe,SAAS;AAC1B,gBAAQ;AAAA,MACV;AAAA,IACF;AAEA,UAAM,gBAAgB,CAAC,UAA+B;AACpD,UAAI,gBAAgB,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;AAC/D,cAAM,eAAe;AACrB,kBAAU;AAAA,MACZ;AAAA,IACF;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAK,6BAA6B,SAAS;AAAA,QACtD,OAAO;AAAA,QACP,SAAS;AAAA,QACT,cAAc,MAAM,QAAQ,aAAa,IAAI;AAAA,QAC7C,cAAc,MAAM,aAAa,KAAK;AAAA,QACtC,SAAS,MAAM,aAAa,IAAI;AAAA,QAChC,QAAQ,MAAM,aAAa,KAAK;AAAA,QAChC,WAAW;AAAA,QACX,UAAU,cAAc,IAAI;AAAA,QAC5B,MAAM,cAAc,WAAW;AAAA,QAC9B,GAAG;AAAA,QAEJ,uDAAC,SAAI,OAAO,uBAAuB,SACjC;AAAA,uDAAC,SAAI,OAAO,uBAAuB,aACjC;AAAA,wDAAC,UAAK,OAAO,uBAAuB,OAAQ,iBAAM;AAAA,YAClD,4CAAC,UAAK,OAAO,uBAAuB,aAAc,uBAAY;AAAA,aAChE;AAAA,UACC,QACC,4CAAC,SAAI,OAAO,uBAAuB,aACjC,sDAAC,aAAU,WAAsB,GACnC;AAAA,WAEJ;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/Logo.d.mts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface LogoProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether to show the "Arbor" text alongside the logo
|
|
6
|
+
*/
|
|
7
|
+
withText?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to use light (dark text) or dark (white text) variant
|
|
10
|
+
* Only applies when withText is true
|
|
11
|
+
*/
|
|
12
|
+
light?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Width of the logo in pixels
|
|
15
|
+
* @default withText ? 66 : 25
|
|
16
|
+
*/
|
|
17
|
+
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Height of the logo in pixels
|
|
20
|
+
* @default withText ? 26 : 25
|
|
21
|
+
*/
|
|
22
|
+
height?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Custom className
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Custom style
|
|
29
|
+
*/
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Logo component - Arbor Design System
|
|
34
|
+
*
|
|
35
|
+
* Displays the Arbor logo with optional text in light or dark variants.
|
|
36
|
+
*/
|
|
37
|
+
declare const Logo: React.ForwardRefExoticComponent<LogoProps & React.RefAttributes<SVGSVGElement>>;
|
|
38
|
+
|
|
39
|
+
export { Logo, type LogoProps };
|
package/dist/Logo.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface LogoProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether to show the "Arbor" text alongside the logo
|
|
6
|
+
*/
|
|
7
|
+
withText?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to use light (dark text) or dark (white text) variant
|
|
10
|
+
* Only applies when withText is true
|
|
11
|
+
*/
|
|
12
|
+
light?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Width of the logo in pixels
|
|
15
|
+
* @default withText ? 66 : 25
|
|
16
|
+
*/
|
|
17
|
+
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Height of the logo in pixels
|
|
20
|
+
* @default withText ? 26 : 25
|
|
21
|
+
*/
|
|
22
|
+
height?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Custom className
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Custom style
|
|
29
|
+
*/
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Logo component - Arbor Design System
|
|
34
|
+
*
|
|
35
|
+
* Displays the Arbor logo with optional text in light or dark variants.
|
|
36
|
+
*/
|
|
37
|
+
declare const Logo: React.ForwardRefExoticComponent<LogoProps & React.RefAttributes<SVGSVGElement>>;
|
|
38
|
+
|
|
39
|
+
export { Logo, type LogoProps };
|