@koide-labs/ui 0.1.7 → 0.1.8

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 (40) hide show
  1. package/dist/components/accordion/accordion.js +4 -4
  2. package/dist/components/alert-dialog/alert-dialog.js +19 -19
  3. package/dist/components/badge/badge.js +6 -6
  4. package/dist/components/button/button.js +1 -1
  5. package/dist/components/checkbox/checkbox.js +6 -6
  6. package/dist/components/code/code.js +4 -4
  7. package/dist/components/command/command.js +2 -2
  8. package/dist/components/context-menu/context-menu.js +25 -25
  9. package/dist/components/dialog/dialog.js +23 -23
  10. package/dist/components/icon/icon.d.ts +9 -3
  11. package/dist/components/icon/icon.js +39 -26
  12. package/dist/components/icon/icon.types.d.ts +1 -1
  13. package/dist/components/icon-button/icon-button.d.ts +5 -0
  14. package/dist/components/icon-button/icon-button.js +7 -6
  15. package/dist/components/input/input.js +19 -19
  16. package/dist/components/meter/meter.js +1 -1
  17. package/dist/components/multiline-input/multiline-input.js +1 -1
  18. package/dist/components/number-input/number-input.js +8 -8
  19. package/dist/components/password-input/password-input.js +4 -4
  20. package/dist/components/pill/pill.js +1 -1
  21. package/dist/components/popover/popover.js +21 -21
  22. package/dist/components/preview-card/preview-card.js +9 -9
  23. package/dist/components/radio-group/radio-group.js +20 -20
  24. package/dist/components/search-bar/search-bar.js +8 -8
  25. package/dist/components/select/select.js +14 -14
  26. package/dist/components/spinner/spinner.js +7 -7
  27. package/dist/components/stacked-avatars/stacked-avatars.js +2 -2
  28. package/dist/components/status-banner/status-banner.js +5 -5
  29. package/dist/components/tabs/tabs.js +1 -1
  30. package/dist/components/theme-provider/theme-provider.js +3 -3
  31. package/dist/components/timestamp/timestamp.js +1 -1
  32. package/dist/components/toaster/toaster.js +13 -13
  33. package/dist/components/tooltip/index.js +1 -1
  34. package/dist/components/tooltip/tooltip.js +2 -2
  35. package/dist/icon.css +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/integrations/react-markdown/index.js +11 -11
  38. package/dist/spinner.css +1 -1
  39. package/dist/{tooltip-JPnUwFFR.js → tooltip-CpyPanwd.js} +9 -9
  40. package/package.json +19 -16
@@ -1,9 +1,9 @@
1
1
  import { jsx as k, jsxs as ne } from "react/jsx-runtime";
2
2
  import { c as Ce } from "../../clsx-OuTLNxxd.js";
3
3
  import { textify as te } from "../../-utils.js";
4
- import { Surface as Ne } from "../surface/surface.js";
4
+ import { Icon as Ne } from "../icon/icon.js";
5
+ import { Surface as Oe } from "../surface/surface.js";
5
6
  import { View as oe } from "../view/view.js";
6
- import { Icon as Oe } from "../icon/icon.js";
7
7
  import * as r from "react";
8
8
  import { u as ae } from "../../useControlled-Du4sJyMj.js";
9
9
  import { u as L } from "../../useStableCallback-DKZHlUAT.js";
