@cfx-dev/ui-components 4.0.1 → 4.1.1
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/{Combination-BRUj3CHE.js → Combination-Cbiw1XRb.js} +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/RichInput.css +1 -1
- package/dist/assets/css/Select.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Accordion/Accordion.js +18 -17
- package/dist/components/Accordion/AccordionShowcase.js +3 -2
- package/dist/components/Avatar/AvatarShowcase.js +3 -2
- package/dist/components/Badge/BadgeShowcase.js +5 -4
- package/dist/components/Button/ButtonShowcase.js +3 -2
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +4 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +783 -755
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +11 -10
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Icon/Icon.d.ts +4 -3
- package/dist/components/Icon/Icon.js +27 -25
- package/dist/components/IconBig/IconBig.js +3 -2
- package/dist/components/InfoPanel/InfoPanelShowcase.js +11 -10
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Input/Input.js +96 -75
- package/dist/components/Input/InputShowcase.js +6 -5
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +60 -43
- package/dist/components/Layout/Box/Box.d.ts +4 -11
- package/dist/components/Layout/Box/Box.js +58 -96
- package/dist/components/Layout/Flex/Flex.d.ts +7 -3
- package/dist/components/Layout/Flex/Flex.js +70 -62
- package/dist/components/Layout/Flex/Flex.types.d.ts +42 -0
- package/dist/components/Layout/Flex/Flex.types.js +7 -0
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -0
- package/dist/components/Link/LinkShowcase.js +1 -0
- package/dist/components/Logos/LogosShowcase.js +3 -2
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Select/Select.d.ts +2 -3
- package/dist/components/Select/Select.js +1922 -7
- package/dist/components/Select/SelectShowcase.js +4 -3
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.js +2 -3
- package/dist/components/Separator/Separator.d.ts +2 -2
- package/dist/components/Separator/Separator.js +35 -25
- package/dist/components/Skeleton/Skeleton.d.ts +7 -6
- package/dist/components/Skeleton/Skeleton.js +35 -22
- package/dist/components/Skeleton/SkeletonShowcase.js +14 -13
- package/dist/components/Slider/Slider.js +11 -9
- package/dist/components/Slider/SliderShowcase.js +10 -9
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Table/Table.js +3 -2
- package/dist/components/Table/TableShowcase.js +7 -6
- package/dist/components/Tabular/TabularShowcase.js +3 -2
- package/dist/components/Text/Text.d.ts +3 -1
- package/dist/components/Text/Text.js +61 -52
- package/dist/components/Text/Text.types.d.ts +4 -13
- package/dist/components/Text/Text.types.js +1 -4
- package/dist/components/Text/index.d.ts +3 -2
- package/dist/components/Text/index.js +9 -6
- package/dist/components/Title/TitleShowcase.js +4 -3
- package/dist/components/ui.d.ts +45 -12
- package/dist/components/ui.js +64 -55
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-ByaXH_ih.js +10 -0
- package/dist/index-Cf5Yu9oD.js +67 -0
- package/dist/index-DBus3GoO.js +1342 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +14 -14
- package/dist/{medium-JVtzoF2c.js → medium-BA3EQDZW.js} +2 -2
- package/dist/styles-scss/_ui.scss +10 -1
- package/dist/styles-scss/global.scss +39 -25
- package/dist/styles-scss/themes/theme_cfx.scss +2 -0
- package/dist/styles-scss/themes/theme_fivem.scss +2 -0
- package/dist/styles-scss/themes/theme_redm.scss +2 -0
- package/dist/styles-scss/themes/theme_wireframe.scss +2 -0
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +28 -15
- package/package.json +1 -1
- package/dist/Select-Ds-fm4CN.js +0 -3245
- package/dist/index-BCnz73Lm.js +0 -72
- package/dist/index-BW3WdIgK.js +0 -14
- package/dist/types/Offset.d.ts +0 -1
- package/dist/types/Offset.js +0 -1
|
@@ -2,7 +2,8 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "react";
|
|
3
3
|
import { Flex as a } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as i } from "../Text/Text.js";
|
|
5
|
-
import
|
|
5
|
+
import "../ui.js";
|
|
6
|
+
import { Select as n } from "./Select.js";
|
|
6
7
|
const t = [
|
|
7
8
|
{
|
|
8
9
|
value: "value",
|
|
@@ -115,7 +116,7 @@ function d() {
|
|
|
115
116
|
] })
|
|
116
117
|
] });
|
|
117
118
|
}
|
|
118
|
-
const
|
|
119
|
+
const b = o.memo(d);
|
|
119
120
|
export {
|
|
120
|
-
|
|
121
|
+
b as default
|
|
121
122
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Select
|
|
1
|
+
export { Select } from './Select';
|
|
2
2
|
export type { SelectProps, SelectOption } from './Select';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { OffsetType } from '
|
|
2
|
+
import { MPProps, OffsetType } from '../ui';
|
|
3
3
|
|
|
4
|
-
export interface SeparatorProps {
|
|
4
|
+
export interface SeparatorProps extends MPProps {
|
|
5
5
|
thin?: boolean;
|
|
6
6
|
vertical?: boolean;
|
|
7
7
|
content?: React.ReactNode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { ui as s } from "../ui.js";
|
|
4
|
+
import { clsx as x } from "../../utils/clsx.js";
|
|
5
|
+
const m = "cfxui__Separator__root__3aea3", u = "cfxui__Separator__separator__5dbbd", d = "cfxui__Separator__content__7ade9", S = "cfxui__Separator__thin__628fd", h = "cfxui__Separator__vertical__8bd90", v = "cfxui__Separator__text__d02da", a = {
|
|
6
|
+
root: m,
|
|
5
7
|
"separator-offset-none": "cfxui__Separator__separator-offset-none__f2b70",
|
|
6
8
|
"separator-offset-hairthin": "cfxui__Separator__separator-offset-hairthin__56e9d",
|
|
7
9
|
"separator-offset-thin": "cfxui__Separator__separator-offset-thin__36d86",
|
|
@@ -13,29 +15,37 @@ const i = "cfxui__Separator__root__3aea3", n = "cfxui__Separator__separator__5db
|
|
|
13
15
|
"separator-offset-large": "cfxui__Separator__separator-offset-large__918a2",
|
|
14
16
|
"separator-offset-xlarge": "cfxui__Separator__separator-offset-xlarge__01c53",
|
|
15
17
|
"separator-offset-safezone": "cfxui__Separator__separator-offset-safezone__d28af",
|
|
16
|
-
separator:
|
|
17
|
-
content:
|
|
18
|
-
thin:
|
|
19
|
-
vertical:
|
|
20
|
-
text:
|
|
18
|
+
separator: u,
|
|
19
|
+
content: d,
|
|
20
|
+
thin: S,
|
|
21
|
+
vertical: h,
|
|
22
|
+
text: v
|
|
21
23
|
};
|
|
22
|
-
function
|
|
24
|
+
function M(f) {
|
|
23
25
|
const {
|
|
24
|
-
content:
|
|
25
|
-
thin:
|
|
26
|
-
vertical:
|
|
27
|
-
offset:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
content: r,
|
|
27
|
+
thin: p = !1,
|
|
28
|
+
vertical: i = !1,
|
|
29
|
+
offset: c = "none",
|
|
30
|
+
...e
|
|
31
|
+
} = f, o = x(
|
|
32
|
+
a.root,
|
|
33
|
+
a[`separator-offset-${c}`],
|
|
34
|
+
s.getAllMPClassnames(e),
|
|
35
|
+
{
|
|
36
|
+
[a.text]: !!r,
|
|
37
|
+
[a.thin]: p,
|
|
38
|
+
[a.vertical]: i
|
|
39
|
+
}
|
|
40
|
+
), _ = l.useMemo(() => ({
|
|
41
|
+
...s.getAllMPStyles(e)
|
|
42
|
+
}), [e]);
|
|
43
|
+
return r ? /* @__PURE__ */ n("div", { className: o, style: _, children: [
|
|
44
|
+
/* @__PURE__ */ t("div", { className: a.separator }),
|
|
45
|
+
/* @__PURE__ */ t("div", { className: a.content, children: r }),
|
|
46
|
+
/* @__PURE__ */ t("div", { className: a.separator })
|
|
47
|
+
] }) : /* @__PURE__ */ t("div", { className: o, style: _, children: /* @__PURE__ */ t("div", { className: a.separator }) });
|
|
38
48
|
}
|
|
39
49
|
export {
|
|
40
|
-
|
|
50
|
+
M as Separator
|
|
41
51
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BoxProps } from '../Layout/Box/Box';
|
|
3
|
+
import { ResponsiveTextSize } from '../Text';
|
|
4
|
+
import { BorderRadiusType, ResponsiveValueType } from '../ui';
|
|
3
5
|
|
|
4
|
-
interface SkeletonProps {
|
|
5
|
-
|
|
6
|
-
height?:
|
|
7
|
-
borderRadius?: string;
|
|
6
|
+
interface SkeletonProps extends BoxProps {
|
|
7
|
+
borderRadius?: BorderRadiusType;
|
|
8
|
+
height?: ResponsiveValueType<ResponsiveTextSize>;
|
|
8
9
|
}
|
|
9
|
-
declare function Skeleton(
|
|
10
|
+
declare function Skeleton(props: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
declare const _default: React.MemoExoticComponent<typeof Skeleton>;
|
|
11
12
|
export default _default;
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { Box as f } from "../Layout/Box/Box.js";
|
|
4
|
+
import { textSizeResponsiveValueFormatter as u } from "../Text/Text.js";
|
|
5
|
+
import { ui as s } from "../ui.js";
|
|
6
|
+
import { clsx as d } from "../../utils/clsx.js";
|
|
7
|
+
const p = "cfxui__Skeleton__skeleton__d700e", h = "cfxui__Skeleton__shimmer__d72f5", k = {
|
|
8
|
+
skeleton: p,
|
|
9
|
+
shimmer: h
|
|
7
10
|
};
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
function x(m) {
|
|
12
|
+
const {
|
|
13
|
+
width: l = "100%",
|
|
14
|
+
height: e = "small",
|
|
15
|
+
borderRadius: t = "xsmall",
|
|
16
|
+
className: i,
|
|
17
|
+
style: o,
|
|
18
|
+
...n
|
|
19
|
+
} = m, a = d(
|
|
20
|
+
k.skeleton,
|
|
21
|
+
i,
|
|
22
|
+
s.getResponsiveClassnames("height", e)
|
|
23
|
+
), c = r.useMemo(() => ({
|
|
24
|
+
borderRadius: s.borderRadius(t),
|
|
25
|
+
...s.getResponsiveStyles("height", e, u),
|
|
26
|
+
...o || {}
|
|
27
|
+
}), [t, e, o]);
|
|
28
|
+
return /* @__PURE__ */ _(
|
|
29
|
+
f,
|
|
16
30
|
{
|
|
17
|
-
className:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
31
|
+
className: a,
|
|
32
|
+
height: e,
|
|
33
|
+
width: l,
|
|
34
|
+
style: c,
|
|
35
|
+
...n
|
|
23
36
|
}
|
|
24
37
|
);
|
|
25
38
|
}
|
|
26
|
-
const
|
|
39
|
+
const N = r.memo(x);
|
|
27
40
|
export {
|
|
28
|
-
|
|
41
|
+
N as default
|
|
29
42
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import f, { useState as n, useEffect as u } from "react";
|
|
3
3
|
import { Badge as t } from "../Badge/Badge.js";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as p } from "../Button/Button.js";
|
|
5
5
|
import "../Button/LinkButton.js";
|
|
6
|
-
import { Flex as
|
|
6
|
+
import { Flex as m } from "../Layout/Flex/Flex.js";
|
|
7
7
|
import { Text as r } from "../Text/Text.js";
|
|
8
|
+
import "../ui.js";
|
|
8
9
|
import c from "./Skeleton.js";
|
|
9
|
-
import { Table as
|
|
10
|
+
import { Table as x } from "../Table/Table.js";
|
|
10
11
|
const g = [
|
|
11
12
|
{ text: "Header 1" },
|
|
12
13
|
{ text: "Header 2" },
|
|
@@ -15,7 +16,7 @@ const g = [
|
|
|
15
16
|
{ text: "Item" }
|
|
16
17
|
];
|
|
17
18
|
function S() {
|
|
18
|
-
const [l, a] = n(!0), [
|
|
19
|
+
const [l, a] = n(!0), [d, s] = n([]), o = () => {
|
|
19
20
|
a(!0);
|
|
20
21
|
const h = setTimeout(() => {
|
|
21
22
|
s([
|
|
@@ -26,17 +27,17 @@ function S() {
|
|
|
26
27
|
}, 5e3);
|
|
27
28
|
return () => clearTimeout(h);
|
|
28
29
|
};
|
|
29
|
-
return
|
|
30
|
+
return u(() => {
|
|
30
31
|
o();
|
|
31
|
-
}, []), /* @__PURE__ */ i(
|
|
32
|
+
}, []), /* @__PURE__ */ i(m, { gap: "large", vertical: !0, children: [
|
|
32
33
|
/* @__PURE__ */ e(r, { children: "Skeleton within Table" }),
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
/* @__PURE__ */ e(m, { gap: "normal", vertical: !0, children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
35
|
+
x,
|
|
35
36
|
{
|
|
36
37
|
loading: l,
|
|
37
38
|
includeRadio: !0,
|
|
38
39
|
headers: g,
|
|
39
|
-
data: l ? Array(3).fill(Array(5).fill(/* @__PURE__ */ e(c, { width: "100%", height: "normal"
|
|
40
|
+
data: l ? Array(3).fill(Array(5).fill(/* @__PURE__ */ e(c, { width: "100%", height: "normal" }))) : d
|
|
40
41
|
}
|
|
41
42
|
) }) }),
|
|
42
43
|
/* @__PURE__ */ e(r, { children: "Skeleton in Text" }),
|
|
@@ -45,10 +46,10 @@ function S() {
|
|
|
45
46
|
/* @__PURE__ */ e(c, { width: "200px", height: "normal" }),
|
|
46
47
|
" in Text"
|
|
47
48
|
] }),
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(p, { theme: "secondary", onClick: o, text: "Restart Timer" })
|
|
49
50
|
] });
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
+
const y = f.memo(S);
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
y as default
|
|
54
55
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as f, Fragment as pe, jsxs as B } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import z from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { u as
|
|
4
|
+
import { c as Z } from "../../index-rKs9bXHr.js";
|
|
5
|
+
import { u as he, a as Se } from "../../index-Cf5Yu9oD.js";
|
|
6
|
+
import { u as ge } from "../../index-ByaXH_ih.js";
|
|
7
|
+
import { u as be } from "../../index-BZPx6jYI.js";
|
|
6
8
|
import "../../index-2hJuj4UN.js";
|
|
7
9
|
import { c as _e } from "../../index-CjTSD6zB.js";
|
|
8
10
|
import { clsx as ve } from "../../utils/clsx.js";
|
|
@@ -155,7 +157,7 @@ var De = [
|
|
|
155
157
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
156
158
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
157
159
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
158
|
-
}, M = "Slider", [H, Ee, Ve] = _e(M), [ne,
|
|
160
|
+
}, M = "Slider", [H, Ee, Ve] = _e(M), [ne, lt] = we(M, [
|
|
159
161
|
Ve
|
|
160
162
|
]), [Me, K] = ne(M), re = c.forwardRef(
|
|
161
163
|
(e, t) => {
|
|
@@ -176,7 +178,7 @@ var De = [
|
|
|
176
178
|
inverted: p = !1,
|
|
177
179
|
form: _,
|
|
178
180
|
...S
|
|
179
|
-
} = e, g = c.useRef(/* @__PURE__ */ new Set()), h = c.useRef(0), w = i === "horizontal" ? Te : Ne, [v = [], T] =
|
|
181
|
+
} = e, g = c.useRef(/* @__PURE__ */ new Set()), h = c.useRef(0), w = i === "horizontal" ? Te : Ne, [v = [], T] = he({
|
|
180
182
|
prop: b,
|
|
181
183
|
defaultProp: m,
|
|
182
184
|
onChange: (x) => {
|
|
@@ -268,7 +270,7 @@ var [oe, ie] = ne(M, {
|
|
|
268
270
|
onSlideEnd: u,
|
|
269
271
|
onStepKeyDown: m,
|
|
270
272
|
...b
|
|
271
|
-
} = e, [l, d] = c.useState(null), p = k(t, (w) => d(w)), _ = c.useRef(void 0), S =
|
|
273
|
+
} = e, [l, d] = c.useState(null), p = k(t, (w) => d(w)), _ = c.useRef(void 0), S = ge(o), g = S === "ltr", h = g && !s || !g && s;
|
|
272
274
|
function C(w) {
|
|
273
275
|
const v = _.current || l.getBoundingClientRect(), T = [0, v.width], L = U(T, h ? [n, r] : [r, n]);
|
|
274
276
|
return _.current = v, L(w - v.left);
|
|
@@ -447,7 +449,7 @@ var W = "SliderThumb", ue = c.forwardRef(
|
|
|
447
449
|
}
|
|
448
450
|
), Ae = c.forwardRef(
|
|
449
451
|
(e, t) => {
|
|
450
|
-
const { __scopeSlider: n, index: r, name: o, ...s } = e, i = K(W, n), a = ie(W, n), [u, m] = c.useState(null), b = k(t, (C) => m(C)), l = u ? i.form || !!u.closest("form") : !0, d =
|
|
452
|
+
const { __scopeSlider: n, index: r, name: o, ...s } = e, i = K(W, n), a = ie(W, n), [u, m] = c.useState(null), b = k(t, (C) => m(C)), l = u ? i.form || !!u.closest("form") : !0, d = Se(u), p = i.values[r], _ = p === void 0 ? 0 : de(p, i.min, i.max), S = Ie(r, i.values.length), g = d == null ? void 0 : d[a.size], h = g ? Oe(g, _, a.direction) : 0;
|
|
451
453
|
return c.useEffect(() => {
|
|
452
454
|
if (u)
|
|
453
455
|
return i.thumbs.add(u), () => {
|
|
@@ -560,7 +562,7 @@ const Ye = "cfxui__Slider__sliderContainer__fac82", Xe = "cfxui__Slider__sliderL
|
|
|
560
562
|
sliderRange: qe,
|
|
561
563
|
sliderThumb: Je,
|
|
562
564
|
sliderValueBubble: Qe
|
|
563
|
-
},
|
|
565
|
+
}, ut = function({
|
|
564
566
|
value: t,
|
|
565
567
|
defaultValue: n,
|
|
566
568
|
title: r,
|
|
@@ -602,6 +604,6 @@ const Ye = "cfxui__Slider__sliderContainer__fac82", Xe = "cfxui__Slider__sliderL
|
|
|
602
604
|
] });
|
|
603
605
|
};
|
|
604
606
|
export {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
+
ut as Slider,
|
|
608
|
+
ut as default
|
|
607
609
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { Text as
|
|
3
|
+
import { Flex as r } from "../Layout/Flex/Flex.js";
|
|
4
|
+
import { Text as l } from "../Text/Text.js";
|
|
5
|
+
import "../ui.js";
|
|
5
6
|
import { Slider as t } from "./Slider.js";
|
|
6
7
|
function m() {
|
|
7
|
-
return /* @__PURE__ */ a(
|
|
8
|
-
/* @__PURE__ */ a(
|
|
9
|
-
/* @__PURE__ */ e(
|
|
8
|
+
return /* @__PURE__ */ a(r, { gap: "large", vertical: !0, children: [
|
|
9
|
+
/* @__PURE__ */ a(r, { gap: "normal", vertical: !0, children: [
|
|
10
|
+
/* @__PURE__ */ e(l, { children: "Default Slider" }),
|
|
10
11
|
/* @__PURE__ */ e(
|
|
11
12
|
"div",
|
|
12
13
|
{
|
|
@@ -30,8 +31,8 @@ function m() {
|
|
|
30
31
|
}
|
|
31
32
|
)
|
|
32
33
|
] }),
|
|
33
|
-
/* @__PURE__ */ a(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ a(r, { gap: "normal", vertical: !0, children: [
|
|
35
|
+
/* @__PURE__ */ e(l, { children: "Custom Slider" }),
|
|
35
36
|
/* @__PURE__ */ e(
|
|
36
37
|
"div",
|
|
37
38
|
{
|
|
@@ -57,7 +58,7 @@ function m() {
|
|
|
57
58
|
] })
|
|
58
59
|
] });
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
+
const u = i.memo(m);
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
u as default
|
|
63
64
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as l, jsxs as $ } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import g from "react";
|
|
4
|
-
import { u as B, a as U
|
|
4
|
+
import { u as B, a as U } from "../../index-Cf5Yu9oD.js";
|
|
5
|
+
import { u as j } from "../../index-BZPx6jYI.js";
|
|
5
6
|
import { P } from "../../index-BlbvKsmN.js";
|
|
6
7
|
import { clsx as k } from "../../utils/clsx.js";
|
|
7
8
|
function I(t, o, { checkForDefaultPrevented: e = !0 } = {}) {
|
|
@@ -66,7 +67,7 @@ function A(...t) {
|
|
|
66
67
|
};
|
|
67
68
|
return e.scopeName = o.scopeName, e;
|
|
68
69
|
}
|
|
69
|
-
var x = "Switch", [D,
|
|
70
|
+
var x = "Switch", [D, ct] = z(x), [F, L] = D(x), v = u.forwardRef(
|
|
70
71
|
(t, o) => {
|
|
71
72
|
const {
|
|
72
73
|
__scopeSwitch: e,
|
|
@@ -135,7 +136,7 @@ var R = "SwitchThumb", y = u.forwardRef(
|
|
|
135
136
|
);
|
|
136
137
|
y.displayName = R;
|
|
137
138
|
var W = (t) => {
|
|
138
|
-
const { control: o, checked: e, bubbles: r = !0, ...c } = t, h = u.useRef(null), n =
|
|
139
|
+
const { control: o, checked: e, bubbles: r = !0, ...c } = t, h = u.useRef(null), n = j(e), s = U(o);
|
|
139
140
|
return u.useEffect(() => {
|
|
140
141
|
const i = h.current, f = window.HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(f, "checked").set;
|
|
141
142
|
if (n !== e && a) {
|
|
@@ -179,7 +180,7 @@ function V(t) {
|
|
|
179
180
|
} = t;
|
|
180
181
|
return /* @__PURE__ */ l(X, { ...r, className: k(C.switchRoot, C.switchUnset, o), children: /* @__PURE__ */ l(G, { className: k(C.switchThumb, e) }) });
|
|
181
182
|
}
|
|
182
|
-
const
|
|
183
|
+
const st = g.memo(V);
|
|
183
184
|
export {
|
|
184
|
-
|
|
185
|
+
st as default
|
|
185
186
|
};
|
|
@@ -3,6 +3,7 @@ import l, { useState as k } from "react";
|
|
|
3
3
|
import I from "../Checkbox/Checkbox.js";
|
|
4
4
|
import $ from "../IconButton/IconButton.js";
|
|
5
5
|
import { Text as S } from "../Text/Text.js";
|
|
6
|
+
import "../ui.js";
|
|
6
7
|
import { clsx as u } from "../../utils/clsx.js";
|
|
7
8
|
const j = "cfxui__Table__tableIcon__f8e96", z = "cfxui__Table__iconButton__ac6da", A = "cfxui__Table__root__591ed", E = "cfxui__Table__radio__70dd7", O = "cfxui__Table__radioContent__35cef", g = "cfxui__Table__pointer__7b6a4", F = "cfxui__Table__selectedRow__f7130", H = "cfxui__Table__headerText__02722", V = "cfxui__Table__headerContent__f0e66", q = "cfxui__Table__hidden__e4ac6", c = {
|
|
8
9
|
tableIcon: j,
|
|
@@ -105,7 +106,7 @@ function J(i) {
|
|
|
105
106
|
`row-${e}`
|
|
106
107
|
);
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function X({
|
|
109
110
|
headers: i = [],
|
|
110
111
|
data: e = [],
|
|
111
112
|
includeRadio: o = !1,
|
|
@@ -162,7 +163,7 @@ function W({
|
|
|
162
163
|
] }) });
|
|
163
164
|
}
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
+
X as Table,
|
|
166
167
|
G as TableHeaderItem,
|
|
167
168
|
D as TableIconButton
|
|
168
169
|
};
|
|
@@ -6,8 +6,9 @@ import "../Interactive/Interactive.js";
|
|
|
6
6
|
import { Scrollable as c } from "../Layout/Scrollable/Scrollable.js";
|
|
7
7
|
import "../Layout/Scrollable/VirtualScrollable.js";
|
|
8
8
|
import { Text as r } from "../Text/Text.js";
|
|
9
|
+
import "../ui.js";
|
|
9
10
|
import { Table as o } from "./Table.js";
|
|
10
|
-
const
|
|
11
|
+
const i = [
|
|
11
12
|
[
|
|
12
13
|
"Cell 1",
|
|
13
14
|
"Cell 2",
|
|
@@ -27,7 +28,7 @@ const n = [
|
|
|
27
28
|
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")],
|
|
28
29
|
["Cell 4", "Cell 5", "Cell 6", new Date(2023, 1, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "2")],
|
|
29
30
|
["Cell 7", "Cell 8", "Cell 9", new Date(2023, 2, 1).toLocaleDateString(), /* @__PURE__ */ e(l, { children: "Badge" }, "3")]
|
|
30
|
-
],
|
|
31
|
+
], n = [
|
|
31
32
|
{ text: "Header 1" },
|
|
32
33
|
{ text: "Header 2" },
|
|
33
34
|
{ text: "Header 3" },
|
|
@@ -38,7 +39,7 @@ function C() {
|
|
|
38
39
|
return /* @__PURE__ */ t(a, { gap: "large", vertical: !0, children: [
|
|
39
40
|
/* @__PURE__ */ t(a, { gap: "normal", vertical: !0, children: [
|
|
40
41
|
/* @__PURE__ */ e(r, { children: "Table" }),
|
|
41
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(o, { headers:
|
|
42
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(o, { headers: n, data: i }) })
|
|
42
43
|
] }),
|
|
43
44
|
/* @__PURE__ */ t(a, { fullWidth: !0, vertical: !0, children: [
|
|
44
45
|
/* @__PURE__ */ e(r, { children: "Table with scroll" }),
|
|
@@ -49,13 +50,13 @@ function C() {
|
|
|
49
50
|
height: "400px",
|
|
50
51
|
overflow: "hidden"
|
|
51
52
|
},
|
|
52
|
-
children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { includeRadio: !0, headers:
|
|
53
|
+
children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(o, { includeRadio: !0, headers: n, data: i }) })
|
|
53
54
|
}
|
|
54
55
|
)
|
|
55
56
|
] })
|
|
56
57
|
] });
|
|
57
58
|
}
|
|
58
|
-
const
|
|
59
|
+
const f = d.memo(C);
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
f as default
|
|
61
62
|
};
|
|
@@ -2,6 +2,7 @@ import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import a from "react";
|
|
3
3
|
import { Flex as i } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as m } from "../Text/Text.js";
|
|
5
|
+
import "../ui.js";
|
|
5
6
|
import { Tabular as r } from "./Tabular.js";
|
|
6
7
|
const l = [
|
|
7
8
|
{
|
|
@@ -59,7 +60,7 @@ function d() {
|
|
|
59
60
|
] })
|
|
60
61
|
] });
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
+
const p = a.memo(d);
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
p as default
|
|
65
66
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { TextOpacity, TextProps } from './Text.types';
|
|
2
|
+
import { TextOpacity, TextProps, ResponsiveTextSize } from './Text.types';
|
|
3
3
|
|
|
4
|
+
export declare const textSizeResponsiveValueFormatter: (val: ResponsiveTextSize) => string;
|
|
5
|
+
export declare const lineHeightResponsiveValueFormatter: (val: ResponsiveTextSize) => string;
|
|
4
6
|
export declare const TEXT_OPACITY_MAP: Record<TextOpacity, number | string>;
|
|
5
7
|
export declare const getTextOpacity: (opacity?: TextOpacity, otherwise?: string | number) => string | number;
|
|
6
8
|
export declare const DEFAULT_TEXT_COLOR = "primary";
|