@pibit.ai/cure-design-system 0.3.48 → 0.3.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/filtered-view.svg.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +103 -92
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +447 -447
- package/dist/patterns/table/TableZoomControl.d.ts +2 -2
- package/dist/patterns/table/TableZoomControl.d.ts.map +1 -1
- package/dist/patterns/table/TableZoomControl.js +124 -46
- package/dist/patterns/table/index.d.ts +2 -2
- package/dist/patterns/table/index.d.ts.map +1 -1
- package/dist/patterns/table/storyHelpers/mockTableViewsApi.d.ts +25 -0
- package/dist/patterns/table/storyHelpers/mockTableViewsApi.d.ts.map +1 -0
- package/dist/patterns/table/tableZoomLayout.d.ts +6 -0
- package/dist/patterns/table/tableZoomLayout.d.ts.map +1 -1
- package/dist/patterns/table/tableZoomLayout.js +39 -33
- package/dist/patterns/table/toolbar/SummaryFooter.d.ts +10 -3
- package/dist/patterns/table/toolbar/SummaryFooter.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/SummaryFooter.js +61 -71
- package/dist/patterns/table/toolbar/TableToolbar.d.ts +8 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/TableToolbar.js +200 -159
- package/dist/patterns/table/toolbar/TableViewDirtyActions.d.ts +7 -0
- package/dist/patterns/table/toolbar/TableViewDirtyActions.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/TableViewDirtyActions.js +39 -0
- package/dist/patterns/table/toolbar/TableViewsDropdown.d.ts +8 -0
- package/dist/patterns/table/toolbar/TableViewsDropdown.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/TableViewsDropdown.js +171 -0
- package/dist/patterns/table/toolbar/index.d.ts +4 -0
- package/dist/patterns/table/toolbar/index.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/tableViewSnapshot.d.ts +18 -0
- package/dist/patterns/table/toolbar/tableViewSnapshot.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/tableViewSnapshot.js +168 -0
- package/dist/patterns/table/toolbar/tableViewSnapshot.test.d.ts +2 -0
- package/dist/patterns/table/toolbar/tableViewSnapshot.test.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/tableViewTypes.d.ts +73 -0
- package/dist/patterns/table/toolbar/tableViewTypes.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/tableViewTypes.js +4 -0
- package/dist/patterns/table/types.d.ts +24 -1
- package/dist/patterns/table/types.d.ts.map +1 -1
- package/dist/patterns/table/useFitTableToViewport.d.ts +15 -0
- package/dist/patterns/table/useFitTableToViewport.d.ts.map +1 -0
- package/dist/patterns/table/useFitTableToViewport.js +47 -0
- package/dist/patterns/table/useTableZoomState.d.ts +20 -0
- package/dist/patterns/table/useTableZoomState.d.ts.map +1 -0
- package/dist/patterns/table/useTableZoomState.js +30 -0
- package/dist/patterns/table-component/TableComponent.d.ts.map +1 -1
- package/dist/patterns/table-component/TableComponent.js +331 -335
- package/dist/primitives/dropdown/dropdown.d.ts +11 -2
- package/dist/primitives/dropdown/dropdown.d.ts.map +1 -1
- package/dist/primitives/dropdown/dropdown.js +95 -66
- package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts +2 -0
- package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts.map +1 -0
- package/dist/primitives/input/hint-text.js +1 -1
- package/dist/primitives/tooltip/tooltip.d.ts +5 -1
- package/dist/primitives/tooltip/tooltip.d.ts.map +1 -1
- package/dist/primitives/tooltip/tooltip.js +35 -33
- package/dist/styles/components.css +1 -1
- package/package.json +3 -6
|
@@ -13,18 +13,27 @@ interface DropdownItemProps extends AriaMenuItemProps {
|
|
|
13
13
|
}>;
|
|
14
14
|
/** If true, the item will be selected. */
|
|
15
15
|
isSelected?: boolean;
|
|
16
|
+
/** The size of the item. */
|
|
17
|
+
size?: "sm" | "md";
|
|
16
18
|
}
|
|
17
19
|
interface DropdownMenuProps<T extends object> extends AriaMenuProps<T> {
|
|
18
20
|
}
|
|
19
21
|
interface DropdownPopoverProps extends AriaPopoverProps {
|
|
20
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Exported for its test only — not re-exported from index.ts, so the package's
|
|
25
|
+
* public surface is unchanged. This predicate is the whole point of the
|
|
26
|
+
* DropdownPopover wrapper, so it is worth asserting directly rather than
|
|
27
|
+
* through react-aria's outside-click plumbing.
|
|
28
|
+
*/
|
|
29
|
+
export declare const isNestedOverlayElement: (element: Element) => boolean;
|
|
21
30
|
export declare const Dropdown: {
|
|
22
31
|
Root: typeof AriaMenuTrigger;
|
|
23
|
-
Popover: (props: DropdownPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
Popover: ({ shouldCloseOnInteractOutside, ...props }: DropdownPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
33
|
Menu: <T extends object>(props: DropdownMenuProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
25
34
|
Section: <T extends object>(props: import('react-aria-components').MenuSectionProps<T> & React.RefAttributes<HTMLElement>) => import('react').ReactElement | null;
|
|
26
35
|
SectionHeader: (props: React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
27
|
-
Item: ({ label, children, addon, icon: Icon, unstyled, isSelected, ...props }: DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
Item: ({ label, children, addon, icon: Icon, unstyled, isSelected, size, ...props }: DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
37
|
Separator: (props: AriaSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
38
|
DotsButton: (props: AriaButtonProps & RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
|
|
30
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/primitives/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/primitives/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAC1B,YAAY,IAAI,gBAAgB,EAChC,cAAc,IAAI,kBAAkB,EACrC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAML,WAAW,IAAI,eAAe,EAG/B,MAAM,uBAAuB,CAAC;AAG/B,UAAU,iBAAkB,SAAQ,iBAAiB;IACnD,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAgFD,UAAU,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;CAAG;AAoBzE,UAAU,oBAAqB,SAAQ,gBAAgB;CAAG;AAY1D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,OAAO,KAAG,OAGvD,CAAC;AAwEJ,eAAO,MAAM,QAAQ;;0DAnElB,oBAAoB;WA5CD,CAAC,SAAS,MAAM,SAAS,iBAAiB,CAAC,CAAC,CAAC;;;yFAvEhE,iBAAiB;uBAqJc,kBAAkB;wBAU3C,eAAe,GAAG,aAAa,CAAC,iBAAiB,CAAC;CAgC1D,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,63 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as f } from "react";
|
|
3
|
+
import { DotsVertical as x, Check as g } from "@untitledui/icons";
|
|
4
|
+
import { Header as p, MenuSection as y, MenuTrigger as N, Button as b, Separator as h, MenuItem as c, Menu as v, Popover as w } from "react-aria-components";
|
|
5
|
+
import { cx as r } from "../../utils/cn.js";
|
|
6
|
+
const D = ({
|
|
6
7
|
label: e,
|
|
7
|
-
children:
|
|
8
|
+
children: t,
|
|
8
9
|
addon: s,
|
|
9
|
-
icon:
|
|
10
|
-
unstyled:
|
|
11
|
-
isSelected:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
icon: a,
|
|
11
|
+
unstyled: m,
|
|
12
|
+
isSelected: l = !1,
|
|
13
|
+
size: u = "sm",
|
|
14
|
+
...i
|
|
15
|
+
}) => m ? /* @__PURE__ */ n(c, { id: e, textValue: e, ...i }) : /* @__PURE__ */ n(
|
|
16
|
+
c,
|
|
15
17
|
{
|
|
16
|
-
...
|
|
17
|
-
className: (
|
|
18
|
+
...i,
|
|
19
|
+
className: (o) => r(
|
|
18
20
|
"group block cursor-pointer px-1.5 py-px outline-hidden",
|
|
19
|
-
|
|
20
|
-
typeof
|
|
21
|
+
o.isDisabled && "cursor-not-allowed",
|
|
22
|
+
typeof i.className == "function" ? i.className(o) : i.className
|
|
21
23
|
),
|
|
22
|
-
children: (
|
|
24
|
+
children: (o) => /* @__PURE__ */ d(
|
|
23
25
|
"div",
|
|
24
26
|
{
|
|
25
|
-
className:
|
|
27
|
+
className: r(
|
|
26
28
|
"relative flex items-center rounded-md px-2.5 py-2 outline-focus-ring transition duration-100 ease-linear",
|
|
27
|
-
!
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
!o.isDisabled && !l && "group-hover:bg-primary_hover",
|
|
30
|
+
o.isFocused && "bg-primary_hover",
|
|
31
|
+
o.isFocusVisible && !l && "outline-2 -outline-offset-2",
|
|
32
|
+
l && "bg-utility-brand-25"
|
|
31
33
|
),
|
|
32
34
|
children: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
a && /* @__PURE__ */ n(
|
|
36
|
+
a,
|
|
35
37
|
{
|
|
36
38
|
"aria-hidden": "true",
|
|
37
|
-
className:
|
|
39
|
+
className: r(
|
|
38
40
|
"mr-2 size-4 shrink-0 stroke-[2.25px]",
|
|
39
|
-
|
|
41
|
+
o.isDisabled ? "text-fg-disabled" : "text-fg-quaternary"
|
|
40
42
|
)
|
|
41
43
|
}
|
|
42
44
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ n(
|
|
44
46
|
"span",
|
|
45
47
|
{
|
|
46
|
-
className:
|
|
48
|
+
className: r(
|
|
47
49
|
"grow truncate text-sm font-medium",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
o.isDisabled ? "text-disabled" : "text-secondary",
|
|
51
|
+
o.isFocused && "text-secondary_hover",
|
|
52
|
+
u === "sm" ? "text-xs" : "text-sm"
|
|
50
53
|
),
|
|
51
|
-
children: e || (typeof
|
|
54
|
+
children: e || (typeof t == "function" ? t(o) : t)
|
|
52
55
|
}
|
|
53
56
|
),
|
|
54
|
-
|
|
55
|
-
s && /* @__PURE__ */
|
|
57
|
+
l && /* @__PURE__ */ n(g, { size: 16, className: "text-brand-600" }),
|
|
58
|
+
s && /* @__PURE__ */ n(
|
|
56
59
|
"span",
|
|
57
60
|
{
|
|
58
|
-
className:
|
|
61
|
+
className: r(
|
|
59
62
|
"ml-3 shrink-0 rounded px-1 py-px text-xs font-medium ring-1 ring-secondary ring-inset",
|
|
60
|
-
|
|
63
|
+
o.isDisabled ? "text-disabled" : "text-quaternary"
|
|
61
64
|
),
|
|
62
65
|
children: s
|
|
63
66
|
}
|
|
@@ -66,53 +69,79 @@ const w = ({
|
|
|
66
69
|
}
|
|
67
70
|
)
|
|
68
71
|
}
|
|
69
|
-
),
|
|
70
|
-
|
|
72
|
+
), E = (e) => /* @__PURE__ */ n(
|
|
73
|
+
v,
|
|
71
74
|
{
|
|
72
75
|
disallowEmptySelection: !0,
|
|
73
76
|
selectionMode: "single",
|
|
74
77
|
...e,
|
|
75
|
-
className: (
|
|
78
|
+
className: (t) => r(
|
|
76
79
|
"h-min overflow-y-auto py-1 outline-hidden select-none",
|
|
77
|
-
typeof e.className == "function" ? e.className(
|
|
80
|
+
typeof e.className == "function" ? e.className(t) : e.className
|
|
78
81
|
)
|
|
79
82
|
}
|
|
80
|
-
),
|
|
81
|
-
|
|
83
|
+
), M = [
|
|
84
|
+
'[class*="react-aria-Popover"]',
|
|
85
|
+
'[class*="react-aria-ListBox"]',
|
|
86
|
+
'[class*="react-aria-Menu"]',
|
|
87
|
+
'[role="listbox"]',
|
|
88
|
+
'[role="option"]',
|
|
89
|
+
"[data-nested-select-overlay]"
|
|
90
|
+
], S = (e) => M.some(
|
|
91
|
+
(t) => e.closest(t) != null
|
|
92
|
+
), _ = ({
|
|
93
|
+
shouldCloseOnInteractOutside: e,
|
|
94
|
+
...t
|
|
95
|
+
}) => {
|
|
96
|
+
const s = f(
|
|
97
|
+
(a) => S(a) ? !1 : (e == null ? void 0 : e(a)) ?? !0,
|
|
98
|
+
[e]
|
|
99
|
+
);
|
|
100
|
+
return /* @__PURE__ */ n(
|
|
101
|
+
w,
|
|
102
|
+
{
|
|
103
|
+
placement: "bottom left",
|
|
104
|
+
...t,
|
|
105
|
+
shouldCloseOnInteractOutside: s,
|
|
106
|
+
className: (a) => r(
|
|
107
|
+
"max-h-max! w-62 origin-(--trigger-anchor-point) overflow-auto rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt will-change-transform",
|
|
108
|
+
a.isEntering && "duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5",
|
|
109
|
+
a.isExiting && "duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5",
|
|
110
|
+
typeof t.className == "function" ? t.className(a) : t.className
|
|
111
|
+
),
|
|
112
|
+
children: t.children
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}, k = (e) => /* @__PURE__ */ n(
|
|
116
|
+
h,
|
|
82
117
|
{
|
|
83
|
-
placement: "bottom left",
|
|
84
118
|
...e,
|
|
85
|
-
className: (
|
|
86
|
-
"max-h-max! w-62 origin-(--trigger-anchor-point) overflow-auto rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt will-change-transform",
|
|
87
|
-
o.isEntering && "duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5",
|
|
88
|
-
o.isExiting && "duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5",
|
|
89
|
-
typeof e.className == "function" ? e.className(o) : e.className
|
|
90
|
-
),
|
|
91
|
-
children: e.children
|
|
119
|
+
className: r("my-1 h-px w-full bg-secondary", e.className)
|
|
92
120
|
}
|
|
93
|
-
),
|
|
94
|
-
|
|
121
|
+
), P = (e) => /* @__PURE__ */ n(
|
|
122
|
+
b,
|
|
95
123
|
{
|
|
96
124
|
...e,
|
|
97
125
|
"aria-label": "Open menu",
|
|
98
|
-
className: (
|
|
126
|
+
className: (t) => r(
|
|
99
127
|
"cursor-pointer rounded-md text-fg-quaternary transition duration-100 ease-linear",
|
|
100
|
-
(
|
|
101
|
-
(
|
|
102
|
-
typeof e.className == "function" ? e.className(
|
|
128
|
+
(t.isPressed || t.isHovered) && "text-fg-quaternary_hover",
|
|
129
|
+
(t.isPressed || t.isFocusVisible) && "outline-2 outline-offset-2",
|
|
130
|
+
typeof e.className == "function" ? e.className(t) : e.className
|
|
103
131
|
),
|
|
104
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ n(x, { className: "size-5 transition-inherit-all" })
|
|
105
133
|
}
|
|
106
|
-
),
|
|
107
|
-
Root:
|
|
108
|
-
Popover:
|
|
109
|
-
Menu:
|
|
110
|
-
Section:
|
|
111
|
-
SectionHeader:
|
|
112
|
-
Item:
|
|
113
|
-
Separator:
|
|
114
|
-
DotsButton:
|
|
134
|
+
), H = {
|
|
135
|
+
Root: N,
|
|
136
|
+
Popover: _,
|
|
137
|
+
Menu: E,
|
|
138
|
+
Section: y,
|
|
139
|
+
SectionHeader: p,
|
|
140
|
+
Item: D,
|
|
141
|
+
Separator: k,
|
|
142
|
+
DotsButton: P
|
|
115
143
|
};
|
|
116
144
|
export {
|
|
117
|
-
|
|
145
|
+
H as Dropdown,
|
|
146
|
+
S as isNestedOverlayElement
|
|
118
147
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.nestedOverlay.test.d.ts","sourceRoot":"","sources":["../../../src/primitives/dropdown/dropdown.nestedOverlay.test.ts"],"names":[],"mappings":""}
|
|
@@ -27,8 +27,12 @@ export interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<Ari
|
|
|
27
27
|
* @default true
|
|
28
28
|
*/
|
|
29
29
|
isHoverable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Optional class names for the inner tooltip content container.
|
|
32
|
+
*/
|
|
33
|
+
contentClassName?: string;
|
|
30
34
|
}
|
|
31
|
-
export declare const Tooltip: ({ title, description, children, arrow,
|
|
35
|
+
export declare const Tooltip: ({ title, description, children, arrow, delay, closeDelay, trigger, isDisabled, isHoverable, contentClassName, isOpen, defaultOpen, offset, crossOffset, placement, onOpenChange, ...tooltipProps }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
36
|
export interface TooltipTriggerProps extends AriaButtonProps {
|
|
33
37
|
}
|
|
34
38
|
export declare const TooltipTrigger: ({ children, className, ...buttonProps }: TooltipTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/primitives/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,4BAA4B,IAAI,gCAAgC,EACjE,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,YACf,SAAQ,gCAAgC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC5E;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/primitives/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,4BAA4B,IAAI,gCAAgC,EACjE,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,YACf,SAAQ,gCAAgC,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC5E;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,OAAO,GAAI,oMAkBrB,YAAY,4CAoFd,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,eAAe;CAAG;AAE/D,eAAO,MAAM,cAAc,GAAI,yCAI5B,mBAAmB,4CAcrB,CAAC"}
|
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { TooltipTrigger as
|
|
2
|
+
import { TooltipTrigger as z, Tooltip as B, OverlayArrow as N, Button as L } from "react-aria-components";
|
|
3
3
|
import { cx as s } from "../../utils/cn.js";
|
|
4
|
-
const
|
|
4
|
+
const M = ({
|
|
5
5
|
title: e,
|
|
6
6
|
description: t,
|
|
7
7
|
children: i,
|
|
8
8
|
arrow: n = !1,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
delay: p = 300,
|
|
10
|
+
closeDelay: c = 0,
|
|
11
|
+
trigger: d,
|
|
12
|
+
isDisabled: f,
|
|
13
|
+
isHoverable: g = !0,
|
|
14
|
+
contentClassName: h,
|
|
15
|
+
isOpen: u,
|
|
16
|
+
defaultOpen: x,
|
|
17
|
+
offset: b = 6,
|
|
18
|
+
crossOffset: T,
|
|
18
19
|
placement: l = "top",
|
|
19
|
-
onOpenChange:
|
|
20
|
-
...
|
|
20
|
+
onOpenChange: w,
|
|
21
|
+
...y
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
+
const O = [
|
|
23
24
|
"top left",
|
|
24
25
|
"top end",
|
|
25
26
|
"bottom left",
|
|
26
27
|
"bottom end"
|
|
27
|
-
].includes(l),
|
|
28
|
+
].includes(l), v = [
|
|
28
29
|
"top right",
|
|
29
30
|
"top start",
|
|
30
31
|
"bottom right",
|
|
31
32
|
"bottom start"
|
|
32
33
|
].includes(l);
|
|
33
34
|
return /* @__PURE__ */ m(
|
|
34
|
-
|
|
35
|
+
z,
|
|
35
36
|
{
|
|
36
|
-
trigger:
|
|
37
|
-
delay:
|
|
38
|
-
closeDelay:
|
|
39
|
-
isDisabled:
|
|
40
|
-
isOpen:
|
|
41
|
-
defaultOpen:
|
|
42
|
-
onOpenChange:
|
|
37
|
+
trigger: d,
|
|
38
|
+
delay: p,
|
|
39
|
+
closeDelay: c,
|
|
40
|
+
isDisabled: f,
|
|
41
|
+
isOpen: u,
|
|
42
|
+
defaultOpen: x,
|
|
43
|
+
onOpenChange: w,
|
|
43
44
|
children: [
|
|
44
45
|
i,
|
|
45
46
|
/* @__PURE__ */ o(
|
|
46
|
-
|
|
47
|
+
B,
|
|
47
48
|
{
|
|
48
|
-
...
|
|
49
|
-
offset:
|
|
49
|
+
...y,
|
|
50
|
+
offset: b,
|
|
50
51
|
placement: l,
|
|
51
|
-
crossOffset:
|
|
52
|
+
crossOffset: T ?? (O ? -12 : v ? 12 : 0),
|
|
52
53
|
className: ({ isEntering: r, isExiting: a }) => s(
|
|
53
54
|
r && "ease-out animate-in",
|
|
54
55
|
a && "ease-in animate-out",
|
|
55
56
|
!e && "hidden",
|
|
56
|
-
!
|
|
57
|
+
!g && "pointer-events-none"
|
|
57
58
|
),
|
|
58
59
|
children: ({ isEntering: r, isExiting: a }) => /* @__PURE__ */ m(
|
|
59
60
|
"div",
|
|
@@ -61,13 +62,14 @@ const A = ({
|
|
|
61
62
|
className: s(
|
|
62
63
|
"z-50 flex max-w-xs origin-(--trigger-anchor-point) flex-col items-start gap-1 rounded-lg bg-primary-solid px-3 shadow-lg will-change-transform",
|
|
63
64
|
t ? "py-3" : "py-2",
|
|
65
|
+
h,
|
|
64
66
|
r && "ease-out animate-in fade-in zoom-in-95 in-placement-left:slide-in-from-right-0.5 in-placement-right:slide-in-from-left-0.5 in-placement-top:slide-in-from-bottom-0.5 in-placement-bottom:slide-in-from-top-0.5",
|
|
65
67
|
a && "ease-in animate-out fade-out zoom-out-95 in-placement-left:slide-out-to-right-0.5 in-placement-right:slide-out-to-left-0.5 in-placement-top:slide-out-to-bottom-0.5 in-placement-bottom:slide-out-to-top-0.5"
|
|
66
68
|
),
|
|
67
69
|
children: [
|
|
68
70
|
/* @__PURE__ */ o("span", { className: "text-xs font-semibold text-white", children: e }),
|
|
69
71
|
t && /* @__PURE__ */ o("span", { className: "text-xs font-medium text-tooltip-supporting-text", children: t }),
|
|
70
|
-
n && /* @__PURE__ */ o(
|
|
72
|
+
n && /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
|
|
71
73
|
"svg",
|
|
72
74
|
{
|
|
73
75
|
viewBox: "0 0 100 100",
|
|
@@ -83,12 +85,12 @@ const A = ({
|
|
|
83
85
|
]
|
|
84
86
|
}
|
|
85
87
|
);
|
|
86
|
-
},
|
|
88
|
+
}, Q = ({
|
|
87
89
|
children: e,
|
|
88
90
|
className: t,
|
|
89
91
|
...i
|
|
90
92
|
}) => /* @__PURE__ */ o(
|
|
91
|
-
|
|
93
|
+
L,
|
|
92
94
|
{
|
|
93
95
|
...i,
|
|
94
96
|
className: (n) => s(
|
|
@@ -99,6 +101,6 @@ const A = ({
|
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
103
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
M as Tooltip,
|
|
105
|
+
Q as TooltipTrigger
|
|
104
106
|
};
|