@designa8/vibedesign-superhuman-internal-v1-2-176b 0.0.1 → 0.0.3
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/README.md +1 -1
- package/dist/index.cjs +95 -11
- package/dist/index.js +102 -18
- package/dist/styles.css +15 -0
- package/package.json +1 -1
- package/src/atoms/Icon/icons.data.ts +47 -0
- package/src/atoms/SidebarDesktop/SidebarDesktop.tsx +66 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-superhuman-internal-v1-2-176b
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.0.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.0.3**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -192,7 +192,54 @@ var ICON_REGISTRY = {
|
|
|
192
192
|
"send": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }, { tag: "path", d: "m21.854 2.147-10.94 10.939" }] },
|
|
193
193
|
"funnel": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }] },
|
|
194
194
|
"bell": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.268 21a2 2 0 0 0 3.464 0" }, { tag: "path", d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }] },
|
|
195
|
-
"message-circle": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }] }
|
|
195
|
+
"message-circle": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }] },
|
|
196
|
+
"archive": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }, { tag: "path", d: "M10 12h4" }] },
|
|
197
|
+
"archive-restore": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M20 8v11a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "m9 15 3-3 3 3" }, { tag: "path", d: "M12 12v9" }] },
|
|
198
|
+
"inbox": { viewBox: "0 0 24 24", nodes: [{ tag: "polyline", points: "22 12 16 12 14 15 10 15 8 12 2 12" }, { tag: "path", d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }] },
|
|
199
|
+
"clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "polyline", points: "12 6 12 12 16 14" }] },
|
|
200
|
+
"alarm-clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "13", r: "8" }, { tag: "path", d: "M12 9v4l2 2" }, { tag: "path", d: "M5 3 2 6" }, { tag: "path", d: "m22 6-3-3" }, { tag: "path", d: "M6.38 18.7 4 21" }, { tag: "path", d: "M17.64 18.67 20 21" }] },
|
|
201
|
+
"pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
|
|
202
|
+
"square-pen": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }, { tag: "path", d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }] },
|
|
203
|
+
"reply": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 18v-2a4 4 0 0 0-4-4H4" }, { tag: "path", d: "m9 17-5-5 5-5" }] },
|
|
204
|
+
"reply-all": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M22 18v-2a4 4 0 0 0-4-4H7" }, { tag: "path", d: "m7 17-5-5 5-5" }, { tag: "path", d: "m12 17-5-5 5-5" }] },
|
|
205
|
+
"forward": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 17 5-5-5-5" }, { tag: "path", d: "M4 18v-2a4 4 0 0 1 4-4h12" }] },
|
|
206
|
+
"tag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, { tag: "circle", cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }] },
|
|
207
|
+
"paperclip": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }] },
|
|
208
|
+
"users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
|
|
209
|
+
"user-plus": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "line", x1: "19", x2: "19", y1: "8", y2: "14" }, { tag: "line", x1: "22", x2: "16", y1: "11", y2: "11" }] },
|
|
210
|
+
"user-round-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M2 21a8 8 0 0 1 13.292-6" }, { tag: "circle", cx: "10", cy: "8", r: "5" }, { tag: "path", d: "m16 19 2 2 4-4" }] },
|
|
211
|
+
"contact": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 2v2" }, { tag: "path", d: "M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" }, { tag: "path", d: "M8 2v2" }, { tag: "circle", cx: "12", cy: "11", r: "3" }, { tag: "rect", x: "3", y: "4", width: "18", height: "18", rx: "2" }] },
|
|
212
|
+
"sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
|
|
213
|
+
"moon": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }] },
|
|
214
|
+
"circle-check": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
215
|
+
"badge-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
216
|
+
"file": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }] },
|
|
217
|
+
"file-text": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }, { tag: "path", d: "M10 9H8" }, { tag: "path", d: "M16 13H8" }, { tag: "path", d: "M16 17H8" }] },
|
|
218
|
+
"log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
|
|
219
|
+
"keyboard": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 8h.01" }, { tag: "path", d: "M12 12h.01" }, { tag: "path", d: "M14 8h.01" }, { tag: "path", d: "M16 12h.01" }, { tag: "path", d: "M18 8h.01" }, { tag: "path", d: "M6 8h.01" }, { tag: "path", d: "M7 16h10" }, { tag: "path", d: "M8 12h.01" }, { tag: "rect", width: "20", height: "16", x: "2", y: "4", rx: "2" }] },
|
|
220
|
+
"command": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" }] },
|
|
221
|
+
"link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { tag: "path", d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }] },
|
|
222
|
+
"external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] },
|
|
223
|
+
"square-arrow-out-up-right": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" }, { tag: "path", d: "m21 3-9 9" }, { tag: "path", d: "M15 3h6v6" }] },
|
|
224
|
+
"at-sign": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" }] },
|
|
225
|
+
"trending-up": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 7h6v6" }, { tag: "path", d: "m22 7-8.5 8.5-5-5L2 17" }] },
|
|
226
|
+
"trending-down": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 17h6v-6" }, { tag: "path", d: "m22 17-8.5-8.5-5 5L2 7" }] },
|
|
227
|
+
"mail-open": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" }, { tag: "path", d: "m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" }] },
|
|
228
|
+
"globe": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }, { tag: "path", d: "M2 12h20" }] },
|
|
229
|
+
"lock": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }, { tag: "path", d: "M7 11V7a5 5 0 0 1 10 0v4" }] },
|
|
230
|
+
"arrow-left": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m12 19-7-7 7-7" }, { tag: "path", d: "M19 12H5" }] },
|
|
231
|
+
"bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
|
|
232
|
+
"flag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }, { tag: "line", x1: "4", x2: "4", y1: "22", y2: "15" }] },
|
|
233
|
+
"eye-off": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, { tag: "path", d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, { tag: "path", d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, { tag: "path", d: "m2 2 20 20" }] },
|
|
234
|
+
"eye-closed": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 18-.722-3.25" }, { tag: "path", d: "M2 8a10.645 10.645 0 0 0 20 0" }, { tag: "path", d: "m20 15-1.726-2.05" }, { tag: "path", d: "m4 15 1.726-2.05" }, { tag: "path", d: "m9 18 .722-3.25" }] },
|
|
235
|
+
"pin": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 17v5" }, { tag: "path", d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }] },
|
|
236
|
+
"sliders-horizontal": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "21", x2: "14", y1: "4", y2: "4" }, { tag: "line", x1: "10", x2: "3", y1: "4", y2: "4" }, { tag: "line", x1: "21", x2: "12", y1: "12", y2: "12" }, { tag: "line", x1: "8", x2: "3", y1: "12", y2: "12" }, { tag: "line", x1: "21", x2: "16", y1: "20", y2: "20" }, { tag: "line", x1: "12", x2: "3", y1: "20", y2: "20" }, { tag: "line", x1: "14", x2: "14", y1: "2", y2: "6" }, { tag: "line", x1: "8", x2: "8", y1: "10", y2: "14" }, { tag: "line", x1: "16", x2: "16", y1: "18", y2: "22" }] },
|
|
237
|
+
"list": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12h.01" }, { tag: "path", d: "M3 18h.01" }, { tag: "path", d: "M3 6h.01" }, { tag: "path", d: "M8 12h13" }, { tag: "path", d: "M8 18h13" }, { tag: "path", d: "M8 6h13" }] },
|
|
238
|
+
"timer": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "10", x2: "14", y1: "2", y2: "2" }, { tag: "line", x1: "12", x2: "15", y1: "14", y2: "11" }, { tag: "circle", cx: "12", cy: "14", r: "8" }] },
|
|
239
|
+
"undo-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M9 14 4 9l5-5" }, { tag: "path", d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }] },
|
|
240
|
+
"shield-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
241
|
+
"briefcase": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }, { tag: "rect", width: "20", height: "14", x: "2", y: "6", rx: "2" }] },
|
|
242
|
+
"building-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }, { tag: "path", d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "M10 6h4" }, { tag: "path", d: "M10 10h4" }, { tag: "path", d: "M10 14h4" }, { tag: "path", d: "M10 18h4" }] }
|
|
196
243
|
};
|
|
197
244
|
|
|
198
245
|
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
@@ -7007,7 +7054,7 @@ var defaultSidebarGroups = [
|
|
|
7007
7054
|
]
|
|
7008
7055
|
}
|
|
7009
7056
|
];
|
|
7010
|
-
var rowBase2 = "flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
7057
|
+
var rowBase2 = "relative flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
7011
7058
|
function NavGroup({
|
|
7012
7059
|
group,
|
|
7013
7060
|
folded,
|
|
@@ -7021,6 +7068,7 @@ function NavGroup({
|
|
|
7021
7068
|
const list = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
7022
7069
|
group.items.map((item) => {
|
|
7023
7070
|
const isActive = item.href === activeHref;
|
|
7071
|
+
const hasBadge = item.badge !== void 0 && item.badge !== null && item.badge !== "";
|
|
7024
7072
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7025
7073
|
"a",
|
|
7026
7074
|
{
|
|
@@ -7043,7 +7091,24 @@ function NavGroup({
|
|
|
7043
7091
|
className: cn60("shrink-0", isActive ? "text-on-primary-soft" : "text-body")
|
|
7044
7092
|
}
|
|
7045
7093
|
),
|
|
7046
|
-
folded ? null : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "truncate", children: item.label })
|
|
7094
|
+
folded ? null : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "truncate", children: item.label }),
|
|
7095
|
+
hasBadge ? folded ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7096
|
+
"span",
|
|
7097
|
+
{
|
|
7098
|
+
"aria-hidden": "true",
|
|
7099
|
+
className: "absolute right-xs top-xs h-xxs w-xxs rounded-full bg-primary"
|
|
7100
|
+
}
|
|
7101
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7102
|
+
"span",
|
|
7103
|
+
{
|
|
7104
|
+
className: cn60(
|
|
7105
|
+
"ml-auto shrink-0 pl-xs text-body-sm tabular-nums",
|
|
7106
|
+
isActive ? "text-on-primary-soft" : "text-muted"
|
|
7107
|
+
),
|
|
7108
|
+
children: item.badge
|
|
7109
|
+
}
|
|
7110
|
+
) : null,
|
|
7111
|
+
folded && hasBadge ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "sr-only", children: item.badge }) : null
|
|
7047
7112
|
]
|
|
7048
7113
|
},
|
|
7049
7114
|
item.href
|
|
@@ -7121,6 +7186,8 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
7121
7186
|
user = { name: "Avery Park" },
|
|
7122
7187
|
onHelp,
|
|
7123
7188
|
onSettings,
|
|
7189
|
+
onUserClick,
|
|
7190
|
+
footerActions,
|
|
7124
7191
|
folded: foldedProp,
|
|
7125
7192
|
defaultFolded = false,
|
|
7126
7193
|
onFoldedChange,
|
|
@@ -7135,6 +7202,11 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
7135
7202
|
};
|
|
7136
7203
|
const [innerTeam, setInnerTeam] = React68.useState(teams[0]?.value);
|
|
7137
7204
|
const currentTeam = team ?? innerTeam;
|
|
7205
|
+
const hasFooterActions = Boolean(onHelp || onSettings || footerActions);
|
|
7206
|
+
const userContent = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
7207
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Avatar, { size: "sm", name: user.name, initials: user.initials, src: user.src }),
|
|
7208
|
+
folded ? null : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "truncate text-body-md text-ink", children: user.name })
|
|
7209
|
+
] });
|
|
7138
7210
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7139
7211
|
"aside",
|
|
7140
7212
|
{
|
|
@@ -7213,14 +7285,26 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
7213
7285
|
folded ? "flex-col items-center gap-sm px-0" : "items-center justify-between gap-sm px-base"
|
|
7214
7286
|
),
|
|
7215
7287
|
children: [
|
|
7216
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7288
|
+
onUserClick ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7289
|
+
Button,
|
|
7290
|
+
{
|
|
7291
|
+
variant: "item",
|
|
7292
|
+
size: "md",
|
|
7293
|
+
"aria-label": folded ? `${user.name} account menu` : void 0,
|
|
7294
|
+
"aria-haspopup": "menu",
|
|
7295
|
+
onClick: onUserClick,
|
|
7296
|
+
className: cn60(
|
|
7297
|
+
"h-9 min-w-0 text-body-md text-ink",
|
|
7298
|
+
folded ? "w-9 shrink-0 justify-center px-0" : "gap-md px-xs"
|
|
7299
|
+
),
|
|
7300
|
+
children: userContent
|
|
7301
|
+
}
|
|
7302
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex min-w-0 items-center gap-md", children: userContent }),
|
|
7303
|
+
hasFooterActions ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: cn60("flex items-center gap-xxs", folded && "flex-col"), children: [
|
|
7304
|
+
footerActions,
|
|
7305
|
+
onHelp ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconButton, { icon: "circle-help", variant: "ghost", size: "md", "aria-label": "Help", onClick: onHelp }) : null,
|
|
7306
|
+
onSettings ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IconButton, { icon: "settings", variant: "ghost", size: "md", "aria-label": "Settings", onClick: onSettings }) : null
|
|
7307
|
+
] }) : null
|
|
7224
7308
|
]
|
|
7225
7309
|
}
|
|
7226
7310
|
)
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,54 @@ var ICON_REGISTRY = {
|
|
|
68
68
|
"send": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }, { tag: "path", d: "m21.854 2.147-10.94 10.939" }] },
|
|
69
69
|
"funnel": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }] },
|
|
70
70
|
"bell": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.268 21a2 2 0 0 0 3.464 0" }, { tag: "path", d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }] },
|
|
71
|
-
"message-circle": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }] }
|
|
71
|
+
"message-circle": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }] },
|
|
72
|
+
"archive": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }, { tag: "path", d: "M10 12h4" }] },
|
|
73
|
+
"archive-restore": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M20 8v11a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "m9 15 3-3 3 3" }, { tag: "path", d: "M12 12v9" }] },
|
|
74
|
+
"inbox": { viewBox: "0 0 24 24", nodes: [{ tag: "polyline", points: "22 12 16 12 14 15 10 15 8 12 2 12" }, { tag: "path", d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }] },
|
|
75
|
+
"clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "polyline", points: "12 6 12 12 16 14" }] },
|
|
76
|
+
"alarm-clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "13", r: "8" }, { tag: "path", d: "M12 9v4l2 2" }, { tag: "path", d: "M5 3 2 6" }, { tag: "path", d: "m22 6-3-3" }, { tag: "path", d: "M6.38 18.7 4 21" }, { tag: "path", d: "M17.64 18.67 20 21" }] },
|
|
77
|
+
"pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
|
|
78
|
+
"square-pen": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }, { tag: "path", d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }] },
|
|
79
|
+
"reply": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 18v-2a4 4 0 0 0-4-4H4" }, { tag: "path", d: "m9 17-5-5 5-5" }] },
|
|
80
|
+
"reply-all": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M22 18v-2a4 4 0 0 0-4-4H7" }, { tag: "path", d: "m7 17-5-5 5-5" }, { tag: "path", d: "m12 17-5-5 5-5" }] },
|
|
81
|
+
"forward": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 17 5-5-5-5" }, { tag: "path", d: "M4 18v-2a4 4 0 0 1 4-4h12" }] },
|
|
82
|
+
"tag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, { tag: "circle", cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }] },
|
|
83
|
+
"paperclip": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }] },
|
|
84
|
+
"users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
|
|
85
|
+
"user-plus": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "line", x1: "19", x2: "19", y1: "8", y2: "14" }, { tag: "line", x1: "22", x2: "16", y1: "11", y2: "11" }] },
|
|
86
|
+
"user-round-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M2 21a8 8 0 0 1 13.292-6" }, { tag: "circle", cx: "10", cy: "8", r: "5" }, { tag: "path", d: "m16 19 2 2 4-4" }] },
|
|
87
|
+
"contact": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 2v2" }, { tag: "path", d: "M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" }, { tag: "path", d: "M8 2v2" }, { tag: "circle", cx: "12", cy: "11", r: "3" }, { tag: "rect", x: "3", y: "4", width: "18", height: "18", rx: "2" }] },
|
|
88
|
+
"sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
|
|
89
|
+
"moon": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }] },
|
|
90
|
+
"circle-check": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
91
|
+
"badge-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
92
|
+
"file": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }] },
|
|
93
|
+
"file-text": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }, { tag: "path", d: "M10 9H8" }, { tag: "path", d: "M16 13H8" }, { tag: "path", d: "M16 17H8" }] },
|
|
94
|
+
"log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
|
|
95
|
+
"keyboard": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 8h.01" }, { tag: "path", d: "M12 12h.01" }, { tag: "path", d: "M14 8h.01" }, { tag: "path", d: "M16 12h.01" }, { tag: "path", d: "M18 8h.01" }, { tag: "path", d: "M6 8h.01" }, { tag: "path", d: "M7 16h10" }, { tag: "path", d: "M8 12h.01" }, { tag: "rect", width: "20", height: "16", x: "2", y: "4", rx: "2" }] },
|
|
96
|
+
"command": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" }] },
|
|
97
|
+
"link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { tag: "path", d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }] },
|
|
98
|
+
"external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] },
|
|
99
|
+
"square-arrow-out-up-right": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" }, { tag: "path", d: "m21 3-9 9" }, { tag: "path", d: "M15 3h6v6" }] },
|
|
100
|
+
"at-sign": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" }] },
|
|
101
|
+
"trending-up": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 7h6v6" }, { tag: "path", d: "m22 7-8.5 8.5-5-5L2 17" }] },
|
|
102
|
+
"trending-down": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 17h6v-6" }, { tag: "path", d: "m22 17-8.5-8.5-5 5L2 7" }] },
|
|
103
|
+
"mail-open": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" }, { tag: "path", d: "m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" }] },
|
|
104
|
+
"globe": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }, { tag: "path", d: "M2 12h20" }] },
|
|
105
|
+
"lock": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }, { tag: "path", d: "M7 11V7a5 5 0 0 1 10 0v4" }] },
|
|
106
|
+
"arrow-left": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m12 19-7-7 7-7" }, { tag: "path", d: "M19 12H5" }] },
|
|
107
|
+
"bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
|
|
108
|
+
"flag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }, { tag: "line", x1: "4", x2: "4", y1: "22", y2: "15" }] },
|
|
109
|
+
"eye-off": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, { tag: "path", d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, { tag: "path", d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, { tag: "path", d: "m2 2 20 20" }] },
|
|
110
|
+
"eye-closed": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 18-.722-3.25" }, { tag: "path", d: "M2 8a10.645 10.645 0 0 0 20 0" }, { tag: "path", d: "m20 15-1.726-2.05" }, { tag: "path", d: "m4 15 1.726-2.05" }, { tag: "path", d: "m9 18 .722-3.25" }] },
|
|
111
|
+
"pin": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 17v5" }, { tag: "path", d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }] },
|
|
112
|
+
"sliders-horizontal": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "21", x2: "14", y1: "4", y2: "4" }, { tag: "line", x1: "10", x2: "3", y1: "4", y2: "4" }, { tag: "line", x1: "21", x2: "12", y1: "12", y2: "12" }, { tag: "line", x1: "8", x2: "3", y1: "12", y2: "12" }, { tag: "line", x1: "21", x2: "16", y1: "20", y2: "20" }, { tag: "line", x1: "12", x2: "3", y1: "20", y2: "20" }, { tag: "line", x1: "14", x2: "14", y1: "2", y2: "6" }, { tag: "line", x1: "8", x2: "8", y1: "10", y2: "14" }, { tag: "line", x1: "16", x2: "16", y1: "18", y2: "22" }] },
|
|
113
|
+
"list": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12h.01" }, { tag: "path", d: "M3 18h.01" }, { tag: "path", d: "M3 6h.01" }, { tag: "path", d: "M8 12h13" }, { tag: "path", d: "M8 18h13" }, { tag: "path", d: "M8 6h13" }] },
|
|
114
|
+
"timer": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "10", x2: "14", y1: "2", y2: "2" }, { tag: "line", x1: "12", x2: "15", y1: "14", y2: "11" }, { tag: "circle", cx: "12", cy: "14", r: "8" }] },
|
|
115
|
+
"undo-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M9 14 4 9l5-5" }, { tag: "path", d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }] },
|
|
116
|
+
"shield-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
117
|
+
"briefcase": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }, { tag: "rect", width: "20", height: "14", x: "2", y: "6", rx: "2" }] },
|
|
118
|
+
"building-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }, { tag: "path", d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "M10 6h4" }, { tag: "path", d: "M10 10h4" }, { tag: "path", d: "M10 14h4" }, { tag: "path", d: "M10 18h4" }] }
|
|
72
119
|
};
|
|
73
120
|
|
|
74
121
|
// virtual-pkg:src/atoms/Icon/Icon.tsx
|
|
@@ -6853,7 +6900,7 @@ import * as React70 from "react";
|
|
|
6853
6900
|
|
|
6854
6901
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
6855
6902
|
import * as React68 from "react";
|
|
6856
|
-
import { jsx as jsx68, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6903
|
+
import { Fragment as Fragment13, jsx as jsx68, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6857
6904
|
var cn60 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6858
6905
|
var defaultSidebarGroups = [
|
|
6859
6906
|
{
|
|
@@ -6883,7 +6930,7 @@ var defaultSidebarGroups = [
|
|
|
6883
6930
|
]
|
|
6884
6931
|
}
|
|
6885
6932
|
];
|
|
6886
|
-
var rowBase2 = "flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
6933
|
+
var rowBase2 = "relative flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
6887
6934
|
function NavGroup({
|
|
6888
6935
|
group,
|
|
6889
6936
|
folded,
|
|
@@ -6897,6 +6944,7 @@ function NavGroup({
|
|
|
6897
6944
|
const list = /* @__PURE__ */ jsxs62("div", { className: "flex flex-col gap-xxs", children: [
|
|
6898
6945
|
group.items.map((item) => {
|
|
6899
6946
|
const isActive = item.href === activeHref;
|
|
6947
|
+
const hasBadge = item.badge !== void 0 && item.badge !== null && item.badge !== "";
|
|
6900
6948
|
return /* @__PURE__ */ jsxs62(
|
|
6901
6949
|
"a",
|
|
6902
6950
|
{
|
|
@@ -6919,7 +6967,24 @@ function NavGroup({
|
|
|
6919
6967
|
className: cn60("shrink-0", isActive ? "text-on-primary-soft" : "text-body")
|
|
6920
6968
|
}
|
|
6921
6969
|
),
|
|
6922
|
-
folded ? null : /* @__PURE__ */ jsx68("span", { className: "truncate", children: item.label })
|
|
6970
|
+
folded ? null : /* @__PURE__ */ jsx68("span", { className: "truncate", children: item.label }),
|
|
6971
|
+
hasBadge ? folded ? /* @__PURE__ */ jsx68(
|
|
6972
|
+
"span",
|
|
6973
|
+
{
|
|
6974
|
+
"aria-hidden": "true",
|
|
6975
|
+
className: "absolute right-xs top-xs h-xxs w-xxs rounded-full bg-primary"
|
|
6976
|
+
}
|
|
6977
|
+
) : /* @__PURE__ */ jsx68(
|
|
6978
|
+
"span",
|
|
6979
|
+
{
|
|
6980
|
+
className: cn60(
|
|
6981
|
+
"ml-auto shrink-0 pl-xs text-body-sm tabular-nums",
|
|
6982
|
+
isActive ? "text-on-primary-soft" : "text-muted"
|
|
6983
|
+
),
|
|
6984
|
+
children: item.badge
|
|
6985
|
+
}
|
|
6986
|
+
) : null,
|
|
6987
|
+
folded && hasBadge ? /* @__PURE__ */ jsx68("span", { className: "sr-only", children: item.badge }) : null
|
|
6923
6988
|
]
|
|
6924
6989
|
},
|
|
6925
6990
|
item.href
|
|
@@ -6997,6 +7062,8 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
6997
7062
|
user = { name: "Avery Park" },
|
|
6998
7063
|
onHelp,
|
|
6999
7064
|
onSettings,
|
|
7065
|
+
onUserClick,
|
|
7066
|
+
footerActions,
|
|
7000
7067
|
folded: foldedProp,
|
|
7001
7068
|
defaultFolded = false,
|
|
7002
7069
|
onFoldedChange,
|
|
@@ -7011,6 +7078,11 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
7011
7078
|
};
|
|
7012
7079
|
const [innerTeam, setInnerTeam] = React68.useState(teams[0]?.value);
|
|
7013
7080
|
const currentTeam = team ?? innerTeam;
|
|
7081
|
+
const hasFooterActions = Boolean(onHelp || onSettings || footerActions);
|
|
7082
|
+
const userContent = /* @__PURE__ */ jsxs62(Fragment13, { children: [
|
|
7083
|
+
/* @__PURE__ */ jsx68(Avatar, { size: "sm", name: user.name, initials: user.initials, src: user.src }),
|
|
7084
|
+
folded ? null : /* @__PURE__ */ jsx68("span", { className: "truncate text-body-md text-ink", children: user.name })
|
|
7085
|
+
] });
|
|
7014
7086
|
return /* @__PURE__ */ jsxs62(
|
|
7015
7087
|
"aside",
|
|
7016
7088
|
{
|
|
@@ -7089,14 +7161,26 @@ var SidebarDesktop = React68.forwardRef(
|
|
|
7089
7161
|
folded ? "flex-col items-center gap-sm px-0" : "items-center justify-between gap-sm px-base"
|
|
7090
7162
|
),
|
|
7091
7163
|
children: [
|
|
7092
|
-
/* @__PURE__ */
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7164
|
+
onUserClick ? /* @__PURE__ */ jsx68(
|
|
7165
|
+
Button,
|
|
7166
|
+
{
|
|
7167
|
+
variant: "item",
|
|
7168
|
+
size: "md",
|
|
7169
|
+
"aria-label": folded ? `${user.name} account menu` : void 0,
|
|
7170
|
+
"aria-haspopup": "menu",
|
|
7171
|
+
onClick: onUserClick,
|
|
7172
|
+
className: cn60(
|
|
7173
|
+
"h-9 min-w-0 text-body-md text-ink",
|
|
7174
|
+
folded ? "w-9 shrink-0 justify-center px-0" : "gap-md px-xs"
|
|
7175
|
+
),
|
|
7176
|
+
children: userContent
|
|
7177
|
+
}
|
|
7178
|
+
) : /* @__PURE__ */ jsx68("div", { className: "flex min-w-0 items-center gap-md", children: userContent }),
|
|
7179
|
+
hasFooterActions ? /* @__PURE__ */ jsxs62("div", { className: cn60("flex items-center gap-xxs", folded && "flex-col"), children: [
|
|
7180
|
+
footerActions,
|
|
7181
|
+
onHelp ? /* @__PURE__ */ jsx68(IconButton, { icon: "circle-help", variant: "ghost", size: "md", "aria-label": "Help", onClick: onHelp }) : null,
|
|
7182
|
+
onSettings ? /* @__PURE__ */ jsx68(IconButton, { icon: "settings", variant: "ghost", size: "md", "aria-label": "Settings", onClick: onSettings }) : null
|
|
7183
|
+
] }) : null
|
|
7100
7184
|
]
|
|
7101
7185
|
}
|
|
7102
7186
|
)
|
|
@@ -7742,7 +7826,7 @@ Spinner.displayName = "Spinner";
|
|
|
7742
7826
|
|
|
7743
7827
|
// virtual-pkg:src/atoms/StepperItem/StepperItem.tsx
|
|
7744
7828
|
import * as React73 from "react";
|
|
7745
|
-
import { Fragment as
|
|
7829
|
+
import { Fragment as Fragment14, jsx as jsx73, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7746
7830
|
var cn64 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7747
7831
|
var statusLabel2 = {
|
|
7748
7832
|
upcoming: "Upcoming",
|
|
@@ -7828,7 +7912,7 @@ var StepperItem = React73.forwardRef(
|
|
|
7828
7912
|
/* @__PURE__ */ jsxs67("div", { className: cn64("flex min-w-0 flex-col gap-xxs", !last && "pb-base"), children: [
|
|
7829
7913
|
/* @__PURE__ */ jsxs67("p", { className: "flex flex-wrap items-baseline gap-x-xs text-body-md", children: [
|
|
7830
7914
|
/* @__PURE__ */ jsx73("span", { className: cn64("text-ink", status === "active" && "font-(weight:--font-weight-heading-sm)"), children: title }),
|
|
7831
|
-
meta && /* @__PURE__ */ jsxs67(
|
|
7915
|
+
meta && /* @__PURE__ */ jsxs67(Fragment14, { children: [
|
|
7832
7916
|
/* @__PURE__ */ jsx73("span", { "aria-hidden": "true", className: "text-muted-soft", children: "\xB7" }),
|
|
7833
7917
|
/* @__PURE__ */ jsx73("span", { className: "text-muted", children: meta })
|
|
7834
7918
|
] }),
|
|
@@ -8405,7 +8489,7 @@ Toast.displayName = "Toast";
|
|
|
8405
8489
|
// virtual-pkg:src/atoms/Tooltip/Tooltip.tsx
|
|
8406
8490
|
import * as React81 from "react";
|
|
8407
8491
|
import { createPortal as createPortal9 } from "react-dom";
|
|
8408
|
-
import { Fragment as
|
|
8492
|
+
import { Fragment as Fragment15, jsx as jsx81, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
8409
8493
|
var cn72 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8410
8494
|
var GAP = 10;
|
|
8411
8495
|
var closedOffset = {
|
|
@@ -8568,7 +8652,7 @@ function Tooltip({
|
|
|
8568
8652
|
]
|
|
8569
8653
|
}
|
|
8570
8654
|
);
|
|
8571
|
-
return /* @__PURE__ */ jsxs75(
|
|
8655
|
+
return /* @__PURE__ */ jsxs75(Fragment15, { children: [
|
|
8572
8656
|
trigger,
|
|
8573
8657
|
mounted ? createPortal9(bubble, document.body) : null
|
|
8574
8658
|
] });
|
|
@@ -8577,7 +8661,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
8577
8661
|
|
|
8578
8662
|
// virtual-pkg:src/atoms/Wizard/Wizard.tsx
|
|
8579
8663
|
import * as React82 from "react";
|
|
8580
|
-
import { Fragment as
|
|
8664
|
+
import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
8581
8665
|
var cn73 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8582
8666
|
var Wizard = React82.forwardRef(
|
|
8583
8667
|
({
|
|
@@ -8612,7 +8696,7 @@ var Wizard = React82.forwardRef(
|
|
|
8612
8696
|
"aria-labelledby": headingId,
|
|
8613
8697
|
className: cn73("w-full", className),
|
|
8614
8698
|
actionsAlign: "end",
|
|
8615
|
-
actions: /* @__PURE__ */ jsxs76(
|
|
8699
|
+
actions: /* @__PURE__ */ jsxs76(Fragment16, { children: [
|
|
8616
8700
|
index > 0 ? /* @__PURE__ */ jsx82(Button, { variant: "outline", size: "lg", onClick: () => go(index - 1), disabled: completing, children: backLabel }) : null,
|
|
8617
8701
|
/* @__PURE__ */ jsx82(
|
|
8618
8702
|
Button,
|
package/dist/styles.css
CHANGED
|
@@ -328,6 +328,9 @@
|
|
|
328
328
|
.top-full {
|
|
329
329
|
top: 100%;
|
|
330
330
|
}
|
|
331
|
+
.top-xs {
|
|
332
|
+
top: var(--spacing-xs);
|
|
333
|
+
}
|
|
331
334
|
.-right-xxs {
|
|
332
335
|
right: calc(var(--spacing-xxs) * -1);
|
|
333
336
|
}
|
|
@@ -343,6 +346,9 @@
|
|
|
343
346
|
.right-sm {
|
|
344
347
|
right: var(--spacing-sm);
|
|
345
348
|
}
|
|
349
|
+
.right-xs {
|
|
350
|
+
right: var(--spacing-xs);
|
|
351
|
+
}
|
|
346
352
|
.-bottom-px {
|
|
347
353
|
bottom: -1px;
|
|
348
354
|
}
|
|
@@ -634,6 +640,9 @@
|
|
|
634
640
|
.h-px {
|
|
635
641
|
height: 1px;
|
|
636
642
|
}
|
|
643
|
+
.h-xxs {
|
|
644
|
+
height: var(--spacing-xxs);
|
|
645
|
+
}
|
|
637
646
|
.max-h-72 {
|
|
638
647
|
max-height: calc(var(--spacing) * 72);
|
|
639
648
|
}
|
|
@@ -763,6 +772,9 @@
|
|
|
763
772
|
.w-px {
|
|
764
773
|
width: 1px;
|
|
765
774
|
}
|
|
775
|
+
.w-xxs {
|
|
776
|
+
width: var(--spacing-xxs);
|
|
777
|
+
}
|
|
766
778
|
.max-w-0 {
|
|
767
779
|
max-width: 0;
|
|
768
780
|
}
|
|
@@ -1509,6 +1521,9 @@
|
|
|
1509
1521
|
.pl-sm {
|
|
1510
1522
|
padding-left: var(--spacing-sm);
|
|
1511
1523
|
}
|
|
1524
|
+
.pl-xs {
|
|
1525
|
+
padding-left: var(--spacing-xs);
|
|
1526
|
+
}
|
|
1512
1527
|
.text-center {
|
|
1513
1528
|
text-align: center;
|
|
1514
1529
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designa8/vibedesign-superhuman-internal-v1-2-176b",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Complete design system \"My Project superhuman-internal-v1\" generated by Atoms Design.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -53,6 +53,53 @@ export const ICON_REGISTRY = {
|
|
|
53
53
|
"funnel": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" }] },
|
|
54
54
|
"bell": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.268 21a2 2 0 0 0 3.464 0" }, { tag: "path", d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }] },
|
|
55
55
|
"message-circle": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }] },
|
|
56
|
+
"archive": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }, { tag: "path", d: "M10 12h4" }] },
|
|
57
|
+
"archive-restore": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "5", x: "2", y: "3", rx: "1" }, { tag: "path", d: "M4 8v11a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M20 8v11a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "m9 15 3-3 3 3" }, { tag: "path", d: "M12 12v9" }] },
|
|
58
|
+
"inbox": { viewBox: "0 0 24 24", nodes: [{ tag: "polyline", points: "22 12 16 12 14 15 10 15 8 12 2 12" }, { tag: "path", d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" }] },
|
|
59
|
+
"clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "polyline", points: "12 6 12 12 16 14" }] },
|
|
60
|
+
"alarm-clock": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "13", r: "8" }, { tag: "path", d: "M12 9v4l2 2" }, { tag: "path", d: "M5 3 2 6" }, { tag: "path", d: "m22 6-3-3" }, { tag: "path", d: "M6.38 18.7 4 21" }, { tag: "path", d: "M17.64 18.67 20 21" }] },
|
|
61
|
+
"pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
|
|
62
|
+
"square-pen": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }, { tag: "path", d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }] },
|
|
63
|
+
"reply": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 18v-2a4 4 0 0 0-4-4H4" }, { tag: "path", d: "m9 17-5-5 5-5" }] },
|
|
64
|
+
"reply-all": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M22 18v-2a4 4 0 0 0-4-4H7" }, { tag: "path", d: "m7 17-5-5 5-5" }, { tag: "path", d: "m12 17-5-5 5-5" }] },
|
|
65
|
+
"forward": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 17 5-5-5-5" }, { tag: "path", d: "M4 18v-2a4 4 0 0 1 4-4h12" }] },
|
|
66
|
+
"tag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, { tag: "circle", cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" }] },
|
|
67
|
+
"paperclip": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }] },
|
|
68
|
+
"users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
|
|
69
|
+
"user-plus": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "line", x1: "19", x2: "19", y1: "8", y2: "14" }, { tag: "line", x1: "22", x2: "16", y1: "11", y2: "11" }] },
|
|
70
|
+
"user-round-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M2 21a8 8 0 0 1 13.292-6" }, { tag: "circle", cx: "10", cy: "8", r: "5" }, { tag: "path", d: "m16 19 2 2 4-4" }] },
|
|
71
|
+
"contact": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 2v2" }, { tag: "path", d: "M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" }, { tag: "path", d: "M8 2v2" }, { tag: "circle", cx: "12", cy: "11", r: "3" }, { tag: "rect", x: "3", y: "4", width: "18", height: "18", rx: "2" }] },
|
|
72
|
+
"sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
|
|
73
|
+
"moon": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }] },
|
|
74
|
+
"circle-check": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
75
|
+
"badge-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
76
|
+
"file": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }] },
|
|
77
|
+
"file-text": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }, { tag: "path", d: "M14 2v4a2 2 0 0 0 2 2h4" }, { tag: "path", d: "M10 9H8" }, { tag: "path", d: "M16 13H8" }, { tag: "path", d: "M16 17H8" }] },
|
|
78
|
+
"log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
|
|
79
|
+
"keyboard": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 8h.01" }, { tag: "path", d: "M12 12h.01" }, { tag: "path", d: "M14 8h.01" }, { tag: "path", d: "M16 12h.01" }, { tag: "path", d: "M18 8h.01" }, { tag: "path", d: "M6 8h.01" }, { tag: "path", d: "M7 16h10" }, { tag: "path", d: "M8 12h.01" }, { tag: "rect", width: "20", height: "16", x: "2", y: "4", rx: "2" }] },
|
|
80
|
+
"command": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" }] },
|
|
81
|
+
"link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { tag: "path", d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }] },
|
|
82
|
+
"external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] },
|
|
83
|
+
"square-arrow-out-up-right": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" }, { tag: "path", d: "m21 3-9 9" }, { tag: "path", d: "M15 3h6v6" }] },
|
|
84
|
+
"at-sign": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8" }] },
|
|
85
|
+
"trending-up": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 7h6v6" }, { tag: "path", d: "m22 7-8.5 8.5-5-5L2 17" }] },
|
|
86
|
+
"trending-down": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 17h6v-6" }, { tag: "path", d: "m22 17-8.5-8.5-5 5L2 7" }] },
|
|
87
|
+
"mail-open": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" }, { tag: "path", d: "m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" }] },
|
|
88
|
+
"globe": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "path", d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }, { tag: "path", d: "M2 12h20" }] },
|
|
89
|
+
"lock": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }, { tag: "path", d: "M7 11V7a5 5 0 0 1 10 0v4" }] },
|
|
90
|
+
"arrow-left": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m12 19-7-7 7-7" }, { tag: "path", d: "M19 12H5" }] },
|
|
91
|
+
"bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
|
|
92
|
+
"flag": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }, { tag: "line", x1: "4", x2: "4", y1: "22", y2: "15" }] },
|
|
93
|
+
"eye-off": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, { tag: "path", d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, { tag: "path", d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, { tag: "path", d: "m2 2 20 20" }] },
|
|
94
|
+
"eye-closed": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m15 18-.722-3.25" }, { tag: "path", d: "M2 8a10.645 10.645 0 0 0 20 0" }, { tag: "path", d: "m20 15-1.726-2.05" }, { tag: "path", d: "m4 15 1.726-2.05" }, { tag: "path", d: "m9 18 .722-3.25" }] },
|
|
95
|
+
"pin": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 17v5" }, { tag: "path", d: "M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" }] },
|
|
96
|
+
"sliders-horizontal": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "21", x2: "14", y1: "4", y2: "4" }, { tag: "line", x1: "10", x2: "3", y1: "4", y2: "4" }, { tag: "line", x1: "21", x2: "12", y1: "12", y2: "12" }, { tag: "line", x1: "8", x2: "3", y1: "12", y2: "12" }, { tag: "line", x1: "21", x2: "16", y1: "20", y2: "20" }, { tag: "line", x1: "12", x2: "3", y1: "20", y2: "20" }, { tag: "line", x1: "14", x2: "14", y1: "2", y2: "6" }, { tag: "line", x1: "8", x2: "8", y1: "10", y2: "14" }, { tag: "line", x1: "16", x2: "16", y1: "18", y2: "22" }] },
|
|
97
|
+
"list": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12h.01" }, { tag: "path", d: "M3 18h.01" }, { tag: "path", d: "M3 6h.01" }, { tag: "path", d: "M8 12h13" }, { tag: "path", d: "M8 18h13" }, { tag: "path", d: "M8 6h13" }] },
|
|
98
|
+
"timer": { viewBox: "0 0 24 24", nodes: [{ tag: "line", x1: "10", x2: "14", y1: "2", y2: "2" }, { tag: "line", x1: "12", x2: "15", y1: "14", y2: "11" }, { tag: "circle", cx: "12", cy: "14", r: "8" }] },
|
|
99
|
+
"undo-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M9 14 4 9l5-5" }, { tag: "path", d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }] },
|
|
100
|
+
"shield-check": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }, { tag: "path", d: "m9 12 2 2 4-4" }] },
|
|
101
|
+
"briefcase": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" }, { tag: "rect", width: "20", height: "14", x: "2", y: "6", rx: "2" }] },
|
|
102
|
+
"building-2": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }, { tag: "path", d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }, { tag: "path", d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }, { tag: "path", d: "M10 6h4" }, { tag: "path", d: "M10 10h4" }, { tag: "path", d: "M10 14h4" }, { tag: "path", d: "M10 18h4" }] },
|
|
56
103
|
} as const;
|
|
57
104
|
|
|
58
105
|
export type IconName = keyof typeof ICON_REGISTRY;
|
|
@@ -11,6 +11,8 @@ export interface SidebarNavItem {
|
|
|
11
11
|
label: string;
|
|
12
12
|
href: string;
|
|
13
13
|
icon: IconName;
|
|
14
|
+
/** Right-aligned count in the row, e.g. unread messages. Folds to a dot on the rail. */
|
|
15
|
+
badge?: number | string;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export interface SidebarNavGroup {
|
|
@@ -39,8 +41,14 @@ export interface SidebarDesktopProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
39
41
|
promo?: { title: string; description?: string; href?: string } | null;
|
|
40
42
|
/** Signed-in person in the footer. */
|
|
41
43
|
user?: { name: string; initials?: string; src?: string };
|
|
44
|
+
/** Renders the Help button in the footer. Omit to hide it. */
|
|
42
45
|
onHelp?: () => void;
|
|
46
|
+
/** Renders the Settings button in the footer. Omit to hide it. */
|
|
43
47
|
onSettings?: () => void;
|
|
48
|
+
/** Turns the footer person into a button, e.g. to open an account menu. */
|
|
49
|
+
onUserClick?: () => void;
|
|
50
|
+
/** Extra controls in the footer, after help/settings (e.g. a theme toggle). */
|
|
51
|
+
footerActions?: React.ReactNode;
|
|
44
52
|
/** Folded (icon rail) state, controlled. */
|
|
45
53
|
folded?: boolean;
|
|
46
54
|
defaultFolded?: boolean;
|
|
@@ -79,7 +87,7 @@ export const defaultSidebarGroups: SidebarNavGroup[] = [
|
|
|
79
87
|
];
|
|
80
88
|
|
|
81
89
|
const rowBase =
|
|
82
|
-
"flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out " +
|
|
90
|
+
"relative flex h-9 w-full items-center rounded-md text-body-md cursor-pointer transition-colors duration-150 ease-out " +
|
|
83
91
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
84
92
|
|
|
85
93
|
function NavGroup({
|
|
@@ -103,6 +111,7 @@ function NavGroup({
|
|
|
103
111
|
<div className="flex flex-col gap-xxs">
|
|
104
112
|
{group.items.map((item) => {
|
|
105
113
|
const isActive = item.href === activeHref;
|
|
114
|
+
const hasBadge = item.badge !== undefined && item.badge !== null && item.badge !== "";
|
|
106
115
|
return (
|
|
107
116
|
<a
|
|
108
117
|
key={item.href}
|
|
@@ -125,6 +134,24 @@ function NavGroup({
|
|
|
125
134
|
className={cn("shrink-0", isActive ? "text-on-primary-soft" : "text-body")}
|
|
126
135
|
/>
|
|
127
136
|
{folded ? null : <span className="truncate">{item.label}</span>}
|
|
137
|
+
{hasBadge ? (
|
|
138
|
+
folded ? (
|
|
139
|
+
<span
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
className="absolute right-xs top-xs h-xxs w-xxs rounded-full bg-primary"
|
|
142
|
+
/>
|
|
143
|
+
) : (
|
|
144
|
+
<span
|
|
145
|
+
className={cn(
|
|
146
|
+
"ml-auto shrink-0 pl-xs text-body-sm tabular-nums",
|
|
147
|
+
isActive ? "text-on-primary-soft" : "text-muted",
|
|
148
|
+
)}
|
|
149
|
+
>
|
|
150
|
+
{item.badge}
|
|
151
|
+
</span>
|
|
152
|
+
)
|
|
153
|
+
) : null}
|
|
154
|
+
{folded && hasBadge ? <span className="sr-only">{item.badge}</span> : null}
|
|
128
155
|
</a>
|
|
129
156
|
);
|
|
130
157
|
})}
|
|
@@ -210,6 +237,8 @@ export const SidebarDesktop = React.forwardRef<HTMLElement, SidebarDesktopProps>
|
|
|
210
237
|
user = { name: "Avery Park" },
|
|
211
238
|
onHelp,
|
|
212
239
|
onSettings,
|
|
240
|
+
onUserClick,
|
|
241
|
+
footerActions,
|
|
213
242
|
folded: foldedProp,
|
|
214
243
|
defaultFolded = false,
|
|
215
244
|
onFoldedChange,
|
|
@@ -226,6 +255,14 @@ export const SidebarDesktop = React.forwardRef<HTMLElement, SidebarDesktopProps>
|
|
|
226
255
|
};
|
|
227
256
|
const [innerTeam, setInnerTeam] = React.useState(teams[0]?.value);
|
|
228
257
|
const currentTeam = team ?? innerTeam;
|
|
258
|
+
const hasFooterActions = Boolean(onHelp || onSettings || footerActions);
|
|
259
|
+
|
|
260
|
+
const userContent = (
|
|
261
|
+
<>
|
|
262
|
+
<Avatar size="sm" name={user.name} initials={user.initials} src={user.src} />
|
|
263
|
+
{folded ? null : <span className="truncate text-body-md text-ink">{user.name}</span>}
|
|
264
|
+
</>
|
|
265
|
+
);
|
|
229
266
|
|
|
230
267
|
return (
|
|
231
268
|
<aside
|
|
@@ -310,14 +347,34 @@ export const SidebarDesktop = React.forwardRef<HTMLElement, SidebarDesktopProps>
|
|
|
310
347
|
folded ? "flex-col items-center gap-sm px-0" : "items-center justify-between gap-sm px-base",
|
|
311
348
|
)}
|
|
312
349
|
>
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
350
|
+
{onUserClick ? (
|
|
351
|
+
<Button
|
|
352
|
+
variant="item"
|
|
353
|
+
size="md"
|
|
354
|
+
aria-label={folded ? `${user.name} account menu` : undefined}
|
|
355
|
+
aria-haspopup="menu"
|
|
356
|
+
onClick={onUserClick}
|
|
357
|
+
className={cn(
|
|
358
|
+
"h-9 min-w-0 text-body-md text-ink",
|
|
359
|
+
folded ? "w-9 shrink-0 justify-center px-0" : "gap-md px-xs",
|
|
360
|
+
)}
|
|
361
|
+
>
|
|
362
|
+
{userContent}
|
|
363
|
+
</Button>
|
|
364
|
+
) : (
|
|
365
|
+
<div className="flex min-w-0 items-center gap-md">{userContent}</div>
|
|
366
|
+
)}
|
|
367
|
+
{hasFooterActions ? (
|
|
368
|
+
<div className={cn("flex items-center gap-xxs", folded && "flex-col")}>
|
|
369
|
+
{footerActions}
|
|
370
|
+
{onHelp ? (
|
|
371
|
+
<IconButton icon="circle-help" variant="ghost" size="md" aria-label="Help" onClick={onHelp} />
|
|
372
|
+
) : null}
|
|
373
|
+
{onSettings ? (
|
|
374
|
+
<IconButton icon="settings" variant="ghost" size="md" aria-label="Settings" onClick={onSettings} />
|
|
375
|
+
) : null}
|
|
376
|
+
</div>
|
|
377
|
+
) : null}
|
|
321
378
|
</div>
|
|
322
379
|
</aside>
|
|
323
380
|
);
|