@cfx-dev/ui-components 4.2.20 → 4.2.22
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/assets/css/Badge.css +1 -1
- package/dist/assets/css/Link.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Accordion/Accordion.d.ts +1 -7
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/BackdropPortal/BackdropPortal.d.ts +2 -0
- package/dist/components/BackdropPortal/BackdropPortal.js +7 -5
- package/dist/components/BackdropPortal/index.d.ts +2 -0
- package/dist/components/BackdropPortal/index.js +5 -0
- package/dist/components/Badge/Badge.d.ts +9 -2
- package/dist/components/Badge/Badge.js +52 -25
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/ButtonShowcase.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/ClipboardButton/ClipboardButton.d.ts +3 -3
- package/dist/components/ClipboardButton/ClipboardButton.js +10 -9
- package/dist/components/ControlBox/ControlBox.d.ts +2 -0
- package/dist/components/ControlBox/ControlBox.js +10 -9
- package/dist/components/ControlBox/index.d.ts +2 -0
- package/dist/components/ControlBox/index.js +4 -0
- package/dist/components/CountryFlag/CountryFlag.d.ts +2 -0
- package/dist/components/CountryFlag/CountryFlag.js +14 -13
- package/dist/components/CountryFlag/index.d.ts +2 -0
- package/dist/components/CountryFlag/index.js +4 -0
- package/dist/components/Decorate/Decorate.d.ts +2 -0
- package/dist/components/Decorate/Decorate.js +15 -14
- package/dist/components/Decorate/index.d.ts +2 -0
- package/dist/components/Decorate/index.js +4 -0
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +801 -1039
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/DropdownSelect/index.d.ts +1 -0
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/index.d.ts +2 -0
- package/dist/components/Flyout/index.js +5 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/IconBig/IconBig.js +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -3
- package/dist/components/IconButton/index.d.ts +1 -1
- package/dist/components/Indicator/index.d.ts +2 -0
- package/dist/components/Indicator/index.js +4 -0
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +6 -6
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +1 -1
- package/dist/components/Input/RichInput.js +4 -4
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/InputDropzone/index.d.ts +3 -3
- package/dist/components/InputDropzone/index.js +3 -3
- package/dist/components/Interactive/index.d.ts +2 -0
- package/dist/components/Interactive/index.js +4 -0
- package/dist/components/Island/Island.js +4 -4
- package/dist/components/Island/index.d.ts +2 -0
- package/dist/components/Island/index.js +5 -0
- package/dist/components/Layout/Box/Box.d.ts +2 -1
- package/dist/components/Layout/Box/Box.js +3 -2
- package/dist/components/Layout/Box/index.d.ts +2 -0
- package/dist/components/Layout/Box/index.js +5 -0
- package/dist/components/Layout/Center/index.d.ts +2 -0
- package/dist/components/Layout/Center/index.js +4 -0
- package/dist/components/Layout/Flex/Flex.d.ts +4 -4
- package/dist/components/Layout/Flex/Flex.js +1 -1
- package/dist/components/Layout/Flex/Flex.types.d.ts +7 -0
- package/dist/components/Layout/Flex/Flex.types.js +6 -5
- package/dist/components/Layout/Flex/index.d.ts +6 -0
- package/dist/components/Layout/Flex/index.js +12 -0
- package/dist/components/Layout/Pad/index.d.ts +2 -0
- package/dist/components/Layout/Pad/index.js +4 -0
- package/dist/components/Layout/Page/index.d.ts +2 -0
- package/dist/components/Layout/Page/index.js +4 -0
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Link/ButtonLink.js +23 -18
- package/dist/components/Link/Link.d.ts +3 -1
- package/dist/components/Link/Link.js +48 -30
- package/dist/components/Link/LinkShowcase.js +46 -41
- package/dist/components/Link/index.d.ts +1 -1
- package/dist/components/Link/index.js +6 -5
- package/dist/components/Loaf/index.d.ts +2 -0
- package/dist/components/Loaf/index.js +4 -0
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/NavList/index.d.ts +2 -0
- package/dist/components/NavList/index.js +4 -0
- package/dist/components/Overlay/index.d.ts +2 -0
- package/dist/components/Overlay/index.js +5 -0
- package/dist/components/PremiumBadge/index.d.ts +2 -0
- package/dist/components/PremiumBadge/index.js +4 -0
- package/dist/components/Prose/Prose.d.ts +1 -2
- package/dist/components/Prose/index.d.ts +2 -0
- package/dist/components/Prose/index.js +4 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +4 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +1 -1
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Separator/index.js +4 -0
- package/dist/components/Shroud/Shroud.js +6 -6
- package/dist/components/Shroud/index.d.ts +2 -0
- package/dist/components/Shroud/index.js +4 -0
- package/dist/components/Skeleton/Skeleton.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/SkeletonShowcase.js +1 -1
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Slider/Slider.js +294 -374
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Spacer/index.d.ts +2 -0
- package/dist/components/Spacer/index.js +4 -0
- package/dist/components/Style/index.d.ts +2 -0
- package/dist/components/Style/index.js +5 -0
- package/dist/components/Table/Table.d.ts +13 -4
- package/dist/components/Table/Table.js +3 -2
- package/dist/components/Table/TableShowcase.js +1 -1
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Table/index.js +5 -2
- package/dist/components/Tabular/Tabular.d.ts +1 -1
- package/dist/components/Tabular/Tabular.js +1 -1
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.js +13 -12
- package/dist/components/Text/Text.types.d.ts +3 -2
- package/dist/components/Text/TextShowcase.js +12 -15
- package/dist/components/Text/index.d.ts +2 -2
- package/dist/components/Text/index.js +9 -8
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/index.js +4 -0
- package/dist/components/Title/Title.d.ts +5 -4
- package/dist/components/Title/Title.js +4 -2
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/Title/index.d.ts +2 -0
- package/dist/components/Title/index.js +7 -0
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-AweK2ufS.js +171 -0
- package/dist/{index-DBus3GoO.js → index-Bz27DCHt.js} +2 -2
- package/dist/main.d.ts +93 -69
- package/dist/main.js +217 -191
- package/dist/styles-scss/global.scss +2 -2
- package/dist/styles-scss/tokens.scss +0 -4
- package/dist/utils/color.d.ts +3 -1
- package/dist/utils/enum.d.ts +1 -0
- package/dist/utils/enum.js +6 -0
- package/dist/utils/ui/index.d.ts +3 -0
- package/dist/utils/ui/index.js +11 -0
- package/dist/{components → utils/ui}/ui.d.ts +2 -68
- package/dist/utils/ui/ui.js +68 -0
- package/dist/utils/ui/ui.types.d.ts +86 -0
- package/dist/utils/ui/ui.types.js +9 -0
- package/package.json +1 -1
- package/dist/components/ui.js +0 -73
- package/dist/index-CjTSD6zB.js +0 -161
|
@@ -2,7 +2,7 @@ import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import r from "react";
|
|
3
3
|
import { Flex as l } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as o } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import { DropdownSelect as a } from "./DropdownSelect.js";
|
|
7
7
|
const c = [
|
|
8
8
|
{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export declare const FLYOUT_OUTLET_ID = "flyout-outlet";
|
|
4
|
+
export type FlyoutSize = 'normal' | 'small' | 'xsmall';
|
|
4
5
|
export interface FlyoutProps {
|
|
5
6
|
disabled?: boolean;
|
|
6
|
-
size?:
|
|
7
|
+
size?: FlyoutSize;
|
|
7
8
|
onClose?(): void;
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
holderClassName?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IconName } from '../Icons';
|
|
3
3
|
import { TextColorProps, ResponsiveTextSize } from '../Text';
|
|
4
|
-
import { ResponsiveValueType } from '
|
|
4
|
+
import { ResponsiveValueType } from '../../utils/ui';
|
|
5
5
|
|
|
6
6
|
export type IconSize = ResponsiveTextSize;
|
|
7
7
|
export interface IconProps extends TextColorProps {
|
|
@@ -7,7 +7,7 @@ import "../Icons/cfx-icons-big/Upload.js";
|
|
|
7
7
|
import "../Icons/cfx-icons-big/Warning.js";
|
|
8
8
|
import "../Icons/cfx-icons-big/Confirm.js";
|
|
9
9
|
import { textSizeResponsiveValueFormatter as c, getTextOpacity as u } from "../Text/Text.js";
|
|
10
|
-
import { ui as t } from "
|
|
10
|
+
import { ui as t } from "../../utils/ui/ui.js";
|
|
11
11
|
import { clsx as a } from "../../utils/clsx.js";
|
|
12
12
|
import { getColor as h } from "../../utils/color.js";
|
|
13
13
|
const C = "cfxui__Icon__root__6c380", d = {
|
|
@@ -47,7 +47,7 @@ import "../Icons/cfx-icons/UpvotesBurst.js";
|
|
|
47
47
|
import "../Icons/cfx-icons/UpvotesRecurring.js";
|
|
48
48
|
import { I as f } from "../../cfxIconsBig-BLJjMT-Y.js";
|
|
49
49
|
import { getTextOpacity as g } from "../Text/Text.js";
|
|
50
|
-
import "
|
|
50
|
+
import "../../utils/ui/ui.js";
|
|
51
51
|
import { clsx as I } from "../../utils/clsx.js";
|
|
52
52
|
import { getColor as x } from "../../utils/color.js";
|
|
53
53
|
const z = "cfxui__IconBig__root__f259a", i = {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IconSize } from '../Icon';
|
|
3
|
-
import { IconName } from '../Icons';
|
|
2
|
+
import { IconSize, IconName } from '../Icon';
|
|
4
3
|
import { TextColorProps } from '../Text';
|
|
5
4
|
|
|
6
|
-
type IconButtonAreaSize = 'small' | 'medium' | 'large';
|
|
5
|
+
export type IconButtonAreaSize = 'small' | 'medium' | 'large';
|
|
7
6
|
export interface IconButtonProps extends TextColorProps {
|
|
8
7
|
name: IconName;
|
|
9
8
|
size?: IconSize;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as IconButton } from './IconButton';
|
|
2
|
-
export type { IconButtonProps } from './IconButton';
|
|
2
|
+
export type { IconButtonProps, IconButtonAreaSize } from './IconButton';
|
|
@@ -2,7 +2,7 @@ import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import a from "react";
|
|
3
3
|
import { Flex as n } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as i } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import { LOREM_IPSUM as t } from "../../utils/loremipsum.js";
|
|
7
7
|
import l from "./InfoPanel.js";
|
|
8
8
|
function c() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IconName } from '../Icon';
|
|
3
|
-
import { ResponsiveValueType } from '
|
|
3
|
+
import { ResponsiveValueType } from '../../utils/ui';
|
|
4
4
|
|
|
5
5
|
export type InputSize = 'small' | 'normal' | 'large';
|
|
6
6
|
export type InputTheme = 'default' | 'onlight';
|
|
@@ -3,9 +3,9 @@ import n from "react";
|
|
|
3
3
|
import { Icon as T } from "../Icon/Icon.js";
|
|
4
4
|
import W from "../IconButton/IconButton.js";
|
|
5
5
|
import { Indicator as X } from "../Indicator/Indicator.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { clsx as $ } from "../../utils/clsx.js";
|
|
7
|
+
import { getValue as q } from "../../utils/getValue.js";
|
|
8
|
+
import { ui as H } from "../../utils/ui/ui.js";
|
|
9
9
|
const J = "cfxui__Input__root__6392b", L = "cfxui__Input__input__07830", O = "cfxui__Input__empty__3b36a", P = "cfxui__Input__placeholderIcon__4d079", Q = "cfxui__Input__decorator__3b81f", U = "cfxui__Input__small__c1513", Y = "cfxui__Input__large__92d72", Z = "cfxui__Input__onlight__7d0b7", e = {
|
|
10
10
|
root: J,
|
|
11
11
|
"full-width": "cfxui__Input__full-width__587b3",
|
|
@@ -40,7 +40,7 @@ function ee(x) {
|
|
|
40
40
|
hasValue: c,
|
|
41
41
|
onCleare: a
|
|
42
42
|
} = x;
|
|
43
|
-
return s ? /* @__PURE__ */ i("div", { className: e.decorator, children: /* @__PURE__ */ i(X, {}) }) : t ? /* @__PURE__ */ i("div", { className: e.decorator, children:
|
|
43
|
+
return s ? /* @__PURE__ */ i("div", { className: e.decorator, children: /* @__PURE__ */ i(X, {}) }) : t ? /* @__PURE__ */ i("div", { className: e.decorator, children: q(t) }) : o === "search" && c ? /* @__PURE__ */ i("div", { className: e.decorator, children: /* @__PURE__ */ i(W, { size: "xsmall", areaSize: "large", name: "Close", onClick: a }) }) : null;
|
|
44
44
|
}
|
|
45
45
|
const se = n.forwardRef(function(t, s) {
|
|
46
46
|
const {
|
|
@@ -82,11 +82,11 @@ const se = n.forwardRef(function(t, s) {
|
|
|
82
82
|
d && d(l), p && l.key === "Enter" && p();
|
|
83
83
|
}, [d, p]), M = n.useCallback(() => {
|
|
84
84
|
u("");
|
|
85
|
-
}, [u]), j =
|
|
85
|
+
}, [u]), j = $(
|
|
86
86
|
e.root,
|
|
87
87
|
e[E],
|
|
88
88
|
v,
|
|
89
|
-
|
|
89
|
+
H.getResponsiveFlatClassnames("input-size", w).map((l) => e[l]),
|
|
90
90
|
{
|
|
91
91
|
[e["full-width"]]: c,
|
|
92
92
|
[e["backdrop-blur"]]: V,
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { Flex as r } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as a } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import c from "./Input.js";
|
|
7
7
|
const m = /^\+?[0-9]*$/;
|
|
8
8
|
function s() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { Button as y } from "../Button/Button.js";
|
|
4
|
-
import {
|
|
5
|
-
import { clsx as D } from "../../utils/clsx.js";
|
|
4
|
+
import { clsx as B } from "../../utils/clsx.js";
|
|
6
5
|
import { useDynamicRef as _ } from "../../utils/hooks/useDynamicRef.js";
|
|
7
6
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
8
7
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
9
8
|
import "../../index-2hJuj4UN.js";
|
|
9
|
+
import { ui as D } from "../../utils/ui/ui.js";
|
|
10
10
|
const L = "cfxui__RichInput__root__57e6e", T = "cfxui__RichInput__renderer__8b298", j = "cfxui__RichInput__clear__5538b", c = {
|
|
11
11
|
root: L,
|
|
12
12
|
renderer: T,
|
|
@@ -51,10 +51,10 @@ const L = "cfxui__RichInput__root__57e6e", T = "cfxui__RichInput__renderer__8b29
|
|
|
51
51
|
s.current(t.selectionStart, t.selectionEnd, t.selectionDirection);
|
|
52
52
|
}, []), v = i.useCallback((e) => {
|
|
53
53
|
r.current && (r.current.scrollTop = e.target.scrollTop, r.current.scrollLeft = e.target.scrollLeft);
|
|
54
|
-
}, []), F =
|
|
54
|
+
}, []), F = B(
|
|
55
55
|
c.root,
|
|
56
56
|
R,
|
|
57
|
-
|
|
57
|
+
D.getResponsiveFlatClassnames("richinput-size", p).map((e) => c[e])
|
|
58
58
|
);
|
|
59
59
|
return /* @__PURE__ */ w("div", { ref: m, className: F, children: [
|
|
60
60
|
/* @__PURE__ */ l(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Input } from './Input';
|
|
2
2
|
export { default as RichInput } from './RichInput';
|
|
3
|
-
export type { InputSize, InputProps } from './Input';
|
|
3
|
+
export type { InputSize, InputProps, InputTheme, } from './Input';
|
|
4
4
|
export type { RichInputProps } from './RichInput';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as InputDropzone } from './InputDropzone';
|
|
2
|
-
export type { FileWithPath, InputDropzoneProps } from './InputDropzone';
|
|
3
|
-
export { default as
|
|
4
|
-
export type { ItemPreviewProps } from './ItemPreview';
|
|
2
|
+
export type { FileWithPath as DropzoneFileWithPath, InputDropzoneProps } from './InputDropzone';
|
|
3
|
+
export { default as DropzoneItemPreview } from './ItemPreview';
|
|
4
|
+
export type { ItemPreviewProps as DropzoneItemPreviewProps } from './ItemPreview';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { clsx as p } from "../../utils/clsx.js";
|
|
4
|
+
import { ui as h } from "../../utils/ui/ui.js";
|
|
5
5
|
const n = "cfxui__Island__root__24fd9", s = "cfxui__Island__grow__c1786", t = {
|
|
6
6
|
root: n,
|
|
7
7
|
grow: s,
|
|
@@ -18,7 +18,7 @@ const L = g.forwardRef(function(i, d) {
|
|
|
18
18
|
straightCorner: r = 0,
|
|
19
19
|
children: u,
|
|
20
20
|
className: e
|
|
21
|
-
} = i, c =
|
|
21
|
+
} = i, c = p(t.root, e, {
|
|
22
22
|
[t.grow]: m,
|
|
23
23
|
[t["no-round-border-top-left"]]: r & 1,
|
|
24
24
|
[t["no-round-border-top-right"]]: r & 2,
|
|
@@ -26,7 +26,7 @@ const L = g.forwardRef(function(i, d) {
|
|
|
26
26
|
[t["no-round-border-bottom-right"]]: r & 8
|
|
27
27
|
/* BottomRight */
|
|
28
28
|
}), f = {};
|
|
29
|
-
return _ > 0 && (f.width =
|
|
29
|
+
return _ > 0 && (f.width = h.q(_)), /* @__PURE__ */ b("div", { className: c, style: f, ref: d, children: u });
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
32
|
L as Island,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { MPProps, ResponsiveValueType } from '
|
|
2
|
+
import { MPProps, ResponsiveValueType } from '../../../utils/ui';
|
|
3
3
|
|
|
4
4
|
export interface BoxProps extends MPProps {
|
|
5
5
|
noOverflow?: boolean;
|
|
@@ -15,4 +15,5 @@ export interface BoxProps extends MPProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
}
|
|
18
|
+
export declare const flexPropFormater: (val: string) => string;
|
|
18
19
|
export declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as R } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
3
|
import { useContextualStyle as S } from "../../Style/Style.js";
|
|
4
|
-
import { ui as o } from "../../ui.js";
|
|
5
4
|
import { clsx as C } from "../../../utils/clsx.js";
|
|
5
|
+
import { ui as o } from "../../../utils/ui/ui.js";
|
|
6
6
|
const k = "cfxui__Box__root__299ae", M = "cfxui__Box__grow__7ee8d", t = {
|
|
7
7
|
root: k,
|
|
8
8
|
"full-width": "cfxui__Box__full-width__2b253",
|
|
@@ -65,5 +65,6 @@ const k = "cfxui__Box__root__299ae", M = "cfxui__Box__grow__7ee8d", t = {
|
|
|
65
65
|
);
|
|
66
66
|
});
|
|
67
67
|
export {
|
|
68
|
-
F as Box
|
|
68
|
+
F as Box,
|
|
69
|
+
N as flexPropFormater
|
|
69
70
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps } from '../Box/Box';
|
|
3
|
-
import { ResponsiveOffsetType, ResponsiveValueType } from '
|
|
4
|
-
import { FlexAlignItemsType, FlexDirectionType, FlexJustifyContentType, FlexWrapType } from './Flex.types';
|
|
3
|
+
import { ResponsiveOffsetType, ResponsiveValueType } from '../../../utils/ui';
|
|
4
|
+
import { FlexAlignItemsType, FlexCentredType, FlexDirectionType, FlexJustifyContentType, FlexWrapType } from './Flex.types';
|
|
5
5
|
|
|
6
6
|
export interface FlexProps extends BoxProps {
|
|
7
|
-
centered?:
|
|
7
|
+
centered?: FlexCentredType;
|
|
8
8
|
vertical?: boolean;
|
|
9
9
|
reverseOrder?: boolean;
|
|
10
10
|
stretch?: boolean;
|
|
@@ -21,7 +21,7 @@ export interface FlexProps extends BoxProps {
|
|
|
21
21
|
}
|
|
22
22
|
export declare function flexWrapResponsiveFormatter(val: FlexWrapType | boolean): string;
|
|
23
23
|
declare const FlexComponentReffed: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
-
type FlexType = typeof FlexComponentReffed & {
|
|
24
|
+
export type FlexType = typeof FlexComponentReffed & {
|
|
25
25
|
Restricted: React.FC<{
|
|
26
26
|
children?: React.ReactNode;
|
|
27
27
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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
|
-
import { ui as s } from "../../ui.js";
|
|
5
4
|
import { clsx as C } from "../../../utils/clsx.js";
|
|
5
|
+
import { ui as s } from "../../../utils/ui/ui.js";
|
|
6
6
|
import { FlexRestricter as S } from "./FlexRestricter.js";
|
|
7
7
|
const j = "cfxui__Flex__root__d860a", z = "cfxui__Flex__centered__e911c", N = "cfxui__Flex__vertical__552db", B = "cfxui__Flex__repell__6ea3f", E = "cfxui__Flex__wrap__9d0d6", O = "cfxui__Flex__stretch__5c1ce", T = "cfxui__Flex__horizontal__d64f7", e = {
|
|
8
8
|
root: j,
|
|
@@ -40,3 +40,10 @@ export declare enum FlexWrapEnum {
|
|
|
40
40
|
'wrap-reverse' = "wrap-reverse"
|
|
41
41
|
}
|
|
42
42
|
export type FlexWrapType = keyof typeof FlexWrapEnum;
|
|
43
|
+
export declare enum FlexCentredEnum {
|
|
44
|
+
axis = "axis",
|
|
45
|
+
'cross-axis' = "cross-axis",
|
|
46
|
+
'baseline-axis' = "baseline-axis",
|
|
47
|
+
'baseline-cross-axis' = "baseline-cross-axis"
|
|
48
|
+
}
|
|
49
|
+
export type FlexCentredType = keyof typeof FlexCentredEnum | boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a = /* @__PURE__ */ ((r) => (r.row = "row", r.column = "column", r["row-reverse"] = "row-reverse", r["column-reverse"] = "column-reverse", r))(a || {}), s = /* @__PURE__ */ ((r) => (r.stretch = "stretch", r.center = "center", r.start = "start", r.end = "end", r.baseline = "baseline", r.unset = "unset", r["flex-start"] = "flex-start", r["flex-end"] = "flex-end", r["self-start"] = "self-start", r["self-end"] = "self-end", r["anchor-center"] = "anchor-center", r))(s || {}), e = /* @__PURE__ */ ((r) => (r.stretch = "stretch", r.center = "center", r.start = "start", r.end = "end", r.left = "left", r.right = "right", r.unset = "unset", r["flex-start"] = "flex-start", r["flex-end"] = "flex-end", r["space-between"] = "space-between", r["space-around"] = "space-around", r))(e || {}), c = /* @__PURE__ */ ((r) => (r.nowrap = "nowrap", r.wrap = "wrap", r.unset = "unset", r["wrap-reverse"] = "wrap-reverse", r))(c || {}), w = /* @__PURE__ */ ((r) => (r.axis = "axis", r["cross-axis"] = "cross-axis", r["baseline-axis"] = "baseline-axis", r["baseline-cross-axis"] = "baseline-cross-axis", r))(w || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
s as FlexAlignItemsEnum,
|
|
4
|
+
w as FlexCentredEnum,
|
|
5
|
+
a as FlexDirectionEnum,
|
|
6
|
+
e as FlexJustifyContentEnum,
|
|
7
|
+
c as FlexWrapEnum
|
|
7
8
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Flex } from './Flex';
|
|
2
|
+
export type { FlexType, FlexProps } from './Flex';
|
|
3
|
+
export type { FlexDirectionType, FlexAlignItemsType, FlexJustifyContentType, FlexWrapType, FlexCentredType, } from './Flex.types';
|
|
4
|
+
export { FlexDirectionEnum, FlexAlignItemsEnum, FlexJustifyContentEnum, FlexWrapEnum, FlexCentredEnum, } from './Flex.types';
|
|
5
|
+
export { FlexRestricter } from './FlexRestricter';
|
|
6
|
+
export type { FlexRestricterProps } from './FlexRestricter';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Flex as t } from "./Flex.js";
|
|
2
|
+
import { FlexAlignItemsEnum as x, FlexCentredEnum as m, FlexDirectionEnum as l, FlexJustifyContentEnum as o, FlexWrapEnum as F } from "./Flex.types.js";
|
|
3
|
+
import { FlexRestricter as i } from "./FlexRestricter.js";
|
|
4
|
+
export {
|
|
5
|
+
t as Flex,
|
|
6
|
+
x as FlexAlignItemsEnum,
|
|
7
|
+
m as FlexCentredEnum,
|
|
8
|
+
l as FlexDirectionEnum,
|
|
9
|
+
o as FlexJustifyContentEnum,
|
|
10
|
+
i as FlexRestricter,
|
|
11
|
+
F as FlexWrapEnum
|
|
12
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { Flex as i } from "../Flex/Flex.js";
|
|
4
4
|
import { Text as t } from "../../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../../utils/ui/ui.js";
|
|
6
6
|
import { LOREM_IPSUM as e } from "../../../utils/loremipsum.js";
|
|
7
7
|
import { Scrollable as o } from "./Scrollable.js";
|
|
8
8
|
function c() {
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { getLinkClassName as
|
|
4
|
-
function
|
|
3
|
+
import { getLinkClassName as c, getLinkStyles as d } from "./Link.js";
|
|
4
|
+
function u(t) {
|
|
5
5
|
const {
|
|
6
|
-
className:
|
|
7
|
-
children:
|
|
8
|
-
type:
|
|
9
|
-
disabled:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
className: f,
|
|
7
|
+
children: s,
|
|
8
|
+
type: a = "button",
|
|
9
|
+
disabled: e = !1,
|
|
10
|
+
style: o,
|
|
11
|
+
...n
|
|
12
|
+
} = t, l = c(t), r = d(t);
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
13
14
|
"button",
|
|
14
15
|
{
|
|
15
|
-
...
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
...n,
|
|
17
|
+
style: {
|
|
18
|
+
...r,
|
|
19
|
+
...o
|
|
20
|
+
},
|
|
21
|
+
className: l,
|
|
22
|
+
type: a,
|
|
23
|
+
"aria-disabled": e,
|
|
24
|
+
tabIndex: e ? -1 : 0,
|
|
25
|
+
children: s
|
|
21
26
|
}
|
|
22
27
|
);
|
|
23
28
|
}
|
|
24
|
-
const
|
|
29
|
+
const L = m.memo(u);
|
|
25
30
|
export {
|
|
26
|
-
|
|
31
|
+
L as default
|
|
27
32
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { ColorType } from '../../utils/ui';
|
|
2
3
|
|
|
3
4
|
export interface LinkBaseProps {
|
|
5
|
+
color?: ColorType;
|
|
4
6
|
className?: string;
|
|
5
7
|
disabled?: boolean;
|
|
6
8
|
unstyled?: boolean;
|
|
7
|
-
theme?: 'default' | 'secondary';
|
|
8
9
|
}
|
|
9
10
|
export declare function getLinkClassName(props: LinkBaseProps): string;
|
|
11
|
+
export declare function getLinkStyles(props: LinkBaseProps): React.CSSProperties;
|
|
10
12
|
export type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & LinkBaseProps;
|
|
11
13
|
declare function Link(props: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
declare const _default: React.MemoExoticComponent<typeof Link>;
|
|
@@ -1,44 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { clsx as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
import { clsx as d } from "../../utils/clsx.js";
|
|
4
|
+
import { getColor as a } from "../../utils/color.js";
|
|
5
|
+
const f = "cfxui__Link__unsetAll__58fea", m = "cfxui__Link__root__a29b3", y = "cfxui__Link__unstyled__f020c", e = {
|
|
6
|
+
unsetAll: f,
|
|
7
|
+
root: m,
|
|
8
|
+
unstyled: y
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function k(t) {
|
|
11
11
|
const {
|
|
12
|
-
className:
|
|
12
|
+
className: o,
|
|
13
13
|
disabled: n = !1,
|
|
14
|
-
unstyled:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[
|
|
19
|
-
|
|
20
|
-
}, a);
|
|
14
|
+
unstyled: s = !1
|
|
15
|
+
} = t;
|
|
16
|
+
return d(e.unsetAll, e.root, {
|
|
17
|
+
[e.disabled]: n,
|
|
18
|
+
[e.unstyled]: s
|
|
19
|
+
}, o);
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function x(t) {
|
|
23
22
|
const {
|
|
24
|
-
|
|
23
|
+
color: o = "tertiary"
|
|
24
|
+
} = t;
|
|
25
|
+
return {
|
|
26
|
+
"--anchor-color": a({ color: o }),
|
|
27
|
+
"--anchor-decoration-color-hover": a({
|
|
28
|
+
color: o,
|
|
29
|
+
opacity: 0.5
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function L(t) {
|
|
34
|
+
const {
|
|
35
|
+
className: o,
|
|
25
36
|
children: n,
|
|
26
|
-
disabled:
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
29
|
-
|
|
37
|
+
disabled: s = !1,
|
|
38
|
+
...l
|
|
39
|
+
} = t, {
|
|
40
|
+
style: r
|
|
41
|
+
} = l, c = k(t), i = x(t);
|
|
42
|
+
return /* @__PURE__ */ u(
|
|
30
43
|
"a",
|
|
31
44
|
{
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
...l,
|
|
46
|
+
style: {
|
|
47
|
+
...i,
|
|
48
|
+
...r
|
|
49
|
+
},
|
|
50
|
+
tabIndex: s ? -1 : 0,
|
|
51
|
+
"aria-disabled": s,
|
|
52
|
+
className: c,
|
|
36
53
|
children: n
|
|
37
54
|
}
|
|
38
55
|
);
|
|
39
56
|
}
|
|
40
|
-
const
|
|
57
|
+
const g = _.memo(L);
|
|
41
58
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
g as default,
|
|
60
|
+
k as getLinkClassName,
|
|
61
|
+
x as getLinkStyles
|
|
44
62
|
};
|