@cfx-dev/ui-components 3.0.2 → 3.0.3
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/Rail-DcVowhML.js +81 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Avatar.css +1 -1
- package/dist/assets/css/Badge.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/ButtonBar.css +1 -1
- package/dist/assets/css/Center.css +1 -1
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/ClipboardButton.css +1 -1
- package/dist/assets/css/ControlBox.css +1 -1
- package/dist/assets/css/CountryFlag.css +1 -1
- package/dist/assets/css/Decorate.css +1 -1
- package/dist/assets/css/Dot.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/FlexRestricter.css +1 -1
- package/dist/assets/css/FlexShowcase.css +1 -1
- package/dist/assets/css/Flyout.css +1 -1
- package/dist/assets/css/Icon.css +1 -1
- package/dist/assets/css/IconBig.css +1 -1
- package/dist/assets/css/IconButton.css +1 -1
- package/dist/assets/css/Indicator.css +1 -1
- package/dist/assets/css/InfoPanel.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/InputDropzone.css +1 -1
- package/dist/assets/css/Interactive.css +1 -1
- package/dist/assets/css/Island.css +1 -1
- package/dist/assets/css/ItemPreview.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Loaf.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/NavList.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Page.css +1 -1
- package/dist/assets/css/Popover.css +1 -1
- package/dist/assets/css/PopoverShowcase.css +1 -1
- package/dist/assets/css/PremiumBadge.css +1 -1
- package/dist/assets/css/Prose.css +1 -1
- package/dist/assets/css/Radio.css +1 -1
- package/dist/assets/css/Rail.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/Separator.css +1 -1
- package/dist/assets/css/Shroud.css +1 -1
- package/dist/assets/css/Skeleton.css +1 -1
- package/dist/assets/css/Spacer.css +1 -1
- package/dist/assets/css/Switch.css +1 -1
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/css/Tabular.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/css/TextShowcase.css +1 -1
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/css/ToggleGroup.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-BNd1WgpX.js +96 -0
- package/dist/components/Accordion/Accordion.js +69 -69
- package/dist/components/Avatar/Avatar.js +18 -18
- package/dist/components/Badge/Badge.js +23 -23
- package/dist/components/Button/Button.js +76 -76
- package/dist/components/Button/ButtonBar.js +6 -6
- package/dist/components/Checkbox/Checkbox.js +90 -85
- package/dist/components/ClipboardButton/ClipboardButton.js +17 -17
- package/dist/components/ControlBox/ControlBox.js +11 -11
- package/dist/components/CountryFlag/CountryFlag.js +9 -9
- package/dist/components/Decorate/Decorate.js +12 -12
- package/dist/components/Dot/Dot.js +17 -17
- package/dist/components/Flyout/Flyout.js +44 -44
- package/dist/components/Icon/Icon.js +14 -14
- package/dist/components/IconBig/IconBig.js +23 -18
- package/dist/components/IconButton/IconButton.js +25 -25
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Cart.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Cart.js +42 -0
- package/dist/components/Icons/cfx-icons/UpvotesBurst.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/UpvotesBurst.js +26 -0
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +26 -0
- package/dist/components/Icons/cfx-icons/User.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/User.js +31 -0
- package/dist/components/Icons/cfx-icons/Verified.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Verified.js +23 -0
- package/dist/components/Icons/cfxIcons.d.ts +5 -0
- package/dist/components/Icons/cfxIcons.js +52 -42
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +11 -11
- package/dist/components/InfoPanel/InfoPanel.js +37 -37
- package/dist/components/Input/Input.js +59 -59
- package/dist/components/Input/RichInput.js +39 -39
- package/dist/components/InputDropzone/InputDropzone.js +87 -87
- package/dist/components/InputDropzone/ItemPreview.js +17 -17
- package/dist/components/Interactive/Interactive.js +6 -6
- package/dist/components/Island/Island.js +20 -20
- package/dist/components/Layout/Box/Box.js +81 -81
- package/dist/components/Layout/Center/Center.js +14 -14
- package/dist/components/Layout/Flex/Flex.js +67 -67
- package/dist/components/Layout/Flex/FlexRestricter.js +14 -14
- package/dist/components/Layout/Flex/FlexShowcase.js +4 -4
- package/dist/components/Layout/Pad/Pad.js +34 -34
- package/dist/components/Layout/Page/Page.js +11 -11
- package/dist/components/Layout/Scrollable/Rail.js +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +1 -1
- package/dist/components/Layout/Scrollable/index.js +1 -1
- package/dist/components/Link/ButtonLink.js +7 -6
- package/dist/components/Link/Link.js +36 -27
- package/dist/components/Loaf/Loaf.js +20 -20
- package/dist/components/Modal/Modal.js +51 -51
- package/dist/components/NavList/NavList.js +23 -23
- package/dist/components/Overlay/Overlay.js +17 -17
- package/dist/components/Popover/Popover.js +29 -29
- package/dist/components/Popover/PopoverShowcase.js +9 -9
- package/dist/components/PremiumBadge/PremiumBadge.js +8 -8
- package/dist/components/Prose/Prose.js +6 -6
- package/dist/components/Radio/Radio.js +32 -32
- package/dist/components/Select/Select.js +157 -157
- package/dist/components/Separator/Separator.js +31 -31
- package/dist/components/Shroud/Shroud.js +14 -14
- package/dist/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/Spacer/Spacer.js +25 -25
- package/dist/components/Switch/Switch.js +43 -43
- package/dist/components/Table/Table.js +82 -82
- package/dist/components/Tabular/Tabular.js +60 -60
- package/dist/components/Text/Text.js +26 -26
- package/dist/components/Text/TextShowcase.js +19 -19
- package/dist/components/Textarea/Textarea.js +36 -36
- package/dist/components/Title/Title.js +57 -57
- package/dist/components/ToggleGroup/ToggleGroup.js +40 -40
- package/dist/main.js +2 -2
- package/dist/styles-scss/_ui.scss +22 -0
- package/dist/styles-scss/global.scss +5 -0
- package/dist/styles-scss/tokens.scss +5 -25
- package/package.json +2 -2
- package/dist/Rail-XT5PwAlx.js +0 -81
- package/dist/cfxIcons-BlbKR-zU.js +0 -86
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import l from "react";
|
|
3
|
-
import { Interactive as
|
|
4
|
-
import { clsx as
|
|
5
|
-
const
|
|
6
|
-
root:
|
|
7
|
-
disabled:
|
|
8
|
-
descripted:
|
|
9
|
-
multiline:
|
|
10
|
-
options:
|
|
11
|
-
option:
|
|
12
|
-
description:
|
|
13
|
-
active:
|
|
14
|
-
},
|
|
15
|
-
var
|
|
16
|
-
return ((
|
|
3
|
+
import { Interactive as C } from "../Interactive/Interactive.js";
|
|
4
|
+
import { clsx as d } from "../../utils/clsx.js";
|
|
5
|
+
const M = "cfxui__ToggleGroup__root__fb460", D = "cfxui__ToggleGroup__disabled__75462", j = "cfxui__ToggleGroup__descripted__8e168", k = "cfxui__ToggleGroup__multiline__6b784", E = "cfxui__ToggleGroup__options__7bc0c", L = "cfxui__ToggleGroup__option__8436c", O = "cfxui__ToggleGroup__description__9429c", S = "cfxui__ToggleGroup__active__84da0", o = {
|
|
6
|
+
root: M,
|
|
7
|
+
disabled: D,
|
|
8
|
+
descripted: j,
|
|
9
|
+
multiline: k,
|
|
10
|
+
options: E,
|
|
11
|
+
option: L,
|
|
12
|
+
description: O,
|
|
13
|
+
active: S
|
|
14
|
+
}, p = (_, s) => {
|
|
15
|
+
var e;
|
|
16
|
+
return ((e = s.find((i) => i.value === _)) == null ? void 0 : e.description) || "";
|
|
17
17
|
}, y = l.memo(function(s) {
|
|
18
18
|
const {
|
|
19
|
-
value:
|
|
19
|
+
value: e,
|
|
20
20
|
options: i,
|
|
21
21
|
onChange: r,
|
|
22
|
-
className:
|
|
23
|
-
disabled:
|
|
22
|
+
className: m = "",
|
|
23
|
+
disabled: g = !1,
|
|
24
24
|
multiline: f = !1
|
|
25
|
-
} = s, [
|
|
25
|
+
} = s, [c, n] = l.useState(p(e, i)), v = l.useMemo(
|
|
26
26
|
() => i.map((t, b) => {
|
|
27
|
-
const
|
|
27
|
+
const h = () => {
|
|
28
28
|
r(t.value);
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
[
|
|
29
|
+
}, G = () => {
|
|
30
|
+
n(t.description || "");
|
|
31
|
+
}, T = () => {
|
|
32
|
+
n(p(e, i));
|
|
33
|
+
}, N = d(o.option, {
|
|
34
|
+
[o.active]: t.value === e
|
|
35
35
|
});
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
return /* @__PURE__ */ a(
|
|
37
|
+
C,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
39
|
+
className: N,
|
|
40
40
|
tabIndex: b,
|
|
41
|
-
onClick:
|
|
42
|
-
onMouseEnter:
|
|
43
|
-
onMouseLeave:
|
|
41
|
+
onClick: h,
|
|
42
|
+
onMouseEnter: G,
|
|
43
|
+
onMouseLeave: T,
|
|
44
44
|
children: [
|
|
45
45
|
t.icon || null,
|
|
46
46
|
t.label
|
|
@@ -49,15 +49,15 @@ const j = "_root_1500i_1", k = "_disabled_1500i_6", E = "_descripted_1500i_10",
|
|
|
49
49
|
t.value
|
|
50
50
|
);
|
|
51
51
|
}),
|
|
52
|
-
[
|
|
53
|
-
),
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
52
|
+
[e, i, r, n]
|
|
53
|
+
), x = d(o.root, m, {
|
|
54
|
+
[o.disabled]: g,
|
|
55
|
+
[o.descripted]: c,
|
|
56
|
+
[o.multiline]: f
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
|
|
58
|
+
return /* @__PURE__ */ a("div", { className: x, children: [
|
|
59
|
+
/* @__PURE__ */ u("div", { className: o.options, children: v }),
|
|
60
|
+
c && /* @__PURE__ */ u("div", { className: o.description, children: c })
|
|
61
61
|
] });
|
|
62
62
|
});
|
|
63
63
|
export {
|
package/dist/main.js
CHANGED
|
@@ -33,7 +33,7 @@ import { Decorate as No } from "./components/Decorate/Decorate.js";
|
|
|
33
33
|
import { Dot as Ko } from "./components/Dot/Dot.js";
|
|
34
34
|
import { FLYOUT_OUTLET_ID as wo, Flyout as Go } from "./components/Flyout/Flyout.js";
|
|
35
35
|
import { Logos as Ho } from "./components/Logos/index.js";
|
|
36
|
-
import { I as Wo } from "./cfxIcons-
|
|
36
|
+
import { I as Wo } from "./cfxIcons-BNd1WgpX.js";
|
|
37
37
|
import { I as qo } from "./cfxIconsBig-BLJjMT-Y.js";
|
|
38
38
|
import { Icon as Qo } from "./components/Icon/Icon.js";
|
|
39
39
|
import { IconBig as Zo } from "./components/IconBig/IconBig.js";
|
|
@@ -49,7 +49,7 @@ import { Flex as Ir } from "./components/Layout/Flex/Flex.js";
|
|
|
49
49
|
import { FlexRestricter as Lr } from "./components/Layout/Flex/FlexRestricter.js";
|
|
50
50
|
import { Pad as Br } from "./components/Layout/Pad/Pad.js";
|
|
51
51
|
import { Page as kr } from "./components/Layout/Page/Page.js";
|
|
52
|
-
import { R as yr } from "./Rail-
|
|
52
|
+
import { R as yr } from "./Rail-DcVowhML.js";
|
|
53
53
|
import { Scrollable as br } from "./components/Layout/Scrollable/Scrollable.js";
|
|
54
54
|
import { VirtualScrollable as Or } from "./components/Layout/Scrollable/VirtualScrollable.js";
|
|
55
55
|
import { Loaf as Er } from "./components/Loaf/Loaf.js";
|
|
@@ -357,3 +357,25 @@ $mediaMap: (
|
|
|
357
357
|
@media (min-width: $fix) { @content; }
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
+
|
|
361
|
+
$mpMap: (
|
|
362
|
+
m: margin,
|
|
363
|
+
mt: margin-top,
|
|
364
|
+
mr: margin-right,
|
|
365
|
+
mb: margin-bottom,
|
|
366
|
+
ml: margin-left,
|
|
367
|
+
p: padding,
|
|
368
|
+
pt: padding-top,
|
|
369
|
+
pr: padding-right,
|
|
370
|
+
pb: padding-bottom,
|
|
371
|
+
pl: padding-left,
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
$control-heights: (
|
|
375
|
+
'xxsmall': q(1.5),
|
|
376
|
+
'xsmall': q(3),
|
|
377
|
+
'small': q(4),
|
|
378
|
+
'normal': q(6),
|
|
379
|
+
'large': q(7),
|
|
380
|
+
'xlarge': q(10),
|
|
381
|
+
);
|
|
@@ -42,6 +42,7 @@ a {
|
|
|
42
42
|
color: ui.color-token('anchor-color');
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
text-decoration: underline;
|
|
45
|
+
border-radius: ui.border-radius('xxsmall');
|
|
45
46
|
|
|
46
47
|
@include ui.animated();
|
|
47
48
|
|
|
@@ -51,6 +52,10 @@ a {
|
|
|
51
52
|
&:hover {
|
|
52
53
|
text-decoration-color: ui.color-token('anchor-decoration-color-hover');
|
|
53
54
|
}
|
|
55
|
+
|
|
56
|
+
&:focus-visible:not(:active):not(:hover) {
|
|
57
|
+
box-shadow: 0 0 0 ui.use('anchor-outline-size') ui.color-token('anchor-focus-outline');
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
&[aria-disabled="true"] {
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
@use "ui";
|
|
3
3
|
@import "ui";
|
|
4
4
|
|
|
5
|
-
$mpMap: (
|
|
6
|
-
m: margin,
|
|
7
|
-
mt: margin-top,
|
|
8
|
-
mr: margin-right,
|
|
9
|
-
mb: margin-bottom,
|
|
10
|
-
ml: margin-left,
|
|
11
|
-
p: padding,
|
|
12
|
-
pt: padding-top,
|
|
13
|
-
pr: padding-right,
|
|
14
|
-
pb: padding-bottom,
|
|
15
|
-
pl: padding-left,
|
|
16
|
-
);
|
|
17
|
-
|
|
18
5
|
@mixin mp-tokens() {
|
|
19
|
-
@each $name, $value in
|
|
6
|
+
@each $name, $value in ui.$mediaMap {
|
|
20
7
|
@include media-min($name) {
|
|
21
|
-
@each $mpName, $mpProp in
|
|
8
|
+
@each $mpName, $mpProp in ui.$mpMap {
|
|
22
9
|
[data-#{$mpName}-#{$name}] {
|
|
23
10
|
#{$mpProp}: var(--#{$mpName}-#{$name});
|
|
24
11
|
}
|
|
@@ -32,6 +19,8 @@ $mpMap: (
|
|
|
32
19
|
@include ui.define-color-token('anchor-decoration-color-hover', ui.color('tertiary', $alpha: .5));
|
|
33
20
|
@include ui.define-color-token('anchor-secondary-color', ui.color('secondary'));
|
|
34
21
|
@include ui.define-color-token('anchor-secondary-decoration-color-hover', ui.color('secondary', $alpha: .5));
|
|
22
|
+
@include ui.define-color-token('anchor-focus-outline', ui.color('primary', $alpha: .5));
|
|
23
|
+
@include ui.def('anchor-outline-size', ui.q(.25));
|
|
35
24
|
}
|
|
36
25
|
|
|
37
26
|
@mixin border-radius-tokens() {
|
|
@@ -87,17 +76,8 @@ $mpMap: (
|
|
|
87
76
|
}
|
|
88
77
|
}
|
|
89
78
|
|
|
90
|
-
$control-heights: (
|
|
91
|
-
'xxsmall': ui.q(1.5),
|
|
92
|
-
'xsmall': ui.q(3),
|
|
93
|
-
'small': ui.q(4),
|
|
94
|
-
'normal': ui.q(6),
|
|
95
|
-
'large': ui.q(7),
|
|
96
|
-
'xlarge': ui.q(10),
|
|
97
|
-
);
|
|
98
|
-
|
|
99
79
|
@mixin control-height-tokens() {
|
|
100
|
-
@each $name, $value in
|
|
80
|
+
@each $name, $value in ui.$control-heights {
|
|
101
81
|
@include ui.def('control-height-#{$name}', $value);
|
|
102
82
|
}
|
|
103
83
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfx-dev/ui-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/main.js",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"@radix-ui/react-checkbox": "^1.1.1",
|
|
28
28
|
"@radix-ui/react-select": "^2.1.1",
|
|
29
29
|
"@radix-ui/react-switch": "^1.1.0",
|
|
30
|
-
"@storybook/addons": "^7.6.17",
|
|
31
30
|
"autolinker": "^3.14.3",
|
|
32
31
|
"flag-icons": "^6.1.1",
|
|
33
32
|
"react": "^18.2.0",
|
|
@@ -44,6 +43,7 @@
|
|
|
44
43
|
"@storybook/addon-interactions": "^8.1.5",
|
|
45
44
|
"@storybook/addon-links": "^8.1.5",
|
|
46
45
|
"@storybook/addon-onboarding": "^8.1.5",
|
|
46
|
+
"@storybook/addons": "^7.6.17",
|
|
47
47
|
"@storybook/blocks": "^8.1.5",
|
|
48
48
|
"@storybook/react": "^8.1.5",
|
|
49
49
|
"@storybook/react-vite": "^8.1.5",
|
package/dist/Rail-XT5PwAlx.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import r from "react";
|
|
3
|
-
import { Interactive as C } from "./components/Interactive/Interactive.js";
|
|
4
|
-
import { clsx as v } from "./utils/clsx.js";
|
|
5
|
-
import { clamp01 as b } from "./utils/math.js";
|
|
6
|
-
const P = "_virtual_tl3f9_1", T = "_root_tl3f9_5", R = "_rail_tl3f9_12", M = "_active_tl3f9_12", y = "_scroller_tl3f9_15", z = "_content_tl3f9_26", E = "_thumb_tl3f9_40", a = {
|
|
7
|
-
virtual: P,
|
|
8
|
-
root: T,
|
|
9
|
-
rail: R,
|
|
10
|
-
active: M,
|
|
11
|
-
scroller: y,
|
|
12
|
-
"no-x-scroll": "_no-x-scroll_tl3f9_20",
|
|
13
|
-
"no-y-scroll": "_no-y-scroll_tl3f9_23",
|
|
14
|
-
content: z,
|
|
15
|
-
thumb: E,
|
|
16
|
-
"axis-x": "_axis-x_tl3f9_51",
|
|
17
|
-
"axis-y": "_axis-y_tl3f9_60"
|
|
18
|
-
}, L = {
|
|
19
|
-
pos: 0,
|
|
20
|
-
ratio: 1,
|
|
21
|
-
height: 0,
|
|
22
|
-
offset: 0,
|
|
23
|
-
dragging: !1,
|
|
24
|
-
dragStartAtCursor: 0,
|
|
25
|
-
dragStartAtPos: 0,
|
|
26
|
-
movementMultiplier: 1
|
|
27
|
-
};
|
|
28
|
-
function Y(h) {
|
|
29
|
-
const {
|
|
30
|
-
axis: l,
|
|
31
|
-
pos: s,
|
|
32
|
-
size: o,
|
|
33
|
-
scrollSize: m,
|
|
34
|
-
rootRef: _,
|
|
35
|
-
setRootActive: n,
|
|
36
|
-
minThumbSize: i
|
|
37
|
-
} = h, [x, d] = r.useState(!1), t = r.useRef({ ...L }), e = r.useMemo(() => l === "x" ? {
|
|
38
|
-
sizeCSS: "width",
|
|
39
|
-
offsetCSSTransform: "translateX",
|
|
40
|
-
scrollToSide: "left",
|
|
41
|
-
mousePosAxis: "clientX"
|
|
42
|
-
} : {
|
|
43
|
-
sizeCSS: "height",
|
|
44
|
-
offsetCSSTransform: "translateY",
|
|
45
|
-
scrollToSide: "top",
|
|
46
|
-
mousePosAxis: "clientY"
|
|
47
|
-
}, [l]), p = {
|
|
48
|
-
[e.sizeCSS]: `${t.current.height}px`,
|
|
49
|
-
transform: `${e.offsetCSSTransform}(${t.current.offset}px)`
|
|
50
|
-
}, A = r.useCallback((f) => {
|
|
51
|
-
t.current.dragging = !0, t.current.dragStartAtPos = t.current.pos, t.current.dragStartAtCursor = f[e.mousePosAxis], d(!0), n(!0);
|
|
52
|
-
}, [e.mousePosAxis, n]), c = r.useCallback((f) => {
|
|
53
|
-
var g;
|
|
54
|
-
if (!t.current.dragging)
|
|
55
|
-
return;
|
|
56
|
-
const w = f[e.mousePosAxis] - t.current.dragStartAtCursor;
|
|
57
|
-
(g = _.current) == null || g.scrollTo({
|
|
58
|
-
[e.scrollToSide]: t.current.dragStartAtPos + w * t.current.movementMultiplier,
|
|
59
|
-
behavior: "auto"
|
|
60
|
-
});
|
|
61
|
-
}, [e.mousePosAxis, e.scrollToSide, _]), u = r.useCallback(() => {
|
|
62
|
-
t.current.dragging && (t.current.dragging = !1, d(!1), n(!1));
|
|
63
|
-
}, [n]);
|
|
64
|
-
return r.useEffect(() => {
|
|
65
|
-
t.current.pos = s, t.current.ratio = b(o / m), t.current.height = o * t.current.ratio, t.current.offset = s * t.current.ratio, t.current.height < i && (t.current.height = i, t.current.offset = s * t.current.ratio * ((o - i) / o)), t.current.movementMultiplier = 1 / t.current.ratio;
|
|
66
|
-
}, [i, s, m, o]), r.useEffect(() => (window.addEventListener("mousemove", c), window.addEventListener("mouseup", u), () => {
|
|
67
|
-
window.removeEventListener("mousemove", c), window.removeEventListener("mouseup", u);
|
|
68
|
-
}), [c, u]), /* @__PURE__ */ S("div", { className: v(a.rail, a[`axis-${l}`]), children: /* @__PURE__ */ S(
|
|
69
|
-
C,
|
|
70
|
-
{
|
|
71
|
-
showPointer: !1,
|
|
72
|
-
style: p,
|
|
73
|
-
className: v(a.thumb, { [a.active]: x }),
|
|
74
|
-
onMouseDown: A
|
|
75
|
-
}
|
|
76
|
-
) });
|
|
77
|
-
}
|
|
78
|
-
export {
|
|
79
|
-
Y as R,
|
|
80
|
-
a as s
|
|
81
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import r from "./components/Icons/cfx-icons/Close.js";
|
|
2
|
-
import o from "./components/Icons/cfx-icons/Controller.js";
|
|
3
|
-
import m from "./components/Icons/cfx-icons/Copy.js";
|
|
4
|
-
import t from "./components/Icons/cfx-icons/DownArrow.js";
|
|
5
|
-
import i from "./components/Icons/cfx-icons/DownChevron.js";
|
|
6
|
-
import p from "./components/Icons/cfx-icons/Download.js";
|
|
7
|
-
import f from "./components/Icons/cfx-icons/Expand.js";
|
|
8
|
-
import e from "./components/Icons/cfx-icons/ExternalLink.js";
|
|
9
|
-
import n from "./components/Icons/cfx-icons/Heart.js";
|
|
10
|
-
import l from "./components/Icons/cfx-icons/HeartFilled.js";
|
|
11
|
-
import a from "./components/Icons/cfx-icons/Help.js";
|
|
12
|
-
import s from "./components/Icons/cfx-icons/LeftArrow.js";
|
|
13
|
-
import h from "./components/Icons/cfx-icons/LeftChevron.js";
|
|
14
|
-
import c from "./components/Icons/cfx-icons/Map.js";
|
|
15
|
-
import u from "./components/Icons/cfx-icons/Menu.js";
|
|
16
|
-
import C from "./components/Icons/cfx-icons/Minus.js";
|
|
17
|
-
import d from "./components/Icons/cfx-icons/More.js";
|
|
18
|
-
import w from "./components/Icons/cfx-icons/MoreInfo.js";
|
|
19
|
-
import S from "./components/Icons/cfx-icons/Pencil.js";
|
|
20
|
-
import y from "./components/Icons/cfx-icons/Play.js";
|
|
21
|
-
import M from "./components/Icons/cfx-icons/Plus.js";
|
|
22
|
-
import b from "./components/Icons/cfx-icons/Refresh.js";
|
|
23
|
-
import g from "./components/Icons/cfx-icons/RightArrow.js";
|
|
24
|
-
import v from "./components/Icons/cfx-icons/RightChevron.js";
|
|
25
|
-
import U from "./components/Icons/cfx-icons/Search.js";
|
|
26
|
-
import A from "./components/Icons/cfx-icons/Sort.js";
|
|
27
|
-
import P from "./components/Icons/cfx-icons/Square.js";
|
|
28
|
-
import T from "./components/Icons/cfx-icons/SquareCheck.js";
|
|
29
|
-
import _ from "./components/Icons/cfx-icons/Stop.js";
|
|
30
|
-
import k from "./components/Icons/cfx-icons/Tick.js";
|
|
31
|
-
import x from "./components/Icons/cfx-icons/Transfer.js";
|
|
32
|
-
import D from "./components/Icons/cfx-icons/Trash.js";
|
|
33
|
-
import H from "./components/Icons/cfx-icons/Undo.js";
|
|
34
|
-
import I from "./components/Icons/cfx-icons/UpArrow.js";
|
|
35
|
-
import L from "./components/Icons/cfx-icons/UpChevron.js";
|
|
36
|
-
import O from "./components/Icons/cfx-icons/Upload.js";
|
|
37
|
-
import R from "./components/Icons/cfx-icons/Users.js";
|
|
38
|
-
import j from "./components/Icons/cfx-icons/Visibility.js";
|
|
39
|
-
import q from "./components/Icons/cfx-icons/VisibilityOff.js";
|
|
40
|
-
import E from "./components/Icons/cfx-icons/Warning.js";
|
|
41
|
-
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
|
-
__proto__: null,
|
|
43
|
-
Close: r,
|
|
44
|
-
Controller: o,
|
|
45
|
-
Copy: m,
|
|
46
|
-
DownArrow: t,
|
|
47
|
-
DownChevron: i,
|
|
48
|
-
Download: p,
|
|
49
|
-
Expand: f,
|
|
50
|
-
ExternalLink: e,
|
|
51
|
-
Heart: n,
|
|
52
|
-
HeartFilled: l,
|
|
53
|
-
Help: a,
|
|
54
|
-
LeftArrow: s,
|
|
55
|
-
LeftChevron: h,
|
|
56
|
-
Map: c,
|
|
57
|
-
Menu: u,
|
|
58
|
-
Minus: C,
|
|
59
|
-
More: d,
|
|
60
|
-
MoreInfo: w,
|
|
61
|
-
Pencil: S,
|
|
62
|
-
Play: y,
|
|
63
|
-
Plus: M,
|
|
64
|
-
Refresh: b,
|
|
65
|
-
RightArrow: g,
|
|
66
|
-
RightChevron: v,
|
|
67
|
-
Search: U,
|
|
68
|
-
Sort: A,
|
|
69
|
-
Square: P,
|
|
70
|
-
SquareCheck: T,
|
|
71
|
-
Stop: _,
|
|
72
|
-
Tick: k,
|
|
73
|
-
Transfer: x,
|
|
74
|
-
Trash: D,
|
|
75
|
-
Undo: H,
|
|
76
|
-
UpArrow: I,
|
|
77
|
-
UpChevron: L,
|
|
78
|
-
Upload: O,
|
|
79
|
-
Users: R,
|
|
80
|
-
Visibility: j,
|
|
81
|
-
VisibilityOff: q,
|
|
82
|
-
Warning: E
|
|
83
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
84
|
-
export {
|
|
85
|
-
Pr as I
|
|
86
|
-
};
|