@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 r, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { Flex as a } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as t } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Slider as l } from "./Slider.js";
|
|
7
7
|
const c = "cfxui__SliderShowcase__track__9ceda", o = {
|
|
8
8
|
track: c
|
|
@@ -7,22 +7,32 @@ export interface TableHeaderType {
|
|
|
7
7
|
sortKey?: string;
|
|
8
8
|
}
|
|
9
9
|
export type TableRowType = Array<string | number | Date | React.ReactNode>;
|
|
10
|
-
export type
|
|
10
|
+
export type TableDataContainerType = React.FC<{
|
|
11
11
|
item: string | number | Date | React.ReactNode;
|
|
12
12
|
}>;
|
|
13
13
|
export declare function TableIconButton(props: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
interface TableHeaderItemProps {
|
|
14
|
+
export interface TableHeaderItemProps {
|
|
15
15
|
item: TableHeaderType;
|
|
16
16
|
onSortClick?: (sortKey: string) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare function TableHeaderItem(props: TableHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export interface TableRowProps {
|
|
20
|
+
index: number;
|
|
21
|
+
item: TableRowType;
|
|
22
|
+
onSelectChange: (rowIndex: number | null) => void;
|
|
23
|
+
includeRadio?: boolean;
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
selectedRow?: number | null;
|
|
26
|
+
dataContainer?: TableDataContainerType;
|
|
27
|
+
}
|
|
28
|
+
export declare function TableRow(props: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
19
29
|
export interface TableProps {
|
|
20
30
|
headers: TableHeaderType[];
|
|
21
31
|
data: TableRowType[];
|
|
22
32
|
includeRadio?: boolean;
|
|
23
33
|
loading?: boolean;
|
|
24
34
|
onSelectChange?: (rowIndex: number | null) => void;
|
|
25
|
-
dataContainer?:
|
|
35
|
+
dataContainer?: TableDataContainerType;
|
|
26
36
|
selectedRow?: number | null;
|
|
27
37
|
sortBy?: string;
|
|
28
38
|
sortOrder?: 'asc' | 'desc';
|
|
@@ -30,4 +40,3 @@ export interface TableProps {
|
|
|
30
40
|
className?: string;
|
|
31
41
|
}
|
|
32
42
|
export declare function Table({ headers, data, includeRadio, loading, onSelectChange, dataContainer, selectedRow: outerSelectedRow, sortBy: outerSortBy, sortOrder: outerSortOrder, onSortChange, className, }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export {};
|
|
@@ -3,7 +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 "
|
|
6
|
+
import "../../utils/ui/ui.js";
|
|
7
7
|
import { clsx as u } from "../../utils/clsx.js";
|
|
8
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 = {
|
|
9
9
|
tableIcon: j,
|
|
@@ -165,5 +165,6 @@ function X({
|
|
|
165
165
|
export {
|
|
166
166
|
X as Table,
|
|
167
167
|
G as TableHeaderItem,
|
|
168
|
-
D as TableIconButton
|
|
168
|
+
D as TableIconButton,
|
|
169
|
+
J as TableRow
|
|
169
170
|
};
|
|
@@ -6,7 +6,7 @@ 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 "
|
|
9
|
+
import "../../utils/ui/ui.js";
|
|
10
10
|
import { Table as o } from "./Table.js";
|
|
11
11
|
const i = [
|
|
12
12
|
[
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Table } from './Table';
|
|
2
|
-
export type { TableProps } from './Table';
|
|
1
|
+
export { Table, TableIconButton, TableHeaderItem, TableRow, } from './Table';
|
|
2
|
+
export type { TableHeaderType, TableProps, TableRowType, TableDataContainerType, TableHeaderItemProps, TableRowProps, } from './Table';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import d, { createElement as N } from "react";
|
|
3
3
|
import { Dot as p } from "../Dot/Dot.js";
|
|
4
|
-
import { ui as C } from "../ui.js";
|
|
5
4
|
import { clsx as n } from "../../utils/clsx.js";
|
|
5
|
+
import { ui as C } from "../../utils/ui/ui.js";
|
|
6
6
|
const v = "cfxui__Tabular__reset__b1dbc", k = "cfxui__Tabular__item__98cc3", I = "cfxui__Tabular__root__0ff05", R = "cfxui__Tabular__active__1ae95", y = "cfxui__Tabular__hasNotification__c372f", j = "cfxui__Tabular__content__3a95a", l = {
|
|
7
7
|
reset: v,
|
|
8
8
|
"tabular-size-initial-large": "cfxui__Tabular__tabular-size-initial-large__9451f",
|
|
@@ -2,7 +2,7 @@ import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "react";
|
|
3
3
|
import { Flex as i } from "../Layout/Flex/Flex.js";
|
|
4
4
|
import { Text as l } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Tabular as m } from "./Tabular.js";
|
|
7
7
|
const c = [
|
|
8
8
|
{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { ui as t, TextSizeEnum as _ } from "../ui.js";
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import l from "react";
|
|
4
3
|
import { clsx as w } from "../../utils/clsx.js";
|
|
5
4
|
import { getColor as A } from "../../utils/color.js";
|
|
5
|
+
import { ui as t } from "../../utils/ui/ui.js";
|
|
6
|
+
import { TextSizeEnum as _ } from "../../utils/ui/ui.types.js";
|
|
6
7
|
const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "cfxui__Text__underlined__5860e", H = "cfxui__Text__strikethrough__e3ee3", N = "cfxui__Text__truncated__417f4", $ = "cfxui__Text__typographic__d8155", B = "cfxui__Text__block__cb1b6", n = {
|
|
7
8
|
root: E,
|
|
8
9
|
centered: O,
|
|
@@ -27,14 +28,14 @@ const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "c
|
|
|
27
28
|
}, L = (e, o = 1) => {
|
|
28
29
|
const r = typeof e == "string" && D[e];
|
|
29
30
|
return typeof r == "string" || typeof r == "number" ? r : o;
|
|
30
|
-
}, M = "primary", V =
|
|
31
|
+
}, M = "primary", V = l.forwardRef(function(o, r) {
|
|
31
32
|
const {
|
|
32
33
|
family: c,
|
|
33
34
|
size: i = "normal",
|
|
34
35
|
weight: u = "normal",
|
|
35
|
-
letterSpacing:
|
|
36
|
+
letterSpacing: p = "normal",
|
|
36
37
|
as: s = "span",
|
|
37
|
-
centered:
|
|
38
|
+
centered: h = !1,
|
|
38
39
|
truncated: m = !1,
|
|
39
40
|
typographic: g = !1,
|
|
40
41
|
uppercase: d = !1,
|
|
@@ -51,7 +52,7 @@ const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "c
|
|
|
51
52
|
t.getResponsiveClassnames("line-height", i),
|
|
52
53
|
{
|
|
53
54
|
[n.block]: S,
|
|
54
|
-
[n.centered]:
|
|
55
|
+
[n.centered]: h,
|
|
55
56
|
[n.truncated]: m,
|
|
56
57
|
[n.underlined]: y,
|
|
57
58
|
[n.strikethrough]: T,
|
|
@@ -66,21 +67,21 @@ const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "c
|
|
|
66
67
|
color: v,
|
|
67
68
|
fontFamily: `var(--font-family-${z})`,
|
|
68
69
|
lineHeight: `var(--line-height-${i})`,
|
|
69
|
-
letterSpacing: `var(--letter-spacing-${
|
|
70
|
+
letterSpacing: `var(--letter-spacing-${p})`,
|
|
70
71
|
fontWeight: `var(--font-weight-${u})`,
|
|
71
72
|
...t.getResponsiveStyles("font-size", i, P),
|
|
72
73
|
...t.getResponsiveStyles("line-height", i, q),
|
|
73
74
|
...R
|
|
74
75
|
};
|
|
75
|
-
return d && (a.textTransform = "uppercase"), /* @__PURE__ */
|
|
76
|
-
}),
|
|
77
|
-
return /* @__PURE__ */
|
|
76
|
+
return d && (a.textTransform = "uppercase"), /* @__PURE__ */ f(s, { ref: r, dir: "auto", className: C, style: a, children: b });
|
|
77
|
+
}), K = l.forwardRef(function(o, r) {
|
|
78
|
+
return /* @__PURE__ */ f(V, { ref: r, ...o, as: "div" });
|
|
78
79
|
});
|
|
79
80
|
export {
|
|
80
81
|
M as DEFAULT_TEXT_COLOR,
|
|
81
82
|
D as TEXT_OPACITY_MAP,
|
|
82
83
|
V as Text,
|
|
83
|
-
|
|
84
|
+
K as TextBlock,
|
|
84
85
|
L as getTextOpacity,
|
|
85
86
|
q as lineHeightResponsiveValueFormatter,
|
|
86
87
|
P as textSizeResponsiveValueFormatter
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ResponsiveValueType, TextSize as RawTextSize } from '../ui';
|
|
2
1
|
import { GetColorProps } from '../../utils/color';
|
|
2
|
+
import { ResponsiveValueType, TextSize as RawTextSize } from '../../utils/ui';
|
|
3
3
|
|
|
4
4
|
export type TextSize = RawTextSize;
|
|
5
5
|
export type ResponsiveTextSize = TextSize | string | number;
|
|
@@ -7,6 +7,7 @@ export type TextWeight = 'thin' | 'normal' | 'bold' | 'bolder';
|
|
|
7
7
|
export type TextOpacity = '0' | '25' | '50' | '75' | '100';
|
|
8
8
|
export type TextAs = 'span' | 'div' | 'p' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
9
9
|
export type TextLetterSpacing = 'normal' | 'large';
|
|
10
|
+
export type TextFamaly = 'primary' | 'secondary';
|
|
10
11
|
interface TextPropsBase {
|
|
11
12
|
as?: TextAs;
|
|
12
13
|
centered?: boolean;
|
|
@@ -25,7 +26,7 @@ interface TextPropsBase {
|
|
|
25
26
|
size?: ResponsiveValueType<ResponsiveTextSize>;
|
|
26
27
|
weight?: TextWeight;
|
|
27
28
|
letterSpacing?: TextLetterSpacing;
|
|
28
|
-
family?:
|
|
29
|
+
family?: TextFamaly;
|
|
29
30
|
children?: React.ReactNode;
|
|
30
31
|
className?: string;
|
|
31
32
|
style?: React.CSSProperties;
|
|
@@ -5,17 +5,14 @@ import { Separator as d } from "../Separator/Separator.js";
|
|
|
5
5
|
const h = "cfxui__TextShowcase__root__a3632", _ = {
|
|
6
6
|
root: h
|
|
7
7
|
}, f = "The quick brown fox jumps over the lazy dog.", T = "How vexingly quick daft zebras jump.";
|
|
8
|
-
function
|
|
8
|
+
function m() {
|
|
9
9
|
return /* @__PURE__ */ t(e, { children: [
|
|
10
10
|
f,
|
|
11
11
|
/* @__PURE__ */ o("br", {}),
|
|
12
12
|
T
|
|
13
13
|
] });
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
color: "secondary"
|
|
17
|
-
};
|
|
18
|
-
function m(a) {
|
|
15
|
+
function u(a) {
|
|
19
16
|
const {
|
|
20
17
|
items: l
|
|
21
18
|
} = a;
|
|
@@ -23,24 +20,24 @@ function m(a) {
|
|
|
23
20
|
/* @__PURE__ */ t("div", { children: [
|
|
24
21
|
/* @__PURE__ */ o(c, { ...r.textProps, children: r.title }),
|
|
25
22
|
/* @__PURE__ */ o("br", {}),
|
|
26
|
-
/* @__PURE__ */ t(c, {
|
|
27
|
-
r.descriptions.map((
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
/* @__PURE__ */ t(c, { color: "secondary", children: [
|
|
24
|
+
r.descriptions.map((n, s) => /* @__PURE__ */ t(e, { children: [
|
|
25
|
+
n,
|
|
26
|
+
s < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
|
|
30
27
|
] })),
|
|
31
|
-
Object.entries(r.textProps).map(([
|
|
28
|
+
Object.entries(r.textProps).map(([n, s], i) => /* @__PURE__ */ t(e, { children: [
|
|
32
29
|
r.descriptions.length > 0 && i === 0 && /* @__PURE__ */ o(d, { content: "props", offset: "large" }),
|
|
33
|
-
|
|
30
|
+
n,
|
|
34
31
|
": ",
|
|
35
|
-
|
|
32
|
+
s.toString(),
|
|
36
33
|
i < r.descriptions.length - 1 && /* @__PURE__ */ o("br", {})
|
|
37
34
|
] }))
|
|
38
35
|
] })
|
|
39
36
|
] }),
|
|
40
|
-
/* @__PURE__ */ o(c, { ...r.textProps, children: /* @__PURE__ */ o(
|
|
37
|
+
/* @__PURE__ */ o(c, { ...r.textProps, children: /* @__PURE__ */ o(m, {}) })
|
|
41
38
|
] })) });
|
|
42
39
|
}
|
|
43
|
-
const
|
|
40
|
+
const w = p.memo(u);
|
|
44
41
|
export {
|
|
45
|
-
|
|
42
|
+
w as default
|
|
46
43
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Text, TextBlock, TEXT_OPACITY_MAP, DEFAULT_TEXT_COLOR, getTextOpacity, textSizeResponsiveValueFormatter, } from './Text';
|
|
2
|
-
export { TextSizeEnum } from '
|
|
3
|
-
export type { TextSize, TextWeight, TextOpacity, TextAs, TextLetterSpacing, TextProps, TextColorProps, ResponsiveTextSize, } from './Text.types';
|
|
2
|
+
export { TextSizeEnum } from '../../utils/ui';
|
|
3
|
+
export type { TextSize, TextWeight, TextOpacity, TextAs, TextLetterSpacing, TextProps, TextColorProps, ResponsiveTextSize, TextFamaly, } from './Text.types';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { DEFAULT_TEXT_COLOR as
|
|
2
|
-
import
|
|
1
|
+
import { DEFAULT_TEXT_COLOR as o, TEXT_OPACITY_MAP as r, Text as x, TextBlock as i, getTextOpacity as m, textSizeResponsiveValueFormatter as p } from "./Text.js";
|
|
2
|
+
import "../../utils/ui/ui.js";
|
|
3
|
+
import { TextSizeEnum as O } from "../../utils/ui/ui.types.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
o as DEFAULT_TEXT_COLOR,
|
|
6
|
+
r as TEXT_OPACITY_MAP,
|
|
6
7
|
x as Text,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
i as TextBlock,
|
|
9
|
+
O as TextSizeEnum,
|
|
10
|
+
m as getTextOpacity,
|
|
11
|
+
p as textSizeResponsiveValueFormatter
|
|
11
12
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export declare const TITLE_OUTLET_ID = "title-outlet";
|
|
4
|
-
export type
|
|
5
|
-
|
|
4
|
+
export type TitleFixedOn = 'top' | 'top-left' | 'right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left';
|
|
5
|
+
export declare function titleGetCssStyle(fixed: boolean, delay: number, [x, y]: number[]): React.CSSProperties;
|
|
6
|
+
export declare function titleGetCoords(element: HTMLElement, fixedOn: TitleFixedOn): [number, number];
|
|
7
|
+
export type TitleChildren = ((ref: React.RefObject<any>) => React.ReactNode) | React.ReactElement;
|
|
6
8
|
export interface TitleProps {
|
|
7
9
|
children: TitleChildren;
|
|
8
10
|
title?: React.ReactNode;
|
|
9
11
|
delay?: number;
|
|
10
12
|
animated?: boolean;
|
|
11
13
|
suppressMouseActivation?: boolean;
|
|
12
|
-
fixedOn?:
|
|
14
|
+
fixedOn?: TitleFixedOn;
|
|
13
15
|
active?: boolean;
|
|
14
16
|
className?: string;
|
|
15
17
|
rootClassName?: string;
|
|
16
18
|
}
|
|
17
19
|
export declare function Title(props: TitleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -61,7 +61,7 @@ function D(u, f) {
|
|
|
61
61
|
}
|
|
62
62
|
return [c, t];
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function z(u) {
|
|
65
65
|
const {
|
|
66
66
|
title: f,
|
|
67
67
|
children: e,
|
|
@@ -116,5 +116,7 @@ function G(u) {
|
|
|
116
116
|
}
|
|
117
117
|
export {
|
|
118
118
|
S as TITLE_OUTLET_ID,
|
|
119
|
-
|
|
119
|
+
z as Title,
|
|
120
|
+
D as titleGetCoords,
|
|
121
|
+
j as titleGetCssStyle
|
|
120
122
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as t } 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 o } from "../Text/Text.js";
|
|
5
|
-
import "
|
|
5
|
+
import "../../utils/ui/ui.js";
|
|
6
6
|
import { Title as l } from "./Title.js";
|
|
7
7
|
function m() {
|
|
8
8
|
return /* @__PURE__ */ e(r, { gap: "large", vertical: !0, children: /* @__PURE__ */ t(r, { gap: "normal", vertical: !0, children: [
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import u 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 { ToggleGroup as i } from "./ToggleGroup.js";
|
|
7
7
|
const n = [
|
|
8
8
|
{
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import h from "react";
|
|
3
|
+
import { jsx as y, Fragment as w } from "react/jsx-runtime";
|
|
4
|
+
function L(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
5
|
+
return function(n) {
|
|
6
|
+
if (e == null || e(n), o === !1 || !n.defaultPrevented)
|
|
7
|
+
return t == null ? void 0 : t(n);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function A(e, t) {
|
|
11
|
+
if (typeof e == "function")
|
|
12
|
+
return e(t);
|
|
13
|
+
e != null && (e.current = t);
|
|
14
|
+
}
|
|
15
|
+
function O(...e) {
|
|
16
|
+
return (t) => {
|
|
17
|
+
let o = !1;
|
|
18
|
+
const r = e.map((n) => {
|
|
19
|
+
const c = A(n, t);
|
|
20
|
+
return !o && typeof c == "function" && (o = !0), c;
|
|
21
|
+
});
|
|
22
|
+
if (o)
|
|
23
|
+
return () => {
|
|
24
|
+
for (let n = 0; n < r.length; n++) {
|
|
25
|
+
const c = r[n];
|
|
26
|
+
typeof c == "function" ? c() : A(e[n], null);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function I(...e) {
|
|
32
|
+
return l.useCallback(O(...e), e);
|
|
33
|
+
}
|
|
34
|
+
function E(e, t = []) {
|
|
35
|
+
let o = [];
|
|
36
|
+
function r(c, s) {
|
|
37
|
+
const i = l.createContext(s), f = o.length;
|
|
38
|
+
o = [...o, s];
|
|
39
|
+
const S = (R) => {
|
|
40
|
+
var d;
|
|
41
|
+
const { scope: C, children: a, ...u } = R, p = ((d = C == null ? void 0 : C[e]) == null ? void 0 : d[f]) || i, m = l.useMemo(() => u, Object.values(u));
|
|
42
|
+
return /* @__PURE__ */ y(p.Provider, { value: m, children: a });
|
|
43
|
+
};
|
|
44
|
+
S.displayName = c + "Provider";
|
|
45
|
+
function M(R, C) {
|
|
46
|
+
var p;
|
|
47
|
+
const a = ((p = C == null ? void 0 : C[e]) == null ? void 0 : p[f]) || i, u = l.useContext(a);
|
|
48
|
+
if (u) return u;
|
|
49
|
+
if (s !== void 0) return s;
|
|
50
|
+
throw new Error(`\`${R}\` must be used within \`${c}\``);
|
|
51
|
+
}
|
|
52
|
+
return [S, M];
|
|
53
|
+
}
|
|
54
|
+
const n = () => {
|
|
55
|
+
const c = o.map((s) => l.createContext(s));
|
|
56
|
+
return function(i) {
|
|
57
|
+
const f = (i == null ? void 0 : i[e]) || c;
|
|
58
|
+
return l.useMemo(
|
|
59
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: f } }),
|
|
60
|
+
[i, f]
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
return n.scopeName = e, [r, v(n, ...t)];
|
|
65
|
+
}
|
|
66
|
+
function v(...e) {
|
|
67
|
+
const t = e[0];
|
|
68
|
+
if (e.length === 1) return t;
|
|
69
|
+
const o = () => {
|
|
70
|
+
const r = e.map((n) => ({
|
|
71
|
+
useScope: n(),
|
|
72
|
+
scopeName: n.scopeName
|
|
73
|
+
}));
|
|
74
|
+
return function(c) {
|
|
75
|
+
const s = r.reduce((i, { useScope: f, scopeName: S }) => {
|
|
76
|
+
const R = f(c)[`__scope${S}`];
|
|
77
|
+
return { ...i, ...R };
|
|
78
|
+
}, {});
|
|
79
|
+
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
return o.scopeName = t.scopeName, o;
|
|
83
|
+
}
|
|
84
|
+
var _ = l.forwardRef((e, t) => {
|
|
85
|
+
const { children: o, ...r } = e, n = l.Children.toArray(o), c = n.find(V);
|
|
86
|
+
if (c) {
|
|
87
|
+
const s = c.props.children, i = n.map((f) => f === c ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : f);
|
|
88
|
+
return /* @__PURE__ */ y(N, { ...r, ref: t, children: l.isValidElement(s) ? l.cloneElement(s, void 0, i) : null });
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ y(N, { ...r, ref: t, children: o });
|
|
91
|
+
});
|
|
92
|
+
_.displayName = "Slot";
|
|
93
|
+
var N = l.forwardRef((e, t) => {
|
|
94
|
+
const { children: o, ...r } = e;
|
|
95
|
+
if (l.isValidElement(o)) {
|
|
96
|
+
const n = j(o);
|
|
97
|
+
return l.cloneElement(o, {
|
|
98
|
+
...$(r, o.props),
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
ref: t ? O(t, n) : n
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return l.Children.count(o) > 1 ? l.Children.only(null) : null;
|
|
104
|
+
});
|
|
105
|
+
N.displayName = "SlotClone";
|
|
106
|
+
var T = ({ children: e }) => /* @__PURE__ */ y(w, { children: e });
|
|
107
|
+
function V(e) {
|
|
108
|
+
return l.isValidElement(e) && e.type === T;
|
|
109
|
+
}
|
|
110
|
+
function $(e, t) {
|
|
111
|
+
const o = { ...t };
|
|
112
|
+
for (const r in t) {
|
|
113
|
+
const n = e[r], c = t[r];
|
|
114
|
+
/^on[A-Z]/.test(r) ? n && c ? o[r] = (...i) => {
|
|
115
|
+
c(...i), n(...i);
|
|
116
|
+
} : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...c } : r === "className" && (o[r] = [n, c].filter(Boolean).join(" "));
|
|
117
|
+
}
|
|
118
|
+
return { ...e, ...o };
|
|
119
|
+
}
|
|
120
|
+
function j(e) {
|
|
121
|
+
var r, n;
|
|
122
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
123
|
+
return o ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
124
|
+
}
|
|
125
|
+
function k(e) {
|
|
126
|
+
const t = e + "CollectionProvider", [o, r] = E(t), [n, c] = o(
|
|
127
|
+
t,
|
|
128
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
129
|
+
), s = (a) => {
|
|
130
|
+
const { scope: u, children: p } = a, m = h.useRef(null), d = h.useRef(/* @__PURE__ */ new Map()).current;
|
|
131
|
+
return /* @__PURE__ */ y(n, { scope: u, itemMap: d, collectionRef: m, children: p });
|
|
132
|
+
};
|
|
133
|
+
s.displayName = t;
|
|
134
|
+
const i = e + "CollectionSlot", f = h.forwardRef(
|
|
135
|
+
(a, u) => {
|
|
136
|
+
const { scope: p, children: m } = a, d = c(i, p), x = I(u, d.collectionRef);
|
|
137
|
+
return /* @__PURE__ */ y(_, { ref: x, children: m });
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
f.displayName = i;
|
|
141
|
+
const S = e + "CollectionItemSlot", M = "data-radix-collection-item", R = h.forwardRef(
|
|
142
|
+
(a, u) => {
|
|
143
|
+
const { scope: p, children: m, ...d } = a, x = h.useRef(null), g = I(u, x), P = c(S, p);
|
|
144
|
+
return h.useEffect(() => (P.itemMap.set(x, { ref: x, ...d }), () => void P.itemMap.delete(x))), /* @__PURE__ */ y(_, { [M]: "", ref: g, children: m });
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
R.displayName = S;
|
|
148
|
+
function C(a) {
|
|
149
|
+
const u = c(e + "CollectionConsumer", a);
|
|
150
|
+
return h.useCallback(() => {
|
|
151
|
+
const m = u.collectionRef.current;
|
|
152
|
+
if (!m) return [];
|
|
153
|
+
const d = Array.from(m.querySelectorAll(`[${M}]`));
|
|
154
|
+
return Array.from(u.itemMap.values()).sort(
|
|
155
|
+
(P, b) => d.indexOf(P.ref.current) - d.indexOf(b.ref.current)
|
|
156
|
+
);
|
|
157
|
+
}, [u.collectionRef, u.itemMap]);
|
|
158
|
+
}
|
|
159
|
+
return [
|
|
160
|
+
{ Provider: s, Slot: f, ItemSlot: R },
|
|
161
|
+
C,
|
|
162
|
+
r
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
export {
|
|
166
|
+
k as a,
|
|
167
|
+
E as b,
|
|
168
|
+
O as c,
|
|
169
|
+
L as d,
|
|
170
|
+
I as u
|
|
171
|
+
};
|