@@ -661,7 +661,7 @@ function en({
661
661
  }) {
662
662
  return /* @__PURE__ */ ne(ge, { className: U.accordion, ...I, children: [
663
663
  /* @__PURE__ */ k(be, { className: U.accordion__header, children: /* @__PURE__ */ k(
664
- Ne,
664
+ Oe,
665
665
  {
666
666
  elevated: !0,
667
667
  render: /* @__PURE__ */ ne(
@@ -677,7 +677,7 @@ function en({
677
677
  children: [
678
678
  te(n),
679
679
  /* @__PURE__ */ k(
680
- Oe,
680
+ Ne,
681
681
  {
682
682
  name: "close-line",
683
683
  className: U["accordion__trigger-icon"]
@@ -1,11 +1,11 @@
1
1
  import { jsx as o, jsxs as u } from "react/jsx-runtime";
2
2
  import { c as _ } from "../../clsx-OuTLNxxd.js";
3
- import { t as h } from "../../transitions.module-SSNmQfsR.js";
4
- import { u as v, D as y, a as I, b as T, c as b, d as O, e as N, s as n, f as S, g as k, h as w, i as A } from "../../dialog.module-CRiRBcbM.js";
5
- import { Surface as B } from "../surface/surface.js";
3
+ import { Button as v } from "../button/button.js";
4
+ import { Surface as y } from "../surface/surface.js";
5
+ import { Text as h } from "../text/text.js";
6
6
  import { View as C } from "../view/view.js";
7
- import { Text as D } from "../text/text.js";
8
- import { Button as j } from "../button/button.js";
7
+ import { t as D } from "../../transitions.module-SSNmQfsR.js";
8
+ import { u as I, D as T, a as b, b as O, c as N, d as S, e as k, s as n, f as w, g as A, h as B, i as j } from "../../dialog.module-CRiRBcbM.js";
9
9
  import * as V from "react";
10
10
  import { a as $ } from "../../useRenderElement-DngNDu_P.js";
11
11
  import '../../alert-dialog.css';function z(t) {
@@ -19,7 +19,7 @@ import '../../alert-dialog.css';function z(t) {
19
19
  handle: f,
20
20
  triggerId: l,
21
21
  defaultTriggerId: c = null
22
- } = t, d = v(), g = !!d, e = $(() => f?.store ?? new y({
22
+ } = t, d = I(), g = !!d, e = $(() => f?.store ?? new T({
23
23
  open: i ?? a,
24
24
  activeTriggerId: l !== void 0 ? l : c,
25
25
  modal: !0,
@@ -29,7 +29,7 @@ import '../../alert-dialog.css';function z(t) {
29
29
  })).current;
30
30
  e.useControlledProp("open", i, a), e.useControlledProp("activeTriggerId", l, c), e.useSyncedValue("nested", g), e.useContextCallback("onOpenChange", s), e.useContextCallback("onOpenChangeComplete", p);
31
31
  const P = e.useState("payload");
32
- I({
32
+ b({
33
33
  store: e,
34
34
  actionsRef: m,
35
35
  parentContext: d?.store.context
@@ -37,7 +37,7 @@ import '../../alert-dialog.css';function z(t) {
37
37
  const R = V.useMemo(() => ({
38
38
  store: e
39
39
  }), [e]);
40
- return /* @__PURE__ */ o(T.Provider, {
40
+ return /* @__PURE__ */ o(O.Provider, {
41
41
  value: R,
42
42
  children: typeof r == "function" ? r({
43
43
  payload: P
@@ -60,27 +60,27 @@ function W({
60
60
  ...c
61
61
  }) {
62
62
  return a.length < 2 && console.error("You must have at least two actions."), /* @__PURE__ */ u(z, { ...c, children: [
63
- s ? /* @__PURE__ */ o(b, { render: s }) : null,
64
- /* @__PURE__ */ u(O, { children: [
63
+ s ? /* @__PURE__ */ o(N, { render: s }) : null,
64
+ /* @__PURE__ */ u(S, { children: [
65
65
  /* @__PURE__ */ o(
66
- N,
66
+ k,
67
67
  {
68
68
  className: _(
69
69
  n.dialog__backdrop,
70
- h.transition_opacity
70
+ D.transition_opacity
71
71
  )
72
72
  }
73
73
  ),
74
74
  /* @__PURE__ */ o(
75
- S,
75
+ w,
76
76
  {
77
77
  className: _(
78
78
  n.dialog__popup,
79
79
  f && n.dialog__popup_centered,
80
- h.transition_scale
80
+ D.transition_scale
81
81
  ),
82
82
  children: /* @__PURE__ */ u(
83
- B,
83
+ y,
84
84
  {
85
85
  background: m,
86
86
  className: _(
@@ -90,13 +90,13 @@ function W({
90
90
  ),
91
91
  children: [
92
92
  t || r ? /* @__PURE__ */ u(C, { className: n.dialog__header, children: [
93
- t ? /* @__PURE__ */ o(D, { render: /* @__PURE__ */ o(k, {}), size: "2xl", children: t }) : null,
93
+ t ? /* @__PURE__ */ o(h, { render: /* @__PURE__ */ o(A, {}), size: "2xl", children: t }) : null,
94
94
  r ? /* @__PURE__ */ o(
95
- D,
95
+ h,
96
96
  {
97
97
  multiline: !0,
98
98
  color: "dimmer",
99
- render: /* @__PURE__ */ o(w, {}),
99
+ render: /* @__PURE__ */ o(B, {}),
100
100
  children: r
101
101
  }
102
102
  ) : null
@@ -119,7 +119,7 @@ function W({
119
119
  ] });
120
120
  }
121
121
  function x(t) {
122
- return /* @__PURE__ */ o(A, { render: /* @__PURE__ */ o(j, { ...t }) });
122
+ return /* @__PURE__ */ o(j, { render: /* @__PURE__ */ o(v, { ...t }) });
123
123
  }
124
124
  function Y(t, r) {
125
125
  return r ? {
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as p, Fragment as g } from "react/jsx-runtime";
2
2
  import { c as f } from "../../clsx-OuTLNxxd.js";
3
- import { T as _ } from "../../tooltip-JPnUwFFR.js";
3
+ import { Icon as _ } from "../icon/icon.js";
4
4
  import { Text as b } from "../text/text.js";
5
- import { View as h } from "../view/view.js";
6
- import { Icon as u } from "../icon/icon.js";
5
+ import { T as h } from "../../tooltip-CpyPanwd.js";
6
+ import { View as u } from "../view/view.js";
7
7
  import { u as y } from "../../useRender-C3vlzS3t.js";
8
8
  import { m as x } from "../../useRenderElement-DngNDu_P.js";
9
9
  import '../../badge.css';const T = "_badge_1m3yi_3", j = "_badge_shiny_1m3yi_18", s = {
@@ -30,12 +30,12 @@ function V({
30
30
  d
31
31
  ),
32
32
  children: /* @__PURE__ */ p(g, { children: [
33
- r ? /* @__PURE__ */ e(u, { name: r }) : null,
33
+ r ? /* @__PURE__ */ e(_, { name: r }) : null,
34
34
  i
35
35
  ] })
36
36
  })
37
- }), o = /* @__PURE__ */ e(h, { color: t, children: c });
38
- return m ? /* @__PURE__ */ e(_, { trigger: o, children: /* @__PURE__ */ e(b, { size: "sm", multiline: !0, children: m }) }) : o;
37
+ }), o = /* @__PURE__ */ e(u, { color: t, children: c });
38
+ return m ? /* @__PURE__ */ e(h, { trigger: o, children: /* @__PURE__ */ e(b, { size: "sm", multiline: !0, children: m }) }) : o;
39
39
  }
40
40
  export {
41
41
  V as Badge
@@ -1,8 +1,8 @@
1
1
  import { jsxs as l, jsx as _ } from "react/jsx-runtime";
2
2
  import { c as g } from "../../clsx-OuTLNxxd.js";
3
3
  import { textify as m } from "../../-utils.js";
4
- import { View as r } from "../view/view.js";
5
4
  import { Icon as e } from "../icon/icon.js";
5
+ import { View as r } from "../view/view.js";
6
6
  import { B as s } from "../../Button-BmcVHRRW.js";
7
7
  import '../../button.css';const c = "_button_17tw0_3", x = "_button_height_sm_17tw0_16", a = "_button_height_md_17tw0_21", d = "_button_height_lg_17tw0_26", f = "_button_height_xl_17tw0_31", w = "_button_height_2xl_17tw0_36", p = "_button_height_3xl_17tw0_41", i = {
8
8
  button: c,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as A, jsx as m } from "react/jsx-runtime";
2
- import { View as we } from "../view/view.js";
3
- import { Icon as Fe } from "../icon/icon.js";
4
- import { Text as Te } from "../text/text.js";
2
+ import { Icon as we } from "../icon/icon.js";
3
+ import { Text as Fe } from "../text/text.js";
4
+ import { View as Te } from "../view/view.js";
5
5
  import * as r from "react";
6
6
  import { f as ee } from "../../formatErrorMessage-BqPuTBN-.js";
7
7
  import { N as je, d as qe, m as Ue, E as De, u as te } from "../../useRenderElement-DngNDu_P.js";
@@ -250,18 +250,18 @@ const it = "_checkbox__label_1o5lj_3", st = "_checkbox_1o5lj_3", ct = "_checkbox
250
250
  };
251
251
  function yt({ color: e, label: n, ...k }) {
252
252
  const x = /* @__PURE__ */ m(
253
- we,
253
+ Te,
254
254
  {
255
255
  color: e,
256
256
  interactive: "fill-outline",
257
257
  render: /* @__PURE__ */ m(ae, { "aria-label": n, ...k }),
258
258
  className: j.checkbox,
259
- children: /* @__PURE__ */ m(ie, { className: j.checkbox__indicator, children: /* @__PURE__ */ m(Fe, { name: "check-line", size: "sm" }) })
259
+ children: /* @__PURE__ */ m(ie, { className: j.checkbox__indicator, children: /* @__PURE__ */ m(we, { name: "check-line", size: "sm" }) })
260
260
  }
261
261
  );
262
262
  return n ? /* @__PURE__ */ A("label", { className: j.checkbox__label, children: [
263
263
  x,
264
- /* @__PURE__ */ m(Te, { children: n })
264
+ /* @__PURE__ */ m(Fe, { children: n })
265
265
  ] }) : x;
266
266
  }
267
267
  export {
@@ -1,9 +1,9 @@
1
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
- import { View as se } from "../view/view.js";
5
4
  import { Surface as V } from "../surface/surface.js";
6
- import { Text as ue } from "../text/text.js";
5
+ import { Text as se } from "../text/text.js";
6
+ import { View as ue } from "../view/view.js";
7
7
  import '../../code.css';var K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
8
  function le(b) {
9
9
  return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b;
@@ -1181,8 +1181,8 @@ function we({
1181
1181
  ),
1182
1182
  [j, b]
1183
1183
  );
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,
1184
+ return /* @__PURE__ */ re(ue, { className: J(L.code__root, g), children: [
1185
+ i ? /* @__PURE__ */ P(V, { elevated: !0, className: L.code__title, children: /* @__PURE__ */ P(se, { size: "sm", color: "dimmer", children: i }) }) : null,
1186
1186
  /* @__PURE__ */ P(
1187
1187
  V,
1188
1188
  {
@@ -7,10 +7,10 @@ import en from "react-dom";
7
7
  import { c as We } from "../../clsx-OuTLNxxd.js";
8
8
  import { textify as tn } from "../../-utils.js";
9
9
  import { Dialog as nn } from "../dialog/dialog.js";
10
- import { View as ye } from "../view/view.js";
11
10
  import { Icon as vt } from "../icon/icon.js";
12
- import { Text as pt } from "../text/text.js";
13
11
  import { S as rn } from "../../separator-Or-BDQYZ.js";
12
+ import { Text as pt } from "../text/text.js";
13
+ import { View as ye } from "../view/view.js";
14
14
  import '../../command.css';var Je = 1, on = 0.9, an = 0.8, cn = 0.17, Ne = 0.1, Oe = 0.999, un = 0.9999, sn = 0.99, ln = /[\\\/_+.#"@\[\(\{&]/, dn = /[\\\/_+.#"@\[\(\{&]/g, fn = /[\s-]/, ht = /[\s-]/g;
15
15
  function Be(e, t, n, r, o, i, u) {
16
16
  if (i === t.length) return o === e.length ? Je : sn;
@@ -4,12 +4,12 @@ import * as t from "react";
4
4
  import { createContext as Wt, useContext as Xt } from "react";
5
5
  import { textify as Ce } from "../../-utils.js";
6
6
  import { tokens as st } from "../../styles/tokens.js";
7
- import { p as it, k as jt, R as $t, P as qt, c as U, m as zt, j as Jt, u as Qt, d as Zt, e as at, h as en, f as tn, i as nn, t as ut } from "../../transitions.module-SSNmQfsR.js";
8
- import { Surface as ct } from "../surface/surface.js";
9
- import { View as Re } from "../view/view.js";
10
7
  import { Icon as ce } from "../icon/icon.js";
11
- import { Text as lt } from "../text/text.js";
12
- import { S as on, a as rn } from "../../separator-Or-BDQYZ.js";
8
+ import { S as jt, a as $t } from "../../separator-Or-BDQYZ.js";
9
+ import { Surface as it } from "../surface/surface.js";
10
+ import { Text as at } from "../text/text.js";
11
+ import { View as Re } from "../view/view.js";
12
+ import { p as ut, k as qt, R as zt, P as Jt, c as U, m as Qt, j as Zt, u as en, d as tn, e as ct, h as nn, f as on, i as rn, t as lt } from "../../transitions.module-SSNmQfsR.js";
13
13
  import { u as dt } from "../../useControlled-Du4sJyMj.js";
14
14
  import { u as le } from "../../useStableCallback-DKZHlUAT.js";
15
15
  import { f as J } from "../../formatErrorMessage-BqPuTBN-.js";
@@ -326,7 +326,7 @@ const Rt = /* @__PURE__ */ t.forwardRef(function(o, i) {
326
326
  });
327
327
  process.env.NODE_ENV !== "production" && (Rt.displayName = "MenuItem");
328
328
  const Zn = {
329
- ...it,
329
+ ...ut,
330
330
  ...mt
331
331
  }, Ae = /* @__PURE__ */ t.forwardRef(function(o, i) {
332
332
  const {
@@ -522,7 +522,7 @@ const Fe = /* @__PURE__ */ t.forwardRef(function(o, i) {
522
522
  nodeId: T.context.nodeId
523
523
  }), [T.side, T.align, T.arrowRef, T.arrowUncentered, T.arrowStyles, T.context.nodeId]), se = Y("div", o, {
524
524
  state: $,
525
- stateAttributesMapping: it,
525
+ stateAttributesMapping: ut,
526
526
  ref: [i, s.useStateSetter("positionerElement")],
527
527
  props: [te, u]
528
528
  }), ie = D && n.type !== "menu" && (n.type !== "menubar" && G && x !== xe || n.type === "menubar" && n.context.modal);
@@ -533,7 +533,7 @@ const Fe = /* @__PURE__ */ t.forwardRef(function(o, i) {
533
533
  ref: n.type === "context-menu" || n.type === "nested-context-menu" ? n.context.internalBackdropRef : null,
534
534
  inert: Bn(!p),
535
535
  cutout: Z
536
- }), /* @__PURE__ */ c(jt, {
536
+ }), /* @__PURE__ */ c(qt, {
537
537
  id: m,
538
538
  children: /* @__PURE__ */ c(Kn, {
539
539
  elementsRef: s.context.itemDomElements,
@@ -719,7 +719,7 @@ const ro = {
719
719
  return e.parent.store.select("keyboardEventRelay");
720
720
  })
721
721
  };
722
- class He extends $t {
722
+ class He extends zt {
723
723
  constructor(o) {
724
724
  super({
725
725
  ...so(),
@@ -742,7 +742,7 @@ class He extends $t {
742
742
  triggerFocusTargetRef: /* @__PURE__ */ t.createRef(),
743
743
  beforeContentFocusGuardRef: /* @__PURE__ */ t.createRef(),
744
744
  onOpenChangeComplete: void 0,
745
- triggerElements: new qt()
745
+ triggerElements: new Jt()
746
746
  }, ro), this.observe(U((i) => i.allowMouseEnter), (i, C) => {
747
747
  this.state.parent.type === "menu" && i !== C && this.state.parent.store.set("allowMouseEnter", i);
748
748
  }), this.unsubscribeParentListener = this.observe("parent", (i) => {
@@ -781,7 +781,7 @@ function so() {
781
781
  hoverEnabled: !0,
782
782
  instantType: void 0,
783
783
  openChangeReason: null,
784
- floatingTreeRoot: new zt(),
784
+ floatingTreeRoot: new Qt(),
785
785
  floatingNodeId: void 0,
786
786
  floatingParentNodeId: null,
787
787
  itemProps: un,
@@ -824,7 +824,7 @@ function Nt(e) {
824
824
  type: void 0
825
825
  }, [h, u, s, _]), n = He.useStore(I?.store, {
826
826
  parent: O
827
- }), A = n.useState("floatingTreeRoot"), y = Jt(A), D = Qt();
827
+ }), A = n.useState("floatingTreeRoot"), y = Zt(A), D = en();
828
828
  Te(() => {
829
829
  h && !u ? n.update({
830
830
  parent: {
@@ -937,7 +937,7 @@ function Nt(e) {
937
937
  X?.off("setOpen", M);
938
938
  };
939
939
  }, [X, V]);
940
- const kt = Zt(re, {
940
+ const kt = tn(re, {
941
941
  enabled: !N,
942
942
  bubbles: b && v.type === "menu",
943
943
  outsidePress() {
@@ -977,7 +977,7 @@ function Nt(e) {
977
977
  getFloatingProps: Xe,
978
978
  getItemProps: je,
979
979
  getTriggerProps: $e
980
- } = at([kt, _t, Vt, Ut]), Lt = t.useMemo(() => {
980
+ } = ct([kt, _t, Vt, Ut]), Lt = t.useMemo(() => {
981
981
  const M = Se(We(), {
982
982
  onMouseEnter() {
983
983
  n.set("hoverEnabled", !0);
@@ -1024,7 +1024,7 @@ function Nt(e) {
1024
1024
  payload: Q
1025
1025
  }) : o
1026
1026
  });
1027
- return v.type === void 0 || v.type === "context-menu" ? /* @__PURE__ */ c(en, {
1027
+ return v.type === void 0 || v.type === "context-menu" ? /* @__PURE__ */ c(nn, {
1028
1028
  externalTree: A,
1029
1029
  children: ze
1030
1030
  }) : ze;
@@ -1108,7 +1108,7 @@ const St = /* @__PURE__ */ t.forwardRef(function(o, i) {
1108
1108
  toggle: !a,
1109
1109
  ignoreMouse: a,
1110
1110
  stickIfOpen: !1
1111
- }), W = at([K]), X = l.useState("triggerProps", !0);
1111
+ }), W = ct([K]), X = l.useState("triggerProps", !0);
1112
1112
  delete X.id;
1113
1113
  const T = t.useMemo(() => ({
1114
1114
  disabled: N,
@@ -1117,7 +1117,7 @@ const St = /* @__PURE__ */ t.forwardRef(function(o, i) {
1117
1117
  }), [N, w, u]);
1118
1118
  return Y("div", o, {
1119
1119
  state: T,
1120
- stateAttributesMapping: tn,
1120
+ stateAttributesMapping: on,
1121
1121
  props: [W.getReferenceProps(), ne, X, G, {
1122
1122
  tabIndex: u || w ? 0 : -1,
1123
1123
  onBlur() {
@@ -1252,7 +1252,7 @@ const rt = 500, Tt = /* @__PURE__ */ t.forwardRef(function(o, i) {
1252
1252
  WebkitTouchCallout: "none"
1253
1253
  }
1254
1254
  }, d],
1255
- stateAttributesMapping: nn
1255
+ stateAttributesMapping: rn
1256
1256
  });
1257
1257
  });
1258
1258
  process.env.NODE_ENV !== "production" && (Tt.displayName = "ContextMenuTrigger");
@@ -1276,10 +1276,10 @@ function uo({
1276
1276
  /* @__PURE__ */ c(Le, { children: /* @__PURE__ */ c(Fe, { children: /* @__PURE__ */ c(
1277
1277
  Ae,
1278
1278
  {
1279
- render: /* @__PURE__ */ c(ct, { background: o }),
1279
+ render: /* @__PURE__ */ c(it, { background: o }),
1280
1280
  className: de(
1281
1281
  H["context-menu"],
1282
- ut["transition_fade-out"],
1282
+ lt["transition_fade-out"],
1283
1283
  i
1284
1284
  ),
1285
1285
  style: E,
@@ -1305,7 +1305,7 @@ function co({
1305
1305
  e ? /* @__PURE__ */ c(ce, { name: e, className: H["context-menu__item-icon"] }) : null,
1306
1306
  Ce(C),
1307
1307
  o ? /* @__PURE__ */ c(
1308
- lt,
1308
+ at,
1309
1309
  {
1310
1310
  className: H["context-menu__item-shortcut"],
1311
1311
  color: "dimmest",
@@ -1318,7 +1318,7 @@ function co({
1318
1318
  );
1319
1319
  }
1320
1320
  function lo(e) {
1321
- return /* @__PURE__ */ c(on, { render: /* @__PURE__ */ c(rn, {}), ...e });
1321
+ return /* @__PURE__ */ c(jt, { render: /* @__PURE__ */ c($t, {}), ...e });
1322
1322
  }
1323
1323
  function po({
1324
1324
  label: e,
@@ -1327,7 +1327,7 @@ function po({
1327
1327
  }) {
1328
1328
  return /* @__PURE__ */ ee(Mt, { ...i, children: [
1329
1329
  e ? /* @__PURE__ */ c(
1330
- lt,
1330
+ at,
1331
1331
  {
1332
1332
  render: /* @__PURE__ */ c(Ct, {}),
1333
1333
  className: H["context-menu__label"],
@@ -1419,10 +1419,10 @@ function ho({
1419
1419
  /* @__PURE__ */ c(Le, { children: /* @__PURE__ */ c(Fe, { alignOffset: -4, sideOffset: -4, children: /* @__PURE__ */ c(
1420
1420
  Ae,
1421
1421
  {
1422
- render: /* @__PURE__ */ c(ct, { background: R }),
1422
+ render: /* @__PURE__ */ c(it, { background: R }),
1423
1423
  className: de(
1424
1424
  H["context-menu"],
1425
- ut.transition_scale,
1425
+ lt.transition_scale,
1426
1426
  C
1427
1427
  ),
1428
1428
  style: E,
@@ -1,12 +1,12 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
2
  import { c as f } from "../../clsx-OuTLNxxd.js";
3
- import { t as h } from "../../transitions.module-SSNmQfsR.js";
4
- import { u as y, D as T, a as b, b as O, c as k, d as v, e as N, s as n, f as S, g as w, h as B, i as P } from "../../dialog.module-CRiRBcbM.js";
5
- import { Surface as j } from "../surface/surface.js";
6
- import { View as V } from "../view/view.js";
7
- import { Text as x } from "../text/text.js";
8
- import { IconButton as $ } from "../icon-button/icon-button.js";
9
- import { Button as z } from "../button/button.js";
3
+ import { Button as y } from "../button/button.js";
4
+ import { IconButton as T } from "../icon-button/icon-button.js";
5
+ import { Surface as b } from "../surface/surface.js";
6
+ import { Text as h } from "../text/text.js";
7
+ import { View as O } from "../view/view.js";
8
+ import { t as x } from "../../transitions.module-SSNmQfsR.js";
9
+ import { u as k, D as v, a as N, b as S, c as w, d as B, e as j, s as n, f as V, g as $, h as z, i as P } from "../../dialog.module-CRiRBcbM.js";
10
10
  import * as M from "react";
11
11
  import { a as W } from "../../useRenderElement-DngNDu_P.js";
12
12
  function q(t) {
@@ -22,7 +22,7 @@ function q(t) {
22
22
  handle: g,
23
23
  triggerId: m,
24
24
  defaultTriggerId: C = null
25
- } = t, D = y(!0), _ = !!D, o = W(() => g?.store ?? new T({
25
+ } = t, D = k(!0), _ = !!D, o = W(() => g?.store ?? new v({
26
26
  open: r ?? l,
27
27
  activeTriggerId: m !== void 0 ? m : C,
28
28
  modal: s,
@@ -35,7 +35,7 @@ function q(t) {
35
35
  modal: s
36
36
  }), o.useContextCallback("onOpenChange", d), o.useContextCallback("onOpenChangeComplete", u);
37
37
  const R = o.useState("payload");
38
- b({
38
+ N({
39
39
  store: o,
40
40
  actionsRef: p,
41
41
  parentContext: D?.store.context
@@ -43,7 +43,7 @@ function q(t) {
43
43
  const I = M.useMemo(() => ({
44
44
  store: o
45
45
  }), [o]);
46
- return /* @__PURE__ */ e(O.Provider, {
46
+ return /* @__PURE__ */ e(S.Provider, {
47
47
  value: I,
48
48
  children: typeof a == "function" ? a({
49
49
  payload: R
@@ -63,27 +63,27 @@ function A({
63
63
  ...g
64
64
  }) {
65
65
  return /* @__PURE__ */ c(q, { ...g, children: [
66
- r ? /* @__PURE__ */ e(k, { render: r }) : null,
67
- /* @__PURE__ */ c(v, { children: [
66
+ r ? /* @__PURE__ */ e(w, { render: r }) : null,
67
+ /* @__PURE__ */ c(B, { children: [
68
68
  /* @__PURE__ */ e(
69
- N,
69
+ j,
70
70
  {
71
71
  className: f(
72
72
  n.dialog__backdrop,
73
- h.transition_opacity
73
+ x.transition_opacity
74
74
  )
75
75
  }
76
76
  ),
77
77
  /* @__PURE__ */ e(
78
- S,
78
+ V,
79
79
  {
80
80
  className: f(
81
81
  n.dialog__popup,
82
82
  u && n.dialog__popup_centered,
83
- h.transition_scale
83
+ x.transition_scale
84
84
  ),
85
85
  children: /* @__PURE__ */ c(
86
- j,
86
+ b,
87
87
  {
88
88
  background: d,
89
89
  className: f(
@@ -92,14 +92,14 @@ function A({
92
92
  p
93
93
  ),
94
94
  children: [
95
- t || a ? /* @__PURE__ */ c(V, { className: n.dialog__header, children: [
96
- t ? /* @__PURE__ */ e(x, { render: /* @__PURE__ */ e(w, {}), size: "2xl", children: t }) : null,
95
+ t || a ? /* @__PURE__ */ c(O, { className: n.dialog__header, children: [
96
+ t ? /* @__PURE__ */ e(h, { render: /* @__PURE__ */ e($, {}), size: "2xl", children: t }) : null,
97
97
  a ? /* @__PURE__ */ e(
98
- x,
98
+ h,
99
99
  {
100
100
  multiline: !0,
101
101
  color: "dimmer",
102
- render: /* @__PURE__ */ e(B, {}),
102
+ render: /* @__PURE__ */ e(z, {}),
103
103
  children: a
104
104
  }
105
105
  ) : null
@@ -111,7 +111,7 @@ function A({
111
111
  "data-framework-close": !0,
112
112
  className: n.dialog__close,
113
113
  render: /* @__PURE__ */ e(
114
- $,
114
+ T,
115
115
  {
116
116
  size: "sm",
117
117
  icon: "close-line",
@@ -130,7 +130,7 @@ function A({
130
130
  ] });
131
131
  }
132
132
  function E(t) {
133
- return /* @__PURE__ */ e(P, { render: /* @__PURE__ */ e(z, { ...t }) });
133
+ return /* @__PURE__ */ e(P, { render: /* @__PURE__ */ e(y, { ...t }) });
134
134
  }
135
135
  const Z = Object.assign(A, {
136
136
  Close: E
@@ -2,13 +2,13 @@ import { ComponentProps } from 'react';
2
2
  import { ColorToken, Size } from '../../styles/tokens';
3
3
  import { IconName } from './icon.types';
4
4
  interface IconProps extends Omit<ComponentProps<"svg">, "name"> {
5
+ /** Icon name */
6
+ name: IconName;
5
7
  /**
6
8
  * Overrides the icon size provider.
7
9
  * Defaults to "md".
8
10
  */
9
11
  size?: Size;
10
- /** Icon name */
11
- name: IconName;
12
12
  /**
13
13
  * Icon fill color
14
14
  * You probably should provide a color token, but we allow any color
@@ -19,8 +19,14 @@ interface IconProps extends Omit<ComponentProps<"svg">, "name"> {
19
19
  * Leave empty if icon is purely decorative.
20
20
  */
21
21
  alt?: string;
22
+ /**
23
+ * Should the icon spin (useful for loaders)
24
+ * You can also specify a duration in seconds, but we recommend the default or using the Spinner component for consistency
25
+ * Defaults to false.
26
+ */
27
+ spin?: boolean | number;
22
28
  }
23
- declare function Icon({ size, name, color, alt, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function Icon({ name, size, color, alt, className, spin, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
24
30
  export { Icon };
25
31
  export declare namespace Icon {
26
32
  type Props = IconProps;