@getgreenline/blaze-ui 1.0.12 → 1.0.14
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/components/button.d.ts +3 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +6 -4
- package/dist/components/label.d.ts +4 -1
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +3 -3
- package/dist/components/segmented-control.d.ts +24 -0
- package/dist/components/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control.js +88 -0
- package/dist/globals.css +252 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -4,8 +4,10 @@ declare const buttonVariants: (props?: ({
|
|
|
4
4
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function Button({ className, variant, size, asChild, ...
|
|
7
|
+
declare function Button({ className, variant, size, asChild, loading, loadingText, children, disabled: buttonDisabled, ...rest }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
loadingText?: string;
|
|
9
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export { Button, buttonVariants };
|
|
11
13
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,cAAc;;;8EA6BnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,OAAe,EACf,WAAuB,EACvB,QAAQ,EACR,QAAQ,EAAE,cAAc,EACxB,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,2CAuCF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime.js';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime.js';
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { LoaderCircleIcon } from 'lucide-react';
|
|
4
5
|
import { cn } from '../lib/utils.js';
|
|
5
6
|
|
|
6
|
-
const buttonVariants = cva("tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-all tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg:not([class*='size-'])]:size-4 tw:shrink-0 tw:[&_svg]:shrink-0 tw:outline-none tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:ring-[3px] tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive", {
|
|
7
|
+
const buttonVariants = cva("tw:relative tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-all tw:disabled:pointer-events-none tw:data-[disabled]:pointer-events-none tw:data-[loading]:pointer-events-none tw:disabled:opacity-50 tw:data-[disabled]:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg:not([class*='size-'])]:size-4 tw:shrink-0 tw:[&_svg]:shrink-0 tw:outline-none tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:ring-[3px] tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive", {
|
|
7
8
|
variants: {
|
|
8
9
|
variant: {
|
|
9
10
|
default: "tw:bg-primary tw:text-primary-foreground tw:shadow-xs tw:hover:bg-primary/90",
|
|
@@ -25,9 +26,10 @@ const buttonVariants = cva("tw:inline-flex tw:items-center tw:justify-center tw:
|
|
|
25
26
|
size: "default",
|
|
26
27
|
},
|
|
27
28
|
});
|
|
28
|
-
function Button({ className, variant, size, asChild = false, ...
|
|
29
|
+
function Button({ className, variant, size, asChild = false, loading = false, loadingText = "Loading", children, disabled: buttonDisabled, ...rest }) {
|
|
29
30
|
const Comp = asChild ? Slot : "button";
|
|
30
|
-
|
|
31
|
+
const isDisabled = Boolean(buttonDisabled || loading);
|
|
32
|
+
return (jsxs(Comp, { "data-slot": "button", "data-loading": loading ? "" : undefined, "data-disabled": isDisabled ? "" : undefined, className: cn(buttonVariants({ variant, size, className }), loading && "tw:cursor-progress"), disabled: !asChild ? isDisabled : undefined, "aria-disabled": isDisabled ? true : undefined, "aria-busy": loading || undefined, ...rest, children: [jsx("span", { className: cn("tw:inline-flex tw:items-center tw:justify-center tw:gap-[inherit] tw:transition-opacity", loading && "tw:opacity-0"), children: children }), loading ? (jsxs("span", { "data-slot": "button-spinner", className: "tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center", role: "status", "aria-live": "polite", children: [jsx(LoaderCircleIcon, { className: "tw:size-4 tw:animate-spin", "aria-hidden": "true" }), jsx("span", { className: "tw:sr-only", children: loadingText })] })) : null] }));
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export { Button, buttonVariants };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
|
|
3
|
+
interface LabelProps extends React.ComponentProps<typeof LabelPrimitive.Root> {
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function Label({ className, isRequired, children, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
export { Label };
|
|
5
8
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,2CAeZ;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
package/dist/components/label.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime.js';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime.js';
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
4
|
|
|
5
|
-
function Label({ className, ...props }) {
|
|
6
|
-
return (
|
|
5
|
+
function Label({ className, isRequired, children, ...props }) {
|
|
6
|
+
return (jsxs(LabelPrimitive.Root, { "data-slot": "label", className: cn("tw:flex tw:items-center tw:gap-2 tw:text-sm tw:leading-none tw:font-medium tw:select-none tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50", className), "aria-required": isRequired, ...props, children: [children, isRequired && jsx("span", { className: "tw:text-destructive", "aria-hidden": "true", children: "*" })] }));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { Label };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const segmentedControlVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
4
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const segmentedControlItemVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
interface SegmentedControlOption {
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
interface SegmentedControlProps extends VariantProps<typeof segmentedControlVariants> {
|
|
15
|
+
options: SegmentedControlOption[];
|
|
16
|
+
value: string;
|
|
17
|
+
onValueChange: (value: string) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
ariaLabelledBy?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { segmentedControlItemVariants, segmentedControlVariants };
|
|
24
|
+
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAOjE,QAAA,MAAM,wBAAwB;;;8EAwB7B,CAAA;AAED,QAAA,MAAM,4BAA4B;;;8EA8BjC,CAAA;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,qBAAsB,SAAQ,YAAY,CAAC,OAAO,wBAAwB,CAAC;IACnF,OAAO,EAAE,sBAAsB,EAAE,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,cAAc,EACd,OAAO,EACP,IAAI,GACL,EAAE,qBAAqB,2CA4EvB;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime.js';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
const segmentedControlVariants = cva("tw:inline-flex tw:items-center tw:gap-1 tw:rounded-md tw:border tw:p-1", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "tw:border-transparent tw:bg-muted",
|
|
10
|
+
destructive: "tw:border-destructive/20 tw:bg-destructive/10",
|
|
11
|
+
outline: "tw:border-input tw:bg-background",
|
|
12
|
+
secondary: "tw:border-transparent tw:bg-secondary/60",
|
|
13
|
+
ghost: "tw:border-transparent tw:bg-transparent",
|
|
14
|
+
link: "tw:border-transparent tw:bg-transparent",
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: "tw:p-1",
|
|
18
|
+
sm: "tw:p-0.5",
|
|
19
|
+
lg: "tw:p-1.5",
|
|
20
|
+
icon: "tw:p-1",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
size: "default",
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const segmentedControlItemVariants = cva("tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:rounded-md tw:text-sm tw:font-medium tw:transition-all tw:duration-200 tw:outline-none tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:ring-[3px] tw:focus-visible:ring-offset-2 tw:focus-visible:ring-offset-background tw:focus:z-10 tw:disabled:pointer-events-none tw:disabled:opacity-50", {
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
default: "tw:text-foreground/70 tw:hover:text-primary tw:hover:bg-primary/10 tw:data-[state=active]:bg-primary tw:data-[state=active]:text-primary-foreground tw:data-[state=active]:shadow-xs",
|
|
32
|
+
destructive: "tw:text-destructive tw:hover:text-destructive tw:hover:bg-destructive/10 tw:data-[state=active]:bg-destructive tw:data-[state=active]:text-white tw:data-[state=active]:shadow-xs",
|
|
33
|
+
outline: "tw:text-foreground/70 tw:hover:text-foreground tw:hover:bg-muted/50 tw:data-[state=active]:border tw:data-[state=active]:border-input tw:data-[state=active]:bg-background tw:data-[state=active]:text-foreground tw:data-[state=active]:shadow-xs",
|
|
34
|
+
secondary: "tw:text-secondary-foreground/80 tw:hover:text-secondary-foreground tw:hover:bg-secondary/60 tw:data-[state=active]:bg-secondary tw:data-[state=active]:text-secondary-foreground tw:data-[state=active]:shadow-xs",
|
|
35
|
+
ghost: "tw:text-foreground/80 tw:hover:text-foreground tw:hover:bg-accent/50 tw:data-[state=active]:bg-accent tw:data-[state=active]:text-accent-foreground tw:data-[state=active]:shadow-xs",
|
|
36
|
+
link: "tw:text-primary tw:hover:underline tw:data-[state=active]:text-primary tw:data-[state=active]:underline tw:data-[state=active]:shadow-none",
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
default: "tw:px-4 tw:py-2 tw:text-sm",
|
|
40
|
+
sm: "tw:px-3 tw:py-1.5 tw:text-xs",
|
|
41
|
+
lg: "tw:px-5 tw:py-2.5 tw:text-base",
|
|
42
|
+
icon: "tw:px-2 tw:py-2 tw:text-sm",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
variant: "default",
|
|
47
|
+
size: "default",
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }) {
|
|
51
|
+
const resolvedVariant = variant ?? "default";
|
|
52
|
+
const resolvedSize = size ?? "default";
|
|
53
|
+
const containerRef = useRef(null);
|
|
54
|
+
const handleKeyDown = (event, currentIndex) => {
|
|
55
|
+
let newIndex = currentIndex;
|
|
56
|
+
switch (event.key) {
|
|
57
|
+
case "ArrowLeft":
|
|
58
|
+
case "ArrowUp":
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
newIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1;
|
|
61
|
+
break;
|
|
62
|
+
case "ArrowRight":
|
|
63
|
+
case "ArrowDown":
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
newIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0;
|
|
66
|
+
break;
|
|
67
|
+
case "Home":
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
newIndex = 0;
|
|
70
|
+
break;
|
|
71
|
+
case "End":
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
newIndex = options.length - 1;
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
onValueChange(options[newIndex]?.value ?? "");
|
|
79
|
+
const buttons = containerRef.current?.querySelectorAll("button");
|
|
80
|
+
buttons?.[newIndex]?.focus();
|
|
81
|
+
};
|
|
82
|
+
return (jsx("div", { ref: containerRef, className: cn(segmentedControlVariants({ variant, size }), className), role: "tablist", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-orientation": "horizontal", "data-slot": "segmented-control", "data-variant": resolvedVariant, "data-size": resolvedSize, children: options.map((option, index) => {
|
|
83
|
+
const isSelected = value === option.value;
|
|
84
|
+
return (jsxs("button", { type: "button", role: "tab", "aria-selected": isSelected, "aria-controls": `panel-${option.value}`, id: `tab-${option.value}`, tabIndex: isSelected ? 0 : -1, onClick: () => onValueChange(option.value), onKeyDown: (e) => handleKeyDown(e, index), className: segmentedControlItemVariants({ variant, size }), "aria-describedby": isSelected ? `${option.value}-description` : undefined, "data-state": isSelected ? "active" : "inactive", "data-variant": resolvedVariant, "data-slot": "segmented-control-item", children: [option.label, isSelected && jsx("span", { className: "tw:sr-only", children: ", currently selected" })] }, option.value));
|
|
85
|
+
}) }));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { SegmentedControl, segmentedControlItemVariants, segmentedControlVariants };
|
package/dist/globals.css
CHANGED
|
@@ -164,4 +164,256 @@
|
|
|
164
164
|
body {
|
|
165
165
|
@apply tw:bg-background tw:text-foreground;
|
|
166
166
|
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Overrides of styles for homi-web */
|
|
170
|
+
.blaze-ui-homi button[data-slot='button'] {
|
|
171
|
+
color: initial;
|
|
172
|
+
background-color: initial;
|
|
173
|
+
border: none;
|
|
174
|
+
box-shadow: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.blaze-ui-homi button[data-slot='button'] {
|
|
178
|
+
@apply tw:rounded-md;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.blaze-ui-homi button[data-slot='switch'] {
|
|
182
|
+
@apply tw:rounded-full;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.blaze-ui-homi button[data-slot='button'].tw\:bg-primary {
|
|
186
|
+
@apply tw:bg-primary;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.blaze-ui-homi button[data-slot='button'].tw\:bg-destructive {
|
|
190
|
+
@apply tw:bg-destructive;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.blaze-ui-homi button[data-slot='button'].tw\:bg-secondary {
|
|
194
|
+
@apply tw:bg-secondary;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.blaze-ui-homi button[data-slot='button'].tw\:bg-background {
|
|
198
|
+
@apply tw:bg-background;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.blaze-ui-homi button[data-slot='button'].tw\:text-primary-foreground {
|
|
202
|
+
@apply tw:text-primary-foreground;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.blaze-ui-homi button[data-slot='button'].tw\:text-white {
|
|
206
|
+
@apply tw:text-white;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.blaze-ui-homi button[data-slot='button'].tw\:text-secondary-foreground {
|
|
210
|
+
@apply tw:text-secondary-foreground;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.blaze-ui-homi button[data-slot='button'].tw\:text-primary {
|
|
214
|
+
@apply tw:text-primary;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.blaze-ui-homi button[data-slot='button'].tw\:shadow-xs,
|
|
218
|
+
.blaze-ui-homi button[data-slot='switch'].tw\:shadow-xs {
|
|
219
|
+
@apply tw:shadow-xs;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.blaze-ui-homi button[data-slot='button'].tw\:border,
|
|
223
|
+
.blaze-ui-homi button[data-slot='switch'].tw\:border {
|
|
224
|
+
@apply tw:border tw:border-border;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Overrides of styles for */
|
|
228
|
+
.blaze-ui-420 {
|
|
229
|
+
--blaze-420-font-sm: 14px;
|
|
230
|
+
--blaze-420-font-base: 16px;
|
|
231
|
+
--blaze-420-line-sm: 20px;
|
|
232
|
+
--blaze-420-line-base: 24px;
|
|
233
|
+
--blaze-420-radius-md: 6px;
|
|
234
|
+
--blaze-420-radius-full: 9999px;
|
|
235
|
+
--blaze-420-space-1: 4px;
|
|
236
|
+
--blaze-420-space-2: 8px;
|
|
237
|
+
--blaze-420-space-3: 12px;
|
|
238
|
+
--blaze-420-space-4: 16px;
|
|
239
|
+
--blaze-420-space-6: 24px;
|
|
240
|
+
--blaze-420-height-9: 36px;
|
|
241
|
+
--blaze-420-switch-height: 18.4px;
|
|
242
|
+
--blaze-420-switch-width: 32px;
|
|
243
|
+
--blaze-420-thumb-size: 16px;
|
|
244
|
+
@apply tw:text-foreground tw:font-sans;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.blaze-ui-420 button[data-slot='button'],
|
|
248
|
+
.blaze-ui-420 button[data-slot='switch'] {
|
|
249
|
+
color: inherit;
|
|
250
|
+
background-color: transparent;
|
|
251
|
+
border: none;
|
|
252
|
+
box-shadow: none;
|
|
253
|
+
font: inherit;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.blaze-ui-420 button[data-slot='button'] {
|
|
257
|
+
min-height: var(--blaze-420-height-9);
|
|
258
|
+
height: var(--blaze-420-height-9);
|
|
259
|
+
padding: var(--blaze-420-space-2) var(--blaze-420-space-4);
|
|
260
|
+
border-radius: var(--blaze-420-radius-md);
|
|
261
|
+
gap: var(--blaze-420-space-2);
|
|
262
|
+
font-size: var(--blaze-420-font-sm);
|
|
263
|
+
line-height: var(--blaze-420-line-sm);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.blaze-ui-420 button[data-slot='button'].tw\:has-\[\>svg\]\:px-3,
|
|
267
|
+
.blaze-ui-420 button[data-slot='button']:has(> svg) {
|
|
268
|
+
padding-left: var(--blaze-420-space-3);
|
|
269
|
+
padding-right: var(--blaze-420-space-3);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.blaze-ui-420 button[data-slot='switch'] {
|
|
273
|
+
width: var(--blaze-420-switch-width);
|
|
274
|
+
min-width: var(--blaze-420-switch-width);
|
|
275
|
+
height: var(--blaze-420-switch-height);
|
|
276
|
+
padding: 0;
|
|
277
|
+
border-radius: var(--blaze-420-radius-full);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.blaze-ui-420 button[data-slot='switch']>[data-slot='switch-thumb'] {
|
|
281
|
+
width: var(--blaze-420-thumb-size);
|
|
282
|
+
height: var(--blaze-420-thumb-size);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.blaze-ui-420 button[data-slot='button'].tw\:bg-primary {
|
|
286
|
+
@apply tw:bg-primary;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.blaze-ui-420 button[data-slot='button'].tw\:bg-destructive {
|
|
290
|
+
@apply tw:bg-destructive;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.blaze-ui-420 button[data-slot='button'].tw\:bg-secondary {
|
|
294
|
+
@apply tw:bg-secondary;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.blaze-ui-420 button[data-slot='button'].tw\:bg-background {
|
|
298
|
+
@apply tw:bg-background;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.blaze-ui-420 button[data-slot='button'].tw\:text-primary-foreground {
|
|
302
|
+
@apply tw:text-primary-foreground;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.blaze-ui-420 button[data-slot='button'].tw\:text-white {
|
|
306
|
+
@apply tw:text-white;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.blaze-ui-420 button[data-slot='button'].tw\:text-secondary-foreground {
|
|
310
|
+
@apply tw:text-secondary-foreground;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.blaze-ui-420 button[data-slot='button'].tw\:text-primary {
|
|
314
|
+
@apply tw:text-primary;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.blaze-ui-420 button[data-slot='button'].tw\:shadow-xs,
|
|
318
|
+
.blaze-ui-420 button[data-slot='switch'].tw\:shadow-xs {
|
|
319
|
+
@apply tw:shadow-xs;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.blaze-ui-420 button[data-slot='button'].tw\:border,
|
|
323
|
+
.blaze-ui-420 button[data-slot='switch'].tw\:border {
|
|
324
|
+
@apply tw:border tw:border-border;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.blaze-ui-420 .tw\:rounded-md {
|
|
328
|
+
border-radius: var(--blaze-420-radius-md);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.blaze-ui-420 .tw\:gap-1 {
|
|
332
|
+
gap: var(--blaze-420-space-1);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.blaze-ui-420 .tw\:gap-2 {
|
|
336
|
+
gap: var(--blaze-420-space-2);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.blaze-ui-420 .tw\:gap-6 {
|
|
340
|
+
gap: var(--blaze-420-space-6);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.blaze-ui-420 .tw\:p-1 {
|
|
344
|
+
padding: var(--blaze-420-space-1);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.blaze-ui-420 .tw\:p-4 {
|
|
348
|
+
padding: var(--blaze-420-space-4);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.blaze-ui-420 .tw\:px-3 {
|
|
352
|
+
padding-left: var(--blaze-420-space-3);
|
|
353
|
+
padding-right: var(--blaze-420-space-3);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.blaze-ui-420 .tw\:px-4 {
|
|
357
|
+
padding-left: var(--blaze-420-space-4);
|
|
358
|
+
padding-right: var(--blaze-420-space-4);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.blaze-ui-420 .tw\:py-1 {
|
|
362
|
+
padding-top: var(--blaze-420-space-1);
|
|
363
|
+
padding-bottom: var(--blaze-420-space-1);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.blaze-ui-420 .tw\:py-2 {
|
|
367
|
+
padding-top: var(--blaze-420-space-2);
|
|
368
|
+
padding-bottom: var(--blaze-420-space-2);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.blaze-ui-420 .tw\:mr-4 {
|
|
372
|
+
margin-right: var(--blaze-420-space-4);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.blaze-ui-420 .tw\:h-9 {
|
|
376
|
+
height: var(--blaze-420-height-9);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.blaze-ui-420 .tw\:min-h-9 {
|
|
380
|
+
min-height: var(--blaze-420-height-9);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.blaze-ui-420 .tw\:size-4 {
|
|
384
|
+
width: var(--blaze-420-thumb-size);
|
|
385
|
+
height: var(--blaze-420-thumb-size);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.blaze-ui-420 .tw\:w-8 {
|
|
389
|
+
width: var(--blaze-420-switch-width);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.blaze-ui-420 .tw\:h-\[1\.15rem\] {
|
|
393
|
+
height: var(--blaze-420-switch-height);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.blaze-ui-420 .tw\:text-sm {
|
|
397
|
+
font-size: var(--blaze-420-font-sm);
|
|
398
|
+
line-height: var(--blaze-420-line-sm);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.blaze-ui-420 .tw\:text-base {
|
|
402
|
+
font-size: var(--blaze-420-font-base);
|
|
403
|
+
line-height: var(--blaze-420-line-base);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@media (min-width: 768px) {
|
|
407
|
+
.blaze-ui-420 .tw\:md\:text-sm {
|
|
408
|
+
font-size: var(--blaze-420-font-sm);
|
|
409
|
+
line-height: var(--blaze-420-line-sm);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.blaze-ui-420 .tw\:underline-offset-4 {
|
|
414
|
+
text-underline-offset: 4px;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.blaze-ui-420 a.tw\:ml-auto {
|
|
418
|
+
@apply tw:text-primary tw:hover:text-primary/90;
|
|
167
419
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export * from "./components/radio-group";
|
|
|
11
11
|
export * from "./components/scroll-area";
|
|
12
12
|
export * from "./components/select";
|
|
13
13
|
export * from "./components/sheet";
|
|
14
|
+
export * from "./components/segmented-control";
|
|
14
15
|
export * from "./lib/utils";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -11,4 +11,5 @@ export { RadioGroup, RadioGroupItem } from './components/radio-group.js';
|
|
|
11
11
|
export { ScrollArea, ScrollBar } from './components/scroll-area.js';
|
|
12
12
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select.js';
|
|
13
13
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from './components/sheet.js';
|
|
14
|
+
export { SegmentedControl, segmentedControlItemVariants, segmentedControlVariants } from './components/segmented-control.js';
|
|
14
15
|
export { cn } from './lib/utils.js';
|