@cfx-dev/ui-components 5.0.32 → 5.0.34
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/CarouselControls-Be1j-jxr.js +42 -0
- package/dist/{DropdownContent-DCqFWnzj.js → DropdownContent-Cxs3Wve5.js} +1 -1
- package/dist/assets/css/CarouselControls.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/css/StyledInput.css +1 -1
- package/dist/assets/css/Title.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Carousel/Carousel.js +32 -32
- package/dist/components/Carousel/CarouselControls.js +1 -1
- package/dist/components/Carousel/CarouselShowcase.js +1 -1
- package/dist/components/Carousel/index.js +1 -1
- package/dist/components/DropdownContent/DropdownContent.js +1 -1
- package/dist/components/DropdownContent/index.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/main.js +1 -1
- package/dist/styles-scss/_ui.scss +4 -0
- package/dist/utils/ui/ui.types.d.ts +3 -1
- package/dist/utils/ui/ui.types.js +7 -7
- package/package.json +1 -1
- package/dist/CarouselControls-CJ3tupLr.js +0 -41
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import H, { useMemo as J, useState as K, useCallback as Q, useEffect as L } from "react";
|
|
3
3
|
import { Dot as O } from "../Dot/Dot.js";
|
|
4
|
-
import
|
|
5
|
-
import { clsx as
|
|
4
|
+
import i from "../Flex/Flex.js";
|
|
5
|
+
import { clsx as m } from "../../utils/clsx.js";
|
|
6
6
|
import "../../utils/contexts/MediaQueryContext/MediaQueryContext.js";
|
|
7
7
|
import "../../utils/contexts/MediaQueryContext/MediaQueryContextProvider.js";
|
|
8
8
|
import U from "../../utils/contexts/MediaQueryContext/useMediaQuery.js";
|
|
9
9
|
import { useCarousel as W } from "../../utils/hooks/useCarousel.js";
|
|
10
|
-
import { s as
|
|
10
|
+
import { s as n, C as X } from "../../CarouselControls-Be1j-jxr.js";
|
|
11
11
|
import Y from "./CarouselItem.js";
|
|
12
12
|
function R({
|
|
13
|
-
showDots:
|
|
14
|
-
pageCount:
|
|
13
|
+
showDots: a = !1,
|
|
14
|
+
pageCount: f,
|
|
15
15
|
currentPage: t,
|
|
16
16
|
onPageChange: o,
|
|
17
|
-
controlsClassName:
|
|
18
|
-
controlsRootClassName:
|
|
17
|
+
controlsClassName: d,
|
|
18
|
+
controlsRootClassName: p
|
|
19
19
|
}) {
|
|
20
|
-
return
|
|
21
|
-
|
|
20
|
+
return f <= 1 ? null : /* @__PURE__ */ h(i, { gap: 2, centered: !0, className: m(n.controls, p), children: [
|
|
21
|
+
a && /* @__PURE__ */ s(i, { centered: !0, gap: 1, children: Array.from({ length: f }).map((y, c) => /* @__PURE__ */ s(
|
|
22
22
|
O,
|
|
23
23
|
{
|
|
24
|
-
className:
|
|
24
|
+
className: n.dots,
|
|
25
25
|
color: c === t ? "primary" : "secondary",
|
|
26
26
|
opacity: c === t ? 1 : 0.2
|
|
27
27
|
},
|
|
@@ -31,21 +31,21 @@ function R({
|
|
|
31
31
|
X,
|
|
32
32
|
{
|
|
33
33
|
currentPage: t,
|
|
34
|
-
pageCount:
|
|
34
|
+
pageCount: f,
|
|
35
35
|
onPageChange: o,
|
|
36
|
-
className:
|
|
36
|
+
className: d
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
] });
|
|
40
40
|
}
|
|
41
41
|
function Z({
|
|
42
|
-
items:
|
|
43
|
-
ImageComponent:
|
|
42
|
+
items: a,
|
|
43
|
+
ImageComponent: f,
|
|
44
44
|
visibleItems: t = 4,
|
|
45
45
|
onItemClick: o,
|
|
46
|
-
showControlsBottom:
|
|
47
|
-
showControlsTop:
|
|
48
|
-
skipFirstItem:
|
|
46
|
+
showControlsBottom: d = !1,
|
|
47
|
+
showControlsTop: p = !1,
|
|
48
|
+
skipFirstItem: y = !1,
|
|
49
49
|
controlsClassName: c,
|
|
50
50
|
controlsRootClassName: S,
|
|
51
51
|
text: x,
|
|
@@ -54,22 +54,22 @@ function Z({
|
|
|
54
54
|
className: $,
|
|
55
55
|
rootClassName: q,
|
|
56
56
|
headerClassName: w,
|
|
57
|
-
currentPage:
|
|
57
|
+
currentPage: N,
|
|
58
58
|
onPageChange: l
|
|
59
59
|
}) {
|
|
60
60
|
const {
|
|
61
61
|
isMobile: T,
|
|
62
62
|
isTablet: j
|
|
63
|
-
} = U(), _ = J(() => typeof t == "number" ? t : T ? t.mobile : j ? t.tablet : t.desktop, [t, T, j]), z =
|
|
63
|
+
} = U(), _ = J(() => typeof t == "number" ? t : T ? t.mobile : j ? t.tablet : t.desktop, [t, T, j]), z = y ? a.slice(1) : a, b = Math.ceil(z.length / _), {
|
|
64
64
|
carouselRef: A,
|
|
65
65
|
carouselApi: e
|
|
66
66
|
} = W({
|
|
67
67
|
slidesToScroll: _
|
|
68
|
-
}), [D, B] = K(0), E =
|
|
68
|
+
}), [D, B] = K(0), E = N ?? D, F = Q(
|
|
69
69
|
(r) => {
|
|
70
|
-
e == null || e.scrollTo(r), l == null || l(r),
|
|
70
|
+
e == null || e.scrollTo(r), l == null || l(r), N == null && B(r);
|
|
71
71
|
},
|
|
72
|
-
[e, l,
|
|
72
|
+
[e, l, N]
|
|
73
73
|
), G = Q(
|
|
74
74
|
(r) => {
|
|
75
75
|
o == null || o(r);
|
|
@@ -80,16 +80,16 @@ function Z({
|
|
|
80
80
|
if (!e)
|
|
81
81
|
return;
|
|
82
82
|
const r = () => {
|
|
83
|
-
const
|
|
84
|
-
B(
|
|
83
|
+
const u = e.selectedScrollSnap();
|
|
84
|
+
B(u), l == null || l(u);
|
|
85
85
|
};
|
|
86
86
|
return e.on("select", r), e.on("reInit", r), () => {
|
|
87
87
|
e.off("select", r), e.off("reInit", r);
|
|
88
88
|
};
|
|
89
|
-
}, [e, l]), /* @__PURE__ */
|
|
90
|
-
x && /* @__PURE__ */
|
|
89
|
+
}, [e, l]), /* @__PURE__ */ h("div", { className: m(n.root, q), children: [
|
|
90
|
+
x && /* @__PURE__ */ h(i, { spaceBetween: !0, alignItems: "center", className: w, children: [
|
|
91
91
|
/* @__PURE__ */ s("span", { children: x }),
|
|
92
|
-
|
|
92
|
+
p && /* @__PURE__ */ s(
|
|
93
93
|
R,
|
|
94
94
|
{
|
|
95
95
|
showDots: M,
|
|
@@ -101,16 +101,16 @@ function Z({
|
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
103
|
] }),
|
|
104
|
-
/* @__PURE__ */ s("div", { className:
|
|
104
|
+
/* @__PURE__ */ s("div", { className: m(n.carousel, $), ref: A, children: /* @__PURE__ */ s(i, { className: m(n.carouselTrack, V), gap: 1, children: a.map((r, u) => u === 0 && y ? null : /* @__PURE__ */ s("div", { className: n.carouselItem, children: /* @__PURE__ */ s(
|
|
105
105
|
Y,
|
|
106
106
|
{
|
|
107
|
-
index:
|
|
107
|
+
index: u,
|
|
108
108
|
item: r,
|
|
109
109
|
onClick: G,
|
|
110
|
-
ImageComponent:
|
|
110
|
+
ImageComponent: f
|
|
111
111
|
}
|
|
112
112
|
) }, r.id)) }) }),
|
|
113
|
-
|
|
113
|
+
d && /* @__PURE__ */ s(i, { justifyContent: "flex-end", children: /* @__PURE__ */ s(
|
|
114
114
|
R,
|
|
115
115
|
{
|
|
116
116
|
showDots: M,
|
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../Flex/Flex.js";
|
|
3
3
|
import "../../utils/clsx.js";
|
|
4
4
|
import "../IconButton/IconButton.js";
|
|
5
|
-
import { C as a } from "../../CarouselControls-
|
|
5
|
+
import { C as a } from "../../CarouselControls-Be1j-jxr.js";
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as d, useCallback as r } from "react";
|
|
3
3
|
import l from "../Flex/Flex.js";
|
|
4
4
|
import u from "./Carousel.js";
|
|
5
|
-
import { s as c } from "../../CarouselControls-
|
|
5
|
+
import { s as c } from "../../CarouselControls-Be1j-jxr.js";
|
|
6
6
|
const g = [
|
|
7
7
|
{
|
|
8
8
|
id: "1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { R as D, T as W, D as C } from "../../DropdownContent-
|
|
2
|
+
import { R as D, T as W, D as C } from "../../DropdownContent-Cxs3Wve5.js";
|
|
3
3
|
import a, { useRef as R, useState as v, useEffect as b } from "react";
|
|
4
4
|
import N from "../Flex/Flex.js";
|
|
5
5
|
import { clsx as T } from "../../utils/clsx.js";
|
package/dist/main.js
CHANGED
|
@@ -46,7 +46,7 @@ import { Avatar as Do } from "./components/Avatar/Avatar.js";
|
|
|
46
46
|
import { BACKDROP_OUTLET_ID as Oo, default as ko } from "./components/BackdropPortal/BackdropPortal.js";
|
|
47
47
|
import { Badge as bo } from "./components/Badge/Badge.js";
|
|
48
48
|
import { default as Mo } from "./components/Carousel/Carousel.js";
|
|
49
|
-
import { C as vo } from "./CarouselControls-
|
|
49
|
+
import { C as vo } from "./CarouselControls-Be1j-jxr.js";
|
|
50
50
|
import { default as Uo } from "./components/ControlBox/ControlBox.js";
|
|
51
51
|
import { default as wo } from "./components/Decorate/Decorate.js";
|
|
52
52
|
import { Dot as Ko } from "./components/Dot/Dot.js";
|
|
@@ -443,6 +443,10 @@ $zindexMap: (
|
|
|
443
443
|
'second': 2,
|
|
444
444
|
'flyout': 1000,
|
|
445
445
|
'max': 9000,
|
|
446
|
+
// Select's content should be above everything except Title
|
|
447
|
+
'select': 9099,
|
|
448
|
+
// Titles must be above everything
|
|
449
|
+
'title': 9100,
|
|
446
450
|
);
|
|
447
451
|
|
|
448
452
|
@function zindex($index) {
|
|
@@ -51,7 +51,9 @@ export declare enum ZIndexEnum {
|
|
|
51
51
|
zero = "zero",
|
|
52
52
|
first = "first",
|
|
53
53
|
second = "second",
|
|
54
|
-
max = "max"
|
|
54
|
+
max = "max",
|
|
55
|
+
select = "select",
|
|
56
|
+
title = "title"
|
|
55
57
|
}
|
|
56
58
|
export type ZIndexType = keyof typeof ZIndexEnum;
|
|
57
59
|
export type ResponsiveValueType<T = string | number> = T | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var a = /* @__PURE__ */ ((l) => (l.accent = "accent", l.primary = "primary", l.secondary = "secondary", l.tertiary = "tertiary", l.green = "green", l.yellow = "yellow", l.red = "red", l.argentum = "argentum", l.aurum = "aurum", l.platinum = "platinum", l.bg = "bg", l["bg-light"] = "bg-light", l["bg-dark"] = "bg-dark", l["bg-dark-grey"] = "bg-dark-grey", l["bg-black"] = "bg-black", l))(a || {}), x = /* @__PURE__ */ ((l) => (l.xxxsmall = "xxxsmall", l.xxsmall = "xxsmall", l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.xxlarge = "xxlarge", l.xxxlarge = "xxxlarge", l.xxxxlarge = "xxxxlarge", l))(x || {}), s = /* @__PURE__ */ ((l) => (l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l))(s || {}), r = /* @__PURE__ */ ((l) => (l.none = "none", l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.pill = "pill", l))(r || {}),
|
|
2
|
-
const
|
|
1
|
+
var a = /* @__PURE__ */ ((l) => (l.accent = "accent", l.primary = "primary", l.secondary = "secondary", l.tertiary = "tertiary", l.green = "green", l.yellow = "yellow", l.red = "red", l.argentum = "argentum", l.aurum = "aurum", l.platinum = "platinum", l.bg = "bg", l["bg-light"] = "bg-light", l["bg-dark"] = "bg-dark", l["bg-dark-grey"] = "bg-dark-grey", l["bg-black"] = "bg-black", l))(a || {}), x = /* @__PURE__ */ ((l) => (l.xxxsmall = "xxxsmall", l.xxsmall = "xxsmall", l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.xxlarge = "xxlarge", l.xxxlarge = "xxxlarge", l.xxxxlarge = "xxxxlarge", l))(x || {}), s = /* @__PURE__ */ ((l) => (l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l))(s || {}), r = /* @__PURE__ */ ((l) => (l.none = "none", l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.pill = "pill", l))(r || {}), e = /* @__PURE__ */ ((l) => (l.zero = "zero", l.first = "first", l.second = "second", l.max = "max", l.select = "select", l.title = "title", l))(e || {}), g = /* @__PURE__ */ ((l) => (l.none = "none", l.hairthin = "hairthin", l.thin = "thin", l.xxsmall = "xxsmall", l.xsmall = "xsmall", l.small = "small", l.normal = "normal", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.safezone = "safezone", l))(g || {}), t = /* @__PURE__ */ ((l) => (l.xxsmall = "xxsmall", l.xsmall = "xsmall", l.small = "small", l.medium = "medium", l.large = "large", l.xlarge = "xlarge", l.xxlarge = "xxlarge", l.xxxlarge = "xxxlarge", l.xxxxlarge = "xxxxlarge", l.xxxxxlarge = "xxxxxlarge", l))(t || {}), p = /* @__PURE__ */ ((l) => (l.sp25 = "sp25", l.sp100 = "sp100", l.sp110 = "sp110", l.sp150 = "sp150", l.sp175 = "sp175", l.sp200 = "sp200", l.sp250 = "sp250", l.sp300 = "sp300", l.sp400 = "sp400", l.sp450 = "sp450", l.sp600 = "sp600", l.sp700 = "sp700", l.sp800 = "sp800", l.sp900 = "sp900", l.sp1000 = "sp1000", l.sp1200 = "sp1200", l.sp1600 = "sp1600", l.sp2400 = "sp2400", l))(p || {}), b = /* @__PURE__ */ ((l) => (l.initial = "initial", l.small = "small", l["small-medium"] = "small-medium", l.medium = "medium", l["medium-large"] = "medium-large", l.large = "large", l.xlarge = "xlarge", l))(b || {});
|
|
2
|
+
const v = {
|
|
3
3
|
initial: 0,
|
|
4
4
|
small: 360,
|
|
5
5
|
"small-medium": 640,
|
|
@@ -13,10 +13,10 @@ export {
|
|
|
13
13
|
a as ColorEnum,
|
|
14
14
|
s as IconSizeEnum,
|
|
15
15
|
b as MediaQueryEnum,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
v as MediaQueryValuesMap,
|
|
17
|
+
g as OffsetEnum,
|
|
18
|
+
t as SpacerEnum,
|
|
19
|
+
p as SpacingEnum,
|
|
20
20
|
x as TextSizeEnum,
|
|
21
|
-
|
|
21
|
+
e as ZIndexEnum
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import _ from "./components/Flex/Flex.js";
|
|
3
|
-
import { clsx as t } from "./utils/clsx.js";
|
|
4
|
-
import c from "./components/IconButton/IconButton.js";
|
|
5
|
-
const u = "cfxui__Carousel__carousel__5a3d0", i = "cfxui__Carousel__carouselItem__39b03", n = "cfxui__Carousel__carouselTrack__bda11", m = "cfxui__Carousel__controls__afa33", f = {
|
|
6
|
-
carousel: u,
|
|
7
|
-
carouselItem: i,
|
|
8
|
-
carouselTrack: n,
|
|
9
|
-
controls: m
|
|
10
|
-
};
|
|
11
|
-
function p({
|
|
12
|
-
currentPage: o,
|
|
13
|
-
pageCount: l,
|
|
14
|
-
onPageChange: s,
|
|
15
|
-
className: e
|
|
16
|
-
}) {
|
|
17
|
-
return /* @__PURE__ */ a(_, { alignToEnd: !0, className: t(f.controls, e), children: [
|
|
18
|
-
/* @__PURE__ */ r(
|
|
19
|
-
c,
|
|
20
|
-
{
|
|
21
|
-
onClick: () => s(o - 1),
|
|
22
|
-
disabled: o <= 0,
|
|
23
|
-
name: "LeftChevron",
|
|
24
|
-
size: "medium"
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
c,
|
|
29
|
-
{
|
|
30
|
-
onClick: () => s(o + 1),
|
|
31
|
-
disabled: o >= l - 1,
|
|
32
|
-
name: "RightChevron",
|
|
33
|
-
size: "medium"
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
] });
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
p as C,
|
|
40
|
-
f as s
|
|
41
|
-
};
|