@companix/uikit 0.0.33 → 0.0.35
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/Avatar/Avatar.scss +64 -0
- package/dist/Avatar/helpers.d.ts +10 -0
- package/dist/Avatar/index.d.ts +8 -0
- package/dist/Avatar/types.d.ts +2 -0
- package/dist/Icon/index.d.ts +2 -3
- package/dist/Segments/Segments.scss +57 -0
- package/dist/Segments/index.d.ts +11 -0
- package/dist/bundle.es.js +86 -80
- package/dist/bundle.es10.js +78 -39
- package/dist/bundle.es11.js +26 -36
- package/dist/bundle.es12.js +75 -56
- package/dist/bundle.es13.js +39 -19
- package/dist/bundle.es14.js +36 -33
- package/dist/bundle.es15.js +54 -23
- package/dist/bundle.es16.js +21 -45
- package/dist/bundle.es17.js +29 -19
- package/dist/bundle.es18.js +21 -25
- package/dist/bundle.es19.js +45 -38
- package/dist/bundle.es2.js +42 -45
- package/dist/bundle.es20.js +21 -14
- package/dist/bundle.es21.js +28 -33
- package/dist/bundle.es22.js +38 -21
- package/dist/bundle.es23.js +12 -38
- package/dist/bundle.es24.js +32 -114
- package/dist/bundle.es25.js +20 -120
- package/dist/bundle.es26.js +40 -72
- package/dist/bundle.es27.js +115 -32
- package/dist/bundle.es28.js +120 -11
- package/dist/bundle.es29.js +71 -83
- package/dist/bundle.es3.js +2 -8
- package/dist/bundle.es30.js +31 -20
- package/dist/bundle.es31.js +11 -6
- package/dist/bundle.es32.js +83 -32
- package/dist/bundle.es33.js +21 -21
- package/dist/bundle.es34.js +6 -10
- package/dist/bundle.es35.js +33 -23
- package/dist/bundle.es36.js +20 -37
- package/dist/bundle.es37.js +10 -50
- package/dist/bundle.es38.js +22 -40
- package/dist/bundle.es39.js +38 -8
- package/dist/bundle.es4.js +44 -10
- package/dist/bundle.es40.js +48 -21
- package/dist/bundle.es41.js +42 -86
- package/dist/bundle.es42.js +8 -17
- package/dist/bundle.es43.js +24 -19
- package/dist/bundle.es44.js +24 -24
- package/dist/bundle.es45.js +77 -29
- package/dist/bundle.es46.js +18 -3
- package/dist/bundle.es47.js +20 -5
- package/dist/bundle.es48.js +24 -14
- package/dist/bundle.es49.js +39 -14
- package/dist/bundle.es5.js +8 -85
- package/dist/bundle.es50.js +3 -3
- package/dist/bundle.es51.js +5 -3
- package/dist/bundle.es52.js +13 -69
- package/dist/bundle.es53.js +13 -67
- package/dist/bundle.es54.js +3 -70
- package/dist/bundle.es55.js +3 -12
- package/dist/bundle.es56.js +68 -41
- package/dist/bundle.es57.js +67 -14
- package/dist/bundle.es58.js +69 -31
- package/dist/bundle.es59.js +12 -70
- package/dist/bundle.es6.js +11 -85
- package/dist/bundle.es60.js +43 -20
- package/dist/bundle.es61.js +15 -2
- package/dist/bundle.es62.js +32 -14
- package/dist/bundle.es63.js +69 -19
- package/dist/bundle.es64.js +14 -2
- package/dist/bundle.es65.js +17 -18
- package/dist/bundle.es67.js +76 -20
- package/dist/bundle.es68.js +45 -72
- package/dist/bundle.es69.js +20 -49
- package/dist/bundle.es7.js +84 -79
- package/dist/bundle.es70.js +2 -2
- package/dist/bundle.es71.js +21 -14
- package/dist/bundle.es72.js +2 -3
- package/dist/bundle.es73.js +20 -3
- package/dist/bundle.es74.js +14 -20
- package/dist/bundle.es75.js +2 -2
- package/dist/bundle.es76.js +3 -20
- package/dist/bundle.es77.js +3 -2
- package/dist/bundle.es78.js +22 -0
- package/dist/bundle.es79.js +4 -0
- package/dist/bundle.es8.js +83 -24
- package/dist/bundle.es80.js +22 -0
- package/dist/bundle.es81.js +4 -0
- package/dist/bundle.es9.js +20 -73
- package/dist/index.d.ts +6 -0
- package/dist/index.scss +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '../mixins.scss';
|
|
2
|
+
|
|
3
|
+
.avatar {
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
background-size: cover;
|
|
11
|
+
isolation: isolate;
|
|
12
|
+
|
|
13
|
+
@include mixins.use-styles(avatar);
|
|
14
|
+
|
|
15
|
+
&-image {
|
|
16
|
+
object-fit: cover;
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
color: transparent;
|
|
21
|
+
text-indent: 10000px;
|
|
22
|
+
border: 0;
|
|
23
|
+
border-radius: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-icon {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: auto;
|
|
29
|
+
left: auto;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-initials {
|
|
33
|
+
line-height: 1;
|
|
34
|
+
text-align: center;
|
|
35
|
+
text-transform: uppercase;
|
|
36
|
+
|
|
37
|
+
@include mixins.use-styles(avatar, initials);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-border {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
border-radius: inherit;
|
|
44
|
+
transform-origin: left top;
|
|
45
|
+
|
|
46
|
+
@include mixins.use-styles(avatar, border);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-content {
|
|
50
|
+
display: inherit;
|
|
51
|
+
align-items: inherit;
|
|
52
|
+
justify-content: inherit;
|
|
53
|
+
border-radius: inherit;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&-border,
|
|
57
|
+
&-content {
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type GetInitialsFontSizeType = (avatarSize: number) => number;
|
|
2
|
+
export declare const getInitialsFontSize: GetInitialsFontSizeType;
|
|
3
|
+
export declare function getFallbackIconSizeByImageBaseSize(imageSize: number): 12 | 16 | 20 | 24 | 28 | 36;
|
|
4
|
+
export declare namespace getFallbackIconSizeByImageBaseSize {
|
|
5
|
+
let MAX_SIZE: 36;
|
|
6
|
+
}
|
|
7
|
+
export declare function getBadgeIconSizeByImageBaseSize(imageSize: number): 12 | 16 | 20 | 24;
|
|
8
|
+
export declare namespace getBadgeIconSizeByImageBaseSize {
|
|
9
|
+
let MAX_SIZE: 24;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AvatarSize } from './types';
|
|
2
|
+
export interface AvatarProps extends React.ImgHTMLAttributes<HTMLElement> {
|
|
3
|
+
size?: AvatarSize;
|
|
4
|
+
noBorder?: boolean;
|
|
5
|
+
fallbackIcon?: React.ReactElement;
|
|
6
|
+
initials?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Avatar: ({ alt, crossOrigin, decoding, loading, referrerPolicy, sizes, size, src, srcSet, useMap, initials, noBorder, fallbackIcon: fallbackIconProp, children }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Icon/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
export interface IconProps {
|
|
2
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
3
3
|
icon: IconDefinition;
|
|
4
4
|
size?: 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
5
|
-
className?: string;
|
|
6
5
|
}
|
|
7
|
-
export declare const Icon: import('react').ForwardRefExoticComponent<IconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
6
|
+
export declare const Icon: import('react').ForwardRefExoticComponent<Omit<IconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@use '../mixins.scss';
|
|
2
|
+
|
|
3
|
+
.segments {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
border-radius: inherit;
|
|
9
|
+
transition: all 100ms ease-out;
|
|
10
|
+
|
|
11
|
+
&-container {
|
|
12
|
+
width: 100%;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
|
|
15
|
+
@include mixins.use-styles(segment-control, container);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-slider {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
width: calc(100% / var(--uikit--options));
|
|
24
|
+
border-radius: inherit;
|
|
25
|
+
transform: translateX(calc(var(--uikit--current-index) * 100%));
|
|
26
|
+
transform-origin: 0 0;
|
|
27
|
+
transition: transform 150ms;
|
|
28
|
+
|
|
29
|
+
@include mixins.use-styles(segment-control, slider);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-option {
|
|
33
|
+
position: relative;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex: 1;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
height: 100%;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
user-select: none;
|
|
42
|
+
background: transparent;
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: inherit;
|
|
45
|
+
transition: color 100ms ease-out;
|
|
46
|
+
|
|
47
|
+
&:not([data-active]):hover {
|
|
48
|
+
@include mixins.use-styles(segment-control, option, hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:not([data-active]):active {
|
|
52
|
+
@include mixins.use-styles(segment-control, option, active);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include mixins.use-styles(segment-control, option);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SegmentOption<T> {
|
|
2
|
+
label: React.ReactNode;
|
|
3
|
+
value: T;
|
|
4
|
+
}
|
|
5
|
+
export interface SegmentsProps<T> {
|
|
6
|
+
value: T;
|
|
7
|
+
onChange: (value: T) => void;
|
|
8
|
+
options: SegmentOption<T>[];
|
|
9
|
+
}
|
|
10
|
+
export declare const Segments: <T extends number | string>({ value, onChange, options }: SegmentsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
package/dist/bundle.es.js
CHANGED
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
1
|
+
import { Avatar as e } from "./bundle.es2.js";
|
|
2
|
+
import { avatarSizes as p } from "./bundle.es3.js";
|
|
3
|
+
import { Button as x } from "./bundle.es4.js";
|
|
4
|
+
import { ButtonGroup as a } from "./bundle.es5.js";
|
|
5
|
+
import { Spinner as l } from "./bundle.es6.js";
|
|
6
|
+
import { Scrollable as n } from "./bundle.es7.js";
|
|
7
|
+
import { ImitateScroll as S } from "./bundle.es8.js";
|
|
8
|
+
import { Segments as g } from "./bundle.es9.js";
|
|
9
|
+
import { Popover as h } from "./bundle.es10.js";
|
|
10
|
+
import { Tooltip as v } from "./bundle.es11.js";
|
|
11
|
+
import { Select as P } from "./bundle.es12.js";
|
|
12
|
+
import { Input as A } from "./bundle.es13.js";
|
|
13
|
+
import { OptionItem as B } from "./bundle.es14.js";
|
|
14
|
+
import { NumberInput as k } from "./bundle.es15.js";
|
|
15
|
+
import { OptionsList as y } from "./bundle.es16.js";
|
|
16
|
+
import { Checkbox as G } from "./bundle.es17.js";
|
|
17
|
+
import { Switch as O } from "./bundle.es18.js";
|
|
18
|
+
import { Radio as z, RadioGroup as N } from "./bundle.es19.js";
|
|
19
|
+
import { Drawer as q } from "./bundle.es20.js";
|
|
20
|
+
import { Dialog as H } from "./bundle.es21.js";
|
|
21
|
+
import { AlertDialog as K } from "./bundle.es22.js";
|
|
22
|
+
import { LoadingButton as Q } from "./bundle.es23.js";
|
|
23
|
+
import { Tabs as V } from "./bundle.es24.js";
|
|
24
|
+
import { Countdown as X } from "./bundle.es25.js";
|
|
25
|
+
import { TextArea as Z } from "./bundle.es26.js";
|
|
26
|
+
import { SelectTags as $ } from "./bundle.es27.js";
|
|
27
|
+
import { DatePicker as ro } from "./bundle.es28.js";
|
|
28
|
+
import { DateInput as to } from "./bundle.es29.js";
|
|
29
|
+
import { FileOverlay as mo } from "./bundle.es30.js";
|
|
30
|
+
import { FormGroup as fo } from "./bundle.es31.js";
|
|
31
|
+
import { TimePicker as io } from "./bundle.es32.js";
|
|
32
|
+
import { Icon as co } from "./bundle.es33.js";
|
|
33
|
+
import { ProgressBar as so } from "./bundle.es34.js";
|
|
34
|
+
import { ThemeProvider as uo, useTheme as go } from "./bundle.es35.js";
|
|
35
|
+
import { ColorSchemeScript as ho, colorSchemeScript as Do } from "./bundle.es36.js";
|
|
36
|
+
import { useLocalStorage as Io } from "./bundle.es37.js";
|
|
37
|
+
import { createAlertAgent as Ao } from "./bundle.es38.js";
|
|
38
|
+
import { createToaster as Bo } from "./bundle.es39.js";
|
|
39
|
+
import { Toast as ko } from "./bundle.es40.js";
|
|
40
|
+
import { DialogShell as yo, createDialogsRegistry as Co } from "./bundle.es41.js";
|
|
41
|
+
import { createPopoversRegistry as Lo } from "./bundle.es42.js";
|
|
39
42
|
export {
|
|
40
|
-
|
|
41
|
-
e as
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
43
|
+
K as AlertDialog,
|
|
44
|
+
e as Avatar,
|
|
45
|
+
x as Button,
|
|
46
|
+
a as ButtonGroup,
|
|
47
|
+
G as Checkbox,
|
|
48
|
+
ho as ColorSchemeScript,
|
|
49
|
+
X as Countdown,
|
|
50
|
+
to as DateInput,
|
|
51
|
+
ro as DatePicker,
|
|
52
|
+
H as Dialog,
|
|
53
|
+
yo as DialogShell,
|
|
54
|
+
q as Drawer,
|
|
55
|
+
mo as FileOverlay,
|
|
56
|
+
fo as FormGroup,
|
|
57
|
+
co as Icon,
|
|
58
|
+
S as ImitateScroll,
|
|
59
|
+
A as Input,
|
|
60
|
+
Q as LoadingButton,
|
|
61
|
+
k as NumberInput,
|
|
62
|
+
B as OptionItem,
|
|
63
|
+
y as OptionsList,
|
|
64
|
+
h as Popover,
|
|
65
|
+
so as ProgressBar,
|
|
66
|
+
z as Radio,
|
|
67
|
+
N as RadioGroup,
|
|
68
|
+
n as Scrollable,
|
|
69
|
+
g as Segments,
|
|
70
|
+
P as Select,
|
|
71
|
+
$ as SelectTags,
|
|
72
|
+
l as Spinner,
|
|
73
|
+
O as Switch,
|
|
74
|
+
V as Tabs,
|
|
75
|
+
Z as TextArea,
|
|
76
|
+
uo as ThemeProvider,
|
|
77
|
+
io as TimePicker,
|
|
78
|
+
ko as Toast,
|
|
79
|
+
v as Tooltip,
|
|
80
|
+
p as avatarSizes,
|
|
81
|
+
Do as colorSchemeScript,
|
|
82
|
+
Ao as createAlertAgent,
|
|
83
|
+
Co as createDialogsRegistry,
|
|
84
|
+
Lo as createPopoversRegistry,
|
|
85
|
+
Bo as createToaster,
|
|
86
|
+
Io as useLocalStorage,
|
|
87
|
+
go as useTheme
|
|
82
88
|
};
|
package/dist/bundle.es10.js
CHANGED
|
@@ -1,43 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-popover";
|
|
3
|
+
import { attr as B } from "@companix/utils-browser";
|
|
4
|
+
import M from "classnames";
|
|
5
|
+
import { forwardRef as j, useRef as k } from "react";
|
|
6
|
+
const D = j((a, i) => {
|
|
7
|
+
const {
|
|
8
|
+
children: n,
|
|
9
|
+
sideOffset: s,
|
|
10
|
+
matchTarget: l,
|
|
11
|
+
onAnimationEnd: c,
|
|
12
|
+
onAnimationStart: m,
|
|
13
|
+
onOpenAutoFocus: d,
|
|
14
|
+
onCloseAutoFocus: f,
|
|
15
|
+
triggerRef: p,
|
|
16
|
+
triggerProps: h,
|
|
17
|
+
open: g,
|
|
18
|
+
content: u,
|
|
19
|
+
onOpenChange: v,
|
|
20
|
+
align: C,
|
|
21
|
+
disabled: x,
|
|
22
|
+
minimal: w,
|
|
23
|
+
className: L,
|
|
24
|
+
fitMaxHeight: N = !0,
|
|
25
|
+
zIndex: O = 100,
|
|
26
|
+
side: A,
|
|
27
|
+
showArrows: P
|
|
28
|
+
} = a, e = k(null), b = () => {
|
|
29
|
+
e.current && e.current.click();
|
|
30
|
+
}, y = (R) => {
|
|
31
|
+
x && R.preventDefault();
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ t(o.Root, { open: g, onOpenChange: v, children: [
|
|
34
|
+
/* @__PURE__ */ r(o.Trigger, { ref: p, ...h, onClick: y, asChild: !0, children: n }),
|
|
35
|
+
/* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ t(
|
|
36
|
+
o.Content,
|
|
24
37
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
ref: i,
|
|
39
|
+
className: M("popover", L),
|
|
40
|
+
side: A,
|
|
41
|
+
align: C,
|
|
42
|
+
"data-appearance": w ? "minimal" : "default",
|
|
43
|
+
"data-match-target": l,
|
|
44
|
+
sideOffset: s ?? 6,
|
|
45
|
+
avoidCollisions: !0,
|
|
46
|
+
arrowPadding: 10,
|
|
47
|
+
style: { zIndex: O },
|
|
48
|
+
onAnimationStart: m,
|
|
49
|
+
onAnimationEnd: c,
|
|
50
|
+
onOpenAutoFocus: d,
|
|
51
|
+
onCloseAutoFocus: f,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
|
|
54
|
+
P && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ t("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
|
|
55
|
+
/* @__PURE__ */ r(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
className: "popover-arrow-border",
|
|
59
|
+
d: "M 18.112 -2.704 C 19.127 -3.64 19.999 -5.626 19.999 -7.001 L 19.999 18.999 C 19.999 17.621 19.131 15.642 18.111 14.702 L 10.927 8.084 C 9.69 6.944 9.694 5.05 10.927 3.914 L 18.112 -2.704 Z",
|
|
60
|
+
style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
|
|
61
|
+
transform: "matrix(0, -1, 1, 0, 0.000001, 0)"
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ r(
|
|
65
|
+
"path",
|
|
66
|
+
{
|
|
67
|
+
className: "popover-arrow-fill",
|
|
68
|
+
d: "M 17.789 -2.965 C 19.009 -4.09 19.999 -6.341 19.999 -7.995 L 19.999 -10.001 L 19.999 19.999 L 19.999 17.994 C 19.999 16.34 19.016 14.094 17.789 12.964 L 10.606 6.348 C 9.796 5.602 9.804 4.388 10.606 3.648 L 17.789 -2.966 L 17.789 -2.965 Z",
|
|
69
|
+
style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
|
|
70
|
+
transform: "matrix(0, -1, 1, 0, 0, 0)"
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }) }) }),
|
|
74
|
+
/* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": B(N), children: u({ close: b }) })
|
|
75
|
+
]
|
|
37
76
|
}
|
|
38
|
-
) })
|
|
39
|
-
}
|
|
40
|
-
);
|
|
77
|
+
) })
|
|
78
|
+
] });
|
|
79
|
+
});
|
|
41
80
|
export {
|
|
42
|
-
|
|
81
|
+
D as Popover
|
|
43
82
|
};
|
package/dist/bundle.es11.js
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ o("div", { className: "option-title", children: s }),
|
|
27
|
-
n && /* @__PURE__ */ o("div", { className: "option-label", children: n })
|
|
28
|
-
] })
|
|
29
|
-
] }),
|
|
30
|
-
e && !r && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x.faCheck }) })
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
);
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { Popover as m } from "./bundle.es10.js";
|
|
4
|
+
const f = ({ children: e, content: t, side: r }) => {
|
|
5
|
+
const [s, o] = p(!1);
|
|
6
|
+
return /* @__PURE__ */ n(
|
|
7
|
+
m,
|
|
8
|
+
{
|
|
9
|
+
showArrows: !0,
|
|
10
|
+
className: "tooltip",
|
|
11
|
+
open: s,
|
|
12
|
+
side: r,
|
|
13
|
+
content: () => t,
|
|
14
|
+
triggerProps: {
|
|
15
|
+
onMouseEnter: () => {
|
|
16
|
+
o(!0);
|
|
17
|
+
},
|
|
18
|
+
onMouseLeave: () => {
|
|
19
|
+
o(!1);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
children: e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
36
26
|
export {
|
|
37
|
-
|
|
27
|
+
f as Tooltip
|
|
38
28
|
};
|