shubham-ui-library 1.0.2 → 1.0.4
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/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.types.d.ts +5 -0
- package/dist/components/Button/buttonVariants.d.ts +4 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.types.d.ts +5 -0
- package/dist/components/Input/inputVariants.d.ts +4 -0
- package/dist/components/Notification/Notification.d.ts +2 -0
- package/dist/components/Notification/Notification.types.d.ts +5 -0
- package/dist/components/Notification/notificationVariants.d.ts +3 -0
- package/dist/components/index.d.ts +3 -3
- package/dist/index.cjs.js +79 -463
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +79 -463
- package/dist/index.esm.js.map +1 -0
- package/dist/utils/cn.d.ts +1 -0
- package/package.json +28 -16
- package/babel.config.js +0 -3
- package/dist/components/Button.d.ts +0 -5
- package/dist/components/Input.d.ts +0 -4
- package/dist/components/Notification.d.ts +0 -7
- package/rollup.config.js +0 -23
- package/src/components/Button.tsx +0 -12
- package/src/components/Input.tsx +0 -9
- package/src/components/Notification.tsx +0 -39
- package/src/components/index.ts +0 -3
- package/src/index.js +0 -1
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -14
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { inputVariants } from "./inputVariants";
|
|
4
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { notificationVariants } from "./notificationVariants";
|
|
4
|
+
export interface NotificationProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof notificationVariants> {
|
|
5
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { Button } from "./Button/Button";
|
|
2
|
+
export { Input } from "./Input/Input";
|
|
3
|
+
export { Notification } from "./Notification/Notification";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,434 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var reactJsxRuntime_production = {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.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
|
-
*/
|
|
18
|
-
|
|
19
|
-
var hasRequiredReactJsxRuntime_production;
|
|
20
|
-
|
|
21
|
-
function requireReactJsxRuntime_production () {
|
|
22
|
-
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
23
|
-
hasRequiredReactJsxRuntime_production = 1;
|
|
24
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
25
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
26
|
-
function jsxProd(type, config, maybeKey) {
|
|
27
|
-
var key = null;
|
|
28
|
-
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
29
|
-
void 0 !== config.key && (key = "" + config.key);
|
|
30
|
-
if ("key" in config) {
|
|
31
|
-
maybeKey = {};
|
|
32
|
-
for (var propName in config)
|
|
33
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
34
|
-
} else maybeKey = config;
|
|
35
|
-
config = maybeKey.ref;
|
|
36
|
-
return {
|
|
37
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
38
|
-
type: type,
|
|
39
|
-
key: key,
|
|
40
|
-
ref: void 0 !== config ? config : null,
|
|
41
|
-
props: maybeKey
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
45
|
-
reactJsxRuntime_production.jsx = jsxProd;
|
|
46
|
-
reactJsxRuntime_production.jsxs = jsxProd;
|
|
47
|
-
return reactJsxRuntime_production;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var reactJsxRuntime_development = {};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @license React
|
|
54
|
-
* react-jsx-runtime.development.js
|
|
55
|
-
*
|
|
56
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the MIT license found in the
|
|
59
|
-
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
var hasRequiredReactJsxRuntime_development;
|
|
63
|
-
|
|
64
|
-
function requireReactJsxRuntime_development () {
|
|
65
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
66
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
67
|
-
"production" !== process.env.NODE_ENV &&
|
|
68
|
-
(function () {
|
|
69
|
-
function getComponentNameFromType(type) {
|
|
70
|
-
if (null == type) return null;
|
|
71
|
-
if ("function" === typeof type)
|
|
72
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
73
|
-
? null
|
|
74
|
-
: type.displayName || type.name || null;
|
|
75
|
-
if ("string" === typeof type) return type;
|
|
76
|
-
switch (type) {
|
|
77
|
-
case REACT_FRAGMENT_TYPE:
|
|
78
|
-
return "Fragment";
|
|
79
|
-
case REACT_PROFILER_TYPE:
|
|
80
|
-
return "Profiler";
|
|
81
|
-
case REACT_STRICT_MODE_TYPE:
|
|
82
|
-
return "StrictMode";
|
|
83
|
-
case REACT_SUSPENSE_TYPE:
|
|
84
|
-
return "Suspense";
|
|
85
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
86
|
-
return "SuspenseList";
|
|
87
|
-
case REACT_ACTIVITY_TYPE:
|
|
88
|
-
return "Activity";
|
|
89
|
-
}
|
|
90
|
-
if ("object" === typeof type)
|
|
91
|
-
switch (
|
|
92
|
-
("number" === typeof type.tag &&
|
|
93
|
-
console.error(
|
|
94
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
95
|
-
),
|
|
96
|
-
type.$$typeof)
|
|
97
|
-
) {
|
|
98
|
-
case REACT_PORTAL_TYPE:
|
|
99
|
-
return "Portal";
|
|
100
|
-
case REACT_CONTEXT_TYPE:
|
|
101
|
-
return type.displayName || "Context";
|
|
102
|
-
case REACT_CONSUMER_TYPE:
|
|
103
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
104
|
-
case REACT_FORWARD_REF_TYPE:
|
|
105
|
-
var innerType = type.render;
|
|
106
|
-
type = type.displayName;
|
|
107
|
-
type ||
|
|
108
|
-
((type = innerType.displayName || innerType.name || ""),
|
|
109
|
-
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
110
|
-
return type;
|
|
111
|
-
case REACT_MEMO_TYPE:
|
|
112
|
-
return (
|
|
113
|
-
(innerType = type.displayName || null),
|
|
114
|
-
null !== innerType
|
|
115
|
-
? innerType
|
|
116
|
-
: getComponentNameFromType(type.type) || "Memo"
|
|
117
|
-
);
|
|
118
|
-
case REACT_LAZY_TYPE:
|
|
119
|
-
innerType = type._payload;
|
|
120
|
-
type = type._init;
|
|
121
|
-
try {
|
|
122
|
-
return getComponentNameFromType(type(innerType));
|
|
123
|
-
} catch (x) {}
|
|
124
|
-
}
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
function testStringCoercion(value) {
|
|
128
|
-
return "" + value;
|
|
129
|
-
}
|
|
130
|
-
function checkKeyStringCoercion(value) {
|
|
131
|
-
try {
|
|
132
|
-
testStringCoercion(value);
|
|
133
|
-
var JSCompiler_inline_result = !1;
|
|
134
|
-
} catch (e) {
|
|
135
|
-
JSCompiler_inline_result = true;
|
|
136
|
-
}
|
|
137
|
-
if (JSCompiler_inline_result) {
|
|
138
|
-
JSCompiler_inline_result = console;
|
|
139
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
140
|
-
var JSCompiler_inline_result$jscomp$0 =
|
|
141
|
-
("function" === typeof Symbol &&
|
|
142
|
-
Symbol.toStringTag &&
|
|
143
|
-
value[Symbol.toStringTag]) ||
|
|
144
|
-
value.constructor.name ||
|
|
145
|
-
"Object";
|
|
146
|
-
JSCompiler_temp_const.call(
|
|
147
|
-
JSCompiler_inline_result,
|
|
148
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
149
|
-
JSCompiler_inline_result$jscomp$0
|
|
150
|
-
);
|
|
151
|
-
return testStringCoercion(value);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function getTaskName(type) {
|
|
155
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
156
|
-
if (
|
|
157
|
-
"object" === typeof type &&
|
|
158
|
-
null !== type &&
|
|
159
|
-
type.$$typeof === REACT_LAZY_TYPE
|
|
160
|
-
)
|
|
161
|
-
return "<...>";
|
|
162
|
-
try {
|
|
163
|
-
var name = getComponentNameFromType(type);
|
|
164
|
-
return name ? "<" + name + ">" : "<...>";
|
|
165
|
-
} catch (x) {
|
|
166
|
-
return "<...>";
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function getOwner() {
|
|
170
|
-
var dispatcher = ReactSharedInternals.A;
|
|
171
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
172
|
-
}
|
|
173
|
-
function UnknownOwner() {
|
|
174
|
-
return Error("react-stack-top-frame");
|
|
175
|
-
}
|
|
176
|
-
function hasValidKey(config) {
|
|
177
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
178
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
179
|
-
if (getter && getter.isReactWarning) return false;
|
|
180
|
-
}
|
|
181
|
-
return void 0 !== config.key;
|
|
182
|
-
}
|
|
183
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
184
|
-
function warnAboutAccessingKey() {
|
|
185
|
-
specialPropKeyWarningShown ||
|
|
186
|
-
((specialPropKeyWarningShown = true),
|
|
187
|
-
console.error(
|
|
188
|
-
"%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)",
|
|
189
|
-
displayName
|
|
190
|
-
));
|
|
191
|
-
}
|
|
192
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
193
|
-
Object.defineProperty(props, "key", {
|
|
194
|
-
get: warnAboutAccessingKey,
|
|
195
|
-
configurable: true
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
199
|
-
var componentName = getComponentNameFromType(this.type);
|
|
200
|
-
didWarnAboutElementRef[componentName] ||
|
|
201
|
-
((didWarnAboutElementRef[componentName] = true),
|
|
202
|
-
console.error(
|
|
203
|
-
"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."
|
|
204
|
-
));
|
|
205
|
-
componentName = this.props.ref;
|
|
206
|
-
return void 0 !== componentName ? componentName : null;
|
|
207
|
-
}
|
|
208
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
209
|
-
var refProp = props.ref;
|
|
210
|
-
type = {
|
|
211
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
212
|
-
type: type,
|
|
213
|
-
key: key,
|
|
214
|
-
props: props,
|
|
215
|
-
_owner: owner
|
|
216
|
-
};
|
|
217
|
-
null !== (void 0 !== refProp ? refProp : null)
|
|
218
|
-
? Object.defineProperty(type, "ref", {
|
|
219
|
-
enumerable: false,
|
|
220
|
-
get: elementRefGetterWithDeprecationWarning
|
|
221
|
-
})
|
|
222
|
-
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
223
|
-
type._store = {};
|
|
224
|
-
Object.defineProperty(type._store, "validated", {
|
|
225
|
-
configurable: false,
|
|
226
|
-
enumerable: false,
|
|
227
|
-
writable: true,
|
|
228
|
-
value: 0
|
|
229
|
-
});
|
|
230
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
231
|
-
configurable: false,
|
|
232
|
-
enumerable: false,
|
|
233
|
-
writable: true,
|
|
234
|
-
value: null
|
|
235
|
-
});
|
|
236
|
-
Object.defineProperty(type, "_debugStack", {
|
|
237
|
-
configurable: false,
|
|
238
|
-
enumerable: false,
|
|
239
|
-
writable: true,
|
|
240
|
-
value: debugStack
|
|
241
|
-
});
|
|
242
|
-
Object.defineProperty(type, "_debugTask", {
|
|
243
|
-
configurable: false,
|
|
244
|
-
enumerable: false,
|
|
245
|
-
writable: true,
|
|
246
|
-
value: debugTask
|
|
247
|
-
});
|
|
248
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
249
|
-
return type;
|
|
250
|
-
}
|
|
251
|
-
function jsxDEVImpl(
|
|
252
|
-
type,
|
|
253
|
-
config,
|
|
254
|
-
maybeKey,
|
|
255
|
-
isStaticChildren,
|
|
256
|
-
debugStack,
|
|
257
|
-
debugTask
|
|
258
|
-
) {
|
|
259
|
-
var children = config.children;
|
|
260
|
-
if (void 0 !== children)
|
|
261
|
-
if (isStaticChildren)
|
|
262
|
-
if (isArrayImpl(children)) {
|
|
263
|
-
for (
|
|
264
|
-
isStaticChildren = 0;
|
|
265
|
-
isStaticChildren < children.length;
|
|
266
|
-
isStaticChildren++
|
|
267
|
-
)
|
|
268
|
-
validateChildKeys(children[isStaticChildren]);
|
|
269
|
-
Object.freeze && Object.freeze(children);
|
|
270
|
-
} else
|
|
271
|
-
console.error(
|
|
272
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
273
|
-
);
|
|
274
|
-
else validateChildKeys(children);
|
|
275
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
276
|
-
children = getComponentNameFromType(type);
|
|
277
|
-
var keys = Object.keys(config).filter(function (k) {
|
|
278
|
-
return "key" !== k;
|
|
279
|
-
});
|
|
280
|
-
isStaticChildren =
|
|
281
|
-
0 < keys.length
|
|
282
|
-
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
283
|
-
: "{key: someKey}";
|
|
284
|
-
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
285
|
-
((keys =
|
|
286
|
-
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
287
|
-
console.error(
|
|
288
|
-
'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} />',
|
|
289
|
-
isStaticChildren,
|
|
290
|
-
children,
|
|
291
|
-
keys,
|
|
292
|
-
children
|
|
293
|
-
),
|
|
294
|
-
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
295
|
-
}
|
|
296
|
-
children = null;
|
|
297
|
-
void 0 !== maybeKey &&
|
|
298
|
-
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
299
|
-
hasValidKey(config) &&
|
|
300
|
-
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
301
|
-
if ("key" in config) {
|
|
302
|
-
maybeKey = {};
|
|
303
|
-
for (var propName in config)
|
|
304
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
305
|
-
} else maybeKey = config;
|
|
306
|
-
children &&
|
|
307
|
-
defineKeyPropWarningGetter(
|
|
308
|
-
maybeKey,
|
|
309
|
-
"function" === typeof type
|
|
310
|
-
? type.displayName || type.name || "Unknown"
|
|
311
|
-
: type
|
|
312
|
-
);
|
|
313
|
-
return ReactElement(
|
|
314
|
-
type,
|
|
315
|
-
children,
|
|
316
|
-
maybeKey,
|
|
317
|
-
getOwner(),
|
|
318
|
-
debugStack,
|
|
319
|
-
debugTask
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
function validateChildKeys(node) {
|
|
323
|
-
isValidElement(node)
|
|
324
|
-
? node._store && (node._store.validated = 1)
|
|
325
|
-
: "object" === typeof node &&
|
|
326
|
-
null !== node &&
|
|
327
|
-
node.$$typeof === REACT_LAZY_TYPE &&
|
|
328
|
-
("fulfilled" === node._payload.status
|
|
329
|
-
? isValidElement(node._payload.value) &&
|
|
330
|
-
node._payload.value._store &&
|
|
331
|
-
(node._payload.value._store.validated = 1)
|
|
332
|
-
: node._store && (node._store.validated = 1));
|
|
333
|
-
}
|
|
334
|
-
function isValidElement(object) {
|
|
335
|
-
return (
|
|
336
|
-
"object" === typeof object &&
|
|
337
|
-
null !== object &&
|
|
338
|
-
object.$$typeof === REACT_ELEMENT_TYPE
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
var React = require$$0,
|
|
342
|
-
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
343
|
-
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
344
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
345
|
-
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
346
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
347
|
-
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
348
|
-
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
349
|
-
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
350
|
-
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
351
|
-
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
352
|
-
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
353
|
-
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
354
|
-
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
355
|
-
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
356
|
-
ReactSharedInternals =
|
|
357
|
-
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
358
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
359
|
-
isArrayImpl = Array.isArray,
|
|
360
|
-
createTask = console.createTask
|
|
361
|
-
? console.createTask
|
|
362
|
-
: function () {
|
|
363
|
-
return null;
|
|
364
|
-
};
|
|
365
|
-
React = {
|
|
366
|
-
react_stack_bottom_frame: function (callStackForError) {
|
|
367
|
-
return callStackForError();
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
var specialPropKeyWarningShown;
|
|
371
|
-
var didWarnAboutElementRef = {};
|
|
372
|
-
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
373
|
-
React,
|
|
374
|
-
UnknownOwner
|
|
375
|
-
)();
|
|
376
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
377
|
-
var didWarnAboutKeySpread = {};
|
|
378
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
379
|
-
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
380
|
-
var trackActualOwner =
|
|
381
|
-
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
382
|
-
return jsxDEVImpl(
|
|
383
|
-
type,
|
|
384
|
-
config,
|
|
385
|
-
maybeKey,
|
|
386
|
-
false,
|
|
387
|
-
trackActualOwner
|
|
388
|
-
? Error("react-stack-top-frame")
|
|
389
|
-
: unknownOwnerDebugStack,
|
|
390
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
391
|
-
);
|
|
392
|
-
};
|
|
393
|
-
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
394
|
-
var trackActualOwner =
|
|
395
|
-
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
396
|
-
return jsxDEVImpl(
|
|
397
|
-
type,
|
|
398
|
-
config,
|
|
399
|
-
maybeKey,
|
|
400
|
-
true,
|
|
401
|
-
trackActualOwner
|
|
402
|
-
? Error("react-stack-top-frame")
|
|
403
|
-
: unknownOwnerDebugStack,
|
|
404
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
405
|
-
);
|
|
406
|
-
};
|
|
407
|
-
})();
|
|
408
|
-
return reactJsxRuntime_development;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
var hasRequiredJsxRuntime;
|
|
412
|
-
|
|
413
|
-
function requireJsxRuntime () {
|
|
414
|
-
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
415
|
-
hasRequiredJsxRuntime = 1;
|
|
416
|
-
|
|
417
|
-
if (process.env.NODE_ENV === 'production') {
|
|
418
|
-
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
419
|
-
} else {
|
|
420
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
421
|
-
}
|
|
422
|
-
return jsxRuntime.exports;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
var jsxRuntimeExports = requireJsxRuntime();
|
|
426
|
-
|
|
427
|
-
var Button = function (_a) {
|
|
428
|
-
var text = _a.text;
|
|
429
|
-
console.log("Button component loaded:", text);
|
|
430
|
-
return jsxRuntimeExports.jsx("button", { children: text });
|
|
431
|
-
};
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
432
7
|
|
|
433
8
|
/******************************************************************************
|
|
434
9
|
Copyright (c) Microsoft Corporation.
|
|
@@ -447,54 +22,95 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
447
22
|
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
448
23
|
|
|
449
24
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
25
|
+
function __rest(s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
455
33
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
return __assign.apply(this, arguments);
|
|
459
|
-
};
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
460
36
|
|
|
461
37
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
462
38
|
var e = new Error(message);
|
|
463
39
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
464
40
|
};
|
|
465
41
|
|
|
466
|
-
|
|
467
|
-
|
|
42
|
+
const buttonVariants = classVarianceAuthority.cva("rounded-md font-medium transition-colors focus:outline-none", {
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
primary: "bg-blue-500 text-white hover:bg-blue-600",
|
|
46
|
+
secondary: "bg-gray-500 text-white hover:bg-gray-600",
|
|
47
|
+
outline: "border border-gray-400 hover:bg-gray-100",
|
|
48
|
+
danger: "bg-red-500 text-white hover:bg-red-600",
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
sm: "px-3 py-1 text-sm",
|
|
52
|
+
md: "px-4 py-2",
|
|
53
|
+
lg: "px-6 py-3 text-lg",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
variant: "primary",
|
|
58
|
+
size: "md",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const Button = (_a) => {
|
|
63
|
+
var { variant, size, className } = _a, props = __rest(_a, ["variant", "size", "className"]);
|
|
64
|
+
return (jsxRuntime.jsx("button", Object.assign({ className: tailwindMerge.twMerge(clsx(buttonVariants({ variant, size }), className)) }, props)));
|
|
468
65
|
};
|
|
469
66
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
color: "#155724",
|
|
476
|
-
padding: "10px",
|
|
477
|
-
borderRadius: "5px",
|
|
478
|
-
margin: "5px 0",
|
|
67
|
+
const inputVariants = classVarianceAuthority.cva("rounded-md border focus:outline-none", {
|
|
68
|
+
variants: {
|
|
69
|
+
variant: {
|
|
70
|
+
default: "border-gray-300 focus:ring-2 focus:ring-blue-500",
|
|
71
|
+
error: "border-red-500 focus:ring-2 focus:ring-red-500",
|
|
479
72
|
},
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
borderRadius: "5px",
|
|
485
|
-
margin: "5px 0",
|
|
73
|
+
inputSize: {
|
|
74
|
+
sm: "px-2 py-1 text-sm",
|
|
75
|
+
md: "px-3 py-2",
|
|
76
|
+
lg: "px-4 py-3 text-lg",
|
|
486
77
|
},
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
variant: "default",
|
|
81
|
+
inputSize: "md",
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
function cn(...inputs) {
|
|
86
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const Input = (_a) => {
|
|
90
|
+
var { variant, inputSize, className } = _a, props = __rest(_a, ["variant", "inputSize", "className"]);
|
|
91
|
+
return (jsxRuntime.jsx("input", Object.assign({ className: cn(inputVariants({ variant, inputSize }), className) }, props)));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const notificationVariants = classVarianceAuthority.cva("rounded-md p-4 font-medium", {
|
|
95
|
+
variants: {
|
|
96
|
+
variant: {
|
|
97
|
+
success: "bg-green-100 text-green-700",
|
|
98
|
+
error: "bg-red-100 text-red-700",
|
|
99
|
+
warning: "bg-yellow-100 text-yellow-700",
|
|
100
|
+
info: "bg-blue-100 text-blue-700",
|
|
493
101
|
},
|
|
494
|
-
}
|
|
495
|
-
|
|
102
|
+
},
|
|
103
|
+
defaultVariants: {
|
|
104
|
+
variant: "info",
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const Notification = (_a) => {
|
|
109
|
+
var { variant, className } = _a, props = __rest(_a, ["variant", "className"]);
|
|
110
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: cn(notificationVariants({ variant }), className) }, props)));
|
|
496
111
|
};
|
|
497
112
|
|
|
498
113
|
exports.Button = Button;
|
|
499
114
|
exports.Input = Input;
|
|
500
115
|
exports.Notification = Notification;
|
|
116
|
+
//# sourceMappingURL=index.cjs.js.map
|