@mlw-packages/react-components 1.3.1 → 1.3.3
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/index.css +28 -0
- package/dist/index.d.mts +544 -539
- package/dist/index.d.ts +544 -539
- package/dist/index.js +43 -30
- package/dist/index.mjs +42 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ __export(index_exports, {
|
|
|
46
46
|
AvatarFallbackBase: () => AvatarFallbackBase,
|
|
47
47
|
AvatarImageBase: () => AvatarImageBase,
|
|
48
48
|
ButtonBase: () => ButtonBase,
|
|
49
|
+
ButtonGroupBase: () => ButtonGroupBase,
|
|
49
50
|
CalendarBase: () => CalendarBase2,
|
|
50
51
|
CardBase: () => CardBase,
|
|
51
52
|
CardContentBase: () => CardContentBase,
|
|
@@ -220,34 +221,12 @@ var buttonVariantsBase = (0, import_class_variance_authority.cva)(
|
|
|
220
221
|
{
|
|
221
222
|
variants: {
|
|
222
223
|
variant: {
|
|
223
|
-
default:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
bg-destructive text-destructive-foreground shadow-sm
|
|
230
|
-
hover:bg-destructive/90 hover:shadow-md
|
|
231
|
-
`,
|
|
232
|
-
outline: `
|
|
233
|
-
border border-input bg-background shadow-sm
|
|
234
|
-
hover:bg-accent hover:text-accent-foreground hover:shadow-md
|
|
235
|
-
`,
|
|
236
|
-
secondary: `
|
|
237
|
-
<<<<<<< HEAD
|
|
238
|
-
bg-secondary border border-transparent text-secondary-foreground shadow-sm
|
|
239
|
-
=======
|
|
240
|
-
bg-secondary text-secondary-foreground shadow-sm border border-transparent
|
|
241
|
-
>>>>>>> origin/improvements/Home
|
|
242
|
-
hover:opacity-80 hover:shadow-md
|
|
243
|
-
`,
|
|
244
|
-
ghost: `
|
|
245
|
-
hover:bg-accent hover:text-accent-foreground
|
|
246
|
-
`,
|
|
247
|
-
link: `
|
|
248
|
-
text-primary underline-offset-4
|
|
249
|
-
hover:underline
|
|
250
|
-
`
|
|
224
|
+
default: "bg-primary text-primary-foreground shadow hover:opacity-90 hover:shadow-md",
|
|
225
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",
|
|
226
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground hover:shadow-md",
|
|
227
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm border border-transparent hover:opacity-80 hover:shadow-md",
|
|
228
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
229
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
251
230
|
},
|
|
252
231
|
size: {
|
|
253
232
|
default: "h-9 px-4 py-1.5",
|
|
@@ -276,6 +255,38 @@ var ButtonBase = React.forwardRef(
|
|
|
276
255
|
}
|
|
277
256
|
);
|
|
278
257
|
ButtonBase.displayName = "Button";
|
|
258
|
+
var ButtonGroupBase = React.forwardRef(
|
|
259
|
+
({ className, children, orientation = "horizontal", ...props }, ref) => {
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
261
|
+
"div",
|
|
262
|
+
{
|
|
263
|
+
ref,
|
|
264
|
+
className: cn(
|
|
265
|
+
"inline-flex",
|
|
266
|
+
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
267
|
+
"rounded-md overflow-hidden shadow-sm isolate",
|
|
268
|
+
className
|
|
269
|
+
),
|
|
270
|
+
...props,
|
|
271
|
+
children: React.Children.map(children, (child, index) => {
|
|
272
|
+
if (!React.isValidElement(child)) return child;
|
|
273
|
+
const typedChild = child;
|
|
274
|
+
return React.cloneElement(typedChild, {
|
|
275
|
+
className: cn(
|
|
276
|
+
typedChild.props.className,
|
|
277
|
+
"rounded-none border-0",
|
|
278
|
+
index === 0 && orientation === "horizontal" && "rounded-l-md",
|
|
279
|
+
index === 0 && orientation === "vertical" && "rounded-t-md",
|
|
280
|
+
index === React.Children.count(children) - 1 && orientation === "horizontal" && "rounded-r-md",
|
|
281
|
+
index === React.Children.count(children) - 1 && orientation === "vertical" && "rounded-b-md"
|
|
282
|
+
)
|
|
283
|
+
});
|
|
284
|
+
})
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
ButtonGroupBase.displayName = "ButtonGroup";
|
|
279
290
|
|
|
280
291
|
// src/components/ui/AlertDialogBase.tsx
|
|
281
292
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -619,8 +630,9 @@ var InputBase = React6.forwardRef(
|
|
|
619
630
|
"div",
|
|
620
631
|
{
|
|
621
632
|
className: cn(
|
|
622
|
-
"flex items-center
|
|
623
|
-
type
|
|
633
|
+
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
634
|
+
type !== "number" && type !== "file" && "border border-input",
|
|
635
|
+
(type === "file" || type === "number") && "border-none"
|
|
624
636
|
),
|
|
625
637
|
children: [
|
|
626
638
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -3332,6 +3344,7 @@ function buildFilterSummary(filter, availableFilters) {
|
|
|
3332
3344
|
AvatarFallbackBase,
|
|
3333
3345
|
AvatarImageBase,
|
|
3334
3346
|
ButtonBase,
|
|
3347
|
+
ButtonGroupBase,
|
|
3335
3348
|
CalendarBase,
|
|
3336
3349
|
CardBase,
|
|
3337
3350
|
CardContentBase,
|
package/dist/index.mjs
CHANGED
|
@@ -29,34 +29,12 @@ var buttonVariantsBase = cva(
|
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
31
31
|
variant: {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
bg-destructive text-destructive-foreground shadow-sm
|
|
39
|
-
hover:bg-destructive/90 hover:shadow-md
|
|
40
|
-
`,
|
|
41
|
-
outline: `
|
|
42
|
-
border border-input bg-background shadow-sm
|
|
43
|
-
hover:bg-accent hover:text-accent-foreground hover:shadow-md
|
|
44
|
-
`,
|
|
45
|
-
secondary: `
|
|
46
|
-
<<<<<<< HEAD
|
|
47
|
-
bg-secondary border border-transparent text-secondary-foreground shadow-sm
|
|
48
|
-
=======
|
|
49
|
-
bg-secondary text-secondary-foreground shadow-sm border border-transparent
|
|
50
|
-
>>>>>>> origin/improvements/Home
|
|
51
|
-
hover:opacity-80 hover:shadow-md
|
|
52
|
-
`,
|
|
53
|
-
ghost: `
|
|
54
|
-
hover:bg-accent hover:text-accent-foreground
|
|
55
|
-
`,
|
|
56
|
-
link: `
|
|
57
|
-
text-primary underline-offset-4
|
|
58
|
-
hover:underline
|
|
59
|
-
`
|
|
32
|
+
default: "bg-primary text-primary-foreground shadow hover:opacity-90 hover:shadow-md",
|
|
33
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",
|
|
34
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground hover:shadow-md",
|
|
35
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm border border-transparent hover:opacity-80 hover:shadow-md",
|
|
36
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
37
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
60
38
|
},
|
|
61
39
|
size: {
|
|
62
40
|
default: "h-9 px-4 py-1.5",
|
|
@@ -85,6 +63,38 @@ var ButtonBase = React.forwardRef(
|
|
|
85
63
|
}
|
|
86
64
|
);
|
|
87
65
|
ButtonBase.displayName = "Button";
|
|
66
|
+
var ButtonGroupBase = React.forwardRef(
|
|
67
|
+
({ className, children, orientation = "horizontal", ...props }, ref) => {
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
ref,
|
|
72
|
+
className: cn(
|
|
73
|
+
"inline-flex",
|
|
74
|
+
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
75
|
+
"rounded-md overflow-hidden shadow-sm isolate",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props,
|
|
79
|
+
children: React.Children.map(children, (child, index) => {
|
|
80
|
+
if (!React.isValidElement(child)) return child;
|
|
81
|
+
const typedChild = child;
|
|
82
|
+
return React.cloneElement(typedChild, {
|
|
83
|
+
className: cn(
|
|
84
|
+
typedChild.props.className,
|
|
85
|
+
"rounded-none border-0",
|
|
86
|
+
index === 0 && orientation === "horizontal" && "rounded-l-md",
|
|
87
|
+
index === 0 && orientation === "vertical" && "rounded-t-md",
|
|
88
|
+
index === React.Children.count(children) - 1 && orientation === "horizontal" && "rounded-r-md",
|
|
89
|
+
index === React.Children.count(children) - 1 && orientation === "vertical" && "rounded-b-md"
|
|
90
|
+
)
|
|
91
|
+
});
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
ButtonGroupBase.displayName = "ButtonGroup";
|
|
88
98
|
|
|
89
99
|
// src/components/ui/AlertDialogBase.tsx
|
|
90
100
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
@@ -428,8 +438,9 @@ var InputBase = React6.forwardRef(
|
|
|
428
438
|
"div",
|
|
429
439
|
{
|
|
430
440
|
className: cn(
|
|
431
|
-
"flex items-center
|
|
432
|
-
type
|
|
441
|
+
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-white dark:bg-[hsl(231,15%,19%)] overflow-hidden",
|
|
442
|
+
type !== "number" && type !== "file" && "border border-input",
|
|
443
|
+
(type === "file" || type === "number") && "border-none"
|
|
433
444
|
),
|
|
434
445
|
children: [
|
|
435
446
|
leftIcon && /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -3144,6 +3155,7 @@ export {
|
|
|
3144
3155
|
AvatarFallbackBase,
|
|
3145
3156
|
AvatarImageBase,
|
|
3146
3157
|
ButtonBase,
|
|
3158
|
+
ButtonGroupBase,
|
|
3147
3159
|
CalendarBase2 as CalendarBase,
|
|
3148
3160
|
CardBase,
|
|
3149
3161
|
CardContentBase,
|