@syscore/ui-library 1.9.1 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ui/accordion.tsx +39 -9
- package/client/components/ui/dialog.tsx +25 -21
- package/client/components/ui/tag.tsx +16 -3
- package/client/global.css +17 -27
- package/client/lib/concept-icons.ts +16 -0
- package/client/ui/Accordion.stories.tsx +187 -0
- package/client/ui/Dialog.stories.tsx +106 -0
- package/client/ui/Panel.stories.tsx +1 -16
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +141 -83
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -72,8 +72,10 @@ import { CommandItem } from '../client/components/ui/command';
|
|
|
72
72
|
import { CommandList } from '../client/components/ui/command';
|
|
73
73
|
import { CommandSeparator } from '../client/components/ui/command';
|
|
74
74
|
import { CommandShortcut } from '../client/components/ui/command';
|
|
75
|
+
import { CONCEPT_ICONS } from '../client/lib/concept-icons';
|
|
75
76
|
import { ConceptColor } from '../client/components/icons/ConceptIcons';
|
|
76
77
|
import { conceptColors } from '../client/lib/concept-colors';
|
|
78
|
+
import { conceptOrder } from '../client/lib/concept-icons';
|
|
77
79
|
import { ContextMenu } from '../client/components/ui/context-menu';
|
|
78
80
|
import { ContextMenuCheckboxItem } from '../client/components/ui/context-menu';
|
|
79
81
|
import { ContextMenuContent } from '../client/components/ui/context-menu';
|
|
@@ -478,10 +480,14 @@ export { CommandSeparator }
|
|
|
478
480
|
|
|
479
481
|
export { CommandShortcut }
|
|
480
482
|
|
|
483
|
+
export { CONCEPT_ICONS }
|
|
484
|
+
|
|
481
485
|
export { ConceptColor }
|
|
482
486
|
|
|
483
487
|
export { conceptColors }
|
|
484
488
|
|
|
489
|
+
export { conceptOrder }
|
|
490
|
+
|
|
485
491
|
export { ContextMenu }
|
|
486
492
|
|
|
487
493
|
export { ContextMenuCheckboxItem }
|
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { cva } from "class-variance-authority";
|
|
|
8
8
|
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
9
9
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
10
10
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
11
|
-
import { GripVertical, X as X$1, PanelLeft, Check, Circle, Dot, ChevronLeft, ChevronRight,
|
|
11
|
+
import { GripVertical, X as X$1, PanelLeft, Check, Circle, Dot, ChevronLeft, ChevronRight, Search, MoreHorizontal, ChevronDown, ArrowLeft, ArrowRight } from "lucide-react";
|
|
12
12
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
13
13
|
import { Slot } from "@radix-ui/react-slot";
|
|
14
14
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
@@ -315,20 +315,40 @@ const AccordionHeaderRow = React.forwardRef(({ title, className }, ref) => {
|
|
|
315
315
|
});
|
|
316
316
|
AccordionHeaderRow.displayName = "AccordionHeaderRow";
|
|
317
317
|
const AccordionItem = React.forwardRef(
|
|
318
|
-
({ value, children, className, ...props }, ref) => {
|
|
318
|
+
({ value, children, className, noBorderOnOpen, ...props }, ref) => {
|
|
319
319
|
const { isExpanded: isExpandedFn } = useAccordion();
|
|
320
320
|
const isExpanded = isExpandedFn(value);
|
|
321
321
|
const itemContextValue = React.useMemo(
|
|
322
|
-
() => ({ value, isExpanded }),
|
|
323
|
-
[value, isExpanded]
|
|
322
|
+
() => ({ value, isExpanded, noBorderOnOpen }),
|
|
323
|
+
[value, isExpanded, noBorderOnOpen]
|
|
324
324
|
);
|
|
325
|
-
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx(
|
|
325
|
+
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
ref,
|
|
329
|
+
className: cn(className),
|
|
330
|
+
style: noBorderOnOpen && isExpanded ? { borderBottom: "none" } : void 0,
|
|
331
|
+
...props,
|
|
332
|
+
children
|
|
333
|
+
}
|
|
334
|
+
) });
|
|
326
335
|
}
|
|
327
336
|
);
|
|
328
337
|
AccordionItem.displayName = "AccordionItem";
|
|
329
338
|
const AccordionHeader = React.forwardRef(
|
|
330
|
-
({ children, className, onClick, ...props }, ref) => {
|
|
331
|
-
|
|
339
|
+
({ children, className, onClick, transparentOnOpen, ...props }, ref) => {
|
|
340
|
+
const { isExpanded } = useAccordionItem();
|
|
341
|
+
return /* @__PURE__ */ jsx(
|
|
342
|
+
"div",
|
|
343
|
+
{
|
|
344
|
+
ref,
|
|
345
|
+
onClick,
|
|
346
|
+
className: cn(className),
|
|
347
|
+
style: transparentOnOpen && isExpanded ? { backgroundColor: "transparent" } : void 0,
|
|
348
|
+
...props,
|
|
349
|
+
children
|
|
350
|
+
}
|
|
351
|
+
);
|
|
332
352
|
}
|
|
333
353
|
);
|
|
334
354
|
AccordionHeader.displayName = "AccordionHeader";
|
|
@@ -367,7 +387,7 @@ const AccordionTrigger = React.forwardRef(({ className, onClick, ...props }, ref
|
|
|
367
387
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
368
388
|
const AccordionContent = React.forwardRef(
|
|
369
389
|
({ children, className, ...props }, ref) => {
|
|
370
|
-
const { isExpanded } = useAccordionItem();
|
|
390
|
+
const { isExpanded, noBorderOnOpen } = useAccordionItem();
|
|
371
391
|
return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ jsx(
|
|
372
392
|
motion.div,
|
|
373
393
|
{
|
|
@@ -376,7 +396,10 @@ const AccordionContent = React.forwardRef(
|
|
|
376
396
|
exit: { height: 0, opacity: 0 },
|
|
377
397
|
transition: { duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] },
|
|
378
398
|
className: cn(className),
|
|
379
|
-
style: {
|
|
399
|
+
style: {
|
|
400
|
+
willChange: "opacity",
|
|
401
|
+
...noBorderOnOpen ? { borderTop: "none" } : {}
|
|
402
|
+
},
|
|
380
403
|
children: /* @__PURE__ */ jsx("div", { ref, ...props, children })
|
|
381
404
|
}
|
|
382
405
|
) });
|
|
@@ -2276,6 +2299,50 @@ function Calendar({
|
|
|
2276
2299
|
);
|
|
2277
2300
|
}
|
|
2278
2301
|
Calendar.displayName = "Calendar";
|
|
2302
|
+
const UtilityClose = ({ className }) => {
|
|
2303
|
+
return /* @__PURE__ */ jsx(
|
|
2304
|
+
"div",
|
|
2305
|
+
{
|
|
2306
|
+
className: cn(
|
|
2307
|
+
"size-4 flex items-center justify-center text-gray-500",
|
|
2308
|
+
className
|
|
2309
|
+
),
|
|
2310
|
+
children: /* @__PURE__ */ jsxs(
|
|
2311
|
+
"svg",
|
|
2312
|
+
{
|
|
2313
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2314
|
+
width: "12",
|
|
2315
|
+
height: "12",
|
|
2316
|
+
viewBox: "0 0 12 12",
|
|
2317
|
+
fill: "none",
|
|
2318
|
+
className: cn("size-3 text-inherit"),
|
|
2319
|
+
children: [
|
|
2320
|
+
/* @__PURE__ */ jsx(
|
|
2321
|
+
"path",
|
|
2322
|
+
{
|
|
2323
|
+
d: "M10.8002 1.19995L1.2002 10.8",
|
|
2324
|
+
stroke: "currentColor",
|
|
2325
|
+
strokeWidth: "1.5",
|
|
2326
|
+
strokeLinecap: "round",
|
|
2327
|
+
strokeLinejoin: "round"
|
|
2328
|
+
}
|
|
2329
|
+
),
|
|
2330
|
+
/* @__PURE__ */ jsx(
|
|
2331
|
+
"path",
|
|
2332
|
+
{
|
|
2333
|
+
d: "M1.2002 1.19995L10.8002 10.8",
|
|
2334
|
+
stroke: "currentColor",
|
|
2335
|
+
strokeWidth: "1.5",
|
|
2336
|
+
strokeLinecap: "round",
|
|
2337
|
+
strokeLinejoin: "round"
|
|
2338
|
+
}
|
|
2339
|
+
)
|
|
2340
|
+
]
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
};
|
|
2279
2346
|
function Dialog({
|
|
2280
2347
|
...props
|
|
2281
2348
|
}) {
|
|
@@ -2298,6 +2365,7 @@ function DialogClose({
|
|
|
2298
2365
|
}
|
|
2299
2366
|
function DialogOverlay({
|
|
2300
2367
|
className,
|
|
2368
|
+
children,
|
|
2301
2369
|
...props
|
|
2302
2370
|
}) {
|
|
2303
2371
|
return /* @__PURE__ */ jsx(
|
|
@@ -2305,7 +2373,8 @@ function DialogOverlay({
|
|
|
2305
2373
|
{
|
|
2306
2374
|
"data-slot": "dialog-overlay",
|
|
2307
2375
|
className: cn("dialog-overlay", className),
|
|
2308
|
-
...props
|
|
2376
|
+
...props,
|
|
2377
|
+
children
|
|
2309
2378
|
}
|
|
2310
2379
|
);
|
|
2311
2380
|
}
|
|
@@ -2315,31 +2384,28 @@ function DialogContent({
|
|
|
2315
2384
|
showCloseButton = true,
|
|
2316
2385
|
...props
|
|
2317
2386
|
}) {
|
|
2318
|
-
return /* @__PURE__ */
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
children:
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
}
|
|
2341
|
-
)
|
|
2342
|
-
] });
|
|
2387
|
+
return /* @__PURE__ */ jsx(DialogPortal, { "data-slot": "dialog-portal", children: /* @__PURE__ */ jsx(DialogOverlay, { children: /* @__PURE__ */ jsxs(
|
|
2388
|
+
SheetPrimitive.Content,
|
|
2389
|
+
{
|
|
2390
|
+
"data-slot": "dialog-content",
|
|
2391
|
+
className: cn("dialog-content", className),
|
|
2392
|
+
...props,
|
|
2393
|
+
children: [
|
|
2394
|
+
/* @__PURE__ */ jsx("div", { className: "dialog-content-inner", children }),
|
|
2395
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
2396
|
+
SheetPrimitive.Close,
|
|
2397
|
+
{
|
|
2398
|
+
"data-slot": "dialog-close",
|
|
2399
|
+
className: "dialog-close",
|
|
2400
|
+
children: [
|
|
2401
|
+
/* @__PURE__ */ jsx(UtilityClose, {}),
|
|
2402
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
2403
|
+
]
|
|
2404
|
+
}
|
|
2405
|
+
)
|
|
2406
|
+
]
|
|
2407
|
+
}
|
|
2408
|
+
) }) });
|
|
2343
2409
|
}
|
|
2344
2410
|
function DialogHeader({ className, ...props }) {
|
|
2345
2411
|
return /* @__PURE__ */ jsx(
|
|
@@ -2369,7 +2435,7 @@ function DialogTitle({
|
|
|
2369
2435
|
SheetPrimitive.Title,
|
|
2370
2436
|
{
|
|
2371
2437
|
"data-slot": "dialog-title",
|
|
2372
|
-
className: cn("dialog-title heading-xxsmall", className),
|
|
2438
|
+
className: cn("dialog-title heading-xxsmall text-center", className),
|
|
2373
2439
|
...props
|
|
2374
2440
|
}
|
|
2375
2441
|
);
|
|
@@ -2560,10 +2626,17 @@ const Tag = React.forwardRef(
|
|
|
2560
2626
|
status,
|
|
2561
2627
|
colorScheme = "light",
|
|
2562
2628
|
className,
|
|
2629
|
+
minWidth,
|
|
2630
|
+
minHeight,
|
|
2563
2631
|
style,
|
|
2564
2632
|
onClick,
|
|
2565
2633
|
...props
|
|
2566
2634
|
}, ref) => {
|
|
2635
|
+
const mergedStyle = {
|
|
2636
|
+
minWidth,
|
|
2637
|
+
minHeight,
|
|
2638
|
+
...style
|
|
2639
|
+
};
|
|
2567
2640
|
if (status) {
|
|
2568
2641
|
const statusClass = getStatusClass(status, colorScheme);
|
|
2569
2642
|
return /* @__PURE__ */ jsx(
|
|
@@ -2572,7 +2645,7 @@ const Tag = React.forwardRef(
|
|
|
2572
2645
|
ref,
|
|
2573
2646
|
onClick,
|
|
2574
2647
|
className: cn("overline-medium", statusClass, className),
|
|
2575
|
-
style,
|
|
2648
|
+
style: mergedStyle,
|
|
2576
2649
|
...props,
|
|
2577
2650
|
children
|
|
2578
2651
|
}
|
|
@@ -2585,7 +2658,7 @@ const Tag = React.forwardRef(
|
|
|
2585
2658
|
ref,
|
|
2586
2659
|
onClick,
|
|
2587
2660
|
className: cn("tag-code", className),
|
|
2588
|
-
style,
|
|
2661
|
+
style: mergedStyle,
|
|
2589
2662
|
...props,
|
|
2590
2663
|
children: /* @__PURE__ */ jsx("span", { className: "number-small font-semibold", style: { color: "inherit" }, children })
|
|
2591
2664
|
}
|
|
@@ -2601,7 +2674,7 @@ const Tag = React.forwardRef(
|
|
|
2601
2674
|
active ? "tag-general--active" : "tag-general--inactive",
|
|
2602
2675
|
className
|
|
2603
2676
|
),
|
|
2604
|
-
style,
|
|
2677
|
+
style: mergedStyle,
|
|
2605
2678
|
...props,
|
|
2606
2679
|
children
|
|
2607
2680
|
}
|
|
@@ -5478,6 +5551,33 @@ const IconConceptInnovation = ({
|
|
|
5478
5551
|
}
|
|
5479
5552
|
);
|
|
5480
5553
|
};
|
|
5554
|
+
const CONCEPT_ICONS = {
|
|
5555
|
+
air: IconConceptAir,
|
|
5556
|
+
water: IconConceptWater,
|
|
5557
|
+
nourishment: IconConceptNourishment,
|
|
5558
|
+
light: IconConceptLight,
|
|
5559
|
+
movement: IconConceptMovement,
|
|
5560
|
+
thermal: IconConceptThermalComfort,
|
|
5561
|
+
"thermal-comfort": IconConceptThermalComfort,
|
|
5562
|
+
sound: IconConceptSound,
|
|
5563
|
+
materials: IconConceptMaterials,
|
|
5564
|
+
community: IconConceptCommunity,
|
|
5565
|
+
mind: IconConceptMind,
|
|
5566
|
+
innovation: IconConceptInnovation
|
|
5567
|
+
};
|
|
5568
|
+
const conceptOrder = [
|
|
5569
|
+
"air",
|
|
5570
|
+
"water",
|
|
5571
|
+
"nourishment",
|
|
5572
|
+
"light",
|
|
5573
|
+
"movement",
|
|
5574
|
+
"thermal-comfort",
|
|
5575
|
+
"sound",
|
|
5576
|
+
"materials",
|
|
5577
|
+
"community",
|
|
5578
|
+
"mind",
|
|
5579
|
+
"innovation"
|
|
5580
|
+
];
|
|
5481
5581
|
function UtilityAccordion({ className }) {
|
|
5482
5582
|
return /* @__PURE__ */ jsx(
|
|
5483
5583
|
"svg",
|
|
@@ -5549,50 +5649,6 @@ const UtilityClassification = ({
|
|
|
5549
5649
|
}
|
|
5550
5650
|
);
|
|
5551
5651
|
};
|
|
5552
|
-
const UtilityClose = ({ className }) => {
|
|
5553
|
-
return /* @__PURE__ */ jsx(
|
|
5554
|
-
"div",
|
|
5555
|
-
{
|
|
5556
|
-
className: cn(
|
|
5557
|
-
"size-4 flex items-center justify-center text-gray-500",
|
|
5558
|
-
className
|
|
5559
|
-
),
|
|
5560
|
-
children: /* @__PURE__ */ jsxs(
|
|
5561
|
-
"svg",
|
|
5562
|
-
{
|
|
5563
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5564
|
-
width: "12",
|
|
5565
|
-
height: "12",
|
|
5566
|
-
viewBox: "0 0 12 12",
|
|
5567
|
-
fill: "none",
|
|
5568
|
-
className: cn("size-3 text-inherit"),
|
|
5569
|
-
children: [
|
|
5570
|
-
/* @__PURE__ */ jsx(
|
|
5571
|
-
"path",
|
|
5572
|
-
{
|
|
5573
|
-
d: "M10.8002 1.19995L1.2002 10.8",
|
|
5574
|
-
stroke: "currentColor",
|
|
5575
|
-
strokeWidth: "1.5",
|
|
5576
|
-
strokeLinecap: "round",
|
|
5577
|
-
strokeLinejoin: "round"
|
|
5578
|
-
}
|
|
5579
|
-
),
|
|
5580
|
-
/* @__PURE__ */ jsx(
|
|
5581
|
-
"path",
|
|
5582
|
-
{
|
|
5583
|
-
d: "M1.2002 1.19995L10.8002 10.8",
|
|
5584
|
-
stroke: "currentColor",
|
|
5585
|
-
strokeWidth: "1.5",
|
|
5586
|
-
strokeLinecap: "round",
|
|
5587
|
-
strokeLinejoin: "round"
|
|
5588
|
-
}
|
|
5589
|
-
)
|
|
5590
|
-
]
|
|
5591
|
-
}
|
|
5592
|
-
)
|
|
5593
|
-
}
|
|
5594
|
-
);
|
|
5595
|
-
};
|
|
5596
5652
|
const UtilityCompare = ({
|
|
5597
5653
|
className
|
|
5598
5654
|
}) => {
|
|
@@ -9601,6 +9657,7 @@ export {
|
|
|
9601
9657
|
BreadcrumbPage,
|
|
9602
9658
|
BreadcrumbSeparator,
|
|
9603
9659
|
Button,
|
|
9660
|
+
CONCEPT_ICONS,
|
|
9604
9661
|
Calendar,
|
|
9605
9662
|
Card,
|
|
9606
9663
|
CardContent,
|
|
@@ -9878,6 +9935,7 @@ export {
|
|
|
9878
9935
|
capitalize,
|
|
9879
9936
|
cn,
|
|
9880
9937
|
conceptColors,
|
|
9938
|
+
conceptOrder,
|
|
9881
9939
|
navigationMenuTriggerStyle,
|
|
9882
9940
|
useAccordion,
|
|
9883
9941
|
useAccordionItem,
|