@bccampus/ui-components 0.2.0 → 0.3.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/banner.js +14 -14
- package/dist/button.d.ts +1 -1
- package/dist/button.js +17 -17
- package/dist/caption.js +7 -8
- package/dist/card.js +34 -34
- package/dist/horizontal-list.js +32 -32
- package/dist/icon-generator.js +38 -38
- package/dist/index-U7DVCmS_.js +76 -0
- package/dist/input.js +4 -4
- package/dist/masked-image-generator.js +18 -18
- package/dist/navigation-menu.d.ts +27 -0
- package/dist/navigation-menu.js +1139 -0
- package/dist/overlay.js +2 -2
- package/dist/page-header.d.ts +5 -1
- package/dist/page-header.js +10 -9
- package/dist/page-section.js +14 -14
- package/dist/page.js +4 -4
- package/dist/search-input.js +11 -11
- package/dist/tag.js +8 -9
- package/dist/ui-components.d.ts +30 -2
- package/dist/ui-components.js +47 -37
- package/package.json +6 -1
- package/src/components/ui/banner.tsx +2 -2
- package/src/components/ui/button.tsx +8 -7
- package/src/components/ui/card.tsx +5 -5
- package/src/components/ui/horizontal-list.tsx +2 -2
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/navigation-menu.tsx +165 -0
- package/src/components/ui/page-header.tsx +13 -5
- package/src/components/ui/page-section.tsx +8 -8
- package/src/components/ui/page.tsx +3 -1
- package/src/styles/theme.css +7 -7
- package/src/styles/typography.css +334 -341
- package/vite.config.ts +5 -3
- package/vite.ladle.config.ts +17 -0
- package/dist/index-DlfV3JTY.js +0 -70
- package/dist/jsx-runtime-BzflLqGi.js +0 -282
package/vite.config.ts
CHANGED
|
@@ -15,7 +15,7 @@ export default defineConfig({
|
|
|
15
15
|
"@": path.resolve(__dirname, "./src"),
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
|
-
build: {
|
|
18
|
+
build: {
|
|
19
19
|
lib: {
|
|
20
20
|
formats: ['es'],
|
|
21
21
|
entry: {
|
|
@@ -27,6 +27,7 @@ export default defineConfig({
|
|
|
27
27
|
'button': path.resolve(__dirname, 'src/components/ui/button.tsx'),
|
|
28
28
|
'horizontal-list': path.resolve(__dirname, 'src/components/ui/horizontal-list.tsx'),
|
|
29
29
|
'input': path.resolve(__dirname, 'src/components/ui/input.tsx'),
|
|
30
|
+
'navigation-menu': path.resolve(__dirname, 'src/components/ui/navigation-menu.tsx'),
|
|
30
31
|
'overlay': path.resolve(__dirname, 'src/components/ui/overlay.tsx'),
|
|
31
32
|
'page-header': path.resolve(__dirname, 'src/components/ui/page-header.tsx'),
|
|
32
33
|
'page-section': path.resolve(__dirname, 'src/components/ui/page-section.tsx'),
|
|
@@ -41,11 +42,12 @@ export default defineConfig({
|
|
|
41
42
|
rollupOptions: {
|
|
42
43
|
external: [
|
|
43
44
|
'react',
|
|
44
|
-
'react-dom
|
|
45
|
-
'react/jsx-
|
|
45
|
+
'react-dom',
|
|
46
|
+
'react/jsx-runtime',
|
|
46
47
|
'tailwindcss',
|
|
47
48
|
'tw-animate-css'
|
|
48
49
|
],
|
|
50
|
+
|
|
49
51
|
},
|
|
50
52
|
},
|
|
51
53
|
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import path from "path"
|
|
2
|
+
import { fileURLToPath } from "url"
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite"
|
|
4
|
+
import { defineConfig } from 'vite'
|
|
5
|
+
import react from '@vitejs/plugin-react-swc'
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
// https://vite.dev/config/
|
|
10
|
+
export default defineConfig({
|
|
11
|
+
plugins: [react(), tailwindcss()],
|
|
12
|
+
resolve: {
|
|
13
|
+
alias: {
|
|
14
|
+
"@": path.resolve(__dirname, "./src"),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
})
|
package/dist/index-DlfV3JTY.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { j as p } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
function d(n, t) {
|
|
4
|
-
if (typeof n == "function")
|
|
5
|
-
return n(t);
|
|
6
|
-
n != null && (n.current = t);
|
|
7
|
-
}
|
|
8
|
-
function m(...n) {
|
|
9
|
-
return (t) => {
|
|
10
|
-
let r = !1;
|
|
11
|
-
const o = n.map((e) => {
|
|
12
|
-
const l = d(e, t);
|
|
13
|
-
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
-
});
|
|
15
|
-
if (r)
|
|
16
|
-
return () => {
|
|
17
|
-
for (let e = 0; e < o.length; e++) {
|
|
18
|
-
const l = o[e];
|
|
19
|
-
typeof l == "function" ? l() : d(n[e], null);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
// @__NO_SIDE_EFFECTS__
|
|
25
|
-
function S(n) {
|
|
26
|
-
const t = /* @__PURE__ */ g(n), r = i.forwardRef((o, e) => {
|
|
27
|
-
const { children: l, ...c } = o, s = i.Children.toArray(l), a = s.find(C);
|
|
28
|
-
if (a) {
|
|
29
|
-
const u = a.props.children, y = s.map((f) => f === a ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : f);
|
|
30
|
-
return /* @__PURE__ */ p.jsx(t, { ...c, ref: e, children: i.isValidElement(u) ? i.cloneElement(u, void 0, y) : null });
|
|
31
|
-
}
|
|
32
|
-
return /* @__PURE__ */ p.jsx(t, { ...c, ref: e, children: l });
|
|
33
|
-
});
|
|
34
|
-
return r.displayName = `${n}.Slot`, r;
|
|
35
|
-
}
|
|
36
|
-
var j = /* @__PURE__ */ S("Slot");
|
|
37
|
-
// @__NO_SIDE_EFFECTS__
|
|
38
|
-
function g(n) {
|
|
39
|
-
const t = i.forwardRef((r, o) => {
|
|
40
|
-
const { children: e, ...l } = r;
|
|
41
|
-
if (i.isValidElement(e)) {
|
|
42
|
-
const c = h(e), s = R(l, e.props);
|
|
43
|
-
return e.type !== i.Fragment && (s.ref = o ? m(o, c) : c), i.cloneElement(e, s);
|
|
44
|
-
}
|
|
45
|
-
return i.Children.count(e) > 1 ? i.Children.only(null) : null;
|
|
46
|
-
});
|
|
47
|
-
return t.displayName = `${n}.SlotClone`, t;
|
|
48
|
-
}
|
|
49
|
-
var E = Symbol("radix.slottable");
|
|
50
|
-
function C(n) {
|
|
51
|
-
return i.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === E;
|
|
52
|
-
}
|
|
53
|
-
function R(n, t) {
|
|
54
|
-
const r = { ...t };
|
|
55
|
-
for (const o in t) {
|
|
56
|
-
const e = n[o], l = t[o];
|
|
57
|
-
/^on[A-Z]/.test(o) ? e && l ? r[o] = (...s) => {
|
|
58
|
-
const a = l(...s);
|
|
59
|
-
return e(...s), a;
|
|
60
|
-
} : e && (r[o] = e) : o === "style" ? r[o] = { ...e, ...l } : o === "className" && (r[o] = [e, l].filter(Boolean).join(" "));
|
|
61
|
-
}
|
|
62
|
-
return { ...n, ...r };
|
|
63
|
-
}
|
|
64
|
-
function h(n) {
|
|
65
|
-
let t = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
66
|
-
return r ? n.ref : (t = Object.getOwnPropertyDescriptor(n, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
j as S
|
|
70
|
-
};
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import K from "react";
|
|
2
|
-
var v = { exports: {} }, m = {};
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var I;
|
|
13
|
-
function ee() {
|
|
14
|
-
if (I) return m;
|
|
15
|
-
I = 1;
|
|
16
|
-
var l = Symbol.for("react.transitional.element"), E = Symbol.for("react.fragment");
|
|
17
|
-
function c(i, o, s) {
|
|
18
|
-
var f = null;
|
|
19
|
-
if (s !== void 0 && (f = "" + s), o.key !== void 0 && (f = "" + o.key), "key" in o) {
|
|
20
|
-
s = {};
|
|
21
|
-
for (var d in o)
|
|
22
|
-
d !== "key" && (s[d] = o[d]);
|
|
23
|
-
} else s = o;
|
|
24
|
-
return o = s.ref, {
|
|
25
|
-
$$typeof: l,
|
|
26
|
-
type: i,
|
|
27
|
-
key: f,
|
|
28
|
-
ref: o !== void 0 ? o : null,
|
|
29
|
-
props: s
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return m.Fragment = E, m.jsx = c, m.jsxs = c, m;
|
|
33
|
-
}
|
|
34
|
-
var _ = {};
|
|
35
|
-
/**
|
|
36
|
-
* @license React
|
|
37
|
-
* react-jsx-runtime.development.js
|
|
38
|
-
*
|
|
39
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the MIT license found in the
|
|
42
|
-
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
var $;
|
|
45
|
-
function re() {
|
|
46
|
-
return $ || ($ = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
-
function l(e) {
|
|
48
|
-
if (e == null) return null;
|
|
49
|
-
if (typeof e == "function")
|
|
50
|
-
return e.$$typeof === H ? null : e.displayName || e.name || null;
|
|
51
|
-
if (typeof e == "string") return e;
|
|
52
|
-
switch (e) {
|
|
53
|
-
case p:
|
|
54
|
-
return "Fragment";
|
|
55
|
-
case U:
|
|
56
|
-
return "Profiler";
|
|
57
|
-
case W:
|
|
58
|
-
return "StrictMode";
|
|
59
|
-
case z:
|
|
60
|
-
return "Suspense";
|
|
61
|
-
case G:
|
|
62
|
-
return "SuspenseList";
|
|
63
|
-
case B:
|
|
64
|
-
return "Activity";
|
|
65
|
-
}
|
|
66
|
-
if (typeof e == "object")
|
|
67
|
-
switch (typeof e.tag == "number" && console.error(
|
|
68
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
), e.$$typeof) {
|
|
70
|
-
case M:
|
|
71
|
-
return "Portal";
|
|
72
|
-
case V:
|
|
73
|
-
return e.displayName || "Context";
|
|
74
|
-
case J:
|
|
75
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
-
case q:
|
|
77
|
-
var r = e.render;
|
|
78
|
-
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
-
case X:
|
|
80
|
-
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
81
|
-
case T:
|
|
82
|
-
r = e._payload, e = e._init;
|
|
83
|
-
try {
|
|
84
|
-
return l(e(r));
|
|
85
|
-
} catch {
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
function E(e) {
|
|
91
|
-
return "" + e;
|
|
92
|
-
}
|
|
93
|
-
function c(e) {
|
|
94
|
-
try {
|
|
95
|
-
E(e);
|
|
96
|
-
var r = !1;
|
|
97
|
-
} catch {
|
|
98
|
-
r = !0;
|
|
99
|
-
}
|
|
100
|
-
if (r) {
|
|
101
|
-
r = console;
|
|
102
|
-
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
-
return t.call(
|
|
104
|
-
r,
|
|
105
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
n
|
|
107
|
-
), E(e);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function i(e) {
|
|
111
|
-
if (e === p) return "<>";
|
|
112
|
-
if (typeof e == "object" && e !== null && e.$$typeof === T)
|
|
113
|
-
return "<...>";
|
|
114
|
-
try {
|
|
115
|
-
var r = l(e);
|
|
116
|
-
return r ? "<" + r + ">" : "<...>";
|
|
117
|
-
} catch {
|
|
118
|
-
return "<...>";
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function o() {
|
|
122
|
-
var e = k.A;
|
|
123
|
-
return e === null ? null : e.getOwner();
|
|
124
|
-
}
|
|
125
|
-
function s() {
|
|
126
|
-
return Error("react-stack-top-frame");
|
|
127
|
-
}
|
|
128
|
-
function f(e) {
|
|
129
|
-
if (x.call(e, "key")) {
|
|
130
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
-
if (r && r.isReactWarning) return !1;
|
|
132
|
-
}
|
|
133
|
-
return e.key !== void 0;
|
|
134
|
-
}
|
|
135
|
-
function d(e, r) {
|
|
136
|
-
function t() {
|
|
137
|
-
g || (g = !0, console.error(
|
|
138
|
-
"%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)",
|
|
139
|
-
r
|
|
140
|
-
));
|
|
141
|
-
}
|
|
142
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
-
get: t,
|
|
144
|
-
configurable: !0
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function D() {
|
|
148
|
-
var e = l(this.type);
|
|
149
|
-
return h[e] || (h[e] = !0, console.error(
|
|
150
|
-
"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."
|
|
151
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
|
-
}
|
|
153
|
-
function L(e, r, t, n, b, A) {
|
|
154
|
-
var a = t.ref;
|
|
155
|
-
return e = {
|
|
156
|
-
$$typeof: j,
|
|
157
|
-
type: e,
|
|
158
|
-
key: r,
|
|
159
|
-
props: t,
|
|
160
|
-
_owner: n
|
|
161
|
-
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
|
-
enumerable: !1,
|
|
163
|
-
get: D
|
|
164
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
165
|
-
configurable: !1,
|
|
166
|
-
enumerable: !1,
|
|
167
|
-
writable: !0,
|
|
168
|
-
value: 0
|
|
169
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
170
|
-
configurable: !1,
|
|
171
|
-
enumerable: !1,
|
|
172
|
-
writable: !0,
|
|
173
|
-
value: null
|
|
174
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
175
|
-
configurable: !1,
|
|
176
|
-
enumerable: !1,
|
|
177
|
-
writable: !0,
|
|
178
|
-
value: b
|
|
179
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
180
|
-
configurable: !1,
|
|
181
|
-
enumerable: !1,
|
|
182
|
-
writable: !0,
|
|
183
|
-
value: A
|
|
184
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
|
-
}
|
|
186
|
-
function P(e, r, t, n, b, A) {
|
|
187
|
-
var a = r.children;
|
|
188
|
-
if (a !== void 0)
|
|
189
|
-
if (n)
|
|
190
|
-
if (Z(a)) {
|
|
191
|
-
for (n = 0; n < a.length; n++)
|
|
192
|
-
w(a[n]);
|
|
193
|
-
Object.freeze && Object.freeze(a);
|
|
194
|
-
} else
|
|
195
|
-
console.error(
|
|
196
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
|
-
);
|
|
198
|
-
else w(a);
|
|
199
|
-
if (x.call(r, "key")) {
|
|
200
|
-
a = l(e);
|
|
201
|
-
var u = Object.keys(r).filter(function(Q) {
|
|
202
|
-
return Q !== "key";
|
|
203
|
-
});
|
|
204
|
-
n = 0 < u.length ? "{key: someKey, " + u.join(": ..., ") + ": ...}" : "{key: someKey}", Y[a + n] || (u = 0 < u.length ? "{" + u.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
206
|
-
let props = %s;
|
|
207
|
-
<%s {...props} />
|
|
208
|
-
React keys must be passed directly to JSX without using spread:
|
|
209
|
-
let props = %s;
|
|
210
|
-
<%s key={someKey} {...props} />`,
|
|
211
|
-
n,
|
|
212
|
-
a,
|
|
213
|
-
u,
|
|
214
|
-
a
|
|
215
|
-
), Y[a + n] = !0);
|
|
216
|
-
}
|
|
217
|
-
if (a = null, t !== void 0 && (c(t), a = "" + t), f(r) && (c(r.key), a = "" + r.key), "key" in r) {
|
|
218
|
-
t = {};
|
|
219
|
-
for (var S in r)
|
|
220
|
-
S !== "key" && (t[S] = r[S]);
|
|
221
|
-
} else t = r;
|
|
222
|
-
return a && d(
|
|
223
|
-
t,
|
|
224
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
-
), L(
|
|
226
|
-
e,
|
|
227
|
-
a,
|
|
228
|
-
t,
|
|
229
|
-
o(),
|
|
230
|
-
b,
|
|
231
|
-
A
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
function w(e) {
|
|
235
|
-
y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === T && (e._payload.status === "fulfilled" ? y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
236
|
-
}
|
|
237
|
-
function y(e) {
|
|
238
|
-
return typeof e == "object" && e !== null && e.$$typeof === j;
|
|
239
|
-
}
|
|
240
|
-
var R = K, j = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), V = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), z = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Z = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
241
|
-
return null;
|
|
242
|
-
};
|
|
243
|
-
R = {
|
|
244
|
-
react_stack_bottom_frame: function(e) {
|
|
245
|
-
return e();
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
var g, h = {}, N = R.react_stack_bottom_frame.bind(
|
|
249
|
-
R,
|
|
250
|
-
s
|
|
251
|
-
)(), C = O(i(s)), Y = {};
|
|
252
|
-
_.Fragment = p, _.jsx = function(e, r, t) {
|
|
253
|
-
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
254
|
-
return P(
|
|
255
|
-
e,
|
|
256
|
-
r,
|
|
257
|
-
t,
|
|
258
|
-
!1,
|
|
259
|
-
n ? Error("react-stack-top-frame") : N,
|
|
260
|
-
n ? O(i(e)) : C
|
|
261
|
-
);
|
|
262
|
-
}, _.jsxs = function(e, r, t) {
|
|
263
|
-
var n = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
264
|
-
return P(
|
|
265
|
-
e,
|
|
266
|
-
r,
|
|
267
|
-
t,
|
|
268
|
-
!0,
|
|
269
|
-
n ? Error("react-stack-top-frame") : N,
|
|
270
|
-
n ? O(i(e)) : C
|
|
271
|
-
);
|
|
272
|
-
};
|
|
273
|
-
})()), _;
|
|
274
|
-
}
|
|
275
|
-
var F;
|
|
276
|
-
function te() {
|
|
277
|
-
return F || (F = 1, process.env.NODE_ENV === "production" ? v.exports = ee() : v.exports = re()), v.exports;
|
|
278
|
-
}
|
|
279
|
-
var ae = te();
|
|
280
|
-
export {
|
|
281
|
-
ae as j
|
|
282
|
-
};
|