@embedreach/components 0.2.73 → 0.2.74
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/chunks/index.js +45 -50
- package/dist/index.umd.js +5 -5
- package/package.json +2 -4
package/dist/chunks/index.js
CHANGED
|
@@ -7,9 +7,8 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
|
7
7
|
import { jwtDecode } from "jwt-decode";
|
|
8
8
|
import { LDProvider, useLDClient, useFlags } from "launchdarkly-react-client-sdk";
|
|
9
9
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
10
|
-
import { cva } from "class-variance-authority";
|
|
11
|
-
import { X, Check, Radio, List, Calendar, CalendarPlus2, MailOpen, ExternalLink, TriangleAlert, MousePointerClick, ShieldBan, Banknote, Copy, ChevronLeft, Phone, AlertCircle, AlertTriangle, ChevronDown, Users, Search, User, Mail, Info, Send, ChevronRight, UserPen, Plus, Play, Maximize2, Timer, Zap, Minus, Circle, Pencil, InfoIcon, ChevronUp, Merge, CircleDashed, CircleDotDashed, CircleCheck, Menu, Loader2, ArrowRight, ChevronsUpDown, CalendarIcon, Trash2, Sparkles, Settings2, Palette, Eye, Heart, CheckCircle, Upload, Clock, Building2, ArrowLeft, MessageSquare, BarChart3, Shield, Settings, CircleX, GripVertical } from "lucide-react";
|
|
12
10
|
import { clsx } from "clsx";
|
|
11
|
+
import { X, Check, Radio, List, Calendar, CalendarPlus2, MailOpen, ExternalLink, TriangleAlert, MousePointerClick, ShieldBan, Banknote, Copy, ChevronLeft, Phone, AlertCircle, AlertTriangle, ChevronDown, Users, Search, User, Mail, Info, Send, ChevronRight, UserPen, Plus, Play, Maximize2, Timer, Zap, Minus, Circle, Pencil, InfoIcon, ChevronUp, Merge, CircleDashed, CircleDotDashed, CircleCheck, Menu, Loader2, ArrowRight, ChevronsUpDown, CalendarIcon, Trash2, Sparkles, Settings2, Palette, Eye, Heart, CheckCircle, Upload, Clock, Building2, ArrowLeft, MessageSquare, BarChart3, Shield, Settings, CircleX, GripVertical } from "lucide-react";
|
|
13
12
|
import { twMerge } from "tailwind-merge";
|
|
14
13
|
import { initReactI18next, I18nextProvider } from "react-i18next";
|
|
15
14
|
import i18n, { t as t$1 } from "i18next";
|
|
@@ -934,6 +933,46 @@ const LaunchDarklyProvider = ({
|
|
|
934
933
|
}
|
|
935
934
|
);
|
|
936
935
|
};
|
|
936
|
+
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
937
|
+
const cx = clsx;
|
|
938
|
+
const cva = (base2, config) => (props) => {
|
|
939
|
+
var _config_compoundVariants;
|
|
940
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base2, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
941
|
+
const { variants, defaultVariants } = config;
|
|
942
|
+
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
943
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
944
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
945
|
+
if (variantProp === null) return null;
|
|
946
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
947
|
+
return variants[variant][variantKey];
|
|
948
|
+
});
|
|
949
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
950
|
+
let [key, value] = param;
|
|
951
|
+
if (value === void 0) {
|
|
952
|
+
return acc;
|
|
953
|
+
}
|
|
954
|
+
acc[key] = value;
|
|
955
|
+
return acc;
|
|
956
|
+
}, {});
|
|
957
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
|
958
|
+
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
|
959
|
+
return Object.entries(compoundVariantOptions).every((param2) => {
|
|
960
|
+
let [key, value] = param2;
|
|
961
|
+
return Array.isArray(value) ? value.includes({
|
|
962
|
+
...defaultVariants,
|
|
963
|
+
...propsWithoutUndefined
|
|
964
|
+
}[key]) : {
|
|
965
|
+
...defaultVariants,
|
|
966
|
+
...propsWithoutUndefined
|
|
967
|
+
}[key] === value;
|
|
968
|
+
}) ? [
|
|
969
|
+
...acc,
|
|
970
|
+
cvClass,
|
|
971
|
+
cvClassName
|
|
972
|
+
] : acc;
|
|
973
|
+
}, []);
|
|
974
|
+
return cx(base2, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
975
|
+
};
|
|
937
976
|
function cn$1(...inputs) {
|
|
938
977
|
return twMerge(clsx(inputs));
|
|
939
978
|
}
|
|
@@ -9537,50 +9576,6 @@ const WizardFormWrapper = React__default.forwardRef(
|
|
|
9537
9576
|
}
|
|
9538
9577
|
);
|
|
9539
9578
|
WizardFormWrapper.displayName = "WizardFormWrapper";
|
|
9540
|
-
cva("", {
|
|
9541
|
-
variants: {
|
|
9542
|
-
mode: {
|
|
9543
|
-
onboarding: "",
|
|
9544
|
-
settings: ""
|
|
9545
|
-
},
|
|
9546
|
-
size: {
|
|
9547
|
-
default: "max-w-4xl",
|
|
9548
|
-
compact: "max-w-2xl",
|
|
9549
|
-
full: "max-w-full"
|
|
9550
|
-
}
|
|
9551
|
-
},
|
|
9552
|
-
defaultVariants: {
|
|
9553
|
-
mode: WIZARD_MODES.ONBOARDING,
|
|
9554
|
-
size: "default"
|
|
9555
|
-
}
|
|
9556
|
-
});
|
|
9557
|
-
cva(
|
|
9558
|
-
"border rounded-lg p-2 transition-all duration-200",
|
|
9559
|
-
{
|
|
9560
|
-
variants: {
|
|
9561
|
-
status: {
|
|
9562
|
-
active: "border-primary bg-primary/10",
|
|
9563
|
-
completed: "border-primary bg-primary text-primary-foreground",
|
|
9564
|
-
upcoming: "border-muted-foreground/30",
|
|
9565
|
-
skipped: "border-muted-foreground/30 opacity-50"
|
|
9566
|
-
}
|
|
9567
|
-
},
|
|
9568
|
-
defaultVariants: {
|
|
9569
|
-
status: "upcoming"
|
|
9570
|
-
}
|
|
9571
|
-
}
|
|
9572
|
-
);
|
|
9573
|
-
cva("relative flex h-full w-full", {
|
|
9574
|
-
variants: {
|
|
9575
|
-
layout: {
|
|
9576
|
-
default: "flex-row",
|
|
9577
|
-
vertical: "flex-col"
|
|
9578
|
-
}
|
|
9579
|
-
},
|
|
9580
|
-
defaultVariants: {
|
|
9581
|
-
layout: "default"
|
|
9582
|
-
}
|
|
9583
|
-
});
|
|
9584
9579
|
const COUNTRY_OPTIONS = [
|
|
9585
9580
|
{ code: "US", name: "United States" },
|
|
9586
9581
|
{ code: "AE", name: "United Arab Emirates" },
|
|
@@ -13488,15 +13483,15 @@ class ParseContext {
|
|
|
13488
13483
|
findPlace(node, marks, cautious) {
|
|
13489
13484
|
let route, sync;
|
|
13490
13485
|
for (let depth = this.open, penalty = 0; depth >= 0; depth--) {
|
|
13491
|
-
let
|
|
13492
|
-
let found2 =
|
|
13486
|
+
let cx2 = this.nodes[depth];
|
|
13487
|
+
let found2 = cx2.findWrapping(node);
|
|
13493
13488
|
if (found2 && (!route || route.length > found2.length + penalty)) {
|
|
13494
13489
|
route = found2;
|
|
13495
|
-
sync =
|
|
13490
|
+
sync = cx2;
|
|
13496
13491
|
if (!found2.length)
|
|
13497
13492
|
break;
|
|
13498
13493
|
}
|
|
13499
|
-
if (
|
|
13494
|
+
if (cx2.solid) {
|
|
13500
13495
|
if (cautious)
|
|
13501
13496
|
break;
|
|
13502
13497
|
penalty += 2;
|