New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@boxyhq/react-ui

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boxyhq/react-ui - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

732

dist/@boxyhq/react-ui.js

@@ -1,66 +0,682 @@

import { useState as d, useEffect as R } from "react";
const S = (r, o) => {
const t = Math.floor(1e6 + Math.random() * 1e6).toString();
return o ? `boxyhq-${r}-${o}-${t}` : `boxyhq-${r}-${t}`;
}, E = (r, o) => {
const [t, n] = d("");
return R(() => {
n(S(r, o));
}, [r, o]), t;
}, i = (r = !1, o = "", t) => r ? o : `${t} ${o}`, v = "_form_nolbr_1", C = "_label_nolbr_7", q = "_input_nolbr_11", x = "_button_nolbr_31", u = {
form: v,
label: C,
input: q,
button: x
}, $ = "sso", P = ({ forwardTenant: r, label: o, styles: t, classNames: n, unstyled: e = !1 }) => {
const f = E($, "input"), p = E($, "span"), [_, l] = d(""), [h, b] = d(""), I = (c) => {
b(""), l(c.currentTarget.value);
}, M = async (c) => {
c.preventDefault(), b("");
const {
error: { message: a }
} = await r(_);
typeof a == "string" && a && b(a);
}, g = !!h;
return /* @__PURE__ */ React.createElement(
"form",
import kr, { useState as er, useEffect as de } from "react";
const ve = (p, b) => {
const c = Math.floor(1e6 + Math.random() * 1e6).toString();
return b ? `boxyhq-${p}-${b}-${c}` : `boxyhq-${p}-${c}`;
}, Pr = (p, b) => {
const [c, f] = er("");
return de(() => {
f(ve(p, b));
}, [p, b]), c;
}, B = (p = !1, b = "", c) => p ? b : `${c} ${b}`, pe = "_form_nolbr_1", be = "_label_nolbr_7", he = "_input_nolbr_11", ge = "_button_nolbr_31", G = {
form: pe,
label: be,
input: he,
button: ge
};
var tr = { exports: {} }, W = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var wr;
function _e() {
if (wr)
return W;
wr = 1;
var p = kr, b = Symbol.for("react.element"), c = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, m = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 };
function S(R, d, y) {
var v, E = {}, T = null, w = null;
y !== void 0 && (T = "" + y), d.key !== void 0 && (T = "" + d.key), d.ref !== void 0 && (w = d.ref);
for (v in d)
f.call(d, v) && !P.hasOwnProperty(v) && (E[v] = d[v]);
if (R && R.defaultProps)
for (v in d = R.defaultProps, d)
E[v] === void 0 && (E[v] = d[v]);
return { $$typeof: b, type: R, key: T, ref: w, props: E, _owner: m.current };
}
return W.Fragment = c, W.jsx = S, W.jsxs = S, W;
}
var Y = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var xr;
function Ee() {
return xr || (xr = 1, process.env.NODE_ENV !== "production" && function() {
var p = kr, b = Symbol.for("react.element"), c = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), R = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), j = Symbol.iterator, A = "@@iterator";
function Dr(r) {
if (r === null || typeof r != "object")
return null;
var e = j && r[j] || r[A];
return typeof e == "function" ? e : null;
}
var k = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function h(r) {
{
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
t[n - 1] = arguments[n];
Fr("error", r, t);
}
}
function Fr(r, e, t) {
{
var n = k.ReactDebugCurrentFrame, i = n.getStackAddendum();
i !== "" && (e += "%s", t = t.concat([i]));
var u = t.map(function(o) {
return String(o);
});
u.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, u);
}
}
var Ar = !1, Ir = !1, $r = !1, Wr = !1, Yr = !1, nr;
nr = Symbol.for("react.module.reference");
function Mr(r) {
return !!(typeof r == "string" || typeof r == "function" || r === f || r === P || Yr || r === m || r === y || r === v || Wr || r === w || Ar || Ir || $r || typeof r == "object" && r !== null && (r.$$typeof === T || r.$$typeof === E || r.$$typeof === S || r.$$typeof === R || r.$$typeof === d || r.$$typeof === nr || r.getModuleId !== void 0));
}
function Lr(r, e, t) {
var n = r.displayName;
if (n)
return n;
var i = e.displayName || e.name || "";
return i !== "" ? t + "(" + i + ")" : t;
}
function ar(r) {
return r.displayName || "Context";
}
function O(r) {
if (r == null)
return null;
if (typeof r.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
return r.displayName || r.name || null;
if (typeof r == "string")
return r;
switch (r) {
case f:
return "Fragment";
case c:
return "Portal";
case P:
return "Profiler";
case m:
return "StrictMode";
case y:
return "Suspense";
case v:
return "SuspenseList";
}
if (typeof r == "object")
switch (r.$$typeof) {
case R:
var e = r;
return ar(e) + ".Consumer";
case S:
var t = r;
return ar(t._context) + ".Provider";
case d:
return Lr(r, r.render, "ForwardRef");
case E:
var n = r.displayName || null;
return n !== null ? n : O(r.type) || "Memo";
case T: {
var i = r, u = i._payload, o = i._init;
try {
return O(o(u));
} catch {
return null;
}
}
}
return null;
}
var x = Object.assign, I = 0, or, ir, ur, fr, lr, cr, sr;
function dr() {
}
dr.__reactDisabledLog = !0;
function Vr() {
{
if (I === 0) {
or = console.log, ir = console.info, ur = console.warn, fr = console.error, lr = console.group, cr = console.groupCollapsed, sr = console.groupEnd;
var r = {
configurable: !0,
enumerable: !0,
value: dr,
writable: !0
};
Object.defineProperties(console, {
info: r,
log: r,
warn: r,
error: r,
group: r,
groupCollapsed: r,
groupEnd: r
});
}
I++;
}
}
function Ur() {
{
if (I--, I === 0) {
var r = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: x({}, r, {
value: or
}),
info: x({}, r, {
value: ir
}),
warn: x({}, r, {
value: ur
}),
error: x({}, r, {
value: fr
}),
group: x({}, r, {
value: lr
}),
groupCollapsed: x({}, r, {
value: cr
}),
groupEnd: x({}, r, {
value: sr
})
});
}
I < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var z = k.ReactCurrentDispatcher, N;
function M(r, e, t) {
{
if (N === void 0)
try {
throw Error();
} catch (i) {
var n = i.stack.trim().match(/\n( *(at )?)/);
N = n && n[1] || "";
}
return `
` + N + r;
}
}
var K = !1, L;
{
onSubmit: M,
className: i(e, n == null ? void 0 : n.container, u.form)
},
/* @__PURE__ */ React.createElement(
"label",
var qr = typeof WeakMap == "function" ? WeakMap : Map;
L = new qr();
}
function vr(r, e) {
if (!r || K)
return "";
{
htmlFor: f,
style: t == null ? void 0 : t.label,
className: i(e, n == null ? void 0 : n.label, u.label)
},
o
),
/* @__PURE__ */ React.createElement(
"input",
var t = L.get(r);
if (t !== void 0)
return t;
}
var n;
K = !0;
var i = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var u;
u = z.current, z.current = null, Vr();
try {
if (e) {
var o = function() {
throw Error();
};
if (Object.defineProperty(o.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(o, []);
} catch (C) {
n = C;
}
Reflect.construct(r, [], o);
} else {
try {
o.call();
} catch (C) {
n = C;
}
r.call(o.prototype);
}
} else {
try {
throw Error();
} catch (C) {
n = C;
}
r();
}
} catch (C) {
if (C && n && typeof C.stack == "string") {
for (var a = C.stack.split(`
`), g = n.stack.split(`
`), l = a.length - 1, s = g.length - 1; l >= 1 && s >= 0 && a[l] !== g[s]; )
s--;
for (; l >= 1 && s >= 0; l--, s--)
if (a[l] !== g[s]) {
if (l !== 1 || s !== 1)
do
if (l--, s--, s < 0 || a[l] !== g[s]) {
var _ = `
` + a[l].replace(" at new ", " at ");
return r.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", r.displayName)), typeof r == "function" && L.set(r, _), _;
}
while (l >= 1 && s >= 0);
break;
}
}
} finally {
K = !1, z.current = u, Ur(), Error.prepareStackTrace = i;
}
var F = r ? r.displayName || r.name : "", Sr = F ? M(F) : "";
return typeof r == "function" && L.set(r, Sr), Sr;
}
function Br(r, e, t) {
return vr(r, !1);
}
function Gr(r) {
var e = r.prototype;
return !!(e && e.isReactComponent);
}
function V(r, e, t) {
if (r == null)
return "";
if (typeof r == "function")
return vr(r, Gr(r));
if (typeof r == "string")
return M(r);
switch (r) {
case y:
return M("Suspense");
case v:
return M("SuspenseList");
}
if (typeof r == "object")
switch (r.$$typeof) {
case d:
return Br(r.render);
case E:
return V(r.type, e, t);
case T: {
var n = r, i = n._payload, u = n._init;
try {
return V(u(i), e, t);
} catch {
}
}
}
return "";
}
var U = Object.prototype.hasOwnProperty, pr = {}, br = k.ReactDebugCurrentFrame;
function q(r) {
if (r) {
var e = r._owner, t = V(r.type, r._source, e ? e.type : null);
br.setExtraStackFrame(t);
} else
br.setExtraStackFrame(null);
}
function Jr(r, e, t, n, i) {
{
id: f,
value: _,
onChange: I,
style: t == null ? void 0 : t.input,
className: i(e, n == null ? void 0 : n.input, u.input),
"aria-invalid": g,
"aria-describedby": p
var u = Function.call.bind(U);
for (var o in r)
if (u(r, o)) {
var a = void 0;
try {
if (typeof r[o] != "function") {
var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw g.name = "Invariant Violation", g;
}
a = r[o](e, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (l) {
a = l;
}
a && !(a instanceof Error) && (q(i), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), q(null)), a instanceof Error && !(a.message in pr) && (pr[a.message] = !0, q(i), h("Failed %s type: %s", t, a.message), q(null));
}
}
),
g && /* @__PURE__ */ React.createElement("span", { id: p }, h),
/* @__PURE__ */ React.createElement(
"button",
}
var zr = Array.isArray;
function H(r) {
return zr(r);
}
function Nr(r) {
{
type: "submit",
style: t == null ? void 0 : t.button,
className: i(e, n == null ? void 0 : n.button, u.button)
},
"Proceed"
)
);
var e = typeof Symbol == "function" && Symbol.toStringTag, t = e && r[Symbol.toStringTag] || r.constructor.name || "Object";
return t;
}
}
function Kr(r) {
try {
return hr(r), !1;
} catch {
return !0;
}
}
function hr(r) {
return "" + r;
}
function gr(r) {
if (Kr(r))
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Nr(r)), hr(r);
}
var $ = k.ReactCurrentOwner, Hr = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, _r, Er, X;
X = {};
function Xr(r) {
if (U.call(r, "ref")) {
var e = Object.getOwnPropertyDescriptor(r, "ref").get;
if (e && e.isReactWarning)
return !1;
}
return r.ref !== void 0;
}
function Zr(r) {
if (U.call(r, "key")) {
var e = Object.getOwnPropertyDescriptor(r, "key").get;
if (e && e.isReactWarning)
return !1;
}
return r.key !== void 0;
}
function Qr(r, e) {
if (typeof r.ref == "string" && $.current && e && $.current.stateNode !== e) {
var t = O($.current.type);
X[t] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O($.current.type), r.ref), X[t] = !0);
}
}
function re(r, e) {
{
var t = function() {
_r || (_r = !0, h("%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://reactjs.org/link/special-props)", e));
};
t.isReactWarning = !0, Object.defineProperty(r, "key", {
get: t,
configurable: !0
});
}
}
function ee(r, e) {
{
var t = function() {
Er || (Er = !0, h("%s: `ref` 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://reactjs.org/link/special-props)", e));
};
t.isReactWarning = !0, Object.defineProperty(r, "ref", {
get: t,
configurable: !0
});
}
}
var te = function(r, e, t, n, i, u, o) {
var a = {
$$typeof: b,
type: r,
key: e,
ref: t,
props: o,
_owner: u
};
return a._store = {}, Object.defineProperty(a._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(a, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: n
}), Object.defineProperty(a, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: i
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
};
function ne(r, e, t, n, i) {
{
var u, o = {}, a = null, g = null;
t !== void 0 && (gr(t), a = "" + t), Zr(e) && (gr(e.key), a = "" + e.key), Xr(e) && (g = e.ref, Qr(e, i));
for (u in e)
U.call(e, u) && !Hr.hasOwnProperty(u) && (o[u] = e[u]);
if (r && r.defaultProps) {
var l = r.defaultProps;
for (u in l)
o[u] === void 0 && (o[u] = l[u]);
}
if (a || g) {
var s = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
a && re(o, s), g && ee(o, s);
}
return te(r, a, g, i, n, $.current, o);
}
}
var Z = k.ReactCurrentOwner, Rr = k.ReactDebugCurrentFrame;
function D(r) {
if (r) {
var e = r._owner, t = V(r.type, r._source, e ? e.type : null);
Rr.setExtraStackFrame(t);
} else
Rr.setExtraStackFrame(null);
}
var Q;
Q = !1;
function rr(r) {
return typeof r == "object" && r !== null && r.$$typeof === b;
}
function mr() {
{
if (Z.current) {
var r = O(Z.current.type);
if (r)
return `
Check the render method of \`` + r + "`.";
}
return "";
}
}
function ae(r) {
{
if (r !== void 0) {
var e = r.fileName.replace(/^.*[\\\/]/, ""), t = r.lineNumber;
return `
Check your code at ` + e + ":" + t + ".";
}
return "";
}
}
var yr = {};
function oe(r) {
{
var e = mr();
if (!e) {
var t = typeof r == "string" ? r : r.displayName || r.name;
t && (e = `
Check the top-level render call using <` + t + ">.");
}
return e;
}
}
function Tr(r, e) {
{
if (!r._store || r._store.validated || r.key != null)
return;
r._store.validated = !0;
var t = oe(e);
if (yr[t])
return;
yr[t] = !0;
var n = "";
r && r._owner && r._owner !== Z.current && (n = " It was passed a child from " + O(r._owner.type) + "."), D(r), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
}
}
function Or(r, e) {
{
if (typeof r != "object")
return;
if (H(r))
for (var t = 0; t < r.length; t++) {
var n = r[t];
rr(n) && Tr(n, e);
}
else if (rr(r))
r._store && (r._store.validated = !0);
else if (r) {
var i = Dr(r);
if (typeof i == "function" && i !== r.entries)
for (var u = i.call(r), o; !(o = u.next()).done; )
rr(o.value) && Tr(o.value, e);
}
}
}
function ie(r) {
{
var e = r.type;
if (e == null || typeof e == "string")
return;
var t;
if (typeof e == "function")
t = e.propTypes;
else if (typeof e == "object" && (e.$$typeof === d || e.$$typeof === E))
t = e.propTypes;
else
return;
if (t) {
var n = O(e);
Jr(t, r.props, "prop", n, r);
} else if (e.PropTypes !== void 0 && !Q) {
Q = !0;
var i = O(e);
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
}
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function ue(r) {
{
for (var e = Object.keys(r.props), t = 0; t < e.length; t++) {
var n = e[t];
if (n !== "children" && n !== "key") {
D(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
break;
}
}
r.ref !== null && (D(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
}
}
function Cr(r, e, t, n, i, u) {
{
var o = Mr(r);
if (!o) {
var a = "";
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var g = ae(i);
g ? a += g : a += mr();
var l;
r === null ? l = "null" : H(r) ? l = "array" : r !== void 0 && r.$$typeof === b ? (l = "<" + (O(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof r, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
}
var s = ne(r, e, t, i, u);
if (s == null)
return s;
if (o) {
var _ = e.children;
if (_ !== void 0)
if (n)
if (H(_)) {
for (var F = 0; F < _.length; F++)
Or(_[F], r);
Object.freeze && Object.freeze(_);
} else
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
Or(_, r);
}
return r === f ? ue(s) : ie(s), s;
}
}
function fe(r, e, t) {
return Cr(r, e, t, !0);
}
function le(r, e, t) {
return Cr(r, e, t, !1);
}
var ce = le, se = fe;
Y.Fragment = f, Y.jsx = ce, Y.jsxs = se;
}()), Y;
}
(function(p) {
process.env.NODE_ENV === "production" ? p.exports = _e() : p.exports = Ee();
})(tr);
const J = tr.exports.jsx, Re = tr.exports.jsxs, jr = "sso", ye = ({
forwardTenant: p,
label: b,
styles: c,
classNames: f,
unstyled: m = !1
}) => {
const P = Pr(jr, "input"), S = Pr(jr, "span"), [R, d] = er(""), [y, v] = er(""), E = (j) => {
v(""), d(j.currentTarget.value);
}, T = async (j) => {
j.preventDefault(), v("");
const {
error: {
message: A
}
} = await p(R);
typeof A == "string" && A && v(A);
}, w = !!y;
return /* @__PURE__ */ Re("form", {
onSubmit: T,
className: B(m, f == null ? void 0 : f.container, G.form),
children: [/* @__PURE__ */ J("label", {
htmlFor: P,
style: c == null ? void 0 : c.label,
className: B(m, f == null ? void 0 : f.label, G.label),
children: b
}), /* @__PURE__ */ J("input", {
id: P,
value: R,
onChange: E,
style: c == null ? void 0 : c.input,
className: B(m, f == null ? void 0 : f.input, G.input),
"aria-invalid": w,
"aria-describedby": S
}), w && /* @__PURE__ */ J("span", {
id: S,
children: y
}), /* @__PURE__ */ J("button", {
type: "submit",
style: c == null ? void 0 : c.button,
className: B(m, f == null ? void 0 : f.button, G.button),
children: "Proceed"
})]
});
};
export {
P as Login
ye as Login
};

4

package.json
{
"name": "@boxyhq/react-ui",
"description": "React UI components from BoxyHQ",
"version": "0.0.7",
"version": "0.0.8",
"type": "module",

@@ -16,3 +16,3 @@ "keywords": [

"bugs": {
"url": "https://github.com/boxyhq/jackson/issues"
"url": "https://github.com/boxyhq/jackson/issues?q=is%3Aopen+is%3Aissue+label%3Asdk"
},

@@ -19,0 +19,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc