@cfx-dev/ui-components 2.1.22 → 2.1.23

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.
@@ -1 +1 @@
1
- ._root_y0b1q_1{background-color:var(--color-accordion-background)}._item_y0b1q_5,._header_y0b1q_5{cursor:pointer;background:var(--color-accordion-background)}._triggerContainer_y0b1q_10{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:var(--quant);border-bottom:1px solid var(--color-accordion-border-color);height:calc(var(--quant) * 7.75);transition:border-bottom .25s ease-out}._triggerContainer_y0b1q_10:hover,._triggerContainer_y0b1q_10:focus-visible:not(:hover){border-bottom:2px solid rgba(var(--color-primary),1)}._triggerContainer_y0b1q_10:hover ._iconFlip_y0b1q_23,._triggerContainer_y0b1q_10:focus-visible:not(:hover) ._iconFlip_y0b1q_23{transform:rotateX(90deg)}._triggerContainer_y0b1q_10:hover ._iconUp_y0b1q_26,._triggerContainer_y0b1q_10:focus-visible:not(:hover) ._iconUp_y0b1q_26{top:calc(-1 * var(--offset-small))}._triggerContainer_y0b1q_10:hover ._iconDown_y0b1q_29,._triggerContainer_y0b1q_10:focus-visible:not(:hover) ._iconDown_y0b1q_29{top:var(--offset-small)}._triggerContainer_y0b1q_10 ._iconLeft_y0b1q_32{margin-right:var(--offset-small);color:rgba(var(--color-secondary),1)}._triggerContainer_y0b1q_10 ._iconRight_y0b1q_36{top:0;position:relative;color:rgba(var(--color-secondary),1);margin-left:var(--offset-small);transition:transform .25s ease-out,top .5s ease;transform-style:preserve-3d}._iconFlip_y0b1q_23{transform:rotateX(90deg)}._content_y0b1q_49{display:block;padding:calc(var(--quant) * .5) calc(var(--quant) * 6.5);overflow:hidden;max-height:0;transition:max-height .5s ease-in-out}._content_y0b1q_49._open_y0b1q_56{max-height:calc(var(--quant) * 20)}
1
+ ._root_1pwnk_1{background-color:var(--color-accordion-background)}._item_1pwnk_5,._header_1pwnk_5{cursor:pointer;background:var(--color-accordion-background)}._triggerContainer_1pwnk_10{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:var(--quant);border-bottom:1px solid var(--color-accordion-border-color);height:calc(var(--quant) * 7.75);transition:border-bottom .25s ease-out}._triggerContainer_1pwnk_10:hover,._triggerContainer_1pwnk_10:focus-visible:not(:hover){border-bottom:2px solid rgba(var(--color-primary),1)}._triggerContainer_1pwnk_10:hover ._iconFlip_1pwnk_23,._triggerContainer_1pwnk_10:focus-visible:not(:hover) ._iconFlip_1pwnk_23{transform:rotateX(90deg)}._triggerContainer_1pwnk_10:hover ._iconUp_1pwnk_26,._triggerContainer_1pwnk_10:focus-visible:not(:hover) ._iconUp_1pwnk_26{top:calc(-1 * var(--offset-small))}._triggerContainer_1pwnk_10:hover ._iconDown_1pwnk_29,._triggerContainer_1pwnk_10:focus-visible:not(:hover) ._iconDown_1pwnk_29{top:var(--offset-small)}._triggerContainer_1pwnk_10 ._iconLeft_1pwnk_32{margin-right:var(--offset-small);color:rgba(var(--color-secondary),1)}._triggerContainer_1pwnk_10 ._iconRight_1pwnk_36{top:0;position:relative;color:rgba(var(--color-secondary),1);margin-left:var(--offset-small);transition:transform .25s ease-out,top .5s ease;transform-style:preserve-3d}._iconFlip_1pwnk_23{transform:rotateX(90deg)}._content_1pwnk_49{display:block;padding:calc(var(--quant) * .5) calc(var(--quant) * 6.5);overflow:hidden;max-height:0;transition:max-height .5s ease-in-out}._content_1pwnk_49._open_1pwnk_56{max-height:calc(var(--quant) * 30)}
@@ -1 +1 @@
1
- ._root_1bvck_1._full-width_1bvck_1{width:100%}._root_1bvck_1._full-height_1bvck_4{height:100%}._root_1bvck_1._no-overflow_1bvck_7{overflow:hidden}._root_1bvck_1._no-shrink_1bvck_10{flex-shrink:0}._root_1bvck_1._grow_1bvck_13{flex-grow:1}._root_1bvck_1._no-grow_1bvck_16{flex-grow:0}
1
+ ._root_1rhjm_1._full-width_1rhjm_1{width:100%}._root_1rhjm_1._fit-content-width_1rhjm_4{width:fit-content}._root_1rhjm_1._full-height_1rhjm_7{height:100%}._root_1rhjm_1._no-overflow_1rhjm_10{overflow:hidden}._root_1rhjm_1._no-shrink_1rhjm_13{flex-shrink:0}._root_1rhjm_1._grow_1rhjm_16{flex-grow:1}._root_1rhjm_1._no-grow_1rhjm_19{flex-grow:0}
@@ -1 +1 @@
1
- ._dropzone_1253u_1{border-radius:var(--border-radius-small);text-align:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(var(--quant) * 22.25);padding:var(--offset-normal);background-color:rgba(var(--color-bg),1);border:none}._dropzone_1253u_1{transition:all .25s ease,outline-offset 0s,outline 0s}._dropzone_1253u_1 ._text_1253u_18{margin-top:var(--offset-small)}._dropzone_1253u_1 ._text_1253u_18{transition:all .25s ease,outline-offset 0s,outline 0s}._dropzone_1253u_1._disabled_1253u_24{cursor:not-allowed;opacity:.5}._dropzone_1253u_1:not(._disabled_1253u_24):hover{background-color:rgba(var(--color-secondary),.2)}._dropzone_1253u_1:not(._disabled_1253u_24):hover ._text_1253u_18{margin-top:var(--offset-normal)}._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible,._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible:hover{outline-offset:var(--dropzone-focus-border-size, initial);outline:var(--dropzone-focus-border-size, initial) solid var(--color-dropzone-focus-border-color)}._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible,._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible:hover,._dropzone_1253u_1:not(._disabled_1253u_24)._focused_1253u_38,._dropzone_1253u_1:not(._disabled_1253u_24)._dragActive_1253u_38{background-color:rgba(var(--color-secondary),.2)}._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible ._text_1253u_18,._dropzone_1253u_1:not(._disabled_1253u_24):focus-visible:hover ._text_1253u_18,._dropzone_1253u_1:not(._disabled_1253u_24)._focused_1253u_38 ._text_1253u_18,._dropzone_1253u_1:not(._disabled_1253u_24)._dragActive_1253u_38 ._text_1253u_18{margin-top:var(--offset-normal)}
1
+ ._dropzone_1kj2k_1{border-radius:var(--border-radius-small);text-align:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(var(--quant) * 22.25);padding:var(--offset-normal);background-color:rgba(var(--color-bg),1);border:calc(var(--quant) * .25) dashed rgba(var(--color-accent),1)}._dropzone_1kj2k_1{transition:all .25s ease,outline-offset 0s,outline 0s}._dropzone_1kj2k_1 ._text_1kj2k_18{margin-top:var(--offset-small)}._dropzone_1kj2k_1 ._text_1kj2k_18{transition:all .25s ease,outline-offset 0s,outline 0s}._dropzone_1kj2k_1._disabled_1kj2k_24{cursor:not-allowed;opacity:.5}._dropzone_1kj2k_1:not(._disabled_1kj2k_24):hover{background-color:rgba(var(--color-secondary),.2)}._dropzone_1kj2k_1:not(._disabled_1kj2k_24):hover ._text_1kj2k_18{margin-top:var(--offset-normal)}._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible,._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible:hover{outline-offset:var(--dropzone-focus-border-size, initial);outline:var(--dropzone-focus-border-size, initial) solid var(--color-dropzone-focus-border-color)}._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible,._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible:hover,._dropzone_1kj2k_1:not(._disabled_1kj2k_24)._focused_1kj2k_38,._dropzone_1kj2k_1:not(._disabled_1kj2k_24)._dragActive_1kj2k_38{background-color:rgba(var(--color-secondary),.2)}._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible ._text_1kj2k_18,._dropzone_1kj2k_1:not(._disabled_1kj2k_24):focus-visible:hover ._text_1kj2k_18,._dropzone_1kj2k_1:not(._disabled_1kj2k_24)._focused_1kj2k_38 ._text_1kj2k_18,._dropzone_1kj2k_1:not(._disabled_1kj2k_24)._dragActive_1kj2k_38 ._text_1kj2k_18{margin-top:var(--offset-normal)}
@@ -1,88 +1,88 @@
1
- import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
- import b, { createContext as I, useState as u, useContext as w, useEffect as v } from "react";
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
+ import f, { createContext as x, useState as u, useContext as A, useEffect as b } from "react";
3
3
  import { Icon as C } from "../Icon/Icon.js";
