@pismo/marola 2.1.20 → 2.1.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/Draggable.css +1 -1
- package/dist/assets/ResultContainer.css +1 -0
- package/dist/components/Draggable/Draggable.js +69 -69
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/ResultContainer/ResultContainer.d.ts +12 -0
- package/dist/components/ResultContainer/ResultContainer.js +22 -0
- package/dist/components/ResultContainer/ResultContainer.spec.d.ts +1 -0
- package/dist/components/ResultContainer/ResultContainer.stories.d.ts +26 -0
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.js +24 -27
- package/dist/components/ResultWithChips/ResultWithChips.spec.d.ts +1 -0
- package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +26 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +85 -83
- package/dist/utils/iconsList.js +160 -154
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
._draggable-
|
|
1
|
+
._draggable-container_i3ufr_1{position:relative}._draggable-container-draggable_i3ufr_4{cursor:grabbing}._draggable-container-draggable-dragging_i3ufr_7{cursor:default}._draggable-zone_i3ufr_11{position:relative;border:1px dashed transparent}._draggable-zone-to-drop_i3ufr_15{position:absolute;top:var(--props-offset-zone-top-to-drop);z-index:2;display:flex;flex-direction:column;width:100%;height:calc(100% + var(--props-offset-zone-down-to-drop))}._draggable-zone-to-drop_i3ufr_15>div{flex:1}._draggable-zone-replace_i3ufr_27{background-color:var(--colors-base-blue-1);border:1px dashed var(--colors-base-blue-4)}._draggable-to-drop_i3ufr_32{position:absolute;z-index:1;display:block;width:100%;height:2px;content:" ";background-color:var(--colors-brand-primary-color-primary);opacity:0}._draggable-to-drop-top_i3ufr_42{top:-5;left:0}._draggable-to-drop-down_i3ufr_46{bottom:-5;left:0}._draggable-to-drop-visible_i3ufr_50{opacity:1}._draggable-to-drop_i3ufr_32:before,._draggable-to-drop_i3ufr_32:after{position:absolute;top:-4;left:0;width:5px;height:5px;content:"";background-color:#fff;border:2px solid var(--colors-brand-primary-color-primary);border-radius:50%}._draggable-to-drop_i3ufr_32:after{right:0;left:initial}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1n6cs_1{position:relative;padding:1.5rem 1rem;background:var(--white-100);border:1px solid var(--gray-50);border-radius:.375rem}._container_1n6cs_1:not(first-child){min-height:4.125rem;padding:1rem;margin-top:1.5rem}._container_1n6cs_1 ._label_1n6cs_13{position:absolute;top:-1px;left:1.18rem;display:flex;align-items:center;justify-content:center;padding:0 .25rem;font-family:Lato;font-size:.6875rem;font-style:normal;font-weight:400;line-height:1rem;color:var(--gray-75);background:var(--white-100);transform:translateY(-50%)}._container_1n6cs_1 ._result-content_1n6cs_30{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as K, useState as w, useMemo as
|
|
1
|
+
import { jsxs as u, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as K, useState as w, useMemo as V } from "react";
|
|
3
3
|
import { c as o } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { r as P } from "../../index-1UpBa69h.js";
|
|
5
5
|
import { useDraggable as Q } from "./useDraggable.js";
|
|
6
|
-
import '../../assets/Draggable.css';const
|
|
7
|
-
"draggable-container": "_draggable-
|
|
8
|
-
"draggable-container-draggable": "_draggable-container-
|
|
9
|
-
"draggable-container-draggable-dragging": "_draggable-container-draggable-
|
|
10
|
-
"draggable-zone": "_draggable-
|
|
11
|
-
"draggable-zone-to-drop": "_draggable-zone-to-
|
|
12
|
-
"draggable-zone-replace": "_draggable-zone-
|
|
13
|
-
"draggable-to-drop": "_draggable-to-
|
|
14
|
-
"draggable-to-drop-top": "_draggable-to-drop-
|
|
15
|
-
"draggable-to-drop-down": "_draggable-to-drop-
|
|
16
|
-
"draggable-to-drop-visible": "_draggable-to-drop-
|
|
17
|
-
},
|
|
18
|
-
children:
|
|
6
|
+
import '../../assets/Draggable.css';const r = {
|
|
7
|
+
"draggable-container": "_draggable-container_i3ufr_1",
|
|
8
|
+
"draggable-container-draggable": "_draggable-container-draggable_i3ufr_4",
|
|
9
|
+
"draggable-container-draggable-dragging": "_draggable-container-draggable-dragging_i3ufr_7",
|
|
10
|
+
"draggable-zone": "_draggable-zone_i3ufr_11",
|
|
11
|
+
"draggable-zone-to-drop": "_draggable-zone-to-drop_i3ufr_15",
|
|
12
|
+
"draggable-zone-replace": "_draggable-zone-replace_i3ufr_27",
|
|
13
|
+
"draggable-to-drop": "_draggable-to-drop_i3ufr_32",
|
|
14
|
+
"draggable-to-drop-top": "_draggable-to-drop-top_i3ufr_42",
|
|
15
|
+
"draggable-to-drop-down": "_draggable-to-drop-down_i3ufr_46",
|
|
16
|
+
"draggable-to-drop-visible": "_draggable-to-drop-visible_i3ufr_50"
|
|
17
|
+
}, ea = ({
|
|
18
|
+
children: L,
|
|
19
19
|
id: d,
|
|
20
|
-
onDropItem:
|
|
21
|
-
data:
|
|
20
|
+
onDropItem: z,
|
|
21
|
+
data: j,
|
|
22
22
|
index: s,
|
|
23
|
-
onDragStarted:
|
|
24
|
-
onDragEnded:
|
|
23
|
+
onDragStarted: x,
|
|
24
|
+
onDragEnded: h,
|
|
25
25
|
forceDirection: i,
|
|
26
26
|
noDraggable: n,
|
|
27
27
|
classNameElementDrag: l,
|
|
28
|
-
classNameZoneWrapper:
|
|
28
|
+
classNameZoneWrapper: m,
|
|
29
29
|
classNameZoneOnOverWrapper: I,
|
|
30
|
-
offsetZoneTopToDrop:
|
|
31
|
-
offsetZoneDownToDrop:
|
|
30
|
+
offsetZoneTopToDrop: y,
|
|
31
|
+
offsetZoneDownToDrop: O,
|
|
32
32
|
["data-testid"]: S,
|
|
33
33
|
["data-zone-testid"]: Y,
|
|
34
34
|
["data-zone-up-testid"]: C,
|
|
35
35
|
["data-zone-down-testid"]: F,
|
|
36
36
|
["data-divider-down-testid"]: M,
|
|
37
37
|
["data-divider-up-testid"]: R,
|
|
38
|
-
mode:
|
|
38
|
+
mode: f = "sort",
|
|
39
39
|
renderWithoutDrag: U
|
|
40
40
|
}) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
41
|
+
const c = K(null), [g, p] = w(!1), { setFromElement: W, fromElement: a } = Q(), [_, T] = w(!1), [v, N] = w(), Z = (e) => {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
const t = a == null ? void 0 : a.id;
|
|
44
|
+
c.current && (!t || t === d || p(!0));
|
|
45
45
|
}, k = () => {
|
|
46
|
-
|
|
46
|
+
p(!1);
|
|
47
47
|
}, q = () => {
|
|
48
|
-
|
|
48
|
+
p(!1), h && h(), T(!1);
|
|
49
49
|
}, A = () => {
|
|
50
50
|
if (n || d === (a == null ? void 0 : a.id)) return;
|
|
51
|
-
const
|
|
51
|
+
const e = () => {
|
|
52
52
|
const J = window.scrollY || window.pageYOffset;
|
|
53
53
|
P.flushSync(() => {
|
|
54
|
-
|
|
54
|
+
p(!1), z && z(a == null ? void 0 : a.data, v), setTimeout(() => {
|
|
55
55
|
window == null || window.scrollTo(0, J);
|
|
56
56
|
}, 100);
|
|
57
57
|
});
|
|
58
|
-
},
|
|
59
|
-
typeof
|
|
58
|
+
}, t = document;
|
|
59
|
+
typeof t.startViewTransition == "function" ? t.startViewTransition(e) : e();
|
|
60
60
|
}, B = () => {
|
|
61
|
-
var
|
|
61
|
+
var e;
|
|
62
62
|
W({
|
|
63
63
|
id: d,
|
|
64
|
-
data:
|
|
64
|
+
data: j,
|
|
65
65
|
index: s
|
|
66
|
-
}),
|
|
67
|
-
var
|
|
68
|
-
l && ((
|
|
66
|
+
}), T(!0), x && x(), l && ((e = c.current) == null || e.classList.add(l)), setTimeout(() => {
|
|
67
|
+
var t;
|
|
68
|
+
l && ((t = c.current) == null || t.classList.remove(l));
|
|
69
69
|
}, 1);
|
|
70
|
-
}, D =
|
|
70
|
+
}, D = V(() => {
|
|
71
71
|
if (i === "up" || !a) return !1;
|
|
72
|
-
const
|
|
73
|
-
return a.index !=
|
|
74
|
-
}, [s, a == null ? void 0 : a.index, i,
|
|
72
|
+
const e = s;
|
|
73
|
+
return a.index != e + 1;
|
|
74
|
+
}, [s, a == null ? void 0 : a.index, i, _]), G = V(() => {
|
|
75
75
|
if (i === "down" || !a) return !1;
|
|
76
|
-
const
|
|
77
|
-
return a.index + 1 !=
|
|
78
|
-
}, [s, a == null ? void 0 : a.index, i,
|
|
79
|
-
"--props-offset-zone-top-to-drop":
|
|
80
|
-
"--props-offset-zone-down-to-drop":
|
|
76
|
+
const e = s;
|
|
77
|
+
return a.index + 1 != e;
|
|
78
|
+
}, [s, a == null ? void 0 : a.index, i, _]), H = {
|
|
79
|
+
"--props-offset-zone-top-to-drop": y || "-10px",
|
|
80
|
+
"--props-offset-zone-down-to-drop": O || "20px"
|
|
81
81
|
};
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
82
|
+
return /* @__PURE__ */ u("div", { className: o(r["draggable-container"]), "data-testid": S, style: H, children: [
|
|
83
|
+
f === "sort" && /* @__PURE__ */ b(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
86
|
className: o(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
g && v === "up" &&
|
|
87
|
+
r["draggable-to-drop"],
|
|
88
|
+
r["draggable-to-drop-top"],
|
|
89
|
+
g && v === "up" && r["draggable-to-drop-visible"]
|
|
90
90
|
),
|
|
91
91
|
"data-testid": R
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ u(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
className: o(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
!n && g &&
|
|
98
|
+
r["draggable-zone"],
|
|
99
|
+
m,
|
|
100
|
+
!n && g && f == "replace" && r["draggable-zone-replace"],
|
|
101
101
|
!n && g && I
|
|
102
102
|
),
|
|
103
103
|
children: [
|
|
104
104
|
U,
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ u(
|
|
106
106
|
"div",
|
|
107
107
|
{
|
|
108
108
|
id: d,
|
|
@@ -112,34 +112,34 @@ import '../../assets/Draggable.css';const e = {
|
|
|
112
112
|
onDragEnd: q,
|
|
113
113
|
onDrop: A,
|
|
114
114
|
draggable: !n,
|
|
115
|
-
ref:
|
|
115
|
+
ref: c,
|
|
116
116
|
onDragStart: B,
|
|
117
117
|
className: o(
|
|
118
|
-
|
|
119
|
-
!n &&
|
|
118
|
+
_ && r["draggable-container-draggable-dragging"],
|
|
119
|
+
!n && r["draggable-container-draggable"]
|
|
120
120
|
),
|
|
121
121
|
style: {
|
|
122
122
|
viewTransitionName: d
|
|
123
123
|
},
|
|
124
124
|
children: [
|
|
125
|
-
g && /* @__PURE__ */
|
|
126
|
-
G && /* @__PURE__ */ b("div", { "data-testid": C, onDragOver: () =>
|
|
127
|
-
D && /* @__PURE__ */ b("div", { "data-testid": F, onDragOver: () =>
|
|
125
|
+
g && /* @__PURE__ */ u("div", { className: o(r["draggable-zone-to-drop"]), children: [
|
|
126
|
+
G && /* @__PURE__ */ b("div", { "data-testid": C, onDragOver: () => N("up") }),
|
|
127
|
+
D && /* @__PURE__ */ b("div", { "data-testid": F, onDragOver: () => N("down") })
|
|
128
128
|
] }),
|
|
129
|
-
|
|
129
|
+
L
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
135
|
),
|
|
136
|
-
|
|
136
|
+
f == "sort" && /* @__PURE__ */ b(
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
className: o(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
g && v === "down" &&
|
|
140
|
+
r["draggable-to-drop"],
|
|
141
|
+
r["draggable-to-drop-down"],
|
|
142
|
+
g && v === "down" && r["draggable-to-drop-visible"]
|
|
143
143
|
),
|
|
144
144
|
"data-testid": M
|
|
145
145
|
}
|
|
@@ -147,5 +147,5 @@ import '../../assets/Draggable.css';const e = {
|
|
|
147
147
|
] });
|
|
148
148
|
};
|
|
149
149
|
export {
|
|
150
|
-
|
|
150
|
+
ea as Draggable
|
|
151
151
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file is automatically generated. Any changes will be lost.
|
|
3
3
|
* run "yarn generate-icon-types" or "yarn build" to regenerate it.
|
|
4
4
|
*/
|
|
5
|
-
export type IconName = 'alien-8bit' | 'arrow-down-arrow-up' | 'arrow-down-z-a' | 'arrow-left' | 'arrow-right' | 'arrow-right-to-arc' | 'arrow-up-right-from-square' | 'arrows-rotate' | 'badge-check' | 'bell' | 'building-columns' | 'calendar-days' | 'check-double' | 'chevron-down' | 'chevron-right' | 'chevron-up' | 'chevrons-right' | 'circle' | 'circle-arrow-right' | 'circle-check' | 'circle-check-outline' | 'circle-exclamation' | 'circle-exclamation-outline' | 'circle-info' | 'circle-minus' | 'circle-x' | 'circle-xmark' | 'circle-xmark-outline' | 'clock' | 'clock-rotate-left' | 'coin' | 'coins' | 'computer-classic' | 'copy' | 'credit-card' | 'credit-card-blank' | 'credit-card-front' | 'download' | 'ellipsis-vertical' | 'empty-img' | 'empty-set' | 'eye' | 'eye-slash' | 'filter-list' | 'fingerprint' | 'folder-magnifying-glass' | 'folder-open' | 'grid-2' | 'grid-horizontal' | 'grip-dots-vertical' | 'headphones-simple' | 'house-blank' | 'id-badge' | 'inbox-full' | 'light/star' | 'list' | 'loader' | 'lock-keyhole' | 'lock-keyhole-open' | 'logo' | 'magnifying-glass' | 'map-location-dot' | 'map-pin' | 'mobile-screen-button' | 'money-bill-transfer' | 'money-bill-trend-up' | 'money-bills' | 'notes-medical' | 'paste' | 'pen' | 'pen-to-square' | 'percent' | 'piggy-bank' | 'rectangle-history' | 'rectangle-history-circle-user' | 'rectangle-terminal' | 'rotate' | 'scale-balanced' | 'server' | 'sheet-plastic' | 'sidebar' | 'solid/star' | 'squirrel' | 'stethoscope' | 'store' | 'timer' | 'trash' | 'trash-can' | 'upload' | 'user' | 'user-gear' | 'user-group' | 'user-tie' | 'user-tie-hair' | 'user-vneck' | 'users' | 'wallet' | 'warehouse-full' | 'xmark';
|
|
5
|
+
export type IconName = 'alien-8bit' | 'arrow-down-arrow-up' | 'arrow-down-z-a' | 'arrow-left' | 'arrow-right' | 'arrow-right-to-arc' | 'arrow-up-right-from-square' | 'arrows-rotate' | 'badge-check' | 'bell' | 'building-columns' | 'calendar-days' | 'check-double' | 'chevron-down' | 'chevron-right' | 'chevron-up' | 'chevrons-right' | 'circle' | 'circle-arrow-right' | 'circle-check' | 'circle-check-outline' | 'circle-exclamation' | 'circle-exclamation-outline' | 'circle-info' | 'circle-minus' | 'circle-plus' | 'circle-x' | 'circle-xmark' | 'circle-xmark-outline' | 'clock' | 'clock-rotate-left' | 'coin' | 'coins' | 'computer-classic' | 'copy' | 'credit-card' | 'credit-card-blank' | 'credit-card-front' | 'download' | 'ellipsis-vertical' | 'empty-img' | 'empty-set' | 'eye' | 'eye-slash' | 'filter-list' | 'fingerprint' | 'folder-magnifying-glass' | 'folder-open' | 'grid-2' | 'grid-horizontal' | 'grip-dots-vertical' | 'headphones-simple' | 'house-blank' | 'id-badge' | 'inbox-full' | 'light/star' | 'list' | 'loader' | 'lock-keyhole' | 'lock-keyhole-open' | 'logo' | 'magnifying-glass' | 'map-location-dot' | 'map-pin' | 'mobile-screen-button' | 'money-bill-transfer' | 'money-bill-trend-up' | 'money-bills' | 'notes-medical' | 'paste' | 'pen' | 'pen-to-square' | 'percent' | 'piggy-bank' | 'rectangle-history' | 'rectangle-history-circle-user' | 'rectangle-terminal' | 'rotate' | 'scale-balanced' | 'server' | 'sheet-plastic' | 'sidebar' | 'solid/star' | 'squirrel' | 'stethoscope' | 'store' | 'timer' | 'trash' | 'trash-can' | 'upload' | 'user' | 'user-gear' | 'user-group' | 'user-tie' | 'user-tie-hair' | 'user-vneck' | 'users' | 'wallet' | 'warehouse-full' | 'xmark';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ResultContainerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
title: React.ReactNode | string;
|
|
5
|
+
className?: string;
|
|
6
|
+
classNameContent?: string;
|
|
7
|
+
classNameLabel?: string;
|
|
8
|
+
['data-testid-content']?: string;
|
|
9
|
+
['data-testid-label']?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const ResultContainer: ({ children, title, className, classNameContent, classNameLabel, "data-testid-content": dataTestIdContent, "data-testid-label": dataTestIdLabel, ...rest }: ResultContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { ResultContainer };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs as _, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as t } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import '../../assets/ResultContainer.css';const m = "_container_1n6cs_1", b = "_label_1n6cs_13", e = {
|
|
4
|
+
container: m,
|
|
5
|
+
label: b,
|
|
6
|
+
"result-content": "_result-content_1n6cs_30"
|
|
7
|
+
}, x = ({
|
|
8
|
+
children: s,
|
|
9
|
+
title: a,
|
|
10
|
+
className: c,
|
|
11
|
+
classNameContent: l,
|
|
12
|
+
classNameLabel: o,
|
|
13
|
+
"data-testid-content": r,
|
|
14
|
+
"data-testid-label": i,
|
|
15
|
+
...d
|
|
16
|
+
}) => /* @__PURE__ */ _("div", { ...d, className: t(e.container, c), children: [
|
|
17
|
+
/* @__PURE__ */ n("span", { className: t(e.label, o), "data-testid": i, children: a }),
|
|
18
|
+
/* @__PURE__ */ n("div", { className: t(e["result-content"], l), "data-testid": r, children: s })
|
|
19
|
+
] });
|
|
20
|
+
export {
|
|
21
|
+
x as ResultContainer
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, title, className, classNameContent, classNameLabel, "data-testid-content": dataTestIdContent, "data-testid-label": dataTestIdLabel, ...rest }: {
|
|
5
|
+
children: import('react').ReactNode;
|
|
6
|
+
title: import('react').ReactNode;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
classNameContent?: string | undefined;
|
|
9
|
+
classNameLabel?: string | undefined;
|
|
10
|
+
"data-testid-content"?: string | undefined;
|
|
11
|
+
"data-testid-label"?: string | undefined;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
tags: string[];
|
|
14
|
+
decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
15
|
+
children: import('react').ReactNode;
|
|
16
|
+
title: import('react').ReactNode;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
classNameContent?: string | undefined;
|
|
19
|
+
classNameLabel?: string | undefined;
|
|
20
|
+
"data-testid-content"?: string | undefined;
|
|
21
|
+
"data-testid-label"?: string | undefined;
|
|
22
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const ResultContainerSimple: Story;
|
|
@@ -7,5 +7,5 @@ type ResultWithChipsProps = {
|
|
|
7
7
|
title: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const ResultWithChips: ({ chips,
|
|
10
|
+
declare const ResultWithChips: ({ chips, className, ...rest }: ResultWithChipsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export { ResultWithChips };
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { C as i } from "../../Toggle-SlvGYQKW.js";
|
|
4
|
+
import { ResultContainer as o } from "../ResultContainer/ResultContainer.js";
|
|
5
|
+
import '../../assets/ResultWithChips.css';const h = "_container_hgp0p_1", n = {
|
|
6
|
+
container: h,
|
|
5
7
|
"chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
|
|
6
|
-
label: o,
|
|
7
|
-
"chips-container": "_chips-container_hgp0p_35",
|
|
8
8
|
"chip-content": "_chip-content_hgp0p_42",
|
|
9
9
|
"chip-label": "_chip-label_hgp0p_51"
|
|
10
|
-
},
|
|
11
|
-
/* @__PURE__ */ e(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
] }, `full-chip-${n}`)) })
|
|
29
|
-
] });
|
|
10
|
+
}, d = ({ chips: t, className: p, ...c }) => /* @__PURE__ */ e(o, { ...c, className: s(n.container, p), title: c.title, children: t.map((l, a) => /* @__PURE__ */ r("span", { className: n["chip-item-wrapper"], children: [
|
|
11
|
+
/* @__PURE__ */ e(
|
|
12
|
+
i,
|
|
13
|
+
{
|
|
14
|
+
...l,
|
|
15
|
+
label: /* @__PURE__ */ e("span", { className: n["chip-content"], children: typeof l.label == "string" ? /* @__PURE__ */ e("strong", { className: n["chip-label"], children: l.label }) : l.label })
|
|
16
|
+
},
|
|
17
|
+
`chip-${a}`
|
|
18
|
+
),
|
|
19
|
+
l.joinLabel && a < t.length - 1 && /* @__PURE__ */ e(
|
|
20
|
+
i,
|
|
21
|
+
{
|
|
22
|
+
label: /* @__PURE__ */ e("span", { className: n["chip-content"], children: /* @__PURE__ */ e("strong", { className: n["chip-label"], children: l.joinLabel }) })
|
|
23
|
+
},
|
|
24
|
+
`join-${a}`
|
|
25
|
+
)
|
|
26
|
+
] }, `full-chip-${a}`)) });
|
|
30
27
|
export {
|
|
31
|
-
|
|
28
|
+
d as ResultWithChips
|
|
32
29
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ChipProps } from '../../main';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ chips, className, ...rest }: {
|
|
6
|
+
chips: (Partial<ChipProps> & {
|
|
7
|
+
joinLabel?: import('react').ReactNode;
|
|
8
|
+
key?: string | undefined;
|
|
9
|
+
})[];
|
|
10
|
+
title: string;
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
tags: string[];
|
|
14
|
+
decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
15
|
+
chips: (Partial<ChipProps> & {
|
|
16
|
+
joinLabel?: import('react').ReactNode;
|
|
17
|
+
key?: string | undefined;
|
|
18
|
+
})[];
|
|
19
|
+
title: string;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const ResultWithChipsSimple: Story;
|
|
26
|
+
export declare const ResultWithChipsAndJoinLabel: Story;
|
package/dist/main.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export * from './components/PageHeader/PageHeader';
|
|
|
29
29
|
export * from './components/Pagination/Pagination';
|
|
30
30
|
export * from './components/Popover/Popover';
|
|
31
31
|
export * from './components/RadioButton/RadioButton';
|
|
32
|
+
export * from './components/ResultContainer/ResultContainer';
|
|
32
33
|
export * from './components/ResultWithChips/ResultWithChips';
|
|
33
34
|
export * from './components/RowItem/RowItem';
|
|
34
35
|
export * from './components/Select/Select';
|
package/dist/main.js
CHANGED
|
@@ -8,11 +8,11 @@ import { BankCard as c } from "./components/BankCard/BankCard.js";
|
|
|
8
8
|
import { Button as u } from "./components/Button/Button.js";
|
|
9
9
|
import { Calendar as b } from "./components/Calendar/Calendar.js";
|
|
10
10
|
import { Checkbox as B } from "./components/Checkbox/Checkbox.js";
|
|
11
|
-
import { C, R as k, T as D } from "./Toggle-SlvGYQKW.js";
|
|
11
|
+
import { C as I, R as k, T as D } from "./Toggle-SlvGYQKW.js";
|
|
12
12
|
import { ConfirmationDialog as v } from "./components/ConfirmationDialog/ConfirmationDialog.js";
|
|
13
13
|
import "./components/DatePicker/DatePicker.js";
|
|
14
14
|
import { Description as P } from "./components/Description/Description.js";
|
|
15
|
-
import { Dialog as
|
|
15
|
+
import { Dialog as w } from "./components/Dialog/Dialog.js";
|
|
16
16
|
import { Draggable as E } from "./components/Draggable/Draggable.js";
|
|
17
17
|
import { EllipsisTooltip as M } from "./components/EllipsisTooltip/EllipsisTooltip.js";
|
|
18
18
|
import { Fieldset as H } from "./components/Fieldset/Fieldset.js";
|
|
@@ -25,36 +25,37 @@ import { PageHeader as X } from "./components/PageHeader/PageHeader.js";
|
|
|
25
25
|
import { Pagination as Z, paginationDefaultTranslations as _ } from "./components/Pagination/Pagination.js";
|
|
26
26
|
import { Popover as oo } from "./components/Popover/Popover.js";
|
|
27
27
|
import { RadioButton as eo } from "./components/RadioButton/RadioButton.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as kr } from "./components/Dialog/
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
28
|
+
import { ResultContainer as po } from "./components/ResultContainer/ResultContainer.js";
|
|
29
|
+
import { ResultWithChips as mo } from "./components/ResultWithChips/ResultWithChips.js";
|
|
30
|
+
import { Select as xo, SelectContext as lo, SelectOption as no, useSelectContext as io } from "./components/Select/Select.js";
|
|
31
|
+
import { Skeleton as To, SkeletonCircle as go, SkeletonTable as co } from "./components/Skeleton/Skeleton.js";
|
|
32
|
+
import { Snackbar as So } from "./components/Snackbar/Snackbar.js";
|
|
33
|
+
import { SortTooltip as yo, sortTooltipDefaultTranslations as Bo } from "./components/SortTooltip/SortTooltip.js";
|
|
34
|
+
import { Stepper as Io } from "./components/Stepper/Stepper.js";
|
|
35
|
+
import { StepperNavigator as Do } from "./components/StepperNavigator/StepperNavigator.js";
|
|
36
|
+
import { TBody as vo, THead as Ao, Table as Po, Td as Ro, Th as wo, Tr as Oo } from "./components/Table/Table.js";
|
|
37
|
+
import { Tabs as Go } from "./components/Tabs/Tabs.js";
|
|
38
|
+
import { Tag as No } from "./components/Tag/Tag.js";
|
|
39
|
+
import { TextDisplay as Ko } from "./components/TextDisplay/TextDisplay.js";
|
|
40
|
+
import { ToastCard as Fo } from "./components/ToastCard/ToastCard.js";
|
|
41
|
+
import { Toggle as Wo } from "./components/Toggle/Toggle.js";
|
|
42
|
+
import { G as qo } from "./Group-DJz1rK2n.js";
|
|
43
|
+
import { Tooltip as Jo } from "./components/Tooltip/Tooltip.js";
|
|
44
|
+
import { TransactionRow as Uo } from "./components/TransactionRow/TransactionRow.js";
|
|
45
|
+
import { Text as Yo, Typography as Zo } from "./components/Typography/Typography.js";
|
|
46
|
+
import { DraggableProvider as $o } from "./contexts/DraggableProvider/DraggableProvider.js";
|
|
47
|
+
import { SnackbarContext as rr, SnackbarProvider as er, useSnackbar as tr } from "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
48
|
+
import { replaceItemsByIndex as ar, replaceItemsByKey as mr, sortItemsByIndex as fr, sortItemsByKey as xr } from "./utils/draggable.js";
|
|
49
|
+
import { iconsList as nr } from "./utils/iconsList.js";
|
|
50
|
+
import { allowOnlyIntegerNumbers as sr, allowOnlyMathSignals as Tr, allowOnlyNumbers as gr, formatDecimalValue as cr, parseToInteger as dr } from "./utils/inputNumberAsText.js";
|
|
51
|
+
import { bemify as Sr, getBEMBase as br, getBEMBlock as yr } from "./utils/styleStrings.js";
|
|
52
|
+
import { default as Cr } from "./components/Dialog/DialogTitle.js";
|
|
53
|
+
import { default as kr } from "./components/Dialog/Content.js";
|
|
54
|
+
import { default as hr } from "./components/Dialog/Actions.js";
|
|
55
|
+
import { Tab as Ar } from "./components/Tabs/Tab.js";
|
|
56
|
+
import { TabPanel as Rr } from "./components/Tabs/TabPanel.js";
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
hr as Actions,
|
|
58
59
|
t as Adornment,
|
|
59
60
|
a as Advice,
|
|
60
61
|
f as Alert,
|
|
@@ -65,14 +66,14 @@ export {
|
|
|
65
66
|
u as Button,
|
|
66
67
|
b as Calendar,
|
|
67
68
|
B as Checkbox,
|
|
68
|
-
|
|
69
|
+
I as Chip,
|
|
69
70
|
v as ConfirmationDialog,
|
|
70
|
-
|
|
71
|
+
kr as Content,
|
|
71
72
|
P as Description,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
w as Dialog,
|
|
74
|
+
Cr as DialogTitle,
|
|
74
75
|
E as Draggable,
|
|
75
|
-
|
|
76
|
+
$o as DraggableProvider,
|
|
76
77
|
M as EllipsisTooltip,
|
|
77
78
|
H as Fieldset,
|
|
78
79
|
L as Icon,
|
|
@@ -84,54 +85,55 @@ export {
|
|
|
84
85
|
Z as Pagination,
|
|
85
86
|
oo as Popover,
|
|
86
87
|
eo as RadioButton,
|
|
87
|
-
po as
|
|
88
|
+
po as ResultContainer,
|
|
89
|
+
mo as ResultWithChips,
|
|
88
90
|
k as RowItem,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
91
|
+
xo as Select,
|
|
92
|
+
lo as SelectContext,
|
|
93
|
+
no as SelectOption,
|
|
94
|
+
To as Skeleton,
|
|
95
|
+
go as SkeletonCircle,
|
|
96
|
+
co as SkeletonTable,
|
|
97
|
+
So as Snackbar,
|
|
98
|
+
rr as SnackbarContext,
|
|
99
|
+
er as SnackbarProvider,
|
|
100
|
+
yo as SortTooltip,
|
|
101
|
+
Io as Stepper,
|
|
102
|
+
Do as StepperNavigator,
|
|
103
|
+
vo as TBody,
|
|
104
|
+
Ao as THead,
|
|
105
|
+
Ar as Tab,
|
|
106
|
+
Rr as TabPanel,
|
|
107
|
+
Po as Table,
|
|
108
|
+
Go as Tabs,
|
|
109
|
+
No as Tag,
|
|
110
|
+
Ro as Td,
|
|
111
|
+
Yo as Text,
|
|
112
|
+
Ko as TextDisplay,
|
|
113
|
+
wo as Th,
|
|
114
|
+
Fo as ToastCard,
|
|
115
|
+
Wo as Toggle,
|
|
116
|
+
qo as ToggleGroup,
|
|
115
117
|
D as ToggleGroupItem,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
118
|
+
Jo as Tooltip,
|
|
119
|
+
Oo as Tr,
|
|
120
|
+
Uo as TransactionRow,
|
|
121
|
+
Zo as Typography,
|
|
122
|
+
sr as allowOnlyIntegerNumbers,
|
|
123
|
+
Tr as allowOnlyMathSignals,
|
|
124
|
+
gr as allowOnlyNumbers,
|
|
125
|
+
Sr as bemify,
|
|
126
|
+
cr as formatDecimalValue,
|
|
127
|
+
br as getBEMBase,
|
|
128
|
+
yr as getBEMBlock,
|
|
129
|
+
nr as iconsList,
|
|
128
130
|
_ as paginationDefaultTranslations,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
dr as parseToInteger,
|
|
132
|
+
ar as replaceItemsByIndex,
|
|
133
|
+
mr as replaceItemsByKey,
|
|
134
|
+
fr as sortItemsByIndex,
|
|
135
|
+
xr as sortItemsByKey,
|
|
136
|
+
Bo as sortTooltipDefaultTranslations,
|
|
137
|
+
io as useSelectContext,
|
|
138
|
+
tr as useSnackbar
|
|
137
139
|
};
|