@sudobility/monitoring-components 1.1.0 → 2.0.0
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/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +163 -170
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -4
- package/dist/portal.d.ts +0 -29
- package/dist/portal.d.ts.map +0 -1
- package/src/portal.tsx +0 -44
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from './gas-tracker';
|
|
2
|
+
export * from './sleep-tracker';
|
|
3
|
+
export * from './water-intake';
|
|
1
4
|
/**
|
|
2
5
|
* monitoring-components
|
|
3
6
|
*
|
|
@@ -8,12 +11,8 @@
|
|
|
8
11
|
export * from './break-timer';
|
|
9
12
|
export * from './copy-button';
|
|
10
13
|
export * from './cursor-tracker';
|
|
11
|
-
export * from './gas-tracker';
|
|
12
14
|
export * from './overtime-tracker';
|
|
13
|
-
export * from './portal';
|
|
14
15
|
export * from './recycling-tracker';
|
|
15
16
|
export * from './show';
|
|
16
|
-
export * from './sleep-tracker';
|
|
17
17
|
export * from './time-tracker';
|
|
18
|
-
export * from './water-intake';
|
|
19
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as k from "react";
|
|
2
|
-
import te
|
|
3
|
-
import { cn as f, useCopyToClipboard as
|
|
4
|
-
import { createPortal as se } from "react-dom";
|
|
2
|
+
import te from "react";
|
|
3
|
+
import { cn as f, useCopyToClipboard as oe } from "@sudobility/components";
|
|
5
4
|
var T = { exports: {} }, x = {};
|
|
6
5
|
var z;
|
|
7
|
-
function
|
|
6
|
+
function ae() {
|
|
8
7
|
if (z) return x;
|
|
9
8
|
z = 1;
|
|
10
9
|
var o = Symbol.for("react.transitional.element"), a = Symbol.for("react.fragment");
|
|
11
|
-
function
|
|
10
|
+
function t(n, u, d) {
|
|
12
11
|
var b = null;
|
|
13
12
|
if (d !== void 0 && (b = "" + d), u.key !== void 0 && (b = "" + u.key), "key" in u) {
|
|
14
13
|
d = {};
|
|
@@ -23,11 +22,11 @@ function le() {
|
|
|
23
22
|
props: d
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
|
-
return x.Fragment = a, x.jsx =
|
|
25
|
+
return x.Fragment = a, x.jsx = t, x.jsxs = t, x;
|
|
27
26
|
}
|
|
28
27
|
var E = {};
|
|
29
28
|
var J;
|
|
30
|
-
function
|
|
29
|
+
function ne() {
|
|
31
30
|
return J || (J = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
31
|
function o(e) {
|
|
33
32
|
if (e == null) return null;
|
|
@@ -56,17 +55,17 @@ function ce() {
|
|
|
56
55
|
return "Portal";
|
|
57
56
|
case G:
|
|
58
57
|
return e.displayName || "Context";
|
|
59
|
-
case
|
|
58
|
+
case N:
|
|
60
59
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
61
60
|
case B:
|
|
62
|
-
var
|
|
63
|
-
return e = e.displayName, e || (e =
|
|
61
|
+
var r = e.render;
|
|
62
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
64
63
|
case Z:
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
|
|
64
|
+
return r = e.displayName || null, r !== null ? r : o(e.type) || "Memo";
|
|
65
|
+
case S:
|
|
66
|
+
r = e._payload, e = e._init;
|
|
68
67
|
try {
|
|
69
|
-
return o(e(
|
|
68
|
+
return o(e(r));
|
|
70
69
|
} catch {
|
|
71
70
|
}
|
|
72
71
|
}
|
|
@@ -75,18 +74,18 @@ function ce() {
|
|
|
75
74
|
function a(e) {
|
|
76
75
|
return "" + e;
|
|
77
76
|
}
|
|
78
|
-
function
|
|
77
|
+
function t(e) {
|
|
79
78
|
try {
|
|
80
79
|
a(e);
|
|
81
|
-
var
|
|
80
|
+
var r = !1;
|
|
82
81
|
} catch {
|
|
83
|
-
|
|
82
|
+
r = !0;
|
|
84
83
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
var s =
|
|
84
|
+
if (r) {
|
|
85
|
+
r = console;
|
|
86
|
+
var s = r.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
88
87
|
return s.call(
|
|
89
|
-
|
|
88
|
+
r,
|
|
90
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
90
|
l
|
|
92
91
|
), a(e);
|
|
@@ -94,11 +93,11 @@ function ce() {
|
|
|
94
93
|
}
|
|
95
94
|
function n(e) {
|
|
96
95
|
if (e === v) return "<>";
|
|
97
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
96
|
+
if (typeof e == "object" && e !== null && e.$$typeof === S)
|
|
98
97
|
return "<...>";
|
|
99
98
|
try {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
99
|
+
var r = o(e);
|
|
100
|
+
return r ? "<" + r + ">" : "<...>";
|
|
102
101
|
} catch {
|
|
103
102
|
return "<...>";
|
|
104
103
|
}
|
|
@@ -112,16 +111,16 @@ function ce() {
|
|
|
112
111
|
}
|
|
113
112
|
function b(e) {
|
|
114
113
|
if (L.call(e, "key")) {
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
114
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
|
+
if (r && r.isReactWarning) return !1;
|
|
117
116
|
}
|
|
118
117
|
return e.key !== void 0;
|
|
119
118
|
}
|
|
120
|
-
function m(e,
|
|
119
|
+
function m(e, r) {
|
|
121
120
|
function s() {
|
|
122
|
-
|
|
121
|
+
$ || ($ = !0, console.error(
|
|
123
122
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
124
|
-
|
|
123
|
+
r
|
|
125
124
|
));
|
|
126
125
|
}
|
|
127
126
|
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
@@ -131,16 +130,16 @@ function ce() {
|
|
|
131
130
|
}
|
|
132
131
|
function C() {
|
|
133
132
|
var e = o(this.type);
|
|
134
|
-
return
|
|
133
|
+
return D[e] || (D[e] = !0, console.error(
|
|
135
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
136
135
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
137
136
|
}
|
|
138
|
-
function j(e,
|
|
137
|
+
function j(e, r, s, l, R, F) {
|
|
139
138
|
var c = s.ref;
|
|
140
139
|
return e = {
|
|
141
140
|
$$typeof: U,
|
|
142
141
|
type: e,
|
|
143
|
-
key:
|
|
142
|
+
key: r,
|
|
144
143
|
props: s,
|
|
145
144
|
_owner: l
|
|
146
145
|
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
@@ -168,8 +167,8 @@ function ce() {
|
|
|
168
167
|
value: F
|
|
169
168
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
170
169
|
}
|
|
171
|
-
function w(e,
|
|
172
|
-
var c =
|
|
170
|
+
function w(e, r, s, l, R, F) {
|
|
171
|
+
var c = r.children;
|
|
173
172
|
if (c !== void 0)
|
|
174
173
|
if (l)
|
|
175
174
|
if (ee(c)) {
|
|
@@ -181,9 +180,9 @@ function ce() {
|
|
|
181
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
181
|
);
|
|
183
182
|
else _(c);
|
|
184
|
-
if (L.call(
|
|
183
|
+
if (L.call(r, "key")) {
|
|
185
184
|
c = o(e);
|
|
186
|
-
var h = Object.keys(
|
|
185
|
+
var h = Object.keys(r).filter(function(re) {
|
|
187
186
|
return re !== "key";
|
|
188
187
|
});
|
|
189
188
|
l = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", V[c + l] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
@@ -199,11 +198,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
199
198
|
c
|
|
200
199
|
), V[c + l] = !0);
|
|
201
200
|
}
|
|
202
|
-
if (c = null, s !== void 0 && (
|
|
201
|
+
if (c = null, s !== void 0 && (t(s), c = "" + s), b(r) && (t(r.key), c = "" + r.key), "key" in r) {
|
|
203
202
|
s = {};
|
|
204
|
-
for (var I in
|
|
205
|
-
I !== "key" && (s[I] =
|
|
206
|
-
} else s =
|
|
203
|
+
for (var I in r)
|
|
204
|
+
I !== "key" && (s[I] = r[I]);
|
|
205
|
+
} else s = r;
|
|
207
206
|
return c && m(
|
|
208
207
|
s,
|
|
209
208
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
@@ -217,12 +216,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
216
|
);
|
|
218
217
|
}
|
|
219
218
|
function _(e) {
|
|
220
|
-
g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
219
|
+
g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === S && (e._payload.status === "fulfilled" ? g(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
221
220
|
}
|
|
222
221
|
function g(e) {
|
|
223
222
|
return typeof e == "object" && e !== null && e.$$typeof === U;
|
|
224
223
|
}
|
|
225
|
-
var p = te, U = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"),
|
|
224
|
+
var p = te, U = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), G = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), H = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Q = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), P = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, ee = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
226
225
|
return null;
|
|
227
226
|
};
|
|
228
227
|
p = {
|
|
@@ -230,42 +229,108 @@ React keys must be passed directly to JSX without using spread:
|
|
|
230
229
|
return e();
|
|
231
230
|
}
|
|
232
231
|
};
|
|
233
|
-
var
|
|
232
|
+
var $, D = {}, M = p.react_stack_bottom_frame.bind(
|
|
234
233
|
p,
|
|
235
234
|
d
|
|
236
235
|
)(), W = Y(n(d)), V = {};
|
|
237
|
-
E.Fragment = v, E.jsx = function(e,
|
|
236
|
+
E.Fragment = v, E.jsx = function(e, r, s) {
|
|
238
237
|
var l = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
239
238
|
return w(
|
|
240
239
|
e,
|
|
241
|
-
|
|
240
|
+
r,
|
|
242
241
|
s,
|
|
243
242
|
!1,
|
|
244
|
-
l ? Error("react-stack-top-frame") :
|
|
243
|
+
l ? Error("react-stack-top-frame") : M,
|
|
245
244
|
l ? Y(n(e)) : W
|
|
246
245
|
);
|
|
247
|
-
}, E.jsxs = function(e,
|
|
246
|
+
}, E.jsxs = function(e, r, s) {
|
|
248
247
|
var l = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
249
248
|
return w(
|
|
250
249
|
e,
|
|
251
|
-
|
|
250
|
+
r,
|
|
252
251
|
s,
|
|
253
252
|
!0,
|
|
254
|
-
l ? Error("react-stack-top-frame") :
|
|
253
|
+
l ? Error("react-stack-top-frame") : M,
|
|
255
254
|
l ? Y(n(e)) : W
|
|
256
255
|
);
|
|
257
256
|
};
|
|
258
257
|
})()), E;
|
|
259
258
|
}
|
|
260
259
|
var q;
|
|
261
|
-
function
|
|
262
|
-
return q || (q = 1, process.env.NODE_ENV === "production" ? T.exports =
|
|
260
|
+
function se() {
|
|
261
|
+
return q || (q = 1, process.env.NODE_ENV === "production" ? T.exports = ae() : T.exports = ne()), T.exports;
|
|
263
262
|
}
|
|
264
|
-
var i =
|
|
265
|
-
const
|
|
263
|
+
var i = se();
|
|
264
|
+
const ge = ({
|
|
265
|
+
className: o,
|
|
266
|
+
children: a,
|
|
267
|
+
disabled: t = !1,
|
|
268
|
+
onClick: n
|
|
269
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
className: f(
|
|
273
|
+
"p-4 rounded-lg border transition-colors",
|
|
274
|
+
"bg-white dark:bg-gray-900",
|
|
275
|
+
"border-gray-200 dark:border-gray-700",
|
|
276
|
+
"text-gray-900 dark:text-white",
|
|
277
|
+
t && "opacity-50 cursor-not-allowed",
|
|
278
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
279
|
+
o
|
|
280
|
+
),
|
|
281
|
+
onClick: t ? void 0 : n,
|
|
282
|
+
role: "region",
|
|
283
|
+
"aria-label": "UgasUtracker",
|
|
284
|
+
children: a || "UgasUtracker Component"
|
|
285
|
+
}
|
|
286
|
+
), be = ({
|
|
287
|
+
className: o,
|
|
288
|
+
children: a,
|
|
289
|
+
disabled: t = !1,
|
|
290
|
+
onClick: n
|
|
291
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
className: f(
|
|
295
|
+
"p-4 rounded-lg border transition-colors",
|
|
296
|
+
"bg-white dark:bg-gray-900",
|
|
297
|
+
"border-gray-200 dark:border-gray-700",
|
|
298
|
+
"text-gray-900 dark:text-white",
|
|
299
|
+
t && "opacity-50 cursor-not-allowed",
|
|
300
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
301
|
+
o
|
|
302
|
+
),
|
|
303
|
+
onClick: t ? void 0 : n,
|
|
304
|
+
role: "region",
|
|
305
|
+
"aria-label": "UsleepUtracker",
|
|
306
|
+
children: a || "UsleepUtracker Component"
|
|
307
|
+
}
|
|
308
|
+
), me = ({
|
|
309
|
+
className: o,
|
|
310
|
+
children: a,
|
|
311
|
+
disabled: t = !1,
|
|
312
|
+
onClick: n
|
|
313
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
className: f(
|
|
317
|
+
"p-4 rounded-lg border transition-colors",
|
|
318
|
+
"bg-white dark:bg-gray-900",
|
|
319
|
+
"border-gray-200 dark:border-gray-700",
|
|
320
|
+
"text-gray-900 dark:text-white",
|
|
321
|
+
t && "opacity-50 cursor-not-allowed",
|
|
322
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
323
|
+
o
|
|
324
|
+
),
|
|
325
|
+
onClick: t ? void 0 : n,
|
|
326
|
+
role: "region",
|
|
327
|
+
"aria-label": "UwaterUintake",
|
|
328
|
+
children: a || "UwaterUintake Component"
|
|
329
|
+
}
|
|
330
|
+
), ke = ({
|
|
266
331
|
className: o,
|
|
267
332
|
children: a,
|
|
268
|
-
disabled:
|
|
333
|
+
disabled: t = !1,
|
|
269
334
|
onClick: n
|
|
270
335
|
}) => /* @__PURE__ */ i.jsx(
|
|
271
336
|
"div",
|
|
@@ -275,20 +340,20 @@ const pe = ({
|
|
|
275
340
|
"bg-white dark:bg-gray-900",
|
|
276
341
|
"border-gray-200 dark:border-gray-700",
|
|
277
342
|
"text-gray-900 dark:text-white",
|
|
278
|
-
|
|
343
|
+
t && "opacity-50 cursor-not-allowed",
|
|
279
344
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
280
345
|
o
|
|
281
346
|
),
|
|
282
|
-
onClick:
|
|
347
|
+
onClick: t ? void 0 : n,
|
|
283
348
|
role: "region",
|
|
284
349
|
"aria-label": "UbreakUtimer",
|
|
285
350
|
children: a || "UbreakUtimer Component"
|
|
286
351
|
}
|
|
287
352
|
);
|
|
288
|
-
function
|
|
353
|
+
function le({
|
|
289
354
|
title: o,
|
|
290
355
|
titleId: a,
|
|
291
|
-
...
|
|
356
|
+
...t
|
|
292
357
|
}, n) {
|
|
293
358
|
return /* @__PURE__ */ k.createElement("svg", Object.assign({
|
|
294
359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -300,7 +365,7 @@ function ue({
|
|
|
300
365
|
"data-slot": "icon",
|
|
301
366
|
ref: n,
|
|
302
367
|
"aria-labelledby": a
|
|
303
|
-
},
|
|
368
|
+
}, t), o ? /* @__PURE__ */ k.createElement("title", {
|
|
304
369
|
id: a
|
|
305
370
|
}, o) : null, /* @__PURE__ */ k.createElement("path", {
|
|
306
371
|
strokeLinecap: "round",
|
|
@@ -308,11 +373,11 @@ function ue({
|
|
|
308
373
|
d: "m4.5 12.75 6 6 9-13.5"
|
|
309
374
|
}));
|
|
310
375
|
}
|
|
311
|
-
const
|
|
312
|
-
function
|
|
376
|
+
const ce = /* @__PURE__ */ k.forwardRef(le);
|
|
377
|
+
function ie({
|
|
313
378
|
title: o,
|
|
314
379
|
titleId: a,
|
|
315
|
-
...
|
|
380
|
+
...t
|
|
316
381
|
}, n) {
|
|
317
382
|
return /* @__PURE__ */ k.createElement("svg", Object.assign({
|
|
318
383
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -324,7 +389,7 @@ function fe({
|
|
|
324
389
|
"data-slot": "icon",
|
|
325
390
|
ref: n,
|
|
326
391
|
"aria-labelledby": a
|
|
327
|
-
},
|
|
392
|
+
}, t), o ? /* @__PURE__ */ k.createElement("title", {
|
|
328
393
|
id: a
|
|
329
394
|
}, o) : null, /* @__PURE__ */ k.createElement("path", {
|
|
330
395
|
strokeLinecap: "round",
|
|
@@ -332,10 +397,10 @@ function fe({
|
|
|
332
397
|
d: "M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"
|
|
333
398
|
}));
|
|
334
399
|
}
|
|
335
|
-
const
|
|
400
|
+
const ue = /* @__PURE__ */ k.forwardRef(ie), pe = ({
|
|
336
401
|
text: o,
|
|
337
402
|
size: a = "md",
|
|
338
|
-
variant:
|
|
403
|
+
variant: t = "icon",
|
|
339
404
|
label: n = "Copy",
|
|
340
405
|
successLabel: u = "Copied!",
|
|
341
406
|
iconPosition: d = "left",
|
|
@@ -344,7 +409,7 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
344
409
|
onCopySuccess: C,
|
|
345
410
|
onCopyError: j
|
|
346
411
|
}) => {
|
|
347
|
-
const { copyToClipboard: w, isCopied: _ } =
|
|
412
|
+
const { copyToClipboard: w, isCopied: _ } = oe({
|
|
348
413
|
successDuration: 2e3,
|
|
349
414
|
onSuccess: C,
|
|
350
415
|
onError: j
|
|
@@ -366,8 +431,8 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
366
431
|
button: "p-2",
|
|
367
432
|
text: "text-base px-4 py-2"
|
|
368
433
|
}
|
|
369
|
-
}[a], v = g ?
|
|
370
|
-
if (
|
|
434
|
+
}[a], v = g ? ce : ue;
|
|
435
|
+
if (t === "icon")
|
|
371
436
|
return /* @__PURE__ */ i.jsx(
|
|
372
437
|
"button",
|
|
373
438
|
{
|
|
@@ -394,25 +459,25 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
394
459
|
"border",
|
|
395
460
|
g ? "border-green-600 text-green-600 dark:border-green-400 dark:text-green-400" : "border-gray-300 text-gray-700 hover:border-gray-400 dark:border-gray-600 dark:text-gray-300 dark:hover:border-gray-500"
|
|
396
461
|
)
|
|
397
|
-
},
|
|
462
|
+
}, N = g ? u : n;
|
|
398
463
|
return /* @__PURE__ */ i.jsxs(
|
|
399
464
|
"button",
|
|
400
465
|
{
|
|
401
466
|
onClick: p,
|
|
402
|
-
className: f(O, A[
|
|
467
|
+
className: f(O, A[t], b),
|
|
403
468
|
title: m || (g ? "Copied!" : "Copy to clipboard"),
|
|
404
469
|
type: "button",
|
|
405
470
|
children: [
|
|
406
471
|
d === "left" && /* @__PURE__ */ i.jsx(v, { className: y.icon }),
|
|
407
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
472
|
+
/* @__PURE__ */ i.jsx("span", { children: N }),
|
|
408
473
|
d === "right" && /* @__PURE__ */ i.jsx(v, { className: y.icon })
|
|
409
474
|
]
|
|
410
475
|
}
|
|
411
476
|
);
|
|
412
|
-
},
|
|
477
|
+
}, ye = ({
|
|
413
478
|
className: o,
|
|
414
479
|
children: a,
|
|
415
|
-
disabled:
|
|
480
|
+
disabled: t = !1,
|
|
416
481
|
onClick: n
|
|
417
482
|
}) => /* @__PURE__ */ i.jsx(
|
|
418
483
|
"div",
|
|
@@ -422,19 +487,19 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
422
487
|
"bg-white dark:bg-gray-900",
|
|
423
488
|
"border-gray-200 dark:border-gray-700",
|
|
424
489
|
"text-gray-900 dark:text-white",
|
|
425
|
-
|
|
490
|
+
t && "opacity-50 cursor-not-allowed",
|
|
426
491
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
427
492
|
o
|
|
428
493
|
),
|
|
429
|
-
onClick:
|
|
494
|
+
onClick: t ? void 0 : n,
|
|
430
495
|
role: "region",
|
|
431
496
|
"aria-label": "UcursorUtracker",
|
|
432
497
|
children: a || "UcursorUtracker Component"
|
|
433
498
|
}
|
|
434
|
-
),
|
|
499
|
+
), ve = ({
|
|
435
500
|
className: o,
|
|
436
501
|
children: a,
|
|
437
|
-
disabled:
|
|
502
|
+
disabled: t = !1,
|
|
438
503
|
onClick: n
|
|
439
504
|
}) => /* @__PURE__ */ i.jsx(
|
|
440
505
|
"div",
|
|
@@ -444,46 +509,19 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
444
509
|
"bg-white dark:bg-gray-900",
|
|
445
510
|
"border-gray-200 dark:border-gray-700",
|
|
446
511
|
"text-gray-900 dark:text-white",
|
|
447
|
-
|
|
512
|
+
t && "opacity-50 cursor-not-allowed",
|
|
448
513
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
449
514
|
o
|
|
450
515
|
),
|
|
451
|
-
onClick:
|
|
452
|
-
role: "region",
|
|
453
|
-
"aria-label": "UgasUtracker",
|
|
454
|
-
children: a || "UgasUtracker Component"
|
|
455
|
-
}
|
|
456
|
-
), xe = ({
|
|
457
|
-
className: o,
|
|
458
|
-
children: a,
|
|
459
|
-
disabled: r = !1,
|
|
460
|
-
onClick: n
|
|
461
|
-
}) => /* @__PURE__ */ i.jsx(
|
|
462
|
-
"div",
|
|
463
|
-
{
|
|
464
|
-
className: f(
|
|
465
|
-
"p-4 rounded-lg border transition-colors",
|
|
466
|
-
"bg-white dark:bg-gray-900",
|
|
467
|
-
"border-gray-200 dark:border-gray-700",
|
|
468
|
-
"text-gray-900 dark:text-white",
|
|
469
|
-
r && "opacity-50 cursor-not-allowed",
|
|
470
|
-
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
471
|
-
o
|
|
472
|
-
),
|
|
473
|
-
onClick: r ? void 0 : n,
|
|
516
|
+
onClick: t ? void 0 : n,
|
|
474
517
|
role: "region",
|
|
475
518
|
"aria-label": "UovertimeUtracker",
|
|
476
519
|
children: a || "UovertimeUtracker Component"
|
|
477
520
|
}
|
|
478
|
-
),
|
|
479
|
-
const [r, n] = oe(!1);
|
|
480
|
-
if (ae(() => (n(!0), () => n(!1)), []), !r) return null;
|
|
481
|
-
const u = a || document.body;
|
|
482
|
-
return se(o, u);
|
|
483
|
-
}, we = ({
|
|
521
|
+
), he = ({
|
|
484
522
|
className: o,
|
|
485
523
|
children: a,
|
|
486
|
-
disabled:
|
|
524
|
+
disabled: t
|
|
487
525
|
}) => /* @__PURE__ */ i.jsx(
|
|
488
526
|
"div",
|
|
489
527
|
{
|
|
@@ -492,43 +530,21 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
492
530
|
"bg-white dark:bg-gray-900",
|
|
493
531
|
"border-gray-200 dark:border-gray-700",
|
|
494
532
|
"text-gray-900 dark:text-white",
|
|
495
|
-
|
|
533
|
+
t && "opacity-50 cursor-not-allowed",
|
|
496
534
|
o
|
|
497
535
|
),
|
|
498
536
|
role: "region",
|
|
499
537
|
"aria-label": "RecyclingTracker",
|
|
500
538
|
children: a || "RecyclingTracker Component"
|
|
501
539
|
}
|
|
502
|
-
),
|
|
540
|
+
), xe = ({
|
|
503
541
|
when: o,
|
|
504
542
|
children: a,
|
|
505
|
-
fallback:
|
|
506
|
-
}) => /* @__PURE__ */ i.jsx(i.Fragment, { children: o ? a :
|
|
507
|
-
className: o,
|
|
508
|
-
children: a,
|
|
509
|
-
disabled: r = !1,
|
|
510
|
-
onClick: n
|
|
511
|
-
}) => /* @__PURE__ */ i.jsx(
|
|
512
|
-
"div",
|
|
513
|
-
{
|
|
514
|
-
className: f(
|
|
515
|
-
"p-4 rounded-lg border transition-colors",
|
|
516
|
-
"bg-white dark:bg-gray-900",
|
|
517
|
-
"border-gray-200 dark:border-gray-700",
|
|
518
|
-
"text-gray-900 dark:text-white",
|
|
519
|
-
r && "opacity-50 cursor-not-allowed",
|
|
520
|
-
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
521
|
-
o
|
|
522
|
-
),
|
|
523
|
-
onClick: r ? void 0 : n,
|
|
524
|
-
role: "region",
|
|
525
|
-
"aria-label": "UsleepUtracker",
|
|
526
|
-
children: a || "UsleepUtracker Component"
|
|
527
|
-
}
|
|
528
|
-
), Te = ({
|
|
543
|
+
fallback: t = null
|
|
544
|
+
}) => /* @__PURE__ */ i.jsx(i.Fragment, { children: o ? a : t }), Ee = ({
|
|
529
545
|
className: o,
|
|
530
546
|
children: a,
|
|
531
|
-
disabled:
|
|
547
|
+
disabled: t = !1,
|
|
532
548
|
onClick: n
|
|
533
549
|
}) => /* @__PURE__ */ i.jsx(
|
|
534
550
|
"div",
|
|
@@ -538,49 +554,26 @@ const ge = /* @__PURE__ */ k.forwardRef(fe), ye = ({
|
|
|
538
554
|
"bg-white dark:bg-gray-900",
|
|
539
555
|
"border-gray-200 dark:border-gray-700",
|
|
540
556
|
"text-gray-900 dark:text-white",
|
|
541
|
-
|
|
557
|
+
t && "opacity-50 cursor-not-allowed",
|
|
542
558
|
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
543
559
|
o
|
|
544
560
|
),
|
|
545
|
-
onClick:
|
|
561
|
+
onClick: t ? void 0 : n,
|
|
546
562
|
role: "region",
|
|
547
563
|
"aria-label": "UtimeUtracker",
|
|
548
564
|
children: a || "UtimeUtracker Component"
|
|
549
565
|
}
|
|
550
|
-
), Ce = ({
|
|
551
|
-
className: o,
|
|
552
|
-
children: a,
|
|
553
|
-
disabled: r = !1,
|
|
554
|
-
onClick: n
|
|
555
|
-
}) => /* @__PURE__ */ i.jsx(
|
|
556
|
-
"div",
|
|
557
|
-
{
|
|
558
|
-
className: f(
|
|
559
|
-
"p-4 rounded-lg border transition-colors",
|
|
560
|
-
"bg-white dark:bg-gray-900",
|
|
561
|
-
"border-gray-200 dark:border-gray-700",
|
|
562
|
-
"text-gray-900 dark:text-white",
|
|
563
|
-
r && "opacity-50 cursor-not-allowed",
|
|
564
|
-
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
565
|
-
o
|
|
566
|
-
),
|
|
567
|
-
onClick: r ? void 0 : n,
|
|
568
|
-
role: "region",
|
|
569
|
-
"aria-label": "UwaterUintake",
|
|
570
|
-
children: a || "UwaterUintake Component"
|
|
571
|
-
}
|
|
572
566
|
);
|
|
573
567
|
export {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
Ce as UwaterUintake
|
|
568
|
+
pe as CopyButton,
|
|
569
|
+
he as RecyclingTracker,
|
|
570
|
+
xe as Show,
|
|
571
|
+
ke as UbreakUtimer,
|
|
572
|
+
ye as UcursorUtracker,
|
|
573
|
+
ge as UgasUtracker,
|
|
574
|
+
ve as UovertimeUtracker,
|
|
575
|
+
be as UsleepUtracker,
|
|
576
|
+
Ee as UtimeUtracker,
|
|
577
|
+
me as UwaterUintake
|
|
585
578
|
};
|
|
586
579
|
//# sourceMappingURL=index.esm.js.map
|