@profiq/ui 0.1.2 → 0.1.3

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 (32) hide show
  1. package/dist/components/custom/basic/button.d.ts +2 -1
  2. package/dist/components/custom/basic/button.d.ts.map +1 -1
  3. package/dist/components/custom/basic/input.d.ts +2 -1
  4. package/dist/components/custom/basic/input.d.ts.map +1 -1
  5. package/dist/components/ui/buttonVariants.d.ts.map +1 -1
  6. package/dist/components/ui/buttonVariants.js +2 -2
  7. package/dist/components/ui/slider.js +23 -23
  8. package/dist/index.css +161 -260
  9. package/dist/index.js +7 -50
  10. package/dist/lib/baseProps.d.ts +2 -2
  11. package/dist/lib/baseProps.d.ts.map +1 -1
  12. package/dist/lib/baseProps.js +6 -6
  13. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +171 -171
  14. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +191 -190
  15. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +125 -101
  16. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -97
  17. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +60 -62
  18. package/package.json +6 -26
  19. package/dist/components/custom/basic/index.d.ts +0 -17
  20. package/dist/components/custom/basic/index.d.ts.map +0 -1
  21. package/dist/components/custom/basic/index.js +0 -20
  22. package/dist/components/custom/icons/index.d.ts +0 -15
  23. package/dist/components/custom/icons/index.d.ts.map +0 -1
  24. package/dist/components/custom/icons/index.js +0 -27
  25. package/dist/components/ui/index.d.ts +0 -14
  26. package/dist/components/ui/index.d.ts.map +0 -1
  27. package/dist/components/ui/index.js +0 -59
  28. package/dist/index.d.ts +0 -4
  29. package/dist/index.d.ts.map +0 -1
  30. package/dist/lib/index.js +0 -11
  31. package/dist/styles.d.ts +0 -2
  32. package/dist/styles.js +0 -2
@@ -1,60 +1,60 @@
1
1
  import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, arrow as z, limitShift as X } from "../../dom/dist/floating-ui.dom.js";
2
2
  import { autoUpdate as pe, platform as ge } from "../../dom/dist/floating-ui.dom.js";
3
- import * as o from "react";
3
+ import * as f from "react";
4
4
  import { useLayoutEffect as Y } from "react";
5
5
  import * as Z from "react-dom";
6
6
  var b = typeof document < "u", ee = function() {
7
7
  }, w = b ? Y : ee;
