@tealca/core-components 1.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/README.md +58 -0
- package/dist/index.d.ts +1 -0
- package/dist/tealca-core-components.es.js +357 -0
- package/dist/tealca-core-components.umd.js +26 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# tealca-core-components
|
|
2
|
+
|
|
3
|
+
> A set of reusable and accessible React components, built with TypeScript. This library centralizes all of Tealca's UI components, ensuring a consistent user experience and a unified brand identity across all our web applications.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
This repository contains reusable components developed for TEALCA, enabling integration and visual consistency across all our applications. The project is built with [Vite](https://vitejs.dev/), [React](https://react.dev/), [TypeScript](https://www.typescriptlang.org/), [SWC](https://swc.rs/), and [Storybook](https://storybook.js.org/), providing a modern, fast, and scalable environment.
|
|
8
|
+
|
|
9
|
+
## Main Technologies
|
|
10
|
+
|
|
11
|
+
- **Vite**: Ultra-fast bundler for development and production.
|
|
12
|
+
- **React**: Library for building user interfaces.
|
|
13
|
+
- **TypeScript**: Static typing for robustness and maintainability.
|
|
14
|
+
- **SWC**: Modern compiler for JavaScript and TypeScript.
|
|
15
|
+
- **Storybook**: Tool for developing, testing, and documenting UI components in isolation.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install tealca-core-components
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { PrimaryButton } from "tealca-core-components";
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return <PrimaryButton>Click Me</PrimaryButton>;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Scripts
|
|
34
|
+
|
|
35
|
+
- `npm run dev`: Starts the development environment.
|
|
36
|
+
- `npm run build`: Builds the components for production.
|
|
37
|
+
- `npm run preview`: Previews the production build.
|
|
38
|
+
- `npm run storybook`: Starts Storybook for component development and documentation.
|
|
39
|
+
|
|
40
|
+
## Project Structure
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
├── src/ # Main components
|
|
44
|
+
├── public/ # Public assets
|
|
45
|
+
├── index.html # Main entry point
|
|
46
|
+
├── package.json # Dependencies and scripts
|
|
47
|
+
├── tsconfig.json # TypeScript configuration
|
|
48
|
+
├── vite.config.ts # Vite configuration
|
|
49
|
+
├── .storybook/ # Storybook configuration
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Contributing
|
|
53
|
+
|
|
54
|
+
Contributions are welcome! Please follow best development practices and ensure consistency with existing components.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
This project is property of TEALCA. Internal and collaborative use only.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import oe from "react";
|
|
2
|
+
function ae(o) {
|
|
3
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
4
|
+
}
|
|
5
|
+
var R = { exports: {} }, E = {};
|
|
6
|
+
/**
|
|
7
|
+
* @license React
|
|
8
|
+
* react-jsx-runtime.production.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var $;
|
|
16
|
+
function se() {
|
|
17
|
+
if ($) return E;
|
|
18
|
+
$ = 1;
|
|
19
|
+
var o = Symbol.for("react.transitional.element"), f = Symbol.for("react.fragment");
|
|
20
|
+
function c(d, l, t) {
|
|
21
|
+
var a = null;
|
|
22
|
+
if (t !== void 0 && (a = "" + t), l.key !== void 0 && (a = "" + l.key), "key" in l) {
|
|
23
|
+
t = {};
|
|
24
|
+
for (var i in l)
|
|
25
|
+
i !== "key" && (t[i] = l[i]);
|
|
26
|
+
} else t = l;
|
|
27
|
+
return l = t.ref, {
|
|
28
|
+
$$typeof: o,
|
|
29
|
+
type: d,
|
|
30
|
+
key: a,
|
|
31
|
+
ref: l !== void 0 ? l : null,
|
|
32
|
+
props: t
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return E.Fragment = f, E.jsx = c, E.jsxs = c, E;
|
|
36
|
+
}
|
|
37
|
+
var v = {};
|
|
38
|
+
/**
|
|
39
|
+
* @license React
|
|
40
|
+
* react-jsx-runtime.development.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
var D;
|
|
48
|
+
function ue() {
|
|
49
|
+
return D || (D = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
|
+
function o(e) {
|
|
51
|
+
if (e == null) return null;
|
|
52
|
+
if (typeof e == "function")
|
|
53
|
+
return e.$$typeof === re ? null : e.displayName || e.name || null;
|
|
54
|
+
if (typeof e == "string") return e;
|
|
55
|
+
switch (e) {
|
|
56
|
+
case T:
|
|
57
|
+
return "Fragment";
|
|
58
|
+
case G:
|
|
59
|
+
return "Profiler";
|
|
60
|
+
case z:
|
|
61
|
+
return "StrictMode";
|
|
62
|
+
case Z:
|
|
63
|
+
return "Suspense";
|
|
64
|
+
case Q:
|
|
65
|
+
return "SuspenseList";
|
|
66
|
+
case ee:
|
|
67
|
+
return "Activity";
|
|
68
|
+
}
|
|
69
|
+
if (typeof e == "object")
|
|
70
|
+
switch (typeof e.tag == "number" && console.error(
|
|
71
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
+
), e.$$typeof) {
|
|
73
|
+
case V:
|
|
74
|
+
return "Portal";
|
|
75
|
+
case B:
|
|
76
|
+
return (e.displayName || "Context") + ".Provider";
|
|
77
|
+
case X:
|
|
78
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case H:
|
|
80
|
+
var r = e.render;
|
|
81
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
82
|
+
case K:
|
|
83
|
+
return r = e.displayName || null, r !== null ? r : o(e.type) || "Memo";
|
|
84
|
+
case h:
|
|
85
|
+
r = e._payload, e = e._init;
|
|
86
|
+
try {
|
|
87
|
+
return o(e(r));
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
function f(e) {
|
|
94
|
+
return "" + e;
|
|
95
|
+
}
|
|
96
|
+
function c(e) {
|
|
97
|
+
try {
|
|
98
|
+
f(e);
|
|
99
|
+
var r = !1;
|
|
100
|
+
} catch {
|
|
101
|
+
r = !0;
|
|
102
|
+
}
|
|
103
|
+
if (r) {
|
|
104
|
+
r = console;
|
|
105
|
+
var n = r.error, s = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
106
|
+
return n.call(
|
|
107
|
+
r,
|
|
108
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
+
s
|
|
110
|
+
), f(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function d(e) {
|
|
114
|
+
if (e === T) return "<>";
|
|
115
|
+
if (typeof e == "object" && e !== null && e.$$typeof === h)
|
|
116
|
+
return "<...>";
|
|
117
|
+
try {
|
|
118
|
+
var r = o(e);
|
|
119
|
+
return r ? "<" + r + ">" : "<...>";
|
|
120
|
+
} catch {
|
|
121
|
+
return "<...>";
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function l() {
|
|
125
|
+
var e = O.A;
|
|
126
|
+
return e === null ? null : e.getOwner();
|
|
127
|
+
}
|
|
128
|
+
function t() {
|
|
129
|
+
return Error("react-stack-top-frame");
|
|
130
|
+
}
|
|
131
|
+
function a(e) {
|
|
132
|
+
if (N.call(e, "key")) {
|
|
133
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
134
|
+
if (r && r.isReactWarning) return !1;
|
|
135
|
+
}
|
|
136
|
+
return e.key !== void 0;
|
|
137
|
+
}
|
|
138
|
+
function i(e, r) {
|
|
139
|
+
function n() {
|
|
140
|
+
g || (g = !0, console.error(
|
|
141
|
+
"%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)",
|
|
142
|
+
r
|
|
143
|
+
));
|
|
144
|
+
}
|
|
145
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
146
|
+
get: n,
|
|
147
|
+
configurable: !0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function U() {
|
|
151
|
+
var e = o(this.type);
|
|
152
|
+
return C[e] || (C[e] = !0, console.error(
|
|
153
|
+
"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."
|
|
154
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
155
|
+
}
|
|
156
|
+
function J(e, r, n, s, p, m, x, S) {
|
|
157
|
+
return n = m.ref, e = {
|
|
158
|
+
$$typeof: P,
|
|
159
|
+
type: e,
|
|
160
|
+
key: r,
|
|
161
|
+
props: m,
|
|
162
|
+
_owner: p
|
|
163
|
+
}, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
|
|
164
|
+
enumerable: !1,
|
|
165
|
+
get: U
|
|
166
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
167
|
+
configurable: !1,
|
|
168
|
+
enumerable: !1,
|
|
169
|
+
writable: !0,
|
|
170
|
+
value: 0
|
|
171
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
172
|
+
configurable: !1,
|
|
173
|
+
enumerable: !1,
|
|
174
|
+
writable: !0,
|
|
175
|
+
value: null
|
|
176
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
177
|
+
configurable: !1,
|
|
178
|
+
enumerable: !1,
|
|
179
|
+
writable: !0,
|
|
180
|
+
value: x
|
|
181
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
182
|
+
configurable: !1,
|
|
183
|
+
enumerable: !1,
|
|
184
|
+
writable: !0,
|
|
185
|
+
value: S
|
|
186
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
187
|
+
}
|
|
188
|
+
function A(e, r, n, s, p, m, x, S) {
|
|
189
|
+
var u = r.children;
|
|
190
|
+
if (u !== void 0)
|
|
191
|
+
if (s)
|
|
192
|
+
if (te(u)) {
|
|
193
|
+
for (s = 0; s < u.length; s++)
|
|
194
|
+
w(u[s]);
|
|
195
|
+
Object.freeze && Object.freeze(u);
|
|
196
|
+
} else
|
|
197
|
+
console.error(
|
|
198
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
|
+
);
|
|
200
|
+
else w(u);
|
|
201
|
+
if (N.call(r, "key")) {
|
|
202
|
+
u = o(e);
|
|
203
|
+
var b = Object.keys(r).filter(function(ne) {
|
|
204
|
+
return ne !== "key";
|
|
205
|
+
});
|
|
206
|
+
s = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", I[u + s] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
208
|
+
let props = %s;
|
|
209
|
+
<%s {...props} />
|
|
210
|
+
React keys must be passed directly to JSX without using spread:
|
|
211
|
+
let props = %s;
|
|
212
|
+
<%s key={someKey} {...props} />`,
|
|
213
|
+
s,
|
|
214
|
+
u,
|
|
215
|
+
b,
|
|
216
|
+
u
|
|
217
|
+
), I[u + s] = !0);
|
|
218
|
+
}
|
|
219
|
+
if (u = null, n !== void 0 && (c(n), u = "" + n), a(r) && (c(r.key), u = "" + r.key), "key" in r) {
|
|
220
|
+
n = {};
|
|
221
|
+
for (var j in r)
|
|
222
|
+
j !== "key" && (n[j] = r[j]);
|
|
223
|
+
} else n = r;
|
|
224
|
+
return u && i(
|
|
225
|
+
n,
|
|
226
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
227
|
+
), J(
|
|
228
|
+
e,
|
|
229
|
+
u,
|
|
230
|
+
m,
|
|
231
|
+
p,
|
|
232
|
+
l(),
|
|
233
|
+
n,
|
|
234
|
+
x,
|
|
235
|
+
S
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
function w(e) {
|
|
239
|
+
typeof e == "object" && e !== null && e.$$typeof === P && e._store && (e._store.validated = 1);
|
|
240
|
+
}
|
|
241
|
+
var _ = oe, P = Symbol.for("react.transitional.element"), V = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), z = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), X = Symbol.for("react.consumer"), B = Symbol.for("react.context"), H = Symbol.for("react.forward_ref"), Z = Symbol.for("react.suspense"), Q = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), ee = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), O = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, te = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
242
|
+
return null;
|
|
243
|
+
};
|
|
244
|
+
_ = {
|
|
245
|
+
react_stack_bottom_frame: function(e) {
|
|
246
|
+
return e();
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
var g, C = {}, Y = _.react_stack_bottom_frame.bind(
|
|
250
|
+
_,
|
|
251
|
+
t
|
|
252
|
+
)(), F = k(d(t)), I = {};
|
|
253
|
+
v.Fragment = T, v.jsx = function(e, r, n, s, p) {
|
|
254
|
+
var m = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return A(
|
|
256
|
+
e,
|
|
257
|
+
r,
|
|
258
|
+
n,
|
|
259
|
+
!1,
|
|
260
|
+
s,
|
|
261
|
+
p,
|
|
262
|
+
m ? Error("react-stack-top-frame") : Y,
|
|
263
|
+
m ? k(d(e)) : F
|
|
264
|
+
);
|
|
265
|
+
}, v.jsxs = function(e, r, n, s, p) {
|
|
266
|
+
var m = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return A(
|
|
268
|
+
e,
|
|
269
|
+
r,
|
|
270
|
+
n,
|
|
271
|
+
!0,
|
|
272
|
+
s,
|
|
273
|
+
p,
|
|
274
|
+
m ? Error("react-stack-top-frame") : Y,
|
|
275
|
+
m ? k(d(e)) : F
|
|
276
|
+
);
|
|
277
|
+
};
|
|
278
|
+
})()), v;
|
|
279
|
+
}
|
|
280
|
+
var M;
|
|
281
|
+
function ce() {
|
|
282
|
+
return M || (M = 1, process.env.NODE_ENV === "production" ? R.exports = se() : R.exports = ue()), R.exports;
|
|
283
|
+
}
|
|
284
|
+
var W = ce(), y = { exports: {} };
|
|
285
|
+
/*!
|
|
286
|
+
Copyright (c) 2018 Jed Watson.
|
|
287
|
+
Licensed under the MIT License (MIT), see
|
|
288
|
+
http://jedwatson.github.io/classnames
|
|
289
|
+
*/
|
|
290
|
+
var L;
|
|
291
|
+
function le() {
|
|
292
|
+
return L || (L = 1, (function(o) {
|
|
293
|
+
(function() {
|
|
294
|
+
var f = {}.hasOwnProperty;
|
|
295
|
+
function c() {
|
|
296
|
+
for (var t = "", a = 0; a < arguments.length; a++) {
|
|
297
|
+
var i = arguments[a];
|
|
298
|
+
i && (t = l(t, d(i)));
|
|
299
|
+
}
|
|
300
|
+
return t;
|
|
301
|
+
}
|
|
302
|
+
function d(t) {
|
|
303
|
+
if (typeof t == "string" || typeof t == "number")
|
|
304
|
+
return t;
|
|
305
|
+
if (typeof t != "object")
|
|
306
|
+
return "";
|
|
307
|
+
if (Array.isArray(t))
|
|
308
|
+
return c.apply(null, t);
|
|
309
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
310
|
+
return t.toString();
|
|
311
|
+
var a = "";
|
|
312
|
+
for (var i in t)
|
|
313
|
+
f.call(t, i) && t[i] && (a = l(a, i));
|
|
314
|
+
return a;
|
|
315
|
+
}
|
|
316
|
+
function l(t, a) {
|
|
317
|
+
return a ? t ? t + " " + a : t + a : t;
|
|
318
|
+
}
|
|
319
|
+
o.exports ? (c.default = c, o.exports = c) : window.classNames = c;
|
|
320
|
+
})();
|
|
321
|
+
})(y)), y.exports;
|
|
322
|
+
}
|
|
323
|
+
var ie = le();
|
|
324
|
+
const q = /* @__PURE__ */ ae(ie), fe = ({
|
|
325
|
+
children: o,
|
|
326
|
+
className: f,
|
|
327
|
+
disabled: c,
|
|
328
|
+
...d
|
|
329
|
+
}) => /* @__PURE__ */ W.jsx(
|
|
330
|
+
"button",
|
|
331
|
+
{
|
|
332
|
+
className: q(
|
|
333
|
+
"inline-flex justify-center rounded-md px-3 py-2 text-sm font-semibold shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 border-2 cursor-pointer",
|
|
334
|
+
f,
|
|
335
|
+
c ? "pointer-events-none opacity-50" : ""
|
|
336
|
+
),
|
|
337
|
+
...d,
|
|
338
|
+
children: o
|
|
339
|
+
}
|
|
340
|
+
), de = ({
|
|
341
|
+
children: o,
|
|
342
|
+
className: f,
|
|
343
|
+
...c
|
|
344
|
+
}) => /* @__PURE__ */ W.jsx(
|
|
345
|
+
fe,
|
|
346
|
+
{
|
|
347
|
+
className: q(
|
|
348
|
+
"bg-tealca-500 border-tealca-500 hover:bg-tealca-400 text-white focus-visible:outline-tealca-400",
|
|
349
|
+
f
|
|
350
|
+
),
|
|
351
|
+
...c,
|
|
352
|
+
children: o
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
export {
|
|
356
|
+
de as PrimaryButton
|
|
357
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
(function(b,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):(b=typeof globalThis<"u"?globalThis:b||self,v(b["tealca-core-components"]={},b.React))})(this,(function(b,v){"use strict";function V(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var T={exports:{}},_={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var A;function z(){if(A)return _;A=1;var o=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function c(m,i,t){var a=null;if(t!==void 0&&(a=""+t),i.key!==void 0&&(a=""+i.key),"key"in i){t={};for(var l in i)l!=="key"&&(t[l]=i[l])}else t=i;return i=t.ref,{$$typeof:o,type:m,key:a,ref:i!==void 0?i:null,props:t}}return _.Fragment=f,_.jsx=c,_.jsxs=c,_}var R={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var w;function G(){return w||(w=1,process.env.NODE_ENV!=="production"&&(function(){function o(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case ne:return"Profiler";case te:return"StrictMode";case ue:return"Suspense";case ce:return"SuspenseList";case le:return"Activity"}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){case re:return"Portal";case ae:return(e.displayName||"Context")+".Provider";case oe:return(e._context.displayName||"Context")+".Consumer";case se:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return r=e.displayName||null,r!==null?r:o(e.type)||"Memo";case M:r=e._payload,e=e._init;try{return o(e(r))}catch{}}return null}function f(e){return""+e}function c(e){try{f(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,s=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",s),f(e)}}function m(e){if(e===S)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===M)return"<...>";try{var r=o(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function i(){var e=x.A;return e===null?null:e.getOwner()}function t(){return Error("react-stack-top-frame")}function a(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function l(e,r){function n(){L||(L=!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)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function K(){var e=o(this.type);return W[e]||(W[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?e:null}function ee(e,r,n,s,p,d,k,h){return n=d.ref,e={$$typeof:D,type:e,key:r,props:d,_owner:p},(n!==void 0?n:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:K}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function F(e,r,n,s,p,d,k,h){var u=r.children;if(u!==void 0)if(s)if(de(u)){for(s=0;s<u.length;s++)I(u[s]);Object.freeze&&Object.freeze(u)}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.");else I(u);if($.call(r,"key")){u=o(e);var E=Object.keys(r).filter(function(me){return me!=="key"});s=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",J[u+s]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,s,u,E,u),J[u+s]=!0)}if(u=null,n!==void 0&&(c(n),u=""+n),a(r)&&(c(r.key),u=""+r.key),"key"in r){n={};for(var P in r)P!=="key"&&(n[P]=r[P])}else n=r;return u&&l(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),ee(e,u,d,p,i(),n,k,h)}function I(e){typeof e=="object"&&e!==null&&e.$$typeof===D&&e._store&&(e._store.validated=1)}var O=v,D=Symbol.for("react.transitional.element"),re=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),fe=Symbol.for("react.client.reference"),x=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,de=Array.isArray,j=console.createTask?console.createTask:function(){return null};O={react_stack_bottom_frame:function(e){return e()}};var L,W={},q=O.react_stack_bottom_frame.bind(O,t)(),U=j(m(t)),J={};R.Fragment=S,R.jsx=function(e,r,n,s,p){var d=1e4>x.recentlyCreatedOwnerStacks++;return F(e,r,n,!1,s,p,d?Error("react-stack-top-frame"):q,d?j(m(e)):U)},R.jsxs=function(e,r,n,s,p){var d=1e4>x.recentlyCreatedOwnerStacks++;return F(e,r,n,!0,s,p,d?Error("react-stack-top-frame"):q,d?j(m(e)):U)}})()),R}var g;function B(){return g||(g=1,process.env.NODE_ENV==="production"?T.exports=z():T.exports=G()),T.exports}var N=B(),y={exports:{}};/*!
|
|
23
|
+
Copyright (c) 2018 Jed Watson.
|
|
24
|
+
Licensed under the MIT License (MIT), see
|
|
25
|
+
http://jedwatson.github.io/classnames
|
|
26
|
+
*/var C;function X(){return C||(C=1,(function(o){(function(){var f={}.hasOwnProperty;function c(){for(var t="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(t=i(t,m(l)))}return t}function m(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return c.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var a="";for(var l in t)f.call(t,l)&&t[l]&&(a=i(a,l));return a}function i(t,a){return a?t?t+" "+a:t+a:t}o.exports?(c.default=c,o.exports=c):window.classNames=c})()})(y)),y.exports}var H=X();const Y=V(H),Z=({children:o,className:f,disabled:c,...m})=>N.jsx("button",{className:Y("inline-flex justify-center rounded-md px-3 py-2 text-sm font-semibold shadow-sm focus-visible:outline-2 focus-visible:outline-offset-2 border-2 cursor-pointer",f,c?"pointer-events-none opacity-50":""),...m,children:o}),Q=({children:o,className:f,...c})=>N.jsx(Z,{className:Y("bg-tealca-500 border-tealca-500 hover:bg-tealca-400 text-white focus-visible:outline-tealca-400",f),...c,children:o});b.PrimaryButton=Q,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tealca/core-components",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "A collection of shared UI components for Tealca's applications.",
|
|
6
|
+
"main": "dist/tealca-core-components.umd.js",
|
|
7
|
+
"module": "dist/tealca-core-components.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "vite",
|
|
15
|
+
"build": "tsc -b && vite build",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"storybook": "storybook dev -p 6006",
|
|
19
|
+
"build-storybook": "storybook build"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@tailwindcss/vite": "^4.1.12",
|
|
23
|
+
"classnames": "^2.5.1",
|
|
24
|
+
"react": "^19.1.1",
|
|
25
|
+
"react-dom": "^19.1.1",
|
|
26
|
+
"tailwindcss": "^4.1.12"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@chromatic-com/storybook": "^4.1.1",
|
|
30
|
+
"@eslint/js": "^9.33.0",
|
|
31
|
+
"@storybook/addon-a11y": "^9.1.4",
|
|
32
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
33
|
+
"@storybook/addon-onboarding": "^9.1.4",
|
|
34
|
+
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
35
|
+
"@storybook/addon-vitest": "^9.1.4",
|
|
36
|
+
"@storybook/builder-vite": "^9.1.4",
|
|
37
|
+
"@storybook/react-vite": "^9.1.4",
|
|
38
|
+
"@tailwindcss/forms": "^0.5.10",
|
|
39
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
40
|
+
"@testing-library/react": "^16.3.0",
|
|
41
|
+
"@types/node": "^24.3.1",
|
|
42
|
+
"@types/react": "^19.1.10",
|
|
43
|
+
"@types/react-dom": "^19.1.7",
|
|
44
|
+
"@vitejs/plugin-react-swc": "^4.0.0",
|
|
45
|
+
"@vitest/browser": "^3.2.4",
|
|
46
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
47
|
+
"eslint": "^9.33.0",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
50
|
+
"eslint-plugin-storybook": "^9.1.4",
|
|
51
|
+
"globals": "^16.3.0",
|
|
52
|
+
"jsdom": "^26.1.0",
|
|
53
|
+
"playwright": "^1.55.0",
|
|
54
|
+
"prettier": "^3.6.2",
|
|
55
|
+
"storybook": "^9.1.4",
|
|
56
|
+
"typescript": "~5.8.3",
|
|
57
|
+
"typescript-eslint": "^8.39.1",
|
|
58
|
+
"vite": "^7.1.2",
|
|
59
|
+
"vite-plugin-dts": "^4.5.4",
|
|
60
|
+
"vitest": "^3.2.4"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
}
|
|
65
|
+
}
|