@net-advantage/nabs-ui-tab 0.30.0 → 0.32.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/nabs-ui-tab.cjs +1 -6
- package/dist/nabs-ui-tab.js +18 -195
- package/package.json +1 -1
package/dist/nabs-ui-tab.cjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
2
|
-
let props = %s;
|
|
3
|
-
<%s {...props} />
|
|
4
|
-
React keys must be passed directly to JSX without using spread:
|
|
5
|
-
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require("react"),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),i=e(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=n():t.exports=r()}))(),a=(0,t.forwardRef)(({label:e=`Tab`,children:t,showHeader:n=!0,className:r=``,headerClassName:a=``,contentClassName:o=``,labelClassName:s=``,id:c,...l},u)=>{let d=[`nabs-ui-tab`,r].filter(Boolean).join(` `),f=[`nabs-ui-tab__header`,a].filter(Boolean).join(` `),p=[`nabs-ui-tab__content`,o].filter(Boolean).join(` `),m=[`nabs-ui-tab__label`,s].filter(Boolean).join(` `);return(0,i.jsxs)(`section`,{ref:u,id:c,className:d,...l,children:[n?(0,i.jsx)(`div`,{className:f,children:(0,i.jsx)(`div`,{className:m,children:e})}):null,(0,i.jsx)(`div`,{className:p,children:t})]})});a.displayName=`Tab`,exports.Tab=a;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(({label:e=`Tab`,children:n,showHeader:r=!0,className:i=``,headerClassName:a=``,contentClassName:o=``,labelClassName:s=``,id:c,...l},u)=>{let d=[`nabs-ui-tab`,i].filter(Boolean).join(` `),f=[`nabs-ui-tab__header`,a].filter(Boolean).join(` `),p=[`nabs-ui-tab__content`,o].filter(Boolean).join(` `),m=[`nabs-ui-tab__label`,s].filter(Boolean).join(` `);return(0,t.jsxs)(`section`,{ref:u,id:c,className:d,...l,children:[r?(0,t.jsx)(`div`,{className:f,children:(0,t.jsx)(`div`,{className:m,children:e})}):null,(0,t.jsx)(`div`,{className:p,children:n})]})});n.displayName=`Tab`,exports.Tab=n;
|
package/dist/nabs-ui-tab.js
CHANGED
|
@@ -1,202 +1,25 @@
|
|
|
1
1
|
import { forwardRef as e } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
key: i,
|
|
16
|
-
ref: n === void 0 ? null : n,
|
|
17
|
-
props: r
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
e.Fragment = n, e.jsx = r, e.jsxs = r;
|
|
21
|
-
})), i = /* @__PURE__ */ t(((e) => {
|
|
22
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
23
|
-
function t(e) {
|
|
24
|
-
if (e == null) return null;
|
|
25
|
-
if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
26
|
-
if (typeof e == "string") return e;
|
|
27
|
-
switch (e) {
|
|
28
|
-
case v: return "Fragment";
|
|
29
|
-
case b: return "Profiler";
|
|
30
|
-
case y: return "StrictMode";
|
|
31
|
-
case w: return "Suspense";
|
|
32
|
-
case T: return "SuspenseList";
|
|
33
|
-
case O: return "Activity";
|
|
34
|
-
}
|
|
35
|
-
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
36
|
-
case _: return "Portal";
|
|
37
|
-
case S: return e.displayName || "Context";
|
|
38
|
-
case x: return (e._context.displayName || "Context") + ".Consumer";
|
|
39
|
-
case C:
|
|
40
|
-
var n = e.render;
|
|
41
|
-
return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
42
|
-
case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
|
|
43
|
-
case D:
|
|
44
|
-
n = e._payload, e = e._init;
|
|
45
|
-
try {
|
|
46
|
-
return t(e(n));
|
|
47
|
-
} catch {}
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
function r(e) {
|
|
52
|
-
return "" + e;
|
|
53
|
-
}
|
|
54
|
-
function i(e) {
|
|
55
|
-
try {
|
|
56
|
-
r(e);
|
|
57
|
-
var t = !1;
|
|
58
|
-
} catch {
|
|
59
|
-
t = !0;
|
|
60
|
-
}
|
|
61
|
-
if (t) {
|
|
62
|
-
t = console;
|
|
63
|
-
var n = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
64
|
-
return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), r(e);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function a(e) {
|
|
68
|
-
if (e === v) return "<>";
|
|
69
|
-
if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
|
|
70
|
-
try {
|
|
71
|
-
var n = t(e);
|
|
72
|
-
return n ? "<" + n + ">" : "<...>";
|
|
73
|
-
} catch {
|
|
74
|
-
return "<...>";
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function o() {
|
|
78
|
-
var e = A.A;
|
|
79
|
-
return e === null ? null : e.getOwner();
|
|
80
|
-
}
|
|
81
|
-
function s() {
|
|
82
|
-
return Error("react-stack-top-frame");
|
|
83
|
-
}
|
|
84
|
-
function c(e) {
|
|
85
|
-
if (j.call(e, "key")) {
|
|
86
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
87
|
-
if (t && t.isReactWarning) return !1;
|
|
88
|
-
}
|
|
89
|
-
return e.key !== void 0;
|
|
90
|
-
}
|
|
91
|
-
function l(e, t) {
|
|
92
|
-
function n() {
|
|
93
|
-
P || (P = !0, console.error("%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)", t));
|
|
94
|
-
}
|
|
95
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
96
|
-
get: n,
|
|
97
|
-
configurable: !0
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function u() {
|
|
101
|
-
var e = t(this.type);
|
|
102
|
-
return F[e] || (F[e] = !0, console.error("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.")), e = this.props.ref, e === void 0 ? null : e;
|
|
103
|
-
}
|
|
104
|
-
function d(e, t, n, r, i, a) {
|
|
105
|
-
var o = n.ref;
|
|
106
|
-
return e = {
|
|
107
|
-
$$typeof: g,
|
|
108
|
-
type: e,
|
|
109
|
-
key: t,
|
|
110
|
-
props: n,
|
|
111
|
-
_owner: r
|
|
112
|
-
}, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
|
|
113
|
-
enumerable: !1,
|
|
114
|
-
value: null
|
|
115
|
-
}) : Object.defineProperty(e, "ref", {
|
|
116
|
-
enumerable: !1,
|
|
117
|
-
get: u
|
|
118
|
-
}), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
119
|
-
configurable: !1,
|
|
120
|
-
enumerable: !1,
|
|
121
|
-
writable: !0,
|
|
122
|
-
value: 0
|
|
123
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
124
|
-
configurable: !1,
|
|
125
|
-
enumerable: !1,
|
|
126
|
-
writable: !0,
|
|
127
|
-
value: null
|
|
128
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
129
|
-
configurable: !1,
|
|
130
|
-
enumerable: !1,
|
|
131
|
-
writable: !0,
|
|
132
|
-
value: i
|
|
133
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
134
|
-
configurable: !1,
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
writable: !0,
|
|
137
|
-
value: a
|
|
138
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
139
|
-
}
|
|
140
|
-
function f(e, n, r, a, s, u) {
|
|
141
|
-
var f = n.children;
|
|
142
|
-
if (f !== void 0) if (a) if (M(f)) {
|
|
143
|
-
for (a = 0; a < f.length; a++) p(f[a]);
|
|
144
|
-
Object.freeze && Object.freeze(f);
|
|
145
|
-
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
146
|
-
else p(f);
|
|
147
|
-
if (j.call(n, "key")) {
|
|
148
|
-
f = t(e);
|
|
149
|
-
var m = Object.keys(n).filter(function(e) {
|
|
150
|
-
return e !== "key";
|
|
151
|
-
});
|
|
152
|
-
a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), R[f + a] = !0);
|
|
153
|
-
}
|
|
154
|
-
if (f = null, r !== void 0 && (i(r), f = "" + r), c(n) && (i(n.key), f = "" + n.key), "key" in n) for (var h in r = {}, n) h !== "key" && (r[h] = n[h]);
|
|
155
|
-
else r = n;
|
|
156
|
-
return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
|
|
157
|
-
}
|
|
158
|
-
function p(e) {
|
|
159
|
-
m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
160
|
-
}
|
|
161
|
-
function m(e) {
|
|
162
|
-
return typeof e == "object" && !!e && e.$$typeof === g;
|
|
163
|
-
}
|
|
164
|
-
var h = n("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
165
|
-
return null;
|
|
166
|
-
};
|
|
167
|
-
h = { react_stack_bottom_frame: function(e) {
|
|
168
|
-
return e();
|
|
169
|
-
} };
|
|
170
|
-
var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(a(s)), R = {};
|
|
171
|
-
e.Fragment = v, e.jsx = function(e, t, n) {
|
|
172
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
173
|
-
return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
174
|
-
}, e.jsxs = function(e, t, n) {
|
|
175
|
-
var r = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
176
|
-
return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
|
|
177
|
-
};
|
|
178
|
-
})();
|
|
179
|
-
})), a = (/* @__PURE__ */ t(((e, t) => {
|
|
180
|
-
process.env.NODE_ENV === "production" ? t.exports = r() : t.exports = i();
|
|
181
|
-
})))(), o = e(({ label: e = "Tab", children: t, showHeader: n = !0, className: r = "", headerClassName: i = "", contentClassName: o = "", labelClassName: s = "", id: c, ...l }, u) => {
|
|
182
|
-
let d = ["nabs-ui-tab", r].filter(Boolean).join(" "), f = ["nabs-ui-tab__header", i].filter(Boolean).join(" "), p = ["nabs-ui-tab__content", o].filter(Boolean).join(" "), m = ["nabs-ui-tab__label", s].filter(Boolean).join(" ");
|
|
183
|
-
return /* @__PURE__ */ (0, a.jsxs)("section", {
|
|
184
|
-
ref: u,
|
|
185
|
-
id: c,
|
|
186
|
-
className: d,
|
|
187
|
-
...l,
|
|
188
|
-
children: [n ? /* @__PURE__ */ (0, a.jsx)("div", {
|
|
189
|
-
className: f,
|
|
190
|
-
children: /* @__PURE__ */ (0, a.jsx)("div", {
|
|
191
|
-
className: m,
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/Tab.tsx
|
|
4
|
+
var r = e(({ label: e = "Tab", children: r, showHeader: i = !0, className: a = "", headerClassName: o = "", contentClassName: s = "", labelClassName: c = "", id: l, ...u }, d) => {
|
|
5
|
+
let f = ["nabs-ui-tab", a].filter(Boolean).join(" "), p = ["nabs-ui-tab__header", o].filter(Boolean).join(" "), m = ["nabs-ui-tab__content", s].filter(Boolean).join(" "), h = ["nabs-ui-tab__label", c].filter(Boolean).join(" ");
|
|
6
|
+
return /* @__PURE__ */ n("section", {
|
|
7
|
+
ref: d,
|
|
8
|
+
id: l,
|
|
9
|
+
className: f,
|
|
10
|
+
...u,
|
|
11
|
+
children: [i ? /* @__PURE__ */ t("div", {
|
|
12
|
+
className: p,
|
|
13
|
+
children: /* @__PURE__ */ t("div", {
|
|
14
|
+
className: h,
|
|
192
15
|
children: e
|
|
193
16
|
})
|
|
194
|
-
}) : null, /* @__PURE__ */ (
|
|
195
|
-
className:
|
|
196
|
-
children:
|
|
17
|
+
}) : null, /* @__PURE__ */ t("div", {
|
|
18
|
+
className: m,
|
|
19
|
+
children: r
|
|
197
20
|
})]
|
|
198
21
|
});
|
|
199
22
|
});
|
|
200
|
-
|
|
23
|
+
r.displayName = "Tab";
|
|
201
24
|
//#endregion
|
|
202
|
-
export {
|
|
25
|
+
export { r as Tab };
|