8
- function R(e, t) {
9
- if (e === t)
8
+ function R(e, n) {
9
+ if (e === n)
10
10
  return !0;
11
- if (typeof e != typeof t)
11
+ if (typeof e != typeof n)
12
12
  return !1;
13
- if (typeof e == "function" && e.toString() === t.toString())
13
+ if (typeof e == "function" && e.toString() === n.toString())
14
14
  return !0;
15
- let n, r, i;
16
- if (e && t && typeof e == "object") {
15
+ let t, r, s;
16
+ if (e && n && typeof e == "object") {
17
17
  if (Array.isArray(e)) {
18
- if (n = e.length, n !== t.length) return !1;
19
- for (r = n; r-- !== 0; )
20
- if (!R(e[r], t[r]))
18
+ if (t = e.length, t !== n.length) return !1;
19
+ for (r = t; r-- !== 0; )
20
+ if (!R(e[r], n[r]))
21
21
  return !1;
22
22
  return !0;
23
23
  }
24
- if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length)
24
+ if (s = Object.keys(e), t = s.length, t !== Object.keys(n).length)
25
25
  return !1;
26
- for (r = n; r-- !== 0; )
27
- if (!{}.hasOwnProperty.call(t, i[r]))
26
+ for (r = t; r-- !== 0; )
27
+ if (!{}.hasOwnProperty.call(n, s[r]))
28
28
  return !1;
29
- for (r = n; r-- !== 0; ) {
30
- const p = i[r];
31
- if (!(p === "_owner" && e.$$typeof) && !R(e[p], t[p]))
29
+ for (r = t; r-- !== 0; ) {
30
+ const p = s[r];
31
+ if (!(p === "_owner" && e.$$typeof) && !R(e[p], n[p]))
32
32
  return !1;
33
33
  }
34
34
  return !0;
35
35
  }
36
- return e !== e && t !== t;
36
+ return e !== e && n !== n;
37
37
  }
38
38
  function A(e) {
39
39
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
40
40
  }
41
- function L(e, t) {
42
- const n = A(e);
43
- return Math.round(t * n) / n;
41
+ function L(e, n) {
42
+ const t = A(e);
43
+ return Math.round(n * t) / t;
44
44
  }
45
45
  function k(e) {
46
- const t = o.useRef(e);
46
+ const n = f.useRef(e);
47
47
  return w(() => {
48
- t.current = e;
49
- }), t;
48
+ n.current = e;
49
+ }), n;
50
50
  }
51
- function oe(e) {
51
+ function fe(e) {
52
52
  e === void 0 && (e = {});
53
53
  const {
54
- placement: t = "bottom",
55
- strategy: n = "absolute",
54
+ placement: n = "bottom",
55
+ strategy: t = "absolute",
56
56
  middleware: r = [],
57
- platform: i,
57
+ platform: s,
58
58
  elements: {
59
59
  reference: p,
60
60
  floating: q
@@ -62,29 +62,29 @@ function oe(e) {
62
62
  transform: D = !0,
63
63
  whileElementsMounted: E,
64
64
  open: x
65
- } = e, [s, C] = o.useState({
65
+ } = e, [i, C] = f.useState({
66
66
  x: 0,
67
67
  y: 0,
68
- strategy: n,
69
- placement: t,
68
+ strategy: t,
69
+ placement: n,
70
70
  middlewareData: {},
71
71
  isPositioned: !1
72
- }), [M, B] = o.useState(r);
72
+ }), [M, B] = f.useState(r);
73
73
  R(M, r) || B(r);
74
- const [U, V] = o.useState(null), [W, G] = o.useState(null), O = o.useCallback((f) => {
75
- f !== a.current && (a.current = f, V(f));
76
- }, []), _ = o.useCallback((f) => {
77
- f !== d.current && (d.current = f, G(f));
78
- }, []), u = p || U, l = q || W, a = o.useRef(null), d = o.useRef(null), y = o.useRef(s), H = E != null, S = k(E), P = k(i), v = k(x), g = o.useCallback(() => {
79
- if (!a.current || !d.current)
74
+ const [U, V] = f.useState(null), [W, G] = f.useState(null), O = f.useCallback((o) => {
75
+ o !== a.current && (a.current = o, V(o));
76
+ }, []), _ = f.useCallback((o) => {
77
+ o !== m.current && (m.current = o, G(o));
78
+ }, []), u = p || U, l = q || W, a = f.useRef(null), m = f.useRef(null), y = f.useRef(i), H = E != null, S = k(E), P = k(s), v = k(x), g = f.useCallback(() => {
79
+ if (!a.current || !m.current)
80
80
  return;
81
- const f = {
82
- placement: t,
83
- strategy: n,
81
+ const o = {
82
+ placement: n,
83
+ strategy: t,
84
84
  middleware: M
85
85
  };
86
- P.current && (f.platform = P.current), I(a.current, d.current, f).then((h) => {
87
- const m = {
86
+ P.current && (o.platform = P.current), I(a.current, m.current, o).then((h) => {
87
+ const d = {
88
88
  ...h,
89
89
  // The floating element's position may be recomputed while it's closed
90
90
  // but still mounted (such as when transitioning out). To ensure
@@ -92,117 +92,141 @@ function oe(e) {
92
92
  // setting it to `true` when `open === false` (must be specified).
93
93
  isPositioned: v.current !== !1
94
94
  };
95
- $.current && !R(y.current, m) && (y.current = m, Z.flushSync(() => {
96
- C(m);
95
+ $.current && !R(y.current, d) && (y.current = d, Z.flushSync(() => {
96
+ C(d);
97
97
  }));
98
98
  });
99
- }, [M, t, n, P, v]);
99
+ }, [M, n, t, P, v]);
100
100
  w(() => {
101
- x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, C((f) => ({
102
- ...f,
101
+ x === !1 && y.current.isPositioned && (y.current.isPositioned = !1, C((o) => ({
102
+ ...o,
103
103
  isPositioned: !1
104
104
  })));
105
105
  }, [x]);
106
- const $ = o.useRef(!1);
106
+ const $ = f.useRef(!1);
107
107
  w(() => ($.current = !0, () => {
108
108
  $.current = !1;
109
109
  }), []), w(() => {
110
- if (u && (a.current = u), l && (d.current = l), u && l) {
110
+ if (u && (a.current = u), l && (m.current = l), u && l) {
111
111
  if (S.current)
112
112
  return S.current(u, l, g);
113
113
  g();
114
114
  }
115
115
  }, [u, l, g, S, H]);
116
- const F = o.useMemo(() => ({
116
+ const F = f.useMemo(() => ({
117
117
  reference: a,
118
- floating: d,
118
+ floating: m,
119
119
  setReference: O,
120
120
  setFloating: _
121
- }), [O, _]), c = o.useMemo(() => ({
121
+ }), [O, _]), c = f.useMemo(() => ({
122
122
  reference: u,
123
123
  floating: l
124
- }), [u, l]), j = o.useMemo(() => {
125
- const f = {
126
- position: n,
124
+ }), [u, l]), j = f.useMemo(() => {
125
+ const o = {
126
+ position: t,
127
127
  left: 0,
128
128
  top: 0
129
129
  };
130
130
  if (!c.floating)
131
- return f;
132
- const h = L(c.floating, s.x), m = L(c.floating, s.y);
131
+ return o;
132
+ const h = L(c.floating, i.x), d = L(c.floating, i.y);
133
133
  return D ? {
134
- ...f,
135
- transform: "translate(" + h + "px, " + m + "px)",
134
+ ...o,
135
+ transform: "translate(" + h + "px, " + d + "px)",
136
136
  ...A(c.floating) >= 1.5 && {
137
137
  willChange: "transform"
138
138
  }
139
139
  } : {
140
- position: n,
140
+ position: t,
141
141
  left: h,
142
- top: m
142
+ top: d
143
143
  };
144
- }, [n, D, c.floating, s.x, s.y]);
145
- return o.useMemo(() => ({
146
- ...s,
144
+ }, [t, D, c.floating, i.x, i.y]);
145
+ return f.useMemo(() => ({
146
+ ...i,
147
147
  update: g,
148
148
  refs: F,
149
149
  elements: c,
150
150
  floatingStyles: j
151
- }), [s, g, F, c, j]);
151
+ }), [i, g, F, c, j]);
152
152
  }
153
153
  const te = (e) => {
154
- function t(n) {
155
- return {}.hasOwnProperty.call(n, "current");
154
+ function n(t) {
155
+ return {}.hasOwnProperty.call(t, "current");
156
156
  }
157
157
  return {
158
158
  name: "arrow",
159
159
  options: e,
160
- fn(n) {
160
+ fn(t) {
161
161
  const {
162
162
  element: r,
163
- padding: i
164
- } = typeof e == "function" ? e(n) : e;
165
- return r && t(r) ? r.current != null ? z({
163
+ padding: s
164
+ } = typeof e == "function" ? e(t) : e;
165
+ return r && n(r) ? r.current != null ? z({
166
166
  element: r.current,
167
- padding: i
168
- }).fn(n) : {} : r ? z({
167
+ padding: s
168
+ }).fn(t) : {} : r ? z({
169
169
  element: r,
170
- padding: i
171
- }).fn(n) : {};
170
+ padding: s
171
+ }).fn(t) : {};
172
172
  }
173
173
  };
174
- }, fe = (e, t) => ({
175
- ...J(e),
176
- options: [e, t]
177
- }), ie = (e, t) => ({
178
- ...K(e),
179
- options: [e, t]
180
- }), se = (e, t) => ({
181
- ...X(e),
182
- options: [e, t]
183
- }), ue = (e, t) => ({
184
- ...N(e),
185
- options: [e, t]
186
- }), le = (e, t) => ({
187
- ...Q(e),
188
- options: [e, t]
189
- }), ce = (e, t) => ({
190
- ...T(e),
191
- options: [e, t]
192
- }), ae = (e, t) => ({
193
- ...te(e),
194
- options: [e, t]
195
- });
174
+ }, oe = (e, n) => {
175
+ const t = J(e);
176
+ return {
177
+ name: t.name,
178
+ fn: t.fn,
179
+ options: [e, n]
180
+ };
181
+ }, se = (e, n) => {
182
+ const t = K(e);
183
+ return {
184
+ name: t.name,
185
+ fn: t.fn,
186
+ options: [e, n]
187
+ };
188
+ }, ie = (e, n) => ({
189
+ fn: X(e).fn,
190
+ options: [e, n]
191
+ }), ue = (e, n) => {
192
+ const t = N(e);
193
+ return {
194
+ name: t.name,
195
+ fn: t.fn,
196
+ options: [e, n]
197
+ };
198
+ }, le = (e, n) => {
199
+ const t = Q(e);
200
+ return {
201
+ name: t.name,
202
+ fn: t.fn,
203
+ options: [e, n]
204
+ };
205
+ }, ce = (e, n) => {
206
+ const t = T(e);
207
+ return {
208
+ name: t.name,
209
+ fn: t.fn,
210
+ options: [e, n]
211
+ };
212
+ }, ae = (e, n) => {
213
+ const t = te(e);
214
+ return {
215
+ name: t.name,
216
+ fn: t.fn,
217
+ options: [e, n]
218
+ };
219
+ };
196
220
  export {
197
221
  ae as arrow,
198
222
  pe as autoUpdate,
199
223
  I as computePosition,
200
224
  ue as flip,
201
225
  ce as hide,
202
- se as limitShift,
203
- fe as offset,
226
+ ie as limitShift,
227
+ oe as offset,
204
228
  ge as platform,
205
- ie as shift,
229
+ se as shift,
206
230
  le as size,
207
- oe as useFloating
231
+ fe as useFloating
208
232
  };
@@ -1,81 +1,81 @@
1
- function c() {
1
+ function u() {
2
2
  return typeof window < "u";
3
3
  }
4
- function u(t) {
5
- return p(t) ? (t.nodeName || "").toLowerCase() : "#document";
4
+ function a(t) {
5
+ return m(t) ? (t.nodeName || "").toLowerCase() : "#document";
6
6
  }
7
7
  function i(t) {
8
- var e;
9
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
8
+ var n;
9
+ return (t == null || (n = t.ownerDocument) == null ? void 0 : n.defaultView) || window;
10
10
  }
11
- function N(t) {
12
- var e;
13
- return (e = (p(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
14
- }
15
- function p(t) {
16
- return c() ? t instanceof Node || t instanceof i(t).Node : !1;
11
+ function L(t) {
12
+ var n;
13
+ return (n = (m(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : n.documentElement;
17
14
  }
18
15
  function m(t) {
19
- return c() ? t instanceof Element || t instanceof i(t).Element : !1;
16
+ return u() ? t instanceof Node || t instanceof i(t).Node : !1;
20
17
  }
21
- function w(t) {
22
- return c() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
18
+ function h(t) {
19
+ return u() ? t instanceof Element || t instanceof i(t).Element : !1;
23
20
  }
24
- function f(t) {
25
- return !c() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
21
+ function g(t) {
22
+ return u() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
23
+ }
24
+ function p(t) {
25
+ return !u() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
26
26
  }
27
- const E = /* @__PURE__ */ new Set(["inline", "contents"]);
28
27
  function y(t) {
29
28
  const {
30
- overflow: e,
31
- overflowX: n,
32
- overflowY: o,
33
- display: r
34
- } = S(t);
35
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !E.has(r);
36
- }
37
- const T = /* @__PURE__ */ new Set(["table", "td", "th"]);
38
- function A(t) {
39
- return T.has(u(t));
40
- }
41
- const v = [":popover-open", ":modal"];
42
- function L(t) {
43
- return v.some((e) => {
44
- try {
45
- return t.matches(e);
46
- } catch {
47
- return !1;
48
- }
49
- });
50
- }
51
- const D = ["transform", "translate", "scale", "rotate", "perspective"], C = ["transform", "translate", "scale", "rotate", "perspective", "filter"], k = ["paint", "layout", "strict", "content"];
52
- function V(t) {
53
- const e = O(), n = m(t) ? S(t) : t;
54
- return D.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || C.some((o) => (n.willChange || "").includes(o)) || k.some((o) => (n.contain || "").includes(o));
55
- }
56
- function B(t) {
57
- let e = s(t);
58
- for (; w(e) && !h(e); ) {
59
- if (V(e))
60
- return e;
61
- if (L(e))
29
+ overflow: n,
30
+ overflowX: r,
31
+ overflowY: c,
32
+ display: e
33
+ } = b(t);
34
+ return /auto|scroll|overlay|hidden|clip/.test(n + c + r) && e !== "inline" && e !== "contents";
35
+ }
36
+ function _(t) {
37
+ return /^(table|td|th)$/.test(a(t));
38
+ }
39
+ function T(t) {
40
+ try {
41
+ if (t.matches(":popover-open"))
42
+ return !0;
43
+ } catch {
44
+ }
45
+ try {
46
+ return t.matches(":modal");
47
+ } catch {
48
+ return !1;
49
+ }
50
+ }
51
+ const v = /transform|translate|scale|rotate|perspective|filter/, C = /paint|layout|strict|content/, o = (t) => !!t && t !== "none";
52
+ let s;
53
+ function D(t) {
54
+ const n = h(t) ? b(t) : t;
55
+ return o(n.transform) || o(n.translate) || o(n.scale) || o(n.rotate) || o(n.perspective) || !R() && (o(n.backdropFilter) || o(n.filter)) || v.test(n.willChange || "") || C.test(n.contain || "");
56
+ }
57
+ function W(t) {
58
+ let n = f(t);
59
+ for (; g(n) && !N(n); ) {
60
+ if (D(n))
61
+ return n;
62
+ if (T(n))
62
63
  return null;
63
- e = s(e);
64
+ n = f(n);
64
65
  }
65
66
  return null;
66
67
  }
67
- function O() {
68
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
68
+ function R() {
69
+ return s == null && (s = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), s;
69
70
  }
70
- const R = /* @__PURE__ */ new Set(["html", "body", "#document"]);
71
- function h(t) {
72
- return R.has(u(t));
71
+ function N(t) {
72
+ return /^(html|body|#document)$/.test(a(t));
73
73
  }
74
- function S(t) {
74
+ function b(t) {
75
75
  return i(t).getComputedStyle(t);
76
76
  }
77
- function F(t) {
78
- return m(t) ? {
77
+ function $(t) {
78
+ return h(t) ? {
79
79
  scrollLeft: t.scrollLeft,
80
80
  scrollTop: t.scrollTop
81
81
  } : {
@@ -83,54 +83,54 @@ function F(t) {
83
83
  scrollTop: t.scrollY
84
84
  };
85
85
  }
86
- function s(t) {
87
- if (u(t) === "html")
86
+ function f(t) {
87
+ if (a(t) === "html")
88
88
  return t;
89
- const e = (
89
+ const n = (
90
90
  // Step into the shadow DOM of the parent of a slotted node.
91
91
  t.assignedSlot || // DOM Element detected.
92
92
  t.parentNode || // ShadowRoot detected.
93
- f(t) && t.host || // Fallback.
94
- N(t)
93
+ p(t) && t.host || // Fallback.
94
+ L(t)
95
95
  );
96
- return f(e) ? e.host : e;
97
- }
98
- function b(t) {
99
- const e = s(t);
100
- return h(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : w(e) && y(e) ? e : b(e);
101
- }
102
- function d(t, e, n) {
103
- var o;
104
- e === void 0 && (e = []), n === void 0 && (n = !0);
105
- const r = b(t), g = r === ((o = t.ownerDocument) == null ? void 0 : o.body), l = i(r);
106
- if (g) {
107
- const a = _(l);
108
- return e.concat(l, l.visualViewport || [], y(r) ? r : [], a && n ? d(a) : []);
109
- }
110
- return e.concat(r, d(r, [], n));
96
+ return p(n) ? n.host : n;
111
97
  }
112
- function _(t) {
98
+ function S(t) {
99
+ const n = f(t);
100
+ return N(n) ? t.ownerDocument ? t.ownerDocument.body : t.body : g(n) && y(n) ? n : S(n);
101
+ }
102
+ function w(t, n, r) {
103
+ var c;
104
+ n === void 0 && (n = []), r === void 0 && (r = !0);
105
+ const e = S(t), E = e === ((c = t.ownerDocument) == null ? void 0 : c.body), l = i(e);
106
+ if (E) {
107
+ const d = k(l);
108
+ return n.concat(l, l.visualViewport || [], y(e) ? e : [], d && r ? w(d) : []);
109
+ } else
110
+ return n.concat(e, w(e, [], r));
111
+ }
112
+ function k(t) {
113
113
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
114
114
  }
115
115
  export {
116
- S as getComputedStyle,
117
- B as getContainingBlock,
118
- N as getDocumentElement,
119
- _ as getFrameElement,
120
- b as getNearestOverflowAncestor,
121
- u as getNodeName,
122
- F as getNodeScroll,
123
- d as getOverflowAncestors,
124
- s as getParentNode,
116
+ b as getComputedStyle,
117
+ W as getContainingBlock,
118
+ L as getDocumentElement,
119
+ k as getFrameElement,
120
+ S as getNearestOverflowAncestor,
121
+ a as getNodeName,
122
+ $ as getNodeScroll,
123
+ w as getOverflowAncestors,
124
+ f as getParentNode,
125
125
  i as getWindow,
126
- V as isContainingBlock,
127
- m as isElement,
128
- w as isHTMLElement,
129
- h as isLastTraversableNode,
130
- p as isNode,
126
+ D as isContainingBlock,
127
+ h as isElement,
128
+ g as isHTMLElement,
129
+ N as isLastTraversableNode,
130
+ m as isNode,
131
131
  y as isOverflowElement,
132
- f as isShadowRoot,
133
- A as isTableElement,
134
- L as isTopLayer,
135
- O as isWebKit
132
+ p as isShadowRoot,
133
+ _ as isTableElement,
134
+ T as isTopLayer,
135
+ R as isWebKit
136
136
  };