twenty-ui 2.42.0 → 2.43.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/CHANGELOG.md +12 -0
- package/README.md +11 -6
- package/dist/{AllIcons-DMeLF1LP.cjs → AllIcons-D_4JeQkX.cjs} +1 -1
- package/dist/{AllIcons-BkHLT6oe.js → AllIcons-Z8o0B2fy.js} +1 -1
- package/dist/{Avatar-C_TzSJBe.js → Avatar-BSHgTxt-.js} +2 -2
- package/dist/Avatar-DTNH6Ku7.cjs +1 -0
- package/dist/Input-CFXY05bj.cjs +1 -0
- package/dist/Input-DHfmRBq5.js +116 -0
- package/dist/{ListItem-D75aS69B.cjs → ListItem-2dHkY1NB.cjs} +1 -1
- package/dist/{ListItem-C08r49UJ.js → ListItem-D6DvFIbl.js} +3 -3
- package/dist/ListItem.module-CveFbY4M.cjs +1 -0
- package/dist/ListItem.module-DtIGiTDL.js +38 -0
- package/dist/{Loader-DbOLVUcK.js → Loader-X1LymYkw.js} +4 -4
- package/dist/Loader-Z6_7AA-x.cjs +1 -0
- package/dist/MenuSeparator-DJOspG7J.cjs +1 -0
- package/dist/MenuSeparator-dNx4JE6C.js +66 -0
- package/dist/{OverflowingTextWithTooltip-BXWJtb0f.js → OverflowingTextWithTooltip-CqEkoH6t.js} +1 -1
- package/dist/OverflowingTextWithTooltip-bn6EwWeq.cjs +1 -0
- package/dist/ResizeHandle-DN1bRxQb.js +89 -0
- package/dist/ResizeHandle-cll01qBQ.cjs +1 -0
- package/dist/TabsTabContent-BseLV1Wk.cjs +1 -0
- package/dist/TabsTabContent-_NCTxoP6.js +40 -0
- package/dist/components/code-editor/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/components/code-editor/CodeEditor/types/CodeEditorProps.d.ts +1 -0
- package/dist/components/code-editor/CodeEditor/utils/getBaseCodeEditorTheme.d.ts +1 -1
- package/dist/components/code-editor.cjs +1 -1
- package/dist/components/code-editor.mjs +54 -52
- package/dist/components/data-display/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/components/data-display/AvatarGroup/types/AvatarGroupProps.d.ts +3 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/input/SearchInput/types/SearchInputProps.d.ts +2 -2
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +21 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownNestedExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPagesExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPanelExample.d.ts +1 -0
- package/dist/components/navigation/Dropdown/__stories__/DropdownPickerExample.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/DropdownActionItem.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownBack.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownClose.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContent.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContext.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +37 -0
- package/dist/components/navigation/Dropdown/internal/DropdownEmpty.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownFocusTarget.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/DropdownHeader.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownLoading.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownNestedRootEffect.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownPage.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownPageFocusEffect.d.ts +6 -0
- package/dist/components/navigation/Dropdown/internal/DropdownPageFocusRequest.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/DropdownRoot.d.ts +4 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSearchTargetEffect.d.ts +5 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSection.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSeparator.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSubmenu.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownSubmenuTrigger.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownTitle.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/DropdownTrigger.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownFocusTarget.d.ts +8 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownItemLabel.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownItems.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownSearchTarget.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getDropdownTrigger.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/getNextDropdownItem.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/isUnhandledModifierShortcut.d.ts +2 -0
- package/dist/components/navigation/Dropdown/internal/preventDismissingClickActivation.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownContext.d.ts +1 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownItemFocus.d.ts +7 -0
- package/dist/components/navigation/Dropdown/internal/useDropdownKeyboardNavigation.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownActionItemProps.d.ts +10 -0
- package/dist/components/navigation/Dropdown/types/DropdownCloseProps.d.ts +4 -0
- package/dist/components/navigation/Dropdown/types/DropdownContentProps.d.ts +5 -0
- package/dist/components/navigation/Dropdown/types/DropdownHeaderProps.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownPageProps.d.ts +7 -0
- package/dist/components/navigation/Dropdown/types/DropdownRootProps.d.ts +11 -0
- package/dist/components/navigation/Dropdown/types/DropdownSearchProps.d.ts +4 -0
- package/dist/components/navigation/Dropdown/types/DropdownSectionProps.d.ts +5 -0
- package/dist/components/navigation/Dropdown/types/DropdownSubmenuProps.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownSubmenuTriggerProps.d.ts +6 -0
- package/dist/components/navigation/Dropdown/types/DropdownTitleProps.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownTriggerProps.d.ts +2 -0
- package/dist/components/navigation/Dropdown/types/DropdownType.d.ts +1 -0
- package/dist/components-BYWo2sUE.cjs +1 -0
- package/dist/components-C96xU59U.js +1996 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +40 -39
- package/dist/data-display-BQ9g9oSc.cjs +1 -0
- package/dist/{data-display-YQG01UPq.js → data-display-z9gKjkPS.js} +30 -30
- package/dist/icon/constants/TwentyIconDictionary.d.ts +9 -0
- package/dist/icon/providers/internal/AllIcons.d.ts +1 -1
- package/dist/{icon-CDy3-hqV.js → icon-Bd81r48z.js} +131 -117
- package/dist/icon-iD9IXJmn.cjs +1 -0
- package/dist/icon.cjs +1 -1
- package/dist/icon.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +554 -557
- package/dist/individual-entry.d.ts +0 -1
- package/dist/input-C8IiOA9Q.js +335 -0
- package/dist/input-NBD4DP8j.cjs +1 -0
- package/dist/{navigation-e5PTdnND.cjs → navigation-BqZBteC2.cjs} +1 -1
- package/dist/{navigation-Z7puI3wl.js → navigation-CLMgaqS8.js} +1 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +2 -2
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +1 -1
- package/dist/primitives/input/ButtonGroup/internal/ButtonGroupContext.d.ts +1 -1
- package/dist/primitives/input/SegmentedControl/SegmentedControl.d.ts +2 -29
- package/dist/primitives/input/SegmentedControl/types/SegmentedControlOption.d.ts +13 -0
- package/dist/primitives/input/SegmentedControl/types/SegmentedControlProps.d.ts +10 -0
- package/dist/primitives/input/index.d.ts +2 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +12 -12
- package/dist/primitives/layout/ResizeHandle/ResizeHandle.d.ts +2 -9
- package/dist/primitives/layout/ResizeHandle/__stories__/ControlledResizeHandle.d.ts +2 -0
- package/dist/primitives/layout/ResizeHandle/__stories__/ResizableDemo.d.ts +3 -0
- package/dist/primitives/layout/ResizeHandle/__stories__/withMockPointerCapture.d.ts +4 -0
- package/dist/primitives/layout/ResizeHandle/internal/ResizeHandleDefaults.constant.d.ts +6 -0
- package/dist/primitives/layout/ResizeHandle/internal/useResizeHandleInteraction.d.ts +19 -0
- package/dist/primitives/layout/ResizeHandle/types/ResizeHandleProps.d.ts +11 -0
- package/dist/primitives/layout/index.d.ts +1 -1
- package/dist/primitives/layout.cjs +1 -1
- package/dist/primitives/layout.mjs +7 -8
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/surfaces/Card/Card.d.ts +17 -7
- package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +8 -0
- package/dist/primitives/surfaces/index.d.ts +0 -3
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +8 -10
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +59 -62
- package/dist/style.css +1 -1
- package/dist/surfaces-DX8oX1ou.js +254 -0
- package/dist/surfaces-uuLwsFxg.cjs +1 -0
- package/dist/testing/index.d.ts +1 -3
- package/dist/testing/utils/overrideMediaQueryMatches.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +98 -102
- package/dist/theme/ThemeOverrides.d.ts +1 -0
- package/dist/theme/ThemeProvider.d.ts +3 -0
- package/dist/theme/ThemeProviderProps.d.ts +13 -0
- package/dist/{theme-constants → theme}/getNextThemeColor.d.ts +1 -1
- package/dist/theme/index.d.ts +10 -0
- package/dist/theme/internal/ThemeContextType.d.ts +6 -0
- package/dist/theme/internal/computeThemeFromCss.d.ts +2 -0
- package/dist/theme/internal/getThemeContext.d.ts +3 -0
- package/dist/theme/internal/getThemeScopeContext.d.ts +2 -0
- package/dist/theme/internal/resolveExplicitTheme.d.ts +5 -0
- package/dist/{theme-OwFrow8b.js → theme-DBro6iwF.js} +1198 -23
- package/dist/theme-DNG4OSBd.cjs +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +14 -7
- package/dist/utilities/color/utils/stringToThemeColorP3String.d.ts +1 -2
- package/dist/utilities/index.d.ts +3 -1
- package/dist/utilities/responsive/constants/MobileMediaQuery.d.ts +1 -0
- package/dist/utilities/responsive/constants/TouchDeviceMediaQuery.d.ts +1 -0
- package/dist/utilities/responsive/hooks/useMediaQuery.d.ts +1 -0
- package/dist/utilities/responsive/internal/getMediaQueryStore.d.ts +6 -0
- package/dist/utilities-BlvbRryv.cjs +1 -0
- package/dist/utilities-C5Tt2HLT.js +56 -0
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +17 -15
- package/package.json +2 -16
- package/dist/Avatar-BGFK0_a_.cjs +0 -1
- package/dist/ListItem.module-CFDku7rI.cjs +0 -1
- package/dist/ListItem.module-DBhzbt9-.js +0 -38
- package/dist/Loader-CHKTYJo7.cjs +0 -1
- package/dist/OverflowingTextWithTooltip-DpizuDxR.cjs +0 -1
- package/dist/ResizeHandle-BWfY2ONo.js +0 -37
- package/dist/ResizeHandle-IVbYS3b8.cjs +0 -1
- package/dist/Switch-BvVP6vjR.js +0 -101
- package/dist/Switch-DuoJ4ytC.cjs +0 -1
- package/dist/TabsTabContent-BWQCg7Ua.js +0 -40
- package/dist/TabsTabContent-ChqlTk3P.cjs +0 -1
- package/dist/chunk-u_mIcLyS.cjs +0 -1
- package/dist/components-B2Pdf_yn.js +0 -1459
- package/dist/components-DfhgWbKW.cjs +0 -1
- package/dist/data-display-QOdhAohf.cjs +0 -1
- package/dist/icon-lF2kxwql.cjs +0 -1
- package/dist/input-C2q7tGPj.js +0 -383
- package/dist/input-CAX9aS7C.cjs +0 -1
- package/dist/primitives/layout/ResizeHandle/hooks/useResizeHandle.d.ts +0 -10
- package/dist/surfaces-Cr4lhCvZ.js +0 -306
- package/dist/surfaces-CuxI6145.cjs +0 -1
- package/dist/testing/decorators/ComponentWithRouterDecorator.d.ts +0 -9
- package/dist/testing/decorators/RouterDecorator.d.ts +0 -2
- package/dist/theme-YHfZnD2U.cjs +0 -1
- package/dist/theme-constants/ThemeProvider.d.ts +0 -15
- package/dist/theme-constants/ThemeScopeContext.d.ts +0 -1
- package/dist/theme-constants/index.d.ts +0 -10
- package/dist/theme-constants-CrrgAYWN.js +0 -1163
- package/dist/theme-constants-ZNgkgDE-.cjs +0 -1
- package/dist/theme-constants.cjs +0 -1
- package/dist/theme-constants.mjs +0 -12
- package/dist/utilities/screen-size/hooks/useScreenSize.d.ts +0 -4
- package/dist/utilities-D7Z6Uof8.cjs +0 -1
- package/dist/utilities-FXsKnNbt.js +0 -49
- /package/dist/primitives/surfaces/{CardContent → Card/internal}/CardContent.d.ts +0 -0
- /package/dist/primitives/surfaces/{CardFooter → Card/internal}/CardFooter.d.ts +0 -0
- /package/dist/primitives/surfaces/{CardHeader → Card/internal}/CardHeader.d.ts +0 -0
- /package/dist/{theme-constants/constants.d.ts → theme/constants/MobileViewport.d.ts} +0 -0
- /package/dist/{theme-constants → theme}/themeCssVariables.d.ts +0 -0
- /package/dist/{theme-constants → theme}/themeTypes.d.ts +0 -0
- /package/dist/{theme-constants → theme}/useTheme.d.ts +0 -0
- /package/dist/{theme-constants → theme}/useThemeColorScheme.d.ts +0 -0
- /package/dist/{theme-constants → theme}/useThemeContainer.d.ts +0 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { Sn as D, bo as J, wn as K } from "./icon-Bd81r48z.js";
|
|
2
|
+
import { t as k } from "./isDefined-fMi6eQ4r.js";
|
|
3
|
+
import { t as Q } from "./theme-DBro6iwF.js";
|
|
4
|
+
import { n as L, r as U, s as W } from "./Input-DHfmRBq5.js";
|
|
5
|
+
import { t as i } from "./mergeClassNames-BHKm1BNi.js";
|
|
6
|
+
import { n as _, r as f, t as u } from "./ListItem.module-DtIGiTDL.js";
|
|
7
|
+
import { clsx as v } from "clsx";
|
|
8
|
+
import { Fragment as Y, jsx as a, jsxs as N } from "react/jsx-runtime";
|
|
9
|
+
import { isBoolean as Z, isFunction as V, isNumber as ee } from "@sniptt/guards";
|
|
10
|
+
import { forwardRef as T, useLayoutEffect as re, useMemo as ae, useRef as oe } from "react";
|
|
11
|
+
import { useRender as B } from "@base-ui/react/use-render";
|
|
12
|
+
import { useDirection as te } from "@base-ui/react/direction-provider";
|
|
13
|
+
import { Radio as le } from "@base-ui/react/radio";
|
|
14
|
+
import { Input as ie } from "@base-ui/react/input";
|
|
15
|
+
import { Checkbox as j } from "@base-ui/react/checkbox";
|
|
16
|
+
import { Field as x } from "@base-ui/react/field";
|
|
17
|
+
import { RadioGroup as P } from "@base-ui/react/radio-group";
|
|
18
|
+
import { Select as c } from "@base-ui/react/select";
|
|
19
|
+
import { Slider as b } from "@base-ui/react/slider";
|
|
20
|
+
var ne = "_container_262rx_1", se = { container: ne }, Lr = ({ attached: e = !0, framed: r = !1, className: o, children: t, variant: l, size: s, color: n, render: m, ref: d, ...S }) => {
|
|
21
|
+
const C = B({
|
|
22
|
+
render: m,
|
|
23
|
+
ref: d,
|
|
24
|
+
props: {
|
|
25
|
+
role: "group",
|
|
26
|
+
"data-attached": e || void 0,
|
|
27
|
+
"data-framed": r || void 0,
|
|
28
|
+
...S,
|
|
29
|
+
className: v(se.container, o),
|
|
30
|
+
children: t
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ a(W.Provider, {
|
|
34
|
+
value: {
|
|
35
|
+
variant: l,
|
|
36
|
+
color: n,
|
|
37
|
+
size: s
|
|
38
|
+
},
|
|
39
|
+
children: C
|
|
40
|
+
});
|
|
41
|
+
}, jr = ({ size: e = "sm", variant: r = "solid", shape: o = "square", color: t = "accent", hoverable: l = !0, className: s, children: n, ...m }) => /* @__PURE__ */ N(j.Root, {
|
|
42
|
+
...m,
|
|
43
|
+
className: i(v(_.root, _[e], _[r], _[o], _[t], l && _.hoverable), s),
|
|
44
|
+
children: [/* @__PURE__ */ a("span", {
|
|
45
|
+
className: _.box,
|
|
46
|
+
children: /* @__PURE__ */ N(j.Indicator, {
|
|
47
|
+
className: _.indicator,
|
|
48
|
+
children: [/* @__PURE__ */ a(D, {
|
|
49
|
+
className: _.check,
|
|
50
|
+
"aria-hidden": !0
|
|
51
|
+
}), /* @__PURE__ */ a(J, {
|
|
52
|
+
className: _.minus,
|
|
53
|
+
"aria-hidden": !0
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
}), n]
|
|
57
|
+
}), ce = "_description_yrj5x_1", me = { description: ce }, q = T(({ className: e, ...r }, o) => /* @__PURE__ */ a(x.Description, {
|
|
58
|
+
ref: o,
|
|
59
|
+
className: i(me.description, e),
|
|
60
|
+
...r
|
|
61
|
+
}));
|
|
62
|
+
q.displayName = "FieldDescription";
|
|
63
|
+
var de = "_error_179et_1", _e = { error: de }, A = T(({ className: e, ...r }, o) => /* @__PURE__ */ a(x.Error, {
|
|
64
|
+
ref: o,
|
|
65
|
+
className: i(_e.error, e),
|
|
66
|
+
...r
|
|
67
|
+
}));
|
|
68
|
+
A.displayName = "FieldError";
|
|
69
|
+
var ue = "_label_1yxve_1", ve = { label: ue }, H = T(({ className: e, ...r }, o) => /* @__PURE__ */ a(x.Label, {
|
|
70
|
+
ref: o,
|
|
71
|
+
className: i(ve.label, e),
|
|
72
|
+
...r
|
|
73
|
+
}));
|
|
74
|
+
H.displayName = "FieldLabel";
|
|
75
|
+
var yr = {
|
|
76
|
+
Root: x.Root,
|
|
77
|
+
Label: H,
|
|
78
|
+
Control: x.Control,
|
|
79
|
+
Description: q,
|
|
80
|
+
Error: A,
|
|
81
|
+
Validity: x.Validity
|
|
82
|
+
}, pe = "_root_lk8ci_1", he = "_sm_lk8ci_27", fe = "_md_lk8ci_31", Ne = "_startElement_lk8ci_35", be = "_endElement_lk8ci_36", R = {
|
|
83
|
+
root: pe,
|
|
84
|
+
sm: he,
|
|
85
|
+
md: fe,
|
|
86
|
+
startElement: Ne,
|
|
87
|
+
endElement: be
|
|
88
|
+
}, y = (e) => k(e) && !Z(e) && e !== "", Gr = ({ size: e = "md", startElement: r, endElement: o, className: t, children: l, render: s, ref: n, ...m }) => {
|
|
89
|
+
const d = B({
|
|
90
|
+
render: s,
|
|
91
|
+
ref: n,
|
|
92
|
+
props: {
|
|
93
|
+
...m,
|
|
94
|
+
className: v(R.root, R[e], t),
|
|
95
|
+
children: /* @__PURE__ */ N(Y, { children: [
|
|
96
|
+
y(r) && /* @__PURE__ */ a("span", {
|
|
97
|
+
className: R.startElement,
|
|
98
|
+
children: r
|
|
99
|
+
}),
|
|
100
|
+
l,
|
|
101
|
+
y(o) && /* @__PURE__ */ a("span", {
|
|
102
|
+
className: R.endElement,
|
|
103
|
+
children: o
|
|
104
|
+
})
|
|
105
|
+
] })
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return /* @__PURE__ */ a(U.Provider, {
|
|
109
|
+
value: { size: e },
|
|
110
|
+
children: d
|
|
111
|
+
});
|
|
112
|
+
}, Se = "_root_1h79s_1", ge = { root: Se }, Fr = ({ className: e, ...r }) => /* @__PURE__ */ a(P, {
|
|
113
|
+
...r,
|
|
114
|
+
className: i(ge.root, e)
|
|
115
|
+
}), ke = "_container_1uovu_1", xe = "_item_1uovu_20", Ce = "_iconOnly_1uovu_60", Ie = "_icon_1uovu_60", Re = "_label_1uovu_79", I = {
|
|
116
|
+
container: ke,
|
|
117
|
+
item: xe,
|
|
118
|
+
iconOnly: Ce,
|
|
119
|
+
icon: Ie,
|
|
120
|
+
label: Re
|
|
121
|
+
}, wr = ({ className: e, itemWidth: r = "equal", options: o, ...t }) => /* @__PURE__ */ a(P, {
|
|
122
|
+
...t,
|
|
123
|
+
className: i(I.container, e),
|
|
124
|
+
"data-item-width": r,
|
|
125
|
+
children: o.map(({ "aria-label": l, disabled: s, label: n, startIcon: m, value: d }) => /* @__PURE__ */ N(le.Root, {
|
|
126
|
+
value: d,
|
|
127
|
+
disabled: s,
|
|
128
|
+
"aria-label": l,
|
|
129
|
+
className: v(I.item, !f(n) && I.iconOnly),
|
|
130
|
+
children: [f(m) && /* @__PURE__ */ a("span", {
|
|
131
|
+
className: I.icon,
|
|
132
|
+
"aria-hidden": !0,
|
|
133
|
+
children: m
|
|
134
|
+
}), f(n) && /* @__PURE__ */ a("span", {
|
|
135
|
+
className: I.label,
|
|
136
|
+
children: n
|
|
137
|
+
})]
|
|
138
|
+
}, d))
|
|
139
|
+
}), Te = "_trigger_hijh9_1", $e = "_value_hijh9_12", Ee = "_icon_hijh9_31", Le = "_positioner_hijh9_42", je = "_popup_hijh9_46", ye = "_item_hijh9_71", Ge = "_indicator_hijh9_75", Fe = "_groupLabel_hijh9_81", we = "_separator_hijh9_89", p = {
|
|
140
|
+
trigger: Te,
|
|
141
|
+
value: $e,
|
|
142
|
+
icon: Ee,
|
|
143
|
+
positioner: Le,
|
|
144
|
+
popup: je,
|
|
145
|
+
item: ye,
|
|
146
|
+
indicator: Ge,
|
|
147
|
+
groupLabel: Fe,
|
|
148
|
+
separator: we
|
|
149
|
+
}, De = ({ className: e, ...r }) => /* @__PURE__ */ a(c.GroupLabel, {
|
|
150
|
+
...r,
|
|
151
|
+
className: i(p.groupLabel, e)
|
|
152
|
+
}), Ve = ({ className: e, children: r, startIcon: o, endIcon: t, description: l, descriptionPlacement: s = "inline", ...n }) => /* @__PURE__ */ N(c.Item, {
|
|
153
|
+
...n,
|
|
154
|
+
className: i(v(u.root, p.item), e),
|
|
155
|
+
"data-color": "neutral",
|
|
156
|
+
"data-indicator": "check",
|
|
157
|
+
children: [
|
|
158
|
+
f(o) && /* @__PURE__ */ a("div", {
|
|
159
|
+
className: u.startIcon,
|
|
160
|
+
"aria-hidden": !0,
|
|
161
|
+
children: o
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ N("div", {
|
|
164
|
+
className: u.label,
|
|
165
|
+
children: [/* @__PURE__ */ a(c.ItemText, {
|
|
166
|
+
className: u.text,
|
|
167
|
+
children: r
|
|
168
|
+
}), f(l) && s === "inline" && /* @__PURE__ */ a("div", {
|
|
169
|
+
className: v(u.description, u.inlineDescription),
|
|
170
|
+
children: l
|
|
171
|
+
})]
|
|
172
|
+
}),
|
|
173
|
+
f(l) && s === "end" && /* @__PURE__ */ a("div", {
|
|
174
|
+
className: v(u.description, u.endDescription),
|
|
175
|
+
children: l
|
|
176
|
+
}),
|
|
177
|
+
f(t) && /* @__PURE__ */ a("div", {
|
|
178
|
+
className: u.endIcon,
|
|
179
|
+
"aria-hidden": !0,
|
|
180
|
+
children: t
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ a(c.ItemIndicator, {
|
|
183
|
+
className: p.indicator,
|
|
184
|
+
children: /* @__PURE__ */ a(D, { className: u.checkIndicator })
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
}), Be = ({ side: e = "bottom", align: r = "start", sideOffset: o = 8, alignOffset: t, alignItemWithTrigger: l = !1, anchor: s, container: n, className: m, ...d }) => {
|
|
188
|
+
const S = Q(), C = te();
|
|
189
|
+
return /* @__PURE__ */ a(c.Portal, {
|
|
190
|
+
container: n === void 0 ? S ?? void 0 : n,
|
|
191
|
+
children: /* @__PURE__ */ a(c.Positioner, {
|
|
192
|
+
dir: C,
|
|
193
|
+
side: e,
|
|
194
|
+
align: r,
|
|
195
|
+
sideOffset: o,
|
|
196
|
+
alignOffset: t,
|
|
197
|
+
alignItemWithTrigger: l,
|
|
198
|
+
anchor: s,
|
|
199
|
+
className: p.positioner,
|
|
200
|
+
children: /* @__PURE__ */ a(c.Popup, {
|
|
201
|
+
...d,
|
|
202
|
+
className: i(p.popup, m)
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
});
|
|
206
|
+
}, Pe = ({ className: e, ...r }) => /* @__PURE__ */ a(c.Separator, {
|
|
207
|
+
...r,
|
|
208
|
+
className: i(p.separator, e)
|
|
209
|
+
}), qe = ({ size: e = "md", className: r, children: o, ...t }) => /* @__PURE__ */ N(c.Trigger, {
|
|
210
|
+
...t,
|
|
211
|
+
className: i(v(L.input, L[e], p.trigger), r),
|
|
212
|
+
children: [o, /* @__PURE__ */ a(c.Icon, {
|
|
213
|
+
className: p.icon,
|
|
214
|
+
children: /* @__PURE__ */ a(K, {})
|
|
215
|
+
})]
|
|
216
|
+
}), Ae = ({ className: e, ...r }) => /* @__PURE__ */ a(c.Value, {
|
|
217
|
+
...r,
|
|
218
|
+
className: i(p.value, e)
|
|
219
|
+
}), He = () => ({
|
|
220
|
+
Root: c.Root,
|
|
221
|
+
Trigger: qe,
|
|
222
|
+
Value: Ae,
|
|
223
|
+
Popup: Be,
|
|
224
|
+
Item: Ve,
|
|
225
|
+
Group: c.Group,
|
|
226
|
+
GroupLabel: De,
|
|
227
|
+
Separator: Pe
|
|
228
|
+
}), Dr = /* @__PURE__ */ He(), Me = "_root_1mh0w_1", Oe = "_accent_1mh0w_16", ze = "_success_1mh0w_20", Xe = "_control_1mh0w_24", Je = "_track_1mh0w_42", Ke = "_indicator_1mh0w_55", Qe = "_thumb_1mh0w_66", Ue = "_label_1mh0w_80", We = "_value_1mh0w_81", h = {
|
|
229
|
+
root: Me,
|
|
230
|
+
accent: Oe,
|
|
231
|
+
success: ze,
|
|
232
|
+
control: Xe,
|
|
233
|
+
track: Je,
|
|
234
|
+
indicator: Ke,
|
|
235
|
+
thumb: Qe,
|
|
236
|
+
label: Ue,
|
|
237
|
+
value: We
|
|
238
|
+
}, Ye = ({ className: e, color: r = "accent", thumbAlignment: o = "edge", ...t }) => /* @__PURE__ */ a(b.Root, {
|
|
239
|
+
...t,
|
|
240
|
+
thumbAlignment: o,
|
|
241
|
+
className: i(v(h.root, h[r]), e)
|
|
242
|
+
}), Ze = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Control, {
|
|
243
|
+
...r,
|
|
244
|
+
className: i(h.control, e)
|
|
245
|
+
}), er = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Track, {
|
|
246
|
+
...r,
|
|
247
|
+
className: i(h.track, e)
|
|
248
|
+
}), rr = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Indicator, {
|
|
249
|
+
...r,
|
|
250
|
+
className: i(h.indicator, e)
|
|
251
|
+
}), ar = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Thumb, {
|
|
252
|
+
...r,
|
|
253
|
+
className: i(h.thumb, e)
|
|
254
|
+
}), or = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Label, {
|
|
255
|
+
...r,
|
|
256
|
+
className: i(h.label, e)
|
|
257
|
+
}), tr = ({ className: e, ...r }) => /* @__PURE__ */ a(b.Value, {
|
|
258
|
+
...r,
|
|
259
|
+
className: i(h.value, e)
|
|
260
|
+
}), Vr = {
|
|
261
|
+
Root: Ye,
|
|
262
|
+
Control: Ze,
|
|
263
|
+
Track: er,
|
|
264
|
+
Indicator: rr,
|
|
265
|
+
Thumb: ar,
|
|
266
|
+
Label: or,
|
|
267
|
+
Value: tr
|
|
268
|
+
}, lr = (e) => k(e) ? ee(e) ? `${e}px` : String(e) : "", G = (e, r) => {
|
|
269
|
+
if (k(e)) {
|
|
270
|
+
if (V(e)) return e(r);
|
|
271
|
+
e.current = r;
|
|
272
|
+
}
|
|
273
|
+
}, ir = (...e) => (r) => {
|
|
274
|
+
const o = e.map((t) => {
|
|
275
|
+
const l = G(t, r);
|
|
276
|
+
return V(l) ? l : () => G(t, null);
|
|
277
|
+
});
|
|
278
|
+
return () => {
|
|
279
|
+
for (const t of o) t();
|
|
280
|
+
};
|
|
281
|
+
}, F = (e) => {
|
|
282
|
+
e.style.blockSize = "auto";
|
|
283
|
+
const r = e.offsetHeight - e.clientHeight;
|
|
284
|
+
e.style.blockSize = `${e.scrollHeight + r}px`;
|
|
285
|
+
}, nr = "_textarea_1qcvj_1", sr = "_sm_1qcvj_38", cr = "_md_1qcvj_42", w = {
|
|
286
|
+
textarea: nr,
|
|
287
|
+
sm: sr,
|
|
288
|
+
md: cr
|
|
289
|
+
}, mr = /* @__PURE__ */ a("textarea", {}), Br = ({ size: e = "md", autoResize: r = !1, maxRows: o, className: t, style: l, ref: s, render: n = mr, onChange: m, value: d, rows: S, ...C }) => {
|
|
290
|
+
const $ = oe(null), M = ae(() => ir(s, $), [s]), O = k(d), E = l?.blockSize;
|
|
291
|
+
re(() => {
|
|
292
|
+
const g = $.current;
|
|
293
|
+
if (k(g)) {
|
|
294
|
+
if (!r) {
|
|
295
|
+
g.style.blockSize = lr(E);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
F(g);
|
|
299
|
+
}
|
|
300
|
+
}, [
|
|
301
|
+
r,
|
|
302
|
+
d,
|
|
303
|
+
o,
|
|
304
|
+
S,
|
|
305
|
+
E
|
|
306
|
+
]);
|
|
307
|
+
const z = (g) => {
|
|
308
|
+
r && !O && F(g.currentTarget), m?.(g);
|
|
309
|
+
}, X = k(o) ? {
|
|
310
|
+
...l,
|
|
311
|
+
"--tw-textarea-max-rows": o
|
|
312
|
+
} : l;
|
|
313
|
+
return /* @__PURE__ */ a(ie, {
|
|
314
|
+
...C,
|
|
315
|
+
rows: S,
|
|
316
|
+
onChange: z,
|
|
317
|
+
ref: M,
|
|
318
|
+
render: n,
|
|
319
|
+
value: d,
|
|
320
|
+
className: i(v(w.textarea, w[e]), t),
|
|
321
|
+
style: X,
|
|
322
|
+
"data-auto-resize": r || void 0
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
export {
|
|
326
|
+
Fr as a,
|
|
327
|
+
jr as c,
|
|
328
|
+
wr as i,
|
|
329
|
+
Lr as l,
|
|
330
|
+
Vr as n,
|
|
331
|
+
Gr as o,
|
|
332
|
+
Dr as r,
|
|
333
|
+
yr as s,
|
|
334
|
+
Br as t
|
|
335
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const M=require("./theme-DNG4OSBd.cjs"),f=require("./isDefined-DS2Q42p5.cjs"),k=require("./Input-CFXY05bj.cjs"),o=require("./mergeClassNames-BbJtXN2t.cjs"),l=require("./ListItem.module-CveFbY4M.cjs");let m=require("clsx"),a=require("react/jsx-runtime"),R=require("@sniptt/guards"),j=require("react"),E=require("@base-ui/react/use-render"),z=require("@base-ui/react/direction-provider"),X=require("@base-ui/react/radio"),J=require("@base-ui/react/input"),y=require("@base-ui/react/checkbox"),N=require("@base-ui/react/field"),P=require("@base-ui/react/radio-group"),u=require("@base-ui/react/select"),p=require("@base-ui/react/slider"),I=require("@tabler/icons-react");var K="_container_262rx_1",Q={container:K},U=({attached:e=!0,framed:r=!1,className:t,children:s,variant:i,size:c,color:n,render:d,ref:_,...b})=>{const g=(0,E.useRender)({render:d,ref:_,props:{role:"group","data-attached":e||void 0,"data-framed":r||void 0,...b,className:(0,m.clsx)(Q.container,t),children:s}});return(0,a.jsx)(k.ButtonGroupContext.Provider,{value:{variant:i,color:n,size:c},children:g})},W=({size:e="sm",variant:r="solid",shape:t="square",color:s="accent",hoverable:i=!0,className:c,children:n,...d})=>(0,a.jsxs)(y.Checkbox.Root,{...d,className:o.mergeClassNames((0,m.clsx)(l.Checkbox_module_default.root,l.Checkbox_module_default[e],l.Checkbox_module_default[r],l.Checkbox_module_default[t],l.Checkbox_module_default[s],i&&l.Checkbox_module_default.hoverable),c),children:[(0,a.jsx)("span",{className:l.Checkbox_module_default.box,children:(0,a.jsxs)(y.Checkbox.Indicator,{className:l.Checkbox_module_default.indicator,children:[(0,a.jsx)(I.IconCheck,{className:l.Checkbox_module_default.check,"aria-hidden":!0}),(0,a.jsx)(I.IconMinus,{className:l.Checkbox_module_default.minus,"aria-hidden":!0})]})}),n]}),Y="_description_yrj5x_1",Z={description:Y},w=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Description,{ref:t,className:o.mergeClassNames(Z.description,e),...r}));w.displayName="FieldDescription";var ee="_error_179et_1",re={error:ee},$=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Error,{ref:t,className:o.mergeClassNames(re.error,e),...r}));$.displayName="FieldError";var ae="_label_1yxve_1",te={label:ae},O=(0,j.forwardRef)(({className:e,...r},t)=>(0,a.jsx)(N.Field.Label,{ref:t,className:o.mergeClassNames(te.label,e),...r}));O.displayName="FieldLabel";var le={Root:N.Field.Root,Label:O,Control:N.Field.Control,Description:w,Error:$,Validity:N.Field.Validity},se="_root_lk8ci_1",ie="_sm_lk8ci_27",oe="_md_lk8ci_31",ne="_startElement_lk8ci_35",ce="_endElement_lk8ci_36",C={root:se,sm:ie,md:oe,startElement:ne,endElement:ce},F=e=>f.isDefined(e)&&!(0,R.isBoolean)(e)&&e!=="",ue=({size:e="md",startElement:r,endElement:t,className:s,children:i,render:c,ref:n,...d})=>{const _=(0,E.useRender)({render:c,ref:n,props:{...d,className:(0,m.clsx)(C.root,C[e],s),children:(0,a.jsxs)(a.Fragment,{children:[F(r)&&(0,a.jsx)("span",{className:C.startElement,children:r}),i,F(t)&&(0,a.jsx)("span",{className:C.endElement,children:t})]})}});return(0,a.jsx)(k.InputGroupContext.Provider,{value:{size:e},children:_})},de="_root_1h79s_1",_e={root:de},me=({className:e,...r})=>(0,a.jsx)(P.RadioGroup,{...r,className:o.mergeClassNames(_e.root,e)}),ve="_container_1uovu_1",he="_item_1uovu_20",pe="_iconOnly_1uovu_60",be="_icon_1uovu_60",xe="_label_1uovu_79",S={container:ve,item:he,iconOnly:pe,icon:be,label:xe},fe=({className:e,itemWidth:r="equal",options:t,...s})=>(0,a.jsx)(P.RadioGroup,{...s,className:o.mergeClassNames(S.container,e),"data-item-width":r,children:t.map(({"aria-label":i,disabled:c,label:n,startIcon:d,value:_})=>(0,a.jsxs)(X.Radio.Root,{value:_,disabled:c,"aria-label":i,className:(0,m.clsx)(S.item,!l.isRenderableSlot(n)&&S.iconOnly),children:[l.isRenderableSlot(d)&&(0,a.jsx)("span",{className:S.icon,"aria-hidden":!0,children:d}),l.isRenderableSlot(n)&&(0,a.jsx)("span",{className:S.label,children:n})]},_))}),je="_trigger_hijh9_1",Ne="_value_hijh9_12",ge="_icon_hijh9_31",Se="_positioner_hijh9_42",Ce="_popup_hijh9_46",ke="_item_hijh9_71",Ie="_indicator_hijh9_75",Re="_groupLabel_hijh9_81",qe="_separator_hijh9_89",v={trigger:je,value:Ne,icon:ge,positioner:Se,popup:Ce,item:ke,indicator:Ie,groupLabel:Re,separator:qe},Le=({className:e,...r})=>(0,a.jsx)(u.Select.GroupLabel,{...r,className:o.mergeClassNames(v.groupLabel,e)}),ye=({className:e,children:r,startIcon:t,endIcon:s,description:i,descriptionPlacement:c="inline",...n})=>(0,a.jsxs)(u.Select.Item,{...n,className:o.mergeClassNames((0,m.clsx)(l.ListItem_module_default.root,v.item),e),"data-color":"neutral","data-indicator":"check",children:[l.isRenderableSlot(t)&&(0,a.jsx)("div",{className:l.ListItem_module_default.startIcon,"aria-hidden":!0,children:t}),(0,a.jsxs)("div",{className:l.ListItem_module_default.label,children:[(0,a.jsx)(u.Select.ItemText,{className:l.ListItem_module_default.text,children:r}),l.isRenderableSlot(i)&&c==="inline"&&(0,a.jsx)("div",{className:(0,m.clsx)(l.ListItem_module_default.description,l.ListItem_module_default.inlineDescription),children:i})]}),l.isRenderableSlot(i)&&c==="end"&&(0,a.jsx)("div",{className:(0,m.clsx)(l.ListItem_module_default.description,l.ListItem_module_default.endDescription),children:i}),l.isRenderableSlot(s)&&(0,a.jsx)("div",{className:l.ListItem_module_default.endIcon,"aria-hidden":!0,children:s}),(0,a.jsx)(u.Select.ItemIndicator,{className:v.indicator,children:(0,a.jsx)(I.IconCheck,{className:l.ListItem_module_default.checkIndicator})})]}),Fe=({side:e="bottom",align:r="start",sideOffset:t=8,alignOffset:s,alignItemWithTrigger:i=!1,anchor:c,container:n,className:d,..._})=>{const b=M.useThemeContainer(),g=(0,z.useDirection)();return(0,a.jsx)(u.Select.Portal,{container:n===void 0?b??void 0:n,children:(0,a.jsx)(u.Select.Positioner,{dir:g,side:e,align:r,sideOffset:t,alignOffset:s,alignItemWithTrigger:i,anchor:c,className:v.positioner,children:(0,a.jsx)(u.Select.Popup,{..._,className:o.mergeClassNames(v.popup,d)})})})},Te=({className:e,...r})=>(0,a.jsx)(u.Select.Separator,{...r,className:o.mergeClassNames(v.separator,e)}),Ge=({size:e="md",className:r,children:t,...s})=>(0,a.jsxs)(u.Select.Trigger,{...s,className:o.mergeClassNames((0,m.clsx)(k.Input_module_default.input,k.Input_module_default[e],v.trigger),r),children:[t,(0,a.jsx)(u.Select.Icon,{className:v.icon,children:(0,a.jsx)(I.IconChevronDown,{})})]}),De=({className:e,...r})=>(0,a.jsx)(u.Select.Value,{...r,className:o.mergeClassNames(v.value,e)}),Ee=()=>({Root:u.Select.Root,Trigger:Ge,Value:De,Popup:Fe,Item:ye,Group:u.Select.Group,GroupLabel:Le,Separator:Te}),Pe=Ee(),we="_root_1mh0w_1",$e="_accent_1mh0w_16",Oe="_success_1mh0w_20",Be="_control_1mh0w_24",Ve="_track_1mh0w_42",Ae="_indicator_1mh0w_55",He="_thumb_1mh0w_66",Me="_label_1mh0w_80",ze="_value_1mh0w_81",h={root:we,accent:$e,success:Oe,control:Be,track:Ve,indicator:Ae,thumb:He,label:Me,value:ze},Xe=({className:e,color:r="accent",thumbAlignment:t="edge",...s})=>(0,a.jsx)(p.Slider.Root,{...s,thumbAlignment:t,className:o.mergeClassNames((0,m.clsx)(h.root,h[r]),e)}),Je=({className:e,...r})=>(0,a.jsx)(p.Slider.Control,{...r,className:o.mergeClassNames(h.control,e)}),Ke=({className:e,...r})=>(0,a.jsx)(p.Slider.Track,{...r,className:o.mergeClassNames(h.track,e)}),Qe=({className:e,...r})=>(0,a.jsx)(p.Slider.Indicator,{...r,className:o.mergeClassNames(h.indicator,e)}),Ue=({className:e,...r})=>(0,a.jsx)(p.Slider.Thumb,{...r,className:o.mergeClassNames(h.thumb,e)}),We=({className:e,...r})=>(0,a.jsx)(p.Slider.Label,{...r,className:o.mergeClassNames(h.label,e)}),Ye=({className:e,...r})=>(0,a.jsx)(p.Slider.Value,{...r,className:o.mergeClassNames(h.value,e)}),Ze={Root:Xe,Control:Je,Track:Ke,Indicator:Qe,Thumb:Ue,Label:We,Value:Ye},er=e=>f.isDefined(e)?(0,R.isNumber)(e)?`${e}px`:String(e):"",T=(e,r)=>{if(f.isDefined(e)){if((0,R.isFunction)(e))return e(r);e.current=r}},rr=(...e)=>r=>{const t=e.map(s=>{const i=T(s,r);return(0,R.isFunction)(i)?i:()=>T(s,null)});return()=>{for(const s of t)s()}},G=e=>{e.style.blockSize="auto";const r=e.offsetHeight-e.clientHeight;e.style.blockSize=`${e.scrollHeight+r}px`},ar="_textarea_1qcvj_1",tr="_sm_1qcvj_38",lr="_md_1qcvj_42",D={textarea:ar,sm:tr,md:lr},sr=(0,a.jsx)("textarea",{}),ir=({size:e="md",autoResize:r=!1,maxRows:t,className:s,style:i,ref:c,render:n=sr,onChange:d,value:_,rows:b,...g})=>{const q=(0,j.useRef)(null),B=(0,j.useMemo)(()=>rr(c,q),[c]),V=f.isDefined(_),L=i?.blockSize;(0,j.useLayoutEffect)(()=>{const x=q.current;if(f.isDefined(x)){if(!r){x.style.blockSize=er(L);return}G(x)}},[r,_,t,b,L]);const A=x=>{r&&!V&&G(x.currentTarget),d?.(x)},H=f.isDefined(t)?{...i,"--tw-textarea-max-rows":t}:i;return(0,a.jsx)(J.Input,{...g,rows:b,onChange:A,ref:B,render:n,value:_,className:o.mergeClassNames((0,m.clsx)(D.textarea,D[e]),s),style:H,"data-auto-resize":r||void 0})};Object.defineProperty(exports,"ButtonGroup",{enumerable:!0,get:function(){return U}});Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:function(){return W}});Object.defineProperty(exports,"Field",{enumerable:!0,get:function(){return le}});Object.defineProperty(exports,"InputGroup",{enumerable:!0,get:function(){return ue}});Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:function(){return me}});Object.defineProperty(exports,"SegmentedControl",{enumerable:!0,get:function(){return fe}});Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return Pe}});Object.defineProperty(exports,"Slider",{enumerable:!0,get:function(){return Ze}});Object.defineProperty(exports,"Textarea",{enumerable:!0,get:function(){return ir}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const g=require("./
|
|
1
|
+
const g=require("./theme-DNG4OSBd.cjs"),N=require("./isDefined-DS2Q42p5.cjs"),f=require("./mergeClassNames-BbJtXN2t.cjs"),l=require("./TabsTabContent-BseLV1Wk.cjs");let I=require("clsx"),o=require("react/jsx-runtime"),y=require("react");y=g.__toESM(y,1);let A=require("@base-ui/react/direction-provider"),b=require("@base-ui/react/tabs");var w="_root_5ahh0_1",x={root:w},C=e=>(0,o.jsx)("a",{className:(0,I.clsx)(x.root,e.className),href:e.href,onClick:e.onClick,target:e.target,rel:e.rel,children:e.children}),L="https://cal.com/team/twenty/talk-to-us",k="https://github.com/twentyhq/twenty",q="https://twenty.com/pricing",K=({event:e,direction:t,loopFocus:u})=>{if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const s=e.currentTarget,i=Array.from(s.querySelectorAll('[role="tab"]')).filter(r=>r.closest('[role="tablist"]')===s),n=i.findIndex(r=>r===e.target);if(n===-1)return;const c=t==="rtl"?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],[a,_]=s.getAttribute("aria-orientation")==="vertical"?["ArrowDown","ArrowUp"]:c;if(![a,_,"Home","End"].includes(e.key))return;e.preventBaseUIHandler(),e.preventDefault();const d=i.filter(r=>!r.hasAttribute("data-disabled")&&!r.hasAttribute("disabled")&&r.getAttribute("aria-disabled")!=="true"&&!r.closest("[hidden], [inert]"));if(e.key==="Home"){d[0]?.focus();return}if(e.key==="End"){d[d.length-1]?.focus();return}const m=e.key===_,T=m?[...d].reverse():d,h=T.find(r=>m?i.indexOf(r)<n:i.indexOf(r)>n);if(N.isDefined(h)){h.focus();return}u&&T[0]?.focus()},j=({className:e,children:t,onKeyDown:u,loopFocus:s=!0,...i})=>{const n=(0,A.useDirection)(),c=a=>{if(u?.(a),a.defaultPrevented){a.preventBaseUIHandler();return}a.baseUIHandlerPrevented||K({event:a,direction:n,loopFocus:s})};return(0,o.jsxs)(b.Tabs.List,{...i,loopFocus:s,onKeyDown:c,className:f.mergeClassNames(l.Tab_module_default.list,e),children:[t,(0,o.jsx)(b.Tabs.Indicator,{className:l.Tab_module_default.indicator})]})},P=({className:e,...t})=>(0,o.jsx)(b.Tabs.Panel,{...t,className:f.mergeClassNames(l.Tab_module_default.panel,e)}),D=({className:e,...t})=>(0,o.jsx)(b.Tabs.Root,{...t,className:f.mergeClassNames(l.Tab_module_default.root,e)}),H=({className:e,children:t,startIcon:u,endIcon:s,badge:i,highlighted:n=!1,size:c="sm",...a})=>(0,o.jsx)(b.Tabs.Tab,{...a,className:f.mergeClassNames(l.Tab_module_default.tab,e),"data-size":c,"data-highlighted":n||void 0,children:(0,o.jsx)(l.TabsTabContent,{startIcon:u,endIcon:s,badge:i,children:t})}),O={Root:D,List:j,Tab:H,Panel:P};Object.defineProperty(exports,"CAL_LINK",{enumerable:!0,get:function(){return L}});Object.defineProperty(exports,"ClickToActionLink",{enumerable:!0,get:function(){return C}});Object.defineProperty(exports,"GITHUB_LINK",{enumerable:!0,get:function(){return k}});Object.defineProperty(exports,"TWENTY_PRICING_LINK",{enumerable:!0,get:function(){return q}});Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return O}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as w } from "./isDefined-fMi6eQ4r.js";
|
|
2
2
|
import { t as u } from "./mergeClassNames-BHKm1BNi.js";
|
|
3
|
-
import { n as f, t as A } from "./TabsTabContent-
|
|
3
|
+
import { n as f, t as A } from "./TabsTabContent-_NCTxoP6.js";
|
|
4
4
|
import { clsx as g } from "clsx";
|
|
5
5
|
import { jsx as n, jsxs as N } from "react/jsx-runtime";
|
|
6
6
|
import "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../Pill-BJ3K8Mdc.cjs"),a=require("../Avatar-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../Pill-BJ3K8Mdc.cjs"),a=require("../Avatar-DTNH6Ku7.cjs"),e=require("../data-display-BQ9g9oSc.cjs");exports.AVATAR_PROPERTIES_BY_SIZE=e.AVATAR_PROPERTIES_BY_SIZE;exports.Avatar=a.Avatar;exports.Chip=e.Chip;exports.ColorSample=e.ColorSample;exports.Pill=r.Pill;exports.Status=e.Status;exports.Tag=e.Tag;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as r } from "../Pill-DaFEFIOT.js";
|
|
2
|
-
import { t as o } from "../Avatar-
|
|
3
|
-
import { a as m, i, n as p, r as l, t as A } from "../data-display-
|
|
2
|
+
import { t as o } from "../Avatar-BSHgTxt-.js";
|
|
3
|
+
import { a as m, i, n as p, r as l, t as A } from "../data-display-z9gKjkPS.js";
|
|
4
4
|
export {
|
|
5
5
|
m as AVATAR_PROPERTIES_BY_SIZE,
|
|
6
6
|
o as Avatar,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Loader-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Loader-Z6_7AA-x.cjs"),r=require("../ProgressBar-DwJQXHwg.cjs"),a=require("../feedback-CH2UC0Fv.cjs");exports.Banner=r.Banner;exports.CircularProgressBar=a.CircularProgressBar;exports.Loader=e.Loader;exports.ProgressBar=r.ProgressBar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ButtonProps } from '../../Button/types/ButtonProps';
|
|
2
|
-
export declare const ButtonGroupContext: import('react').Context<Pick<ButtonProps, "
|
|
2
|
+
export declare const ButtonGroupContext: import('react').Context<Pick<ButtonProps, "color" | "size" | "variant"> | null>;
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type SegmentedControlOptionBase<Value extends string> = {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
value: Value;
|
|
6
|
-
};
|
|
7
|
-
type SegmentedControlOptionWithLabel<Value extends string> = SegmentedControlOptionBase<Value> & {
|
|
8
|
-
Icon?: IconComponent;
|
|
9
|
-
ariaLabel?: string;
|
|
10
|
-
label: NonNullable<ReactNode>;
|
|
11
|
-
};
|
|
12
|
-
type SegmentedControlOptionIconOnly<Value extends string> = SegmentedControlOptionBase<Value> & {
|
|
13
|
-
Icon: IconComponent;
|
|
14
|
-
ariaLabel: string;
|
|
15
|
-
label?: never;
|
|
16
|
-
};
|
|
17
|
-
export type SegmentedControlOption<Value extends string> = SegmentedControlOptionWithLabel<Value> | SegmentedControlOptionIconOnly<Value>;
|
|
18
|
-
type SegmentedControlItemWidth = 'content' | 'equal';
|
|
19
|
-
export type SegmentedControlProps<Value extends string> = {
|
|
20
|
-
ariaLabel: string;
|
|
21
|
-
itemWidth?: SegmentedControlItemWidth;
|
|
22
|
-
onChange: (value: Value) => void;
|
|
23
|
-
options: SegmentedControlOption<Value>[];
|
|
24
|
-
role?: 'group' | 'tablist';
|
|
25
|
-
value: Value;
|
|
26
|
-
width?: number | string;
|
|
27
|
-
};
|
|
28
|
-
export declare const SegmentedControl: <Value extends string>({ ariaLabel, itemWidth, onChange, options, role, value, width, }: SegmentedControlProps<Value>) => import("react").JSX.Element;
|
|
29
|
-
export {};
|
|
1
|
+
import { SegmentedControlProps } from './types/SegmentedControlProps';
|
|
2
|
+
export declare const SegmentedControl: <TValue extends string>({ className, itemWidth, options, ...props }: SegmentedControlProps<TValue>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SegmentedControlOption<TValue extends string = string> = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
value: TValue;
|
|
5
|
+
} & ({
|
|
6
|
+
label: NonNullable<ReactNode>;
|
|
7
|
+
startIcon?: ReactNode;
|
|
8
|
+
'aria-label'?: string;
|
|
9
|
+
} | {
|
|
10
|
+
label?: never;
|
|
11
|
+
startIcon: NonNullable<ReactNode>;
|
|
12
|
+
'aria-label': string;
|
|
13
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RadioGroupProps } from '../../RadioGroup/types/RadioGroupProps';
|
|
2
|
+
import { SegmentedControlOption } from './SegmentedControlOption';
|
|
3
|
+
export type SegmentedControlProps<TValue extends string = string> = Omit<RadioGroupProps<TValue>, 'aria-label' | 'aria-labelledby' | 'children' | 'role'> & {
|
|
4
|
+
itemWidth?: 'content' | 'equal';
|
|
5
|
+
options: readonly SegmentedControlOption<TValue>[];
|
|
6
|
+
} & ({
|
|
7
|
+
'aria-label': string;
|
|
8
|
+
} | {
|
|
9
|
+
'aria-labelledby': string;
|
|
10
|
+
});
|
|
@@ -20,8 +20,9 @@ export { Radio } from './Radio/Radio';
|
|
|
20
20
|
export type { RadioProps } from './Radio/types/RadioProps';
|
|
21
21
|
export { RadioGroup } from './RadioGroup/RadioGroup';
|
|
22
22
|
export type { RadioGroupProps } from './RadioGroup/types/RadioGroupProps';
|
|
23
|
-
export type { SegmentedControlOption, SegmentedControlProps, } from './SegmentedControl/SegmentedControl';
|
|
24
23
|
export { SegmentedControl } from './SegmentedControl/SegmentedControl';
|
|
24
|
+
export type { SegmentedControlOption } from './SegmentedControl/types/SegmentedControlOption';
|
|
25
|
+
export type { SegmentedControlProps } from './SegmentedControl/types/SegmentedControlProps';
|
|
25
26
|
export { Select } from './Select/Select';
|
|
26
27
|
export type { SelectGroupLabelProps } from './Select/types/SelectGroupLabelProps';
|
|
27
28
|
export type { SelectGroupProps } from './Select/types/SelectGroupProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../Input-CFXY05bj.cjs"),e=require("../input-NBD4DP8j.cjs");exports.Button=t.Button;exports.ButtonGroup=e.ButtonGroup;exports.Checkbox=e.Checkbox;exports.Field=e.Field;exports.Input=t.Input;exports.InputGroup=e.InputGroup;exports.Radio=t.Radio;exports.RadioGroup=e.RadioGroup;exports.SegmentedControl=e.SegmentedControl;exports.Select=e.Select;exports.Slider=e.Slider;exports.Switch=t.Switch;exports.Textarea=e.Textarea;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
1
|
+
import { a as o, i as t, o as s, t as r } from "../Input-DHfmRBq5.js";
|
|
2
|
+
import { a as i, c as p, i as n, l as u, n as d, o as l, r as m, s as c, t as S } from "../input-C8IiOA9Q.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
s as Button,
|
|
5
|
+
u as ButtonGroup,
|
|
6
6
|
p as Checkbox,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
c as Field,
|
|
8
|
+
r as Input,
|
|
9
|
+
l as InputGroup,
|
|
10
10
|
o as Radio,
|
|
11
|
-
|
|
11
|
+
i as RadioGroup,
|
|
12
12
|
n as SegmentedControl,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
m as Select,
|
|
14
|
+
d as Slider,
|
|
15
|
+
t as Switch,
|
|
16
|
+
S as Textarea
|
|
17
17
|
};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
onPointerDown?: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
4
|
-
onPointerMove?: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
5
|
-
onPointerUp?: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
};
|
|
8
|
-
export declare const ResizeHandle: ({ onPointerDown, onPointerMove, onPointerUp, style, }: ResizeHandleProps) => import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
1
|
+
import { ResizeHandleProps } from './types/ResizeHandleProps';
|
|
2
|
+
export declare const ResizeHandle: ({ axis, value: controlledValue, defaultValue, onValueChange, min, max, step, disabled, className, children, render, ref, ...props }: ResizeHandleProps) => import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KeyboardEvent, PointerEvent } from 'react';
|
|
2
|
+
type UseResizeHandleInteractionArgs = {
|
|
3
|
+
axis: 'x' | 'y';
|
|
4
|
+
value: number;
|
|
5
|
+
onValueChange: (value: number) => void;
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
step: number;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const useResizeHandleInteraction: ({ axis, value, onValueChange, min, max, step, disabled, }: UseResizeHandleInteractionArgs) => {
|
|
12
|
+
onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
|
|
13
|
+
onPointerMove: (event: PointerEvent<HTMLDivElement>) => void;
|
|
14
|
+
onPointerUp: (event: PointerEvent<HTMLDivElement>) => void;
|
|
15
|
+
onPointerCancel: (event: PointerEvent<HTMLDivElement>) => void;
|
|
16
|
+
onLostPointerCapture: (event: PointerEvent<HTMLDivElement>) => void;
|
|
17
|
+
onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
export type ResizeHandleProps = useRender.ComponentProps<'div'> & {
|
|
3
|
+
axis?: 'x' | 'y';
|
|
4
|
+
value?: number;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
onValueChange?: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
};
|
|
@@ -5,6 +5,6 @@ export type { AnimationDurations } from './AnimatedExpandableContainer/types/Ani
|
|
|
5
5
|
export type { AnimationMode } from './AnimatedExpandableContainer/types/AnimationMode';
|
|
6
6
|
export type { AnimationSize } from './AnimatedExpandableContainer/types/AnimationSize';
|
|
7
7
|
export { HorizontalSeparator } from './HorizontalSeparator/HorizontalSeparator';
|
|
8
|
-
export { useResizeHandle } from './ResizeHandle/hooks/useResizeHandle';
|
|
9
8
|
export { ResizeHandle } from './ResizeHandle/ResizeHandle';
|
|
9
|
+
export type { ResizeHandleProps } from './ResizeHandle/types/ResizeHandleProps';
|
|
10
10
|
export { TextDirectionProvider } from './TextDirectionProvider/TextDirectionProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../HorizontalSeparator-vJLHHlc4.cjs"),e=require("../layout-BgAfeZsL.cjs"),i=require("../ResizeHandle-cll01qBQ.cjs");exports.AnimatedExpandableContainer=e.AnimatedExpandableContainer;exports.HorizontalSeparator=r.HorizontalSeparator;exports.ResizeHandle=i.ResizeHandle;exports.TextDirectionProvider=e.TextDirectionProvider;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
1
|
+
import { t as o } from "../HorizontalSeparator-JwV0dB5W.js";
|
|
2
|
+
import { n as a, t as e } from "../layout-D-XbKoLM.js";
|
|
3
|
+
import { t as n } from "../ResizeHandle-DN1bRxQb.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
n as useResizeHandle
|
|
5
|
+
a as AnimatedExpandableContainer,
|
|
6
|
+
o as HorizontalSeparator,
|
|
7
|
+
n as ResizeHandle,
|
|
8
|
+
e as TextDirectionProvider
|
|
10
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../ListItem-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../ListItem-2dHkY1NB.cjs"),e=require("../navigation-BqZBteC2.cjs");exports.CAL_LINK=e.CAL_LINK;exports.ClickToActionLink=e.ClickToActionLink;exports.GITHUB_LINK=e.GITHUB_LINK;exports.ListItem=i.ListItem;exports.TWENTY_PRICING_LINK=e.TWENTY_PRICING_LINK;exports.Tabs=e.Tabs;
|