@koide-labs/ui 0.1.2 → 0.1.4
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/{InternalBackdrop-BSMKU-hc.js → InternalBackdrop-DDLgWc7D.js} +1 -1
- 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 +54 -54
- package/dist/components/alert-dialog/alert-dialog.js +6 -6
- package/dist/components/anchor/anchor.js +7 -7
- package/dist/components/avatar/avatar.js +13 -13
- package/dist/components/badge/badge.js +17 -17
- package/dist/components/button/button.js +12 -12
- package/dist/components/checkbox/checkbox.js +15 -15
- package/dist/components/code/code.js +32 -32
- package/dist/components/collapse/collapse.js +5 -5
- package/dist/components/command/command.js +4 -4
- package/dist/components/context-menu/context-menu.js +13 -13
- package/dist/components/dialog/dialog.js +2 -2
- package/dist/components/heading/heading.js +9 -9
- package/dist/components/icon/icon.js +7 -7
- package/dist/components/icon-button/icon-button.js +24 -24
- package/dist/components/inline-code/inline-code.js +7 -7
- package/dist/components/input/input.js +1 -1
- package/dist/components/meter/meter.js +10 -10
- package/dist/components/multiline-input/multiline-input.js +1 -1
- package/dist/components/number-input/number-input.js +60 -60
- package/dist/components/password-input/password-input.js +6 -6
- package/dist/components/pill/pill.js +15 -15
- package/dist/components/popover/popover.js +31 -31
- package/dist/components/preview-card/preview-card.js +5 -5
- package/dist/components/radio-group/radio-group.js +109 -109
- package/dist/components/search-bar/search-bar.js +10 -10
- package/dist/components/select/select.js +8 -8
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/slider/slider.js +114 -114
- package/dist/components/spinner/spinner.js +4 -4
- package/dist/components/stacked-avatars/stacked-avatars.js +37 -37
- package/dist/components/status-banner/status-banner.js +22 -22
- package/dist/components/surface/surface.js +17 -17
- package/dist/components/switch/switch.js +28 -28
- package/dist/components/tabs/tabs.js +116 -116
- package/dist/components/text/text.js +16 -16
- package/dist/components/timestamp/timestamp.js +2 -2
- package/dist/components/toaster/toaster.js +145 -145
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.js +2 -2
- 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-Pi1eHwli.js → dialog.module-CRiRBcbM.js} +66 -66
- package/dist/{getDisabledMountTransitionStyles-E2x-_lte.js → getDisabledMountTransitionStyles-CyEI2117.js} +1 -1
- package/dist/heading.css +1 -1
- package/dist/icon-button.css +1 -1
- package/dist/icon.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/index2.css +1 -1
- package/dist/inline-code.css +1 -1
- package/dist/input.css +1 -1
- package/dist/input.module-CYcyDtrO.js +8 -0
- package/dist/integrations/react-markdown/index.js +26 -26
- package/dist/integrations/twemoji/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/{safePolygon-DnkzOIur.js → safePolygon-lAEp2rci.js} +1 -1
- package/dist/search-bar.css +1 -1
- package/dist/select.css +1 -1
- package/dist/{separator-wNYojB9q.js → separator-Or-BDQYZ.js} +13 -13
- 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-DZkByWDR.js → tooltip-JPnUwFFR.js} +6 -6
- package/dist/tooltip.css +1 -1
- package/dist/transitions.css +1 -1
- package/dist/{transitions.module-D9mMAtfI.js → transitions.module-SSNmQfsR.js} +43 -43
- package/dist/{useRole-BD3OL1rr.js → useRole-D1k7CnHQ.js} +1 -1
- package/dist/{useSyncedFloatingRootContext-BB1vwkV-.js → useSyncedFloatingRootContext-CaohymZI.js} +1 -1
- package/dist/{useTypeahead-BiL5IAVb.js → useTypeahead-CSZtonjF.js} +2 -2
- package/dist/view.css +1 -1
- package/dist/view.module-j3ylJCCE.js +6 -0
- package/dist/view2.css +1 -1
- package/package.json +2 -1
- package/dist/components/dialog/dialog.types.js +0 -1
- package/dist/components/icon/icon.types.js +0 -1
- package/dist/components/surface/surface.types.js +0 -1
- package/dist/components/view/view.types.js +0 -1
- package/dist/input.module-zw1dlr1_.js +0 -8
- package/dist/view.module-DlwuNdUj.js +0 -6
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as u, jsxs as Y } from "react/jsx-runtime";
|
|
2
2
|
import { c as Re } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { u as be, t as ae, T as Se } from "../../tooltip-
|
|
4
|
-
import { R as ye, P as Oe, c as x, h as Ie, d as xe, e as de, u as Ne, i as Me, f as Fe, j as
|
|
3
|
+
import { u as be, t as ae, T as Se } from "../../tooltip-JPnUwFFR.js";
|
|
4
|
+
import { R as ye, P as Oe, c as x, h as Ie, d as xe, e as de, u as Ne, i as Me, f as Fe, j as we, k as _e, p as ee, t as ke } from "../../transitions.module-SSNmQfsR.js";
|
|
5
5
|
import { View as Ae } from "../view/view.js";
|
|
6
6
|
import { Heading as De } from "../heading/heading.js";
|
|
7
7
|
import { Text as He } from "../text/text.js";
|
|
8
8
|
import { Surface as Ve } from "../surface/surface.js";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import { u as Be, a as Le, b as Ue, I as Ge, F as Ke } from "../../InternalBackdrop-
|
|
10
|
+
import { u as Be, a as Le, b as Ue, I as Ge, F as Ke } from "../../InternalBackdrop-DDLgWc7D.js";
|
|
11
11
|
import { f as q } from "../../formatErrorMessage-BqPuTBN-.js";
|
|
12
12
|
import * as Q from "react-dom";
|
|
13
13
|
import { T as je } from "../../useTimeout-BNni6aw5.js";
|
|
14
14
|
import { a as ze, u as K } from "../../useRenderElement-DngNDu_P.js";
|
|
15
15
|
import { u as Ye } from "../../useOnMount-VRW6CK2u.js";
|
|
16
16
|
import { j as We, C as qe, k as Je, i as Qe, l as Xe, b as Ze, F as ce, h as $e, P as et } from "../../FloatingPortal-BQsQhvIr.js";
|
|
17
|
-
import { p as tt, c as ot, u as nt, a as st, b as rt, d as it } from "../../useSyncedFloatingRootContext-
|
|
17
|
+
import { p as tt, c as ot, u as nt, a as st, b as rt, d as it } from "../../useSyncedFloatingRootContext-CaohymZI.js";
|
|
18
18
|
import { t as J, a as X, e as at, f as Z, c as $, i as ct } from "../../createBaseUIEventDetails-CCSfZ2vM.js";
|
|
19
|
-
import { u as pt } from "../../useRole-
|
|
19
|
+
import { u as pt } from "../../useRole-D1k7CnHQ.js";
|
|
20
20
|
import { u as pe } from "../../useStableCallback-DKZHlUAT.js";
|
|
21
21
|
import { u as ut } from "../../useButton-d3_JgBNr.js";
|
|
22
22
|
import { u as te } from "../../useBaseUiId-B7WyxtIE.js";
|
|
23
|
-
import { a as lt, s as dt, b as ft } from "../../safePolygon-
|
|
23
|
+
import { a as lt, s as dt, b as ft } from "../../safePolygon-lAEp2rci.js";
|
|
24
24
|
import { f as mt } from "../../element-u5WgOZX1.js";
|
|
25
25
|
import { i as gt } from "../../inertValue-BTpPjX30.js";
|
|
26
26
|
import { u as oe } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
27
|
-
import { a as vt, b as ht, g as fe } from "../../getDisabledMountTransitionStyles-
|
|
27
|
+
import { a as vt, b as ht, g as fe } from "../../getDisabledMountTransitionStyles-CyEI2117.js";
|
|
28
28
|
import { a as Pt, u as Et, t as Ct } from "../../useOpenChangeComplete-BHd-N7Ig.js";
|
|
29
29
|
import { i as Tt } from "../../floating-ui.utils.dom-cbi420Pg.js";
|
|
30
30
|
import { u as Rt } from "../../DirectionContext-C2o_MF_i.js";
|
|
@@ -140,7 +140,7 @@ function ue({
|
|
|
140
140
|
const {
|
|
141
141
|
openMethod: p,
|
|
142
142
|
triggerProps: h,
|
|
143
|
-
reset:
|
|
143
|
+
reset: _
|
|
144
144
|
} = Be(v);
|
|
145
145
|
nt(r);
|
|
146
146
|
const {
|
|
@@ -149,7 +149,7 @@ function ue({
|
|
|
149
149
|
r.update({
|
|
150
150
|
stickIfOpen: !0,
|
|
151
151
|
openChangeReason: null
|
|
152
|
-
}),
|
|
152
|
+
}), _();
|
|
153
153
|
});
|
|
154
154
|
Le(v && a === !0 && M !== J && p !== "touch", R), n.useEffect(() => {
|
|
155
155
|
v || r.context.stickIfOpenTimeout.clear();
|
|
@@ -177,10 +177,10 @@ function ue({
|
|
|
177
177
|
touch: "sloppy"
|
|
178
178
|
}
|
|
179
179
|
}), C = pt(O), {
|
|
180
|
-
getReferenceProps:
|
|
181
|
-
getFloatingProps:
|
|
180
|
+
getReferenceProps: k,
|
|
181
|
+
getFloatingProps: w,
|
|
182
182
|
getTriggerProps: b
|
|
183
|
-
} = de([I, C]), B = n.useMemo(() =>
|
|
183
|
+
} = de([I, C]), B = n.useMemo(() => k(h), [k, h]), A = n.useMemo(() => b(h), [b, h]), L = n.useMemo(() => w(), [w]);
|
|
184
184
|
r.useSyncedValues({
|
|
185
185
|
modal: a,
|
|
186
186
|
openMethod: p,
|
|
@@ -225,7 +225,7 @@ const xt = 300, me = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
225
225
|
} = s, M = V(!0), p = l?.store ?? M?.store;
|
|
226
226
|
if (!p)
|
|
227
227
|
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle." : q(74));
|
|
228
|
-
const h = te(R),
|
|
228
|
+
const h = te(R), _ = p.useState("isTriggerActive", h), c = p.useState("floatingRootContext"), F = p.useState("isOpenedByTrigger", h), E = n.useRef(null), {
|
|
229
229
|
registerTrigger: O,
|
|
230
230
|
isMountedByThisTrigger: I
|
|
231
231
|
} = it(h, E, p, {
|
|
@@ -233,8 +233,8 @@ const xt = 300, me = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
233
233
|
disabled: i,
|
|
234
234
|
openOnHover: m,
|
|
235
235
|
closeDelay: v
|
|
236
|
-
}), C = p.useState("openChangeReason"),
|
|
237
|
-
enabled: c != null && m && (
|
|
236
|
+
}), C = p.useState("openChangeReason"), k = p.useState("stickIfOpen"), w = p.useState("openMethod"), b = lt(c, {
|
|
237
|
+
enabled: c != null && m && (w !== "touch" || C !== X),
|
|
238
238
|
mouseOnly: !0,
|
|
239
239
|
move: !1,
|
|
240
240
|
handleClose: dt(),
|
|
@@ -243,10 +243,10 @@ const xt = 300, me = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
243
243
|
close: v
|
|
244
244
|
},
|
|
245
245
|
triggerElementRef: E,
|
|
246
|
-
isActiveTrigger:
|
|
246
|
+
isActiveTrigger: _
|
|
247
247
|
}), B = Ue(c, {
|
|
248
248
|
enabled: c != null,
|
|
249
|
-
stickIfOpen:
|
|
249
|
+
stickIfOpen: k
|
|
250
250
|
}), A = de([B]), L = p.useState("triggerProps", I), D = n.useMemo(() => ({
|
|
251
251
|
disabled: i,
|
|
252
252
|
open: F
|
|
@@ -289,7 +289,7 @@ const xt = 300, me = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
289
289
|
y?.focus();
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
|
-
return
|
|
292
|
+
return _ ? /* @__PURE__ */ Y(n.Fragment, {
|
|
293
293
|
children: [/* @__PURE__ */ u(ce, {
|
|
294
294
|
ref: U,
|
|
295
295
|
onFocus: j
|
|
@@ -353,10 +353,10 @@ const he = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
353
353
|
sticky: M = !1,
|
|
354
354
|
disableAnchorTracking: p = !1,
|
|
355
355
|
collisionAvoidance: h = et,
|
|
356
|
-
...
|
|
356
|
+
..._
|
|
357
357
|
} = s, {
|
|
358
358
|
store: c
|
|
359
|
-
} = V(), F = Nt(), E =
|
|
359
|
+
} = V(), F = Nt(), E = we(), O = c.useState("floatingRootContext"), I = c.useState("mounted"), C = c.useState("open"), k = c.useState("openChangeReason"), w = c.useState("activeTriggerElement"), b = c.useState("modal"), B = c.useState("positionerElement"), A = c.useState("instantType"), L = c.useState("transitionStatus"), D = n.useRef(null), H = Pt(B, !1, !1), S = vt({
|
|
360
360
|
anchor: i,
|
|
361
361
|
floatingRootContext: O,
|
|
362
362
|
positionMethod: a,
|
|
@@ -410,17 +410,17 @@ const he = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
410
410
|
c.set("positionerElement", g);
|
|
411
411
|
}, [c]), d = K("div", s, {
|
|
412
412
|
state: j,
|
|
413
|
-
props: [T.props, fe(L),
|
|
413
|
+
props: [T.props, fe(L), _],
|
|
414
414
|
ref: [o, z],
|
|
415
415
|
stateAttributesMapping: ee
|
|
416
416
|
});
|
|
417
417
|
return /* @__PURE__ */ Y(ie.Provider, {
|
|
418
418
|
value: T,
|
|
419
|
-
children: [I && b === !0 &&
|
|
419
|
+
children: [I && b === !0 && k !== J && /* @__PURE__ */ u(Ge, {
|
|
420
420
|
ref: c.context.internalBackdropRef,
|
|
421
421
|
inert: gt(!C),
|
|
422
|
-
cutout:
|
|
423
|
-
}), /* @__PURE__ */ u(
|
|
422
|
+
cutout: w
|
|
423
|
+
}), /* @__PURE__ */ u(_e, {
|
|
424
424
|
id: E,
|
|
425
425
|
children: d
|
|
426
426
|
})]
|
|
@@ -439,7 +439,7 @@ const Mt = {
|
|
|
439
439
|
...l
|
|
440
440
|
} = s, {
|
|
441
441
|
store: e
|
|
442
|
-
} = V(), m = ve(), r = St() != null, v = Rt(), R = e.useState("open"), N = e.useState("openMethod"), M = e.useState("instantType"), p = e.useState("transitionStatus"), h = e.useState("popupProps"),
|
|
442
|
+
} = V(), m = ve(), r = St() != null, v = Rt(), R = e.useState("open"), N = e.useState("openMethod"), M = e.useState("instantType"), p = e.useState("transitionStatus"), h = e.useState("popupProps"), _ = e.useState("titleElementId"), c = e.useState("descriptionElementId"), F = e.useState("modal"), E = e.useState("mounted"), O = e.useState("openChangeReason"), I = e.useState("popupElement"), C = e.useState("payload"), k = e.useState("positionerElement"), w = e.useState("activeTriggerElement"), b = e.useState("floatingRootContext");
|
|
443
443
|
Et({
|
|
444
444
|
open: R,
|
|
445
445
|
ref: e.context.popupRef,
|
|
@@ -476,7 +476,7 @@ const Mt = {
|
|
|
476
476
|
const j = n.useCallback(() => e.context.triggerElements.size > 1, [e]);
|
|
477
477
|
be({
|
|
478
478
|
popupElement: I,
|
|
479
|
-
positionerElement:
|
|
479
|
+
positionerElement: k,
|
|
480
480
|
mounted: E,
|
|
481
481
|
content: C,
|
|
482
482
|
enabled: j,
|
|
@@ -489,7 +489,7 @@ const Mt = {
|
|
|
489
489
|
state: S,
|
|
490
490
|
ref: [o, e.context.popupRef, G],
|
|
491
491
|
props: [h, {
|
|
492
|
-
"aria-labelledby":
|
|
492
|
+
"aria-labelledby": _,
|
|
493
493
|
"aria-describedby": c,
|
|
494
494
|
onKeyDown(d) {
|
|
495
495
|
r && bt.has(d.key) && d.stopPropagation();
|
|
@@ -505,7 +505,7 @@ const Mt = {
|
|
|
505
505
|
initialFocus: H,
|
|
506
506
|
returnFocus: a,
|
|
507
507
|
restoreFocus: "popup",
|
|
508
|
-
previousFocusableElement: Tt(
|
|
508
|
+
previousFocusableElement: Tt(w) ? w : void 0,
|
|
509
509
|
nextFocusableElement: e.context.triggerFocusTargetRef,
|
|
510
510
|
beforeContentFocusGuardRef: e.context.beforeContentFocusGuardRef,
|
|
511
511
|
children: z
|
|
@@ -578,9 +578,9 @@ const Te = /* @__PURE__ */ n.forwardRef(function(s, o) {
|
|
|
578
578
|
});
|
|
579
579
|
});
|
|
580
580
|
process.env.NODE_ENV !== "production" && (Te.displayName = "PopoverDescription");
|
|
581
|
-
const Ft = "
|
|
581
|
+
const Ft = "_popover_1b0wf_3", wt = "_popover__header_1b0wf_8", le = {
|
|
582
582
|
popover: Ft,
|
|
583
|
-
popover__header:
|
|
583
|
+
popover__header: wt
|
|
584
584
|
};
|
|
585
585
|
function po({
|
|
586
586
|
align: t,
|
|
@@ -602,7 +602,7 @@ function po({
|
|
|
602
602
|
className: Re(
|
|
603
603
|
ae.tooltip,
|
|
604
604
|
le.popover,
|
|
605
|
-
|
|
605
|
+
ke.transition_scale,
|
|
606
606
|
a
|
|
607
607
|
),
|
|
608
608
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as P, jsxs as q } from "react/jsx-runtime";
|
|
2
2
|
import { c as pe } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { t as z, T as fe } from "../../tooltip-
|
|
4
|
-
import { d as me, e as Pe, f as Ce, p as U, t as ge } from "../../transitions.module-
|
|
3
|
+
import { t as z, T as fe } from "../../tooltip-JPnUwFFR.js";
|
|
4
|
+
import { d as me, e as Pe, f as Ce, p as U, t as ge } from "../../transitions.module-SSNmQfsR.js";
|
|
5
5
|
import { Surface as we } from "../surface/surface.js";
|
|
6
6
|
import * as e from "react";
|
|
7
7
|
import * as ve from "react-dom";
|
|
@@ -14,8 +14,8 @@ import { c as G, b as L, t as J, a as Ne, e as Oe } from "../../createBaseUIEven
|
|
|
14
14
|
import { d as Q, f as X, e as xe } from "../../element-u5WgOZX1.js";
|
|
15
15
|
import { u as ee, t as Se } from "../../useOpenChangeComplete-BHd-N7Ig.js";
|
|
16
16
|
import { u as De } from "../../useTransitionStatus-CmMyUh74.js";
|
|
17
|
-
import { u as Me, a as _e, g as be } from "../../getDisabledMountTransitionStyles-
|
|
18
|
-
import { u as Ve, s as Ae } from "../../safePolygon-
|
|
17
|
+
import { u as Me, a as _e, g as be } from "../../getDisabledMountTransitionStyles-CyEI2117.js";
|
|
18
|
+
import { u as Ve, s as Ae } from "../../safePolygon-lAEp2rci.js";
|
|
19
19
|
import { u as Te } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
20
20
|
import { u as A } from "../../useRenderElement-DngNDu_P.js";
|
|
21
21
|
import { F as Ie } from "../../FloatingPortalLite-_ECdFE7b.js";
|
|
@@ -352,7 +352,7 @@ const ie = /* @__PURE__ */ e.forwardRef(function(s, u) {
|
|
|
352
352
|
});
|
|
353
353
|
process.env.NODE_ENV !== "production" && (ie.displayName = "PreviewCardArrow");
|
|
354
354
|
const Be = {
|
|
355
|
-
"preview-card": "_preview-
|
|
355
|
+
"preview-card": "_preview-card_sl62l_3"
|
|
356
356
|
};
|
|
357
357
|
function ct({
|
|
358
358
|
align: t,
|