@luxfi/ui 5.5.3 → 5.6.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/dist/accordion.cjs +213 -0
- package/dist/accordion.js +186 -0
- package/dist/alert.cjs +553 -0
- package/dist/alert.js +531 -0
- package/dist/avatar.cjs +149 -0
- package/dist/avatar.js +125 -0
- package/dist/badge.cjs +611 -0
- package/dist/badge.js +589 -0
- package/dist/button.cjs +689 -0
- package/dist/button.js +664 -0
- package/dist/checkbox.cjs +265 -0
- package/dist/checkbox.js +241 -0
- package/dist/close-button.cjs +73 -0
- package/dist/close-button.js +51 -0
- package/dist/collapsible.cjs +702 -0
- package/dist/collapsible.js +679 -0
- package/dist/color-mode.cjs +96 -0
- package/dist/color-mode.js +72 -0
- package/dist/dialog.cjs +279 -0
- package/dist/dialog.js +246 -0
- package/dist/drawer.cjs +207 -0
- package/dist/drawer.js +175 -0
- package/dist/empty-state.cjs +93 -0
- package/dist/empty-state.js +71 -0
- package/dist/field.cjs +183 -0
- package/dist/field.js +160 -0
- package/dist/heading.cjs +46 -0
- package/dist/heading.js +40 -0
- package/dist/icon-button.cjs +491 -0
- package/dist/icon-button.js +470 -0
- package/dist/image.cjs +572 -0
- package/dist/image.js +551 -0
- package/dist/index.cjs +5779 -0
- package/dist/index.js +5619 -0
- package/dist/input-group.cjs +155 -0
- package/dist/input-group.js +133 -0
- package/dist/input.cjs +65 -0
- package/dist/input.js +59 -0
- package/dist/link.cjs +630 -0
- package/dist/link.js +606 -0
- package/dist/menu.cjs +305 -0
- package/dist/menu.js +269 -0
- package/dist/pin-input.cjs +182 -0
- package/dist/pin-input.js +160 -0
- package/dist/popover.cjs +327 -0
- package/dist/popover.js +294 -0
- package/dist/progress-circle.cjs +152 -0
- package/dist/progress-circle.js +128 -0
- package/dist/progress.cjs +117 -0
- package/dist/progress.js +94 -0
- package/dist/provider.cjs +62 -0
- package/dist/provider.js +40 -0
- package/dist/radio.cjs +177 -0
- package/dist/radio.js +153 -0
- package/dist/rating.cjs +80 -0
- package/dist/rating.js +58 -0
- package/dist/select.cjs +791 -0
- package/dist/select.js +757 -0
- package/dist/separator.cjs +57 -0
- package/dist/separator.js +51 -0
- package/dist/skeleton.cjs +370 -0
- package/dist/skeleton.js +346 -0
- package/dist/slider.cjs +138 -0
- package/dist/slider.js +115 -0
- package/dist/switch.cjs +163 -0
- package/dist/switch.js +140 -0
- package/dist/table.cjs +1044 -0
- package/dist/table.js +1013 -0
- package/dist/tabs.cjs +240 -0
- package/dist/tabs.js +213 -0
- package/dist/tag.cjs +651 -0
- package/dist/tag.js +628 -0
- package/dist/textarea.cjs +65 -0
- package/dist/textarea.js +59 -0
- package/dist/toaster.cjs +99 -0
- package/dist/toaster.js +96 -0
- package/dist/tooltip.cjs +171 -0
- package/dist/tooltip.js +148 -0
- package/dist/utils.cjs +11 -0
- package/dist/utils.js +9 -0
- package/package.json +270 -65
- package/src/accordion.tsx +285 -0
- package/src/alert.tsx +221 -0
- package/src/avatar.tsx +174 -0
- package/src/badge.tsx +158 -0
- package/src/button.tsx +411 -0
- package/src/checkbox.tsx +307 -0
- package/src/close-button.tsx +51 -0
- package/src/collapsible.tsx +126 -0
- package/src/color-mode.tsx +125 -0
- package/src/dialog.tsx +356 -0
- package/src/drawer.tsx +186 -0
- package/src/empty-state.tsx +97 -0
- package/src/field.tsx +202 -0
- package/src/heading.tsx +55 -0
- package/src/icon-button.tsx +192 -0
- package/src/image.tsx +280 -0
- package/src/index.ts +192 -0
- package/src/input-group.tsx +159 -0
- package/src/input.tsx +60 -0
- package/src/link.tsx +326 -0
- package/src/menu.tsx +471 -0
- package/src/pin-input.tsx +187 -0
- package/src/popover.tsx +400 -0
- package/src/progress-circle.tsx +180 -0
- package/src/progress.tsx +109 -0
- package/src/provider.tsx +12 -0
- package/src/radio.tsx +175 -0
- package/src/rating.tsx +79 -0
- package/src/select.tsx +696 -0
- package/src/separator.tsx +59 -0
- package/src/skeleton.tsx +302 -0
- package/src/slider.tsx +152 -0
- package/src/switch.tsx +158 -0
- package/src/table.tsx +621 -0
- package/src/tabs.tsx +354 -0
- package/src/tag.tsx +159 -0
- package/src/textarea.tsx +60 -0
- package/src/toaster.tsx +117 -0
- package/src/tokens.css +438 -0
- package/src/tooltip.tsx +184 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils.ts +6 -0
- package/tokens.css +438 -0
- package/commerce/ui/conf.ts +0 -13
- package/commerce/ui/context.tsx +0 -123
- package/commerce/ui/store.ts +0 -295
- package/components/access-code-input.tsx +0 -71
- package/components/analytics.tsx +0 -23
- package/components/auth/auth-listener.tsx +0 -29
- package/components/auth/auth-token/clear-auth-token.tsx +0 -12
- package/components/auth/auth-token/set-auth-token.tsx +0 -16
- package/components/auth/common-auth-domains.ts +0 -17
- package/components/auth/login-panel.tsx +0 -111
- package/components/auth/mobile-login-button.tsx +0 -107
- package/components/auth/signup-panel.tsx +0 -113
- package/components/back-button.tsx +0 -49
- package/components/chat-widget.tsx +0 -85
- package/components/commerce/bag-button.tsx +0 -98
- package/components/commerce/buy-button.tsx +0 -34
- package/components/commerce/checkout-button.tsx +0 -129
- package/components/commerce/checkout-panel/cart-accordian.tsx +0 -66
- package/components/commerce/checkout-panel/checkout-panel-props.ts +0 -10
- package/components/commerce/checkout-panel/desktop-bag-carousel.tsx +0 -36
- package/components/commerce/checkout-panel/desktop-cp.tsx +0 -83
- package/components/commerce/checkout-panel/index.tsx +0 -126
- package/components/commerce/checkout-panel/mobile-cp.tsx +0 -67
- package/components/commerce/checkout-panel/policy-links.tsx +0 -29
- package/components/commerce/checkout-panel/steps-indicator.tsx +0 -39
- package/components/commerce/checkout-panel/thank-you.tsx +0 -18
- package/components/commerce/desktop-bag-popup.tsx +0 -78
- package/components/commerce/drawer/index.tsx +0 -88
- package/components/commerce/drawer/micro.tsx +0 -145
- package/components/commerce/drawer/shell.tsx +0 -85
- package/components/contact-dialog/contact-form.tsx +0 -116
- package/components/contact-dialog/disclaimer.tsx +0 -13
- package/components/contact-dialog/index.tsx +0 -64
- package/components/copyright.tsx +0 -21
- package/components/drawer-margin.tsx +0 -28
- package/components/footer.tsx +0 -78
- package/components/header/desktop-nav-menu.tsx +0 -204
- package/components/header/desktop.tsx +0 -65
- package/components/header/index.tsx +0 -50
- package/components/header/mobile-bag-drawer.tsx +0 -51
- package/components/header/mobile-menu-toggle-button.tsx +0 -35
- package/components/header/mobile-nav-menu-ai.tsx +0 -51
- package/components/header/mobile-nav-menu-item.tsx +0 -47
- package/components/header/mobile-nav-menu.tsx +0 -102
- package/components/header/mobile.tsx +0 -170
- package/components/header/theme-toggle.tsx +0 -26
- package/components/icons/avatar.tsx +0 -11
- package/components/icons/bag-icon.tsx +0 -10
- package/components/icons/index.ts +0 -6
- package/components/icons/left-arrow.tsx +0 -11
- package/components/icons/lux-logo.tsx +0 -10
- package/components/icons/right-arrow.tsx +0 -10
- package/components/icons/social-icon.tsx +0 -35
- package/components/icons/social-svg.css +0 -3
- package/components/index.ts +0 -26
- package/components/logo.tsx +0 -92
- package/components/main.tsx +0 -27
- package/components/mini-chart/index.tsx +0 -8
- package/components/mini-chart/mini-chart-props.ts +0 -44
- package/components/mini-chart/mini-chart.tsx +0 -85
- package/components/mini-chart/wrapper.tsx +0 -23
- package/components/not-found/index.tsx +0 -28
- package/components/not-found/not-found-content.mdx +0 -5
- package/components/tooltip.tsx +0 -31
- package/environment.d.ts +0 -6
- package/next/analytics/fpixel.ts +0 -16
- package/next/analytics/google-analytics.ts +0 -14
- package/next/analytics/index.ts +0 -3
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/font/get-app-router-font-classes.ts +0 -17
- package/next/font/load-and-return-lux-next-fonts-on-import.ts +0 -68
- package/next/font/local/Druk-Wide-Bold.ttf +0 -0
- package/next/font/local/Druk-Wide-Medium.ttf +0 -0
- package/next/font/local/InterVariable-Italic.ttf +0 -0
- package/next/font/local/InterVariable-Italic.woff2 +0 -0
- package/next/font/local/InterVariable.ttf +0 -0
- package/next/font/local/InterVariable.woff2 +0 -0
- package/next/font/next-font-desc.ts +0 -28
- package/next/font/pages-router-font-vars.tsx +0 -18
- package/next/head-metadata/from-next/metadata-types.ts +0 -158
- package/next/head-metadata/from-next/opengraph-types.ts +0 -267
- package/next/head-metadata/from-next/twitter-types.ts +0 -92
- package/next/head-metadata/index.tsx +0 -208
- package/next/index.ts +0 -2
- package/next/middleware/determine-device-mw.ts +0 -29
- package/root-layout/WHY_THIS_IS_SEPARATE.txt +0 -2
- package/root-layout/index.tsx +0 -112
- package/site-def/footer/community.tsx +0 -61
- package/site-def/footer/company.ts +0 -37
- package/site-def/footer/ecosystem.ts +0 -37
- package/site-def/footer/index.tsx +0 -26
- package/site-def/footer/legal.ts +0 -28
- package/site-def/footer/network.ts +0 -45
- package/site-def/footer/svg/warpcast-logo.svg +0 -12
- package/site-def/index.ts +0 -4
- package/site-def/main-nav.tsx +0 -460
- package/style/cart-animation.css +0 -29
- package/style/checkout-animation.css +0 -23
- package/style/drawer-handle-overrides.css +0 -160
- package/style/fonts/COPY_TO_PUBLIC_FOR_NON_NEXT.txt +0 -0
- package/style/fonts/Druk-Wide-Bold.ttf +0 -0
- package/style/fonts/Druk-Wide-Medium.ttf +0 -0
- package/style/fonts/InterVariable-Italic.ttf +0 -0
- package/style/fonts/InterVariable-Italic.woff2 +0 -0
- package/style/fonts/InterVariable.ttf +0 -0
- package/style/fonts/InterVariable.woff2 +0 -0
- package/style/lux-colors.css +0 -85
- package/style/lux-fonts.css +0 -30
- package/style/lux-global-non-next.css +0 -52
- package/style/lux-global.css +0 -51
- package/tailwind/fontFamily.tailwind.lux.ts +0 -18
- package/tailwind/index.ts +0 -2
- package/tailwind/lux-tw-fonts.ts +0 -40
- package/tailwind/tailwind.config.lux-preset.ts +0 -10
- package/tsconfig.json +0 -15
- package/types/chatbot-config.ts +0 -7
- package/types/chatbot-suggested-question.ts +0 -7
- package/types/contact-info.ts +0 -11
- package/types/index.ts +0 -4
- package/types/site-def.ts +0 -46
package/dist/popover.js
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
3
|
+
import * as React2 from 'react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
// src/popover.tsx
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
var CLOSE_ICON_PATH = "M9.44 8.035a.791.791 0 0 0 1.12 0l3.802-3.803a.791.791 0 0 1 1.119 0l.287.287a.79.79 0 0 1 0 1.119L11.965 9.44a.79.79 0 0 0 0 1.118l3.803 3.803a.791.791 0 0 1 0 1.119l-.287.287a.791.791 0 0 1-1.119 0l-3.803-3.803a.79.79 0 0 0-1.118 0l-3.803 3.803a.79.79 0 0 1-1.119 0l-.287-.287a.791.791 0 0 1 0-1.119l3.803-3.803a.791.791 0 0 0 0-1.118L4.232 5.638a.791.791 0 0 1 0-1.119l.287-.287a.791.791 0 0 1 1.119 0L9.44 8.035Z";
|
|
13
|
+
var CloseButton = React2.forwardRef(function CloseButton2(props, ref) {
|
|
14
|
+
const { variant: _variant, size: _size, className, children, ...rest } = props;
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"button",
|
|
17
|
+
{
|
|
18
|
+
type: "button",
|
|
19
|
+
"aria-label": "Close",
|
|
20
|
+
ref,
|
|
21
|
+
className: cn(
|
|
22
|
+
"inline-flex items-center justify-center",
|
|
23
|
+
"size-5 min-w-0 shrink-0 p-0",
|
|
24
|
+
"rounded-sm border-0 overflow-hidden",
|
|
25
|
+
"bg-transparent text-[var(--closeButton-fg,currentColor)]",
|
|
26
|
+
"hover:bg-transparent hover:text-[var(--hover-color,currentColor)]",
|
|
27
|
+
"disabled:opacity-40",
|
|
28
|
+
"cursor-pointer",
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...rest,
|
|
32
|
+
children: children ?? /* @__PURE__ */ jsx(
|
|
33
|
+
"svg",
|
|
34
|
+
{
|
|
35
|
+
className: "size-5",
|
|
36
|
+
viewBox: "0 0 20 20",
|
|
37
|
+
fill: "none",
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
children: /* @__PURE__ */ jsx(
|
|
40
|
+
"path",
|
|
41
|
+
{
|
|
42
|
+
d: CLOSE_ICON_PATH,
|
|
43
|
+
fill: "currentColor"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
function parsePlacement(placement) {
|
|
52
|
+
if (!placement) {
|
|
53
|
+
return { side: "bottom", align: "start" };
|
|
54
|
+
}
|
|
55
|
+
const parts = placement.split("-");
|
|
56
|
+
const side = parts[0] ?? "bottom";
|
|
57
|
+
const alignPart = parts[1];
|
|
58
|
+
let align = "center";
|
|
59
|
+
if (alignPart === "start") {
|
|
60
|
+
align = "start";
|
|
61
|
+
} else if (alignPart === "end") {
|
|
62
|
+
align = "end";
|
|
63
|
+
}
|
|
64
|
+
return { side, align };
|
|
65
|
+
}
|
|
66
|
+
var PositioningContext = React2.createContext({
|
|
67
|
+
side: "bottom",
|
|
68
|
+
align: "start",
|
|
69
|
+
sideOffset: 4,
|
|
70
|
+
alignOffset: 0,
|
|
71
|
+
collisionPadding: 4,
|
|
72
|
+
autoFocus: false,
|
|
73
|
+
closeOnInteractOutside: true
|
|
74
|
+
});
|
|
75
|
+
var PopoverRoot = (props) => {
|
|
76
|
+
const {
|
|
77
|
+
children,
|
|
78
|
+
open,
|
|
79
|
+
defaultOpen,
|
|
80
|
+
onOpenChange,
|
|
81
|
+
positioning,
|
|
82
|
+
autoFocus = false,
|
|
83
|
+
closeOnInteractOutside = true,
|
|
84
|
+
modal = false,
|
|
85
|
+
// lazyMount and unmountOnExit are handled via forceMount on Portal/Content
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
87
|
+
lazyMount: _lazyMount,
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
89
|
+
unmountOnExit: _unmountOnExit
|
|
90
|
+
} = props;
|
|
91
|
+
const mergedPositioning = {
|
|
92
|
+
placement: "bottom-start",
|
|
93
|
+
overflowPadding: 4,
|
|
94
|
+
...positioning,
|
|
95
|
+
offset: {
|
|
96
|
+
mainAxis: 4,
|
|
97
|
+
...positioning?.offset
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const { side, align } = parsePlacement(mergedPositioning.placement);
|
|
101
|
+
const positioningValue = React2.useMemo(() => ({
|
|
102
|
+
side,
|
|
103
|
+
align,
|
|
104
|
+
sideOffset: mergedPositioning.offset?.mainAxis ?? 4,
|
|
105
|
+
alignOffset: mergedPositioning.offset?.crossAxis ?? 0,
|
|
106
|
+
collisionPadding: mergedPositioning.overflowPadding ?? 4,
|
|
107
|
+
autoFocus,
|
|
108
|
+
closeOnInteractOutside
|
|
109
|
+
}), [
|
|
110
|
+
side,
|
|
111
|
+
align,
|
|
112
|
+
mergedPositioning.offset?.mainAxis,
|
|
113
|
+
mergedPositioning.offset?.crossAxis,
|
|
114
|
+
mergedPositioning.overflowPadding,
|
|
115
|
+
autoFocus,
|
|
116
|
+
closeOnInteractOutside
|
|
117
|
+
]);
|
|
118
|
+
const handleOpenChange = React2.useCallback((isOpen) => {
|
|
119
|
+
onOpenChange?.({ open: isOpen });
|
|
120
|
+
}, [onOpenChange]);
|
|
121
|
+
return /* @__PURE__ */ jsx(PositioningContext.Provider, { value: positioningValue, children: /* @__PURE__ */ jsx(
|
|
122
|
+
RadixPopover.Root,
|
|
123
|
+
{
|
|
124
|
+
open,
|
|
125
|
+
defaultOpen,
|
|
126
|
+
onOpenChange: handleOpenChange,
|
|
127
|
+
modal,
|
|
128
|
+
children
|
|
129
|
+
}
|
|
130
|
+
) });
|
|
131
|
+
};
|
|
132
|
+
var PopoverTrigger = React2.forwardRef(function PopoverTrigger2(props, ref) {
|
|
133
|
+
const { asChild = true, ...rest } = props;
|
|
134
|
+
return /* @__PURE__ */ jsx(RadixPopover.Trigger, { asChild, ref, ...rest });
|
|
135
|
+
});
|
|
136
|
+
var PopoverContent = React2.forwardRef(function PopoverContent2(props, ref) {
|
|
137
|
+
const { portalled = true, portalRef, className, w, minW, maxW, paddingTop, style: styleProp, ...rest } = props;
|
|
138
|
+
const resolvedW = typeof w === "object" ? w.base ?? w.lg : w;
|
|
139
|
+
const contentStyle = {
|
|
140
|
+
...styleProp,
|
|
141
|
+
...resolvedW ? { width: resolvedW } : {},
|
|
142
|
+
...minW ? { minWidth: minW } : {},
|
|
143
|
+
...maxW ? { maxWidth: maxW } : {},
|
|
144
|
+
...paddingTop !== void 0 ? { paddingTop: typeof paddingTop === "number" ? `${paddingTop * 4}px` : paddingTop } : {}
|
|
145
|
+
};
|
|
146
|
+
const positioning = React2.useContext(PositioningContext);
|
|
147
|
+
const preventFocus = React2.useCallback((e) => e.preventDefault(), []);
|
|
148
|
+
const preventInteract = React2.useCallback((e) => e.preventDefault(), []);
|
|
149
|
+
const content = /* @__PURE__ */ jsx(
|
|
150
|
+
RadixPopover.Content,
|
|
151
|
+
{
|
|
152
|
+
ref,
|
|
153
|
+
side: positioning.side,
|
|
154
|
+
align: positioning.align,
|
|
155
|
+
sideOffset: positioning.sideOffset,
|
|
156
|
+
alignOffset: positioning.alignOffset,
|
|
157
|
+
collisionPadding: positioning.collisionPadding,
|
|
158
|
+
onOpenAutoFocus: positioning.autoFocus ? void 0 : preventFocus,
|
|
159
|
+
onInteractOutside: positioning.closeOnInteractOutside ? void 0 : preventInteract,
|
|
160
|
+
className: cn(
|
|
161
|
+
"z-50 rounded-lg border border-[var(--color-popover-border,var(--color-border-divider))]",
|
|
162
|
+
"bg-[var(--color-popover-bg,var(--color-dialog-bg))]",
|
|
163
|
+
"shadow-[var(--shadow-popover,var(--shadow-lg))]",
|
|
164
|
+
"outline-none",
|
|
165
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
166
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
167
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
168
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
169
|
+
className
|
|
170
|
+
),
|
|
171
|
+
style: Object.keys(contentStyle).length > 0 ? contentStyle : void 0,
|
|
172
|
+
...rest
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
if (!portalled) {
|
|
176
|
+
return content;
|
|
177
|
+
}
|
|
178
|
+
return /* @__PURE__ */ jsx(RadixPopover.Portal, { container: portalRef?.current ?? void 0, children: content });
|
|
179
|
+
});
|
|
180
|
+
var PopoverArrow = React2.forwardRef(function PopoverArrow2(props, ref) {
|
|
181
|
+
const { className, ...rest } = props;
|
|
182
|
+
return /* @__PURE__ */ jsx(
|
|
183
|
+
RadixPopover.Arrow,
|
|
184
|
+
{
|
|
185
|
+
ref,
|
|
186
|
+
className: cn("fill-[var(--color-popover-bg,var(--color-dialog-bg))]", className),
|
|
187
|
+
...rest
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
});
|
|
191
|
+
var PopoverCloseTrigger = React2.forwardRef(function PopoverCloseTrigger2(props, ref) {
|
|
192
|
+
const { className, ...rest } = props;
|
|
193
|
+
return /* @__PURE__ */ jsx(
|
|
194
|
+
RadixPopover.Close,
|
|
195
|
+
{
|
|
196
|
+
className: cn("absolute top-1 right-1", className),
|
|
197
|
+
...rest,
|
|
198
|
+
asChild: true,
|
|
199
|
+
ref,
|
|
200
|
+
children: /* @__PURE__ */ jsx(CloseButton, {})
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
var PopoverCloseTriggerWrapper = React2.forwardRef(function PopoverCloseTriggerWrapper2(props, ref) {
|
|
205
|
+
const { disabled, children, ...rest } = props;
|
|
206
|
+
if (disabled) {
|
|
207
|
+
return children;
|
|
208
|
+
}
|
|
209
|
+
return /* @__PURE__ */ jsx(RadixPopover.Close, { ref, ...rest, asChild: true, children });
|
|
210
|
+
});
|
|
211
|
+
var PopoverBody = React2.forwardRef(function PopoverBody2(props, ref) {
|
|
212
|
+
const {
|
|
213
|
+
className,
|
|
214
|
+
style: styleProp,
|
|
215
|
+
display: _display,
|
|
216
|
+
flexDir: _flexDir,
|
|
217
|
+
rowGap: _rowGap,
|
|
218
|
+
px: _px,
|
|
219
|
+
py: _py,
|
|
220
|
+
textStyle: _textStyle,
|
|
221
|
+
alignItems: _alignItems,
|
|
222
|
+
...rest
|
|
223
|
+
} = props;
|
|
224
|
+
const bodyStyle = {
|
|
225
|
+
...styleProp,
|
|
226
|
+
..._display ? { display: _display } : {},
|
|
227
|
+
..._flexDir ? { flexDirection: _flexDir } : {},
|
|
228
|
+
..._rowGap !== void 0 ? { rowGap: typeof _rowGap === "number" ? `${_rowGap * 4}px` : _rowGap } : {},
|
|
229
|
+
..._px !== void 0 ? {
|
|
230
|
+
paddingLeft: typeof _px === "number" ? `${_px * 4}px` : _px,
|
|
231
|
+
paddingRight: typeof _px === "number" ? `${_px * 4}px` : _px
|
|
232
|
+
} : {},
|
|
233
|
+
..._py !== void 0 ? {
|
|
234
|
+
paddingTop: typeof _py === "number" ? `${_py * 4}px` : _py,
|
|
235
|
+
paddingBottom: typeof _py === "number" ? `${_py * 4}px` : _py
|
|
236
|
+
} : {},
|
|
237
|
+
..._alignItems ? { alignItems: _alignItems } : {}
|
|
238
|
+
};
|
|
239
|
+
return /* @__PURE__ */ jsx(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
ref,
|
|
243
|
+
className: cn("p-4", className),
|
|
244
|
+
style: Object.keys(bodyStyle).length > 0 ? bodyStyle : void 0,
|
|
245
|
+
...rest
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
});
|
|
249
|
+
var PopoverHeader = React2.forwardRef(function PopoverHeader2(props, ref) {
|
|
250
|
+
const { className, ...rest } = props;
|
|
251
|
+
return /* @__PURE__ */ jsx(
|
|
252
|
+
"div",
|
|
253
|
+
{
|
|
254
|
+
ref,
|
|
255
|
+
className: cn("px-4 pt-4 pb-0 font-semibold", className),
|
|
256
|
+
...rest
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
});
|
|
260
|
+
var PopoverFooter = React2.forwardRef(function PopoverFooter2(props, ref) {
|
|
261
|
+
const { className, ...rest } = props;
|
|
262
|
+
return /* @__PURE__ */ jsx(
|
|
263
|
+
"div",
|
|
264
|
+
{
|
|
265
|
+
ref,
|
|
266
|
+
className: cn("px-4 pb-4 pt-0", className),
|
|
267
|
+
...rest
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
});
|
|
271
|
+
var PopoverTitle = React2.forwardRef(function PopoverTitle2(props, ref) {
|
|
272
|
+
const { className, ...rest } = props;
|
|
273
|
+
return /* @__PURE__ */ jsx(
|
|
274
|
+
"h3",
|
|
275
|
+
{
|
|
276
|
+
ref,
|
|
277
|
+
className: cn("text-base font-semibold", className),
|
|
278
|
+
...rest
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
});
|
|
282
|
+
var PopoverDescription = React2.forwardRef(function PopoverDescription2(props, ref) {
|
|
283
|
+
const { className, ...rest } = props;
|
|
284
|
+
return /* @__PURE__ */ jsx(
|
|
285
|
+
"p",
|
|
286
|
+
{
|
|
287
|
+
ref,
|
|
288
|
+
className: cn("text-sm", className),
|
|
289
|
+
...rest
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
export { PopoverArrow, PopoverBody, PopoverCloseTrigger, PopoverCloseTriggerWrapper, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverRoot, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
// src/progress-circle.tsx
|
|
30
|
+
function cn(...inputs) {
|
|
31
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
32
|
+
}
|
|
33
|
+
var SIZE_MAP = {
|
|
34
|
+
xs: { size: 24, thickness: 4, textClass: "text-[10px]" },
|
|
35
|
+
sm: { size: 32, thickness: 5, textClass: "text-[10px]" },
|
|
36
|
+
md: { size: 40, thickness: 6, textClass: "text-xs" },
|
|
37
|
+
lg: { size: 48, thickness: 7, textClass: "text-sm" },
|
|
38
|
+
xl: { size: 64, thickness: 8, textClass: "text-sm" }
|
|
39
|
+
};
|
|
40
|
+
var Ctx = React__namespace.createContext({
|
|
41
|
+
value: 0,
|
|
42
|
+
size: "md",
|
|
43
|
+
colorPalette: "blue"
|
|
44
|
+
});
|
|
45
|
+
var ProgressCircleRoot = React__namespace.forwardRef(function ProgressCircleRoot2(props, ref) {
|
|
46
|
+
const {
|
|
47
|
+
value = 0,
|
|
48
|
+
size = "md",
|
|
49
|
+
colorPalette = "blue",
|
|
50
|
+
className,
|
|
51
|
+
children,
|
|
52
|
+
...rest
|
|
53
|
+
} = props;
|
|
54
|
+
const ctx = React__namespace.useMemo(
|
|
55
|
+
() => ({ value: value ?? null, size, colorPalette }),
|
|
56
|
+
[value, size, colorPalette]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Ctx.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
role: "progressbar",
|
|
63
|
+
"aria-valuenow": value ?? void 0,
|
|
64
|
+
"aria-valuemin": 0,
|
|
65
|
+
"aria-valuemax": 100,
|
|
66
|
+
className: cn("relative inline-flex text-sm", className),
|
|
67
|
+
...rest,
|
|
68
|
+
children
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
});
|
|
72
|
+
var ProgressCircleRing = React__namespace.forwardRef(function ProgressCircleRing2(props, ref) {
|
|
73
|
+
const { trackColor, cap, color, className, ...rest } = props;
|
|
74
|
+
const { value, size: sizeKey } = React__namespace.useContext(Ctx);
|
|
75
|
+
const { size, thickness } = SIZE_MAP[sizeKey];
|
|
76
|
+
const radius = size / 2 - thickness / 2;
|
|
77
|
+
const circumference = 2 * Math.PI * radius;
|
|
78
|
+
const percent = value ?? 0;
|
|
79
|
+
const offset = circumference * ((100 - percent) / 100);
|
|
80
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
81
|
+
"svg",
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
width: size,
|
|
85
|
+
height: size,
|
|
86
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
87
|
+
className: cn(
|
|
88
|
+
value === null && "animate-spin",
|
|
89
|
+
className
|
|
90
|
+
),
|
|
91
|
+
...rest,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
+
"circle",
|
|
95
|
+
{
|
|
96
|
+
cx: size / 2,
|
|
97
|
+
cy: size / 2,
|
|
98
|
+
r: radius,
|
|
99
|
+
fill: "transparent",
|
|
100
|
+
strokeWidth: thickness,
|
|
101
|
+
stroke: trackColor ?? "currentColor",
|
|
102
|
+
className: !trackColor ? "opacity-20" : void 0
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
106
|
+
"circle",
|
|
107
|
+
{
|
|
108
|
+
cx: size / 2,
|
|
109
|
+
cy: size / 2,
|
|
110
|
+
r: radius,
|
|
111
|
+
fill: "transparent",
|
|
112
|
+
strokeWidth: thickness,
|
|
113
|
+
stroke: color ?? "currentColor",
|
|
114
|
+
strokeLinecap: cap,
|
|
115
|
+
strokeDasharray: circumference,
|
|
116
|
+
strokeDashoffset: offset,
|
|
117
|
+
style: {
|
|
118
|
+
transformOrigin: "center",
|
|
119
|
+
transform: "rotate(-90deg)",
|
|
120
|
+
transition: "stroke-dashoffset 0.6s, stroke-dasharray 0.6s",
|
|
121
|
+
opacity: percent === 0 ? 0 : void 0
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
var ProgressCircleValueText = React__namespace.forwardRef(function ProgressCircleValueText2(props, ref) {
|
|
130
|
+
const { className, children, ...rest } = props;
|
|
131
|
+
const { value, size: sizeKey } = React__namespace.useContext(Ctx);
|
|
132
|
+
const { textClass } = SIZE_MAP[sizeKey];
|
|
133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
ref,
|
|
137
|
+
"aria-live": "polite",
|
|
138
|
+
className: cn(
|
|
139
|
+
"absolute inset-0 flex items-center justify-center",
|
|
140
|
+
"font-medium tracking-tight tabular-nums leading-none",
|
|
141
|
+
textClass,
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...rest,
|
|
145
|
+
children: children ?? `${Math.round(value ?? 0)}%`
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
exports.ProgressCircleRing = ProgressCircleRing;
|
|
151
|
+
exports.ProgressCircleRoot = ProgressCircleRoot;
|
|
152
|
+
exports.ProgressCircleValueText = ProgressCircleValueText;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/progress-circle.tsx
|
|
8
|
+
function cn(...inputs) {
|
|
9
|
+
return twMerge(clsx(inputs));
|
|
10
|
+
}
|
|
11
|
+
var SIZE_MAP = {
|
|
12
|
+
xs: { size: 24, thickness: 4, textClass: "text-[10px]" },
|
|
13
|
+
sm: { size: 32, thickness: 5, textClass: "text-[10px]" },
|
|
14
|
+
md: { size: 40, thickness: 6, textClass: "text-xs" },
|
|
15
|
+
lg: { size: 48, thickness: 7, textClass: "text-sm" },
|
|
16
|
+
xl: { size: 64, thickness: 8, textClass: "text-sm" }
|
|
17
|
+
};
|
|
18
|
+
var Ctx = React.createContext({
|
|
19
|
+
value: 0,
|
|
20
|
+
size: "md",
|
|
21
|
+
colorPalette: "blue"
|
|
22
|
+
});
|
|
23
|
+
var ProgressCircleRoot = React.forwardRef(function ProgressCircleRoot2(props, ref) {
|
|
24
|
+
const {
|
|
25
|
+
value = 0,
|
|
26
|
+
size = "md",
|
|
27
|
+
colorPalette = "blue",
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
...rest
|
|
31
|
+
} = props;
|
|
32
|
+
const ctx = React.useMemo(
|
|
33
|
+
() => ({ value: value ?? null, size, colorPalette }),
|
|
34
|
+
[value, size, colorPalette]
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ jsx(Ctx.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
role: "progressbar",
|
|
41
|
+
"aria-valuenow": value ?? void 0,
|
|
42
|
+
"aria-valuemin": 0,
|
|
43
|
+
"aria-valuemax": 100,
|
|
44
|
+
className: cn("relative inline-flex text-sm", className),
|
|
45
|
+
...rest,
|
|
46
|
+
children
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
});
|
|
50
|
+
var ProgressCircleRing = React.forwardRef(function ProgressCircleRing2(props, ref) {
|
|
51
|
+
const { trackColor, cap, color, className, ...rest } = props;
|
|
52
|
+
const { value, size: sizeKey } = React.useContext(Ctx);
|
|
53
|
+
const { size, thickness } = SIZE_MAP[sizeKey];
|
|
54
|
+
const radius = size / 2 - thickness / 2;
|
|
55
|
+
const circumference = 2 * Math.PI * radius;
|
|
56
|
+
const percent = value ?? 0;
|
|
57
|
+
const offset = circumference * ((100 - percent) / 100);
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
|
+
"svg",
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
width: size,
|
|
63
|
+
height: size,
|
|
64
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
65
|
+
className: cn(
|
|
66
|
+
value === null && "animate-spin",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...rest,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"circle",
|
|
73
|
+
{
|
|
74
|
+
cx: size / 2,
|
|
75
|
+
cy: size / 2,
|
|
76
|
+
r: radius,
|
|
77
|
+
fill: "transparent",
|
|
78
|
+
strokeWidth: thickness,
|
|
79
|
+
stroke: trackColor ?? "currentColor",
|
|
80
|
+
className: !trackColor ? "opacity-20" : void 0
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"circle",
|
|
85
|
+
{
|
|
86
|
+
cx: size / 2,
|
|
87
|
+
cy: size / 2,
|
|
88
|
+
r: radius,
|
|
89
|
+
fill: "transparent",
|
|
90
|
+
strokeWidth: thickness,
|
|
91
|
+
stroke: color ?? "currentColor",
|
|
92
|
+
strokeLinecap: cap,
|
|
93
|
+
strokeDasharray: circumference,
|
|
94
|
+
strokeDashoffset: offset,
|
|
95
|
+
style: {
|
|
96
|
+
transformOrigin: "center",
|
|
97
|
+
transform: "rotate(-90deg)",
|
|
98
|
+
transition: "stroke-dashoffset 0.6s, stroke-dasharray 0.6s",
|
|
99
|
+
opacity: percent === 0 ? 0 : void 0
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
var ProgressCircleValueText = React.forwardRef(function ProgressCircleValueText2(props, ref) {
|
|
108
|
+
const { className, children, ...rest } = props;
|
|
109
|
+
const { value, size: sizeKey } = React.useContext(Ctx);
|
|
110
|
+
const { textClass } = SIZE_MAP[sizeKey];
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
"aria-live": "polite",
|
|
116
|
+
className: cn(
|
|
117
|
+
"absolute inset-0 flex items-center justify-center",
|
|
118
|
+
"font-medium tracking-tight tabular-nums leading-none",
|
|
119
|
+
textClass,
|
|
120
|
+
className
|
|
121
|
+
),
|
|
122
|
+
...rest,
|
|
123
|
+
children: children ?? `${Math.round(value ?? 0)}%`
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export { ProgressCircleRing, ProgressCircleRoot, ProgressCircleValueText };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var RadixProgress = require('@radix-ui/react-progress');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var RadixProgress__namespace = /*#__PURE__*/_interopNamespace(RadixProgress);
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
|
|
31
|
+
// src/progress.tsx
|
|
32
|
+
function cn(...inputs) {
|
|
33
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
|
+
}
|
|
35
|
+
var SIZE_CLASSES = {
|
|
36
|
+
sm: "h-1",
|
|
37
|
+
md: "h-2",
|
|
38
|
+
lg: "h-3",
|
|
39
|
+
xl: "h-4"
|
|
40
|
+
};
|
|
41
|
+
function normalizeValue(value, min, max) {
|
|
42
|
+
if (value == null) return 0;
|
|
43
|
+
if (max <= min) return 0;
|
|
44
|
+
return Math.round((value - min) / (max - min) * 100);
|
|
45
|
+
}
|
|
46
|
+
var Progress = React__namespace.forwardRef(
|
|
47
|
+
function Progress2(props, ref) {
|
|
48
|
+
const {
|
|
49
|
+
value,
|
|
50
|
+
min = 0,
|
|
51
|
+
max = 100,
|
|
52
|
+
size = "md",
|
|
53
|
+
color,
|
|
54
|
+
trackProps,
|
|
55
|
+
className,
|
|
56
|
+
style,
|
|
57
|
+
w,
|
|
58
|
+
flex,
|
|
59
|
+
...rest
|
|
60
|
+
} = props;
|
|
61
|
+
const percent = normalizeValue(value, min, max);
|
|
62
|
+
const trackStyle = {
|
|
63
|
+
...trackProps?.style,
|
|
64
|
+
...trackProps?.borderStartRadius !== void 0 && {
|
|
65
|
+
borderStartStartRadius: trackProps.borderStartRadius,
|
|
66
|
+
borderEndStartRadius: trackProps.borderStartRadius
|
|
67
|
+
},
|
|
68
|
+
...trackProps?.borderEndRadius !== void 0 && {
|
|
69
|
+
borderStartEndRadius: trackProps.borderEndRadius,
|
|
70
|
+
borderEndEndRadius: trackProps.borderEndRadius
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const rootStyle = {
|
|
74
|
+
...style,
|
|
75
|
+
...w !== void 0 && { width: w === "full" ? "100%" : w },
|
|
76
|
+
...flex !== void 0 && { flex }
|
|
77
|
+
};
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref,
|
|
82
|
+
className: cn("relative", className),
|
|
83
|
+
style: rootStyle,
|
|
84
|
+
...rest,
|
|
85
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
+
RadixProgress__namespace.Root,
|
|
87
|
+
{
|
|
88
|
+
value: percent,
|
|
89
|
+
max: 100,
|
|
90
|
+
className: cn(
|
|
91
|
+
"w-full overflow-hidden rounded-full",
|
|
92
|
+
"bg-[var(--color-progress-track)]",
|
|
93
|
+
SIZE_CLASSES[size],
|
|
94
|
+
trackProps?.className
|
|
95
|
+
),
|
|
96
|
+
style: trackStyle,
|
|
97
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
+
RadixProgress__namespace.Indicator,
|
|
99
|
+
{
|
|
100
|
+
className: cn(
|
|
101
|
+
"h-full rounded-full transition-transform duration-500 ease-out",
|
|
102
|
+
!color && "bg-[var(--color-progress-indicator)]"
|
|
103
|
+
),
|
|
104
|
+
style: {
|
|
105
|
+
width: `${percent}%`,
|
|
106
|
+
...color && { backgroundColor: `var(--color-${color.replace(".", "-")}, ${color})` }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
exports.Progress = Progress;
|