@kolking/react-ui 1.8.13 → 1.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Dialog/withDialog.d.ts +3 -2
- package/dist/components/Dialog/withDialog.js +16 -16
- package/dist/components/Icon/Icon.js +115 -112
- package/dist/components/Icon/icons.d.ts +1 -1
- package/dist/components/Icon/icons.js +3 -0
- package/dist/components/Segmented/Segmented.d.ts +1 -1
- package/dist/components/Segmented/Segmented.js +44 -40
- package/dist/components/Tag/Tag.d.ts +14 -4
- package/dist/components/Tag/Tag.js +49 -31
- package/dist/index.d.ts +1 -0
- package/dist/index.js +39 -32
- package/dist/styles/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const icons: readonly ["arrow-down-circle", "arrow-down-outline", "arrow-down", "arrow-left-circle", "arrow-left-outline", "arrow-left", "arrow-right-circle", "arrow-right-outline", "arrow-right", "arrow-up-circle", "arrow-up-outline", "arrow-up", "bell", "bubble-outline", "bubble", "bubbles-outline", "bubbles", "bug", "calendar-date", "calendar", "camera", "cart-outline", "cart", "cat", "checkmark-circle", "checkmark-outline", "checkmark", "chevron-left", "chevron-right", "clock-circle", "clock-outline", "close", "cloud-outline", "cloud", "collapse", "cross-circle", "cross-outline", "cross", "delete-outline", "delete", "denied", "disclosure", "dropdown", "envelope-outline", "envelope", "error-circle", "error-outline", "expand", "export", "eye-off", "eye", "eyeglasses", "frame", "gear", "heart-outline", "heart", "help-circle", "help-outline", "import", "info-circle", "info-outline", "key", "location-cross", "location", "lock-open", "lock", "map-outline", "map", "menu", "minus-circle", "minus-outline", "minus", "page-outline", "page", "paper-plane", "paperclip", "pencil-circle", "pencil-outline", "pencil", "person", "phone-circle", "phone-outline", "phone", "photos", "playback-next", "playback-pause", "playback-play", "playback-prev", "playback-stop", "plus-circle", "plus-outline", "plus", "printer", "profile-outline", "profile", "redo-circle", "redo-outline", "refresh", "reorder", "search", "shield-checkmark", "shield-lock", "star-circle", "star-outline", "star", "triangle-down", "triangle-left", "triangle-right", "triangle-up", "undo-circle", "undo-outline", "warning-outline", "warning"];
|
|
1
|
+
declare const icons: readonly ["arrow-down-circle", "arrow-down-outline", "arrow-down", "arrow-left-circle", "arrow-left-outline", "arrow-left", "arrow-right-circle", "arrow-right-outline", "arrow-right", "arrow-up-circle", "arrow-up-outline", "arrow-up", "bell", "bubble-outline", "bubble", "bubbles-outline", "bubbles", "bug", "calendar-checkmark", "calendar-date", "calendar-plus", "calendar", "camera", "cart-outline", "cart", "cat", "checkmark-circle", "checkmark-outline", "checkmark", "chevron-left", "chevron-right", "clock-circle", "clock-outline", "close", "cloud-outline", "cloud", "collapse", "copy", "cross-circle", "cross-outline", "cross", "delete-outline", "delete", "denied", "disclosure", "dropdown", "envelope-outline", "envelope", "error-circle", "error-outline", "expand", "export", "eye-off", "eye", "eyeglasses", "frame", "gear", "heart-outline", "heart", "help-circle", "help-outline", "import", "info-circle", "info-outline", "key", "location-cross", "location", "lock-open", "lock", "map-outline", "map", "menu", "minus-circle", "minus-outline", "minus", "page-outline", "page", "paper-plane", "paperclip", "pencil-circle", "pencil-outline", "pencil", "person", "phone-circle", "phone-outline", "phone", "photos", "playback-next", "playback-pause", "playback-play", "playback-prev", "playback-stop", "plus-circle", "plus-outline", "plus", "printer", "profile-outline", "profile", "redo-circle", "redo-outline", "refresh", "reorder", "search", "shield-checkmark", "shield-lock", "star-circle", "star-outline", "star", "triangle-down", "triangle-left", "triangle-right", "triangle-up", "undo-circle", "undo-outline", "warning-outline", "warning"];
|
|
2
2
|
export default icons;
|
|
@@ -17,7 +17,9 @@ const e = [
|
|
|
17
17
|
"bubbles-outline",
|
|
18
18
|
"bubbles",
|
|
19
19
|
"bug",
|
|
20
|
+
"calendar-checkmark",
|
|
20
21
|
"calendar-date",
|
|
22
|
+
"calendar-plus",
|
|
21
23
|
"calendar",
|
|
22
24
|
"camera",
|
|
23
25
|
"cart-outline",
|
|
@@ -34,6 +36,7 @@ const e = [
|
|
|
34
36
|
"cloud-outline",
|
|
35
37
|
"cloud",
|
|
36
38
|
"collapse",
|
|
39
|
+
"copy",
|
|
37
40
|
"cross-circle",
|
|
38
41
|
"cross-outline",
|
|
39
42
|
"cross",
|
|
@@ -6,4 +6,4 @@ export type SegmentedProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelec
|
|
|
6
6
|
margin?: React.CSSProperties['margin'];
|
|
7
7
|
onSelect: (index: number) => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const Segmented: ({ size, items, selected, disabled, margin, className, style, onSelect, ...props }: SegmentedProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const Segmented: ({ size, items, selected, disabled, margin, children, className, style, onSelect, ...props }: SegmentedProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,49 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Composite as
|
|
4
|
-
import { cssProps as
|
|
5
|
-
const
|
|
6
|
-
segmented:
|
|
7
|
-
},
|
|
8
|
-
size:
|
|
9
|
-
items:
|
|
1
|
+
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import { Composite as u, CompositeItem as h } from "@floating-ui/react";
|
|
4
|
+
import { cssProps as y, wrapNode as C } from "../../utils/helpers.js";
|
|
5
|
+
const b = "Segmented_segmented_UOs8Z", j = {
|
|
6
|
+
segmented: b
|
|
7
|
+
}, w = ({
|
|
8
|
+
size: m,
|
|
9
|
+
items: r,
|
|
10
10
|
selected: t,
|
|
11
|
-
disabled:
|
|
11
|
+
disabled: o,
|
|
12
12
|
margin: a,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
children: n,
|
|
14
|
+
className: d,
|
|
15
|
+
style: p,
|
|
16
|
+
onSelect: c,
|
|
17
|
+
...g
|
|
18
|
+
}) => /* @__PURE__ */ l(
|
|
19
|
+
u,
|
|
19
20
|
{
|
|
20
|
-
...
|
|
21
|
+
...g,
|
|
21
22
|
role: "radiogroup",
|
|
22
23
|
"data-segmented": !0,
|
|
23
|
-
"data-disabled":
|
|
24
|
-
className:
|
|
25
|
-
style: { ...
|
|
26
|
-
children:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
"data-disabled": o,
|
|
25
|
+
className: f(j.segmented, d),
|
|
26
|
+
style: { ...p, ...y({ size: m, margin: a }) },
|
|
27
|
+
children: [
|
|
28
|
+
r.map((i, e) => /* @__PURE__ */ s(
|
|
29
|
+
h,
|
|
30
|
+
{
|
|
31
|
+
render: /* @__PURE__ */ s(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
role: "radio",
|
|
35
|
+
type: "button",
|
|
36
|
+
disabled: o,
|
|
37
|
+
"data-segmented-item": e,
|
|
38
|
+
"aria-checked": e === t,
|
|
39
|
+
"data-selected": e === t,
|
|
40
|
+
onClick: () => e !== t && c(e),
|
|
41
|
+
children: C(i, "span")
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
e
|
|
46
|
+
)),
|
|
47
|
+
n
|
|
48
|
+
]
|
|
45
49
|
}
|
|
46
50
|
);
|
|
47
51
|
export {
|
|
48
|
-
|
|
52
|
+
w as Segmented
|
|
49
53
|
};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { PolymorphicProps } from '../../utils/helpers';
|
|
2
3
|
import { PaletteColor } from '../../utils/colors';
|
|
3
|
-
export type TagProps
|
|
4
|
+
export type TagProps<T extends React.ElementType = 'span'> = PolymorphicProps<T, {
|
|
5
|
+
as?: T;
|
|
4
6
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
variant?: 'default' | 'solid';
|
|
7
|
+
variant?: 'default' | 'solid' | 'plain';
|
|
6
8
|
scheme?: PaletteColor;
|
|
7
9
|
title?: React.ReactNode;
|
|
8
10
|
icon?: React.ReactElement;
|
|
9
11
|
iconPosition?: 'start' | 'end';
|
|
10
|
-
}
|
|
11
|
-
export declare const Tag:
|
|
12
|
+
}>;
|
|
13
|
+
export declare const Tag: <T extends React.ElementType = "span">(props: {
|
|
14
|
+
as?: T | undefined;
|
|
15
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
16
|
+
variant?: "default" | "solid" | "plain";
|
|
17
|
+
scheme?: PaletteColor;
|
|
18
|
+
title?: React.ReactNode;
|
|
19
|
+
icon?: React.ReactElement;
|
|
20
|
+
iconPosition?: "start" | "end";
|
|
21
|
+
} & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "title" | "size" | "as" | "icon" | "scheme" | "variant" | "iconPosition"> & React.RefAttributes<unknown>) => React.ReactElement | null;
|
|
@@ -1,58 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { wrapNode as
|
|
4
|
-
const
|
|
5
|
-
tag:
|
|
1
|
+
import { jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import T from "classnames";
|
|
3
|
+
import { fixedForwardRef as f, wrapNode as c, cssProps as y } from "../../utils/helpers.js";
|
|
4
|
+
const b = "Tag_tag_-ovOm", _ = {
|
|
5
|
+
tag: b,
|
|
6
6
|
"default-gray": "Tag_default-gray_Ju2wo",
|
|
7
7
|
"solid-gray": "Tag_solid-gray_q6GO4",
|
|
8
|
+
"plain-gray": "Tag_plain-gray_VOC5n",
|
|
8
9
|
"default-brown": "Tag_default-brown_csCrz",
|
|
9
10
|
"solid-brown": "Tag_solid-brown_5IxVx",
|
|
11
|
+
"plain-brown": "Tag_plain-brown_TtI-e",
|
|
10
12
|
"default-red": "Tag_default-red_5NeXY",
|
|
11
13
|
"solid-red": "Tag_solid-red_uPhj-",
|
|
14
|
+
"plain-red": "Tag_plain-red_u1m8b",
|
|
12
15
|
"default-orange": "Tag_default-orange_fuy0F",
|
|
13
16
|
"solid-orange": "Tag_solid-orange_DbiG6",
|
|
17
|
+
"plain-orange": "Tag_plain-orange_-jRyN",
|
|
14
18
|
"default-yellow": "Tag_default-yellow_RMd-J",
|
|
15
19
|
"solid-yellow": "Tag_solid-yellow_nQDFs",
|
|
20
|
+
"plain-yellow": "Tag_plain-yellow_fI3bA",
|
|
16
21
|
"default-green": "Tag_default-green_YHGrt",
|
|
17
22
|
"solid-green": "Tag_solid-green_2UpBu",
|
|
23
|
+
"plain-green": "Tag_plain-green_LBoDH",
|
|
18
24
|
"default-teal": "Tag_default-teal_AwZI-",
|
|
19
25
|
"solid-teal": "Tag_solid-teal_fVVK8",
|
|
26
|
+
"plain-teal": "Tag_plain-teal_8AXj2",
|
|
20
27
|
"default-cyan": "Tag_default-cyan_8KUgG",
|
|
21
28
|
"solid-cyan": "Tag_solid-cyan_s5VjG",
|
|
29
|
+
"plain-cyan": "Tag_plain-cyan_aXS-K",
|
|
22
30
|
"default-blue": "Tag_default-blue_jKbT1",
|
|
23
31
|
"solid-blue": "Tag_solid-blue_0AuNj",
|
|
32
|
+
"plain-blue": "Tag_plain-blue_ujHf1",
|
|
24
33
|
"default-indigo": "Tag_default-indigo_b26lU",
|
|
25
34
|
"solid-indigo": "Tag_solid-indigo_2gfJj",
|
|
35
|
+
"plain-indigo": "Tag_plain-indigo_fYbSc",
|
|
26
36
|
"default-purple": "Tag_default-purple_oBbek",
|
|
27
37
|
"solid-purple": "Tag_solid-purple_e10WH",
|
|
38
|
+
"plain-purple": "Tag_plain-purple_sVJ5H",
|
|
28
39
|
"default-accent": "Tag_default-accent_uUXnO",
|
|
29
|
-
"solid-accent": "Tag_solid-accent_bbTSM"
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
"solid-accent": "Tag_solid-accent_bbTSM",
|
|
41
|
+
"plain-accent": "Tag_plain-accent_cqQHI"
|
|
42
|
+
};
|
|
43
|
+
function w({
|
|
44
|
+
as: d,
|
|
45
|
+
size: g,
|
|
32
46
|
variant: a = "default",
|
|
33
47
|
scheme: l = "gray",
|
|
34
|
-
title:
|
|
35
|
-
icon:
|
|
36
|
-
iconPosition:
|
|
37
|
-
className:
|
|
38
|
-
style:
|
|
39
|
-
children:
|
|
40
|
-
...
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
title: o,
|
|
49
|
+
icon: e,
|
|
50
|
+
iconPosition: n = "start",
|
|
51
|
+
className: i,
|
|
52
|
+
style: t,
|
|
53
|
+
children: r,
|
|
54
|
+
...u
|
|
55
|
+
}, p) {
|
|
56
|
+
return /* @__PURE__ */ s(
|
|
57
|
+
d ?? "span",
|
|
58
|
+
{
|
|
59
|
+
...u,
|
|
60
|
+
ref: p,
|
|
61
|
+
"data-tag": a,
|
|
62
|
+
"data-scheme": l,
|
|
63
|
+
className: T(_.tag, _[`${a}-${l}`], i),
|
|
64
|
+
style: { ...t, ...y({ size: g }) },
|
|
65
|
+
children: [
|
|
66
|
+
n === "start" && e,
|
|
67
|
+
c(r || o, "span"),
|
|
68
|
+
n === "end" && e
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
const x = f(w);
|
|
56
74
|
export {
|
|
57
|
-
|
|
75
|
+
x as Tag
|
|
58
76
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import { Avatar as e } from "./components/Avatar/Avatar.js";
|
|
|
2
2
|
import { Badge as p } from "./components/Badge/Badge.js";
|
|
3
3
|
import { Breadcrumbs as x } from "./components/Breadcrumbs/Breadcrumbs.js";
|
|
4
4
|
import { Button as a } from "./components/Button/Button.js";
|
|
5
|
-
import { Dialog as l, DialogClose as g, DialogContent as n, DialogFooter as
|
|
6
|
-
import { useDialog as
|
|
5
|
+
import { Dialog as l, DialogClose as g, DialogContent as n, DialogFooter as s, DialogTitle as d } from "./components/Dialog/Dialog.js";
|
|
6
|
+
import { useDialog as u } from "./components/Dialog/useDialog.js";
|
|
7
7
|
import { withDialog as T } from "./components/Dialog/withDialog.js";
|
|
8
|
-
import { Flex as
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import { Field as
|
|
11
|
-
import { I as
|
|
8
|
+
import { Flex as B } from "./components/Flex/Flex.js";
|
|
9
|
+
import { Checkbox as w } from "./components/Fields/Checkbox.js";
|
|
10
|
+
import { Field as I, FieldDescription as M, FieldLabel as P } from "./components/Fields/Field.js";
|
|
11
|
+
import { I as b } from "./Input-D46mAsdt.js";
|
|
12
12
|
import { Numeric as N } from "./components/Fields/Numeric.js";
|
|
13
|
-
import { Radio as
|
|
14
|
-
import { Range as
|
|
15
|
-
import { Select as
|
|
16
|
-
import { Switch as
|
|
17
|
-
import { Textarea as
|
|
18
|
-
import { V as
|
|
13
|
+
import { Radio as E } from "./components/Fields/Radio.js";
|
|
14
|
+
import { Range as k } from "./components/Fields/Range.js";
|
|
15
|
+
import { Select as G } from "./components/Fields/Select.js";
|
|
16
|
+
import { Switch as L } from "./components/Fields/Switch.js";
|
|
17
|
+
import { Textarea as q } from "./components/Fields/Textarea.js";
|
|
18
|
+
import { V as z } from "./ValidationTooltip-D8d9O6Re.js";
|
|
19
19
|
import { Heading as K } from "./components/Heading/Heading.js";
|
|
20
20
|
import { Icon as Q } from "./components/Icon/Icon.js";
|
|
21
21
|
import { Menu as W } from "./components/Menu/Menu.js";
|
|
@@ -28,28 +28,29 @@ import { ProgressCircular as xo } from "./components/Progress/ProgressCircular.j
|
|
|
28
28
|
import { Segmented as ao } from "./components/Segmented/Segmented.js";
|
|
29
29
|
import { Spinner as lo } from "./components/Spinner/Spinner.js";
|
|
30
30
|
import { Tag as no } from "./components/Tag/Tag.js";
|
|
31
|
-
import { ToggleButton as
|
|
31
|
+
import { ToggleButton as co } from "./components/ToggleButton/ToggleButton.js";
|
|
32
32
|
import { ToggleGroup as Do } from "./components/ToggleButton/ToggleGroup.js";
|
|
33
|
-
import { Tooltip as
|
|
33
|
+
import { Tooltip as Fo } from "./components/Tooltip/Tooltip.js";
|
|
34
34
|
import { palette as So } from "./utils/colors.js";
|
|
35
|
+
import { clamp as Co, cssProps as Io, fixedForwardRef as Mo, getElementRef as Po, getErrorMessage as Ro, wrapNode as bo } from "./utils/helpers.js";
|
|
35
36
|
export {
|
|
36
37
|
e as Avatar,
|
|
37
38
|
p as Badge,
|
|
38
39
|
x as Breadcrumbs,
|
|
39
40
|
a as Button,
|
|
40
|
-
|
|
41
|
+
w as Checkbox,
|
|
41
42
|
l as Dialog,
|
|
42
43
|
g as DialogClose,
|
|
43
44
|
n as DialogContent,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
s as DialogFooter,
|
|
46
|
+
d as DialogTitle,
|
|
47
|
+
I as Field,
|
|
48
|
+
M as FieldDescription,
|
|
49
|
+
P as FieldLabel,
|
|
50
|
+
B as Flex,
|
|
50
51
|
K as Heading,
|
|
51
52
|
Q as Icon,
|
|
52
|
-
|
|
53
|
+
b as Input,
|
|
53
54
|
W as Menu,
|
|
54
55
|
Y as MenuItem,
|
|
55
56
|
_ as MenuSeparator,
|
|
@@ -58,19 +59,25 @@ export {
|
|
|
58
59
|
eo as Popover,
|
|
59
60
|
po as ProgressBar,
|
|
60
61
|
xo as ProgressCircular,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
E as Radio,
|
|
63
|
+
k as Range,
|
|
63
64
|
ao as Segmented,
|
|
64
|
-
|
|
65
|
+
G as Select,
|
|
65
66
|
lo as Spinner,
|
|
66
|
-
|
|
67
|
+
L as Switch,
|
|
67
68
|
no as Tag,
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
q as Textarea,
|
|
70
|
+
co as ToggleButton,
|
|
70
71
|
Do as ToggleGroup,
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
Fo as Tooltip,
|
|
73
|
+
z as ValidationTooltip,
|
|
74
|
+
Co as clamp,
|
|
75
|
+
Io as cssProps,
|
|
76
|
+
Mo as fixedForwardRef,
|
|
77
|
+
Po as getElementRef,
|
|
78
|
+
Ro as getErrorMessage,
|
|
73
79
|
So as palette,
|
|
74
|
-
|
|
75
|
-
T as withDialog
|
|
80
|
+
u as useDialog,
|
|
81
|
+
T as withDialog,
|
|
82
|
+
bo as wrapNode
|
|
76
83
|
};
|