@refraction-ui/react 0.3.7 → 0.3.9
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/index.cjs +376 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +366 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -11588,8 +11588,283 @@ var Pagination = React42__namespace.forwardRef(
|
|
|
11588
11588
|
}
|
|
11589
11589
|
);
|
|
11590
11590
|
Pagination.displayName = "Pagination";
|
|
11591
|
-
|
|
11592
|
-
|
|
11591
|
+
|
|
11592
|
+
// ../callout/dist/index.js
|
|
11593
|
+
function createCallout(props = {}) {
|
|
11594
|
+
const ariaProps = {};
|
|
11595
|
+
if (props.role) {
|
|
11596
|
+
ariaProps.role = props.role;
|
|
11597
|
+
} else {
|
|
11598
|
+
ariaProps.role = "region";
|
|
11599
|
+
}
|
|
11600
|
+
return {
|
|
11601
|
+
ariaProps,
|
|
11602
|
+
dataAttributes: { "data-slot": "callout" }
|
|
11603
|
+
};
|
|
11604
|
+
}
|
|
11605
|
+
function createCalloutIcon() {
|
|
11606
|
+
return { dataAttributes: { "data-slot": "callout-icon" } };
|
|
11607
|
+
}
|
|
11608
|
+
function createCalloutContent() {
|
|
11609
|
+
return { dataAttributes: { "data-slot": "callout-content" } };
|
|
11610
|
+
}
|
|
11611
|
+
function createCalloutTitle() {
|
|
11612
|
+
return { dataAttributes: { "data-slot": "callout-title" } };
|
|
11613
|
+
}
|
|
11614
|
+
function createCalloutDescription() {
|
|
11615
|
+
return { dataAttributes: { "data-slot": "callout-description" } };
|
|
11616
|
+
}
|
|
11617
|
+
var calloutVariants = cva({
|
|
11618
|
+
base: "relative w-full rounded-lg border p-4 text-sm flex gap-3",
|
|
11619
|
+
variants: {
|
|
11620
|
+
variant: {
|
|
11621
|
+
default: "bg-muted/50 border-border text-foreground",
|
|
11622
|
+
destructive: "bg-destructive/10 border-destructive/20 text-destructive",
|
|
11623
|
+
success: "bg-green-500/10 border-green-500/20 text-green-700 dark:text-green-400",
|
|
11624
|
+
warning: "bg-yellow-500/10 border-yellow-500/20 text-yellow-700 dark:text-yellow-400",
|
|
11625
|
+
info: "bg-blue-500/10 border-blue-500/20 text-blue-700 dark:text-blue-400"
|
|
11626
|
+
}
|
|
11627
|
+
},
|
|
11628
|
+
defaultVariants: {
|
|
11629
|
+
variant: "default"
|
|
11630
|
+
}
|
|
11631
|
+
});
|
|
11632
|
+
var calloutTitleVariants = cva({
|
|
11633
|
+
base: "font-semibold leading-none tracking-tight mb-1"
|
|
11634
|
+
});
|
|
11635
|
+
var calloutDescriptionVariants = cva({
|
|
11636
|
+
base: "text-sm opacity-90 leading-relaxed"
|
|
11637
|
+
});
|
|
11638
|
+
var Callout = React42__namespace.forwardRef(
|
|
11639
|
+
({ className, variant, ...props }, ref) => {
|
|
11640
|
+
const api = createCallout({ role: variant === "destructive" ? "alert" : "region" });
|
|
11641
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11642
|
+
"div",
|
|
11643
|
+
{
|
|
11644
|
+
ref,
|
|
11645
|
+
className: cn(calloutVariants({ variant }), className),
|
|
11646
|
+
...api.ariaProps,
|
|
11647
|
+
...api.dataAttributes,
|
|
11648
|
+
...props
|
|
11649
|
+
}
|
|
11650
|
+
);
|
|
11651
|
+
}
|
|
11652
|
+
);
|
|
11653
|
+
Callout.displayName = "Callout";
|
|
11654
|
+
var CalloutIcon = React42__namespace.forwardRef(
|
|
11655
|
+
({ className, ...props }, ref) => {
|
|
11656
|
+
const api = createCalloutIcon();
|
|
11657
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11658
|
+
"div",
|
|
11659
|
+
{
|
|
11660
|
+
ref,
|
|
11661
|
+
className: cn("flex-shrink-0 mt-0.5", className),
|
|
11662
|
+
...api.dataAttributes,
|
|
11663
|
+
...props
|
|
11664
|
+
}
|
|
11665
|
+
);
|
|
11666
|
+
}
|
|
11667
|
+
);
|
|
11668
|
+
CalloutIcon.displayName = "CalloutIcon";
|
|
11669
|
+
var CalloutContent = React42__namespace.forwardRef(
|
|
11670
|
+
({ className, ...props }, ref) => {
|
|
11671
|
+
const api = createCalloutContent();
|
|
11672
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11673
|
+
"div",
|
|
11674
|
+
{
|
|
11675
|
+
ref,
|
|
11676
|
+
className: cn("flex-1", className),
|
|
11677
|
+
...api.dataAttributes,
|
|
11678
|
+
...props
|
|
11679
|
+
}
|
|
11680
|
+
);
|
|
11681
|
+
}
|
|
11682
|
+
);
|
|
11683
|
+
CalloutContent.displayName = "CalloutContent";
|
|
11684
|
+
var CalloutTitle = React42__namespace.forwardRef(
|
|
11685
|
+
({ className, ...props }, ref) => {
|
|
11686
|
+
const api = createCalloutTitle();
|
|
11687
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11688
|
+
"h5",
|
|
11689
|
+
{
|
|
11690
|
+
ref,
|
|
11691
|
+
className: cn(calloutTitleVariants(), className),
|
|
11692
|
+
...api.dataAttributes,
|
|
11693
|
+
...props
|
|
11694
|
+
}
|
|
11695
|
+
);
|
|
11696
|
+
}
|
|
11697
|
+
);
|
|
11698
|
+
CalloutTitle.displayName = "CalloutTitle";
|
|
11699
|
+
var CalloutDescription = React42__namespace.forwardRef(
|
|
11700
|
+
({ className, ...props }, ref) => {
|
|
11701
|
+
const api = createCalloutDescription();
|
|
11702
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11703
|
+
"div",
|
|
11704
|
+
{
|
|
11705
|
+
ref,
|
|
11706
|
+
className: cn(calloutDescriptionVariants(), className),
|
|
11707
|
+
...api.dataAttributes,
|
|
11708
|
+
...props
|
|
11709
|
+
}
|
|
11710
|
+
);
|
|
11711
|
+
}
|
|
11712
|
+
);
|
|
11713
|
+
CalloutDescription.displayName = "CalloutDescription";
|
|
11714
|
+
|
|
11715
|
+
// ../steps/dist/index.js
|
|
11716
|
+
function createSteps() {
|
|
11717
|
+
return { dataAttributes: { "data-slot": "steps" } };
|
|
11718
|
+
}
|
|
11719
|
+
function createStep() {
|
|
11720
|
+
return { dataAttributes: { "data-slot": "step" } };
|
|
11721
|
+
}
|
|
11722
|
+
function createStepIndicator() {
|
|
11723
|
+
return { dataAttributes: { "data-slot": "step-indicator" } };
|
|
11724
|
+
}
|
|
11725
|
+
function createStepContent() {
|
|
11726
|
+
return { dataAttributes: { "data-slot": "step-content" } };
|
|
11727
|
+
}
|
|
11728
|
+
function createStepTitle() {
|
|
11729
|
+
return { dataAttributes: { "data-slot": "step-title" } };
|
|
11730
|
+
}
|
|
11731
|
+
function createStepDescription() {
|
|
11732
|
+
return { dataAttributes: { "data-slot": "step-description" } };
|
|
11733
|
+
}
|
|
11734
|
+
var stepsVariants = cva({
|
|
11735
|
+
base: "flex flex-col gap-0",
|
|
11736
|
+
variants: {
|
|
11737
|
+
orientation: {
|
|
11738
|
+
vertical: "flex-col",
|
|
11739
|
+
horizontal: "flex-row"
|
|
11740
|
+
}
|
|
11741
|
+
},
|
|
11742
|
+
defaultVariants: {
|
|
11743
|
+
orientation: "vertical"
|
|
11744
|
+
}
|
|
11745
|
+
});
|
|
11746
|
+
var stepVariants = cva({
|
|
11747
|
+
base: "flex gap-3",
|
|
11748
|
+
variants: {
|
|
11749
|
+
status: {
|
|
11750
|
+
completed: "text-foreground",
|
|
11751
|
+
active: "text-foreground",
|
|
11752
|
+
upcoming: "text-muted-foreground"
|
|
11753
|
+
}
|
|
11754
|
+
},
|
|
11755
|
+
defaultVariants: {
|
|
11756
|
+
status: "upcoming"
|
|
11757
|
+
}
|
|
11758
|
+
});
|
|
11759
|
+
var stepIndicatorVariants = cva({
|
|
11760
|
+
base: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold",
|
|
11761
|
+
variants: {
|
|
11762
|
+
status: {
|
|
11763
|
+
completed: "border-primary bg-primary text-primary-foreground",
|
|
11764
|
+
active: "border-primary bg-background text-primary",
|
|
11765
|
+
upcoming: "border-muted bg-background text-muted-foreground"
|
|
11766
|
+
}
|
|
11767
|
+
},
|
|
11768
|
+
defaultVariants: {
|
|
11769
|
+
status: "upcoming"
|
|
11770
|
+
}
|
|
11771
|
+
});
|
|
11772
|
+
var stepTitleVariants = cva({
|
|
11773
|
+
base: "font-semibold leading-none tracking-tight"
|
|
11774
|
+
});
|
|
11775
|
+
var stepDescriptionVariants = cva({
|
|
11776
|
+
base: "text-sm text-muted-foreground mt-1"
|
|
11777
|
+
});
|
|
11778
|
+
var Steps = React42__namespace.forwardRef(
|
|
11779
|
+
({ className, orientation, ...props }, ref) => {
|
|
11780
|
+
const api = createSteps();
|
|
11781
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11782
|
+
"div",
|
|
11783
|
+
{
|
|
11784
|
+
ref,
|
|
11785
|
+
className: cn(stepsVariants({ orientation }), className),
|
|
11786
|
+
...api.dataAttributes,
|
|
11787
|
+
...props
|
|
11788
|
+
}
|
|
11789
|
+
);
|
|
11790
|
+
}
|
|
11791
|
+
);
|
|
11792
|
+
Steps.displayName = "Steps";
|
|
11793
|
+
var Step = React42__namespace.forwardRef(
|
|
11794
|
+
({ className, status, ...props }, ref) => {
|
|
11795
|
+
const api = createStep();
|
|
11796
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11797
|
+
"div",
|
|
11798
|
+
{
|
|
11799
|
+
ref,
|
|
11800
|
+
className: cn(stepVariants({ status }), className),
|
|
11801
|
+
...api.dataAttributes,
|
|
11802
|
+
...props
|
|
11803
|
+
}
|
|
11804
|
+
);
|
|
11805
|
+
}
|
|
11806
|
+
);
|
|
11807
|
+
Step.displayName = "Step";
|
|
11808
|
+
var StepIndicator = React42__namespace.forwardRef(
|
|
11809
|
+
({ className, status, ...props }, ref) => {
|
|
11810
|
+
const api = createStepIndicator();
|
|
11811
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11812
|
+
"div",
|
|
11813
|
+
{
|
|
11814
|
+
ref,
|
|
11815
|
+
className: cn(stepIndicatorVariants({ status }), className),
|
|
11816
|
+
...api.dataAttributes,
|
|
11817
|
+
...props
|
|
11818
|
+
}
|
|
11819
|
+
);
|
|
11820
|
+
}
|
|
11821
|
+
);
|
|
11822
|
+
StepIndicator.displayName = "StepIndicator";
|
|
11823
|
+
var StepContent = React42__namespace.forwardRef(
|
|
11824
|
+
({ className, ...props }, ref) => {
|
|
11825
|
+
const api = createStepContent();
|
|
11826
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11827
|
+
"div",
|
|
11828
|
+
{
|
|
11829
|
+
ref,
|
|
11830
|
+
className: cn("flex-1 pb-8", className),
|
|
11831
|
+
...api.dataAttributes,
|
|
11832
|
+
...props
|
|
11833
|
+
}
|
|
11834
|
+
);
|
|
11835
|
+
}
|
|
11836
|
+
);
|
|
11837
|
+
StepContent.displayName = "StepContent";
|
|
11838
|
+
var StepTitle = React42__namespace.forwardRef(
|
|
11839
|
+
({ className, ...props }, ref) => {
|
|
11840
|
+
const api = createStepTitle();
|
|
11841
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11842
|
+
"h4",
|
|
11843
|
+
{
|
|
11844
|
+
ref,
|
|
11845
|
+
className: cn(stepTitleVariants(), className),
|
|
11846
|
+
...api.dataAttributes,
|
|
11847
|
+
...props
|
|
11848
|
+
}
|
|
11849
|
+
);
|
|
11850
|
+
}
|
|
11851
|
+
);
|
|
11852
|
+
StepTitle.displayName = "StepTitle";
|
|
11853
|
+
var StepDescription = React42__namespace.forwardRef(
|
|
11854
|
+
({ className, ...props }, ref) => {
|
|
11855
|
+
const api = createStepDescription();
|
|
11856
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11857
|
+
"p",
|
|
11858
|
+
{
|
|
11859
|
+
ref,
|
|
11860
|
+
className: cn(stepDescriptionVariants(), className),
|
|
11861
|
+
...api.dataAttributes,
|
|
11862
|
+
...props
|
|
11863
|
+
}
|
|
11864
|
+
);
|
|
11865
|
+
}
|
|
11866
|
+
);
|
|
11867
|
+
StepDescription.displayName = "StepDescription";
|
|
11593
11868
|
var FileTree = () => {
|
|
11594
11869
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11595
11870
|
};
|
|
@@ -11597,15 +11872,95 @@ var IconSystem = () => {
|
|
|
11597
11872
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11598
11873
|
};
|
|
11599
11874
|
|
|
11600
|
-
// ../
|
|
11601
|
-
|
|
11602
|
-
return
|
|
11603
|
-
}
|
|
11875
|
+
// ../skip-to-content/dist/index.js
|
|
11876
|
+
function createSkipToContent() {
|
|
11877
|
+
return { dataAttributes: { "data-slot": "skip-to-content" } };
|
|
11878
|
+
}
|
|
11879
|
+
var skipToContentVariants = cva({
|
|
11880
|
+
base: "fixed left-4 top-4 z-[100] -translate-y-16 rounded-md border bg-background px-4 py-2 text-sm font-medium shadow-md transition-transform focus:translate-y-0 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
|
11881
|
+
});
|
|
11882
|
+
var SkipToContent = React42__namespace.forwardRef(
|
|
11883
|
+
({ className, targetId = "main-content", children = "Skip to content", ...props }, ref) => {
|
|
11884
|
+
const api = createSkipToContent();
|
|
11885
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11886
|
+
"a",
|
|
11887
|
+
{
|
|
11888
|
+
ref,
|
|
11889
|
+
href: `#${targetId}`,
|
|
11890
|
+
className: cn(skipToContentVariants(), className),
|
|
11891
|
+
...api.dataAttributes,
|
|
11892
|
+
...props,
|
|
11893
|
+
children
|
|
11894
|
+
}
|
|
11895
|
+
);
|
|
11896
|
+
}
|
|
11897
|
+
);
|
|
11898
|
+
SkipToContent.displayName = "SkipToContent";
|
|
11604
11899
|
|
|
11605
|
-
// ../
|
|
11606
|
-
|
|
11607
|
-
return
|
|
11608
|
-
}
|
|
11900
|
+
// ../code-block/dist/index.js
|
|
11901
|
+
function createCodeBlock() {
|
|
11902
|
+
return { dataAttributes: { "data-slot": "code-block" } };
|
|
11903
|
+
}
|
|
11904
|
+
function createCodeBlockHeader() {
|
|
11905
|
+
return { dataAttributes: { "data-slot": "code-block-header" } };
|
|
11906
|
+
}
|
|
11907
|
+
function createCodeBlockContent() {
|
|
11908
|
+
return { dataAttributes: { "data-slot": "code-block-content" } };
|
|
11909
|
+
}
|
|
11910
|
+
var codeBlockVariants = cva({
|
|
11911
|
+
base: "relative overflow-hidden rounded-lg border bg-zinc-950 text-zinc-50 dark:bg-zinc-900"
|
|
11912
|
+
});
|
|
11913
|
+
var codeBlockHeaderVariants = cva({
|
|
11914
|
+
base: "flex items-center justify-between border-b border-zinc-800 bg-zinc-900/50 px-4 py-2 text-xs text-zinc-400"
|
|
11915
|
+
});
|
|
11916
|
+
var codeBlockContentVariants = cva({
|
|
11917
|
+
base: "overflow-x-auto p-4 text-sm font-mono leading-relaxed"
|
|
11918
|
+
});
|
|
11919
|
+
var CodeBlock = React42__namespace.forwardRef(
|
|
11920
|
+
({ className, ...props }, ref) => {
|
|
11921
|
+
const api = createCodeBlock();
|
|
11922
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11923
|
+
"div",
|
|
11924
|
+
{
|
|
11925
|
+
ref,
|
|
11926
|
+
className: cn(codeBlockVariants(), className),
|
|
11927
|
+
...api.dataAttributes,
|
|
11928
|
+
...props
|
|
11929
|
+
}
|
|
11930
|
+
);
|
|
11931
|
+
}
|
|
11932
|
+
);
|
|
11933
|
+
CodeBlock.displayName = "CodeBlock";
|
|
11934
|
+
var CodeBlockHeader = React42__namespace.forwardRef(
|
|
11935
|
+
({ className, ...props }, ref) => {
|
|
11936
|
+
const api = createCodeBlockHeader();
|
|
11937
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11938
|
+
"div",
|
|
11939
|
+
{
|
|
11940
|
+
ref,
|
|
11941
|
+
className: cn(codeBlockHeaderVariants(), className),
|
|
11942
|
+
...api.dataAttributes,
|
|
11943
|
+
...props
|
|
11944
|
+
}
|
|
11945
|
+
);
|
|
11946
|
+
}
|
|
11947
|
+
);
|
|
11948
|
+
CodeBlockHeader.displayName = "CodeBlockHeader";
|
|
11949
|
+
var CodeBlockContent = React42__namespace.forwardRef(
|
|
11950
|
+
({ className, ...props }, ref) => {
|
|
11951
|
+
const api = createCodeBlockContent();
|
|
11952
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11953
|
+
"pre",
|
|
11954
|
+
{
|
|
11955
|
+
ref,
|
|
11956
|
+
className: cn(codeBlockContentVariants(), className),
|
|
11957
|
+
...api.dataAttributes,
|
|
11958
|
+
...props
|
|
11959
|
+
}
|
|
11960
|
+
);
|
|
11961
|
+
}
|
|
11962
|
+
);
|
|
11963
|
+
CodeBlockContent.displayName = "CodeBlockContent";
|
|
11609
11964
|
|
|
11610
11965
|
// ../link-card/dist/index.js
|
|
11611
11966
|
function createLinkCard(_props = {}) {
|
|
@@ -11736,6 +12091,10 @@ exports.CATEGORY_LABELS = CATEGORY_LABELS;
|
|
|
11736
12091
|
exports.Calendar = Calendar;
|
|
11737
12092
|
exports.CalendarHeader = CalendarHeader;
|
|
11738
12093
|
exports.Callout = Callout;
|
|
12094
|
+
exports.CalloutContent = CalloutContent;
|
|
12095
|
+
exports.CalloutDescription = CalloutDescription;
|
|
12096
|
+
exports.CalloutIcon = CalloutIcon;
|
|
12097
|
+
exports.CalloutTitle = CalloutTitle;
|
|
11739
12098
|
exports.Card = Card2;
|
|
11740
12099
|
exports.CardContent = CardContent;
|
|
11741
12100
|
exports.CardDescription = CardDescription;
|
|
@@ -11749,6 +12108,8 @@ exports.CarouselItem = CarouselItem;
|
|
|
11749
12108
|
exports.CarouselTrigger = CarouselTrigger;
|
|
11750
12109
|
exports.Checkbox = Checkbox;
|
|
11751
12110
|
exports.CodeBlock = CodeBlock;
|
|
12111
|
+
exports.CodeBlockContent = CodeBlockContent;
|
|
12112
|
+
exports.CodeBlockHeader = CodeBlockHeader;
|
|
11752
12113
|
exports.CodeEditor = CodeEditor;
|
|
11753
12114
|
exports.Collapsible = Collapsible;
|
|
11754
12115
|
exports.CollapsibleContent = CollapsibleContent;
|
|
@@ -11843,6 +12204,11 @@ exports.SkipToContent = SkipToContent;
|
|
|
11843
12204
|
exports.SlideViewer = SlideViewer;
|
|
11844
12205
|
exports.StatsGrid = StatsGrid;
|
|
11845
12206
|
exports.StatusIndicator = StatusIndicator;
|
|
12207
|
+
exports.Step = Step;
|
|
12208
|
+
exports.StepContent = StepContent;
|
|
12209
|
+
exports.StepDescription = StepDescription;
|
|
12210
|
+
exports.StepIndicator = StepIndicator;
|
|
12211
|
+
exports.StepTitle = StepTitle;
|
|
11846
12212
|
exports.Steps = Steps;
|
|
11847
12213
|
exports.Switch = Switch;
|
|
11848
12214
|
exports.TableOfContents = TableOfContents;
|