4
- import { Flex as x } from "../Layout/Flex/Flex.js";
5
- import { Text as y } from "../Text/Text.js";
4
+ import { Flex as k } from "../Layout/Flex/Flex.js";
5
+ import { Text as I } from "../Text/Text.js";
6
6
  import { clsx as h } from "../../utils/clsx.js";
7
- import '../../assets/Accordion.css';const q = "_root_y0b1q_1", D = "_item_y0b1q_5", F = "_header_y0b1q_5", N = "_triggerContainer_y0b1q_10", U = "_iconFlip_y0b1q_23", T = "_iconUp_y0b1q_26", R = "_iconDown_y0b1q_29", $ = "_iconLeft_y0b1q_32", k = "_iconRight_y0b1q_36", E = "_content_y0b1q_49", L = "_open_y0b1q_56", n = {
8
- root: q,
9
- item: D,
7
+ import '../../assets/Accordion.css';const D = "_root_1pwnk_1", y = "_item_1pwnk_5", F = "_header_1pwnk_5", N = "_triggerContainer_1pwnk_10", U = "_iconFlip_1pwnk_23", T = "_iconUp_1pwnk_26", R = "_iconDown_1pwnk_29", $ = "_iconLeft_1pwnk_32", E = "_iconRight_1pwnk_36", L = "_content_1pwnk_49", O = "_open_1pwnk_56", o = {
8
+ root: D,
9
+ item: y,
10
10
  header: F,
11
11
  triggerContainer: N,
12
12
  iconFlip: U,
13
13
  iconUp: T,
14
14
  iconDown: R,
15
15
  iconLeft: $,
16
- iconRight: k,
17
- content: E,
18
- open: L
19
- }, g = I(void 0), M = function({
16
+ iconRight: E,
17
+ content: L,
18
+ open: O
19
+ }, w = x(void 0), P = function({
20
20
  children: t,
21
- className: e
21
+ className: n
22
22
  }) {
23
- const [c, s] = u(/* @__PURE__ */ new Set()), a = b.useCallback((r) => {
24
- s((_) => {
25
- const i = new Set(_);
26
- return i.has(r) ? i.delete(r) : i.add(r), i;
23
+ const [r, s] = u(/* @__PURE__ */ new Set()), a = f.useCallback((c) => {
24
+ s((m) => {
25
+ const i = new Set(m);
26
+ return i.has(c) ? i.delete(c) : i.add(c), i;
27
27
  });
28
- }, []), m = b.useMemo(() => ({
29
- openItems: c,
28
+ }, []), d = f.useMemo(() => ({
29
+ openItems: r,
30
30
  toggleItem: a
31
- }), [c, a]);
32
- return /* @__PURE__ */ o(g.Provider, { value: m, children: /* @__PURE__ */ o("div", { className: h(n.root, e), role: "presentation", children: t }) });
33
- }, P = function({
31
+ }), [r, a]);
32
+ return /* @__PURE__ */ e(w.Provider, { value: d, children: /* @__PURE__ */ e("div", { className: h(o.root, n), role: "presentation", children: t }) });
33
+ }, V = function({
34
34
  children: t,
35
- id: e
35
+ id: n
36
36
  }) {
37
- return /* @__PURE__ */ o("div", { className: n.item, id: e, role: "region", "aria-labelledby": `${e}-header`, children: t });
38
- }, V = function({
37
+ return /* @__PURE__ */ e("div", { className: o.item, id: n, role: "region", "aria-labelledby": `${n}-header`, children: t });
38
+ }, q = function({
39
39
  children: t
40
40
  }) {
41
- return /* @__PURE__ */ o("div", { className: n.header, children: t });
41
+ return /* @__PURE__ */ e("div", { className: o.header, children: t });
42
42
  }, B = function({
43
43
  text: t,
44
- id: e,
45
- iconLeft: c
44
+ id: n,
45
+ iconLeft: r
46
46
  }) {
47
- const s = w(g);
47
+ const s = A(w);
48
48
  if (!s)
49
49
  throw new Error("AccordionTrigger must be used within an Accordion");
50
50
  const {
51
51
  toggleItem: a,
52
- openItems: m
53
- } = s, r = m.has(e), [_, i] = u(!1), [p, A] = u(r ? "UpChevron" : "DownChevron");
54
- return v(() => {
55
- const d = setTimeout(() => {
56
- A(r ? "UpChevron" : "DownChevron"), i(!1);
52
+ openItems: d
53
+ } = s, c = d.has(n), [m, i] = u(!1), [_, v] = u(c ? "UpChevron" : "DownChevron");
54
+ return b(() => {
55
+ const p = setTimeout(() => {
56
+ v(c ? "UpChevron" : "DownChevron"), i(!1);
57
57
  }, 300);
58
- return i(!0), () => clearTimeout(d);
59
- }, [r]), /* @__PURE__ */ f(
58
+ return i(!0), () => clearTimeout(p);
59
+ }, [c]), /* @__PURE__ */ g(
60
60
  "div",
61
61
  {
62
- className: n.triggerContainer,
63
- onClick: () => a(e),
64
- onKeyDown: (d) => {
65
- (d.key === "Enter" || d.key === " ") && a(e);
62
+ className: o.triggerContainer,
63
+ onClick: () => a(n),
64
+ onKeyDown: (p) => {
65
+ (p.key === "Enter" || p.key === " ") && a(n);
66
66
  },
67
67
  role: "button",
68
68
  tabIndex: 0,
69
- "aria-expanded": r,
70
- "aria-controls": `${e}-content`,
71
- id: `${e}-header`,
69
+ "aria-expanded": c,
70
+ "aria-controls": `${n}-content`,
71
+ id: `${n}-header`,
72
72
  children: [
73
- /* @__PURE__ */ f(x, { centered: !0, children: [
74
- c && /* @__PURE__ */ o(C, { name: c, className: n.iconLeft }),
75
- /* @__PURE__ */ o(y, { size: "xxsmall", children: t })
73
+ /* @__PURE__ */ g(k, { centered: !0, children: [
74
+ r && /* @__PURE__ */ e(C, { name: r, className: o.iconLeft }),
75
+ /* @__PURE__ */ e(I, { size: "normal", children: t })
76
76
  ] }),
77
- /* @__PURE__ */ o(x, { centered: !0, children: /* @__PURE__ */ o(
77
+ /* @__PURE__ */ e(k, { centered: !0, children: /* @__PURE__ */ e(
78
78
  C,
79
79
  {
80
- className: h(n.iconRight, {
81
- [n.iconFlip]: _,
82
- [n.iconUp]: p === "UpChevron",
83
- [n.iconDown]: p === "DownChevron"
80
+ className: h(o.iconRight, {
81
+ [o.iconFlip]: m,
82
+ [o.iconUp]: _ === "UpChevron",
83
+ [o.iconDown]: _ === "DownChevron"
84
84
  }),
85
- name: p
85
+ name: _
86
86
  }
87
87
  ) })
88
88
  ]
@@ -90,29 +90,29 @@ import '../../assets/Accordion.css';const q = "_root_y0b1q_1", D = "_item_y0b1q_
90
90
  );
91
91
  }, G = function({
92
92
  children: t,
93
- id: e
93
+ id: n
94
94
  }) {
95
- const c = w(g);
96
- if (!c)
95
+ const r = A(w);
96
+ if (!r)
97
97
  throw new Error("AccordionContent must be used within an Accordion");
98
98
  const {
99
99
  openItems: s
100
- } = c;
101
- return /* @__PURE__ */ o(
100
+ } = r;
101
+ return /* @__PURE__ */ e(
102
102
  "div",
103
103
  {
104
- className: h(n.content, { [n.open]: s.has(e) }),
105
- id: `${e}-content`,
104
+ className: h(o.content, { [o.open]: s.has(n) }),
105
+ id: `${n}-content`,
106
106
  role: "region",
107
- "aria-labelledby": `${e}-header`,
108
- children: /* @__PURE__ */ o(y, { color: "secondary", size: "xxsmall", children: t })
107
+ "aria-labelledby": `${n}-header`,
108
+ children: /* @__PURE__ */ e(I, { color: "secondary", size: "normal", typographic: !0, children: t })
109
109
  }
110
110
  );
111
111
  };
112
112
  export {
113
- M as Accordion,
113
+ P as Accordion,
114
114
  G as AccordionContent,
115
- V as AccordionHeader,
116
- P as AccordionItem,
115
+ q as AccordionHeader,
116
+ V as AccordionItem,
117
117
  B as AccordionTrigger
118
118
  };
@@ -2,11 +2,11 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import a from "react";
3
3
  import { Flex as c } from "../Layout/Flex/Flex.js";
4
4
  import { Text as d } from "../Text/Text.js";
5
- import { Accordion as l, AccordionItem as i, AccordionHeader as o, AccordionTrigger as n, AccordionContent as r } from "./Accordion.js";
6
- function h() {
5
+ import { Accordion as h, AccordionItem as i, AccordionHeader as o, AccordionTrigger as n, AccordionContent as r } from "./Accordion.js";
6
+ function l() {
7
7
  return /* @__PURE__ */ e(c, { fullWidth: !0, vertical: !0, children: /* @__PURE__ */ t(c, { fullWidth: !0, vertical: !0, children: [
8
8
  /* @__PURE__ */ e(d, { size: "large", children: "Accordion" }),
9
- /* @__PURE__ */ t(l, { children: [
9
+ /* @__PURE__ */ t(h, { children: [
10
10
  /* @__PURE__ */ t(i, { id: "item1", children: [
11
11
  /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
12
12
  n,
@@ -16,7 +16,11 @@ function h() {
16
16
  iconLeft: "MoreInfo"
17
17
  }
18
18
  ) }),
19
- /* @__PURE__ */ e(r, { id: "item1", children: "Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it." })
19
+ /* @__PURE__ */ t(r, { id: "item1", children: [
20
+ "Nope! ",
21
+ /* @__PURE__ */ e("a", { href: "https://cfx.re", children: "FiveM" }),
22
+ " does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it. Nope! FiveM does not interact with the Rockstar Online Services other than to validate your game copy the first time you launch it."
23
+ ] })
20
24
  ] }),
21
25
  /* @__PURE__ */ t(i, { id: "item2", children: [
22
26
  /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
@@ -54,7 +58,7 @@ function h() {
54
58
  ] })
55
59
  ] }) });
56
60
  }
57
- const b = a.memo(h);
61
+ const b = a.memo(l);
58
62
  export {
59
63
  b as default
60
64
  };
@@ -170,7 +170,7 @@ function Sr(e, r) {
170
170
  case 0:
171
171
  return e.items ? (t = Ee(e.items).filter(function(a) {
172
172
  return a.kind === "file";
173
- }), r !== "drop" ? [2, t] : [4, Promise.all(t.map(zr))]) : [3, 2];
173
+ }), r !== "drop" ? [2, t] : [4, Promise.all(t.map(kr))]) : [3, 2];
174
174
  case 1:
175
175
  return n = i.sent(), [2, Ge(nr(n))];
176
176
  case 2:
@@ -195,7 +195,7 @@ function Ee(e) {
195
195
  }
196
196
  return r;
197
197
  }
198
- function zr(e) {
198
+ function kr(e) {
199
199
  if (typeof e.webkitGetAsEntry != "function")
200
200
  return qe(e);
201
201
  var r = e.webkitGetAsEntry();
@@ -213,7 +213,7 @@ function qe(e) {
213
213
  var t = q(r);
214
214
  return Promise.resolve(t);
215
215
  }
216
- function kr(e) {
216
+ function zr(e) {
217
217
  return M(this, void 0, void 0, function() {
218
218
  return $(this, function(r) {
219
219
  return [2, e.isDirectory ? or(e) : Lr(e)];
@@ -243,7 +243,7 @@ function or(e) {
243
243
  case 4:
244
244
  return [3, 6];
245
245
  case 5:
246
- O = Promise.all(u.map(kr)), i.push(O), a(), g.label = 6;
246
+ O = Promise.all(u.map(zr)), i.push(O), a(), g.label = 6;
247
247
  case 6:
248
248
  return [
249
249
  2
@@ -809,12 +809,12 @@ function dr() {
809
809
  window.removeEventListener("focus", Se, !1);
810
810
  };
811
811
  }, [D, Re, X, Z]);
812
- var R = ie([]), ze = function(c) {
812
+ var R = ie([]), ke = function(c) {
813
813
  v.current && v.current.contains(c.target) || (c.preventDefault(), R.current = []);
814
814
  };
815
815
  Oe(function() {
816
- return N && (document.addEventListener("dragover", er, !1), document.addEventListener("drop", ze, !1)), function() {
817
- N && (document.removeEventListener("dragover", er), document.removeEventListener("drop", ze));
816
+ return N && (document.addEventListener("dragover", er, !1), document.addEventListener("drop", ke, !1)), function() {
817
+ N && (document.removeEventListener("dragover", er), document.removeEventListener("drop", ke));
818
818
  };
819
819
  }, [v, N]), Oe(function() {
820
820
  return !n && V && v.current && v.current.focus(), function() {
@@ -822,7 +822,7 @@ function dr() {
822
822
  }, [v, V, n]);
823
823
  var C = A(function(o) {
824
824
  fe ? fe(o) : console.error(o);
825
- }, [fe]), ke = A(function(o) {
825
+ }, [fe]), ze = A(function(o) {
826
826
  o.preventDefault(), o.persist(), ne(o), R.current = [].concat(lt(R.current), [o.target]), ae(o) && Promise.resolve(i(o)).then(function(c) {
827
827
  if (!(se(o) && !I)) {
828
828
  var d = c.length, m = d > 0 && Qr({
@@ -867,7 +867,7 @@ function dr() {
867
867
  }, [v, O, I]), ee = A(function(o, c) {
868
868
  var d = [], m = [];
869
869
  o.forEach(function(b) {
870
- var U = cr(b, B), k = Fe(U, 2), ge = k[0], ve = k[1], ye = ur(b, s, a), oe = Fe(ye, 2), be = oe[0], he = oe[1], De = W ? W(b) : null;
870
+ var U = cr(b, B), z = Fe(U, 2), ge = z[0], ve = z[1], ye = ur(b, s, a), oe = Fe(ye, 2), be = oe[0], he = oe[1], De = W ? W(b) : null;
871
871
  if (ge && be && !De)
872
872
  d.push(b);
873
873
  else {
@@ -934,23 +934,23 @@ function dr() {
934
934
  });
935
935
  }, []), He = A(function() {
936
936
  Q || (et() ? setTimeout(S, 0) : S());
937
- }, [Q, S]), z = function(c) {
937
+ }, [Q, S]), k = function(c) {
938
938
  return n ? null : c;
939
939
  }, me = function(c) {
940
- return H ? null : z(c);
940
+ return H ? null : k(c);
941
941
  }, te = function(c) {
942
- return h ? null : z(c);
942
+ return h ? null : k(c);
943
943
  }, ne = function(c) {
944
944
  I && c.stopPropagation();
945
945
  }, vr = L(function() {
946
946
  return function() {
947
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, d = c === void 0 ? "ref" : c, m = o.role, b = o.onKeyDown, U = o.onFocus, k = o.onBlur, ge = o.onClick, ve = o.onDragEnter, ye = o.onDragOver, oe = o.onDragLeave, be = o.onDrop, he = le(o, ut);
947
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, d = c === void 0 ? "ref" : c, m = o.role, b = o.onKeyDown, U = o.onFocus, z = o.onBlur, ge = o.onClick, ve = o.onDragEnter, ye = o.onDragOver, oe = o.onDragLeave, be = o.onDrop, he = le(o, ut);
948
948
  return f(f(je({
949
949
  onKeyDown: me(F(b, $e)),
950
950
  onFocus: me(F(U, Ke)),
951
- onBlur: me(F(k, Ne)),
952
- onClick: z(F(ge, He)),
953
- onDragEnter: te(F(ve, ke)),
951
+ onBlur: me(F(z, Ne)),
952
+ onClick: k(F(ge, He)),
953
+ onDragEnter: te(F(ve, ze)),
954
954
  onDragOver: te(F(ye, Le)),
955
955
  onDragLeave: te(F(oe, Me)),
956
956
  onDrop: te(F(be, re)),
@@ -959,22 +959,22 @@ function dr() {
959
959
  tabIndex: 0
960
960
  } : {}), he);
961
961
  };
962
- }, [v, $e, Ke, Ne, He, ke, Le, Me, re, H, h, n]), yr = A(function(o) {
962
+ }, [v, $e, Ke, Ne, He, ze, Le, Me, re, H, h, n]), yr = A(function(o) {
963
963
  o.stopPropagation();
964
964
  }, []), br = L(function() {
965
965
  return function() {
966
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, d = c === void 0 ? "ref" : c, m = o.onChange, b = o.onClick, U = le(o, st), k = je({
966
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, d = c === void 0 ? "ref" : c, m = o.onChange, b = o.onClick, U = le(o, st), z = je({
967
967
  accept: B,
968
968
  multiple: u,
969
969
  type: "file",
970
970
  style: {
971
971
  display: "none"
972
972
  },
973
- onChange: z(F(m, re)),
974
- onClick: z(F(b, yr)),
973
+ onChange: k(F(m, re)),
974
+ onClick: k(F(b, yr)),
975
975
  tabIndex: -1
976
976
  }, d, D);
977
- return f(f({}, k), U);
977
+ return f(f({}, z), U);
978
978
  };
979
979
  }, [D, t, u, re, n]);
980
980
  return f(f({}, de), {}, {
@@ -983,7 +983,7 @@ function dr() {
983
983
  getInputProps: br,
984
984
  rootRef: v,
985
985
  inputRef: D,
986
- open: z(S)
986
+ open: k(S)
987
987
  });
988
988
  }
989
989
  function bt(e, r) {
@@ -1023,7 +1023,7 @@ function bt(e, r) {
1023
1023
  }
1024
1024
  function tr() {
1025
1025
  }
1026
- const ht = "_dropzone_1253u_1", Dt = "_text_1253u_18", At = "_disabled_1253u_24", wt = "_focused_1253u_38", Ot = "_dragActive_1253u_38", E = {
1026
+ const ht = "_dropzone_1kj2k_1", Dt = "_text_1kj2k_18", At = "_disabled_1kj2k_24", wt = "_focused_1kj2k_38", Ot = "_dragActive_1kj2k_38", E = {
1027
1027
  dropzone: ht,
1028
1028
  text: Dt,
1029
1029
  disabled: At,
@@ -7,6 +7,7 @@ export interface BoxProps extends MPProps {
7
7
  grow?: boolean;
8
8
  fullWidth?: boolean;
9
9
  fullHeight?: boolean;
10
+ fitContentWidth?: boolean;
10
11
  /**
11
12
  * Number values is treated like quant multiplier
12
13
  * String value used as is
@@ -1,104 +1,107 @@
1
1
  import { jsx as P } from "react/jsx-runtime";
2
- import m from "react";
3
- import { useContextualStyle as j } from "../../Style/Style.js";
4
- import { ui as d } from "../../ui.js";
2
+ import c from "react";
3
+ import { useContextualStyle as W } from "../../Style/Style.js";
4
+ import { ui as a } from "../../ui.js";
5
5
  import { clsx as H } from "../../../utils/clsx.js";
6
- import '../../../assets/Box.css';const W = "_root_1bvck_1", z = "_grow_1bvck_13", o = {
7
- root: W,
8
- "full-width": "_full-width_1bvck_1",
9
- "full-height": "_full-height_1bvck_4",
10
- "no-overflow": "_no-overflow_1bvck_7",
11
- "no-shrink": "_no-shrink_1bvck_10",
12
- grow: z,
13
- "no-grow": "_no-grow_1bvck_16"
6
+ import '../../../assets/Box.css';const z = "_root_1rhjm_1", D = "_grow_1rhjm_16", t = {
7
+ root: z,
8
+ "full-width": "_full-width_1rhjm_1",
9
+ "fit-content-width": "_fit-content-width_1rhjm_4",
10
+ "full-height": "_full-height_1rhjm_7",
11
+ "no-overflow": "_no-overflow_1rhjm_10",
12
+ "no-shrink": "_no-shrink_1rhjm_13",
13
+ grow: D,
14
+ "no-grow": "_no-grow_1rhjm_19"
14
15
  };
15
- function b(r) {
16
- return typeof r == "string" ? r : d.q(r);
16
+ function y(r) {
17
+ return typeof r == "string" ? r : a.q(r);
17
18
  }
18
- const J = m.forwardRef(function(x, y) {
19
+ const K = c.forwardRef(function(S, M) {
19
20
  const {
20
- noOverflow: S = !1,
21
- noShrink: M = !1,
21
+ noOverflow: k = !1,
22
+ noShrink: v = !1,
22
23
  grow: e = void 0,
23
- width: g,
24
- height: a,
24
+ width: d,
25
+ height: g,
25
26
  children: A,
26
- className: N,
27
- fullWidth: R,
28
- fullHeight: q,
27
+ className: C,
28
+ fullWidth: N,
29
+ fullHeight: R,
30
+ fitContentWidth: b,
29
31
  style: p,
30
32
  // --- MPProps
31
- m: l,
32
- mt: s,
33
- mr: n,
34
- mb: f,
35
- ml: i,
36
- p: c,
37
- pt: h,
38
- pr: u,
39
- pb: _,
40
- pl: w
41
- } = x, k = j(), B = H(o.root, N, {
42
- [o["full-width"]]: R,
43
- [o["full-height"]]: q,
44
- [o["no-overflow"]]: S,
45
- [o["no-shrink"]]: M,
46
- [o["no-grow"]]: e === !1,
47
- [o.grow]: e === !0
48
- }), C = m.useMemo(() => d.getAllMPAttrs({
49
- m: l,
50
- mt: s,
51
- mr: n,
52
- mb: f,
53
- ml: i,
54
- p: c,
55
- pt: h,
56
- pr: u,
57
- pb: _,
58
- pl: w
33
+ m: n,
34
+ mt: i,
35
+ mr: l,
36
+ mb: s,
37
+ ml: f,
38
+ p: h,
39
+ pt: m,
40
+ pr: _,
41
+ pb: w,
42
+ pl: u
43
+ } = S, j = W(), q = H(t.root, C, {
44
+ [t["full-width"]]: N,
45
+ [t["full-height"]]: R,
46
+ [t["fit-content-width"]]: b,
47
+ [t["no-overflow"]]: k,
48
+ [t["no-shrink"]]: v,
49
+ [t["no-grow"]]: e === !1,
50
+ [t.grow]: e === !0
51
+ }), B = c.useMemo(() => a.getAllMPAttrs({
52
+ m: n,
53
+ mt: i,
54
+ mr: l,
55
+ mb: s,
56
+ ml: f,
57
+ p: h,
58
+ pt: m,
59
+ pr: _,
60
+ pb: w,
61
+ pl: u
59
62
  }), [
63
+ n,
64
+ i,
60
65
  l,
61
66
  s,
62
- n,
63
67
  f,
64
- i,
65
- c,
66
68
  h,
67
- u,
69
+ m,
68
70
  _,
69
- w
70
- ]), v = m.useMemo(() => d.getAllMPStyles({
71
- m: l,
72
- mt: s,
73
- mr: n,
74
- mb: f,
75
- ml: i,
76
- p: c,
77
- pt: h,
78
- pr: u,
79
- pb: _,
80
- pl: w
71
+ w,
72
+ u
73
+ ]), x = c.useMemo(() => a.getAllMPStyles({
74
+ m: n,
75
+ mt: i,
76
+ mr: l,
77
+ mb: s,
78
+ ml: f,
79
+ p: h,
80
+ pt: m,
81
+ pr: _,
82
+ pb: w,
83
+ pl: u
81
84
  }), [
85
+ n,
86
+ i,
82
87
  l,
83
88
  s,
84
- n,
85
89
  f,
86
- i,
87
- c,
88
90
  h,
89
- u,
91
+ m,
90
92
  _,
91
- w
92
- ]), O = m.useMemo(() => {
93
- const t = {
94
- ...v,
95
- ...k,
93
+ w,
94
+ u
95
+ ]), O = c.useMemo(() => {
96
+ const o = {
97
+ ...x,
98
+ ...j,
96
99
  ...p || {}
97
100
  };
98
- return g && (t.width = b(g)), a && (t.height = b(a)), !t.width && e === !0 && (t.width = "1px"), t;
99
- }, [e, a, v, p, g, k]);
100
- return /* @__PURE__ */ P("div", { ...C, ref: y, className: B, style: O, children: A });
101
+ return d && (o.width = y(d)), g && (o.height = y(g)), !o.width && e === !0 && (o.width = "1px"), o;
102
+ }, [e, g, x, p, d, j]);
103
+ return /* @__PURE__ */ P("div", { ...B, ref: M, className: q, style: O, children: A });
101
104
  });
102
105
  export {
103
- J as Box
106
+ K as Box
104
107
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "2.1.22",
4
+ "version": "2.1.23",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",