@konstructio/ui 0.0.12-alpha.1 → 0.0.12-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Combination-BQYb0Gw7.js → Combination-b348x__d.js} +24 -24
- package/dist/{Modal-W2GbkC_F.js → Modal-DZUwNzSW.js} +315 -307
- package/dist/components/Alert/Alert.js +58 -0
- package/dist/components/Alert/Alert.variants.js +77 -0
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +3 -3
- package/dist/components/Breadcrumb/components/Item/Item.js +4 -4
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +5 -5
- package/dist/components/Divider/Divider.js +10 -0
- package/dist/components/Divider/Divider.variants.js +14 -0
- package/dist/components/Loading/Loading.js +28 -0
- package/dist/components/Loading/Loading.variants.js +20 -0
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +3 -3
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +4 -4
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Slider/Slider.js +14 -14
- package/dist/components/Switch/Switch.js +17 -17
- package/dist/components/TagSelect/TagSelect.js +3 -3
- package/dist/components/Toast/Toast.js +11 -11
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Typography/Typography.js +30 -0
- package/dist/components/Typography/Typography.variants.js +36 -0
- package/dist/components/index.js +61 -53
- package/dist/{index-BVppSRDQ.js → index-3jTPaVvh.js} +9 -9
- package/dist/{index-BxeV34ij.js → index-4ecjw_Aj.js} +1 -1
- package/dist/{index-CoqDsznq.js → index-B33at13_.js} +3 -3
- package/dist/{index-1GLoikpT.js → index-BTeAm7mx.js} +6808 -6809
- package/dist/index-B_6_jmOO.js +68 -0
- package/dist/{index-BBjak_0p.js → index-BbsJ0VIJ.js} +2 -2
- package/dist/{index-CJsYodgi.js → index-C6WtlN_F.js} +9 -9
- package/dist/{index-8vgf-x5i.js → index-Cva-e5M4.js} +2 -2
- package/dist/{index-D4Q2rMby.js → index-Dj1pom3_.js} +2 -2
- package/dist/{index-KEdwcThH.js → index-Z1voPZOH.js} +1 -1
- package/dist/index.d.ts +41 -2
- package/dist/index.js +76 -68
- package/dist/package.json +27 -28
- package/dist/plugins/konstruct.js +34 -31
- package/dist/plugins/utils/animation.styles.js +162 -0
- package/dist/plugins/utils/index.js +7 -0
- package/dist/styles.css +1 -1
- package/dist/{useBreadcrumb-CojbXFVD.js → useBreadcrumb-BsIeMoR1.js} +47 -47
- package/package.json +27 -28
- package/dist/index-DoOsnuB6.js +0 -72
|
@@ -22,8 +22,8 @@ function te(e, t, n) {
|
|
|
22
22
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
23
23
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
24
24
|
}
|
|
25
|
-
var N = "right-scroll-bar-position",
|
|
26
|
-
function
|
|
25
|
+
var N = "right-scroll-bar-position", O = "width-before-scroll-bar", re = "with-scroll-bars-hidden", ne = "--removed-body-scroll-bar-size";
|
|
26
|
+
function I(e, t) {
|
|
27
27
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
28
28
|
}
|
|
29
29
|
function ae(e, t) {
|
|
@@ -51,7 +51,7 @@ var oe = typeof window < "u" ? l.useLayoutEffect : l.useEffect, D = /* @__PURE__
|
|
|
51
51
|
function ce(e, t) {
|
|
52
52
|
var n = ae(null, function(r) {
|
|
53
53
|
return e.forEach(function(a) {
|
|
54
|
-
return
|
|
54
|
+
return I(a, r);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
return oe(function() {
|
|
@@ -59,9 +59,9 @@ function ce(e, t) {
|
|
|
59
59
|
if (r) {
|
|
60
60
|
var a = new Set(r), i = new Set(e), u = n.current;
|
|
61
61
|
a.forEach(function(o) {
|
|
62
|
-
i.has(o) ||
|
|
62
|
+
i.has(o) || I(o, null);
|
|
63
63
|
}), i.forEach(function(o) {
|
|
64
|
-
a.has(o) ||
|
|
64
|
+
a.has(o) || I(o, u);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
D.set(n, e);
|
|
@@ -146,12 +146,12 @@ G.isSideCarExport = !0;
|
|
|
146
146
|
function le(e, t) {
|
|
147
147
|
return e.useMedium(t), G;
|
|
148
148
|
}
|
|
149
|
-
var K = ie(),
|
|
150
|
-
},
|
|
149
|
+
var K = ie(), W = function() {
|
|
150
|
+
}, A = l.forwardRef(function(e, t) {
|
|
151
151
|
var n = l.useRef(null), r = l.useState({
|
|
152
|
-
onScrollCapture:
|
|
153
|
-
onWheelCapture:
|
|
154
|
-
onTouchMoveCapture:
|
|
152
|
+
onScrollCapture: W,
|
|
153
|
+
onWheelCapture: W,
|
|
154
|
+
onTouchMoveCapture: W
|
|
155
155
|
}), a = r[0], i = r[1], u = e.forwardProps, o = e.children, h = e.className, m = e.removeScrollBar, d = e.enabled, w = e.shards, E = e.sideCar, p = e.noIsolation, C = e.inert, c = e.allowPinchZoom, f = e.as, v = f === void 0 ? "div" : f, y = e.gapMode, g = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), b = E, s = ce([n, t]), R = S(S({}, g), a);
|
|
156
156
|
return l.createElement(
|
|
157
157
|
l.Fragment,
|
|
@@ -160,13 +160,13 @@ var K = ie(), O = function() {
|
|
|
160
160
|
u ? l.cloneElement(l.Children.only(o), S(S({}, R), { ref: s })) : l.createElement(v, S({}, R, { className: h, ref: s }), o)
|
|
161
161
|
);
|
|
162
162
|
});
|
|
163
|
-
|
|
163
|
+
A.defaultProps = {
|
|
164
164
|
enabled: !0,
|
|
165
165
|
removeScrollBar: !0,
|
|
166
166
|
inert: !1
|
|
167
167
|
};
|
|
168
|
-
|
|
169
|
-
fullWidth:
|
|
168
|
+
A.classNames = {
|
|
169
|
+
fullWidth: O,
|
|
170
170
|
zeroRight: N
|
|
171
171
|
};
|
|
172
172
|
var ue = function() {
|
|
@@ -261,7 +261,7 @@ var ve = function() {
|
|
|
261
261
|
right: `).concat(o, "px ").concat(r, `;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.`).concat(
|
|
264
|
+
.`).concat(O, ` {
|
|
265
265
|
margin-right: `).concat(o, "px ").concat(r, `;
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -269,7 +269,7 @@ var ve = function() {
|
|
|
269
269
|
right: 0 `).concat(r, `;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.`).concat(
|
|
272
|
+
.`).concat(O, " .").concat(O, ` {
|
|
273
273
|
margin-right: 0 `).concat(r, `;
|
|
274
274
|
}
|
|
275
275
|
|
|
@@ -364,7 +364,7 @@ var k = Y ? { passive: !1 } : !1, Ce = function(e) {
|
|
|
364
364
|
!h && o !== document.body || // self content
|
|
365
365
|
h && (t.contains(o) || t === o)
|
|
366
366
|
);
|
|
367
|
-
return (d &&
|
|
367
|
+
return (d && Math.abs(w) < 1 || !d && Math.abs(E) < 1) && (m = !0), m;
|
|
368
368
|
}, x = function(e) {
|
|
369
369
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
370
370
|
}, z = function(e) {
|
|
@@ -410,7 +410,7 @@ function Ne(e) {
|
|
|
410
410
|
if (!r.current && "changedTouches" in c && (g || b) && (r.current = s), !s)
|
|
411
411
|
return !0;
|
|
412
412
|
var j = r.current || s;
|
|
413
|
-
return Le(j, f, c, j === "h" ? g : b
|
|
413
|
+
return Le(j, f, c, j === "h" ? g : b);
|
|
414
414
|
}, []), h = l.useCallback(function(c) {
|
|
415
415
|
var f = c;
|
|
416
416
|
if (!(!P.length || P[P.length - 1] !== i)) {
|
|
@@ -429,7 +429,7 @@ function Ne(e) {
|
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
}, []), m = l.useCallback(function(c, f, v, y) {
|
|
432
|
-
var g = { name: c, delta: f, target: v, should: y, shadowParent:
|
|
432
|
+
var g = { name: c, delta: f, target: v, should: y, shadowParent: Oe(v) };
|
|
433
433
|
t.current.push(g), setTimeout(function() {
|
|
434
434
|
t.current = t.current.filter(function(b) {
|
|
435
435
|
return b !== g;
|
|
@@ -461,18 +461,18 @@ function Ne(e) {
|
|
|
461
461
|
p ? l.createElement(pe, { gapMode: e.gapMode }) : null
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Oe(e) {
|
|
465
465
|
for (var t = null; e !== null; )
|
|
466
466
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
467
467
|
return t;
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
var
|
|
471
|
-
return l.createElement(
|
|
469
|
+
const Ae = le(K, Ne);
|
|
470
|
+
var Ie = l.forwardRef(function(e, t) {
|
|
471
|
+
return l.createElement(A, S({}, e, { ref: t, sideCar: Ae }));
|
|
472
472
|
});
|
|
473
|
-
|
|
473
|
+
Ie.classNames = A.classNames;
|
|
474
474
|
export {
|
|
475
|
-
|
|
475
|
+
Ie as R,
|
|
476
476
|
ie as a,
|
|
477
477
|
Xe as c,
|
|
478
478
|
ce as u
|