twenty-ui 2.43.0 → 2.44.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 +86 -65
- package/dist/{AllIcons-Z8o0B2fy.js → AllIcons-CFMhMGzh.js} +1 -1
- package/dist/{AllIcons-D_4JeQkX.cjs → AllIcons-Cz8pObev.cjs} +1 -1
- package/dist/Avatar-B5-MSVUG.cjs +1 -0
- package/dist/Avatar-Da_dlwJP.js +68 -0
- package/dist/{ListItem-D6DvFIbl.js → ListItem-Bg7Sk5Nv.js} +34 -31
- package/dist/ListItem-UYe5GaEQ.cjs +1 -0
- package/dist/ListItem.module-DkSRO3lX.cjs +1 -0
- package/dist/ListItem.module-DqkBkYtI.js +38 -0
- package/dist/{Loader-X1LymYkw.js → Loader-BLkXvZli.js} +1 -1
- package/dist/{Loader-Z6_7AA-x.cjs → Loader-CMXdrX1d.cjs} +1 -1
- package/dist/MenuSeparator-Ct3cQtJ2.cjs +1 -0
- package/dist/MenuSeparator-CyUYx1nk.js +68 -0
- package/dist/OverflowingTextWithTooltip-CtHMhu6b.js +198 -0
- package/dist/OverflowingTextWithTooltip-maBlogGW.cjs +1 -0
- package/dist/ProgressBar-C8N-1Iav.cjs +1 -0
- package/dist/ProgressBar-Cq6EDZz9.js +58 -0
- package/dist/Switch-BLO0Y9bi.cjs +1 -0
- package/dist/Switch-CMVfAYqP.js +127 -0
- package/dist/TextDirectionContext-pwtyVyKv.cjs +1 -0
- package/dist/TextDirectionContext-zzaQWZg6.js +5 -0
- package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -0
- package/dist/components/__stories__/reading-direction/DirectionalMenusExample.d.ts +4 -0
- package/dist/components/code-editor/CodeEditor/{utils → internal/utils}/getBaseCodeEditorTheme.d.ts +1 -1
- package/dist/components/code-editor/index.d.ts +0 -2
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +36 -36
- package/dist/components/feedback/Callout/Callout.d.ts +1 -1
- package/dist/components/feedback/Callout/types/CalloutProps.d.ts +1 -0
- package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -18
- package/dist/components/feedback/InlineBanner/internal/InlineBannerButton.d.ts +5 -0
- package/dist/components/feedback/InlineBanner/types/InlineBannerButtonProps.d.ts +7 -0
- package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +12 -0
- package/dist/components/feedback/Toast/Toast.d.ts +1 -1
- package/dist/components/feedback/Toast/internal/components/ToastProgress.d.ts +9 -0
- package/dist/components/feedback/Toast/{hooks → internal/hooks}/useEnqueueToast.d.ts +1 -1
- package/dist/components/feedback/Toast/{types → internal/types}/ToastEntry.d.ts +1 -1
- package/dist/components/feedback/Toast/types/ToastProps.d.ts +1 -1
- package/dist/components/feedback/Toaster/internal/ToasterItem.d.ts +1 -1
- package/dist/components/feedback/Toaster/internal/ToasterItemExitEffect.d.ts +1 -1
- package/dist/components/index.d.ts +4 -20
- package/dist/components/input/IconButton/types/IconButtonProps.d.ts +1 -1
- package/dist/components/input/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/input/SearchInput/__stories__/SearchInputExample.d.ts +2 -0
- package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -10
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +6 -6
- package/dist/components/navigation/Dropdown/__stories__/DropdownContextMenuExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/createStoryState.d.ts +4 -0
- package/dist/components/navigation/Dropdown/__stories__/dropdownStoryA11yParameters.d.ts +8 -0
- package/dist/components/navigation/Dropdown/hooks/useDropdownPage.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +5 -1
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownRoot.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownTitle.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownTrigger.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/getDropdownDismissTarget.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/isDropdownDismissPrevented.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/useRegisterDropdownLabelElement.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/useRegisteredElementId.d.ts +1 -0
- package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +1 -1
- package/dist/components/navigation/Dropdown/types/DropdownDismissEvent.d.ts +4 -0
- package/dist/components/navigation/Dropdown/types/DropdownRootProps.d.ts +3 -0
- package/dist/components/navigation/Dropdown/types/DropdownSubmenuProps.d.ts +1 -1
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +1 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +1 -0
- package/dist/components/navigation/TabButton/types/TabButtonProps.d.ts +1 -1
- package/dist/components-Bs-35QDJ.cjs +1 -0
- package/dist/components-kaERZ89J.js +1865 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +30 -43
- package/dist/data-display-DenoFbuP.cjs +1 -0
- package/dist/data-display-npY0auY_.js +190 -0
- package/dist/getSafeUrl-BuX_E2_8.cjs +1 -0
- package/dist/getSafeUrl-DXwcx-N0.js +27 -0
- package/dist/icon/components/TablerIcons.d.ts +1 -1
- package/dist/icon/hooks/useIcons.d.ts +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/{icon-Bd81r48z.js → icon-B7aZ6RxF.js} +123 -122
- package/dist/{icon-iD9IXJmn.cjs → icon-DK8OPi-m.cjs} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +227 -226
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +622 -642
- package/dist/input-BNuMVtkM.cjs +1 -0
- package/dist/input-COx4wMjs.js +324 -0
- package/dist/layout-BEC7fKLU.js +34 -0
- package/dist/layout-DniJJ8Mx.cjs +1 -0
- package/dist/navigation-CUofX3gO.js +78 -0
- package/dist/navigation-qJfYicT7.cjs +1 -0
- package/dist/primitives/data-display/Avatar/Avatar.d.ts +1 -1
- package/dist/primitives/data-display/Avatar/types/AvatarProps.d.ts +1 -0
- package/dist/primitives/data-display/Pill/Pill.d.ts +3 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +7 -8
- package/dist/primitives/feedback/ProgressBar/ProgressBar.d.ts +2 -12
- package/dist/primitives/feedback/ProgressBar/types/ProgressBarProps.d.ts +14 -0
- package/dist/primitives/feedback/index.d.ts +1 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +2 -4
- package/dist/primitives/input/Button/Button.d.ts +1 -1
- package/dist/primitives/input/Button/types/ButtonProps.d.ts +0 -2
- package/dist/primitives/input/Button/types/ButtonVariant.d.ts +1 -1
- package/dist/primitives/input/Radio/Radio.d.ts +1 -1
- package/dist/primitives/input/Radio/types/RadioProps.d.ts +1 -0
- package/dist/primitives/input/index.d.ts +0 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +9 -9
- package/dist/primitives/layout/{AnimatedExpandableContainer/AnimatedExpandableContainer.d.ts → Collapsible/Collapsible.d.ts} +2 -5
- package/dist/primitives/layout/TextDirectionProvider/TextDirectionProvider.d.ts +2 -1
- package/dist/primitives/layout/TextDirectionProvider/internal/TextDirection.d.ts +1 -0
- package/dist/primitives/layout/TextDirectionProvider/internal/TextDirectionContext.d.ts +2 -0
- package/dist/primitives/layout/TextDirectionProvider/internal/useProvidedTextDirection.d.ts +1 -0
- package/dist/primitives/layout/index.d.ts +4 -6
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +6 -6
- package/dist/primitives/navigation/ListItem/ListItem.d.ts +1 -1
- package/dist/primitives/navigation/ListItem/types/ListItemProps.d.ts +1 -0
- package/dist/primitives/navigation/index.d.ts +0 -4
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +4 -8
- package/dist/primitives/surfaces/Dialog/types/DialogSize.d.ts +1 -1
- package/dist/primitives/surfaces/Menu/internal/getMenuListItemProps.d.ts +4 -1
- package/dist/primitives/surfaces/Menu/types/MenuItemSlotProps.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/Popover.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/internal/PopoverPopup.d.ts +1 -1
- package/dist/primitives/surfaces/Popover/types/PopoverPopupProps.d.ts +5 -0
- package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -1
- package/dist/primitives/surfaces/Tooltip/internal/TooltipPopup.d.ts +1 -1
- package/dist/primitives/surfaces/Tooltip/types/TooltipPopupProps.d.ts +1 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +3 -3
- package/dist/{utilities/utils → primitives/typography/OverflowingTextWithTooltip/internal/LinkifiedText}/linkifyText.d.ts +2 -1
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +48 -55
- package/dist/style.css +1 -1
- package/dist/surfaces-BJilWRcD.js +264 -0
- package/dist/surfaces-iGk6vB0x.cjs +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +1 -1
- package/dist/theme/constants/MainColorNames.d.ts +1 -1
- package/dist/theme/constants/ThemeCommon.d.ts +3 -0
- package/dist/theme/constants/ThemeLight.d.ts +4 -0
- package/dist/theme/getNextThemeColor.d.ts +1 -1
- package/dist/theme/themeCssVariables.d.ts +4 -0
- package/dist/theme/themeTypes.d.ts +4 -0
- package/dist/{theme-DBro6iwF.js → theme-CjHovJAZ.js} +30 -20
- package/dist/theme-DumxXtpW.cjs +1 -0
- package/dist/theme-dark.css +2 -0
- package/dist/theme-light.css +2 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/useProvidedTextDirection-B7ovnsdr.cjs +1 -0
- package/dist/useProvidedTextDirection-P1dtjUtE.js +9 -0
- package/dist/utilities/device/getUserDevice.d.ts +1 -1
- package/dist/utilities/index.d.ts +0 -3
- package/dist/utilities-B7EwAZ4L.cjs +1 -0
- package/dist/utilities-CMrqpiWM.js +64 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +12 -13
- package/package.json +2 -2
- package/CHANGELOG.md +0 -24
- package/dist/Avatar-BSHgTxt-.js +0 -67
- package/dist/Avatar-DTNH6Ku7.cjs +0 -1
- package/dist/Input-CFXY05bj.cjs +0 -1
- package/dist/Input-DHfmRBq5.js +0 -116
- package/dist/ListItem-2dHkY1NB.cjs +0 -1
- package/dist/ListItem.module-CveFbY4M.cjs +0 -1
- package/dist/ListItem.module-DtIGiTDL.js +0 -38
- package/dist/MenuSeparator-DJOspG7J.cjs +0 -1
- package/dist/MenuSeparator-dNx4JE6C.js +0 -66
- package/dist/OverflowingTextWithTooltip-CqEkoH6t.js +0 -179
- package/dist/OverflowingTextWithTooltip-bn6EwWeq.cjs +0 -1
- package/dist/Pill-BJ3K8Mdc.cjs +0 -1
- package/dist/Pill-DaFEFIOT.js +0 -9
- package/dist/ProgressBar-DwJQXHwg.cjs +0 -1
- package/dist/ProgressBar-RWLNIkzm.js +0 -55
- package/dist/components/data-display/JsonTree/internal/JsonListItem.d.ts +0 -4
- package/dist/components/feedback/Info/Info.d.ts +0 -2
- package/dist/components/feedback/Info/types/InfoAccent.d.ts +0 -1
- package/dist/components/feedback/Info/types/InfoProps.d.ts +0 -11
- package/dist/components/input/CardPicker/CardPicker.d.ts +0 -2
- package/dist/components/input/CardPicker/types/CardPickerProps.d.ts +0 -2
- package/dist/components/input/ColorSchemePicker/ColorSchemePicker.d.ts +0 -2
- package/dist/components/input/ColorSchemePicker/internal/Checkmark/Checkmark.d.ts +0 -5
- package/dist/components/input/ColorSchemePicker/internal/ColorSchemeCard/ColorSchemeCard.d.ts +0 -11
- package/dist/components/input/ColorSchemePicker/types/ColorSchemePickerProps.d.ts +0 -9
- package/dist/components/navigation/RoundedLink/RoundedLink.d.ts +0 -8
- package/dist/components-BYWo2sUE.cjs +0 -1
- package/dist/components-C96xU59U.js +0 -1996
- package/dist/data-display-BQ9g9oSc.cjs +0 -1
- package/dist/data-display-z9gKjkPS.js +0 -184
- package/dist/feedback-BvpEL2-w.js +0 -25
- package/dist/feedback-CH2UC0Fv.cjs +0 -1
- package/dist/input-C8IiOA9Q.js +0 -335
- package/dist/input-NBD4DP8j.cjs +0 -1
- package/dist/layout-BgAfeZsL.cjs +0 -1
- package/dist/layout-D-XbKoLM.js +0 -30
- package/dist/linkifyText-BHQ4_CzQ.cjs +0 -1
- package/dist/linkifyText-BINRNP9w.js +0 -45
- package/dist/mergeClassNames-BHKm1BNi.js +0 -6
- package/dist/mergeClassNames-BbJtXN2t.cjs +0 -1
- package/dist/navigation-BqZBteC2.cjs +0 -1
- package/dist/navigation-CLMgaqS8.js +0 -91
- package/dist/primitives/feedback/CircularProgressBar/CircularProgressBar.d.ts +0 -7
- package/dist/primitives/input/Button/internal/ButtonSoon.d.ts +0 -5
- package/dist/primitives/input/types/ColorScheme.d.ts +0 -1
- package/dist/primitives/layout/AnimatedExpandableContainer/types/AnimationMode.d.ts +0 -1
- package/dist/primitives/layout/AnimatedExpandableContainer/types/AnimationSize.d.ts +0 -1
- package/dist/primitives/navigation/ClickToActionLink/ClickToActionLink.d.ts +0 -6
- package/dist/primitives/navigation/Link/constants/Cal.d.ts +0 -1
- package/dist/primitives/navigation/Link/constants/GithubLink.d.ts +0 -1
- package/dist/primitives/navigation/Link/constants/TwentyPricingLink.d.ts +0 -1
- package/dist/surfaces-DX8oX1ou.js +0 -254
- package/dist/surfaces-uuLwsFxg.cjs +0 -1
- package/dist/theme-DNG4OSBd.cjs +0 -1
- package/dist/utilities/types/ClickOutsideAttributes.d.ts +0 -4
- package/dist/utilities-BlvbRryv.cjs +0 -1
- package/dist/utilities-C5Tt2HLT.js +0 -56
- /package/dist/components/code-editor/CodeEditor/{constants → internal/constants}/BaseCodeEditorThemeId.d.ts +0 -0
- /package/dist/components/feedback/Toast/{constants → internal/constants}/DefaultToastLimit.d.ts +0 -0
- /package/dist/components/feedback/Toast/{contexts → internal/contexts}/ToastContext.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useCloseToast.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useToastContext.d.ts +0 -0
- /package/dist/components/feedback/Toast/{hooks → internal/hooks}/useToastEntries.d.ts +0 -0
- /package/dist/components/feedback/Toast/{stores → internal/stores}/createToastStore.d.ts +0 -0
- /package/dist/components/feedback/Toast/{types → internal/types}/ToastStoreState.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/completeToastExit.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/dismissToasts.d.ts +0 -0
- /package/dist/components/feedback/Toast/{utils → internal/utils}/isToastVisible.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDimension.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDurationObject.d.ts +0 -0
- /package/dist/primitives/layout/{AnimatedExpandableContainer → Collapsible}/types/AnimationDurations.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const F=require("./theme-DumxXtpW.cjs"),h=require("./isDefined-DS2Q42p5.cjs"),d=require("./utilities-B7EwAZ4L.cjs"),L=require("./useProvidedTextDirection-B7ovnsdr.cjs");let a=require("react/jsx-runtime"),z=require("@base-ui/react/button"),v=require("@base-ui/react/avatar");var O="_root_xleyk_1",R="_avatarPulsing_xleyk_1",U="_image_xleyk_87",$="_fallback_xleyk_93",E="_icon_xleyk_97",n={root:O,avatarPulsing:R,image:U,fallback:$,icon:E},G=({src:k,name:s,colorSeed:l=s,size:x="md",shape:q="square",variant:_="soft",icon:t,color:p,backgroundColor:y,borderColor:j,pulsing:A=!1,ring:T=!1,disabled:g=!1,nativeButton:P=!0,onClick:m,className:C,style:c,render:i,"aria-label":N,...D})=>{const e=F.useTheme(),o=s?.trim().charAt(0).toUpperCase(),w=o?p??d.stringToThemeColorP3String({string:l??"",variant:12,theme:e}):e.font.color.tertiary,B=o?y??d.stringToThemeColorP3String({string:l??"",variant:_==="outline"?5:4,theme:e}):e.background.transparent.light,f=j??(o?d.stringToThemeColorP3String({string:l??"",variant:6,theme:e}):void 0),u=h.isDefined(m),b=h.isDefined(t)&&typeof t!="boolean"&&t!=="";return(0,a.jsx)(v.Avatar.Root,{...D,onClick:m,"aria-label":N??(u?s?.trim()||"Avatar":void 0),"data-size":x,"data-shape":q,"data-pulsing":A||void 0,"data-ring":T||void 0,"data-disabled":g||void 0,"data-clickable":u||void 0,className:L.mergeClassNames(n.root,C),style:r=>({"--tw-avatar-color":w,"--tw-avatar-background":b?"inherit":r.imageLoadingStatus==="loaded"?"none":B,"--tw-avatar-border":_==="outline"&&r.imageLoadingStatus!=="loaded"&&f?`1px solid ${f}`:"none",...typeof c=="function"?c(r):c}),render:u?(r,I)=>(0,a.jsx)(z.Button,{...r,disabled:g,nativeButton:P,render:typeof i=="function"?S=>i(S,I):i}):i,children:b?(0,a.jsx)("span",{className:n.icon,"aria-hidden":!0,children:t}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.Avatar.Image,{src:k??void 0,alt:"",className:n.image}),(0,a.jsx)(v.Avatar.Fallback,{className:n.fallback,"aria-hidden":!0,children:o||"-"})]})})};Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return G}});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as k } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { r as q } from "./theme-CjHovJAZ.js";
|
|
3
|
+
import { u as m } from "./utilities-CMrqpiWM.js";
|
|
4
|
+
import { n as z } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
5
|
+
import { Fragment as D, jsx as t, jsxs as R } from "react/jsx-runtime";
|
|
6
|
+
import { Button as S } from "@base-ui/react/button";
|
|
7
|
+
import { Avatar as v } from "@base-ui/react/avatar";
|
|
8
|
+
var U = "_root_xleyk_1", E = "_avatarPulsing_xleyk_1", G = "_image_xleyk_87", H = "_fallback_xleyk_93", J = "_icon_xleyk_97", l = {
|
|
9
|
+
root: U,
|
|
10
|
+
avatarPulsing: E,
|
|
11
|
+
image: G,
|
|
12
|
+
fallback: H,
|
|
13
|
+
icon: J
|
|
14
|
+
}, Y = ({ src: b, name: n, colorSeed: s = n, size: h = "md", shape: x = "square", variant: f = "soft", icon: o, color: y, backgroundColor: A, borderColor: N, pulsing: w = !1, ring: B = !1, disabled: g = !1, nativeButton: C = !0, onClick: u, className: I, style: d, render: i, "aria-label": P, ...T }) => {
|
|
15
|
+
const a = q(), e = n?.trim().charAt(0).toUpperCase(), j = e ? y ?? m({
|
|
16
|
+
string: s ?? "",
|
|
17
|
+
variant: 12,
|
|
18
|
+
theme: a
|
|
19
|
+
}) : a.font.color.tertiary, F = e ? A ?? m({
|
|
20
|
+
string: s ?? "",
|
|
21
|
+
variant: f === "outline" ? 5 : 4,
|
|
22
|
+
theme: a
|
|
23
|
+
}) : a.background.transparent.light, p = N ?? (e ? m({
|
|
24
|
+
string: s ?? "",
|
|
25
|
+
variant: 6,
|
|
26
|
+
theme: a
|
|
27
|
+
}) : void 0), c = k(u), _ = k(o) && typeof o != "boolean" && o !== "";
|
|
28
|
+
return /* @__PURE__ */ t(v.Root, {
|
|
29
|
+
...T,
|
|
30
|
+
onClick: u,
|
|
31
|
+
"aria-label": P ?? (c ? n?.trim() || "Avatar" : void 0),
|
|
32
|
+
"data-size": h,
|
|
33
|
+
"data-shape": x,
|
|
34
|
+
"data-pulsing": w || void 0,
|
|
35
|
+
"data-ring": B || void 0,
|
|
36
|
+
"data-disabled": g || void 0,
|
|
37
|
+
"data-clickable": c || void 0,
|
|
38
|
+
className: z(l.root, I),
|
|
39
|
+
style: (r) => ({
|
|
40
|
+
"--tw-avatar-color": j,
|
|
41
|
+
"--tw-avatar-background": _ ? "inherit" : r.imageLoadingStatus === "loaded" ? "none" : F,
|
|
42
|
+
"--tw-avatar-border": f === "outline" && r.imageLoadingStatus !== "loaded" && p ? `1px solid ${p}` : "none",
|
|
43
|
+
...typeof d == "function" ? d(r) : d
|
|
44
|
+
}),
|
|
45
|
+
render: c ? (r, L) => /* @__PURE__ */ t(S, {
|
|
46
|
+
...r,
|
|
47
|
+
disabled: g,
|
|
48
|
+
nativeButton: C,
|
|
49
|
+
render: typeof i == "function" ? ($) => i($, L) : i
|
|
50
|
+
}) : i,
|
|
51
|
+
children: _ ? /* @__PURE__ */ t("span", {
|
|
52
|
+
className: l.icon,
|
|
53
|
+
"aria-hidden": !0,
|
|
54
|
+
children: o
|
|
55
|
+
}) : /* @__PURE__ */ R(D, { children: [/* @__PURE__ */ t(v.Image, {
|
|
56
|
+
src: b ?? void 0,
|
|
57
|
+
alt: "",
|
|
58
|
+
className: l.image
|
|
59
|
+
}), /* @__PURE__ */ t(v.Fallback, {
|
|
60
|
+
className: l.fallback,
|
|
61
|
+
"aria-hidden": !0,
|
|
62
|
+
children: e || "-"
|
|
63
|
+
})] })
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
Y as t
|
|
68
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { En as
|
|
1
|
+
import { En as j, Sn as b } from "./icon-B7aZ6RxF.js";
|
|
2
2
|
import { t as S } from "./isDefined-fMi6eQ4r.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import { n as i, r as t, t as e } from "./ListItem.module-
|
|
3
|
+
import { t as E } from "./OverflowingTextWithTooltip-CtHMhu6b.js";
|
|
4
|
+
import { n as i, r as t, t as e } from "./ListItem.module-DqkBkYtI.js";
|
|
5
5
|
import { clsx as o } from "clsx";
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { isNonEmptyArray as
|
|
8
|
-
import
|
|
9
|
-
import { useRender as
|
|
10
|
-
var
|
|
11
|
-
commandTextContainer:
|
|
12
|
-
commandText:
|
|
13
|
-
commandKey:
|
|
14
|
-
},
|
|
6
|
+
import { Fragment as F, jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
import { isNonEmptyArray as H, isString as M } from "@sniptt/guards";
|
|
8
|
+
import q from "react";
|
|
9
|
+
import { useRender as w } from "@base-ui/react/use-render";
|
|
10
|
+
var A = "_commandTextContainer_2o210_1", O = "_commandText_2o210_1", W = "_commandKey_2o210_15", p = {
|
|
11
|
+
commandTextContainer: A,
|
|
12
|
+
commandText: O,
|
|
13
|
+
commandKey: W
|
|
14
|
+
}, z = ({ hotKeys: n, joinLabel: r = "then" }) => /* @__PURE__ */ a("div", {
|
|
15
15
|
className: p.commandText,
|
|
16
16
|
children: n && /* @__PURE__ */ a("div", {
|
|
17
17
|
className: p.commandTextContainer,
|
|
18
|
-
children: n.map((m, s) => /* @__PURE__ */ u(
|
|
18
|
+
children: n.map((m, s) => /* @__PURE__ */ u(q.Fragment, { children: [/* @__PURE__ */ a("div", {
|
|
19
19
|
className: p.commandKey,
|
|
20
20
|
children: m
|
|
21
21
|
}), s < n.length - 1 && r] }, s))
|
|
22
22
|
})
|
|
23
|
-
}),
|
|
23
|
+
}), B = ({ checked: n, disabled: r }) => /* @__PURE__ */ a("span", {
|
|
24
24
|
"aria-hidden": !0,
|
|
25
25
|
className: o(i.root, i.solid, i.sm, i.square, i.accent),
|
|
26
26
|
"data-checked": n || void 0,
|
|
@@ -29,10 +29,10 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
29
29
|
className: i.box,
|
|
30
30
|
children: n && /* @__PURE__ */ a("span", {
|
|
31
31
|
className: i.indicator,
|
|
32
|
-
children: /* @__PURE__ */ a(
|
|
32
|
+
children: /* @__PURE__ */ a(b, { "aria-hidden": !0 })
|
|
33
33
|
})
|
|
34
34
|
})
|
|
35
|
-
}),
|
|
35
|
+
}), $ = ({ color: n = "neutral", selected: r = !1, focused: m = !1, disabled: s = !1, indicator: c = "none", startIcon: f, endIcon: N, description: l, descriptionPlacement: v = "inline", actions: x, actionsVisibility: k = "hover", hotkeys: _, hotkeysJoinLabel: C, hasSubmenu: T = !1, className: y, children: d, render: D, ref: K, onClick: I, ...L }) => {
|
|
36
36
|
const g = t(l), R = (h) => {
|
|
37
37
|
if (s) {
|
|
38
38
|
h.preventDefault();
|
|
@@ -40,9 +40,9 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
40
40
|
}
|
|
41
41
|
S(I) && (h.stopPropagation(), I(h));
|
|
42
42
|
};
|
|
43
|
-
return
|
|
44
|
-
render:
|
|
45
|
-
ref:
|
|
43
|
+
return w({
|
|
44
|
+
render: D,
|
|
45
|
+
ref: K,
|
|
46
46
|
state: {
|
|
47
47
|
color: n,
|
|
48
48
|
indicator: c,
|
|
@@ -51,13 +51,13 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
51
51
|
disabled: s
|
|
52
52
|
},
|
|
53
53
|
props: {
|
|
54
|
-
...
|
|
55
|
-
"data-actions-visibility":
|
|
56
|
-
className: o(e.root,
|
|
54
|
+
...L,
|
|
55
|
+
"data-actions-visibility": k,
|
|
56
|
+
className: o(e.root, y),
|
|
57
57
|
"aria-disabled": s || void 0,
|
|
58
58
|
onClick: R,
|
|
59
|
-
children: /* @__PURE__ */ u(
|
|
60
|
-
c === "checkbox" && /* @__PURE__ */ a(
|
|
59
|
+
children: /* @__PURE__ */ u(F, { children: [
|
|
60
|
+
c === "checkbox" && /* @__PURE__ */ a(B, {
|
|
61
61
|
checked: r,
|
|
62
62
|
disabled: s
|
|
63
63
|
}),
|
|
@@ -69,7 +69,7 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
69
69
|
className: e.label,
|
|
70
70
|
children: [/* @__PURE__ */ a("span", {
|
|
71
71
|
className: e.text,
|
|
72
|
-
children:
|
|
72
|
+
children: M(d) ? /* @__PURE__ */ a(E, { text: d }) : d
|
|
73
73
|
}), g && v === "inline" && /* @__PURE__ */ a("span", {
|
|
74
74
|
className: o(e.description, e.inlineDescription),
|
|
75
75
|
children: l
|
|
@@ -83,19 +83,22 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
83
83
|
className: e.actions,
|
|
84
84
|
children: x
|
|
85
85
|
}),
|
|
86
|
-
|
|
86
|
+
H(_) && /* @__PURE__ */ a("span", {
|
|
87
87
|
className: e.hotkeys,
|
|
88
|
-
children: /* @__PURE__ */ a(
|
|
88
|
+
children: /* @__PURE__ */ a(z, {
|
|
89
|
+
hotKeys: _,
|
|
90
|
+
joinLabel: C
|
|
91
|
+
})
|
|
89
92
|
}),
|
|
90
93
|
t(N) && /* @__PURE__ */ a("span", {
|
|
91
94
|
className: e.endIcon,
|
|
92
95
|
children: N
|
|
93
96
|
}),
|
|
94
|
-
c === "check" && r && /* @__PURE__ */ a(
|
|
97
|
+
c === "check" && r && /* @__PURE__ */ a(b, {
|
|
95
98
|
className: e.checkIndicator,
|
|
96
99
|
"aria-hidden": !0
|
|
97
100
|
}),
|
|
98
|
-
T && /* @__PURE__ */ a(
|
|
101
|
+
T && /* @__PURE__ */ a(j, {
|
|
99
102
|
className: e.submenuIcon,
|
|
100
103
|
"aria-hidden": !0
|
|
101
104
|
})
|
|
@@ -104,6 +107,6 @@ var w = "_commandTextContainer_2o210_1", A = "_commandText_2o210_1", O = "_comma
|
|
|
104
107
|
});
|
|
105
108
|
};
|
|
106
109
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
z as n,
|
|
111
|
+
$ as t
|
|
109
112
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const R=require("./theme-DumxXtpW.cjs"),S=require("./isDefined-DS2Q42p5.cjs"),K=require("./OverflowingTextWithTooltip-maBlogGW.cjs"),e=require("./ListItem.module-DkSRO3lX.cjs");let r=require("clsx"),t=require("react/jsx-runtime"),L=require("@sniptt/guards"),m=require("react");m=R.__toESM(m,1);let M=require("@base-ui/react/use-render"),_=require("@tabler/icons-react");var O="_commandTextContainer_2o210_1",H="_commandText_2o210_1",w="_commandKey_2o210_15",u={commandTextContainer:O,commandText:H,commandKey:w},N=({hotKeys:a,joinLabel:s="then"})=>(0,t.jsx)("div",{className:u.commandText,children:a&&(0,t.jsx)("div",{className:u.commandTextContainer,children:a.map((i,l)=>(0,t.jsxs)(m.default.Fragment,{children:[(0,t.jsx)("div",{className:u.commandKey,children:i}),l<a.length-1&&s]},l))})}),E=({checked:a,disabled:s})=>(0,t.jsx)("span",{"aria-hidden":!0,className:(0,r.clsx)(e.Checkbox_module_default.root,e.Checkbox_module_default.solid,e.Checkbox_module_default.sm,e.Checkbox_module_default.square,e.Checkbox_module_default.accent),"data-checked":a||void 0,"data-disabled":s||void 0,children:(0,t.jsx)("span",{className:e.Checkbox_module_default.box,children:a&&(0,t.jsx)("span",{className:e.Checkbox_module_default.indicator,children:(0,t.jsx)(_.IconCheck,{"aria-hidden":!0})})})}),F=({color:a="neutral",selected:s=!1,focused:i=!1,disabled:l=!1,indicator:n="none",startIcon:x,endIcon:h,description:d,descriptionPlacement:f="inline",actions:j,actionsVisibility:v="hover",hotkeys:I,hotkeysJoinLabel:k,hasSubmenu:q=!1,className:C,children:o,render:g,ref:y,onClick:p,...T})=>{const b=e.isRenderableSlot(d),D=c=>{if(l){c.preventDefault();return}S.isDefined(p)&&(c.stopPropagation(),p(c))};return(0,M.useRender)({render:g,ref:y,state:{color:a,indicator:n,selected:s,highlighted:i,disabled:l},props:{...T,"data-actions-visibility":v,className:(0,r.clsx)(e.ListItem_module_default.root,C),"aria-disabled":l||void 0,onClick:D,children:(0,t.jsxs)(t.Fragment,{children:[n==="checkbox"&&(0,t.jsx)(E,{checked:s,disabled:l}),e.isRenderableSlot(x)&&(0,t.jsx)("span",{className:e.ListItem_module_default.startIcon,children:x}),(0,t.jsxs)("span",{className:e.ListItem_module_default.label,children:[(0,t.jsx)("span",{className:e.ListItem_module_default.text,children:(0,L.isString)(o)?(0,t.jsx)(K.OverflowingTextWithTooltip,{text:o}):o}),b&&f==="inline"&&(0,t.jsx)("span",{className:(0,r.clsx)(e.ListItem_module_default.description,e.ListItem_module_default.inlineDescription),children:d})]}),b&&f==="end"&&(0,t.jsx)("span",{className:(0,r.clsx)(e.ListItem_module_default.description,e.ListItem_module_default.endDescription),children:d}),e.isRenderableSlot(j)&&(0,t.jsx)("span",{className:e.ListItem_module_default.actions,children:j}),(0,L.isNonEmptyArray)(I)&&(0,t.jsx)("span",{className:e.ListItem_module_default.hotkeys,children:(0,t.jsx)(N,{hotKeys:I,joinLabel:k})}),e.isRenderableSlot(h)&&(0,t.jsx)("span",{className:e.ListItem_module_default.endIcon,children:h}),n==="check"&&s&&(0,t.jsx)(_.IconCheck,{className:e.ListItem_module_default.checkIndicator,"aria-hidden":!0}),q&&(0,t.jsx)(_.IconChevronRight,{className:e.ListItem_module_default.submenuIcon,"aria-hidden":!0})]})}})};Object.defineProperty(exports,"ListItem",{enumerable:!0,get:function(){return F}});Object.defineProperty(exports,"MenuItemHotKeys",{enumerable:!0,get:function(){return N}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _=require("./isDefined-DS2Q42p5.cjs");let r=require("@sniptt/guards");var t=e=>_.isDefined(e)&&!(0,r.isBoolean)(e)&&e!=="",n="_root_1fskg_1",a="_solid_1fskg_22",o="_outline_1fskg_26",s="_soft_1fskg_30",i="_sm_1fskg_35",u="_md_1fskg_40",d="_square_1fskg_46",c="_round_1fskg_51",v="_accent_1fskg_57",f="_success_1fskg_63",l="_warning_1fskg_69",k="_hoverable_1fskg_75",g="_box_1fskg_113",p="_indicator_1fskg_134",b="_check_1fskg_150",m="_minus_1fskg_151",h={root:n,solid:a,outline:o,soft:s,sm:i,md:u,square:d,round:c,accent:v,success:f,warning:l,hoverable:k,box:g,indicator:p,check:b,minus:m},I="_root_1dup2_2",x="_submenuIcon_1dup2_51",D="_startIcon_1dup2_55",q="_endIcon_1dup2_56",y="_label_1dup2_72",j="_text_1dup2_82",O="_description_1dup2_90",P="_inlineDescription_1dup2_98",w="_endDescription_1dup2_103",C="_hotkeys_1dup2_108",L="_actions_1dup2_114",R="_checkIndicator_1dup2_131",S={root:I,submenuIcon:x,startIcon:D,endIcon:q,label:y,text:j,description:O,inlineDescription:P,endDescription:w,hotkeys:C,actions:L,checkIndicator:R};Object.defineProperty(exports,"Checkbox_module_default",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"ListItem_module_default",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"isRenderableSlot",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as r } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { isBoolean as a } from "@sniptt/guards";
|
|
3
|
+
var j = (_) => r(_) && !a(_) && _ !== "", s = "_root_1fskg_1", o = "_solid_1fskg_22", e = "_outline_1fskg_26", n = "_soft_1fskg_30", t = "_sm_1fskg_35", i = "_md_1fskg_40", c = "_square_1fskg_46", d = "_round_1fskg_51", v = "_accent_1fskg_57", u = "_success_1fskg_63", f = "_warning_1fskg_69", k = "_hoverable_1fskg_75", p = "_box_1fskg_113", g = "_indicator_1fskg_134", l = "_check_1fskg_150", m = "_minus_1fskg_151", z = {
|
|
4
|
+
root: s,
|
|
5
|
+
solid: o,
|
|
6
|
+
outline: e,
|
|
7
|
+
soft: n,
|
|
8
|
+
sm: t,
|
|
9
|
+
md: i,
|
|
10
|
+
square: c,
|
|
11
|
+
round: d,
|
|
12
|
+
accent: v,
|
|
13
|
+
success: u,
|
|
14
|
+
warning: f,
|
|
15
|
+
hoverable: k,
|
|
16
|
+
box: p,
|
|
17
|
+
indicator: g,
|
|
18
|
+
check: l,
|
|
19
|
+
minus: m
|
|
20
|
+
}, b = "_root_1dup2_2", h = "_submenuIcon_1dup2_51", I = "_startIcon_1dup2_55", x = "_endIcon_1dup2_56", D = "_label_1dup2_72", q = "_text_1dup2_82", w = "_description_1dup2_90", y = "_inlineDescription_1dup2_98", B = "_endDescription_1dup2_103", C = "_hotkeys_1dup2_108", L = "_actions_1dup2_114", R = "_checkIndicator_1dup2_131", A = {
|
|
21
|
+
root: b,
|
|
22
|
+
submenuIcon: h,
|
|
23
|
+
startIcon: I,
|
|
24
|
+
endIcon: x,
|
|
25
|
+
label: D,
|
|
26
|
+
text: q,
|
|
27
|
+
description: w,
|
|
28
|
+
inlineDescription: y,
|
|
29
|
+
endDescription: B,
|
|
30
|
+
hotkeys: C,
|
|
31
|
+
actions: L,
|
|
32
|
+
checkIndicator: R
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
z as n,
|
|
36
|
+
j as r,
|
|
37
|
+
A as t
|
|
38
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=require("./theme-
|
|
1
|
+
const a=require("./theme-DumxXtpW.cjs");let r=require("react/jsx-runtime");var o="_container_1i6sz_1",i="_dot_1i6sz_15",d="_loaderDot_1i6sz_1",t={container:o,dot:i,loaderDot:d},n=({color:e})=>(0,r.jsx)("div",{className:t.container,style:e?{"--loader-color":a.themeCssVariables.tag.text[e]}:void 0,children:(0,r.jsx)("div",{className:t.dot})});Object.defineProperty(exports,"Loader",{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const f=require("./theme-DumxXtpW.cjs"),a=require("./useProvidedTextDirection-B7ovnsdr.cjs");let o=require("react/jsx-runtime"),t=require("@base-ui/react/popover"),u=require("@base-ui/react/menu");var N="_positioner_zlrze_1",x="_popup_zlrze_5",M="_title_zlrze_29",z="_description_zlrze_36",C="_arrow_zlrze_42",p={positioner:N,popup:x,title:M,description:z,arrow:C},T=({className:e,...r})=>(0,o.jsx)(t.Popover.Description,{...r,className:a.mergeClassNames(p.description,e)}),q=({side:e="bottom",align:r="center",sideOffset:i=8,alignOffset:n,arrow:l=!1,anchor:_,collisionPadding:c,container:v,keepMounted:m,className:d,children:P,...g})=>{const b=f.useThemeContainer(),j=a.useProvidedTextDirection();return(0,o.jsx)(t.Popover.Portal,{container:v??b??void 0,keepMounted:m,children:(0,o.jsx)(t.Popover.Positioner,{dir:j,side:e,align:r,sideOffset:i,alignOffset:n,anchor:_,collisionPadding:c,className:p.positioner,children:(0,o.jsxs)(t.Popover.Popup,{...g,className:a.mergeClassNames(p.popup,d),children:[l&&(0,o.jsx)(t.Popover.Arrow,{className:p.arrow}),P]})})})},h=({className:e,...r})=>(0,o.jsx)(t.Popover.Title,{...r,className:a.mergeClassNames(p.title,e)}),G={Root:t.Popover.Root,Trigger:t.Popover.Trigger,Popup:q,Title:h,Description:T,Close:t.Popover.Close},L="_positioner_3411d_1",y="_popup_3411d_5",D="_group_3411d_36",O="_groupLabel_3411d_42",w="_separator_3411d_54",s={positioner:L,popup:y,group:D,groupLabel:O,separator:w},S=({className:e,...r})=>(0,o.jsx)(u.Menu.Group,{...r,className:a.mergeClassNames(s.group,e)}),R=({className:e,...r})=>(0,o.jsx)(u.Menu.GroupLabel,{...r,className:a.mergeClassNames(s.groupLabel,e)}),$=({className:e,...r})=>(0,o.jsx)(u.Menu.Separator,{...r,className:a.mergeClassNames(s.separator,e)});Object.defineProperty(exports,"MenuGroup",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"MenuGroupLabel",{enumerable:!0,get:function(){return R}});Object.defineProperty(exports,"MenuSeparator",{enumerable:!0,get:function(){return $}});Object.defineProperty(exports,"Menu_module_default",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"Popover",{enumerable:!0,get:function(){return G}});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as f } from "./theme-CjHovJAZ.js";
|
|
2
|
+
import { n as p, t as T } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
3
|
+
import { jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
4
|
+
import { Popover as e } from "@base-ui/react/popover";
|
|
5
|
+
import { Menu as i } from "@base-ui/react/menu";
|
|
6
|
+
var h = "_positioner_zlrze_1", C = "_popup_zlrze_5", L = "_title_zlrze_29", M = "_description_zlrze_36", w = "_arrow_zlrze_42", t = {
|
|
7
|
+
positioner: h,
|
|
8
|
+
popup: C,
|
|
9
|
+
title: L,
|
|
10
|
+
description: M,
|
|
11
|
+
arrow: w
|
|
12
|
+
}, x = ({ className: r, ...o }) => /* @__PURE__ */ a(e.Description, {
|
|
13
|
+
...o,
|
|
14
|
+
className: p(t.description, r)
|
|
15
|
+
}), D = ({ side: r = "bottom", align: o = "center", sideOffset: l = 8, alignOffset: n, arrow: _ = !1, anchor: u, collisionPadding: v, container: m, keepMounted: c, className: d, children: P, ...g }) => {
|
|
16
|
+
const z = f(), N = T();
|
|
17
|
+
return /* @__PURE__ */ a(e.Portal, {
|
|
18
|
+
container: m ?? z ?? void 0,
|
|
19
|
+
keepMounted: c,
|
|
20
|
+
children: /* @__PURE__ */ a(e.Positioner, {
|
|
21
|
+
dir: N,
|
|
22
|
+
side: r,
|
|
23
|
+
align: o,
|
|
24
|
+
sideOffset: l,
|
|
25
|
+
alignOffset: n,
|
|
26
|
+
anchor: u,
|
|
27
|
+
collisionPadding: v,
|
|
28
|
+
className: t.positioner,
|
|
29
|
+
children: /* @__PURE__ */ b(e.Popup, {
|
|
30
|
+
...g,
|
|
31
|
+
className: p(t.popup, d),
|
|
32
|
+
children: [_ && /* @__PURE__ */ a(e.Arrow, { className: t.arrow }), P]
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}, G = ({ className: r, ...o }) => /* @__PURE__ */ a(e.Title, {
|
|
37
|
+
...o,
|
|
38
|
+
className: p(t.title, r)
|
|
39
|
+
}), F = {
|
|
40
|
+
Root: e.Root,
|
|
41
|
+
Trigger: e.Trigger,
|
|
42
|
+
Popup: D,
|
|
43
|
+
Title: G,
|
|
44
|
+
Description: x,
|
|
45
|
+
Close: e.Close
|
|
46
|
+
}, $ = "_positioner_3411d_1", j = "_popup_3411d_5", R = "_group_3411d_36", S = "_groupLabel_3411d_42", A = "_separator_3411d_54", s = {
|
|
47
|
+
positioner: $,
|
|
48
|
+
popup: j,
|
|
49
|
+
group: R,
|
|
50
|
+
groupLabel: S,
|
|
51
|
+
separator: A
|
|
52
|
+
}, H = ({ className: r, ...o }) => /* @__PURE__ */ a(i.Group, {
|
|
53
|
+
...o,
|
|
54
|
+
className: p(s.group, r)
|
|
55
|
+
}), I = ({ className: r, ...o }) => /* @__PURE__ */ a(i.GroupLabel, {
|
|
56
|
+
...o,
|
|
57
|
+
className: p(s.groupLabel, r)
|
|
58
|
+
}), J = ({ className: r, ...o }) => /* @__PURE__ */ a(i.Separator, {
|
|
59
|
+
...o,
|
|
60
|
+
className: p(s.separator, r)
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
F as a,
|
|
64
|
+
s as i,
|
|
65
|
+
I as n,
|
|
66
|
+
H as r,
|
|
67
|
+
J as t
|
|
68
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { t as s } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as q } from "./theme-CjHovJAZ.js";
|
|
3
|
+
import { t as U } from "./getSafeUrl-DXwcx-N0.js";
|
|
4
|
+
import { n as j, t as F } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
5
|
+
import { clsx as y } from "clsx";
|
|
6
|
+
import { Fragment as A, jsx as r, jsxs as k } from "react/jsx-runtime";
|
|
7
|
+
import { isNonEmptyString as E, isNumber as X, isString as G } from "@sniptt/guards";
|
|
8
|
+
import { memo as $, useRef as z, useState as S } from "react";
|
|
9
|
+
import { Tooltip as c } from "@base-ui/react/tooltip";
|
|
10
|
+
import { useRender as H } from "@base-ui/react/use-render";
|
|
11
|
+
var B = "_positioner_w2bea_1", J = "_popup_w2bea_5", K = "_content_w2bea_47", Q = "_title_w2bea_53", V = "_icon_w2bea_65", Y = "_description_w2bea_75", Z = "_arrow_w2bea_81", v = {
|
|
12
|
+
positioner: B,
|
|
13
|
+
popup: J,
|
|
14
|
+
content: K,
|
|
15
|
+
title: Q,
|
|
16
|
+
icon: V,
|
|
17
|
+
description: Y,
|
|
18
|
+
arrow: Z
|
|
19
|
+
}, L = ({ children: t, description: o, startIcon: e, className: n, render: i, ref: l, ...p }) => H({
|
|
20
|
+
defaultTagName: "div",
|
|
21
|
+
render: i,
|
|
22
|
+
ref: l,
|
|
23
|
+
props: {
|
|
24
|
+
...p,
|
|
25
|
+
className: y(v.content, n),
|
|
26
|
+
children: /* @__PURE__ */ k(A, { children: [s(t) && t !== "" && /* @__PURE__ */ k("div", {
|
|
27
|
+
className: v.title,
|
|
28
|
+
children: [s(e) && /* @__PURE__ */ r("span", {
|
|
29
|
+
className: v.icon,
|
|
30
|
+
"aria-hidden": !0,
|
|
31
|
+
children: e
|
|
32
|
+
}), /* @__PURE__ */ r("span", { children: t })]
|
|
33
|
+
}), s(o) && /* @__PURE__ */ r("div", {
|
|
34
|
+
className: v.description,
|
|
35
|
+
children: o
|
|
36
|
+
})] })
|
|
37
|
+
}
|
|
38
|
+
}), ee = 10, te = "300px", M = ({ side: t = "top", align: o = "center", sideOffset: e = ee, alignOffset: n, anchor: i, positionMethod: l, collisionBoundary: p, collisionPadding: u, collisionAvoidance: _, sticky: m, disableAnchorTracking: f, arrow: g = !1, withExitAnimation: x = !1, maxWidth: C = te, container: T, keepMounted: h, className: d, children: w, ...D }) => {
|
|
39
|
+
const N = q(), b = F(), a = G(w) || X(w);
|
|
40
|
+
return /* @__PURE__ */ r(c.Portal, {
|
|
41
|
+
container: T ?? N ?? void 0,
|
|
42
|
+
keepMounted: h,
|
|
43
|
+
children: /* @__PURE__ */ r(c.Positioner, {
|
|
44
|
+
dir: b,
|
|
45
|
+
side: t,
|
|
46
|
+
align: o,
|
|
47
|
+
sideOffset: e,
|
|
48
|
+
alignOffset: n,
|
|
49
|
+
anchor: i,
|
|
50
|
+
positionMethod: l,
|
|
51
|
+
collisionBoundary: p,
|
|
52
|
+
collisionPadding: u,
|
|
53
|
+
collisionAvoidance: _,
|
|
54
|
+
sticky: m,
|
|
55
|
+
disableAnchorTracking: f,
|
|
56
|
+
className: v.positioner,
|
|
57
|
+
style: { maxWidth: C },
|
|
58
|
+
children: /* @__PURE__ */ k(c.Popup, {
|
|
59
|
+
role: "tooltip",
|
|
60
|
+
...D,
|
|
61
|
+
"data-with-exit-animation": x || void 0,
|
|
62
|
+
className: j(v.popup, d),
|
|
63
|
+
children: [a ? /* @__PURE__ */ r(L, { children: w }) : w, g && /* @__PURE__ */ r(c.Arrow, { className: v.arrow })]
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}, oe = ({ content: t, children: o, open: e, defaultOpen: n, onOpenChange: i, onOpenChangeComplete: l, disabled: p = !1, disableHoverablePopup: u, trackCursorAxis: _, actionsRef: m, triggerId: f, defaultTriggerId: g, delay: x, closeDelay: C, closeOnClick: T, ...h }) => {
|
|
68
|
+
const d = p || !s(t) || t === "" || t === !1;
|
|
69
|
+
return /* @__PURE__ */ k(c.Root, {
|
|
70
|
+
open: s(e) ? e && !d : void 0,
|
|
71
|
+
defaultOpen: n && !d,
|
|
72
|
+
onOpenChange: i,
|
|
73
|
+
onOpenChangeComplete: l,
|
|
74
|
+
disabled: d,
|
|
75
|
+
disableHoverablePopup: u,
|
|
76
|
+
trackCursorAxis: _,
|
|
77
|
+
actionsRef: m,
|
|
78
|
+
triggerId: f,
|
|
79
|
+
defaultTriggerId: g,
|
|
80
|
+
children: [/* @__PURE__ */ r(c.Trigger, {
|
|
81
|
+
render: o,
|
|
82
|
+
delay: x,
|
|
83
|
+
closeDelay: C,
|
|
84
|
+
closeOnClick: T
|
|
85
|
+
}), /* @__PURE__ */ r(M, {
|
|
86
|
+
...h,
|
|
87
|
+
children: t
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
}, R = Object.assign(oe, {
|
|
91
|
+
Root: c.Root,
|
|
92
|
+
Trigger: c.Trigger,
|
|
93
|
+
Popup: M,
|
|
94
|
+
Content: L,
|
|
95
|
+
Provider: c.Provider,
|
|
96
|
+
createHandle: c.createHandle
|
|
97
|
+
}), re = "_truncate_1x6ii_1", ne = "_lineClamp_1x6ii_7", W = {
|
|
98
|
+
truncate: re,
|
|
99
|
+
lineClamp: ne
|
|
100
|
+
}, ie = ({ render: t, truncate: o, lineClamp: e, className: n, style: i, ref: l, ...p }) => {
|
|
101
|
+
const u = s(e) && Number.isInteger(e) && e > 0;
|
|
102
|
+
return H({
|
|
103
|
+
render: t,
|
|
104
|
+
ref: l,
|
|
105
|
+
props: {
|
|
106
|
+
...p,
|
|
107
|
+
className: y(o && W.truncate, u && W.lineClamp, n),
|
|
108
|
+
style: u ? {
|
|
109
|
+
...i,
|
|
110
|
+
"--text-line-clamp": e
|
|
111
|
+
} : i
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}, le = /https?:\/\/[^\s<>[\]]+[^\s<>[\].,;:!?)]/g, ae = (t) => {
|
|
115
|
+
const o = [];
|
|
116
|
+
let e = 0;
|
|
117
|
+
for (const n of t.matchAll(le)) {
|
|
118
|
+
const i = n[0], l = n.index;
|
|
119
|
+
l > e && o.push({
|
|
120
|
+
type: "text",
|
|
121
|
+
content: t.slice(e, l)
|
|
122
|
+
}), o.push({
|
|
123
|
+
type: "link",
|
|
124
|
+
content: i
|
|
125
|
+
}), e = l + i.length;
|
|
126
|
+
}
|
|
127
|
+
return e < t.length && o.push({
|
|
128
|
+
type: "text",
|
|
129
|
+
content: t.slice(e)
|
|
130
|
+
}), o;
|
|
131
|
+
}, se = "_link_mrld0_1", ce = { link: se }, pe = ({ text: t }) => E(t) ? /* @__PURE__ */ r(A, { children: ae(t).map((o, e) => o.type === "link" ? /* @__PURE__ */ r("a", {
|
|
132
|
+
className: ce.link,
|
|
133
|
+
href: U(o.content),
|
|
134
|
+
target: "_blank",
|
|
135
|
+
rel: "noopener noreferrer",
|
|
136
|
+
onClick: (n) => n.stopPropagation(),
|
|
137
|
+
children: o.content
|
|
138
|
+
}, e) : o.content) }) : null, de = "_overflowingMultilineText_1qcnw_1", ue = "_overflowingText_1qcnw_20", me = "_large_1qcnw_37", fe = "_multilineTooltip_1qcnw_41", P = {
|
|
139
|
+
overflowingMultilineText: de,
|
|
140
|
+
overflowingText: ue,
|
|
141
|
+
large: me,
|
|
142
|
+
multilineTooltip: fe
|
|
143
|
+
}, ke = $(function({ size: o = "small", text: e, isTooltipMultiline: n, displayedMaxRows: i, tooltipContent: l, tooltipDelay: p = 500, tooltipPlace: u = "bottom", alwaysShowTooltip: _ = !1, isFocusable: m = !1 }) {
|
|
144
|
+
const f = z(null), [g, x] = S(!1), [C, T] = S(!1), h = () => {
|
|
145
|
+
const a = f.current, O = s(a) && (a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth);
|
|
146
|
+
return x(O), O;
|
|
147
|
+
}, d = (a) => {
|
|
148
|
+
if (!a) {
|
|
149
|
+
T(!1);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
T(h() || _);
|
|
153
|
+
}, w = () => {
|
|
154
|
+
f.current?.focus(), d(!0);
|
|
155
|
+
}, D = (a) => {
|
|
156
|
+
a.stopPropagation(), a.preventDefault();
|
|
157
|
+
}, N = E(l) ? l : E(e) ? e : null, b = s(i);
|
|
158
|
+
return /* @__PURE__ */ k(R.Root, {
|
|
159
|
+
open: C && s(N),
|
|
160
|
+
onOpenChange: (...a) => {
|
|
161
|
+
const [O, I] = a;
|
|
162
|
+
if (!O && I.reason === "trigger-hover" && m && document.activeElement === f.current) {
|
|
163
|
+
I.cancel();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
d(O);
|
|
167
|
+
},
|
|
168
|
+
disabled: !s(N) || !g && !_,
|
|
169
|
+
children: [/* @__PURE__ */ r(R.Trigger, {
|
|
170
|
+
delay: p,
|
|
171
|
+
closeOnClick: !1,
|
|
172
|
+
render: /* @__PURE__ */ r(ie, {
|
|
173
|
+
...b ? { lineClamp: i || 1 } : { truncate: !0 },
|
|
174
|
+
"data-testid": "tooltip",
|
|
175
|
+
"data-content-overflowing": g ? "" : void 0,
|
|
176
|
+
className: y(b ? P.overflowingMultilineText : P.overflowingText, o === "large" && P.large),
|
|
177
|
+
ref: f,
|
|
178
|
+
tabIndex: m ? 0 : void 0,
|
|
179
|
+
onPointerEnter: h,
|
|
180
|
+
onFocus: m ? () => d(!0) : void 0,
|
|
181
|
+
onClick: m ? w : void 0,
|
|
182
|
+
children: E(e) ? /* @__PURE__ */ r(pe, { text: e }) : e
|
|
183
|
+
})
|
|
184
|
+
}), /* @__PURE__ */ r(R.Popup, {
|
|
185
|
+
className: n ? P.multilineTooltip : void 0,
|
|
186
|
+
sideOffset: 5,
|
|
187
|
+
side: u,
|
|
188
|
+
positionMethod: "absolute",
|
|
189
|
+
onClick: D,
|
|
190
|
+
children: N
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
export {
|
|
195
|
+
ie as n,
|
|
196
|
+
R as r,
|
|
197
|
+
ke as t
|
|
198
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const L=require("./theme-DumxXtpW.cjs"),a=require("./isDefined-DS2Q42p5.cjs"),M=require("./getSafeUrl-BuX_E2_8.cjs"),S=require("./useProvidedTextDirection-B7ovnsdr.cjs");let E=require("clsx"),t=require("react/jsx-runtime"),w=require("@sniptt/guards"),q=require("react"),c=require("@base-ui/react/tooltip"),W=require("@base-ui/react/use-render");var U="_positioner_w2bea_1",F="_popup_w2bea_5",X="_content_w2bea_47",G="_title_w2bea_53",z="_icon_w2bea_65",B="_description_w2bea_75",J="_arrow_w2bea_81",v={positioner:U,popup:F,content:X,title:G,icon:z,description:B,arrow:J},I=({children:i,description:r,startIcon:e,className:n,render:o,ref:l,...u})=>(0,W.useRender)({defaultTagName:"div",render:o,ref:l,props:{...u,className:(0,E.clsx)(v.content,n),children:(0,t.jsxs)(t.Fragment,{children:[a.isDefined(i)&&i!==""&&(0,t.jsxs)("div",{className:v.title,children:[a.isDefined(e)&&(0,t.jsx)("span",{className:v.icon,"aria-hidden":!0,children:e}),(0,t.jsx)("span",{children:i})]}),a.isDefined(r)&&(0,t.jsx)("div",{className:v.description,children:r})]})}}),K=10,Q="300px",A=({side:i="top",align:r="center",sideOffset:e=K,alignOffset:n,anchor:o,positionMethod:l,collisionBoundary:u,collisionPadding:p,collisionAvoidance:T,sticky:_,disableAnchorTracking:f,arrow:g=!1,withExitAnimation:j=!1,maxWidth:b=Q,container:m,keepMounted:x,className:d,children:h,...k})=>{const D=L.useThemeContainer(),N=S.useProvidedTextDirection(),s=(0,w.isString)(h)||(0,w.isNumber)(h);return(0,t.jsx)(c.Tooltip.Portal,{container:m??D??void 0,keepMounted:x,children:(0,t.jsx)(c.Tooltip.Positioner,{dir:N,side:i,align:r,sideOffset:e,alignOffset:n,anchor:o,positionMethod:l,collisionBoundary:u,collisionPadding:p,collisionAvoidance:T,sticky:_,disableAnchorTracking:f,className:v.positioner,style:{maxWidth:b},children:(0,t.jsxs)(c.Tooltip.Popup,{role:"tooltip",...k,"data-with-exit-animation":j||void 0,className:S.mergeClassNames(v.popup,d),children:[s?(0,t.jsx)(I,{children:h}):h,g&&(0,t.jsx)(c.Tooltip.Arrow,{className:v.arrow})]})})})},V=({content:i,children:r,open:e,defaultOpen:n,onOpenChange:o,onOpenChangeComplete:l,disabled:u=!1,disableHoverablePopup:p,trackCursorAxis:T,actionsRef:_,triggerId:f,defaultTriggerId:g,delay:j,closeDelay:b,closeOnClick:m,...x})=>{const d=u||!a.isDefined(i)||i===""||i===!1;return(0,t.jsxs)(c.Tooltip.Root,{open:a.isDefined(e)?e&&!d:void 0,defaultOpen:n&&!d,onOpenChange:o,onOpenChangeComplete:l,disabled:d,disableHoverablePopup:p,trackCursorAxis:T,actionsRef:_,triggerId:f,defaultTriggerId:g,children:[(0,t.jsx)(c.Tooltip.Trigger,{render:r,delay:j,closeDelay:b,closeOnClick:m}),(0,t.jsx)(A,{...x,children:i})]})},C=Object.assign(V,{Root:c.Tooltip.Root,Trigger:c.Tooltip.Trigger,Popup:A,Content:I,Provider:c.Tooltip.Provider,createHandle:c.Tooltip.createHandle}),Y="_truncate_1x6ii_1",Z="_lineClamp_1x6ii_7",R={truncate:Y,lineClamp:Z},H=({render:i,truncate:r,lineClamp:e,className:n,style:o,ref:l,...u})=>{const p=a.isDefined(e)&&Number.isInteger(e)&&e>0;return(0,W.useRender)({render:i,ref:l,props:{...u,className:(0,E.clsx)(r&&R.truncate,p&&R.lineClamp,n),style:p?{...o,"--text-line-clamp":e}:o}})},$=/https?:\/\/[^\s<>[\]]+[^\s<>[\].,;:!?)]/g,ee=i=>{const r=[];let e=0;for(const n of i.matchAll($)){const o=n[0],l=n.index;l>e&&r.push({type:"text",content:i.slice(e,l)}),r.push({type:"link",content:o}),e=l+o.length}return e<i.length&&r.push({type:"text",content:i.slice(e)}),r},te="_link_mrld0_1",ie={link:te},re=({text:i})=>(0,w.isNonEmptyString)(i)?(0,t.jsx)(t.Fragment,{children:ee(i).map((r,e)=>r.type==="link"?(0,t.jsx)("a",{className:ie.link,href:M.getSafeUrl(r.content),target:"_blank",rel:"noopener noreferrer",onClick:n=>n.stopPropagation(),children:r.content},e):r.content)}):null,ne="_overflowingMultilineText_1qcnw_1",oe="_overflowingText_1qcnw_20",le="_large_1qcnw_37",se="_multilineTooltip_1qcnw_41",P={overflowingMultilineText:ne,overflowingText:oe,large:le,multilineTooltip:se},ae=(0,q.memo)(function({size:r="small",text:e,isTooltipMultiline:n,displayedMaxRows:o,tooltipContent:l,tooltipDelay:u=500,tooltipPlace:p="bottom",alwaysShowTooltip:T=!1,isFocusable:_=!1}){const f=(0,q.useRef)(null),[g,j]=(0,q.useState)(!1),[b,m]=(0,q.useState)(!1),x=()=>{const s=f.current,O=a.isDefined(s)&&(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);return j(O),O},d=s=>{if(!s){m(!1);return}m(x()||T)},h=()=>{f.current?.focus(),d(!0)},k=s=>{s.stopPropagation(),s.preventDefault()},D=(0,w.isNonEmptyString)(l)?l:(0,w.isNonEmptyString)(e)?e:null,N=a.isDefined(o);return(0,t.jsxs)(C.Root,{open:b&&a.isDefined(D),onOpenChange:(...s)=>{const[O,y]=s;if(!O&&y.reason==="trigger-hover"&&_&&document.activeElement===f.current){y.cancel();return}d(O)},disabled:!a.isDefined(D)||!g&&!T,children:[(0,t.jsx)(C.Trigger,{delay:u,closeOnClick:!1,render:(0,t.jsx)(H,{...N?{lineClamp:o||1}:{truncate:!0},"data-testid":"tooltip","data-content-overflowing":g?"":void 0,className:(0,E.clsx)(N?P.overflowingMultilineText:P.overflowingText,r==="large"&&P.large),ref:f,tabIndex:_?0:void 0,onPointerEnter:x,onFocus:_?()=>d(!0):void 0,onClick:_?h:void 0,children:(0,w.isNonEmptyString)(e)?(0,t.jsx)(re,{text:e}):e})}),(0,t.jsx)(C.Popup,{className:n?P.multilineTooltip:void 0,sideOffset:5,side:p,positionMethod:"absolute",onClick:k,children:D})]})});Object.defineProperty(exports,"OverflowingTextWithTooltip",{enumerable:!0,get:function(){return ae}});Object.defineProperty(exports,"Text",{enumerable:!0,get:function(){return H}});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:function(){return C}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let d=require("clsx"),a=require("react/jsx-runtime"),y=require("@sniptt/guards"),o=require("@base-ui/react/progress");var B="_banner_i03ag_1",f="_primaryBlue_i03ag_17",k="_primaryDanger_i03ag_23",N="_secondaryBlue_i03ag_29",x="_secondaryDanger_i03ag_35",e={banner:B,primaryBlue:f,primaryDanger:k,secondaryBlue:N,secondaryDanger:x},j={primary:{blue:e.primaryBlue,danger:e.primaryDanger},secondary:{blue:e.secondaryBlue,danger:e.secondaryDanger}},P=({color:r="blue",variant:i="primary",className:t,children:n})=>(0,a.jsx)("div",{className:(0,d.clsx)(e.banner,j[i][r],t),children:n}),A="_bar_1kcc7_1",D="_progressBarGrowIn_1kcc7_1",q="_track_1kcc7_20",E="_indicator_1kcc7_26",O="_glint_1kcc7_45",S="_progressBarGlint_1kcc7_1",s={bar:A,progressBarGrowIn:D,track:q,indicator:E,glint:O,progressBarGlint:S},h=({value:r,size:i="md",className:t,barColor:n,backgroundColor:g="none",withBorderRadius:_=!1,withGrowIn:c=!1,withGlint:u=!1,withSpringFill:m=!1,withMinimumFillWidth:p=!0,ariaLabel:b,onGrowInComplete:v})=>(0,a.jsx)(o.Progress.Root,{className:(0,d.clsx)(s.bar,t),"data-size":i,"data-with-border-radius":_||void 0,"data-grow-in":c||void 0,"aria-label":b,value:r,onAnimationEnd:l=>{c&&l.target===l.currentTarget&&v?.()},style:{"--progress-bar-background-color":g,...(0,y.isNonEmptyString)(n)?{"--progress-bar-color":n}:{}},children:(0,a.jsx)(o.Progress.Track,{className:s.track,children:(0,a.jsx)(o.Progress.Indicator,{className:s.indicator,"data-with-border-radius":_||void 0,"data-spring-fill":m||void 0,"data-nonzero":p&&r>0||void 0,children:u&&(0,a.jsx)("span",{className:s.glint},r)})})});Object.defineProperty(exports,"Banner",{enumerable:!0,get:function(){return P}});Object.defineProperty(exports,"ProgressBar",{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { clsx as l } from "clsx";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { isNonEmptyString as b } from "@sniptt/guards";
|
|
4
|
+
import { Progress as _ } from "@base-ui/react/progress";
|
|
5
|
+
var B = "_banner_i03ag_1", f = "_primaryBlue_i03ag_17", k = "_primaryDanger_i03ag_23", N = "_secondaryBlue_i03ag_29", A = "_secondaryDanger_i03ag_35", e = {
|
|
6
|
+
banner: B,
|
|
7
|
+
primaryBlue: f,
|
|
8
|
+
primaryDanger: k,
|
|
9
|
+
secondaryBlue: N,
|
|
10
|
+
secondaryDanger: A
|
|
11
|
+
}, D = {
|
|
12
|
+
primary: {
|
|
13
|
+
blue: e.primaryBlue,
|
|
14
|
+
danger: e.primaryDanger
|
|
15
|
+
},
|
|
16
|
+
secondary: {
|
|
17
|
+
blue: e.secondaryBlue,
|
|
18
|
+
danger: e.secondaryDanger
|
|
19
|
+
}
|
|
20
|
+
}, z = ({ color: r = "blue", variant: i = "primary", className: s, children: n }) => /* @__PURE__ */ a("div", {
|
|
21
|
+
className: l(e.banner, D[i][r], s),
|
|
22
|
+
children: n
|
|
23
|
+
}), E = "_bar_1kcc7_1", S = "_progressBarGrowIn_1kcc7_1", h = "_track_1kcc7_20", x = "_indicator_1kcc7_26", G = "_glint_1kcc7_45", I = "_progressBarGlint_1kcc7_1", o = {
|
|
24
|
+
bar: E,
|
|
25
|
+
progressBarGrowIn: S,
|
|
26
|
+
track: h,
|
|
27
|
+
indicator: x,
|
|
28
|
+
glint: G,
|
|
29
|
+
progressBarGlint: I
|
|
30
|
+
}, L = ({ value: r, size: i = "md", className: s, barColor: n, backgroundColor: g = "none", withBorderRadius: c = !1, withGrowIn: d = !1, withGlint: m = !1, withSpringFill: p = !1, withMinimumFillWidth: v = !0, ariaLabel: u, onGrowInComplete: y }) => /* @__PURE__ */ a(_.Root, {
|
|
31
|
+
className: l(o.bar, s),
|
|
32
|
+
"data-size": i,
|
|
33
|
+
"data-with-border-radius": c || void 0,
|
|
34
|
+
"data-grow-in": d || void 0,
|
|
35
|
+
"aria-label": u,
|
|
36
|
+
value: r,
|
|
37
|
+
onAnimationEnd: (t) => {
|
|
38
|
+
d && t.target === t.currentTarget && y?.();
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
"--progress-bar-background-color": g,
|
|
42
|
+
...b(n) ? { "--progress-bar-color": n } : {}
|
|
43
|
+
},
|
|
44
|
+
children: /* @__PURE__ */ a(_.Track, {
|
|
45
|
+
className: o.track,
|
|
46
|
+
children: /* @__PURE__ */ a(_.Indicator, {
|
|
47
|
+
className: o.indicator,
|
|
48
|
+
"data-with-border-radius": c || void 0,
|
|
49
|
+
"data-spring-fill": p || void 0,
|
|
50
|
+
"data-nonzero": v && r > 0 || void 0,
|
|
51
|
+
children: m && /* @__PURE__ */ a("span", { className: o.glint }, r)
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
z as n,
|
|
57
|
+
L as t
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const u=require("./isDefined-DS2Q42p5.cjs"),k=require("./utilities-B7EwAZ4L.cjs"),z=require("./Loader-CMXdrX1d.cjs"),q=require("./useProvidedTextDirection-B7ovnsdr.cjs");let m=require("clsx"),e=require("react/jsx-runtime"),E=require("@sniptt/guards"),v=require("react"),L=require("@base-ui/react/button"),R=require("@base-ui/react/use-render"),H=require("@base-ui/react/input"),N=require("@base-ui/react/switch");var M="_hotkeys_16heq_1",T={hotkeys:M},A=({hotkeys:t})=>(0,e.jsx)("span",{className:T.hotkeys,"aria-hidden":!0,children:t.join(k.getOsShortcutSeparator())}),w=(0,v.createContext)(null),F="_button_vtbjg_1",K="_content_vtbjg_181",V="_label_vtbjg_190",J="_icon_vtbjg_196",Q="_hidden_vtbjg_206",U="_loader_vtbjg_210",i={button:F,content:K,label:V,icon:J,hidden:Q,loader:U},W=({variant:t="outline",color:n="neutral",size:a="md",fullWidth:s=!1,loading:r=!1,elevated:b=!1,startIcon:o,endIcon:l,hotkeys:d,disabled:B=!1,href:p,render:D,className:P,children:x,...g})=>{const j=(0,v.useContext)(w),S=j?.variant??t,G=j?.color??n,I=j?.size??a,O=k.useIsMobile(),_=u.isDefined(p),$=_?{href:p}:void 0;return(0,e.jsxs)(L.Button,{...g,...$,className:q.mergeClassNames(i.button,P),"data-variant":S,"data-color":G,"data-size":I,"data-full-width":s||void 0,"data-loading":r||void 0,"data-elevated":b||void 0,"aria-busy":r?"true":g["aria-busy"],disabled:B||r,role:_?"link":void 0,nativeButton:!_,render:D??(_?(0,e.jsx)("a",{href:p,children:x}):void 0),children:[(0,e.jsxs)("span",{className:(0,m.clsx)(i.content,r&&i.hidden),children:[u.isDefined(o)&&(0,e.jsx)("span",{className:i.icon,"aria-hidden":!0,children:o}),u.isDefined(x)&&(0,e.jsx)("span",{className:i.label,children:x}),u.isDefined(l)&&(0,e.jsx)("span",{className:i.icon,"aria-hidden":!0,children:l}),u.isDefined(d)&&!O&&(0,e.jsx)(A,{hotkeys:d})]}),r&&(0,e.jsx)("span",{className:i.loader,"aria-hidden":!0,children:(0,e.jsx)(z.Loader,{})})]})},C=(0,v.createContext)(null),X="_input_14itx_1",Y="_sm_14itx_45",Z="_md_14itx_49",f={input:X,sm:Y,md:Z},ee=({size:t,className:n,...a})=>{const s=(0,v.useContext)(C),r=t??s?.size??"md";return(0,e.jsx)(H.Input,{...a,className:q.mergeClassNames((0,m.clsx)(f.input,f[r]),n),"data-grouped":u.isDefined(s)||void 0})},te="_root_lk8ci_1",re="_sm_lk8ci_27",ne="_md_lk8ci_31",ae="_startElement_lk8ci_35",se="_endElement_lk8ci_36",c={root:te,sm:re,md:ne,startElement:ae,endElement:se},y=t=>u.isDefined(t)&&!(0,E.isBoolean)(t)&&t!=="",ie=({size:t="md",startElement:n,endElement:a,className:s,children:r,render:b,ref:o,...l})=>{const d=(0,R.useRender)({render:b,ref:o,props:{...l,className:(0,m.clsx)(c.root,c[t],s),children:(0,e.jsxs)(e.Fragment,{children:[y(n)&&(0,e.jsx)("span",{className:c.startElement,children:n}),r,y(a)&&(0,e.jsx)("span",{className:c.endElement,children:a})]})}});return(0,e.jsx)(C.Provider,{value:{size:t},children:d})},ue="_root_rn2ew_1",oe="_sm_rn2ew_33",le="_md_rn2ew_39",de="_thumb_rn2ew_45",h={root:ue,sm:oe,md:le,thumb:de},_e=({size:t="md",className:n,children:a,...s})=>(0,e.jsxs)(N.Switch.Root,{...s,className:q.mergeClassNames((0,m.clsx)(h.root,h[t]),n),children:[(0,e.jsx)(N.Switch.Thumb,{className:h.thumb}),a]});Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return W}});Object.defineProperty(exports,"ButtonGroupContext",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"Input",{enumerable:!0,get:function(){return ee}});Object.defineProperty(exports,"InputGroup",{enumerable:!0,get:function(){return ie}});Object.defineProperty(exports,"Input_module_default",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"Switch",{enumerable:!0,get:function(){return _e}});
|