@syscore/ui-library 1.7.7 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ui/input.tsx +1 -1
- package/client/components/ui/label.tsx +2 -2
- package/client/components/ui/tag.tsx +8 -8
- package/client/components/ui/toggle.tsx +16 -24
- package/client/global.css +11 -13
- package/client/lib/utils.ts +6 -0
- package/client/ui/Panel.stories.tsx +509 -435
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +28 -27
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ import { BreadcrumbSeparator } from '../client/components/ui/breadcrumb';
|
|
|
35
35
|
import { Button } from '../client/components/ui/button';
|
|
36
36
|
import { buttonVariants } from '../client/components/ui/button';
|
|
37
37
|
import { Calendar } from '../client/components/ui/calendar';
|
|
38
|
+
import { capitalize } from '../client/lib/utils';
|
|
38
39
|
import { Card } from '../client/components/ui/card';
|
|
39
40
|
import { CardContent } from '../client/components/ui/card';
|
|
40
41
|
import { CardDescription } from '../client/components/ui/card';
|
|
@@ -403,6 +404,8 @@ export { buttonVariants }
|
|
|
403
404
|
|
|
404
405
|
export { Calendar }
|
|
405
406
|
|
|
407
|
+
export { capitalize }
|
|
408
|
+
|
|
406
409
|
export { Card }
|
|
407
410
|
|
|
408
411
|
export { CardContent }
|
package/dist/index.es.js
CHANGED
|
@@ -45,6 +45,10 @@ import { Toaster as Toaster$2 } from "sonner";
|
|
|
45
45
|
function cn(...inputs) {
|
|
46
46
|
return twMerge(clsx(inputs));
|
|
47
47
|
}
|
|
48
|
+
function capitalize(str) {
|
|
49
|
+
if (!str) return str;
|
|
50
|
+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
51
|
+
}
|
|
48
52
|
const Accordion = AccordionPrimitive.Root;
|
|
49
53
|
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
50
54
|
AccordionPrimitive.Item,
|
|
@@ -462,7 +466,7 @@ const Input = React.forwardRef(
|
|
|
462
466
|
"input",
|
|
463
467
|
{
|
|
464
468
|
type,
|
|
465
|
-
className: "input",
|
|
469
|
+
className: "well-input ",
|
|
466
470
|
ref,
|
|
467
471
|
disabled: isDisabled,
|
|
468
472
|
readOnly: isReadOnly,
|
|
@@ -1275,9 +1279,9 @@ const Label = React.forwardRef(({ className, children, ...props }, ref) => /* @_
|
|
|
1275
1279
|
LabelPrimitive.Root,
|
|
1276
1280
|
{
|
|
1277
1281
|
ref,
|
|
1278
|
-
className: cn(labelVariants(), className),
|
|
1282
|
+
className: cn(labelVariants(), "overline-medium", className),
|
|
1279
1283
|
...props,
|
|
1280
|
-
children
|
|
1284
|
+
children
|
|
1281
1285
|
}
|
|
1282
1286
|
));
|
|
1283
1287
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
@@ -1669,26 +1673,23 @@ function useSegmentedControl({
|
|
|
1669
1673
|
onValueChange: handleValueChange
|
|
1670
1674
|
};
|
|
1671
1675
|
}
|
|
1672
|
-
cva(
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
default: "toggle--default",
|
|
1678
|
-
outline: "toggle--outline"
|
|
1679
|
-
},
|
|
1680
|
-
size: {
|
|
1681
|
-
default: "toggle--size-default",
|
|
1682
|
-
sm: "toggle--size-sm",
|
|
1683
|
-
lg: "toggle--size-lg"
|
|
1684
|
-
}
|
|
1676
|
+
cva("toggle", {
|
|
1677
|
+
variants: {
|
|
1678
|
+
variant: {
|
|
1679
|
+
default: "toggle--default",
|
|
1680
|
+
outline: "toggle--outline"
|
|
1685
1681
|
},
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1682
|
+
size: {
|
|
1683
|
+
default: "toggle--size-default",
|
|
1684
|
+
sm: "toggle--size-sm",
|
|
1685
|
+
lg: "toggle--size-lg"
|
|
1689
1686
|
}
|
|
1687
|
+
},
|
|
1688
|
+
defaultVariants: {
|
|
1689
|
+
variant: "default",
|
|
1690
|
+
size: "default"
|
|
1690
1691
|
}
|
|
1691
|
-
);
|
|
1692
|
+
});
|
|
1692
1693
|
const SegmentedControlInner = React.forwardRef(
|
|
1693
1694
|
({ className, options, value, defaultValue, onValueChange, ...props }, ref) => {
|
|
1694
1695
|
var _a;
|
|
@@ -1698,19 +1699,18 @@ const SegmentedControlInner = React.forwardRef(
|
|
|
1698
1699
|
onValueChange
|
|
1699
1700
|
});
|
|
1700
1701
|
return /* @__PURE__ */ jsx("div", { ref, className: cn("segmented-control", className), ...props, children: options.map((option) => {
|
|
1701
|
-
const isReactElement = React.isValidElement(option.label);
|
|
1702
1702
|
const isActive = selectedValue === option.value;
|
|
1703
1703
|
return /* @__PURE__ */ jsx(
|
|
1704
1704
|
"button",
|
|
1705
1705
|
{
|
|
1706
1706
|
className: cn(
|
|
1707
|
-
"segmented-control-button",
|
|
1707
|
+
"segmented-control-button body-small",
|
|
1708
1708
|
isActive ? "segmented-control-button--active" : "segmented-control-button--inactive"
|
|
1709
1709
|
),
|
|
1710
1710
|
onClick: () => handleValueChange(option.value),
|
|
1711
1711
|
type: "button",
|
|
1712
1712
|
"data-active": isActive,
|
|
1713
|
-
children:
|
|
1713
|
+
children: option.label
|
|
1714
1714
|
},
|
|
1715
1715
|
option.value
|
|
1716
1716
|
);
|
|
@@ -2334,9 +2334,9 @@ const Tag = React.forwardRef(
|
|
|
2334
2334
|
{
|
|
2335
2335
|
ref,
|
|
2336
2336
|
onClick,
|
|
2337
|
-
className: cn(statusClass, className),
|
|
2337
|
+
className: cn("overline-medium", statusClass, className),
|
|
2338
2338
|
...props,
|
|
2339
|
-
children
|
|
2339
|
+
children
|
|
2340
2340
|
}
|
|
2341
2341
|
);
|
|
2342
2342
|
}
|
|
@@ -2346,12 +2346,12 @@ const Tag = React.forwardRef(
|
|
|
2346
2346
|
ref,
|
|
2347
2347
|
onClick,
|
|
2348
2348
|
className: cn(
|
|
2349
|
-
"tag-general",
|
|
2349
|
+
"tag-general body-small",
|
|
2350
2350
|
active ? "tag-general--active" : "tag-general--inactive",
|
|
2351
2351
|
className
|
|
2352
2352
|
),
|
|
2353
2353
|
...props,
|
|
2354
|
-
children
|
|
2354
|
+
children
|
|
2355
2355
|
}
|
|
2356
2356
|
);
|
|
2357
2357
|
}
|
|
@@ -9903,6 +9903,7 @@ export {
|
|
|
9903
9903
|
X,
|
|
9904
9904
|
badgeVariants,
|
|
9905
9905
|
buttonVariants,
|
|
9906
|
+
capitalize,
|
|
9906
9907
|
cn,
|
|
9907
9908
|
conceptColors,
|
|
9908
9909
|
navigationMenuTriggerStyle,
|