@cfx-dev/ui-components 4.3.2 → 4.3.4
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-CSgOhzm-.js → Combination-BGYCZNoJ.js} +375 -367
- package/dist/Rail-CHFAf3wJ.js +81 -0
- package/dist/Table.module-DffST69u.js +17 -0
- package/dist/assets/css/Accordion.css +1 -1
- package/dist/assets/css/Box.css +1 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/DropdownSelect.css +1 -1
- package/dist/assets/css/Flex.css +1 -1
- package/dist/assets/css/Flyout.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/Island.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/Overlay.css +1 -1
- package/dist/assets/css/Pad.css +1 -1
- package/dist/assets/css/Popover.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/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/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/assets/general/themes.css +1 -1
- package/dist/components/Accordion/Accordion.js +5 -5
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/Box/Box.d.ts +6 -0
- package/dist/components/Box/Box.js +23 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Box/index.js +6 -0
- package/dist/components/BurgerMenu/BurgerMenu.js +7 -7
- package/dist/components/BurgerMenu/BurgerMenuButton.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/ButtonShowcase.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +252 -157
- package/dist/components/DataTable/DataTable.js +2 -2
- package/dist/components/DataTable/DataTableShowcase.js +2 -2
- package/dist/components/DropdownSelect/DropdownSelect.js +13 -13
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flex/Flex.d.ts +7 -0
- package/dist/components/Flex/Flex.js +23 -0
- package/dist/components/Flex/index.d.ts +6 -0
- package/dist/components/{Layout/Flex → Flex}/index.js +2 -2
- package/dist/components/Flyout/Flyout.js +6 -6
- package/dist/components/InfoPanel/InfoPanel.js +3 -3
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.js +87 -87
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.js +42 -42
- package/dist/components/Island/Island.js +27 -27
- package/dist/components/Layout/Pad/Pad.js +20 -20
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +4 -4
- package/dist/components/OnScreenSensor.js +13 -13
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/PopoverShowcase.js +1 -1
- package/dist/components/{Layout → RSC}/Box/Box.d.ts +3 -2
- package/dist/components/RSC/Box/Box.js +101 -0
- package/dist/components/RSC/Box/index.d.ts +2 -0
- package/dist/components/RSC/Box/index.js +7 -0
- package/dist/components/{Layout → RSC}/Flex/Flex.d.ts +4 -2
- package/dist/components/RSC/Flex/Flex.js +119 -0
- package/dist/components/{Layout → RSC}/Flex/index.d.ts +1 -1
- package/dist/components/RSC/Flex/index.js +15 -0
- package/dist/components/Scrollable/Rail.js +9 -0
- package/dist/components/Scrollable/Scrollable.js +88 -0
- package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.js +3 -3
- package/dist/components/{Layout/Scrollable → Scrollable}/index.js +1 -1
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Separator/Separator.js +3 -3
- package/dist/components/Shroud/Shroud.js +7 -7
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +5 -5
- package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.d.ts +1 -1
- package/dist/components/Table/TableCell.js +13 -12
- package/dist/components/Table/TableCellCheckbox.js +1 -1
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableIconButton.js +1 -1
- package/dist/components/Table/TableRoot.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/TextShowcase.js +2 -2
- package/dist/components/Textarea/Textarea.js +32 -34
- package/dist/components/Title/Title.js +62 -62
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +7 -7
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-ByKwkZKY.js +239 -0
- package/dist/{index-HDl8nGsm.js → index-CriGVLlo.js} +1 -1
- package/dist/{index-DZEAOJqB.js → index-DlJ4qUbZ.js} +1 -1
- package/dist/main.d.ts +8 -6
- package/dist/main.js +212 -207
- package/dist/rsc.d.ts +4 -0
- package/dist/rsc.js +16 -0
- package/dist/styles-scss/_colors.scss +41 -32
- package/dist/styles-scss/_typography.scss +5 -5
- package/dist/styles-scss/_ui.scss +36 -20
- package/dist/styles-scss/global.scss +24 -13
- package/dist/styles-scss/themes/theme_cfx.scss +3 -5
- package/dist/styles-scss/themes/theme_fivem.scss +5 -7
- package/dist/styles-scss/themes/theme_redm.scss +4 -6
- package/dist/styles-scss/themes/theme_wireframe.scss +5 -7
- package/dist/styles-scss/themes.scss +4 -4
- package/dist/styles-scss/tokens.scss +2 -56
- package/dist/utils/formatCurrency.d.ts +5 -0
- package/dist/utils/formatCurrency.js +35 -0
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.js +13 -0
- package/dist/utils/hooks/useGlobalKeyboardEvent.js +3 -3
- package/dist/utils/hooks/useWindowResize.js +5 -5
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +23 -19
- package/package.json +10 -5
- package/dist/Rail-DcVowhML.js +0 -81
- package/dist/Table.module-DHI1mXN2.js +0 -17
- package/dist/components/Layout/Box/Box.js +0 -72
- package/dist/components/Layout/Box/index.d.ts +0 -2
- package/dist/components/Layout/Box/index.js +0 -5
- package/dist/components/Layout/Flex/Flex.js +0 -84
- package/dist/components/Layout/Scrollable/Rail.js +0 -9
- package/dist/components/Layout/Scrollable/Scrollable.js +0 -91
- package/dist/index-BHuChyf5.js +0 -238
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Flex → Flex}/FlexShowcase.js +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Box/Box.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/Flex.types.js +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.d.ts +0 -0
- /package/dist/components/{Layout → RSC}/Flex/FlexRestricter.js +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Rail.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/Scrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/ScrollableShowcase.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/VirtualScrollable.d.ts +0 -0
- /package/dist/components/{Layout/Scrollable → Scrollable}/index.d.ts +0 -0
|
@@ -3,142 +3,142 @@ import i from "react";
|
|
|
3
3
|
import { Icon as $ } from "../Icon/Icon.js";
|
|
4
4
|
import q from "../IconButton/IconButton.js";
|
|
5
5
|
import { Indicator as H } from "../Indicator/Indicator.js";
|
|
6
|
-
import { clsx as
|
|
6
|
+
import { clsx as b } from "../../utils/clsx.js";
|
|
7
7
|
import { getValue as J } from "../../utils/getValue.js";
|
|
8
8
|
import { ui as L } from "../../utils/ui/ui.js";
|
|
9
|
-
const O = "cfxui__Input__root__6392b", P = "
|
|
9
|
+
const O = "cfxui__Input__root__6392b", P = "cfxui__Input__fullWidth__5a033", Q = "cfxui__Input__input__07830", U = "cfxui__Input__empty__3b36a", Y = "cfxui__Input__placeholderIcon__4d079", Z = "cfxui__Input__decorator__3b81f", ee = "cfxui__Input__small__c1513", le = "cfxui__Input__large__92d72", te = "cfxui__Input__onlight__7d0b7", ae = "cfxui__Input__backdropBlur__fdde1", l = {
|
|
10
10
|
root: O,
|
|
11
|
-
|
|
12
|
-
input:
|
|
13
|
-
empty:
|
|
14
|
-
placeholderIcon:
|
|
15
|
-
decorator:
|
|
16
|
-
small:
|
|
17
|
-
large:
|
|
18
|
-
onlight:
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
11
|
+
fullWidth: P,
|
|
12
|
+
input: Q,
|
|
13
|
+
empty: U,
|
|
14
|
+
placeholderIcon: Y,
|
|
15
|
+
decorator: Z,
|
|
16
|
+
small: ee,
|
|
17
|
+
large: le,
|
|
18
|
+
onlight: te,
|
|
19
|
+
backdropBlur: ae,
|
|
20
|
+
"inputSizeinitial-large": "cfxui__Input__inputSizeinitial-large__12afb",
|
|
21
|
+
"inputSizeinitial-small": "cfxui__Input__inputSizeinitial-small__33905",
|
|
22
|
+
"inputSizesmall-large": "cfxui__Input__inputSizesmall-large__e2689",
|
|
23
|
+
"inputSizesmall-small": "cfxui__Input__inputSizesmall-small__fc7c7",
|
|
24
|
+
"inputSizesmall-medium-large": "cfxui__Input__inputSizesmall-medium-large__d13bf",
|
|
25
|
+
"inputSizesmall-medium-small": "cfxui__Input__inputSizesmall-medium-small__1213b",
|
|
26
|
+
"inputSizemedium-large": "cfxui__Input__inputSizemedium-large__6a868",
|
|
27
|
+
"inputSizemedium-small": "cfxui__Input__inputSizemedium-small__140cd",
|
|
28
|
+
"inputSizemedium-large-large": "cfxui__Input__inputSizemedium-large-large__9e60d",
|
|
29
|
+
"inputSizemedium-large-small": "cfxui__Input__inputSizemedium-large-small__b3a78",
|
|
30
|
+
"inputSizelarge-large": "cfxui__Input__inputSizelarge-large__b8fe5",
|
|
31
|
+
"inputSizelarge-small": "cfxui__Input__inputSizelarge-small__40920",
|
|
32
|
+
"inputSizexlarge-large": "cfxui__Input__inputSizexlarge-large__1ef2c",
|
|
33
|
+
"inputSizexlarge-small": "cfxui__Input__inputSizexlarge-small__7f6ab"
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function ie(n) {
|
|
36
36
|
const {
|
|
37
|
-
decorator:
|
|
37
|
+
decorator: c,
|
|
38
38
|
loading: p,
|
|
39
39
|
type: a,
|
|
40
|
-
hasValue:
|
|
41
|
-
onCleare:
|
|
40
|
+
hasValue: u,
|
|
41
|
+
onCleare: _
|
|
42
42
|
} = n;
|
|
43
|
-
return p ? /* @__PURE__ */ t("div", { className: l.decorator, children: /* @__PURE__ */ t(H, {}) }) :
|
|
43
|
+
return p ? /* @__PURE__ */ t("div", { className: l.decorator, children: /* @__PURE__ */ t(H, {}) }) : c ? /* @__PURE__ */ t("div", { className: l.decorator, children: J(c) }) : a === "search" && u ? /* @__PURE__ */ t("div", { className: l.decorator, children: /* @__PURE__ */ t(q, { size: "xsmall", areaSize: "large", name: "Close", onClick: _ }) }) : null;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function pe(n) {
|
|
46
46
|
const {
|
|
47
|
-
id:
|
|
47
|
+
id: c,
|
|
48
48
|
fullWidth: p = !1,
|
|
49
49
|
value: a,
|
|
50
|
-
onChange:
|
|
51
|
-
onSubmit:
|
|
50
|
+
onChange: u,
|
|
51
|
+
onSubmit: _,
|
|
52
52
|
onKeyDown: d,
|
|
53
53
|
pattern: f,
|
|
54
|
-
tabIndex:
|
|
55
|
-
loading:
|
|
56
|
-
spellCheck:
|
|
57
|
-
autofocus:
|
|
54
|
+
tabIndex: C,
|
|
55
|
+
loading: N = !1,
|
|
56
|
+
spellCheck: y = !0,
|
|
57
|
+
autofocus: k = !1,
|
|
58
58
|
disabled: R = !1,
|
|
59
|
-
className:
|
|
60
|
-
containerClassName:
|
|
61
|
-
placeholder:
|
|
59
|
+
className: w,
|
|
60
|
+
containerClassName: v,
|
|
61
|
+
placeholder: s = "",
|
|
62
62
|
placeholderIcon: m,
|
|
63
63
|
type: x = "text",
|
|
64
|
-
size:
|
|
65
|
-
theme:
|
|
66
|
-
decorator:
|
|
67
|
-
backdropBlur:
|
|
68
|
-
ref:
|
|
69
|
-
} = n, [g,
|
|
70
|
-
let z, h
|
|
64
|
+
size: E = "normal",
|
|
65
|
+
theme: B = "default",
|
|
66
|
+
decorator: V,
|
|
67
|
+
backdropBlur: W = !1,
|
|
68
|
+
ref: D
|
|
69
|
+
} = n, [g, F] = i.useState(a), I = typeof g < "u" && g !== "" && g !== null || typeof a < "u" && a !== "" && a !== null;
|
|
70
|
+
let S, z, h;
|
|
71
71
|
if (n.type === "number") {
|
|
72
72
|
const {
|
|
73
73
|
min: e,
|
|
74
|
-
max:
|
|
75
|
-
step:
|
|
74
|
+
max: o,
|
|
75
|
+
step: T
|
|
76
76
|
} = n;
|
|
77
|
-
|
|
77
|
+
h = T ?? 1, S = e ?? Number.MIN_SAFE_INTEGER, z = o ?? Number.MAX_SAFE_INTEGER;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
}, [
|
|
79
|
+
const r = i.useCallback((e) => {
|
|
80
|
+
F(e), u && u(e);
|
|
81
|
+
}, [u]), A = i.useCallback(
|
|
82
82
|
(e) => {
|
|
83
83
|
const {
|
|
84
|
-
value:
|
|
84
|
+
value: o
|
|
85
85
|
} = e.target;
|
|
86
86
|
if (f) {
|
|
87
|
-
f.test(
|
|
87
|
+
f.test(o) && r(o);
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
r(o);
|
|
91
91
|
},
|
|
92
|
-
[
|
|
93
|
-
),
|
|
94
|
-
d && d(e),
|
|
95
|
-
}, [d,
|
|
96
|
-
|
|
97
|
-
}, [
|
|
92
|
+
[r, f]
|
|
93
|
+
), K = i.useCallback((e) => {
|
|
94
|
+
d && d(e), _ && e.key === "Enter" && _();
|
|
95
|
+
}, [d, _]), M = i.useCallback(() => {
|
|
96
|
+
r("");
|
|
97
|
+
}, [r]), j = b(
|
|
98
98
|
l.root,
|
|
99
|
-
l[
|
|
100
|
-
|
|
101
|
-
L.getResponsiveFlatClassnames("input-size",
|
|
99
|
+
l[B],
|
|
100
|
+
v,
|
|
101
|
+
L.getResponsiveFlatClassnames("input-size", E).map((e) => l[e]),
|
|
102
102
|
{
|
|
103
|
-
[l
|
|
104
|
-
[l
|
|
103
|
+
[l.fullWidth]: p,
|
|
104
|
+
[l.backdropBlur]: W,
|
|
105
105
|
[l.empty]: !I
|
|
106
106
|
}
|
|
107
|
-
),
|
|
108
|
-
return /* @__PURE__ */ X("div", { className:
|
|
107
|
+
), G = i.useMemo(() => s ? m ? ` ${s.trim()}` : s.trim() : "", [s, m]);
|
|
108
|
+
return /* @__PURE__ */ X("div", { className: j, children: [
|
|
109
109
|
/* @__PURE__ */ t(
|
|
110
110
|
"input",
|
|
111
111
|
{
|
|
112
|
-
id:
|
|
113
|
-
ref:
|
|
112
|
+
id: c,
|
|
113
|
+
ref: D,
|
|
114
114
|
type: x,
|
|
115
|
-
tabIndex:
|
|
116
|
-
autoFocus:
|
|
117
|
-
className:
|
|
115
|
+
tabIndex: C,
|
|
116
|
+
autoFocus: k,
|
|
117
|
+
className: b(l.input, w),
|
|
118
118
|
value: a,
|
|
119
|
-
placeholder:
|
|
119
|
+
placeholder: G,
|
|
120
120
|
disabled: R,
|
|
121
|
-
onChange:
|
|
122
|
-
onKeyDown:
|
|
123
|
-
spellCheck:
|
|
124
|
-
min:
|
|
125
|
-
max:
|
|
126
|
-
step:
|
|
121
|
+
onChange: A,
|
|
122
|
+
onKeyDown: K,
|
|
123
|
+
spellCheck: y,
|
|
124
|
+
min: S,
|
|
125
|
+
max: z,
|
|
126
|
+
step: h
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
129
|
m && /* @__PURE__ */ t($, { name: m, className: l.placeholderIcon }),
|
|
130
130
|
/* @__PURE__ */ t(
|
|
131
|
-
|
|
131
|
+
ie,
|
|
132
132
|
{
|
|
133
|
-
decorator:
|
|
134
|
-
loading:
|
|
133
|
+
decorator: V,
|
|
134
|
+
loading: N,
|
|
135
135
|
type: x,
|
|
136
136
|
hasValue: I,
|
|
137
|
-
onCleare:
|
|
137
|
+
onCleare: M
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
] });
|
|
141
141
|
}
|
|
142
142
|
export {
|
|
143
|
-
|
|
143
|
+
pe as default
|
|
144
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import r from "../
|
|
3
|
+
import r from "../Flex/Flex.js";
|
|
4
4
|
import { Text as a } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import c from "./Input.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
1
|
+
import { jsxs as B, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import D from "../Button/Button.js";
|
|
4
4
|
import { clsx as F } from "../../utils/clsx.js";
|
|
5
5
|
import "../../utils/links.js";
|
|
6
|
-
import { useDynamicRef as
|
|
6
|
+
import { useDynamicRef as s } from "../../utils/hooks/useDynamicRef.js";
|
|
7
7
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
8
8
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
9
9
|
import "../../index-Cl_RnsqN.js";
|
|
@@ -12,63 +12,63 @@ const T = "cfxui__RichInput__root__57e6e", j = "cfxui__RichInput__renderer__8b29
|
|
|
12
12
|
root: T,
|
|
13
13
|
renderer: j,
|
|
14
14
|
clear: w,
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
15
|
+
"richinputSizeinitial-large": "cfxui__RichInput__richinputSizeinitial-large__4991c",
|
|
16
|
+
"richinputSizeinitial-small": "cfxui__RichInput__richinputSizeinitial-small__cb0af",
|
|
17
|
+
"richinputSizesmall-large": "cfxui__RichInput__richinputSizesmall-large__d8bc8",
|
|
18
|
+
"richinputSizesmall-small": "cfxui__RichInput__richinputSizesmall-small__2f49a",
|
|
19
|
+
"richinputSizesmall-medium-large": "cfxui__RichInput__richinputSizesmall-medium-large__e3523",
|
|
20
|
+
"richinputSizesmall-medium-small": "cfxui__RichInput__richinputSizesmall-medium-small__a84f9",
|
|
21
|
+
"richinputSizemedium-large": "cfxui__RichInput__richinputSizemedium-large__80e93",
|
|
22
|
+
"richinputSizemedium-small": "cfxui__RichInput__richinputSizemedium-small__f42a7",
|
|
23
|
+
"richinputSizemedium-large-large": "cfxui__RichInput__richinputSizemedium-large-large__b8650",
|
|
24
|
+
"richinputSizemedium-large-small": "cfxui__RichInput__richinputSizemedium-large-small__30be4",
|
|
25
|
+
"richinputSizelarge-large": "cfxui__RichInput__richinputSizelarge-large__13d43",
|
|
26
|
+
"richinputSizelarge-small": "cfxui__RichInput__richinputSizelarge-small__de800",
|
|
27
|
+
"richinputSizexlarge-large": "cfxui__RichInput__richinputSizexlarge-large__fe171",
|
|
28
|
+
"richinputSizexlarge-small": "cfxui__RichInput__richinputSizexlarge-small__32365"
|
|
29
29
|
};
|
|
30
30
|
function P(o) {
|
|
31
31
|
const {
|
|
32
32
|
size: m = "normal",
|
|
33
|
-
value:
|
|
33
|
+
value: a,
|
|
34
34
|
onChange: p,
|
|
35
35
|
onFocus: h,
|
|
36
36
|
onBlur: f,
|
|
37
37
|
onSelect: d,
|
|
38
38
|
onKeyDown: g,
|
|
39
|
-
className:
|
|
40
|
-
rendered:
|
|
41
|
-
placeholder:
|
|
42
|
-
autoFocus:
|
|
43
|
-
withClearButton:
|
|
44
|
-
ref:
|
|
45
|
-
} = o,
|
|
46
|
-
|
|
47
|
-
}, []), k = i.useCallback(() => {
|
|
39
|
+
className: S,
|
|
40
|
+
rendered: z,
|
|
41
|
+
placeholder: R,
|
|
42
|
+
autoFocus: x,
|
|
43
|
+
withClearButton: I = !1,
|
|
44
|
+
ref: C
|
|
45
|
+
} = o, _ = i.useRef(null), r = i.useRef(null), l = s(p), n = s(d), b = i.useCallback((e) => {
|
|
46
|
+
l.current(e.target.value);
|
|
47
|
+
}, [l]), k = i.useCallback(() => {
|
|
48
48
|
var e;
|
|
49
|
-
|
|
50
|
-
}, []), N = i.useCallback((e) => {
|
|
51
|
-
if (!
|
|
49
|
+
l.current(""), (e = _.current) == null || e.focus();
|
|
50
|
+
}, [l]), N = i.useCallback((e) => {
|
|
51
|
+
if (!n.current || !(e.target instanceof HTMLInputElement))
|
|
52
52
|
return;
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
}, []), v = i.useCallback((e) => {
|
|
53
|
+
const u = e.target;
|
|
54
|
+
n.current(u.selectionStart, u.selectionEnd, u.selectionDirection);
|
|
55
|
+
}, [n]), v = i.useCallback((e) => {
|
|
56
56
|
r.current && (r.current.scrollTop = e.target.scrollTop, r.current.scrollLeft = e.target.scrollLeft);
|
|
57
57
|
}, []), y = F(
|
|
58
58
|
c.root,
|
|
59
|
-
|
|
59
|
+
S,
|
|
60
60
|
L.getResponsiveFlatClassnames("richinput-size", m).map((e) => c[e])
|
|
61
61
|
);
|
|
62
|
-
return /* @__PURE__ */ B("div", { ref:
|
|
63
|
-
/* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ B("div", { ref: C, className: y, children: [
|
|
63
|
+
/* @__PURE__ */ t(
|
|
64
64
|
"input",
|
|
65
65
|
{
|
|
66
|
-
ref:
|
|
67
|
-
autoFocus:
|
|
66
|
+
ref: _,
|
|
67
|
+
autoFocus: x,
|
|
68
68
|
type: "text",
|
|
69
|
-
value:
|
|
70
|
-
onChange:
|
|
71
|
-
placeholder:
|
|
69
|
+
value: a,
|
|
70
|
+
onChange: b,
|
|
71
|
+
placeholder: R,
|
|
72
72
|
onBlur: f,
|
|
73
73
|
onFocus: h,
|
|
74
74
|
onScroll: v,
|
|
@@ -76,8 +76,8 @@ function P(o) {
|
|
|
76
76
|
onKeyDown: g
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
79
|
+
/* @__PURE__ */ t("div", { ref: r, className: c.renderer, children: z }),
|
|
80
|
+
I && a && /* @__PURE__ */ t("div", { className: c.clear, children: /* @__PURE__ */ t(D, { icon: "Close", onClick: k }) })
|
|
81
81
|
] });
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { ui as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
6
|
-
grow:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as c } from "../../utils/clsx.js";
|
|
3
|
+
import { ui as m } from "../../utils/ui/ui.js";
|
|
4
|
+
const n = "cfxui__Island__root__24fd9", g = "cfxui__Island__grow__c1786", h = "cfxui__Island__noRoundBorderTopLeft__c0f59", p = "cfxui__Island__noRoundBorderTopRight__eedb7", L = "cfxui__Island__noRoundBorderBottomLeft__a4912", T = "cfxui__Island__noRoundBorderBottomRight__db1c7", t = {
|
|
5
|
+
root: n,
|
|
6
|
+
grow: g,
|
|
7
|
+
noRoundBorderTopLeft: h,
|
|
8
|
+
noRoundBorderTopRight: p,
|
|
9
|
+
noRoundBorderBottomLeft: L,
|
|
10
|
+
noRoundBorderBottomRight: T
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
function
|
|
12
|
+
var s = /* @__PURE__ */ ((o) => (o[o.TopLeft = 1] = "TopLeft", o[o.TopRight = 2] = "TopRight", o[o.BottomLeft = 4] = "BottomLeft", o[o.BottomRight = 8] = "BottomRight", o[o.Top = 3] = "Top", o[o.Left = 5] = "Left", o[o.Right = 10] = "Right", o[o.Bottom = 12] = "Bottom", o[o.All = 15] = "All", o))(s || {});
|
|
13
|
+
function b(o) {
|
|
14
14
|
const {
|
|
15
|
-
grow:
|
|
16
|
-
widthQ:
|
|
15
|
+
grow: R = !1,
|
|
16
|
+
widthQ: i = 0,
|
|
17
17
|
straightCorner: _ = 0,
|
|
18
|
-
children:
|
|
19
|
-
className:
|
|
20
|
-
ref:
|
|
21
|
-
} = o,
|
|
22
|
-
[t.grow]:
|
|
23
|
-
[t
|
|
24
|
-
[t
|
|
25
|
-
[t
|
|
26
|
-
[t
|
|
18
|
+
children: d,
|
|
19
|
+
className: f,
|
|
20
|
+
ref: e
|
|
21
|
+
} = o, u = c(t.root, f, {
|
|
22
|
+
[t.grow]: R,
|
|
23
|
+
[t.noRoundBorderTopLeft]: _ & 1,
|
|
24
|
+
[t.noRoundBorderTopRight]: _ & 2,
|
|
25
|
+
[t.noRoundBorderBottomLeft]: _ & 4,
|
|
26
|
+
[t.noRoundBorderBottomRight]: _ & 8
|
|
27
27
|
/* BottomRight */
|
|
28
|
-
}),
|
|
29
|
-
return
|
|
28
|
+
}), B = {};
|
|
29
|
+
return i > 0 && (B.width = m.q(i)), /* @__PURE__ */ r("div", { className: u, style: B, ref: e, children: d });
|
|
30
30
|
}
|
|
31
31
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
b as Island,
|
|
33
|
+
s as IslandCorner
|
|
34
34
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
3
|
-
const
|
|
4
|
-
root:
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as x } from "../../../utils/clsx.js";
|
|
3
|
+
const m = "cfxui__Pad__root__f230e", r = "cfxui__Pad__onlyTop__90400", u = "cfxui__Pad__onlyLeft__3d457", P = "cfxui__Pad__onlyRight__dddb2", y = "cfxui__Pad__onlyBottom__66299", _ = {
|
|
4
|
+
root: m,
|
|
5
5
|
"offset-none": "cfxui__Pad__offset-none__41261",
|
|
6
6
|
"offset-hairthin": "cfxui__Pad__offset-hairthin__aa20b",
|
|
7
7
|
"offset-thin": "cfxui__Pad__offset-thin__cf68c",
|
|
@@ -13,28 +13,28 @@ const d = "cfxui__Pad__root__f230e", _ = {
|
|
|
13
13
|
"offset-large": "cfxui__Pad__offset-large__7d722",
|
|
14
14
|
"offset-xlarge": "cfxui__Pad__offset-xlarge__ce0b6",
|
|
15
15
|
"offset-safezone": "cfxui__Pad__offset-safezone__2a0b0",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
onlyTop: r,
|
|
17
|
+
onlyLeft: u,
|
|
18
|
+
onlyRight: P,
|
|
19
|
+
onlyBottom: y
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function p(a) {
|
|
22
22
|
const {
|
|
23
|
-
top:
|
|
23
|
+
top: f = !1,
|
|
24
24
|
left: t = !1,
|
|
25
25
|
right: e = !1,
|
|
26
|
-
bottom:
|
|
26
|
+
bottom: s = !1,
|
|
27
27
|
size: l = "normal",
|
|
28
|
-
children:
|
|
29
|
-
className:
|
|
30
|
-
} =
|
|
31
|
-
[_
|
|
32
|
-
[_
|
|
33
|
-
[_
|
|
34
|
-
[_
|
|
28
|
+
children: n,
|
|
29
|
+
className: c
|
|
30
|
+
} = a, o = !(f || t || e || s), i = x(_.root, c, _[`offset-${l}`], {
|
|
31
|
+
[_.onlyTop]: o || f,
|
|
32
|
+
[_.onlyLeft]: o || t,
|
|
33
|
+
[_.onlyRight]: o || e,
|
|
34
|
+
[_.onlyBottom]: o || s
|
|
35
35
|
});
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ d("div", { className: i, children: n });
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
p as Pad
|
|
40
40
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
|
-
import l from "../
|
|
3
|
+
import l from "../Flex/Flex.js";
|
|
4
4
|
import { Text as i } from "../Text/Text.js";
|
|
5
5
|
import "../../utils/ui/ui.js";
|
|
6
6
|
import t from "./ButtonLink.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
|
+
import m from "../Flex/Flex.js";
|
|
3
4
|
import { Island as c } from "../Island/Island.js";
|
|
4
|
-
import m from "../Layout/Flex/Flex.js";
|
|
5
5
|
import { Pad as l } from "../Layout/Pad/Pad.js";
|
|
6
6
|
import { Text as a } from "../Text/Text.js";
|
|
7
7
|
import "../../utils/ui/ui.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
+
import n from "../Box/Box.js";
|
|
4
|
+
import "../../utils/ui/ui.js";
|
|
3
5
|
import l from "../Button/Button.js";
|
|
4
6
|
import "../../utils/links.js";
|
|
5
|
-
import
|
|
7
|
+
import p from "../Input/Input.js";
|
|
6
8
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
7
9
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
8
10
|
import "../../index-Cl_RnsqN.js";
|
|
9
|
-
import "../../utils/ui/ui.js";
|
|
10
|
-
import p from "../Layout/Box/Box.js";
|
|
11
11
|
import { LOREM_IPSUM as c } from "../../utils/loremipsum.js";
|
|
12
12
|
import { Modal as r } from "./Modal.js";
|
|
13
13
|
function s() {
|
|
@@ -25,7 +25,7 @@ function s() {
|
|
|
25
25
|
/* @__PURE__ */ o(l, { theme: "primary", onClick: t, text: "Toggle Modal" }),
|
|
26
26
|
d && /* @__PURE__ */ e(r, { onClose: t, children: [
|
|
27
27
|
/* @__PURE__ */ o(r.Header, { title: "Modal Title", description: "Modal Description" }),
|
|
28
|
-
/* @__PURE__ */ o(
|
|
28
|
+
/* @__PURE__ */ o(n, { mb: 4, children: /* @__PURE__ */ o(p, { theme: "onlight", placeholder: "Input", fullWidth: !0 }) }),
|
|
29
29
|
"Modal content: ",
|
|
30
30
|
c,
|
|
31
31
|
/* @__PURE__ */ e(r.Footer, { children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { noop as
|
|
4
|
-
import { useDynamicRef as
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { noop as c } from "../utils/functional.js";
|
|
4
|
+
import { useDynamicRef as i } from "../utils/hooks/useDynamicRef.js";
|
|
5
5
|
import "../utils/hooks/useGlobalKeyboardEvent.js";
|
|
6
6
|
import "../utils/hooks/useKeyboardClose.js";
|
|
7
7
|
import "../index-Cl_RnsqN.js";
|
|
@@ -9,20 +9,20 @@ const l = {
|
|
|
9
9
|
width: "0",
|
|
10
10
|
height: "0"
|
|
11
11
|
};
|
|
12
|
-
function w(
|
|
12
|
+
function w(f) {
|
|
13
13
|
const {
|
|
14
|
-
onEnter:
|
|
15
|
-
onLeave:
|
|
16
|
-
} =
|
|
17
|
-
return
|
|
14
|
+
onEnter: u = c,
|
|
15
|
+
onLeave: m = c
|
|
16
|
+
} = f, r = i(u), n = i(m), e = s.useRef(null);
|
|
17
|
+
return s.useEffect(() => {
|
|
18
18
|
if (!e.current)
|
|
19
19
|
return;
|
|
20
|
-
const
|
|
21
|
-
const [
|
|
22
|
-
|
|
20
|
+
const t = new IntersectionObserver((p) => {
|
|
21
|
+
const [o] = p;
|
|
22
|
+
o && (o.isIntersecting ? r.current() : n.current());
|
|
23
23
|
});
|
|
24
|
-
return
|
|
25
|
-
}, []), /* @__PURE__ */ a("span", { ref: e, style: l });
|
|
24
|
+
return t.observe(e.current), () => t.disconnect();
|
|
25
|
+
}, [r, n]), /* @__PURE__ */ a("span", { ref: e, style: l });
|
|
26
26
|
}
|
|
27
27
|
export {
|
|
28
28
|
w as OnScreenSensor
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as P, jsx as h } from "react/jsx-runtime";
|
|
2
2
|
import { Interactive as d } from "../Interactive/Interactive.js";
|
|
3
3
|
import { clsx as r } from "../../utils/clsx.js";
|
|
4
|
-
const N = "cfxui__Popover__root__4521b", C = "
|
|
4
|
+
const N = "cfxui__Popover__root__4521b", C = "cfxui__Popover__popover__bea1e", g = "cfxui__Popover__active__e4504", M = "cfxui__Popover__appearance__20d42", o = {
|
|
5
5
|
root: N,
|
|
6
|
-
|
|
7
|
-
popover: g,
|
|
8
|
-
appearance: M,
|
|
6
|
+
popover: C,
|
|
9
7
|
"pos-top-right": "cfxui__Popover__pos-top-right__95a54",
|
|
10
|
-
"pos-top-left": "cfxui__Popover__pos-top-left__a93aa"
|
|
8
|
+
"pos-top-left": "cfxui__Popover__pos-top-left__a93aa",
|
|
9
|
+
active: g,
|
|
10
|
+
appearance: M
|
|
11
11
|
};
|
|
12
12
|
function A(s) {
|
|
13
13
|
const {
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import s from "react";
|
|
3
3
|
import a from "../Button/Button.js";
|
|
4
4
|
import "../../utils/links.js";
|
|
5
|
-
import m from "../
|
|
5
|
+
import m from "../Flex/Flex.js";
|
|
6
6
|
import { usePopoverController as i } from "../../utils/hooks/usePopoverController.js";
|
|
7
7
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
8
8
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
@@ -20,6 +20,7 @@ export interface BoxProps extends MPProps {
|
|
|
20
20
|
as?: React.ElementType;
|
|
21
21
|
}
|
|
22
22
|
export declare const stringPropFormater: (val: string) => string;
|
|
23
|
+
export declare function getBoxClassNames(props: BoxProps): string;
|
|
24
|
+
export declare function getBoxStyles(props: BoxProps): React.CSSProperties;
|
|
23
25
|
declare function Box(props: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
|
|
25
|
-
export default _default;
|
|
26
|
+
export default Box;
|