@tonyarbor/components 0.4.0 → 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 (86) hide show
  1. package/dist/ButtonSegmented.d.mts +61 -0
  2. package/dist/ButtonSegmented.d.ts +61 -0
  3. package/dist/ButtonSegmented.js +167 -0
  4. package/dist/ButtonSegmented.js.map +1 -0
  5. package/dist/ButtonSegmented.mjs +7 -0
  6. package/dist/ButtonSegmented.mjs.map +1 -0
  7. package/dist/ListRow.d.mts +72 -0
  8. package/dist/ListRow.d.ts +72 -0
  9. package/dist/ListRow.js +194 -0
  10. package/dist/ListRow.js.map +1 -0
  11. package/dist/ListRow.mjs +7 -0
  12. package/dist/ListRow.mjs.map +1 -0
  13. package/dist/ListRowMultiLine.d.mts +56 -0
  14. package/dist/ListRowMultiLine.d.ts +56 -0
  15. package/dist/ListRowMultiLine.js +182 -0
  16. package/dist/ListRowMultiLine.js.map +1 -0
  17. package/dist/ListRowMultiLine.mjs +7 -0
  18. package/dist/ListRowMultiLine.mjs.map +1 -0
  19. package/dist/Logo.d.mts +39 -0
  20. package/dist/Logo.d.ts +39 -0
  21. package/dist/Logo.js +119 -0
  22. package/dist/Logo.js.map +1 -0
  23. package/dist/Logo.mjs +7 -0
  24. package/dist/Logo.mjs.map +1 -0
  25. package/dist/Section.d.mts +57 -0
  26. package/dist/Section.d.ts +57 -0
  27. package/dist/Section.js +72 -0
  28. package/dist/Section.js.map +1 -0
  29. package/dist/Section.mjs +7 -0
  30. package/dist/Section.mjs.map +1 -0
  31. package/dist/SectionHeading.d.mts +111 -0
  32. package/dist/SectionHeading.d.ts +111 -0
  33. package/dist/SectionHeading.js +385 -0
  34. package/dist/SectionHeading.js.map +1 -0
  35. package/dist/SectionHeading.mjs +8 -0
  36. package/dist/SectionHeading.mjs.map +1 -0
  37. package/dist/SectionHeadingInteractive.d.mts +67 -0
  38. package/dist/SectionHeadingInteractive.d.ts +67 -0
  39. package/dist/SectionHeadingInteractive.js +225 -0
  40. package/dist/SectionHeadingInteractive.js.map +1 -0
  41. package/dist/SectionHeadingInteractive.mjs +7 -0
  42. package/dist/SectionHeadingInteractive.mjs.map +1 -0
  43. package/dist/SectionIcon.d.mts +35 -0
  44. package/dist/SectionIcon.d.ts +35 -0
  45. package/dist/SectionIcon.js +142 -0
  46. package/dist/SectionIcon.js.map +1 -0
  47. package/dist/SectionIcon.mjs +7 -0
  48. package/dist/SectionIcon.mjs.map +1 -0
  49. package/dist/SubSectionHeading.d.mts +75 -0
  50. package/dist/SubSectionHeading.d.ts +75 -0
  51. package/dist/SubSectionHeading.js +225 -0
  52. package/dist/SubSectionHeading.js.map +1 -0
  53. package/dist/SubSectionHeading.mjs +7 -0
  54. package/dist/SubSectionHeading.mjs.map +1 -0
  55. package/dist/SubSectionInteractive.d.mts +65 -0
  56. package/dist/SubSectionInteractive.d.ts +65 -0
  57. package/dist/SubSectionInteractive.js +211 -0
  58. package/dist/SubSectionInteractive.js.map +1 -0
  59. package/dist/SubSectionInteractive.mjs +7 -0
  60. package/dist/SubSectionInteractive.mjs.map +1 -0
  61. package/dist/chunk-7NYBJKJS.mjs +106 -0
  62. package/dist/chunk-7NYBJKJS.mjs.map +1 -0
  63. package/dist/chunk-ALLCJATI.mjs +189 -0
  64. package/dist/chunk-ALLCJATI.mjs.map +1 -0
  65. package/dist/chunk-F6JVEIWC.mjs +158 -0
  66. package/dist/chunk-F6JVEIWC.mjs.map +1 -0
  67. package/dist/chunk-GHATS25Y.mjs +249 -0
  68. package/dist/chunk-GHATS25Y.mjs.map +1 -0
  69. package/dist/chunk-ILLGBZ6R.mjs +131 -0
  70. package/dist/chunk-ILLGBZ6R.mjs.map +1 -0
  71. package/dist/chunk-NNYU4DPD.mjs +83 -0
  72. package/dist/chunk-NNYU4DPD.mjs.map +1 -0
  73. package/dist/chunk-ODKT7LGV.mjs +146 -0
  74. package/dist/chunk-ODKT7LGV.mjs.map +1 -0
  75. package/dist/chunk-RL4G7MR3.mjs +189 -0
  76. package/dist/chunk-RL4G7MR3.mjs.map +1 -0
  77. package/dist/chunk-X2CW5GF3.mjs +175 -0
  78. package/dist/chunk-X2CW5GF3.mjs.map +1 -0
  79. package/dist/chunk-YJ36ZZJQ.mjs +36 -0
  80. package/dist/chunk-YJ36ZZJQ.mjs.map +1 -0
  81. package/dist/index.d.mts +10 -0
  82. package/dist/index.d.ts +10 -0
  83. package/dist/index.js +1440 -0
  84. package/dist/index.js.map +1 -1
  85. package/dist/index.mjs +40 -0
  86. package/package.json +51 -1
