@koide-labs/ui 0.1.0 → 0.1.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/accordion.css +1 -1
- package/dist/alert-dialog.css +1 -1
- package/dist/anchor.css +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/code.css +1 -1
- package/dist/collapse.css +1 -1
- package/dist/command.css +1 -1
- package/dist/components/accordion/accordion.js +40 -40
- package/dist/components/alert-dialog/alert-dialog.js +9 -9
- package/dist/components/anchor/anchor.js +5 -5
- package/dist/components/avatar/avatar.js +26 -26
- package/dist/components/badge/badge.js +13 -13
- package/dist/components/button/button.js +13 -13
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/code/code.js +48 -48
- package/dist/components/collapse/collapse.js +14 -14
- package/dist/components/command/command.js +121 -121
- package/dist/components/context-menu/context-menu.js +6 -6
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/heading/heading.js +6 -6
- package/dist/components/icon/icon.js +12 -12
- package/dist/components/icon-button/icon-button.js +26 -26
- package/dist/components/inline-code/inline-code.js +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/meter/meter.js +40 -40
- package/dist/components/multiline-input/multiline-input.js +1 -1
- package/dist/components/number-input/number-input.js +7 -7
- package/dist/components/password-input/password-input.js +2 -2
- package/dist/components/pill/pill.js +11 -11
- package/dist/components/popover/popover.js +21 -21
- package/dist/components/preview-card/preview-card.js +2 -2
- package/dist/components/radio-group/radio-group.js +54 -54
- package/dist/components/search-bar/search-bar.js +8 -8
- package/dist/components/select/select.js +75 -75
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/slider/slider.js +128 -128
- package/dist/components/spinner/spinner.js +4 -4
- package/dist/components/stacked-avatars/stacked-avatars.js +35 -35
- package/dist/components/status-banner/status-banner.js +22 -22
- package/dist/components/surface/surface.js +14 -14
- package/dist/components/switch/switch.js +28 -28
- package/dist/components/tabs/tabs.js +132 -132
- package/dist/components/text/text.js +15 -15
- package/dist/components/timestamp/timestamp.js +73 -73
- package/dist/components/toaster/toaster.js +165 -165
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/view/view.js +40 -40
- package/dist/context-menu.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/{dialog.module-DsbQRp-d.js → dialog.module-Pi1eHwli.js} +13 -13
- package/dist/heading.css +1 -1
- package/dist/icon-button.css +1 -1
- package/dist/icon.css +1 -1
- package/dist/index.js +2 -2
- package/dist/inline-code.css +1 -1
- package/dist/input.css +1 -1
- package/dist/input.module-zw1dlr1_.js +8 -0
- package/dist/integrations/react-markdown/index.js +1 -1
- package/dist/meter.css +1 -1
- package/dist/number-input.css +1 -1
- package/dist/password-input.css +1 -1
- package/dist/pill.css +1 -1
- package/dist/popover.css +1 -1
- package/dist/preview-card.css +1 -1
- package/dist/radio-group.css +1 -1
- package/dist/search-bar.css +1 -1
- package/dist/select.css +1 -1
- package/dist/{separator-fh_wDZNf.js → separator-wNYojB9q.js} +8 -8
- package/dist/separator.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/spinner.css +1 -1
- package/dist/stacked-avatars.css +1 -1
- package/dist/status-banner.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/surface.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/tabs.css +1 -1
- package/dist/text.css +1 -1
- package/dist/timestamp.css +1 -1
- package/dist/toaster.css +1 -1
- package/dist/{tooltip-oCp-elli.js → tooltip-DZkByWDR.js} +63 -63
- package/dist/tooltip.css +1 -1
- package/dist/view.css +1 -1
- package/dist/view.module-DlwuNdUj.js +6 -0
- package/dist/view2.css +1 -1
- package/package.json +1 -1
- package/dist/input.module-CtE19OH8.js +0 -8
- package/dist/view.module-Dj7wj0kk.js +0 -6
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as b, jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { textify as m } from "../../-utils.js";
|
|
4
4
|
import { View as r } from "../view/view.js";
|
|
5
5
|
import { Icon as e } from "../icon/icon.js";
|
|
6
6
|
import { B as s } from "../../Button-BmcVHRRW.js";
|
|
7
|
-
import '../../button.css';const
|
|
8
|
-
button:
|
|
9
|
-
button_height_sm:
|
|
7
|
+
import '../../button.css';const a = "_button_nag0o_2", c = "_button_height_sm_nag0o_15", x = "_button_height_md_nag0o_20", d = "_button_height_lg_nag0o_25", f = "_button_height_xl_nag0o_30", p = "_button_height_2xl_nag0o_35", B = "_button_height_3xl_nag0o_40", i = {
|
|
8
|
+
button: a,
|
|
9
|
+
button_height_sm: c,
|
|
10
10
|
button_height_md: x,
|
|
11
|
-
button_height_lg:
|
|
12
|
-
button_height_xl:
|
|
13
|
-
button_height_2xl:
|
|
14
|
-
button_height_3xl:
|
|
11
|
+
button_height_lg: d,
|
|
12
|
+
button_height_xl: f,
|
|
13
|
+
button_height_2xl: p,
|
|
14
|
+
button_height_3xl: B
|
|
15
15
|
};
|
|
16
16
|
function N({
|
|
17
17
|
size: t = "md",
|
|
18
18
|
leftIcon: o,
|
|
19
19
|
rightIcon: n,
|
|
20
20
|
children: u,
|
|
21
|
-
render:
|
|
21
|
+
render: g,
|
|
22
22
|
...h
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ b(
|
|
25
25
|
r,
|
|
26
26
|
{
|
|
27
27
|
interactive: !0,
|
|
28
28
|
render: /* @__PURE__ */ _(
|
|
29
29
|
s,
|
|
30
30
|
{
|
|
31
|
-
className:
|
|
31
|
+
className: l(i.button, i[`button_height_${t}`]),
|
|
32
32
|
focusableWhenDisabled: !!h.loading,
|
|
33
|
-
render:
|
|
33
|
+
render: g
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
...h,
|
|
@@ -243,7 +243,7 @@ const ie = /* @__PURE__ */ r.forwardRef(function(n, k) {
|
|
|
243
243
|
return f ? N : null;
|
|
244
244
|
});
|
|
245
245
|
process.env.NODE_ENV !== "production" && (ie.displayName = "CheckboxIndicator");
|
|
246
|
-
const it = "
|
|
246
|
+
const it = "_checkbox__label_1pchx_2", st = "_checkbox_1pchx_2", ct = "_checkbox__indicator_1pchx_30", q = {
|
|
247
247
|
checkbox__label: it,
|
|
248
248
|
checkbox: st,
|
|
249
249
|
checkbox__indicator: ct
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as re, jsx as
|
|
1
|
+
import { jsxs as re, jsx as P } from "react/jsx-runtime";
|
|
2
2
|
import { c as J } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { useMemo as ie } from "react";
|
|
4
4
|
import { View as se } from "../view/view.js";
|
|
@@ -11,9 +11,9 @@ function le(b) {
|
|
|
11
11
|
var Z = { exports: {} }, Q;
|
|
12
12
|
function oe() {
|
|
13
13
|
return Q || (Q = 1, (function(b) {
|
|
14
|
-
var
|
|
14
|
+
var j = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
15
15
|
var i = (function(g) {
|
|
16
|
-
var f = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
|
16
|
+
var f = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, x = 0, A = {}, s = {
|
|
17
17
|
/**
|
|
18
18
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
19
19
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -97,7 +97,7 @@ function oe() {
|
|
|
97
97
|
* @returns {number}
|
|
98
98
|
*/
|
|
99
99
|
objId: function(t) {
|
|
100
|
-
return t.__id || Object.defineProperty(t, "__id", { value: ++
|
|
100
|
+
return t.__id || Object.defineProperty(t, "__id", { value: ++x }), t.__id;
|
|
101
101
|
},
|
|
102
102
|
/**
|
|
103
103
|
* Creates a deep clone of the given object.
|
|
@@ -357,8 +357,8 @@ function oe() {
|
|
|
357
357
|
a.hasOwnProperty(o) || (l[o] = r[o]);
|
|
358
358
|
}
|
|
359
359
|
var d = n[t];
|
|
360
|
-
return n[t] = l, s.languages.DFS(s.languages, function(
|
|
361
|
-
_ === d &&
|
|
360
|
+
return n[t] = l, s.languages.DFS(s.languages, function(v, _) {
|
|
361
|
+
_ === d && v != t && (this[v] = l);
|
|
362
362
|
}), l;
|
|
363
363
|
},
|
|
364
364
|
// Traverse a language definition with Depth First Search
|
|
@@ -465,10 +465,10 @@ function oe() {
|
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
if (e && g.Worker) {
|
|
468
|
-
var
|
|
469
|
-
|
|
468
|
+
var v = new Worker(s.filename);
|
|
469
|
+
v.onmessage = function(_) {
|
|
470
470
|
d(_.data);
|
|
471
|
-
},
|
|
471
|
+
}, v.postMessage(JSON.stringify({
|
|
472
472
|
language: u.language,
|
|
473
473
|
code: u.code,
|
|
474
474
|
immediateClose: !0
|
|
@@ -625,41 +625,41 @@ function oe() {
|
|
|
625
625
|
for (var d = 0; d < u.length; ++d) {
|
|
626
626
|
if (l && l.cause == o + "," + d)
|
|
627
627
|
return;
|
|
628
|
-
var
|
|
629
|
-
if (N && !
|
|
630
|
-
var te =
|
|
631
|
-
|
|
628
|
+
var v = u[d], _ = v.inside, W = !!v.lookbehind, N = !!v.greedy, ee = v.alias;
|
|
629
|
+
if (N && !v.pattern.global) {
|
|
630
|
+
var te = v.pattern.toString().match(/[imsuy]*$/)[0];
|
|
631
|
+
v.pattern = RegExp(v.pattern.source, te + "g");
|
|
632
632
|
}
|
|
633
|
-
for (var X =
|
|
634
|
-
var E =
|
|
633
|
+
for (var X = v.pattern || v, m = n.next, w = r; m !== e.tail && !(l && w >= l.reach); w += m.value.length, m = m.next) {
|
|
634
|
+
var E = m.value;
|
|
635
635
|
if (e.length > t.length)
|
|
636
636
|
return;
|
|
637
637
|
if (!(E instanceof y)) {
|
|
638
|
-
var z = 1,
|
|
638
|
+
var z = 1, F;
|
|
639
639
|
if (N) {
|
|
640
|
-
if (
|
|
640
|
+
if (F = $(X, w, t, W), !F || F.index >= t.length)
|
|
641
641
|
break;
|
|
642
|
-
var D =
|
|
643
|
-
for (k +=
|
|
644
|
-
|
|
645
|
-
if (k -=
|
|
642
|
+
var D = F.index, ae = F.index + F[0].length, k = w;
|
|
643
|
+
for (k += m.value.length; D >= k; )
|
|
644
|
+
m = m.next, k += m.value.length;
|
|
645
|
+
if (k -= m.value.length, w = k, m.value instanceof y)
|
|
646
646
|
continue;
|
|
647
|
-
for (var C =
|
|
647
|
+
for (var C = m; C !== e.tail && (k < ae || typeof C.value == "string"); C = C.next)
|
|
648
648
|
z++, k += C.value.length;
|
|
649
|
-
z--, E = t.slice(w, k),
|
|
650
|
-
} else if (
|
|
649
|
+
z--, E = t.slice(w, k), F.index -= w;
|
|
650
|
+
} else if (F = $(X, 0, E, W), !F)
|
|
651
651
|
continue;
|
|
652
|
-
var D =
|
|
652
|
+
var D = F.index, O = F[0], q = E.slice(0, D), Y = E.slice(D + O.length), G = w + E.length;
|
|
653
653
|
l && G > l.reach && (l.reach = G);
|
|
654
|
-
var R =
|
|
654
|
+
var R = m.prev;
|
|
655
655
|
q && (R = S(e, R, q), w += q.length), H(e, R, z);
|
|
656
656
|
var ne = new y(o, _ ? s.tokenize(O, _) : O, ee, O);
|
|
657
|
-
if (
|
|
657
|
+
if (m = S(e, R, ne), Y && S(e, m, Y), z > 1) {
|
|
658
658
|
var U = {
|
|
659
659
|
cause: o + "," + d,
|
|
660
660
|
reach: G
|
|
661
661
|
};
|
|
662
|
-
I(t, e, a,
|
|
662
|
+
I(t, e, a, m.prev, w, U), l && U.reach > l.reach && (l.reach = U.reach);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
@@ -699,7 +699,7 @@ function oe() {
|
|
|
699
699
|
h === "loading" || h === "interactive" && p && p.defer ? document.addEventListener("DOMContentLoaded", c) : window.requestAnimationFrame ? window.requestAnimationFrame(c) : window.setTimeout(c, 16);
|
|
700
700
|
}
|
|
701
701
|
return s;
|
|
702
|
-
})(
|
|
702
|
+
})(j);
|
|
703
703
|
b.exports && (b.exports = i), typeof K < "u" && (K.Prism = i), i.languages.markup = {
|
|
704
704
|
comment: {
|
|
705
705
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -791,12 +791,12 @@ function oe() {
|
|
|
791
791
|
* @example
|
|
792
792
|
* addInlined('style', 'css');
|
|
793
793
|
*/
|
|
794
|
-
value: function(f,
|
|
794
|
+
value: function(f, x) {
|
|
795
795
|
var A = {};
|
|
796
|
-
A["language-" +
|
|
796
|
+
A["language-" + x] = {
|
|
797
797
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
798
798
|
lookbehind: !0,
|
|
799
|
-
inside: i.languages[
|
|
799
|
+
inside: i.languages[x]
|
|
800
800
|
}, A.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
801
801
|
var s = {
|
|
802
802
|
"included-cdata": {
|
|
@@ -804,9 +804,9 @@ function oe() {
|
|
|
804
804
|
inside: A
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
|
-
s["language-" +
|
|
807
|
+
s["language-" + x] = {
|
|
808
808
|
pattern: /[\s\S]+/,
|
|
809
|
-
inside: i.languages[
|
|
809
|
+
inside: i.languages[x]
|
|
810
810
|
};
|
|
811
811
|
var y = {};
|
|
812
812
|
y[f] = {
|
|
@@ -912,8 +912,8 @@ function oe() {
|
|
|
912
912
|
},
|
|
913
913
|
punctuation: /[(){};:,]/
|
|
914
914
|
}, g.languages.css.atrule.inside.rest = g.languages.css;
|
|
915
|
-
var
|
|
916
|
-
|
|
915
|
+
var x = g.languages.markup;
|
|
916
|
+
x && (x.tag.addInlined("style", "css"), x.tag.addAttribute("style", "css"));
|
|
917
917
|
})(i), i.languages.clike = {
|
|
918
918
|
comment: [
|
|
919
919
|
{
|
|
@@ -1080,7 +1080,7 @@ function oe() {
|
|
|
1080
1080
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1081
1081
|
var g = "Loading…", f = function(p, c) {
|
|
1082
1082
|
return "✖ Error " + p + " while fetching file: " + c;
|
|
1083
|
-
},
|
|
1083
|
+
}, x = "✖ Error: File does not exist or is empty", A = {
|
|
1084
1084
|
js: "javascript",
|
|
1085
1085
|
py: "python",
|
|
1086
1086
|
rb: "ruby",
|
|
@@ -1094,7 +1094,7 @@ function oe() {
|
|
|
1094
1094
|
function S(p, c, h) {
|
|
1095
1095
|
var t = new XMLHttpRequest();
|
|
1096
1096
|
t.open("GET", p, !0), t.onreadystatechange = function() {
|
|
1097
|
-
t.readyState == 4 && (t.status < 400 && t.responseText ? c(t.responseText) : t.status >= 400 ? h(f(t.status, t.statusText)) : h(
|
|
1097
|
+
t.readyState == 4 && (t.status < 400 && t.responseText ? c(t.responseText) : t.status >= 400 ? h(f(t.status, t.statusText)) : h(x));
|
|
1098
1098
|
}, t.send(null);
|
|
1099
1099
|
}
|
|
1100
1100
|
function H(p) {
|
|
@@ -1160,7 +1160,7 @@ function oe() {
|
|
|
1160
1160
|
})(Z)), Z.exports;
|
|
1161
1161
|
}
|
|
1162
1162
|
var ge = oe();
|
|
1163
|
-
const B = /* @__PURE__ */ le(ge), ce = "
|
|
1163
|
+
const B = /* @__PURE__ */ le(ge), ce = "_code__root_1bx1u_2", de = "_code_1bx1u_2", fe = "_code_title_1bx1u_13", pe = "_code__value_1bx1u_17", he = "_code__title_1bx1u_22", L = {
|
|
1164
1164
|
code__root: ce,
|
|
1165
1165
|
code: de,
|
|
1166
1166
|
code_title: fe,
|
|
@@ -1169,29 +1169,29 @@ const B = /* @__PURE__ */ le(ge), ce = "_code__root_jkm0m_2", de = "_code_jkm0m_
|
|
|
1169
1169
|
};
|
|
1170
1170
|
function Ae({
|
|
1171
1171
|
language: b = "javascript",
|
|
1172
|
-
children:
|
|
1172
|
+
children: j = "",
|
|
1173
1173
|
title: i,
|
|
1174
1174
|
className: g
|
|
1175
1175
|
}) {
|
|
1176
1176
|
const f = ie(
|
|
1177
1177
|
() => B.highlight(
|
|
1178
|
-
|
|
1178
|
+
j,
|
|
1179
1179
|
B.languages[b] ?? B.languages.javascript,
|
|
1180
1180
|
b
|
|
1181
1181
|
),
|
|
1182
|
-
[
|
|
1182
|
+
[j, b]
|
|
1183
1183
|
);
|
|
1184
|
-
return /* @__PURE__ */ re(se, { className: J(
|
|
1185
|
-
i ? /* @__PURE__ */
|
|
1186
|
-
/* @__PURE__ */
|
|
1184
|
+
return /* @__PURE__ */ re(se, { className: J(L.code__root, g), children: [
|
|
1185
|
+
i ? /* @__PURE__ */ P(V, { elevated: !0, className: L.code__title, children: /* @__PURE__ */ P(ue, { size: "sm", color: "dimmer", children: i }) }) : null,
|
|
1186
|
+
/* @__PURE__ */ P(
|
|
1187
1187
|
V,
|
|
1188
1188
|
{
|
|
1189
1189
|
elevated: !0,
|
|
1190
|
-
className: J(
|
|
1191
|
-
children: /* @__PURE__ */
|
|
1190
|
+
className: J(L.code, i && L.code_title),
|
|
1191
|
+
children: /* @__PURE__ */ P("pre", { children: /* @__PURE__ */ P(
|
|
1192
1192
|
"code",
|
|
1193
1193
|
{
|
|
1194
|
-
className:
|
|
1194
|
+
className: L.code__value,
|
|
1195
1195
|
dangerouslySetInnerHTML: {
|
|
1196
1196
|
__html: f
|
|
1197
1197
|
}
|
|
@@ -2,34 +2,34 @@ import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
|
2
2
|
import { useRef as d, useState as i, useLayoutEffect as m } from "react";
|
|
3
3
|
import { u } from "../../useRender-C3vlzS3t.js";
|
|
4
4
|
import { m as _ } from "../../useRenderElement-DngNDu_P.js";
|
|
5
|
-
import '../../collapse.css';const f = "
|
|
5
|
+
import '../../collapse.css';const f = "_collapse_10nze_2", h = "_collapse_expand_10nze_13", x = "_collapse_hidden_10nze_18", o = {
|
|
6
6
|
collapse: f,
|
|
7
7
|
collapse_expand: h,
|
|
8
8
|
collapse_hidden: x
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function R({
|
|
11
11
|
expand: s = !0,
|
|
12
12
|
render: l,
|
|
13
|
-
recalculate:
|
|
14
|
-
...
|
|
13
|
+
recalculate: n,
|
|
14
|
+
...c
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const t = d(null), [a, r] = i(0);
|
|
17
17
|
return m(() => {
|
|
18
|
-
if (!
|
|
18
|
+
if (!t.current)
|
|
19
19
|
return;
|
|
20
|
-
const e =
|
|
21
|
-
e.removeAttribute("style"), e.style.width = `${
|
|
22
|
-
}, [
|
|
20
|
+
const e = t.current.cloneNode(!0);
|
|
21
|
+
e.removeAttribute("style"), e.style.width = `${t.current.offsetWidth}px`, e.className = o.collapse_hidden, document.body.appendChild(e), r(e.offsetHeight), e.remove();
|
|
22
|
+
}, [n]), u({
|
|
23
23
|
defaultTagName: "div",
|
|
24
24
|
render: l,
|
|
25
|
-
ref:
|
|
26
|
-
props: _(
|
|
25
|
+
ref: t,
|
|
26
|
+
props: _(c, {
|
|
27
27
|
"aria-hidden": !s,
|
|
28
|
-
className: p(
|
|
29
|
-
style: { "--collapse-height": `${
|
|
28
|
+
className: p(o.collapse, s && o.collapse_expand),
|
|
29
|
+
style: { "--collapse-height": `${a}px` }
|
|
30
30
|
})
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
R as Collapse
|
|
35
35
|
};
|