@cfx-dev/ui-components 4.2.4 → 4.2.6
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/components/DropdownSelect/DropdownSelect.d.ts +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +519 -518
- package/dist/components/Layout/Flex/Flex.d.ts +2 -1
- package/dist/components/Layout/Flex/Flex.js +36 -32
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +261 -260
- package/package.json +1 -1
|
@@ -15,10 +15,11 @@ export interface FlexProps extends BoxProps {
|
|
|
15
15
|
direction?: ResponsiveValueType<FlexDirectionType>;
|
|
16
16
|
alignItems?: ResponsiveValueType<FlexAlignItemsType>;
|
|
17
17
|
justifyContent?: ResponsiveValueType<FlexJustifyContentType>;
|
|
18
|
-
wrap?: ResponsiveValueType<FlexWrapType>;
|
|
18
|
+
wrap?: ResponsiveValueType<FlexWrapType | boolean>;
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
+
export declare function flexWrapResponsiveFormatter(val: FlexWrapType | boolean): string;
|
|
22
23
|
declare const FlexComponentReffed: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
24
|
type FlexType = typeof FlexComponentReffed & {
|
|
24
25
|
Restricted: React.FC<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { Box as y } from "../Box/Box.js";
|
|
4
4
|
import { ui as s } from "../../ui.js";
|
|
@@ -23,37 +23,40 @@ const j = "cfxui__Flex__root__d860a", z = "cfxui__Flex__centered__e911c", N = "c
|
|
|
23
23
|
stretch: O,
|
|
24
24
|
horizontal: T
|
|
25
25
|
};
|
|
26
|
-
function A(
|
|
26
|
+
function A(t) {
|
|
27
|
+
return t == null ? "" : typeof t == "boolean" ? t ? "wrap" : "nowrap" : t.toString();
|
|
28
|
+
}
|
|
29
|
+
function I(t, r) {
|
|
27
30
|
const {
|
|
28
|
-
centered:
|
|
31
|
+
centered: i = !1,
|
|
29
32
|
vertical: x = !1,
|
|
30
33
|
reverseOrder: p = !1,
|
|
31
34
|
stretch: u = !1,
|
|
32
35
|
spaceBetween: g = !1,
|
|
33
36
|
alignToEnd: m = !1,
|
|
34
37
|
alignToEndAxis: F = !1,
|
|
35
|
-
children:
|
|
36
|
-
className:
|
|
37
|
-
gap:
|
|
38
|
-
direction:
|
|
39
|
-
alignItems:
|
|
38
|
+
children: b,
|
|
39
|
+
className: h,
|
|
40
|
+
gap: n,
|
|
41
|
+
direction: _,
|
|
42
|
+
alignItems: o,
|
|
40
43
|
justifyContent: a,
|
|
41
44
|
wrap: l,
|
|
42
|
-
...
|
|
43
|
-
} =
|
|
45
|
+
...v
|
|
46
|
+
} = t, R = C(
|
|
44
47
|
e.root,
|
|
45
|
-
|
|
46
|
-
s.getResponsiveClassnames("gap",
|
|
47
|
-
s.getResponsiveClassnames("flex-direction",
|
|
48
|
-
s.getResponsiveClassnames("align-items",
|
|
48
|
+
h,
|
|
49
|
+
s.getResponsiveClassnames("gap", n),
|
|
50
|
+
s.getResponsiveClassnames("flex-direction", _),
|
|
51
|
+
s.getResponsiveClassnames("align-items", o),
|
|
49
52
|
s.getResponsiveClassnames("justify-content", a),
|
|
50
53
|
s.getResponsiveClassnames("flex-wrap", l),
|
|
51
54
|
{
|
|
52
|
-
[e.centered]:
|
|
53
|
-
[e["centered-axis"]]:
|
|
54
|
-
[e["centered-cross-axis"]]:
|
|
55
|
-
[e["baseline-axis"]]:
|
|
56
|
-
[e["baseline-cross-axis"]]:
|
|
55
|
+
[e.centered]: i === !0,
|
|
56
|
+
[e["centered-axis"]]: i === "axis",
|
|
57
|
+
[e["centered-cross-axis"]]: i === "cross-axis",
|
|
58
|
+
[e["baseline-axis"]]: i === "baseline-axis",
|
|
59
|
+
[e["baseline-cross-axis"]]: i === "baseline-cross-axis",
|
|
57
60
|
[e.vertical]: x,
|
|
58
61
|
[e.horizontal]: !x,
|
|
59
62
|
[e.stretch]: u,
|
|
@@ -63,29 +66,30 @@ function A(c, _) {
|
|
|
63
66
|
[e["reverse-order"]]: p
|
|
64
67
|
}
|
|
65
68
|
), w = d.useMemo(() => ({
|
|
66
|
-
...s.getOffsetStyles("gap",
|
|
67
|
-
...s.getResponsiveStyles("flex-direction",
|
|
68
|
-
...s.getResponsiveStyles("align-items",
|
|
69
|
+
...s.getOffsetStyles("gap", n),
|
|
70
|
+
...s.getResponsiveStyles("flex-direction", _),
|
|
71
|
+
...s.getResponsiveStyles("align-items", o),
|
|
69
72
|
...s.getResponsiveStyles("justify-content", a),
|
|
70
|
-
...s.getResponsiveStyles("flex-wrap", l)
|
|
71
|
-
}), [
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
+
...s.getResponsiveStyles("flex-wrap", l, A)
|
|
74
|
+
}), [n, _, o, a, l]);
|
|
75
|
+
return /* @__PURE__ */ c(
|
|
73
76
|
y,
|
|
74
77
|
{
|
|
75
|
-
ref:
|
|
78
|
+
ref: r,
|
|
76
79
|
className: R,
|
|
77
80
|
style: w,
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
81
|
+
...v,
|
|
82
|
+
children: b
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
85
|
}
|
|
83
|
-
const
|
|
86
|
+
const M = d.forwardRef(I), f = M;
|
|
84
87
|
f.Restricted = function({
|
|
85
|
-
children:
|
|
88
|
+
children: r
|
|
86
89
|
}) {
|
|
87
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ c(f, { children: /* @__PURE__ */ c(S, { children: r }) });
|
|
88
91
|
};
|
|
89
92
|
export {
|
|
90
|
-
f as Flex
|
|
93
|
+
f as Flex,
|
|
94
|
+
A as flexWrapResponsiveFormatter
|
|
91
95
|
};
|
|
@@ -8,5 +8,5 @@ export interface SliderProps extends RadixSlider.SliderProps {
|
|
|
8
8
|
maxLabel?: string | number;
|
|
9
9
|
trackClassName?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const Slider: React.
|
|
11
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
12
12
|
export default Slider;
|