@@ -0,0 +1,225 @@
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/SubSectionHeading/index.ts
31
+ var SubSectionHeading_exports = {};
32
+ __export(SubSectionHeading_exports, {
33
+ SubSectionHeading: () => SubSectionHeading
34
+ });
35
+ module.exports = __toCommonJS(SubSectionHeading_exports);
36
+
37
+ // src/SubSectionHeading/SubSectionHeading.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_clsx = require("clsx");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var InfoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "8", r: "6.5", stroke: "#2f2f2f", strokeWidth: "1.2" }),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "path",
45
+ {
46
+ d: "M8 7V11",
47
+ stroke: "#2f2f2f",
48
+ strokeWidth: "1.2",
49
+ strokeLinecap: "round"
50
+ }
51
+ ),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "5", r: "0.75", fill: "#2f2f2f" })
53
+ ] });
54
+ var PlusIcon = ({ color = "#2f2f2f" }) => /* @__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: "M8 3V13M3 8H13",
58
+ stroke: color,
59
+ strokeWidth: "1.2",
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round"
62
+ }
63
+ ) });
64
+ var subSectionHeadingStyles = {
65
+ container: {
66
+ display: "flex",
67
+ alignItems: "center",
68
+ width: "100%",
69
+ borderBottom: "1px solid #efefef",
70
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
71
+ boxSizing: "border-box"
72
+ },
73
+ containerNoButton: {
74
+ padding: "12px 8px",
75
+ gap: "0px"
76
+ },
77
+ containerWithButton: {
78
+ padding: "8px",
79
+ gap: "12px",
80
+ justifyContent: "space-between"
81
+ },
82
+ textContainer: {
83
+ display: "flex",
84
+ alignItems: "center",
85
+ gap: "8px",
86
+ flex: 1,
87
+ minHeight: "16px"
88
+ },
89
+ title: {
90
+ fontSize: "18px",
91
+ fontWeight: "600",
92
+ color: "#2f2f2f",
93
+ lineHeight: "1.25",
94
+ margin: 0,
95
+ whiteSpace: "nowrap"
96
+ },
97
+ iconWrapper: {
98
+ display: "flex",
99
+ alignItems: "center",
100
+ justifyContent: "center",
101
+ width: "16px",
102
+ height: "16px",
103
+ flexShrink: 0
104
+ },
105
+ buttonBase: {
106
+ display: "flex",
107
+ alignItems: "center",
108
+ justifyContent: "center",
109
+ gap: "8px",
110
+ height: "32px",
111
+ minHeight: "32px",
112
+ padding: "0 16px",
113
+ borderRadius: "99px",
114
+ border: "none",
115
+ cursor: "pointer",
116
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
117
+ fontSize: "13px",
118
+ fontWeight: "600",
119
+ lineHeight: "1.5",
120
+ whiteSpace: "nowrap",
121
+ flexShrink: 0,
122
+ transition: "background-color 0.15s ease-in-out, opacity 0.15s ease-in-out"
123
+ },
124
+ buttonPrimary: {
125
+ backgroundColor: "#0e8a0e",
126
+ color: "#ffffff"
127
+ },
128
+ buttonPrimaryHover: {
129
+ backgroundColor: "#0a6b0a"
130
+ },
131
+ buttonTertiary: {
132
+ backgroundColor: "#efefef",
133
+ color: "#2f2f2f"
134
+ },
135
+ buttonTertiaryHover: {
136
+ backgroundColor: "#e5e5e5"
137
+ },
138
+ buttonIconWrapper: {
139
+ display: "flex",
140
+ alignItems: "center",
141
+ justifyContent: "center",
142
+ width: "16px",
143
+ height: "16px",
144
+ flexShrink: 0
145
+ }
146
+ };
147
+ var SubSectionHeading = React.forwardRef(
148
+ ({
149
+ title,
150
+ icon = false,
151
+ button,
152
+ buttonText = "Button Text",
153
+ buttonIcon,
154
+ onButtonClick,
155
+ className,
156
+ style,
157
+ ...props
158
+ }, ref) => {
159
+ const [isButtonHovered, setIsButtonHovered] = React.useState(false);
160
+ const containerStyle = {
161
+ ...subSectionHeadingStyles.container,
162
+ ...button ? subSectionHeadingStyles.containerWithButton : subSectionHeadingStyles.containerNoButton,
163
+ ...style
164
+ };
165
+ const getButtonStyle = () => {
166
+ const baseStyle = { ...subSectionHeadingStyles.buttonBase };
167
+ if (button === "primary") {
168
+ return {
169
+ ...baseStyle,
170
+ ...subSectionHeadingStyles.buttonPrimary,
171
+ ...isButtonHovered && subSectionHeadingStyles.buttonPrimaryHover
172
+ };
173
+ }
174
+ if (button === "tertiary") {
175
+ return {
176
+ ...baseStyle,
177
+ ...subSectionHeadingStyles.buttonTertiary,
178
+ ...isButtonHovered && subSectionHeadingStyles.buttonTertiaryHover
179
+ };
180
+ }
181
+ return baseStyle;
182
+ };
183
+ const renderButtonIcon = () => {
184
+ if (buttonIcon) {
185
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: subSectionHeadingStyles.buttonIconWrapper, children: buttonIcon });
186
+ }
187
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: subSectionHeadingStyles.buttonIconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PlusIcon, { color: button === "primary" ? "#ffffff" : "#2f2f2f" }) });
188
+ };
189
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
190
+ "div",
191
+ {
192
+ ref,
193
+ className: (0, import_clsx.clsx)("arbor-sub-section-heading", className),
194
+ style: containerStyle,
195
+ ...props,
196
+ children: [
197
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: subSectionHeadingStyles.textContainer, children: [
198
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: subSectionHeadingStyles.title, children: title }),
199
+ icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: subSectionHeadingStyles.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoIcon, {}) })
200
+ ] }),
201
+ button && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
202
+ "button",
203
+ {
204
+ type: "button",
205
+ style: getButtonStyle(),
206
+ onClick: onButtonClick,
207
+ onMouseEnter: () => setIsButtonHovered(true),
208
+ onMouseLeave: () => setIsButtonHovered(false),
209
+ children: [
210
+ renderButtonIcon(),
211
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: buttonText })
212
+ ]
213
+ }
214
+ )
215
+ ]
216
+ }
217
+ );
218
+ }
219
+ );
220
+ SubSectionHeading.displayName = "SubSectionHeading";
221
+ // Annotate the CommonJS export names for ESM import in node:
222
+ 0 && (module.exports = {
223
+ SubSectionHeading
224
+ });
225
+ //# sourceMappingURL=SubSectionHeading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SubSectionHeading/index.ts","../src/SubSectionHeading/SubSectionHeading.tsx"],"sourcesContent":["export { SubSectionHeading } from './SubSectionHeading';\nexport type { SubSectionHeadingProps } from './SubSectionHeading';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface SubSectionHeadingProps {\n /**\n * The heading text (required)\n */\n title: string;\n /**\n * Show an info icon next to the heading text\n * @default false\n */\n icon?: boolean;\n /**\n * Button variant to display on the right\n * - 'primary': Green button with white text\n * - 'tertiary': Gray button with dark text\n * - undefined: No button\n */\n button?: 'primary' | 'tertiary';\n /**\n * Text to display in the button (required if button is specified)\n */\n buttonText?: string;\n /**\n * Icon to display in the button (renders before button text)\n */\n buttonIcon?: React.ReactNode;\n /**\n * Click handler for the button\n */\n onButtonClick?: () => void;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Info icon (circle with i)\nconst InfoIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"8\" cy=\"8\" r=\"6.5\" stroke=\"#2f2f2f\" strokeWidth=\"1.2\" />\n <path\n d=\"M8 7V11\"\n stroke=\"#2f2f2f\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n />\n <circle cx=\"8\" cy=\"5\" r=\"0.75\" fill=\"#2f2f2f\" />\n </svg>\n);\n\n// Default plus icon for buttons\nconst PlusIcon = ({ color = '#2f2f2f' }: { color?: string }) => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8 3V13M3 8H13\"\n stroke={color}\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// Arbor Design System sub-section heading styles\nconst subSectionHeadingStyles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n borderBottom: '1px solid #efefef',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n boxSizing: 'border-box' as const,\n },\n containerNoButton: {\n padding: '12px 8px',\n gap: '0px',\n },\n containerWithButton: {\n padding: '8px',\n gap: '12px',\n justifyContent: 'space-between',\n },\n textContainer: {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n flex: 1,\n minHeight: '16px',\n },\n title: {\n fontSize: '18px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.25',\n margin: 0,\n whiteSpace: 'nowrap' 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 buttonBase: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: '8px',\n height: '32px',\n minHeight: '32px',\n padding: '0 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 whiteSpace: 'nowrap' as const,\n flexShrink: 0,\n transition: 'background-color 0.15s ease-in-out, opacity 0.15s ease-in-out',\n },\n buttonPrimary: {\n backgroundColor: '#0e8a0e',\n color: '#ffffff',\n },\n buttonPrimaryHover: {\n backgroundColor: '#0a6b0a',\n },\n buttonTertiary: {\n backgroundColor: '#efefef',\n color: '#2f2f2f',\n },\n buttonTertiaryHover: {\n backgroundColor: '#e5e5e5',\n },\n buttonIconWrapper: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '16px',\n height: '16px',\n flexShrink: 0,\n },\n};\n\n/**\n * SubSectionHeading component - Arbor Design System\n *\n * A sub-section heading component for dividing content within sections.\n * Supports optional icon next to text and optional button on the right.\n *\n * @example\n * ```tsx\n * // Basic sub-section heading\n * <SubSectionHeading title=\"Details\" />\n *\n * // With info icon\n * <SubSectionHeading title=\"Details\" icon />\n *\n * // With primary button\n * <SubSectionHeading\n * title=\"Items\"\n * button=\"primary\"\n * buttonText=\"Add Item\"\n * onButtonClick={() => handleAdd()}\n * />\n *\n * // With tertiary button and icon\n * <SubSectionHeading\n * title=\"Settings\"\n * icon\n * button=\"tertiary\"\n * buttonText=\"Configure\"\n * onButtonClick={() => handleConfigure()}\n * />\n * ```\n */\nexport const SubSectionHeading = React.forwardRef<HTMLDivElement, SubSectionHeadingProps>(\n (\n {\n title,\n icon = false,\n button,\n buttonText = 'Button Text',\n buttonIcon,\n onButtonClick,\n className,\n style,\n ...props\n },\n ref\n ) => {\n const [isButtonHovered, setIsButtonHovered] = React.useState(false);\n\n const containerStyle: React.CSSProperties = {\n ...subSectionHeadingStyles.container,\n ...(button\n ? subSectionHeadingStyles.containerWithButton\n : subSectionHeadingStyles.containerNoButton),\n ...style,\n };\n\n const getButtonStyle = (): React.CSSProperties => {\n const baseStyle = { ...subSectionHeadingStyles.buttonBase };\n\n if (button === 'primary') {\n return {\n ...baseStyle,\n ...subSectionHeadingStyles.buttonPrimary,\n ...(isButtonHovered && subSectionHeadingStyles.buttonPrimaryHover),\n };\n }\n\n if (button === 'tertiary') {\n return {\n ...baseStyle,\n ...subSectionHeadingStyles.buttonTertiary,\n ...(isButtonHovered && subSectionHeadingStyles.buttonTertiaryHover),\n };\n }\n\n return baseStyle;\n };\n\n const renderButtonIcon = () => {\n if (buttonIcon) {\n return (\n <span style={subSectionHeadingStyles.buttonIconWrapper}>{buttonIcon}</span>\n );\n }\n // Default icon based on button type\n return (\n <span style={subSectionHeadingStyles.buttonIconWrapper}>\n <PlusIcon color={button === 'primary' ? '#ffffff' : '#2f2f2f'} />\n </span>\n );\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-sub-section-heading', className)}\n style={containerStyle}\n {...props}\n >\n <div style={subSectionHeadingStyles.textContainer}>\n <h3 style={subSectionHeadingStyles.title}>{title}</h3>\n {icon && (\n <span style={subSectionHeadingStyles.iconWrapper}>\n <InfoIcon />\n </span>\n )}\n </div>\n {button && (\n <button\n type=\"button\"\n style={getButtonStyle()}\n onClick={onButtonClick}\n onMouseEnter={() => setIsButtonHovered(true)}\n onMouseLeave={() => setIsButtonHovered(false)}\n >\n {renderButtonIcon()}\n <span>{buttonText}</span>\n </button>\n )}\n </div>\n );\n }\n);\n\nSubSectionHeading.displayName = 'SubSectionHeading';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AA2CnB;AADF,IAAM,WAAW,MACf,6CAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE;AAAA,8CAAC,YAAO,IAAG,KAAI,IAAG,KAAI,GAAE,OAAM,QAAO,WAAU,aAAY,OAAM;AAAA,EACjE;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA;AAAA,EAChB;AAAA,EACA,4CAAC,YAAO,IA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Y;AACd,eACE,4CAAC,UAAK,OAAO,wBAAwB,mBAAoB,sBAAW;AAAA,MAExE;AAEA,aACE,4CAAC,UAAK,OAAO,wBAAwB,mBACnC,sDAAC,YAAS,OAAO,WAAW,YAAY,YAAY,WAAW,GACjE;AAAA,IAEJ;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAK,6BAA6B,SAAS;AAAA,QACtD,OAAO;AAAA,QACN,GAAG;AAAA,QAEJ;AAAA,uDAAC,SAAI,OAAO,wBAAwB,eAClC;AAAA,wDAAC,QAAG,OAAO,wBAAwB,OAAQ,iBAAM;AAAA,YAChD,QACC,4CAAC,UAAK,OAAO,wBAAwB,aACnC,sDAAC,YAAS,GACZ;AAAA,aAEJ;AAAA,UACC,UACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAO,eAAe;AAAA,cACtB,SAAS;AAAA,cACT,cAAc,MAAM,mBAAmB,IAAI;AAAA,cAC3C,cAAc,MAAM,mBAAmB,KAAK;AAAA,cAE3C;AAAA,iCAAiB;AAAA,gBAClB,4CAAC,UAAM,sBAAW;AAAA;AAAA;AAAA,UACpB;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ SubSectionHeading
3
+ } from "./chunk-ALLCJATI.mjs";
4
+ export {
5
+ SubSectionHeading
6
+ };
7
+ //# sourceMappingURL=SubSectionHeading.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+
3
+ interface SubSectionInteractiveProps {
4
+ /**
5
+ * The heading text (required)
6
+ */
7
+ title: string;
8
+ /**
9
+ * Content to display when expanded (list rows, etc.)
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Whether the section is expanded (controlled mode)
14
+ */
15
+ expanded?: boolean;
16
+ /**
17
+ * Default expanded state (uncontrolled mode)
18
+ * @default true
19
+ */
20
+ defaultExpanded?: boolean;
21
+ /**
22
+ * Callback when expanded state changes
23
+ */
24
+ onExpandedChange?: (expanded: boolean) => void;
25
+ /**
26
+ * Additional CSS class name
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Additional inline styles
31
+ */
32
+ style?: React.CSSProperties;
33
+ }
34
+ /**
35
+ * SubSectionInteractive component - Arbor Design System
36
+ *
37
+ * A collapsible sub-section component that can contain list rows and other content.
38
+ * Click the header to expand/collapse the content area.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * // Basic collapsible section
43
+ * <SubSectionInteractive title="Personal Details">
44
+ * <ListRow label="Name" value="John Smith" />
45
+ * <ListRow label="Email" value="john@example.com" />
46
+ * </SubSectionInteractive>
47
+ *
48
+ * // Initially collapsed
49
+ * <SubSectionInteractive title="Additional Info" defaultExpanded={false}>
50
+ * <ListRow label="Notes" value="Some notes here" />
51
+ * </SubSectionInteractive>
52
+ *
53
+ * // Controlled mode
54
+ * <SubSectionInteractive
55
+ * title="Settings"
56
+ * expanded={isExpanded}
57
+ * onExpandedChange={setIsExpanded}
58
+ * >
59
+ * <ListRow label="Theme" value="Dark" />
60
+ * </SubSectionInteractive>
61
+ * ```
62
+ */
63
+ declare const SubSectionInteractive: React.ForwardRefExoticComponent<SubSectionInteractiveProps & React.RefAttributes<HTMLDivElement>>;
64
+
65
+ export { SubSectionInteractive, type SubSectionInteractiveProps };
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+
3
+ interface SubSectionInteractiveProps {
4
+ /**
5
+ * The heading text (required)
6
+ */
7
+ title: string;
8
+ /**
9
+ * Content to display when expanded (list rows, etc.)
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Whether the section is expanded (controlled mode)
14
+ */
15
+ expanded?: boolean;
16
+ /**
17
+ * Default expanded state (uncontrolled mode)
18
+ * @default true
19
+ */
20
+ defaultExpanded?: boolean;
21
+ /**
22
+ * Callback when expanded state changes
23
+ */
24
+ onExpandedChange?: (expanded: boolean) => void;
25
+ /**
26
+ * Additional CSS class name
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Additional inline styles
31
+ */
32
+ style?: React.CSSProperties;
33
+ }
34
+ /**
35
+ * SubSectionInteractive component - Arbor Design System
36
+ *
37
+ * A collapsible sub-section component that can contain list rows and other content.
38
+ * Click the header to expand/collapse the content area.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * // Basic collapsible section
43
+ * <SubSectionInteractive title="Personal Details">
44
+ * <ListRow label="Name" value="John Smith" />
45
+ * <ListRow label="Email" value="john@example.com" />
46
+ * </SubSectionInteractive>
47
+ *
48
+ * // Initially collapsed
49
+ * <SubSectionInteractive title="Additional Info" defaultExpanded={false}>
50
+ * <ListRow label="Notes" value="Some notes here" />
51
+ * </SubSectionInteractive>
52
+ *
53
+ * // Controlled mode
54
+ * <SubSectionInteractive
55
+ * title="Settings"
56
+ * expanded={isExpanded}
57
+ * onExpandedChange={setIsExpanded}
58
+ * >
59
+ * <ListRow label="Theme" value="Dark" />
60
+ * </SubSectionInteractive>
61
+ * ```
62
+ */
63
+ declare const SubSectionInteractive: React.ForwardRefExoticComponent<SubSectionInteractiveProps & React.RefAttributes<HTMLDivElement>>;
64
+
65
+ export { SubSectionInteractive, type SubSectionInteractiveProps };
@@ -0,0 +1,211 @@
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/SubSectionInteractive/index.ts
31
+ var SubSectionInteractive_exports = {};
32
+ __export(SubSectionInteractive_exports, {
33
+ SubSectionInteractive: () => SubSectionInteractive
34
+ });
35
+ module.exports = __toCommonJS(SubSectionInteractive_exports);
36
+
37
+ // src/SubSectionInteractive/SubSectionInteractive.tsx
38
+ var React = __toESM(require("react"));
39
+ var import_clsx = require("clsx");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var ChevronIcon = ({ expanded }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ "svg",
43
+ {
44
+ width: "16",
45
+ height: "16",
46
+ viewBox: "0 0 16 16",
47
+ fill: "none",
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ style: {
50
+ transform: expanded ? "rotate(0deg)" : "rotate(180deg)",
51
+ transition: "transform 0.2s ease-in-out"
52
+ },
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ "path",
55
+ {
56
+ d: "M4 6L8 10L12 6",
57
+ stroke: "#2f2f2f",
58
+ strokeWidth: "1.2",
59
+ strokeLinecap: "round",
60
+ strokeLinejoin: "round"
61
+ }
62
+ )
63
+ }
64
+ );
65
+ var subSectionInteractiveStyles = {
66
+ container: {
67
+ display: "flex",
68
+ flexDirection: "column",
69
+ width: "100%",
70
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
71
+ boxSizing: "border-box"
72
+ },
73
+ header: {
74
+ display: "flex",
75
+ alignItems: "center",
76
+ width: "100%",
77
+ cursor: "pointer",
78
+ border: "none",
79
+ background: "transparent",
80
+ padding: 0,
81
+ margin: 0,
82
+ textAlign: "left",
83
+ outline: "none"
84
+ },
85
+ headerContent: {
86
+ display: "flex",
87
+ alignItems: "center",
88
+ justifyContent: "space-between",
89
+ width: "100%",
90
+ padding: "12px 8px",
91
+ borderRadius: "8px",
92
+ transition: "background-color 0.15s ease-in-out",
93
+ minHeight: "16px",
94
+ gap: "12px"
95
+ },
96
+ headerContentHover: {
97
+ backgroundColor: "#f8f8f8"
98
+ },
99
+ headerContentFocus: {
100
+ outline: "3px solid #3cad51",
101
+ outlineOffset: "-3px"
102
+ },
103
+ title: {
104
+ fontSize: "18px",
105
+ fontWeight: "600",
106
+ color: "#2f2f2f",
107
+ lineHeight: "1.25",
108
+ margin: 0,
109
+ flex: 1,
110
+ whiteSpace: "nowrap"
111
+ },
112
+ iconWrapper: {
113
+ display: "flex",
114
+ alignItems: "center",
115
+ justifyContent: "center",
116
+ width: "16px",
117
+ height: "16px",
118
+ flexShrink: 0
119
+ },
120
+ content: {
121
+ overflow: "hidden",
122
+ transition: "max-height 0.3s ease-in-out, opacity 0.2s ease-in-out"
123
+ },
124
+ contentExpanded: {
125
+ maxHeight: "2000px",
126
+ opacity: 1
127
+ },
128
+ contentCollapsed: {
129
+ maxHeight: "0px",
130
+ opacity: 0
131
+ },
132
+ contentInner: {
133
+ borderBottom: "1px solid #f8f8f8"
134
+ }
135
+ };
136
+ var SubSectionInteractive = React.forwardRef(
137
+ ({
138
+ title,
139
+ children,
140
+ expanded: controlledExpanded,
141
+ defaultExpanded = true,
142
+ onExpandedChange,
143
+ className,
144
+ style,
145
+ ...props
146
+ }, ref) => {
147
+ const [internalExpanded, setInternalExpanded] = React.useState(defaultExpanded);
148
+ const isControlled = controlledExpanded !== void 0;
149
+ const isExpanded = isControlled ? controlledExpanded : internalExpanded;
150
+ const [isHovered, setIsHovered] = React.useState(false);
151
+ const [isFocused, setIsFocused] = React.useState(false);
152
+ const handleToggle = () => {
153
+ const newExpanded = !isExpanded;
154
+ if (!isControlled) {
155
+ setInternalExpanded(newExpanded);
156
+ }
157
+ onExpandedChange?.(newExpanded);
158
+ };
159
+ const handleKeyDown = (event) => {
160
+ if (event.key === "Enter" || event.key === " ") {
161
+ event.preventDefault();
162
+ handleToggle();
163
+ }
164
+ };
165
+ const headerContentStyle = {
166
+ ...subSectionInteractiveStyles.headerContent,
167
+ ...isHovered && subSectionInteractiveStyles.headerContentHover,
168
+ ...isFocused && subSectionInteractiveStyles.headerContentFocus
169
+ };
170
+ const contentStyle = {
171
+ ...subSectionInteractiveStyles.content,
172
+ ...isExpanded ? subSectionInteractiveStyles.contentExpanded : subSectionInteractiveStyles.contentCollapsed
173
+ };
174
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
175
+ "div",
176
+ {
177
+ ref,
178
+ className: (0, import_clsx.clsx)("arbor-sub-section-interactive", className),
179
+ style: { ...subSectionInteractiveStyles.container, ...style },
180
+ ...props,
181
+ children: [
182
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
183
+ "button",
184
+ {
185
+ type: "button",
186
+ style: subSectionInteractiveStyles.header,
187
+ onClick: handleToggle,
188
+ onMouseEnter: () => setIsHovered(true),
189
+ onMouseLeave: () => setIsHovered(false),
190
+ onFocus: () => setIsFocused(true),
191
+ onBlur: () => setIsFocused(false),
192
+ onKeyDown: handleKeyDown,
193
+ "aria-expanded": isExpanded,
194
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: headerContentStyle, children: [
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { style: subSectionInteractiveStyles.title, children: title }),
196
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: subSectionInteractiveStyles.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronIcon, { expanded: isExpanded }) })
197
+ ] })
198
+ }
199
+ ),
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: contentStyle, "aria-hidden": !isExpanded, children: children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: subSectionInteractiveStyles.contentInner, children }) })
201
+ ]
202
+ }
203
+ );
204
+ }
205
+ );
206
+ SubSectionInteractive.displayName = "SubSectionInteractive";
207
+ // Annotate the CommonJS export names for ESM import in node:
208
+ 0 && (module.exports = {
209
+ SubSectionInteractive
210
+ });
211
+ //# sourceMappingURL=SubSectionInteractive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SubSectionInteractive/index.ts","../src/SubSectionInteractive/SubSectionInteractive.tsx"],"sourcesContent":["export { SubSectionInteractive } from './SubSectionInteractive';\nexport type { SubSectionInteractiveProps } from './SubSectionInteractive';\n","import * as React from 'react';\nimport { clsx } from 'clsx';\n\nexport interface SubSectionInteractiveProps {\n /**\n * The heading text (required)\n */\n title: string;\n /**\n * Content to display when expanded (list rows, etc.)\n */\n children?: React.ReactNode;\n /**\n * Whether the section is expanded (controlled mode)\n */\n expanded?: boolean;\n /**\n * Default expanded state (uncontrolled mode)\n * @default true\n */\n defaultExpanded?: boolean;\n /**\n * Callback when expanded state changes\n */\n onExpandedChange?: (expanded: boolean) => void;\n /**\n * Additional CSS class name\n */\n className?: string;\n /**\n * Additional inline styles\n */\n style?: React.CSSProperties;\n}\n\n// Chevron icon - rotates based on expanded state\nconst ChevronIcon = ({ expanded }: { expanded: boolean }) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{\n transform: expanded ? 'rotate(0deg)' : 'rotate(180deg)',\n transition: 'transform 0.2s ease-in-out',\n }}\n >\n <path\n d=\"M4 6L8 10L12 6\"\n stroke=\"#2f2f2f\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// Arbor Design System sub-section interactive styles\nconst subSectionInteractiveStyles = {\n container: {\n display: 'flex',\n flexDirection: 'column' as const,\n width: '100%',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n boxSizing: 'border-box' as const,\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n cursor: 'pointer',\n border: 'none',\n background: 'transparent',\n padding: 0,\n margin: 0,\n textAlign: 'left' as const,\n outline: 'none',\n },\n headerContent: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n padding: '12px 8px',\n borderRadius: '8px',\n transition: 'background-color 0.15s ease-in-out',\n minHeight: '16px',\n gap: '12px',\n },\n headerContentHover: {\n backgroundColor: '#f8f8f8',\n },\n headerContentFocus: {\n outline: '3px solid #3cad51',\n outlineOffset: '-3px',\n },\n title: {\n fontSize: '18px',\n fontWeight: '600',\n color: '#2f2f2f',\n lineHeight: '1.25',\n margin: 0,\n flex: 1,\n whiteSpace: 'nowrap' 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 content: {\n overflow: 'hidden',\n transition: 'max-height 0.3s ease-in-out, opacity 0.2s ease-in-out',\n },\n contentExpanded: {\n maxHeight: '2000px',\n opacity: 1,\n },\n contentCollapsed: {\n maxHeight: '0px',\n opacity: 0,\n },\n contentInner: {\n borderBottom: '1px solid #f8f8f8',\n },\n};\n\n/**\n * SubSectionInteractive component - Arbor Design System\n *\n * A collapsible sub-section component that can contain list rows and other content.\n * Click the header to expand/collapse the content area.\n *\n * @example\n * ```tsx\n * // Basic collapsible section\n * <SubSectionInteractive title=\"Personal Details\">\n * <ListRow label=\"Name\" value=\"John Smith\" />\n * <ListRow label=\"Email\" value=\"john@example.com\" />\n * </SubSectionInteractive>\n *\n * // Initially collapsed\n * <SubSectionInteractive title=\"Additional Info\" defaultExpanded={false}>\n * <ListRow label=\"Notes\" value=\"Some notes here\" />\n * </SubSectionInteractive>\n *\n * // Controlled mode\n * <SubSectionInteractive\n * title=\"Settings\"\n * expanded={isExpanded}\n * onExpandedChange={setIsExpanded}\n * >\n * <ListRow label=\"Theme\" value=\"Dark\" />\n * </SubSectionInteractive>\n * ```\n */\nexport const SubSectionInteractive = React.forwardRef<HTMLDivElement, SubSectionInteractiveProps>(\n (\n {\n title,\n children,\n expanded: controlledExpanded,\n defaultExpanded = true,\n onExpandedChange,\n className,\n style,\n ...props\n },\n ref\n ) => {\n // Support both controlled and uncontrolled modes\n const [internalExpanded, setInternalExpanded] = React.useState(defaultExpanded);\n const isControlled = controlledExpanded !== undefined;\n const isExpanded = isControlled ? controlledExpanded : internalExpanded;\n\n const [isHovered, setIsHovered] = React.useState(false);\n const [isFocused, setIsFocused] = React.useState(false);\n\n const handleToggle = () => {\n const newExpanded = !isExpanded;\n if (!isControlled) {\n setInternalExpanded(newExpanded);\n }\n onExpandedChange?.(newExpanded);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleToggle();\n }\n };\n\n const headerContentStyle: React.CSSProperties = {\n ...subSectionInteractiveStyles.headerContent,\n ...(isHovered && subSectionInteractiveStyles.headerContentHover),\n ...(isFocused && subSectionInteractiveStyles.headerContentFocus),\n };\n\n const contentStyle: React.CSSProperties = {\n ...subSectionInteractiveStyles.content,\n ...(isExpanded\n ? subSectionInteractiveStyles.contentExpanded\n : subSectionInteractiveStyles.contentCollapsed),\n };\n\n return (\n <div\n ref={ref}\n className={clsx('arbor-sub-section-interactive', className)}\n style={{ ...subSectionInteractiveStyles.container, ...style }}\n {...props}\n >\n <button\n type=\"button\"\n style={subSectionInteractiveStyles.header}\n onClick={handleToggle}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n onKeyDown={handleKeyDown}\n aria-expanded={isExpanded}\n >\n <div style={headerContentStyle}>\n <h3 style={subSectionInteractiveStyles.title}>{title}</h3>\n <span style={subSectionInteractiveStyles.iconWrapper}>\n <ChevronIcon expanded={isExpanded} />\n </span>\n </div>\n </button>\n <div style={contentStyle} aria-hidden={!isExpanded}>\n {children && (\n <div style={subSectionInteractiveStyles.contentInner}>{children}</div>\n )}\n </div>\n </div>\n );\n }\n);\n\nSubSectionInteractive.displayName = 'SubSectionInteractive';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAqB;AA+CjB;AAZJ,IAAM,cAAc,CAAC,EAAE,SAAS,MAC9B;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IACN,OAAO;AAAA,MACL,WAAW,WAAW,iBAAiB;AAAA,MACvC,YAAY;AAAA,IACd;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,GAAE;AAAA,QACF,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA;AAAA,IACjB;AAAA;AACF;AAIF,IAAM,8BAA8B;AAAA,EAClC,WAAW;AAAA,IACT,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,SAAS;AAAA,EACX;AAAA,EACA,eAAe;AAAA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;AACF;AAEA,sBAAsB,cAAc;","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ SubSectionInteractive
3
+ } from "./chunk-X2CW5GF3.mjs";
4
+ export {
5
+ SubSectionInteractive
6
+ };
7
+ //# sourceMappingURL=SubSectionInteractive.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}