@kolking/react-ui 1.0.0 → 1.2.0

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.
Files changed (36) hide show
  1. package/dist/{Input-Lz3ft8Tp.js → Input-DE1QkW7S.js} +1 -1
  2. package/dist/components/Badge/Badge.d.ts +9 -0
  3. package/dist/components/Badge/Badge.js +56 -0
  4. package/dist/components/Badge/index.d.ts +1 -0
  5. package/dist/components/Badge/index.js +4 -0
  6. package/dist/components/Button/Button.d.ts +1 -1
  7. package/dist/components/Button/Button.js +5 -5
  8. package/dist/components/Dialog/Dialog.js +1 -1
  9. package/dist/components/Dialog/DialogFocusTrap.js +9 -757
  10. package/dist/components/Fields/Checkbox.js +7 -7
  11. package/dist/components/Fields/Field.js +10 -10
  12. package/dist/components/Fields/Input.js +2 -2
  13. package/dist/components/Fields/Quantity.js +18 -18
  14. package/dist/components/Fields/Radio.js +5 -5
  15. package/dist/components/Fields/Select.js +6 -6
  16. package/dist/components/Fields/Textarea.js +18 -177
  17. package/dist/components/Fields/index.js +1 -1
  18. package/dist/components/Flex/Flex.js +7 -7
  19. package/dist/components/Heading/Heading.js +1 -1
  20. package/dist/components/Icon/Icon.js +1 -1
  21. package/dist/components/Menu/Menu.js +41 -40
  22. package/dist/components/Menu/MenuItem.js +10 -10
  23. package/dist/components/Notice/Notice.js +1 -1
  24. package/dist/components/Progress/ProgressBar.js +5 -5
  25. package/dist/components/Progress/ProgressCircular.js +1 -1
  26. package/dist/components/Segmented/Segmented.js +10 -10
  27. package/dist/components/Spinner/Spinner.js +4 -4
  28. package/dist/components/Tooltip/Tooltip.js +37 -37
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +54 -52
  31. package/dist/styles/style.css +1 -1
  32. package/package.json +1 -1
  33. package/dist/_commonjsHelpers-B52_cu2H.js +0 -26
  34. package/dist/floating-ui.react-KLg1MUz0.js +0 -22334
  35. package/dist/index-DyIdU--j.js +0 -45
  36. package/dist/index.esm-Dkuk1b-q.js +0 -211
