ds-leobecker 0.1.0 → 0.2.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/README.md +84 -14
- package/dist/figma-variables.json +761 -0
- package/dist/tokens.json +193 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +22 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +20 -0
- package/dist/ui/button.d.ts +12 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +33 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +16 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +8 -0
- package/dist/ui/dialog.d.ts +20 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +22 -0
- package/dist/ui/dropdown-menu.d.ts +28 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +36 -0
- package/dist/ui/form.d.ts +24 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +65 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +8 -0
- package/dist/ui/label.d.ts +6 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +9 -0
- package/dist/ui/popover.d.ts +7 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +10 -0
- package/dist/ui/select.d.ts +14 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +26 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +20 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +12 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +10 -0
- package/package.json +81 -20
- package/src/components/accent-dot.tsx +11 -0
- package/src/components/background-pattern.tsx +36 -0
- package/src/components/badge-dot.tsx +34 -0
- package/src/components/index.ts +7 -0
- package/src/components/pill.tsx +22 -0
- package/src/components/stripe-button.tsx +49 -0
- package/src/index.ts +1 -0
- package/src/lib/utils.ts +6 -0
- package/src/theme.css +63 -5
- package/src/tokens/tokens.json +193 -0
- package/guidelines/components/badge-dot.md +0 -33
- package/guidelines/components/button.md +0 -39
- package/guidelines/components/overview.md +0 -14
- package/guidelines/foundations/color.md +0 -48
- package/guidelines/foundations/motion.md +0 -37
- package/guidelines/foundations/overview.md +0 -7
- package/guidelines/foundations/radius.md +0 -19
- package/guidelines/foundations/spacing.md +0 -36
- package/guidelines/foundations/typography.md +0 -29
- package/guidelines/overview.md +0 -26
- package/guidelines/setup.md +0 -26
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,8KAcV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/ui/input.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
|
+
return (_jsx("input", { type: type, className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className), ref: ref, ...props }));
|
|
6
|
+
});
|
|
7
|
+
Input.displayName = "Input";
|
|
8
|
+
export { Input };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
6
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,KAAK,4PAUT,CAAA;AAGF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/ui/label.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
7
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
|
|
8
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
9
|
+
export { Label };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
7
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,QAAA,MAAM,OAAO,yCAAwB,CAAA;AAErC,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,cAAc,gKAgBlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const Popover = PopoverPrimitive.Root;
|
|
7
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", className), ...props }) })));
|
|
9
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
10
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
14
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,WAAW,yGAAwB,CAAA;AAEzC,QAAA,MAAM,WAAW,0GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,oKAiBjB,CAAA;AAGF,QAAA,MAAM,oBAAoB,qKAcxB,CAAA;AAGF,QAAA,MAAM,sBAAsB,uKAc1B,CAAA;AAIF,QAAA,MAAM,aAAa,8JA6BjB,CAAA;AAGF,QAAA,MAAM,WAAW,4JASf,CAAA;AAGF,QAAA,MAAM,UAAU,2JAoBd,CAAA;AAGF,QAAA,MAAM,eAAe,gKASnB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const Select = SelectPrimitive.Root;
|
|
7
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
8
|
+
const SelectValue = SelectPrimitive.Value;
|
|
9
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })] })));
|
|
10
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
11
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
|
|
12
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
13
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
|
|
14
|
+
SelectScrollDownButton.displayName =
|
|
15
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
16
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" &&
|
|
17
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
18
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
|
|
19
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
20
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props })));
|
|
21
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
22
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
|
|
23
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
24
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
25
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
26
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
11
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,iHAWT,CAAA;AAGF,QAAA,MAAM,WAAW,+HAKf,CAAA;AAGF,QAAA,MAAM,SAAS,+HASb,CAAA;AAGF,QAAA,MAAM,WAAW,+HAYf,CAAA;AAGF,QAAA,MAAM,QAAQ,uHAYZ,CAAA;AAGF,QAAA,MAAM,SAAS,2HAYb,CAAA;AAGF,QAAA,MAAM,SAAS,2HASb,CAAA;AAGF,QAAA,MAAM,YAAY,+HAShB,CAAA;AAGF,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
package/dist/ui/table.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
const Table = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: "relative w-full overflow-auto", children: _jsx("table", { ref: ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })));
|
|
5
|
+
Table.displayName = "Table";
|
|
6
|
+
const TableHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("thead", { ref: ref, className: cn("[&_tr]:border-b", className), ...props })));
|
|
7
|
+
TableHeader.displayName = "TableHeader";
|
|
8
|
+
const TableBody = React.forwardRef(({ className, ...props }, ref) => (_jsx("tbody", { ref: ref, className: cn("[&_tr:last-child]:border-0", className), ...props })));
|
|
9
|
+
TableBody.displayName = "TableBody";
|
|
10
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("tfoot", { ref: ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })));
|
|
11
|
+
TableFooter.displayName = "TableFooter";
|
|
12
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className), ...props })));
|
|
13
|
+
TableRow.displayName = "TableRow";
|
|
14
|
+
const TableHead = React.forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className), ...props })));
|
|
15
|
+
TableHead.displayName = "TableHead";
|
|
16
|
+
const TableCell = React.forwardRef(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })));
|
|
17
|
+
TableCell.displayName = "TableCell";
|
|
18
|
+
const TableCaption = React.forwardRef(({ className, ...props }, ref) => (_jsx("caption", { ref: ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })));
|
|
19
|
+
TableCaption.displayName = "TableCaption";
|
|
20
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
8
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ui/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAA;AAIrD,QAAA,MAAM,IAAI,gGAAqB,CAAA;AAE/B,QAAA,MAAM,QAAQ,uJAYZ,CAAA;AAGF,QAAA,MAAM,WAAW,gKAYf,CAAA;AAGF,QAAA,MAAM,WAAW,0JAYf,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/tabs.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
const Tabs = TabsPrimitive.Root;
|
|
6
|
+
const TabsList = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className), ...props })));
|
|
7
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8
|
+
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className), ...props })));
|
|
9
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
10
|
+
const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className), ...props })));
|
|
11
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
12
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
8
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,QAAA,MAAM,eAAe,iDAA4B,CAAA;AAEjD,QAAA,MAAM,OAAO,yCAAwB,CAAA;AAErC,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,cAAc,gKAalB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
const TooltipProvider = TooltipPrimitive.Provider;
|
|
6
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
7
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
8
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]", className), ...props })));
|
|
9
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
10
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ds-leobecker",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "DS Leo Becker
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "DS Leo Becker — Tailwind 4 theme + shadcn/ui + 5 custom components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -10,36 +10,97 @@
|
|
|
10
10
|
"import": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts"
|
|
12
12
|
},
|
|
13
|
-
"./theme": "./src/theme.css"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"scripts": {
|
|
17
|
-
"generate": "npx tsx scripts/generate-theme.ts",
|
|
18
|
-
"build": "npm run generate && tsc",
|
|
19
|
-
"dev": "tsc --watch",
|
|
20
|
-
"showcase": "cd showcase && npm run dev",
|
|
21
|
-
"prepublishOnly": "npm run build"
|
|
13
|
+
"./theme": "./src/theme.css",
|
|
14
|
+
"./tokens": "./dist/tokens.json",
|
|
15
|
+
"./figma-variables": "./dist/figma-variables.json"
|
|
22
16
|
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src/theme.css",
|
|
20
|
+
"src/components",
|
|
21
|
+
"src/lib",
|
|
22
|
+
"src/tokens/tokens.json",
|
|
23
|
+
"src/index.ts"
|
|
24
|
+
],
|
|
23
25
|
"peerDependencies": {
|
|
24
26
|
"tailwindcss": ">=4.0.0"
|
|
25
27
|
},
|
|
26
28
|
"peerDependenciesMeta": {
|
|
27
|
-
"react": {
|
|
28
|
-
|
|
29
|
+
"react": {
|
|
30
|
+
"optional": true
|
|
31
|
+
},
|
|
32
|
+
"react-dom": {
|
|
33
|
+
"optional": true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@hookform/resolvers": "^5.2.2",
|
|
38
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
39
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
40
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
41
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
42
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
43
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
44
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
45
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
46
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
47
|
+
"class-variance-authority": "^0.7",
|
|
48
|
+
"clsx": "^2",
|
|
49
|
+
"lucide-react": "^1.8.0",
|
|
50
|
+
"react-hook-form": "^7.72.1",
|
|
51
|
+
"tailwind-merge": "^3",
|
|
52
|
+
"zod": "^4.3.6"
|
|
29
53
|
},
|
|
30
54
|
"devDependencies": {
|
|
55
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
56
|
+
"@changesets/cli": "^2.30.0",
|
|
57
|
+
"@storybook/addon-a11y": "^10.3.5",
|
|
58
|
+
"@storybook/addon-designs": "^11.1.3",
|
|
59
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
60
|
+
"@storybook/addon-themes": "^10.3.5",
|
|
61
|
+
"@storybook/react-vite": "^10.3.5",
|
|
62
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
63
|
+
"@types/node": "^22",
|
|
31
64
|
"@types/react": "^19",
|
|
32
65
|
"@types/react-dom": "^19",
|
|
33
|
-
"
|
|
34
|
-
"clsx": "^2",
|
|
66
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
35
67
|
"react": "^19",
|
|
36
68
|
"react-dom": "^19",
|
|
37
|
-
"
|
|
69
|
+
"storybook": "^10.3.5",
|
|
38
70
|
"tailwindcss": "^4.2",
|
|
71
|
+
"tsx": "^4",
|
|
39
72
|
"typescript": "^5.7",
|
|
40
|
-
"
|
|
73
|
+
"vite": "^5.4.21"
|
|
41
74
|
},
|
|
42
|
-
"keywords": [
|
|
75
|
+
"keywords": [
|
|
76
|
+
"design-system",
|
|
77
|
+
"tailwindcss",
|
|
78
|
+
"shadcn",
|
|
79
|
+
"brutalist",
|
|
80
|
+
"storybook"
|
|
81
|
+
],
|
|
43
82
|
"author": "Leo Becker <leo@leobecker.com>",
|
|
44
|
-
"license": "MIT"
|
|
45
|
-
|
|
83
|
+
"license": "MIT",
|
|
84
|
+
"repository": {
|
|
85
|
+
"type": "git",
|
|
86
|
+
"url": "https://github.com/leobeckerdesign/ds-leobecker.git"
|
|
87
|
+
},
|
|
88
|
+
"homepage": "https://leobeckerdesign.github.io/ds-leobecker/",
|
|
89
|
+
"bugs": {
|
|
90
|
+
"url": "https://github.com/leobeckerdesign/ds-leobecker/issues"
|
|
91
|
+
},
|
|
92
|
+
"publishConfig": {
|
|
93
|
+
"access": "public"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build:tokens": "tsx scripts/build-tokens.ts",
|
|
97
|
+
"build:package": "tsc",
|
|
98
|
+
"build": "pnpm run build:tokens && pnpm run build:package",
|
|
99
|
+
"dev": "tsc --watch",
|
|
100
|
+
"storybook": "storybook dev -p 6006",
|
|
101
|
+
"build-storybook": "storybook build -o storybook-static",
|
|
102
|
+
"changeset": "changeset",
|
|
103
|
+
"version-packages": "changeset version",
|
|
104
|
+
"release": "pnpm run build && changeset publish"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js'
|
|
2
|
+
|
|
3
|
+
export function AccentDot({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {
|
|
4
|
+
return (
|
|
5
|
+
<span
|
|
6
|
+
className={cn('inline-block size-2 bg-primary animate-blink', className)}
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js'
|
|
2
|
+
|
|
3
|
+
type PatternType = 'diagonal' | 'grid' | 'lines'
|
|
4
|
+
|
|
5
|
+
const patterns: Record<PatternType, { image: string; size?: string }> = {
|
|
6
|
+
diagonal: {
|
|
7
|
+
image: 'repeating-linear-gradient(45deg, currentColor 0px, currentColor 1px, transparent 1px, transparent 12px)',
|
|
8
|
+
},
|
|
9
|
+
grid: {
|
|
10
|
+
image: 'linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px)',
|
|
11
|
+
size: '24px 24px',
|
|
12
|
+
},
|
|
13
|
+
lines: {
|
|
14
|
+
image: 'linear-gradient(currentColor 1px, transparent 1px)',
|
|
15
|
+
size: '1px 24px',
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface BackgroundPatternProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20
|
+
pattern?: PatternType
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function BackgroundPattern({ pattern = 'diagonal', className, ...props }: BackgroundPatternProps) {
|
|
24
|
+
const p = patterns[pattern]
|
|
25
|
+
return (
|
|
26
|
+
<div
|
|
27
|
+
className={cn('absolute inset-0 pointer-events-none opacity-[0.04]', className)}
|
|
28
|
+
style={{
|
|
29
|
+
backgroundImage: p.image,
|
|
30
|
+
backgroundSize: p.size,
|
|
31
|
+
}}
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js'
|
|
2
|
+
import { type VariantProps, cva } from 'class-variance-authority'
|
|
3
|
+
|
|
4
|
+
const badgeVariants = cva(
|
|
5
|
+
'inline-flex items-center gap-2 font-mono text-xs uppercase tracking-wide',
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: 'text-muted-foreground',
|
|
10
|
+
success: '[&_.badge-dot]:bg-green-500',
|
|
11
|
+
error: '[&_.badge-dot]:bg-red-500',
|
|
12
|
+
warning: '[&_.badge-dot]:bg-yellow-500',
|
|
13
|
+
info: '[&_.badge-dot]:bg-blue-500',
|
|
14
|
+
muted: 'text-muted-foreground [&_.badge-dot]:bg-muted-foreground [&_.badge-dot]:!animate-none',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: { variant: 'default' },
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export interface BadgeDotProps
|
|
22
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
23
|
+
VariantProps<typeof badgeVariants> {
|
|
24
|
+
label: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function BadgeDot({ label, variant, className, ...props }: BadgeDotProps) {
|
|
28
|
+
return (
|
|
29
|
+
<div className={cn(badgeVariants({ variant }), className)} {...props}>
|
|
30
|
+
<span className="badge-dot size-2 shrink-0 bg-primary animate-blink" />
|
|
31
|
+
<span className="text-foreground">{label}</span>
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Custom components that shadcn/ui doesn't provide.
|
|
2
|
+
// Add your DS-specific components here.
|
|
3
|
+
export { BadgeDot, type BadgeDotProps } from './badge-dot.js'
|
|
4
|
+
export { StripeButton, type StripeButtonProps } from './stripe-button.js'
|
|
5
|
+
export { AccentDot } from './accent-dot.js'
|
|
6
|
+
export { BackgroundPattern, type BackgroundPatternProps } from './background-pattern.js'
|
|
7
|
+
export { Pill, type PillProps } from './pill.js'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js'
|
|
2
|
+
|
|
3
|
+
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
active?: boolean
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function Pill({ active, className, children, ...props }: PillProps) {
|
|
8
|
+
return (
|
|
9
|
+
<span
|
|
10
|
+
className={cn(
|
|
11
|
+
'inline-grid place-content-center h-5 px-2 border font-mono text-xs uppercase tracking-wide transition-colors',
|
|
12
|
+
active
|
|
13
|
+
? 'bg-muted text-foreground border-border'
|
|
14
|
+
: 'bg-card text-muted-foreground border-border',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</span>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from '../lib/utils.js'
|
|
2
|
+
import { type VariantProps, cva } from 'class-variance-authority'
|
|
3
|
+
import { forwardRef } from 'react'
|
|
4
|
+
|
|
5
|
+
const stripeButtonVariants = cva(
|
|
6
|
+
'relative inline-flex items-center justify-center gap-2 font-mono text-sm uppercase tracking-wide border transition-colors overflow-hidden disabled:opacity-50 disabled:pointer-events-none',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
primary: 'bg-card text-foreground border-border hover:border-primary hover:text-primary',
|
|
11
|
+
accent: 'bg-primary text-primary-foreground border-primary hover:bg-card hover:text-primary',
|
|
12
|
+
secondary: 'bg-card text-foreground border-border hover:border-primary',
|
|
13
|
+
ghost: 'bg-transparent text-muted-foreground border-transparent hover:text-foreground hover:bg-muted',
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: 'h-[22px] px-3 text-xs',
|
|
17
|
+
default: 'h-[28px] px-5 text-sm',
|
|
18
|
+
lg: 'h-[34px] px-7 text-base',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: { variant: 'primary', size: 'default' },
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
export interface StripeButtonProps
|
|
26
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
27
|
+
VariantProps<typeof stripeButtonVariants> {}
|
|
28
|
+
|
|
29
|
+
export const StripeButton = forwardRef<HTMLButtonElement, StripeButtonProps>(
|
|
30
|
+
({ variant, size, className, children, ...props }, ref) => {
|
|
31
|
+
return (
|
|
32
|
+
<button
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(stripeButtonVariants({ variant, size }), 'group', className)}
|
|
35
|
+
{...props}
|
|
36
|
+
>
|
|
37
|
+
<span className="relative z-10">{children}</span>
|
|
38
|
+
<span
|
|
39
|
+
className="absolute inset-0 opacity-0 group-hover:opacity-[0.08] transition-opacity duration-150 pointer-events-none"
|
|
40
|
+
style={{
|
|
41
|
+
backgroundImage: 'repeating-linear-gradient(45deg, transparent, transparent 4px, currentColor 4px, currentColor 5px)',
|
|
42
|
+
}}
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
/>
|
|
45
|
+
</button>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
StripeButton.displayName = 'StripeButton'
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js'
|
package/src/lib/utils.ts
ADDED
package/src/theme.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
@custom-variant dark (&:is(.dark *));
|
|
1
|
+
@custom-variant dark (&:is(.dark *, [data-theme="dark"] *));
|
|
2
|
+
@custom-variant light (&:is(.light *, [data-theme="light"] *));
|
|
2
3
|
|
|
3
4
|
@theme inline {
|
|
4
|
-
/* Semantic colors */
|
|
5
|
+
/* Semantic colors (reference CSS vars swapped per mode) */
|
|
5
6
|
--color-background: var(--background);
|
|
6
7
|
--color-background-secondary: var(--background-secondary);
|
|
7
8
|
--color-background-tertiary: var(--background-tertiary);
|
|
@@ -19,8 +20,20 @@
|
|
|
19
20
|
--color-error: var(--error);
|
|
20
21
|
--color-warning: var(--warning);
|
|
21
22
|
--color-info: var(--info);
|
|
23
|
+
--color-card: var(--card);
|
|
24
|
+
--color-card-foreground: var(--card-foreground);
|
|
25
|
+
--color-popover: var(--popover);
|
|
26
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
27
|
+
--color-muted: var(--muted);
|
|
28
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
29
|
+
--color-secondary: var(--secondary);
|
|
30
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
31
|
+
--color-accent: var(--accent);
|
|
32
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
33
|
+
--color-destructive: var(--destructive);
|
|
34
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
22
35
|
|
|
23
|
-
/* Raw palette */
|
|
36
|
+
/* Raw palette (mode-agnostic) */
|
|
24
37
|
--color-raw-orange-100: oklch(0.653 0.201 38.807);
|
|
25
38
|
--color-raw-orange-200: oklch(0.619 0.198 38.296);
|
|
26
39
|
--color-raw-orange-300: oklch(0.584 0.186 37.281);
|
|
@@ -122,8 +135,8 @@
|
|
|
122
135
|
}
|
|
123
136
|
}
|
|
124
137
|
|
|
138
|
+
/* Dark mode — default */
|
|
125
139
|
:root {
|
|
126
|
-
/* Semantic color tokens (OKLch) */
|
|
127
140
|
--background: oklch(0.159 0.030 176.115);
|
|
128
141
|
--background-secondary: oklch(0.219 0.041 177.325);
|
|
129
142
|
--background-tertiary: oklch(0.277 0.053 176.110);
|
|
@@ -141,11 +154,56 @@
|
|
|
141
154
|
--error: oklch(0.671 0.216 26.206);
|
|
142
155
|
--warning: oklch(0.844 0.173 92.183);
|
|
143
156
|
--info: oklch(0.693 0.161 253.127);
|
|
157
|
+
--card: oklch(0.219 0.041 177.325);
|
|
158
|
+
--card-foreground: oklch(0.778 0.057 93.050);
|
|
159
|
+
--popover: oklch(0.219 0.041 177.325);
|
|
160
|
+
--popover-foreground: oklch(0.778 0.057 93.050);
|
|
161
|
+
--muted: oklch(0.277 0.053 176.110);
|
|
162
|
+
--muted-foreground: oklch(0.610 0.040 164.746);
|
|
163
|
+
--secondary: oklch(0.277 0.053 176.110);
|
|
164
|
+
--secondary-foreground: oklch(0.778 0.057 93.050);
|
|
165
|
+
--accent: oklch(0.653 0.201 38.807);
|
|
166
|
+
--accent-foreground: oklch(0.159 0.030 176.115);
|
|
167
|
+
--destructive: oklch(0.671 0.216 26.206);
|
|
168
|
+
--destructive-foreground: oklch(0.897 0.053 96.455);
|
|
144
169
|
|
|
145
|
-
/* Radius */
|
|
146
170
|
--radius: 0rem;
|
|
147
171
|
}
|
|
148
172
|
|
|
173
|
+
/* Light mode override — apply class="light" or [data-theme="light"] on root */
|
|
174
|
+
.light,
|
|
175
|
+
[data-theme="light"] {
|
|
176
|
+
--background: oklch(0.897 0.053 96.455);
|
|
177
|
+
--background-secondary: oklch(0.832 0.058 96.076);
|
|
178
|
+
--background-tertiary: oklch(0.778 0.057 93.050);
|
|
179
|
+
--foreground: oklch(0.219 0.041 177.325);
|
|
180
|
+
--foreground-strong: oklch(0.159 0.030 176.115);
|
|
181
|
+
--foreground-muted: oklch(0.499 0.069 177.930);
|
|
182
|
+
--primary: oklch(0.653 0.201 38.807);
|
|
183
|
+
--primary-hover: oklch(0.584 0.186 37.281);
|
|
184
|
+
--primary-foreground: oklch(0.897 0.053 96.455);
|
|
185
|
+
--border: oklch(0.737 0.036 145.641);
|
|
186
|
+
--border-muted: oklch(0.778 0.057 93.050);
|
|
187
|
+
--input: oklch(0.832 0.058 96.076);
|
|
188
|
+
--ring: oklch(0.619 0.198 38.296);
|
|
189
|
+
--success: oklch(0.826 0.193 141.291);
|
|
190
|
+
--error: oklch(0.671 0.216 26.206);
|
|
191
|
+
--warning: oklch(0.844 0.173 92.183);
|
|
192
|
+
--info: oklch(0.693 0.161 253.127);
|
|
193
|
+
--card: oklch(0.897 0.053 96.455);
|
|
194
|
+
--card-foreground: oklch(0.219 0.041 177.325);
|
|
195
|
+
--popover: oklch(0.897 0.053 96.455);
|
|
196
|
+
--popover-foreground: oklch(0.219 0.041 177.325);
|
|
197
|
+
--muted: oklch(0.832 0.058 96.076);
|
|
198
|
+
--muted-foreground: oklch(0.499 0.069 177.930);
|
|
199
|
+
--secondary: oklch(0.832 0.058 96.076);
|
|
200
|
+
--secondary-foreground: oklch(0.219 0.041 177.325);
|
|
201
|
+
--accent: oklch(0.653 0.201 38.807);
|
|
202
|
+
--accent-foreground: oklch(0.897 0.053 96.455);
|
|
203
|
+
--destructive: oklch(0.671 0.216 26.206);
|
|
204
|
+
--destructive-foreground: oklch(0.897 0.053 96.455);
|
|
205
|
+
}
|
|
206
|
+
|
|
149
207
|
@layer base {
|
|
150
208
|
* {
|
|
151
209
|
@apply border-border outline-ring/50;
|