@dust-tt/sparkle 0.2.266 → 0.2.267-rc-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/dist/cjs/index.js +1404 -482
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip.js +3 -3
- package/dist/esm/components/Chip.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +12 -0
- package/dist/esm/components/RadioGroup.d.ts.map +1 -0
- package/dist/esm/components/RadioGroup.js +31 -0
- package/dist/esm/components/RadioGroup.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/RadioGroup.stories.d.ts +7 -0
- package/dist/esm/stories/RadioGroup.stories.d.ts.map +1 -0
- package/dist/esm/stories/RadioGroup.stories.js +30 -0
- package/dist/esm/stories/RadioGroup.stories.js.map +1 -0
- package/dist/sparkle.css +50 -101
- package/package.json +3 -1
- package/src/components/Chip.tsx +4 -3
- package/src/components/RadioGroup.tsx +69 -0
- package/src/components/index.ts +1 -1
- package/src/stories/RadioGroup.stories.tsx +44 -0
- package/dist/esm/components/RadioButton.d.ts +0 -15
- package/dist/esm/components/RadioButton.d.ts.map +0 -1
- package/dist/esm/components/RadioButton.js +0 -26
- package/dist/esm/components/RadioButton.js.map +0 -1
- package/dist/esm/stories/RadioButton.stories.d.ts +0 -9
- package/dist/esm/stories/RadioButton.stories.d.ts.map +0 -1
- package/dist/esm/stories/RadioButton.stories.js +0 -57
- package/dist/esm/stories/RadioButton.stories.js.map +0 -1
- package/src/components/RadioButton.tsx +0 -83
- package/src/stories/RadioButton.stories.tsx +0 -81
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip.tsx"],"names":[],"mappings":"AAAA,O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IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -2,10 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { classNames } from "../lib/utils";
|
|
3
3
|
import { Icon } from "./Icon";
|
|
4
4
|
var sizeClasses = {
|
|
5
|
-
xs: "s-
|
|
6
|
-
sm: "s-
|
|
5
|
+
xs: "s-h-7 s-text-xs s-font-medium s-px-3 s-gap-2",
|
|
6
|
+
sm: "s-h-9 s-text-sm s-font-semibold s-px-3 s-gap-2.5",
|
|
7
7
|
};
|
|
8
|
-
var baseClasses = "s-inline-flex s-box-border s-border s-items-center";
|
|
8
|
+
var baseClasses = "s-rounded-lg s-inline-flex s-box-border s-border s-items-center";
|
|
9
9
|
export function Chip(_a) {
|
|
10
10
|
var _b = _a.size, size = _b === void 0 ? "xs" : _b, _c = _a.color, color = _c === void 0 ? "slate" : _c, label = _a.label, children = _a.children, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.isBusy, isBusy = _e === void 0 ? false : _e, icon = _a.icon;
|
|
11
11
|
var backgroundColor = "s-bg-".concat(color, "-100 s-border-").concat(color, "-200");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../src/components/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AAqBzC,IAAM,WAAW,GAAG;IAClB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../src/components/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAC;AAqBzC,IAAM,WAAW,GAAG;IAClB,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CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAChC,IAEA,QAAQ,CACL,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const radioStyles: (props?: ({
|
|
5
|
+
size?: "xs" | "sm" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioStyles> {
|
|
9
|
+
}
|
|
10
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { RadioGroup, RadioGroupItem };
|
|
12
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,WAAW;;mFAkBhB,CAAC;AAEF,QAAA,MAAM,UAAU,+JAWd,CAAC;AAGH,UAAU,mBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EACrE,YAAY,CAAC,OAAO,WAAW,CAAC;CAAG;AAEvC,QAAA,MAAM,cAAc,+FAoBlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { CircleIcon } from "../icons";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
var radioStyles = cva(cn("s-aspect-square s-h-4 s-w-4 s-rounded-full s-border s-border-primary-500 s-text-foreground s-ring-offset-background", "focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 focus-visible:s-ring-ring", "disabled:s-cursor-not-allowed disabled:s-opacity-50", "checked:s-ring-0 checked:s-bg-action-500"), {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
xs: "s-h-4 s-w-4",
|
|
11
|
+
sm: "s-h-5 s-w-5",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "xs",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
var RadioGroup = React.forwardRef(function (_a, ref) {
|
|
19
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
20
|
+
return (React.createElement(RadioGroupPrimitive.Root, __assign({ className: cn("s-grid s-gap-2", className) }, props, { ref: ref })));
|
|
21
|
+
});
|
|
22
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
23
|
+
var RadioGroupItem = React.forwardRef(function (_a, ref) {
|
|
24
|
+
var className = _a.className, _b = _a.size, size = _b === void 0 ? "xs" : _b, props = __rest(_a, ["className", "size"]);
|
|
25
|
+
return (React.createElement(RadioGroupPrimitive.Item, __assign({ ref: ref, className: cn(radioStyles({ size: size }), className) }, props),
|
|
26
|
+
React.createElement(RadioGroupPrimitive.Indicator, { className: "s-flex s-items-center s-justify-center" },
|
|
27
|
+
React.createElement(CircleIcon, { className: cn(size === "xs" ? "s-h-2.5 s-w-2.5" : "s-h-3 s-w-3", "s-fill-current s-text-current focus:s-bg-action-50-dark") }))));
|
|
28
|
+
});
|
|
29
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
30
|
+
export { RadioGroup, RadioGroupItem };
|
|
31
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,GAAG,EAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,IAAM,WAAW,GAAG,GAAG,CACrB,EAAE,CACA,qHAAqH,EACrH,6GAA6G,EAC7G,qDAAqD,EACrD,0CAA0C,CAC3C,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,aAAa;YACjB,EAAE,EAAE,aAAa;SAClB;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC;AAEF,IAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,UAAC,EAAuB,EAAE,GAAG;IAA1B,IAAA,SAAS,eAAA,EAAK,KAAK,cAArB,aAAuB,CAAF;IACtB,OAAO,CACL,oBAAC,mBAAmB,CAAC,IAAI,aACvB,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,IACtC,KAAK,IACT,GAAG,EAAE,GAAG,IACR,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;AAM9D,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,UAAC,EAAoC,EAAE,GAAG;IAAvC,IAAA,SAAS,eAAA,EAAE,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EAAK,KAAK,cAAlC,qBAAoC,CAAF;IACnC,OAAO,CACL,oBAAC,mBAAmB,CAAC,IAAI,aACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,IAAI,MAAA,EAAE,CAAC,EAAE,SAAS,CAAC,IAC3C,KAAK;QAET,oBAAC,mBAAmB,CAAC,SAAS,IAAC,SAAS,EAAC,wCAAwC;YAC/E,oBAAC,UAAU,IACT,SAAS,EAAE,EAAE,CACX,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,aAAa,EACjD,yDAAyD,CAC1D,GACD,CAC4B,CACP,CAC5B,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -41,7 +41,7 @@ export { Pagination } from "./Pagination";
|
|
|
41
41
|
export { Popover, PopoverContent, PopoverRoot, PopoverTrigger, } from "./Popover";
|
|
42
42
|
export { Popup } from "./Popup";
|
|
43
43
|
export { PriceTable } from "./PriceTable";
|
|
44
|
-
export {
|
|
44
|
+
export { RadioGroup, RadioGroupItem } from "./RadioGroup";
|
|
45
45
|
export { Searchbar } from "./Searchbar";
|
|
46
46
|
export { Separator } from "./Separator";
|
|
47
47
|
export { SliderToggle } from "./SliderToggle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAA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MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -40,7 +40,7 @@ export { Pagination } from "./Pagination";
|
|
|
40
40
|
export { Popover, PopoverContent, PopoverRoot, PopoverTrigger, } from "./Popover";
|
|
41
41
|
export { Popup } from "./Popup";
|
|
42
42
|
export { PriceTable } from "./PriceTable";
|
|
43
|
-
export {
|
|
43
|
+
export { RadioGroup, RadioGroupItem } from "./RadioGroup";
|
|
44
44
|
export { Searchbar } from "./Searchbar";
|
|
45
45
|
export { Separator } from "./Separator";
|
|
46
46
|
export { SliderToggle } from "./SliderToggle";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU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,CAAC;AACtC,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/RadioGroup.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,IAAI;;CAEM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,eAAO,MAAM,iBAAiB,yBAiC7B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Label, RadioGroup, RadioGroupItem } from "../index_with_tw_base";
|
|
3
|
+
var meta = {
|
|
4
|
+
title: "Primitives/RadioGroup",
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export var RadioGroupExample = function () {
|
|
8
|
+
return (React.createElement("div", { className: "s-flex s-flex-col s-gap-10" },
|
|
9
|
+
React.createElement(RadioGroup, { defaultValue: "option-one" },
|
|
10
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
11
|
+
React.createElement(RadioGroupItem, { value: "option-one", id: "option-one" }),
|
|
12
|
+
React.createElement(Label, { htmlFor: "option-one" }, "Option One")),
|
|
13
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
14
|
+
React.createElement(RadioGroupItem, { value: "option-two", id: "option-two" }),
|
|
15
|
+
React.createElement(Label, { htmlFor: "option-two" }, "Option Two")),
|
|
16
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
17
|
+
React.createElement(RadioGroupItem, { value: "option-two", id: "option-three" }),
|
|
18
|
+
React.createElement(Label, { htmlFor: "option-two" }, "Option Three"))),
|
|
19
|
+
React.createElement(RadioGroup, { defaultValue: "option-one" },
|
|
20
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
21
|
+
React.createElement(RadioGroupItem, { value: "option-one", id: "option-one", size: "sm" }),
|
|
22
|
+
React.createElement(Label, { htmlFor: "option-one" }, "Option One")),
|
|
23
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
24
|
+
React.createElement(RadioGroupItem, { value: "option-two", id: "option-two", size: "sm" }),
|
|
25
|
+
React.createElement(Label, { htmlFor: "option-two" }, "Option Two")),
|
|
26
|
+
React.createElement("div", { className: "s-flex s-items-center s-space-x-2" },
|
|
27
|
+
React.createElement(RadioGroupItem, { value: "option-two", id: "option-three", size: "sm" }),
|
|
28
|
+
React.createElement(Label, { htmlFor: "option-two" }, "Option Three")))));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=RadioGroup.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.stories.js","sourceRoot":"","sources":["../../../src/stories/RadioGroup.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEhF,IAAM,IAAI,GAAG;IACX,KAAK,EAAE,uBAAuB;CAChB,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B;QACzC,oBAAC,UAAU,IAAC,YAAY,EAAC,YAAY;YACnC,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,YAAY,GAAG;gBACrD,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,iBAAmB,CAC1C;YACN,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,YAAY,GAAG;gBACrD,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,iBAAmB,CAC1C;YACN,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,cAAc,GAAE;gBACtD,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,mBAAqB,CAC5C,CACK;QACb,oBAAC,UAAU,IAAC,YAAY,EAAC,YAAY;YACnC,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG;gBAC/D,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,iBAAmB,CAC1C;YACN,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAG;gBAC/D,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,iBAAmB,CAC1C;YACN,6BAAK,SAAS,EAAC,mCAAmC;gBAChD,oBAAC,cAAc,IAAC,KAAK,EAAC,YAAY,EAAC,EAAE,EAAC,cAAc,EAAC,IAAI,EAAC,IAAI,GAAG;gBACjE,oBAAC,KAAK,IAAC,OAAO,EAAC,YAAY,mBAAqB,CAC5C,CACK,CACT,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/sparkle.css
CHANGED
|
@@ -688,62 +688,6 @@ select {
|
|
|
688
688
|
--tw-backdrop-sepia: ;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
-
.s-form-checkbox,.s-form-radio {
|
|
692
|
-
-webkit-appearance: none;
|
|
693
|
-
-moz-appearance: none;
|
|
694
|
-
appearance: none;
|
|
695
|
-
padding: 0;
|
|
696
|
-
-webkit-print-color-adjust: exact;
|
|
697
|
-
print-color-adjust: exact;
|
|
698
|
-
display: inline-block;
|
|
699
|
-
vertical-align: middle;
|
|
700
|
-
background-origin: border-box;
|
|
701
|
-
-webkit-user-select: none;
|
|
702
|
-
-moz-user-select: none;
|
|
703
|
-
user-select: none;
|
|
704
|
-
flex-shrink: 0;
|
|
705
|
-
height: 1rem;
|
|
706
|
-
width: 1rem;
|
|
707
|
-
color: #2563eb;
|
|
708
|
-
background-color: #fff;
|
|
709
|
-
border-color: #6b7280;
|
|
710
|
-
border-width: 1px;
|
|
711
|
-
--tw-shadow: 0 0 #0000;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
.s-form-radio {
|
|
715
|
-
border-radius: 100%;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.s-form-checkbox:focus,.s-form-radio:focus {
|
|
719
|
-
outline: 2px solid transparent;
|
|
720
|
-
outline-offset: 2px;
|
|
721
|
-
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
722
|
-
--tw-ring-offset-width: 2px;
|
|
723
|
-
--tw-ring-offset-color: #fff;
|
|
724
|
-
--tw-ring-color: #2563eb;
|
|
725
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
726
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
727
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
.s-form-checkbox:checked,.s-form-radio:checked {
|
|
731
|
-
border-color: transparent;
|
|
732
|
-
background-color: currentColor;
|
|
733
|
-
background-size: 100% 100%;
|
|
734
|
-
background-position: center;
|
|
735
|
-
background-repeat: no-repeat;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
.s-form-radio:checked {
|
|
739
|
-
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.s-form-checkbox:checked:hover,.s-form-checkbox:checked:focus,.s-form-radio:checked:hover,.s-form-radio:checked:focus {
|
|
743
|
-
border-color: transparent;
|
|
744
|
-
background-color: currentColor;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
691
|
.s-sr-only {
|
|
748
692
|
position: absolute;
|
|
749
693
|
width: 1px;
|
|
@@ -1009,6 +953,10 @@ select {
|
|
|
1009
953
|
display: none;
|
|
1010
954
|
}
|
|
1011
955
|
|
|
956
|
+
.s-aspect-square {
|
|
957
|
+
aspect-ratio: 1 / 1;
|
|
958
|
+
}
|
|
959
|
+
|
|
1012
960
|
.s-h-1\/2 {
|
|
1013
961
|
height: 50%;
|
|
1014
962
|
}
|
|
@@ -1025,6 +973,14 @@ select {
|
|
|
1025
973
|
height: 4rem;
|
|
1026
974
|
}
|
|
1027
975
|
|
|
976
|
+
.s-h-2 {
|
|
977
|
+
height: 0.5rem;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.s-h-2\.5 {
|
|
981
|
+
height: 0.625rem;
|
|
982
|
+
}
|
|
983
|
+
|
|
1028
984
|
.s-h-20 {
|
|
1029
985
|
height: 5rem;
|
|
1030
986
|
}
|
|
@@ -1165,6 +1121,14 @@ select {
|
|
|
1165
1121
|
width: 4rem;
|
|
1166
1122
|
}
|
|
1167
1123
|
|
|
1124
|
+
.s-w-2 {
|
|
1125
|
+
width: 0.5rem;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.s-w-2\.5 {
|
|
1129
|
+
width: 0.625rem;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1168
1132
|
.s-w-20 {
|
|
1169
1133
|
width: 5rem;
|
|
1170
1134
|
}
|
|
@@ -2021,6 +1985,11 @@ select {
|
|
|
2021
1985
|
border-color: rgb(249 168 212 / var(--tw-border-opacity));
|
|
2022
1986
|
}
|
|
2023
1987
|
|
|
1988
|
+
.s-border-primary-500 {
|
|
1989
|
+
--tw-border-opacity: 1;
|
|
1990
|
+
border-color: rgb(100 116 139 / var(--tw-border-opacity));
|
|
1991
|
+
}
|
|
1992
|
+
|
|
2024
1993
|
.s-border-purple-100 {
|
|
2025
1994
|
--tw-border-opacity: 1;
|
|
2026
1995
|
border-color: rgb(243 232 255 / var(--tw-border-opacity));
|
|
@@ -2741,7 +2710,7 @@ select {
|
|
|
2741
2710
|
|
|
2742
2711
|
.s-bg-primary-50 {
|
|
2743
2712
|
--tw-bg-opacity: 1;
|
|
2744
|
-
background-color: rgb(
|
|
2713
|
+
background-color: rgb(248 250 252 / var(--tw-bg-opacity));
|
|
2745
2714
|
}
|
|
2746
2715
|
|
|
2747
2716
|
.s-bg-purple-100 {
|
|
@@ -3278,6 +3247,10 @@ select {
|
|
|
3278
3247
|
--tw-gradient-to: #fde047 var(--tw-gradient-to-position);
|
|
3279
3248
|
}
|
|
3280
3249
|
|
|
3250
|
+
.s-fill-current {
|
|
3251
|
+
fill: currentColor;
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3281
3254
|
.s-object-cover {
|
|
3282
3255
|
-o-object-fit: cover;
|
|
3283
3256
|
object-fit: cover;
|
|
@@ -3714,6 +3687,10 @@ select {
|
|
|
3714
3687
|
color: rgb(16 185 129 / var(--tw-text-opacity));
|
|
3715
3688
|
}
|
|
3716
3689
|
|
|
3690
|
+
.s-text-current {
|
|
3691
|
+
color: currentColor;
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3717
3694
|
.s-text-cyan-700 {
|
|
3718
3695
|
--tw-text-opacity: 1;
|
|
3719
3696
|
color: rgb(14 116 144 / var(--tw-text-opacity));
|
|
@@ -3936,17 +3913,17 @@ select {
|
|
|
3936
3913
|
|
|
3937
3914
|
.s-text-primary-400 {
|
|
3938
3915
|
--tw-text-opacity: 1;
|
|
3939
|
-
color: rgb(
|
|
3916
|
+
color: rgb(148 163 184 / var(--tw-text-opacity));
|
|
3940
3917
|
}
|
|
3941
3918
|
|
|
3942
3919
|
.s-text-primary-700 {
|
|
3943
3920
|
--tw-text-opacity: 1;
|
|
3944
|
-
color: rgb(
|
|
3921
|
+
color: rgb(51 65 85 / var(--tw-text-opacity));
|
|
3945
3922
|
}
|
|
3946
3923
|
|
|
3947
3924
|
.s-text-primary-950 {
|
|
3948
3925
|
--tw-text-opacity: 1;
|
|
3949
|
-
color: rgb(
|
|
3926
|
+
color: rgb(2 6 23 / var(--tw-text-opacity));
|
|
3950
3927
|
}
|
|
3951
3928
|
|
|
3952
3929
|
.s-text-purple-700 {
|
|
@@ -4276,12 +4253,6 @@ select {
|
|
|
4276
4253
|
outline-offset: 2px;
|
|
4277
4254
|
}
|
|
4278
4255
|
|
|
4279
|
-
.s-ring-0 {
|
|
4280
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
4281
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
4282
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
4283
|
-
}
|
|
4284
|
-
|
|
4285
4256
|
.s-ring-1 {
|
|
4286
4257
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
4287
4258
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
@@ -4298,6 +4269,10 @@ select {
|
|
|
4298
4269
|
--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity));
|
|
4299
4270
|
}
|
|
4300
4271
|
|
|
4272
|
+
.s-ring-offset-background {
|
|
4273
|
+
--tw-ring-offset-color: #fff;
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4301
4276
|
.s-brightness-90 {
|
|
4302
4277
|
--tw-brightness: brightness(.9);
|
|
4303
4278
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
@@ -4611,11 +4586,6 @@ select {
|
|
|
4611
4586
|
border-color: rgb(239 68 68 / var(--tw-border-opacity));
|
|
4612
4587
|
}
|
|
4613
4588
|
|
|
4614
|
-
.hover\:s-bg-action-100:hover {
|
|
4615
|
-
--tw-bg-opacity: 1;
|
|
4616
|
-
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
4617
|
-
}
|
|
4618
|
-
|
|
4619
4589
|
.hover\:s-bg-action-200:hover {
|
|
4620
4590
|
--tw-bg-opacity: 1;
|
|
4621
4591
|
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
|
@@ -4709,14 +4679,19 @@ select {
|
|
|
4709
4679
|
border-color: rgb(239 68 68 / var(--tw-border-opacity));
|
|
4710
4680
|
}
|
|
4711
4681
|
|
|
4682
|
+
.focus\:s-bg-action-50-dark:focus {
|
|
4683
|
+
--tw-bg-opacity: 1;
|
|
4684
|
+
background-color: rgb(23 37 84 / var(--tw-bg-opacity));
|
|
4685
|
+
}
|
|
4686
|
+
|
|
4712
4687
|
.focus\:s-bg-primary-100:focus {
|
|
4713
4688
|
--tw-bg-opacity: 1;
|
|
4714
|
-
background-color: rgb(
|
|
4689
|
+
background-color: rgb(241 245 249 / var(--tw-bg-opacity));
|
|
4715
4690
|
}
|
|
4716
4691
|
|
|
4717
4692
|
.focus\:s-text-primary-950:focus {
|
|
4718
4693
|
--tw-text-opacity: 1;
|
|
4719
|
-
color: rgb(
|
|
4694
|
+
color: rgb(2 6 23 / var(--tw-text-opacity));
|
|
4720
4695
|
}
|
|
4721
4696
|
|
|
4722
4697
|
.focus\:s-outline-none:focus {
|
|
@@ -4753,7 +4728,7 @@ select {
|
|
|
4753
4728
|
|
|
4754
4729
|
.focus-visible\:s-border-primary-400:focus-visible {
|
|
4755
4730
|
--tw-border-opacity: 1;
|
|
4756
|
-
border-color: rgb(
|
|
4731
|
+
border-color: rgb(148 163 184 / var(--tw-border-opacity));
|
|
4757
4732
|
}
|
|
4758
4733
|
|
|
4759
4734
|
.focus-visible\:s-outline-none:focus-visible {
|
|
@@ -4777,11 +4752,6 @@ select {
|
|
|
4777
4752
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
4778
4753
|
}
|
|
4779
4754
|
|
|
4780
|
-
.active\:s-border-action-400:active {
|
|
4781
|
-
--tw-border-opacity: 1;
|
|
4782
|
-
border-color: rgb(96 165 250 / var(--tw-border-opacity));
|
|
4783
|
-
}
|
|
4784
|
-
|
|
4785
4755
|
.active\:s-border-action-500:active {
|
|
4786
4756
|
--tw-border-opacity: 1;
|
|
4787
4757
|
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
@@ -4817,11 +4787,6 @@ select {
|
|
|
4817
4787
|
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
|
4818
4788
|
}
|
|
4819
4789
|
|
|
4820
|
-
.active\:s-bg-action-200:active {
|
|
4821
|
-
--tw-bg-opacity: 1;
|
|
4822
|
-
background-color: rgb(191 219 254 / var(--tw-bg-opacity));
|
|
4823
|
-
}
|
|
4824
|
-
|
|
4825
4790
|
.active\:s-bg-action-600:active {
|
|
4826
4791
|
--tw-bg-opacity: 1;
|
|
4827
4792
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
|
|
@@ -4862,12 +4827,6 @@ select {
|
|
|
4862
4827
|
color: rgb(220 38 38 / var(--tw-text-opacity));
|
|
4863
4828
|
}
|
|
4864
4829
|
|
|
4865
|
-
.active\:s-ring-0:active {
|
|
4866
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
4867
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
4868
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4871
4830
|
.active\:s-brightness-100:active {
|
|
4872
4831
|
--tw-brightness: brightness(1);
|
|
4873
4832
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
@@ -4997,7 +4956,7 @@ select {
|
|
|
4997
4956
|
|
|
4998
4957
|
.data-\[disabled\]\:s-text-primary-400[data-disabled] {
|
|
4999
4958
|
--tw-text-opacity: 1;
|
|
5000
|
-
color: rgb(
|
|
4959
|
+
color: rgb(148 163 184 / var(--tw-text-opacity));
|
|
5001
4960
|
}
|
|
5002
4961
|
|
|
5003
4962
|
.data-\[state\=open\]\:s-animate-in[data-state=open] {
|
|
@@ -5294,11 +5253,6 @@ select {
|
|
|
5294
5253
|
border-color: rgb(59 130 246 / var(--tw-border-opacity));
|
|
5295
5254
|
}
|
|
5296
5255
|
|
|
5297
|
-
:is(.s-dark .dark\:hover\:s-border-action-600-dark:hover) {
|
|
5298
|
-
--tw-border-opacity: 1;
|
|
5299
|
-
border-color: rgb(96 165 250 / var(--tw-border-opacity));
|
|
5300
|
-
}
|
|
5301
|
-
|
|
5302
5256
|
:is(.s-dark .dark\:hover\:s-border-warning-300-dark:hover) {
|
|
5303
5257
|
--tw-border-opacity: 1;
|
|
5304
5258
|
border-color: rgb(185 28 28 / var(--tw-border-opacity));
|
|
@@ -5319,11 +5273,6 @@ select {
|
|
|
5319
5273
|
background-color: rgb(23 37 84 / var(--tw-bg-opacity));
|
|
5320
5274
|
}
|
|
5321
5275
|
|
|
5322
|
-
:is(.s-dark .dark\:hover\:s-bg-structure-200-dark:hover) {
|
|
5323
|
-
--tw-bg-opacity: 1;
|
|
5324
|
-
background-color: rgb(51 65 85 / var(--tw-bg-opacity));
|
|
5325
|
-
}
|
|
5326
|
-
|
|
5327
5276
|
:is(.s-dark .dark\:hover\:s-bg-warning-50-dark:hover) {
|
|
5328
5277
|
--tw-bg-opacity: 1;
|
|
5329
5278
|
background-color: rgb(69 10 10 / var(--tw-bg-opacity));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dust-tt/sparkle",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.267-rc-1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
|
|
6
6
|
"tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
|
|
@@ -97,10 +97,12 @@
|
|
|
97
97
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
98
98
|
"@radix-ui/react-label": "^2.1.0",
|
|
99
99
|
"@radix-ui/react-popover": "^1.1.2",
|
|
100
|
+
"@radix-ui/react-radio-group": "^1.2.1",
|
|
100
101
|
"@radix-ui/react-separator": "^1.1.0",
|
|
101
102
|
"@radix-ui/react-slot": "^1.1.0",
|
|
102
103
|
"@radix-ui/react-tooltip": "^1.1.3",
|
|
103
104
|
"@tanstack/react-table": "^8.13.0",
|
|
105
|
+
"class-variance-authority": "^0.7.0",
|
|
104
106
|
"clsx": "^2.1.1",
|
|
105
107
|
"emoji-mart": "^5.5.2",
|
|
106
108
|
"lottie-react": "^2.4.0",
|
package/src/components/Chip.tsx
CHANGED
|
@@ -24,11 +24,12 @@ type ChipProps = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const sizeClasses = {
|
|
27
|
-
xs: "s-
|
|
28
|
-
sm: "s-
|
|
27
|
+
xs: "s-h-7 s-text-xs s-font-medium s-px-3 s-gap-2",
|
|
28
|
+
sm: "s-h-9 s-text-sm s-font-semibold s-px-3 s-gap-2.5",
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const baseClasses =
|
|
31
|
+
const baseClasses =
|
|
32
|
+
"s-rounded-lg s-inline-flex s-box-border s-border s-items-center";
|
|
32
33
|
|
|
33
34
|
export function Chip({
|
|
34
35
|
size = "xs",
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import { cva, VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import { CircleIcon } from "@sparkle/icons";
|
|
6
|
+
import { cn } from "@sparkle/lib/utils";
|
|
7
|
+
|
|
8
|
+
const radioStyles = cva(
|
|
9
|
+
cn(
|
|
10
|
+
"s-aspect-square s-h-4 s-w-4 s-rounded-full s-border s-border-primary-500 s-text-foreground s-ring-offset-background",
|
|
11
|
+
"focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 focus-visible:s-ring-ring",
|
|
12
|
+
"disabled:s-cursor-not-allowed disabled:s-opacity-50",
|
|
13
|
+
"checked:s-ring-0 checked:s-bg-action-500"
|
|
14
|
+
),
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
xs: "s-h-4 s-w-4",
|
|
19
|
+
sm: "s-h-5 s-w-5",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "xs",
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const RadioGroup = React.forwardRef<
|
|
29
|
+
React.ElementRef<typeof RadioGroupPrimitive.Root>,
|
|
30
|
+
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
|
|
31
|
+
>(({ className, ...props }, ref) => {
|
|
32
|
+
return (
|
|
33
|
+
<RadioGroupPrimitive.Root
|
|
34
|
+
className={cn("s-grid s-gap-2", className)}
|
|
35
|
+
{...props}
|
|
36
|
+
ref={ref}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
41
|
+
|
|
42
|
+
interface RadioGroupItemProps
|
|
43
|
+
extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,
|
|
44
|
+
VariantProps<typeof radioStyles> {}
|
|
45
|
+
|
|
46
|
+
const RadioGroupItem = React.forwardRef<
|
|
47
|
+
React.ElementRef<typeof RadioGroupPrimitive.Item>,
|
|
48
|
+
RadioGroupItemProps
|
|
49
|
+
>(({ className, size = "xs", ...props }, ref) => {
|
|
50
|
+
return (
|
|
51
|
+
<RadioGroupPrimitive.Item
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(radioStyles({ size }), className)}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
<RadioGroupPrimitive.Indicator className="s-flex s-items-center s-justify-center">
|
|
57
|
+
<CircleIcon
|
|
58
|
+
className={cn(
|
|
59
|
+
size === "xs" ? "s-h-2.5 s-w-2.5" : "s-h-3 s-w-3",
|
|
60
|
+
"s-fill-current s-text-current focus:s-bg-action-50-dark"
|
|
61
|
+
)}
|
|
62
|
+
/>
|
|
63
|
+
</RadioGroupPrimitive.Indicator>
|
|
64
|
+
</RadioGroupPrimitive.Item>
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
68
|
+
|
|
69
|
+
export { RadioGroup, RadioGroupItem };
|
package/src/components/index.ts
CHANGED
|
@@ -62,7 +62,7 @@ export {
|
|
|
62
62
|
} from "./Popover";
|
|
63
63
|
export { Popup } from "./Popup";
|
|
64
64
|
export { PriceTable } from "./PriceTable";
|
|
65
|
-
export {
|
|
65
|
+
export { RadioGroup, RadioGroupItem } from "./RadioGroup"
|
|
66
66
|
export { Searchbar } from "./Searchbar";
|
|
67
67
|
export { Separator } from "./Separator";
|
|
68
68
|
export { SliderToggle } from "./SliderToggle";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
import { Label, RadioGroup, RadioGroupItem } from "@sparkle/index_with_tw_base";
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Primitives/RadioGroup",
|
|
8
|
+
} satisfies Meta;
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
export const RadioGroupExample = () => {
|
|
12
|
+
return (
|
|
13
|
+
<div className="s-flex s-flex-col s-gap-10">
|
|
14
|
+
<RadioGroup defaultValue="option-one">
|
|
15
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
16
|
+
<RadioGroupItem value="option-one" id="option-one" />
|
|
17
|
+
<Label htmlFor="option-one">Option One</Label>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
20
|
+
<RadioGroupItem value="option-two" id="option-two" />
|
|
21
|
+
<Label htmlFor="option-two">Option Two</Label>
|
|
22
|
+
</div>
|
|
23
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
24
|
+
<RadioGroupItem value="option-two" id="option-three"/>
|
|
25
|
+
<Label htmlFor="option-two">Option Three</Label>
|
|
26
|
+
</div>
|
|
27
|
+
</RadioGroup>
|
|
28
|
+
<RadioGroup defaultValue="option-one">
|
|
29
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
30
|
+
<RadioGroupItem value="option-one" id="option-one" size="sm" />
|
|
31
|
+
<Label htmlFor="option-one">Option One</Label>
|
|
32
|
+
</div>
|
|
33
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
34
|
+
<RadioGroupItem value="option-two" id="option-two" size="sm" />
|
|
35
|
+
<Label htmlFor="option-two">Option Two</Label>
|
|
36
|
+
</div>
|
|
37
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
38
|
+
<RadioGroupItem value="option-two" id="option-three" size="sm" />
|
|
39
|
+
<Label htmlFor="option-two">Option Three</Label>
|
|
40
|
+
</div>
|
|
41
|
+
</RadioGroup>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|