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,264 @@
|
|
|
1
|
+
import { t as S } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { t as P } from "./theme-CjHovJAZ.js";
|
|
3
|
+
import { n as c, t as T } from "./useProvidedTextDirection-P1dtjUtE.js";
|
|
4
|
+
import { t as H } from "./ListItem-Bg7Sk5Nv.js";
|
|
5
|
+
import { t as x } from "./Heading-DvxTKEaL.js";
|
|
6
|
+
import { i as k, n as F, r as y, t as O } from "./MenuSeparator-CyUYx1nk.js";
|
|
7
|
+
import { clsx as p } from "clsx";
|
|
8
|
+
import { jsx as t, jsxs as R } from "react/jsx-runtime";
|
|
9
|
+
import { isBoolean as A, isFunction as L } from "@sniptt/guards";
|
|
10
|
+
import { createContext as w, useContext as B } from "react";
|
|
11
|
+
import { useRender as f } from "@base-ui/react/use-render";
|
|
12
|
+
import { Menu as l } from "@base-ui/react/menu";
|
|
13
|
+
import { AlertDialog as u } from "@base-ui/react/alert-dialog";
|
|
14
|
+
import { Dialog as n } from "@base-ui/react/dialog";
|
|
15
|
+
var G = "_backdrop_aak4r_1", $ = "_viewport_aak4r_12", z = "_popup_aak4r_30", U = "_header_aak4r_82", j = "_body_aak4r_91", E = "_footer_aak4r_95", V = "_title_aak4r_106", q = "_description_aak4r_113", s = {
|
|
16
|
+
backdrop: G,
|
|
17
|
+
viewport: $,
|
|
18
|
+
popup: z,
|
|
19
|
+
header: U,
|
|
20
|
+
body: j,
|
|
21
|
+
footer: E,
|
|
22
|
+
title: V,
|
|
23
|
+
description: q
|
|
24
|
+
}, J = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
25
|
+
render: e,
|
|
26
|
+
ref: r,
|
|
27
|
+
props: {
|
|
28
|
+
...a,
|
|
29
|
+
className: p(s.body, o)
|
|
30
|
+
}
|
|
31
|
+
}), K = ({ className: e, ...r }) => /* @__PURE__ */ t(u.Description, {
|
|
32
|
+
...r,
|
|
33
|
+
className: c(s.description, e)
|
|
34
|
+
}), Q = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
35
|
+
render: e,
|
|
36
|
+
ref: r,
|
|
37
|
+
props: {
|
|
38
|
+
...a,
|
|
39
|
+
className: p(s.footer, o)
|
|
40
|
+
}
|
|
41
|
+
}), W = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
42
|
+
render: e,
|
|
43
|
+
ref: r,
|
|
44
|
+
props: {
|
|
45
|
+
...a,
|
|
46
|
+
className: p(s.header, o)
|
|
47
|
+
}
|
|
48
|
+
}), X = ({ size: e = "md", container: r, keepMounted: o, className: a, ...i }) => {
|
|
49
|
+
const d = P(), m = T();
|
|
50
|
+
return /* @__PURE__ */ R(u.Portal, {
|
|
51
|
+
container: r === void 0 ? d ?? void 0 : r,
|
|
52
|
+
keepMounted: o,
|
|
53
|
+
children: [/* @__PURE__ */ t(u.Backdrop, { className: s.backdrop }), /* @__PURE__ */ t(u.Viewport, {
|
|
54
|
+
dir: m,
|
|
55
|
+
className: s.viewport,
|
|
56
|
+
children: /* @__PURE__ */ t(u.Popup, {
|
|
57
|
+
...i,
|
|
58
|
+
"data-size": e,
|
|
59
|
+
className: c(s.popup, a)
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}, Y = ({ className: e, ...r }) => /* @__PURE__ */ t(u.Title, {
|
|
64
|
+
...r,
|
|
65
|
+
className: c(s.title, e)
|
|
66
|
+
}), Z = () => ({
|
|
67
|
+
Root: u.Root,
|
|
68
|
+
Trigger: u.Trigger,
|
|
69
|
+
Popup: X,
|
|
70
|
+
Title: Y,
|
|
71
|
+
Description: K,
|
|
72
|
+
Close: u.Close,
|
|
73
|
+
Header: W,
|
|
74
|
+
Body: J,
|
|
75
|
+
Footer: Q
|
|
76
|
+
}), Ue = /* @__PURE__ */ Z(), ee = "_cardContent_10wri_1", re = { cardContent: ee }, ae = ({ children: e, className: r, divider: o, isClickable: a, hasHoverHighlight: i, ...d }) => /* @__PURE__ */ t("div", {
|
|
77
|
+
className: p(re.cardContent, r),
|
|
78
|
+
"data-divider": o || void 0,
|
|
79
|
+
"data-clickable": a || void 0,
|
|
80
|
+
"data-hover-highlight": i || void 0,
|
|
81
|
+
...d,
|
|
82
|
+
children: e
|
|
83
|
+
}), oe = "_cardFooter_15rlh_1", te = { cardFooter: oe }, ie = ({ children: e, className: r, divider: o, ...a }) => /* @__PURE__ */ t("div", {
|
|
84
|
+
className: p(te.cardFooter, r),
|
|
85
|
+
"data-no-divider": o === !1 || void 0,
|
|
86
|
+
...a,
|
|
87
|
+
children: e
|
|
88
|
+
}), se = "_cardHeader_yrli2_1", de = { cardHeader: se }, le = ({ children: e, className: r, ...o }) => /* @__PURE__ */ t("div", {
|
|
89
|
+
className: p(de.cardHeader, r),
|
|
90
|
+
...o,
|
|
91
|
+
children: e
|
|
92
|
+
}), ne = "_card_1cl8g_1", ce = { card: ne }, pe = ({ children: e, className: r, fullWidth: o, rounded: a, backgroundColor: i, style: d, ...m }) => /* @__PURE__ */ t("div", {
|
|
93
|
+
className: p(ce.card, r),
|
|
94
|
+
"data-full-width": o || void 0,
|
|
95
|
+
"data-rounded": a || void 0,
|
|
96
|
+
style: S(i) ? {
|
|
97
|
+
...d,
|
|
98
|
+
"--card-background-color": i
|
|
99
|
+
} : d,
|
|
100
|
+
...m,
|
|
101
|
+
children: e
|
|
102
|
+
}), je = {
|
|
103
|
+
Root: pe,
|
|
104
|
+
Header: le,
|
|
105
|
+
Content: ae,
|
|
106
|
+
Footer: ie
|
|
107
|
+
}, me = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
108
|
+
render: e,
|
|
109
|
+
ref: r,
|
|
110
|
+
props: {
|
|
111
|
+
...a,
|
|
112
|
+
className: p(s.body, o)
|
|
113
|
+
}
|
|
114
|
+
}), ue = ({ className: e, ...r }) => /* @__PURE__ */ t(n.Description, {
|
|
115
|
+
...r,
|
|
116
|
+
className: c(s.description, e)
|
|
117
|
+
}), ve = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
118
|
+
render: e,
|
|
119
|
+
ref: r,
|
|
120
|
+
props: {
|
|
121
|
+
...a,
|
|
122
|
+
className: p(s.footer, o)
|
|
123
|
+
}
|
|
124
|
+
}), ge = ({ render: e, ref: r, className: o, ...a }) => f({
|
|
125
|
+
render: e,
|
|
126
|
+
ref: r,
|
|
127
|
+
props: {
|
|
128
|
+
...a,
|
|
129
|
+
className: p(s.header, o)
|
|
130
|
+
}
|
|
131
|
+
}), _e = ({ size: e = "md", container: r, keepMounted: o, backdrop: a = !0, viewportProps: i, className: d, ...m }) => {
|
|
132
|
+
const _ = P(), h = T(), v = A(a) ? {} : a;
|
|
133
|
+
return /* @__PURE__ */ R(n.Portal, {
|
|
134
|
+
container: r === void 0 ? _ ?? void 0 : r,
|
|
135
|
+
keepMounted: o,
|
|
136
|
+
children: [a !== !1 && /* @__PURE__ */ t(n.Backdrop, {
|
|
137
|
+
...v,
|
|
138
|
+
className: c(s.backdrop, v.className)
|
|
139
|
+
}), /* @__PURE__ */ t(n.Viewport, {
|
|
140
|
+
dir: h,
|
|
141
|
+
"data-backdrop-hidden": a === !1,
|
|
142
|
+
...i,
|
|
143
|
+
className: c(s.viewport, i?.className),
|
|
144
|
+
children: /* @__PURE__ */ t(n.Popup, {
|
|
145
|
+
...m,
|
|
146
|
+
"data-size": e,
|
|
147
|
+
className: c(s.popup, d)
|
|
148
|
+
})
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
151
|
+
}, fe = "_title_yzpck_1", he = { title: fe }, Ce = ({ level: e = 2, size: r = "lg", color: o = "primary", className: a, render: i, ...d }) => /* @__PURE__ */ t(n.Title, {
|
|
152
|
+
...d,
|
|
153
|
+
className: c(he.title, a),
|
|
154
|
+
render: /* @__PURE__ */ t(x, {
|
|
155
|
+
level: e,
|
|
156
|
+
size: r,
|
|
157
|
+
color: o,
|
|
158
|
+
render: i
|
|
159
|
+
})
|
|
160
|
+
}), Ee = {
|
|
161
|
+
createHandle: n.createHandle,
|
|
162
|
+
Root: n.Root,
|
|
163
|
+
Trigger: n.Trigger,
|
|
164
|
+
Popup: _e,
|
|
165
|
+
Title: Ce,
|
|
166
|
+
Description: ue,
|
|
167
|
+
Close: n.Close,
|
|
168
|
+
Header: ge,
|
|
169
|
+
Body: me,
|
|
170
|
+
Footer: ve
|
|
171
|
+
}, C = ({ props: { color: e = "neutral", startIcon: r, endIcon: o, description: a, descriptionPlacement: i, hotkeys: d, hotkeysJoinLabel: m, disabled: _ = !1, children: h, render: v, ...N }, getListItemState: D }) => ({
|
|
172
|
+
...N,
|
|
173
|
+
disabled: _,
|
|
174
|
+
render: (b, g) => /* @__PURE__ */ t(H, {
|
|
175
|
+
...b,
|
|
176
|
+
render: L(v) ? (M) => v(M, g) : v,
|
|
177
|
+
color: e,
|
|
178
|
+
disabled: _,
|
|
179
|
+
startIcon: r,
|
|
180
|
+
endIcon: o,
|
|
181
|
+
description: a,
|
|
182
|
+
descriptionPlacement: i,
|
|
183
|
+
hotkeys: d,
|
|
184
|
+
hotkeysJoinLabel: m,
|
|
185
|
+
...D?.(g),
|
|
186
|
+
children: h
|
|
187
|
+
})
|
|
188
|
+
}), Ne = (e) => /* @__PURE__ */ t(l.CheckboxItem, { ...C({
|
|
189
|
+
props: e,
|
|
190
|
+
getListItemState: (r) => ({
|
|
191
|
+
indicator: "checkbox",
|
|
192
|
+
selected: r.checked
|
|
193
|
+
})
|
|
194
|
+
}) }), De = (e) => /* @__PURE__ */ t(l.Item, { ...C({ props: e }) }), I = w(!1), be = {
|
|
195
|
+
root: {
|
|
196
|
+
side: "bottom",
|
|
197
|
+
align: "start",
|
|
198
|
+
sideOffset: 8,
|
|
199
|
+
alignOffset: 0
|
|
200
|
+
},
|
|
201
|
+
submenu: {
|
|
202
|
+
side: "inline-end",
|
|
203
|
+
align: "start",
|
|
204
|
+
sideOffset: 0,
|
|
205
|
+
alignOffset: -4
|
|
206
|
+
}
|
|
207
|
+
}, ke = ({ side: e, align: r, sideOffset: o, alignOffset: a, anchor: i, keepMounted: d, className: m, children: _, ...h }) => {
|
|
208
|
+
const v = P(), N = T(), { container: D = v ?? void 0, ...b } = h, g = be[B(I) ? "submenu" : "root"];
|
|
209
|
+
return /* @__PURE__ */ t(l.Portal, {
|
|
210
|
+
container: D,
|
|
211
|
+
keepMounted: d,
|
|
212
|
+
children: /* @__PURE__ */ t(l.Positioner, {
|
|
213
|
+
dir: N,
|
|
214
|
+
side: e ?? g.side,
|
|
215
|
+
align: r ?? g.align,
|
|
216
|
+
sideOffset: o ?? g.sideOffset,
|
|
217
|
+
alignOffset: a ?? g.alignOffset,
|
|
218
|
+
anchor: i,
|
|
219
|
+
className: k.positioner,
|
|
220
|
+
children: /* @__PURE__ */ t(l.Popup, {
|
|
221
|
+
...b,
|
|
222
|
+
className: c(k.popup, m),
|
|
223
|
+
children: _
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
}, Pe = ({ className: e, ...r }) => /* @__PURE__ */ t(l.RadioGroup, {
|
|
228
|
+
...r,
|
|
229
|
+
className: c(k.group, e)
|
|
230
|
+
}), Te = (e) => /* @__PURE__ */ t(l.RadioItem, { ...C({
|
|
231
|
+
props: e,
|
|
232
|
+
getListItemState: (r) => ({
|
|
233
|
+
indicator: "check",
|
|
234
|
+
selected: r.checked
|
|
235
|
+
})
|
|
236
|
+
}) }), Re = ({ children: e, ...r }) => /* @__PURE__ */ t(I.Provider, {
|
|
237
|
+
value: !0,
|
|
238
|
+
children: /* @__PURE__ */ t(l.SubmenuRoot, {
|
|
239
|
+
...r,
|
|
240
|
+
children: e
|
|
241
|
+
})
|
|
242
|
+
}), Ie = (e) => /* @__PURE__ */ t(l.SubmenuTrigger, { ...C({
|
|
243
|
+
props: e,
|
|
244
|
+
getListItemState: () => ({ hasSubmenu: !0 })
|
|
245
|
+
}) }), Ve = {
|
|
246
|
+
Root: l.Root,
|
|
247
|
+
Trigger: l.Trigger,
|
|
248
|
+
Popup: ke,
|
|
249
|
+
Item: De,
|
|
250
|
+
CheckboxItem: Ne,
|
|
251
|
+
RadioGroup: Pe,
|
|
252
|
+
RadioItem: Te,
|
|
253
|
+
Group: y,
|
|
254
|
+
GroupLabel: F,
|
|
255
|
+
Separator: O,
|
|
256
|
+
SubmenuRoot: Re,
|
|
257
|
+
SubmenuTrigger: Ie
|
|
258
|
+
};
|
|
259
|
+
export {
|
|
260
|
+
Ue as i,
|
|
261
|
+
Ee as n,
|
|
262
|
+
je as r,
|
|
263
|
+
Ve as t
|
|
264
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const j=require("./theme-DumxXtpW.cjs"),k=require("./isDefined-DS2Q42p5.cjs"),n=require("./useProvidedTextDirection-B7ovnsdr.cjs"),q=require("./ListItem-UYe5GaEQ.cjs"),A=require("./Heading-CQqDjovJ.cjs"),x=require("./MenuSeparator-Ct3cQtJ2.cjs");let c=require("clsx"),o=require("react/jsx-runtime"),M=require("@sniptt/guards"),P=require("react"),D=require("@base-ui/react/use-render"),d=require("@base-ui/react/menu"),g=require("@base-ui/react/alert-dialog"),u=require("@base-ui/react/dialog");var I="_backdrop_aak4r_1",y="_viewport_aak4r_12",O="_popup_aak4r_30",S="_header_aak4r_82",H="_body_aak4r_91",F="_footer_aak4r_95",L="_title_aak4r_106",w="_description_aak4r_113",s={backdrop:I,viewport:y,popup:O,header:S,body:H,footer:F,title:L,description:w},B=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.body,t)}}),G=({className:e,...r})=>(0,o.jsx)(g.AlertDialog.Description,{...r,className:n.mergeClassNames(s.description,e)}),z=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.footer,t)}}),U=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.header,t)}}),E=({size:e="md",container:r,keepMounted:t,className:a,...i})=>{const l=j.useThemeContainer(),m=n.useProvidedTextDirection();return(0,o.jsxs)(g.AlertDialog.Portal,{container:r===void 0?l??void 0:r,keepMounted:t,children:[(0,o.jsx)(g.AlertDialog.Backdrop,{className:s.backdrop}),(0,o.jsx)(g.AlertDialog.Viewport,{dir:m,className:s.viewport,children:(0,o.jsx)(g.AlertDialog.Popup,{...i,"data-size":e,className:n.mergeClassNames(s.popup,a)})})]})},V=({className:e,...r})=>(0,o.jsx)(g.AlertDialog.Title,{...r,className:n.mergeClassNames(s.title,e)}),$=()=>({Root:g.AlertDialog.Root,Trigger:g.AlertDialog.Trigger,Popup:E,Title:V,Description:G,Close:g.AlertDialog.Close,Header:U,Body:B,Footer:z}),J=$(),K="_cardContent_10wri_1",Q={cardContent:K},W=({children:e,className:r,divider:t,isClickable:a,hasHoverHighlight:i,...l})=>(0,o.jsx)("div",{className:(0,c.clsx)(Q.cardContent,r),"data-divider":t||void 0,"data-clickable":a||void 0,"data-hover-highlight":i||void 0,...l,children:e}),X="_cardFooter_15rlh_1",Y={cardFooter:X},Z=({children:e,className:r,divider:t,...a})=>(0,o.jsx)("div",{className:(0,c.clsx)(Y.cardFooter,r),"data-no-divider":t===!1||void 0,...a,children:e}),ee="_cardHeader_yrli2_1",re={cardHeader:ee},ae=({children:e,className:r,...t})=>(0,o.jsx)("div",{className:(0,c.clsx)(re.cardHeader,r),...t,children:e}),te="_card_1cl8g_1",oe={card:te},ie=({children:e,className:r,fullWidth:t,rounded:a,backgroundColor:i,style:l,...m})=>(0,o.jsx)("div",{className:(0,c.clsx)(oe.card,r),"data-full-width":t||void 0,"data-rounded":a||void 0,style:k.isDefined(i)?{...l,"--card-background-color":i}:l,...m,children:e}),se={Root:ie,Header:ae,Content:W,Footer:Z},le=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.body,t)}}),ne=({className:e,...r})=>(0,o.jsx)(u.Dialog.Description,{...r,className:n.mergeClassNames(s.description,e)}),de=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.footer,t)}}),ue=({render:e,ref:r,className:t,...a})=>(0,D.useRender)({render:e,ref:r,props:{...a,className:(0,c.clsx)(s.header,t)}}),ce=({size:e="md",container:r,keepMounted:t,backdrop:a=!0,viewportProps:i,className:l,...m})=>{const v=j.useThemeContainer(),f=n.useProvidedTextDirection(),p=(0,M.isBoolean)(a)?{}:a;return(0,o.jsxs)(u.Dialog.Portal,{container:r===void 0?v??void 0:r,keepMounted:t,children:[a!==!1&&(0,o.jsx)(u.Dialog.Backdrop,{...p,className:n.mergeClassNames(s.backdrop,p.className)}),(0,o.jsx)(u.Dialog.Viewport,{dir:f,"data-backdrop-hidden":a===!1,...i,className:n.mergeClassNames(s.viewport,i?.className),children:(0,o.jsx)(u.Dialog.Popup,{...m,"data-size":e,className:n.mergeClassNames(s.popup,l)})})]})},me="_title_yzpck_1",ge={title:me},pe=({level:e=2,size:r="lg",color:t="primary",className:a,render:i,...l})=>(0,o.jsx)(u.Dialog.Title,{...l,className:n.mergeClassNames(ge.title,a),render:(0,o.jsx)(A.Heading,{level:e,size:r,color:t,render:i})}),_e={createHandle:u.Dialog.createHandle,Root:u.Dialog.Root,Trigger:u.Dialog.Trigger,Popup:ce,Title:pe,Description:ne,Close:u.Dialog.Close,Header:ue,Body:le,Footer:de},C=({props:{color:e="neutral",startIcon:r,endIcon:t,description:a,descriptionPlacement:i,hotkeys:l,hotkeysJoinLabel:m,disabled:v=!1,children:f,render:p,...N},getListItemState:b})=>({...N,disabled:v,render:(h,_)=>(0,o.jsx)(q.ListItem,{...h,render:(0,M.isFunction)(p)?R=>p(R,_):p,color:e,disabled:v,startIcon:r,endIcon:t,description:a,descriptionPlacement:i,hotkeys:l,hotkeysJoinLabel:m,...b?.(_),children:f})}),ve=e=>(0,o.jsx)(d.Menu.CheckboxItem,{...C({props:e,getListItemState:r=>({indicator:"checkbox",selected:r.checked})})}),xe=e=>(0,o.jsx)(d.Menu.Item,{...C({props:e})}),T=(0,P.createContext)(!1),De={root:{side:"bottom",align:"start",sideOffset:8,alignOffset:0},submenu:{side:"inline-end",align:"start",sideOffset:0,alignOffset:-4}},fe=({side:e,align:r,sideOffset:t,alignOffset:a,anchor:i,keepMounted:l,className:m,children:v,...f})=>{const p=j.useThemeContainer(),N=n.useProvidedTextDirection(),{container:b=p??void 0,...h}=f,_=De[(0,P.useContext)(T)?"submenu":"root"];return(0,o.jsx)(d.Menu.Portal,{container:b,keepMounted:l,children:(0,o.jsx)(d.Menu.Positioner,{dir:N,side:e??_.side,align:r??_.align,sideOffset:t??_.sideOffset,alignOffset:a??_.alignOffset,anchor:i,className:x.Menu_module_default.positioner,children:(0,o.jsx)(d.Menu.Popup,{...h,className:n.mergeClassNames(x.Menu_module_default.popup,m),children:v})})})},Ce=({className:e,...r})=>(0,o.jsx)(d.Menu.RadioGroup,{...r,className:n.mergeClassNames(x.Menu_module_default.group,e)}),Ne=e=>(0,o.jsx)(d.Menu.RadioItem,{...C({props:e,getListItemState:r=>({indicator:"check",selected:r.checked})})}),be=({children:e,...r})=>(0,o.jsx)(T.Provider,{value:!0,children:(0,o.jsx)(d.Menu.SubmenuRoot,{...r,children:e})}),he=e=>(0,o.jsx)(d.Menu.SubmenuTrigger,{...C({props:e,getListItemState:()=>({hasSubmenu:!0})})}),je={Root:d.Menu.Root,Trigger:d.Menu.Trigger,Popup:fe,Item:xe,CheckboxItem:ve,RadioGroup:Ce,RadioItem:Ne,Group:x.MenuGroup,GroupLabel:x.MenuGroupLabel,Separator:x.MenuSeparator,SubmenuRoot:be,SubmenuTrigger:he};Object.defineProperty(exports,"AlertDialog",{enumerable:!0,get:function(){return J}});Object.defineProperty(exports,"Card",{enumerable:!0,get:function(){return se}});Object.defineProperty(exports,"Dialog",{enumerable:!0,get:function(){return _e}});Object.defineProperty(exports,"Menu",{enumerable:!0,get:function(){return je}});
|
package/dist/testing.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./theme-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./theme-DumxXtpW.cjs"),B=require("./isDefined-DS2Q42p5.cjs");let v=require("clsx"),A=require("react/jsx-runtime"),_=require("@sniptt/guards");var U={test:"error",config:{rules:[{id:"color-contrast",enabled:!1}]}},V="_layout_17ld0_1",T={layout:V},w=({width:e,backgroundColor:r,height:t,children:a})=>(0,A.jsx)("div",{className:T.layout,style:{background:r,height:B.isDefined(t)?`${t}px`:"fit-content",minWidth:e?"unset":"300px",width:e?`${e}px`:"fit-content"},children:a}),j="_columnTitle_5dert_1",M="_rowsTitle_5dert_7",y="_rowTitle_5dert_15",F="_elementTitle_5dert_23",S="_container_5dert_32",b="_columnContainer_5dert_37",f="_rowsContainer_5dert_43",N="_rowContainer_5dert_49",k="_elementContainer_5dert_56",D="_cellContainer_5dert_60",n={columnTitle:j,rowsTitle:M,rowTitle:y,elementTitle:F,container:S,columnContainer:b,rowsContainer:f,rowContainer:N,elementContainer:k,cellContainer:D},m={name:"",values:[void 0],props:()=>({})},C=e=>(0,_.isString)(e)||(0,_.isNumber)(e),L=(e,r)=>{const{catalog:{dimensions:t=[],options:a={}}={dimensions:[],options:{}}}=r.parameters||{};if(!t||!Array.isArray(t))return(0,A.jsx)(e,{});const[o=m,i=m,u=m,g=m]=t;return(0,A.jsx)("div",{className:n.container,children:g.values.map((l,R)=>(0,A.jsxs)("div",{className:n.columnContainer,children:[(0,A.jsx)("div",{className:n.columnTitle,children:g.labels?.(l)??(C(l)?l:"")}),u.values.map((c,Q)=>(0,A.jsxs)("div",{className:n.rowsContainer,children:[(0,A.jsx)("div",{className:n.rowsTitle,children:u.labels?.(c)??(C(c)?c:"")}),i.values.map((d,p)=>(0,A.jsxs)("div",{className:n.rowContainer,children:[(0,A.jsx)("div",{className:n.rowTitle,children:i.labels?.(d)??(C(d)?d:"")}),o.values.map((s,E)=>(0,A.jsxs)("div",{className:n.cellContainer,id:t.length>1?`catalog-cell-${R}-${Q}-${p}-${E}`:s,children:[(0,A.jsx)("span",{className:n.elementTitle,children:o.labels?.(s)??(C(s)?s:"")}),(0,A.jsx)("div",{className:(0,v.clsx)(n.elementContainer,a?.elementContainer?.className),style:{minWidth:a?.elementContainer?.width?`${a.elementContainer.width}px`:"auto",...a?.elementContainer?.style},children:(0,A.jsx)(e,{args:{...r.args,...o.props(s),...i.props(d),...u.props(c),...g.props(l)}})})]},`d1-${E}`))]},`d2-${p}`))]},`d3-${Q}`))]},`d4-${R}`))})},I=(e,r)=>{if(e)switch(r){case"default":return h.themeCssVariables.grayScale.gray11;case"danger":return h.themeCssVariables.color.red;case"blue":return h.themeCssVariables.color.blue;default:return}},K=(e,r)=>{const{container:t}=r.parameters,a=r.args.inverted,o=r.args.accent,i=I(a,o);return(0,A.jsx)(w,{width:t?.width,height:t?.height,backgroundColor:i,children:(0,A.jsx)(e,{})})},x="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=",O=e=>Object.assign(new EventTarget,{media:e,matches:!1,onchange:null,addListener:()=>{},removeListener:()=>{}}),W=e=>{const r=window.matchMedia;return window.matchMedia=t=>{const a=(0,_.isFunction)(r)?r.call(window,t):O(t),o=e[t];return B.isDefined(o)&&Object.defineProperty(a,"matches",{value:o}),a},()=>{window.matchMedia=r}};exports.A11Y_DEFER_COLOR_CONTRAST=U;exports.AVATAR_URL_MOCK=x;exports.CatalogDecorator=L;exports.ComponentDecorator=K;exports.ComponentStorybookLayout=w;exports.overrideMediaQueryMatches=W;
|
package/dist/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as w } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import { a as Q } from "./theme-
|
|
2
|
+
import { a as Q } from "./theme-CjHovJAZ.js";
|
|
3
3
|
import { clsx as _ } from "clsx";
|
|
4
4
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
5
5
|
import { isFunction as U, isNumber as v, isString as V } from "@sniptt/guards";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type ThemeColor = 'red' | 'ruby' | 'crimson' | 'tomato' | 'orange' | 'amber' | 'yellow' | 'lime' | 'grass' | 'green' | 'jade' | 'mint' | 'turquoise' | 'cyan' | 'sky' | 'blue' | 'iris' | 'violet' | 'purple' | 'plum' | 'pink' | 'bronze' | 'gold' | 'brown' | 'gray';
|
|
2
|
-
export declare const MAIN_COLOR_NAMES: ThemeColor[];
|
|
2
|
+
export declare const MAIN_COLOR_NAMES: [ThemeColor, ...ThemeColor[]];
|
|
@@ -17,6 +17,9 @@ export declare const THEME_LIGHT: {
|
|
|
17
17
|
sm: {
|
|
18
18
|
width: string;
|
|
19
19
|
};
|
|
20
|
+
compact: {
|
|
21
|
+
width: string;
|
|
22
|
+
};
|
|
20
23
|
md: {
|
|
21
24
|
width: string;
|
|
22
25
|
};
|
|
@@ -153,6 +156,7 @@ export declare const THEME_LIGHT: {
|
|
|
153
156
|
color: string;
|
|
154
157
|
light: string;
|
|
155
158
|
sidebar: string;
|
|
159
|
+
bottomPanel: string;
|
|
156
160
|
strong: string;
|
|
157
161
|
underline: string;
|
|
158
162
|
superHeavy: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ThemeColor } from './constants/MainColorNames';
|
|
2
|
-
export declare const getNextThemeColor: (colorNames: ThemeColor[], currentColor?: ThemeColor) => ThemeColor;
|
|
2
|
+
export declare const getNextThemeColor: (colorNames: [ThemeColor, ...ThemeColor[]], currentColor?: ThemeColor) => ThemeColor;
|
|
@@ -17,6 +17,9 @@ export declare const themeCssVariables: {
|
|
|
17
17
|
sm: {
|
|
18
18
|
width: string;
|
|
19
19
|
};
|
|
20
|
+
compact: {
|
|
21
|
+
width: string;
|
|
22
|
+
};
|
|
20
23
|
md: {
|
|
21
24
|
width: string;
|
|
22
25
|
};
|
|
@@ -189,6 +192,7 @@ export declare const themeCssVariables: {
|
|
|
189
192
|
color: string;
|
|
190
193
|
light: string;
|
|
191
194
|
sidebar: string;
|
|
195
|
+
bottomPanel: string;
|
|
192
196
|
strong: string;
|
|
193
197
|
underline: string;
|
|
194
198
|
superHeavy: string;
|
|
@@ -17,6 +17,9 @@ export type ThemeType = {
|
|
|
17
17
|
sm: {
|
|
18
18
|
width: string;
|
|
19
19
|
};
|
|
20
|
+
compact: {
|
|
21
|
+
width: string;
|
|
22
|
+
};
|
|
20
23
|
md: {
|
|
21
24
|
width: string;
|
|
22
25
|
};
|
|
@@ -189,6 +192,7 @@ export type ThemeType = {
|
|
|
189
192
|
color: string;
|
|
190
193
|
light: string;
|
|
191
194
|
sidebar: string;
|
|
195
|
+
bottomPanel: string;
|
|
192
196
|
strong: string;
|
|
193
197
|
underline: string;
|
|
194
198
|
superHeavy: string;
|
|
@@ -79,6 +79,7 @@ var Z = { duration: {
|
|
|
79
79
|
},
|
|
80
80
|
modal: { size: {
|
|
81
81
|
sm: { width: "300px" },
|
|
82
|
+
compact: { width: "360px" },
|
|
82
83
|
md: { width: "400px" },
|
|
83
84
|
lg: { width: "53%" },
|
|
84
85
|
xl: {
|
|
@@ -140,6 +141,7 @@ var Z = { duration: {
|
|
|
140
141
|
},
|
|
141
142
|
modal: { size: {
|
|
142
143
|
sm: { width: "300px" },
|
|
144
|
+
compact: { width: "360px" },
|
|
143
145
|
md: { width: "400px" },
|
|
144
146
|
lg: { width: "53%" },
|
|
145
147
|
xl: {
|
|
@@ -267,6 +269,7 @@ var Z = { duration: {
|
|
|
267
269
|
color: "rgba(0, 0, 0, 0.6)",
|
|
268
270
|
light: "0px 2px 4px 0px rgba(0, 0, 0, 0.04), 0px 0px 4px 0px rgba(0, 0, 0, 0.08)",
|
|
269
271
|
sidebar: "-4px 4px 4px 0px rgba(0, 0, 0, 0.03)",
|
|
272
|
+
bottomPanel: "0px 0px 20px 0px rgba(0, 0, 0, 0.1)",
|
|
270
273
|
strong: "2px 4px 16px 0px rgba(0, 0, 0, 0.16), 0px 2px 4px 0px rgba(0, 0, 0, 0.08)",
|
|
271
274
|
underline: "0px 1px 0px 0px rgba(0, 0, 0, 0.32)",
|
|
272
275
|
superHeavy: "2px 4px 16px 0px rgba(0, 0, 0, 0.12), 0px 2px 4px 0px rgba(0, 0, 0, 0.04)"
|
|
@@ -1185,6 +1188,7 @@ var Z = { duration: {
|
|
|
1185
1188
|
},
|
|
1186
1189
|
modal: { size: {
|
|
1187
1190
|
sm: { width: "300px" },
|
|
1191
|
+
compact: { width: "360px" },
|
|
1188
1192
|
md: { width: "400px" },
|
|
1189
1193
|
lg: { width: "53%" },
|
|
1190
1194
|
xl: {
|
|
@@ -1312,6 +1316,7 @@ var Z = { duration: {
|
|
|
1312
1316
|
color: "color(display-p3 0 0 0 / 0.039)",
|
|
1313
1317
|
light: "0px 2px 4px 0px color(display-p3 0 0 0 / 0.039), 0px 0px 4px 0px color(display-p3 0 0 0 / 0.078)",
|
|
1314
1318
|
sidebar: "-4px 4px 4px 0px rgba(0, 0, 0, 0.005)",
|
|
1319
|
+
bottomPanel: "0px 0px 20px 0px color(display-p3 0 0 0 / 0.1)",
|
|
1315
1320
|
strong: "2px 4px 16px 0px color(display-p3 0 0 0 / 0.161), 0px 2px 4px 0px color(display-p3 0 0 0 / 0.078)",
|
|
1316
1321
|
underline: "0px 1px 0px 0px color(display-p3 0 0 0 / 0.361)",
|
|
1317
1322
|
superHeavy: "0px 0px 8px 0px color(display-p3 0 0 0 / 0.161), 0px 8px 64px -16px color(display-p3 0 0 0 / 0.478), 0px 24px 56px -16px color(display-p3 0 0 0 / 0.078)"
|
|
@@ -2214,7 +2219,10 @@ var Z = { duration: {
|
|
|
2214
2219
|
amber12: "#341500dd"
|
|
2215
2220
|
}
|
|
2216
2221
|
}
|
|
2217
|
-
}, er = (r, o) =>
|
|
2222
|
+
}, er = (r, o) => {
|
|
2223
|
+
const [a] = r;
|
|
2224
|
+
return o == null ? a : r[(r.findIndex((l) => l === o) + 1) % r.length] ?? a;
|
|
2225
|
+
}, v = {
|
|
2218
2226
|
icon: {
|
|
2219
2227
|
size: {
|
|
2220
2228
|
sm: "var(--t-icon-size-sm)",
|
|
@@ -2230,6 +2238,7 @@ var Z = { duration: {
|
|
|
2230
2238
|
},
|
|
2231
2239
|
modal: { size: {
|
|
2232
2240
|
sm: { width: "var(--t-modal-size-sm-width)" },
|
|
2241
|
+
compact: { width: "var(--t-modal-size-compact-width)" },
|
|
2233
2242
|
md: { width: "var(--t-modal-size-md-width)" },
|
|
2234
2243
|
lg: { width: "var(--t-modal-size-lg-width)" },
|
|
2235
2244
|
xl: {
|
|
@@ -2393,6 +2402,7 @@ var Z = { duration: {
|
|
|
2393
2402
|
color: "var(--t-box-shadow-color)",
|
|
2394
2403
|
light: "var(--t-box-shadow-light)",
|
|
2395
2404
|
sidebar: "var(--t-box-shadow-sidebar)",
|
|
2405
|
+
bottomPanel: "var(--t-box-shadow-bottom-panel)",
|
|
2396
2406
|
strong: "var(--t-box-shadow-strong)",
|
|
2397
2407
|
underline: "var(--t-box-shadow-underline)",
|
|
2398
2408
|
superHeavy: "var(--t-box-shadow-super-heavy)"
|
|
@@ -3303,16 +3313,16 @@ var Z = { duration: {
|
|
|
3303
3313
|
if (typeof document > "u" || typeof getComputedStyle != "function") return v;
|
|
3304
3314
|
const o = getComputedStyle(r ?? document.documentElement), a = (l) => {
|
|
3305
3315
|
const t = {};
|
|
3306
|
-
for (const [
|
|
3316
|
+
for (const [c, p] of Object.entries(l)) {
|
|
3307
3317
|
if (G(p) && p.startsWith("var(")) {
|
|
3308
3318
|
const i = p.slice(4, -1);
|
|
3309
|
-
t[
|
|
3319
|
+
t[c] = _({
|
|
3310
3320
|
cssVariableReference: p,
|
|
3311
3321
|
computedValue: o.getPropertyValue(i).trim()
|
|
3312
3322
|
});
|
|
3313
3323
|
continue;
|
|
3314
3324
|
}
|
|
3315
|
-
t[
|
|
3325
|
+
t[c] = B(p) ? a(p) : p;
|
|
3316
3326
|
}
|
|
3317
3327
|
return t;
|
|
3318
3328
|
};
|
|
@@ -3331,24 +3341,24 @@ var Z = { duration: {
|
|
|
3331
3341
|
if (typeof document > "u") return;
|
|
3332
3342
|
const o = document.documentElement;
|
|
3333
3343
|
o?.classList && (o.classList.toggle("dark", r === "dark"), o.classList.toggle("light", r === "light"));
|
|
3334
|
-
}, pr = ({ children: r, colorScheme: o, applyToRoot: a = !0, overrides: l, className: t, scale:
|
|
3335
|
-
const i = b(), j = q(),
|
|
3344
|
+
}, pr = ({ children: r, colorScheme: o, applyToRoot: a = !0, overrides: l, className: t, scale: c, theme: p }) => {
|
|
3345
|
+
const i = b(), j = q(), s = n(l) || !a, f = e.useContext(i), d = e.useMemo(() => n(p) ? W(p) : void 0, [p]) ?? f.explicitTheme, g = n(d), u = e.useRef(null), [C, S] = e.useState(() => (a && z(o), g ? void 0 : h())), [T, I] = e.useState(null), M = n(l) ? JSON.stringify(l) : "";
|
|
3336
3346
|
e.useLayoutEffect(() => {
|
|
3337
|
-
a && z(o), g || S(h(
|
|
3347
|
+
a && z(o), g || S(h(s ? u.current ?? void 0 : void 0)), I(s ? u.current : null);
|
|
3338
3348
|
}, [
|
|
3339
3349
|
o,
|
|
3340
3350
|
a,
|
|
3341
|
-
|
|
3351
|
+
s,
|
|
3342
3352
|
M,
|
|
3343
3353
|
g
|
|
3344
3354
|
]), e.useLayoutEffect(() => {
|
|
3345
|
-
if (typeof document > "u" ||
|
|
3346
|
-
const
|
|
3347
|
-
return
|
|
3348
|
-
|
|
3355
|
+
if (typeof document > "u" || s || !n(c)) return;
|
|
3356
|
+
const w = document.documentElement;
|
|
3357
|
+
return w.style.setProperty("--t-scale-user", String(c)), () => {
|
|
3358
|
+
w.style.removeProperty("--t-scale-user");
|
|
3349
3359
|
};
|
|
3350
|
-
}, [
|
|
3351
|
-
const k = d ?? C ?? f.theme,
|
|
3360
|
+
}, [c, s]);
|
|
3361
|
+
const k = d ?? C ?? f.theme, x = e.useMemo(() => ({
|
|
3352
3362
|
theme: k,
|
|
3353
3363
|
colorScheme: o,
|
|
3354
3364
|
explicitTheme: d
|
|
@@ -3357,13 +3367,13 @@ var Z = { duration: {
|
|
|
3357
3367
|
o,
|
|
3358
3368
|
d
|
|
3359
3369
|
]);
|
|
3360
|
-
if (!
|
|
3361
|
-
value:
|
|
3370
|
+
if (!s) return /* @__PURE__ */ y(i.Provider, {
|
|
3371
|
+
value: x,
|
|
3362
3372
|
children: r
|
|
3363
3373
|
});
|
|
3364
3374
|
const E = l ?? {};
|
|
3365
3375
|
return /* @__PURE__ */ y(i.Provider, {
|
|
3366
|
-
value:
|
|
3376
|
+
value: x,
|
|
3367
3377
|
children: /* @__PURE__ */ y(j.Provider, {
|
|
3368
3378
|
value: T,
|
|
3369
3379
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -3377,7 +3387,7 @@ var Z = { duration: {
|
|
|
3377
3387
|
})
|
|
3378
3388
|
})
|
|
3379
3389
|
});
|
|
3380
|
-
}, tr = () => e.useContext(b()).theme,
|
|
3390
|
+
}, tr = () => e.useContext(b()).theme, cr = () => e.useContext(b()).colorScheme, sr = () => e.useContext(q());
|
|
3381
3391
|
export {
|
|
3382
3392
|
v as a,
|
|
3383
3393
|
ar as c,
|
|
@@ -3388,11 +3398,11 @@ export {
|
|
|
3388
3398
|
pr as i,
|
|
3389
3399
|
or as l,
|
|
3390
3400
|
J as m,
|
|
3391
|
-
|
|
3401
|
+
cr as n,
|
|
3392
3402
|
er as o,
|
|
3393
3403
|
U as p,
|
|
3394
3404
|
tr as r,
|
|
3395
3405
|
lr as s,
|
|
3396
|
-
|
|
3406
|
+
sr as t,
|
|
3397
3407
|
rr as u
|
|
3398
3408
|
};
|