@@ -1,45 +0,0 @@
1
- import { g as c } from "./_commonjsHelpers-B52_cu2H.js";
2
- var s = { exports: {} };
3
- /*!
4
- Copyright (c) 2018 Jed Watson.
5
- Licensed under the MIT License (MIT), see
6
- http://jedwatson.github.io/classnames
7
- */
8
- var a;
9
- function p() {
10
- return a || (a = 1, function(o) {
11
- (function() {
12
- var f = {}.hasOwnProperty;
13
- function e() {
14
- for (var t = "", r = 0; r < arguments.length; r++) {
15
- var n = arguments[r];
16
- n && (t = i(t, u(n)));
17
- }
18
- return t;
19
- }
20
- function u(t) {
21
- if (typeof t == "string" || typeof t == "number")
22
- return t;
23
- if (typeof t != "object")
24
- return "";
25
- if (Array.isArray(t))
26
- return e.apply(null, t);
27
- if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
28
- return t.toString();
29
- var r = "";
30
- for (var n in t)
31
- f.call(t, n) && t[n] && (r = i(r, n));
32
- return r;
33
- }
34
- function i(t, r) {
35
- return r ? t ? t + " " + r : t + r : t;
36
- }
37
- o.exports ? (e.default = e, o.exports = e) : window.classNames = e;
38
- })();
39
- }(s)), s.exports;
40
- }
41
- var l = p();
42
- const x = /* @__PURE__ */ c(l);
43
- export {
44
- x as c
45
- };
@@ -1,211 +0,0 @@
1
- /*!
2
- * tabbable 6.2.0
3
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
- */
5
- var T = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], v = /* @__PURE__ */ T.join(","), m = typeof Element > "u", d = m ? function() {
6
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, b = !m && Element.prototype.getRootNode ? function(i) {
7
- var t;
8
- return i == null || (t = i.getRootNode) === null || t === void 0 ? void 0 : t.call(i);
9
- } : function(i) {
10
- return i == null ? void 0 : i.ownerDocument;
11
- }, h = function i(t, e) {
12
- var r;
13
- e === void 0 && (e = !0);
14
- var a = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), l = a === "" || a === "true", n = l || e && t && i(t.parentNode);
15
- return n;
16
- }, x = function(t) {
17
- var e, r = t == null || (e = t.getAttribute) === null || e === void 0 ? void 0 : e.call(t, "contenteditable");
18
- return r === "" || r === "true";
19
- }, I = function(t, e, r) {
20
- if (h(t))
21
- return [];
22
- var a = Array.prototype.slice.apply(t.querySelectorAll(v));
23
- return e && d.call(t, v) && a.unshift(t), a = a.filter(r), a;
24
- }, N = function i(t, e, r) {
25
- for (var a = [], l = Array.from(t); l.length; ) {
26
- var n = l.shift();
27
- if (!h(n, !1))
28
- if (n.tagName === "SLOT") {
29
- var u = n.assignedElements(), c = u.length ? u : n.children, s = i(c, !0, r);
30
- r.flatten ? a.push.apply(a, s) : a.push({
31
- scopeParent: n,
32
- candidates: s
33
- });
34
- } else {
35
- var f = d.call(n, v);
36
- f && r.filter(n) && (e || !t.includes(n)) && a.push(n);
37
- var o = n.shadowRoot || // check for an undisclosed shadow
38
- typeof r.getShadowRoot == "function" && r.getShadowRoot(n), E = !h(o, !1) && (!r.shadowRootFilter || r.shadowRootFilter(n));
39
- if (o && E) {
40
- var p = i(o === !0 ? n.children : o.children, !0, r);
41
- r.flatten ? a.push.apply(a, p) : a.push({
42
- scopeParent: n,
43
- candidates: p
44
- });
45
- } else
46
- l.unshift.apply(l, n.children);
47
- }
48
- }
49
- return a;
50
- }, R = function(t) {
51
- return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
52
- }, y = function(t) {
53
- if (!t)
54
- throw new Error("No node provided");
55
- return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || x(t)) && !R(t) ? 0 : t.tabIndex;
56
- }, A = function(t, e) {
57
- var r = y(t);
58
- return r < 0 && e && !R(t) ? 0 : r;
59
- }, O = function(t, e) {
60
- return t.tabIndex === e.tabIndex ? t.documentOrder - e.documentOrder : t.tabIndex - e.tabIndex;
61
- }, C = function(t) {
62
- return t.tagName === "INPUT";
63
- }, F = function(t) {
64
- return C(t) && t.type === "hidden";
65
- }, D = function(t) {
66
- var e = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
67
- return r.tagName === "SUMMARY";
68
- });
69
- return e;
70
- }, M = function(t, e) {
71
- for (var r = 0; r < t.length; r++)
72
- if (t[r].checked && t[r].form === e)
73
- return t[r];
74
- }, k = function(t) {
75
- if (!t.name)
76
- return !0;
77
- var e = t.form || b(t), r = function(u) {
78
- return e.querySelectorAll('input[type="radio"][name="' + u + '"]');
79
- }, a;
80
- if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
81
- a = r(window.CSS.escape(t.name));
82
- else
83
- try {
84
- a = r(t.name);
85
- } catch (n) {
86
- return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", n.message), !1;
87
- }
88
- var l = M(a, t.form);
89
- return !l || l === t;
90
- }, L = function(t) {
91
- return C(t) && t.type === "radio";
92
- }, P = function(t) {
93
- return L(t) && !k(t);
94
- }, B = function(t) {
95
- var e, r = t && b(t), a = (e = r) === null || e === void 0 ? void 0 : e.host, l = !1;
96
- if (r && r !== t) {
97
- var n, u, c;
98
- for (l = !!((n = a) !== null && n !== void 0 && (u = n.ownerDocument) !== null && u !== void 0 && u.contains(a) || t != null && (c = t.ownerDocument) !== null && c !== void 0 && c.contains(t)); !l && a; ) {
99
- var s, f, o;
100
- r = b(a), a = (s = r) === null || s === void 0 ? void 0 : s.host, l = !!((f = a) !== null && f !== void 0 && (o = f.ownerDocument) !== null && o !== void 0 && o.contains(a));
101
- }
102
- }
103
- return l;
104
- }, w = function(t) {
105
- var e = t.getBoundingClientRect(), r = e.width, a = e.height;
106
- return r === 0 && a === 0;
107
- }, j = function(t, e) {
108
- var r = e.displayCheck, a = e.getShadowRoot;
109
- if (getComputedStyle(t).visibility === "hidden")
110
- return !0;
111
- var l = d.call(t, "details>summary:first-of-type"), n = l ? t.parentElement : t;
112
- if (d.call(n, "details:not([open]) *"))
113
- return !0;
114
- if (!r || r === "full" || r === "legacy-full") {
115
- if (typeof a == "function") {
116
- for (var u = t; t; ) {
117
- var c = t.parentElement, s = b(t);
118
- if (c && !c.shadowRoot && a(c) === !0)
119
- return w(t);
120
- t.assignedSlot ? t = t.assignedSlot : !c && s !== t.ownerDocument ? t = s.host : t = c;
121
- }
122
- t = u;
123
- }
124
- if (B(t))
125
- return !t.getClientRects().length;
126
- if (r !== "legacy-full")
127
- return !0;
128
- } else if (r === "non-zero-area")
129
- return w(t);
130
- return !1;
131
- }, q = function(t) {
132
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
133
- for (var e = t.parentElement; e; ) {
134
- if (e.tagName === "FIELDSET" && e.disabled) {
135
- for (var r = 0; r < e.children.length; r++) {
136
- var a = e.children.item(r);
137
- if (a.tagName === "LEGEND")
138
- return d.call(e, "fieldset[disabled] *") ? !0 : !a.contains(t);
139
- }
140
- return !0;
141
- }
142
- e = e.parentElement;
143
- }
144
- return !1;
145
- }, g = function(t, e) {
146
- return !(e.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
147
- // because we're limited in the type of selectors we can use in JSDom (see related
148
- // note related to `candidateSelectors`)
149
- h(e) || F(e) || j(e, t) || // For a details element with a summary, the summary element gets the focus
150
- D(e) || q(e));
151
- }, S = function(t, e) {
152
- return !(P(e) || y(e) < 0 || !g(t, e));
153
- }, U = function(t) {
154
- var e = parseInt(t.getAttribute("tabindex"), 10);
155
- return !!(isNaN(e) || e >= 0);
156
- }, V = function i(t) {
157
- var e = [], r = [];
158
- return t.forEach(function(a, l) {
159
- var n = !!a.scopeParent, u = n ? a.scopeParent : a, c = A(u, n), s = n ? i(a.candidates) : u;
160
- c === 0 ? n ? e.push.apply(e, s) : e.push(u) : r.push({
161
- documentOrder: l,
162
- tabIndex: c,
163
- item: a,
164
- isScope: n,
165
- content: s
166
- });
167
- }), r.sort(O).reduce(function(a, l) {
168
- return l.isScope ? a.push.apply(a, l.content) : a.push(l.content), a;
169
- }, []).concat(e);
170
- }, z = function(t, e) {
171
- e = e || {};
172
- var r;
173
- return e.getShadowRoot ? r = N([t], e.includeContainer, {
174
- filter: S.bind(null, e),
175
- flatten: !1,
176
- getShadowRoot: e.getShadowRoot,
177
- shadowRootFilter: U
178
- }) : r = I(t, e.includeContainer, S.bind(null, e)), V(r);
179
- }, W = function(t, e) {
180
- e = e || {};
181
- var r;
182
- return e.getShadowRoot ? r = N([t], e.includeContainer, {
183
- filter: g.bind(null, e),
184
- flatten: !0,
185
- getShadowRoot: e.getShadowRoot
186
- }) : r = I(t, e.includeContainer, g.bind(null, e)), r;
187
- }, Z = function(t, e) {
188
- if (e = e || {}, !t)
189
- throw new Error("No node provided");
190
- return d.call(t, v) === !1 ? !1 : S(e, t);
191
- }, G = /* @__PURE__ */ T.concat("iframe").join(","), X = function(t, e) {
192
- if (e = e || {}, !t)
193
- throw new Error("No node provided");
194
- return d.call(t, G) === !1 ? !1 : g(e, t);
195
- };
196
- const Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
197
- __proto__: null,
198
- focusable: W,
199
- getTabIndex: y,
200
- isFocusable: X,
201
- isTabbable: Z,
202
- tabbable: z
203
- }, Symbol.toStringTag, { value: "Module" }));
204
- export {
205
- X as a,
206
- Y as b,
207
- W as f,
208
- y as g,
209
- Z as i,
210
- z as t
211
- };