@solidxai/core-ui 0.1.9-beta.0 → 0.1.9-beta.2
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/auth/AuthLayout.js +15 -15
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +1 -1
- package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +67 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.tsx +133 -0
- package/dist/components/common/AuthBanner.js.map +1 -1
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts +2 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.d.ts.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js +50 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.js.map +1 -0
- package/dist/components/core/common/LoadDynamicJsxComponent.tsx +70 -0
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +4 -2
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +4 -2
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +4 -1
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +3 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +2 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +2 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.tsx +2 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaMultipleKanbanField.tsx +10 -21
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +2 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +10 -18
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +6 -3
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +24 -30
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/relations/SolidRelationManyToOneKanbanField.tsx +2 -2
- package/dist/components/core/list/SolidListViewConfigure.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js +31 -2
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +34 -2
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.d.ts.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js +7 -6
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.js.map +1 -1
- package/dist/components/core/list/SolidListViewRowButtonContextMenu.tsx +10 -9
- package/dist/components/core/tree/SolidTreeTable.d.ts +1 -1
- package/dist/components/core/tree/SolidTreeTable.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.js +78 -78
- package/dist/components/core/tree/SolidTreeTable.js.map +1 -1
- package/dist/components/core/tree/SolidTreeTable.tsx +1 -10
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +2 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.tsx +22 -27
- package/dist/nextAuth/authProviders.d.ts +4 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -0
- package/dist/nextAuth/authProviders.js +198 -0
- package/dist/nextAuth/authProviders.js.map +1 -0
- package/dist/nextAuth/authProviders.tsx +232 -0
- package/dist/nextAuth/handleLogout.d.ts +2 -0
- package/dist/nextAuth/handleLogout.d.ts.map +1 -0
- package/dist/nextAuth/handleLogout.js +36 -0
- package/dist/nextAuth/handleLogout.js.map +1 -0
- package/dist/nextAuth/handleLogout.tsx +39 -0
- package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
- package/dist/nextAuth/refreshAccessToken.js +24 -0
- package/dist/nextAuth/refreshAccessToken.js.map +1 -0
- package/dist/nextAuth/refreshAccessToken.tsx +28 -0
- package/dist/redux/features/settingsSlice.d.ts +20 -0
- package/dist/redux/features/settingsSlice.d.ts.map +1 -0
- package/dist/redux/features/settingsSlice.js +39 -0
- package/dist/redux/features/settingsSlice.js.map +1 -0
- package/dist/redux/features/settingsSlice.ts +60 -0
- package/dist/resources/globals.css +7 -1
- package/dist/resources/shadcn-base.css +8 -0
- package/dist/routes/pages/studio/StudioLandingPage.d.ts.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.js +35 -7
- package/dist/routes/pages/studio/StudioLandingPage.js.map +1 -1
- package/dist/routes/pages/studio/StudioLandingPage.tsx +42 -6
- package/package.json +1 -1
- package/dist/components/core/list/SolidDataTablePagination.d.ts +0 -15
- package/dist/components/core/list/SolidDataTablePagination.d.ts.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.js +0 -22
- package/dist/components/core/list/SolidDataTablePagination.js.map +0 -1
- package/dist/components/core/list/SolidDataTablePagination.tsx +0 -71
- package/dist/components/solid-ui/SolidButton.d.ts +0 -14
- package/dist/components/solid-ui/SolidButton.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidButton.js +0 -36
- package/dist/components/solid-ui/SolidButton.js.map +0 -1
- package/dist/components/solid-ui/SolidButton.tsx +0 -54
- package/dist/components/solid-ui/SolidTabs.d.ts +0 -18
- package/dist/components/solid-ui/SolidTabs.d.ts.map +0 -1
- package/dist/components/solid-ui/SolidTabs.js +0 -22
- package/dist/components/solid-ui/SolidTabs.js.map +0 -1
- package/dist/components/solid-ui/SolidTabs.tsx +0 -73
- package/dist/components/solid-ui/index.d.ts +0 -3
- package/dist/components/solid-ui/index.d.ts.map +0 -1
- package/dist/components/solid-ui/index.js +0 -3
- package/dist/components/solid-ui/index.js.map +0 -1
- package/dist/components/solid-ui/index.ts +0 -2
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type SolidDataTablePaginationProps = {
|
|
4
|
-
rows: number;
|
|
5
|
-
first: number;
|
|
6
|
-
totalRecords: number;
|
|
7
|
-
rowsPerPageOptions?: number[];
|
|
8
|
-
onPage: (event: { first: number; rows: number }) => void;
|
|
9
|
-
currentPageReportTemplate?: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const cx = (...parts: Array<string | undefined | false>) => parts.filter(Boolean).join(" ");
|
|
14
|
-
|
|
15
|
-
export function SolidDataTablePagination({
|
|
16
|
-
rows,
|
|
17
|
-
first,
|
|
18
|
-
totalRecords,
|
|
19
|
-
rowsPerPageOptions = [10, 25, 50, 100],
|
|
20
|
-
onPage,
|
|
21
|
-
currentPageReportTemplate = "{first} - {last} of {totalRecords}",
|
|
22
|
-
className,
|
|
23
|
-
}: SolidDataTablePaginationProps) {
|
|
24
|
-
const safeRows = rows > 0 ? rows : 25;
|
|
25
|
-
const start = totalRecords === 0 ? 0 : first + 1;
|
|
26
|
-
const end = Math.min(first + safeRows, totalRecords);
|
|
27
|
-
const currentPage = Math.floor(first / safeRows) + 1;
|
|
28
|
-
const totalPages = Math.max(1, Math.ceil(totalRecords / safeRows));
|
|
29
|
-
|
|
30
|
-
const report = currentPageReportTemplate
|
|
31
|
-
.replace("{first}", String(start))
|
|
32
|
-
.replace("{last}", String(end))
|
|
33
|
-
.replace("{totalRecords}", String(totalRecords));
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<div className={cx("w-full solid-table-paginator flex items-center justify-end gap-3 text-sm rounded-md border border-border/60 px-3 py-1.5 bg-background", className)}>
|
|
37
|
-
<div className="solid-paginator-meta flex items-center gap-2 ml-auto">
|
|
38
|
-
<span className="solid-paginator-label">Rows</span>
|
|
39
|
-
<select
|
|
40
|
-
value={safeRows}
|
|
41
|
-
onChange={(e) => onPage({ first: 0, rows: Number(e.target.value) })}
|
|
42
|
-
className="solid-paginator-select"
|
|
43
|
-
>
|
|
44
|
-
{rowsPerPageOptions.map((option) => (
|
|
45
|
-
<option key={option} value={option}>{option}</option>
|
|
46
|
-
))}
|
|
47
|
-
</select>
|
|
48
|
-
<span className="solid-paginator-report">{report}</span>
|
|
49
|
-
</div>
|
|
50
|
-
<div className="solid-paginator-actions flex items-center gap-2">
|
|
51
|
-
<button
|
|
52
|
-
type="button"
|
|
53
|
-
className="solid-paginator-btn"
|
|
54
|
-
onClick={() => onPage({ first: Math.max(0, first - safeRows), rows: safeRows })}
|
|
55
|
-
disabled={currentPage <= 1}
|
|
56
|
-
>
|
|
57
|
-
Previous
|
|
58
|
-
</button>
|
|
59
|
-
<button
|
|
60
|
-
type="button"
|
|
61
|
-
className="solid-paginator-btn"
|
|
62
|
-
onClick={() => onPage({ first: Math.min((totalPages - 1) * safeRows, first + safeRows), rows: safeRows })}
|
|
63
|
-
disabled={currentPage >= totalPages}
|
|
64
|
-
>
|
|
65
|
-
Next
|
|
66
|
-
</button>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type SolidButtonVariant = "primary" | "secondary" | "ghost" | "outline" | "destructive";
|
|
3
|
-
type SolidButtonSize = "sm" | "md" | "lg";
|
|
4
|
-
type SolidButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
-
variant?: SolidButtonVariant;
|
|
6
|
-
size?: SolidButtonSize;
|
|
7
|
-
fullWidth?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
leftIcon?: React.ReactNode;
|
|
10
|
-
rightIcon?: React.ReactNode;
|
|
11
|
-
};
|
|
12
|
-
export declare function SolidButton({ variant, size, fullWidth, loading, leftIcon, rightIcon, className, disabled, children, type, ...props }: SolidButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=SolidButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidButton.d.ts","sourceRoot":"","sources":["../../../src/components/solid-ui/SolidButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AACxF,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,KAAK,gBAAgB,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACtE,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAMF,wBAAgB,WAAW,CAAC,EAC1B,OAAmB,EACnB,IAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,IAAe,EACf,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuBlB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
function cx() {
|
|
25
|
-
var parts = [];
|
|
26
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
27
|
-
parts[_i] = arguments[_i];
|
|
28
|
-
}
|
|
29
|
-
return parts.filter(Boolean).join(" ");
|
|
30
|
-
}
|
|
31
|
-
export function SolidButton(_a) {
|
|
32
|
-
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, fullWidth = _a.fullWidth, loading = _a.loading, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, className = _a.className, disabled = _a.disabled, children = _a.children, _d = _a.type, type = _d === void 0 ? "button" : _d, props = __rest(_a, ["variant", "size", "fullWidth", "loading", "leftIcon", "rightIcon", "className", "disabled", "children", "type"]);
|
|
33
|
-
var isDisabled = disabled || loading;
|
|
34
|
-
return (_jsxs("button", __assign({ type: type, className: cx("solid-btn", "solid-btn--".concat(variant), "solid-btn--".concat(size), fullWidth && "solid-btn--full", loading && "is-loading", className), disabled: isDisabled }, props, { children: [loading && _jsx("span", { className: "solid-btn-spinner", "aria-hidden": "true" }), !loading && leftIcon ? _jsx("span", { className: "solid-btn-icon", children: leftIcon }) : null, _jsx("span", { className: "solid-btn-label", children: children }), !loading && rightIcon ? _jsx("span", { className: "solid-btn-icon", children: rightIcon }) : null] })));
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=SolidButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidButton.js","sourceRoot":"","sources":["../../../src/components/solid-ui/SolidButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAS,EAAE;IAAC,eAA2C;SAA3C,UAA2C,EAA3C,qBAA2C,EAA3C,IAA2C;QAA3C,0BAA2C;;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAYT;IAXjB,IAAA,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,SAAS,eAAA,EACT,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACZ,KAAK,cAXkB,iHAY3B,CADS;IAER,IAAM,UAAU,GAAG,QAAQ,IAAI,OAAO,CAAC;IAEvC,OAAO,CACL,2BACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,WAAW,EACX,qBAAc,OAAO,CAAE,EACvB,qBAAc,IAAI,CAAE,EACpB,SAAS,IAAI,iBAAiB,EAC9B,OAAO,IAAI,YAAY,EACvB,SAAS,CACV,EACD,QAAQ,EAAE,UAAU,IAChB,KAAK,eAER,OAAO,IAAI,eAAM,SAAS,EAAC,mBAAmB,iBAAa,MAAM,GAAG,EACpE,CAAC,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,gBAAgB,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,EACjF,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,EAClD,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAQ,CAAC,CAAC,CAAC,IAAI,KAC5E,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React from \"react\";\n\ntype SolidButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"outline\" | \"destructive\";\ntype SolidButtonSize = \"sm\" | \"md\" | \"lg\";\n\ntype SolidButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n variant?: SolidButtonVariant;\n size?: SolidButtonSize;\n fullWidth?: boolean;\n loading?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n};\n\nfunction cx(...parts: Array<string | false | undefined>) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport function SolidButton({\n variant = \"primary\",\n size = \"md\",\n fullWidth,\n loading,\n leftIcon,\n rightIcon,\n className,\n disabled,\n children,\n type = \"button\",\n ...props\n}: SolidButtonProps) {\n const isDisabled = disabled || loading;\n\n return (\n <button\n type={type}\n className={cx(\n \"solid-btn\",\n `solid-btn--${variant}`,\n `solid-btn--${size}`,\n fullWidth && \"solid-btn--full\",\n loading && \"is-loading\",\n className\n )}\n disabled={isDisabled}\n {...props}\n >\n {loading && <span className=\"solid-btn-spinner\" aria-hidden=\"true\" />}\n {!loading && leftIcon ? <span className=\"solid-btn-icon\">{leftIcon}</span> : null}\n <span className=\"solid-btn-label\">{children}</span>\n {!loading && rightIcon ? <span className=\"solid-btn-icon\">{rightIcon}</span> : null}\n </button>\n );\n}\n"]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type SolidButtonVariant = "primary" | "secondary" | "ghost" | "outline" | "destructive";
|
|
4
|
-
type SolidButtonSize = "sm" | "md" | "lg";
|
|
5
|
-
|
|
6
|
-
type SolidButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
-
variant?: SolidButtonVariant;
|
|
8
|
-
size?: SolidButtonSize;
|
|
9
|
-
fullWidth?: boolean;
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
leftIcon?: React.ReactNode;
|
|
12
|
-
rightIcon?: React.ReactNode;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function cx(...parts: Array<string | false | undefined>) {
|
|
16
|
-
return parts.filter(Boolean).join(" ");
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function SolidButton({
|
|
20
|
-
variant = "primary",
|
|
21
|
-
size = "md",
|
|
22
|
-
fullWidth,
|
|
23
|
-
loading,
|
|
24
|
-
leftIcon,
|
|
25
|
-
rightIcon,
|
|
26
|
-
className,
|
|
27
|
-
disabled,
|
|
28
|
-
children,
|
|
29
|
-
type = "button",
|
|
30
|
-
...props
|
|
31
|
-
}: SolidButtonProps) {
|
|
32
|
-
const isDisabled = disabled || loading;
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<button
|
|
36
|
-
type={type}
|
|
37
|
-
className={cx(
|
|
38
|
-
"solid-btn",
|
|
39
|
-
`solid-btn--${variant}`,
|
|
40
|
-
`solid-btn--${size}`,
|
|
41
|
-
fullWidth && "solid-btn--full",
|
|
42
|
-
loading && "is-loading",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
disabled={isDisabled}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{loading && <span className="solid-btn-spinner" aria-hidden="true" />}
|
|
49
|
-
{!loading && leftIcon ? <span className="solid-btn-icon">{leftIcon}</span> : null}
|
|
50
|
-
<span className="solid-btn-label">{children}</span>
|
|
51
|
-
{!loading && rightIcon ? <span className="solid-btn-icon">{rightIcon}</span> : null}
|
|
52
|
-
</button>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type SolidTabProps = {
|
|
3
|
-
value: string;
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
content: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
type SolidTabGroupProps = {
|
|
8
|
-
tabs: SolidTabProps[];
|
|
9
|
-
value: string;
|
|
10
|
-
onValueChange: (value: string) => void;
|
|
11
|
-
className?: string;
|
|
12
|
-
listClassName?: string;
|
|
13
|
-
panelClassName?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function SolidTab(_props: SolidTabProps): null;
|
|
16
|
-
export declare function SolidTabGroup({ tabs, value, onValueChange, className, listClassName, panelClassName, }: SolidTabGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=SolidTabs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidTabs.d.ts","sourceRoot":"","sources":["../../../src/components/solid-ui/SolidTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAMF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,QAE7C;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,2CAwCpB"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
function cx() {
|
|
3
|
-
var parts = [];
|
|
4
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5
|
-
parts[_i] = arguments[_i];
|
|
6
|
-
}
|
|
7
|
-
return parts.filter(Boolean).join(" ");
|
|
8
|
-
}
|
|
9
|
-
export function SolidTab(_props) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
export function SolidTabGroup(_a) {
|
|
13
|
-
var tabs = _a.tabs, value = _a.value, onValueChange = _a.onValueChange, className = _a.className, listClassName = _a.listClassName, panelClassName = _a.panelClassName;
|
|
14
|
-
return (_jsxs("div", { className: cx("solid-tabs", className), children: [_jsx("div", { className: cx("solid-tabs-list", listClassName), role: "tablist", children: tabs.map(function (tab) {
|
|
15
|
-
var isActive = tab.value === value;
|
|
16
|
-
return (_jsx("button", { type: "button", role: "tab", "aria-selected": isActive, "aria-controls": "solid-tab-panel-".concat(tab.value), id: "solid-tab-".concat(tab.value), className: cx("solid-tabs-trigger", isActive && "is-active"), onClick: function () { return onValueChange(tab.value); }, children: tab.label }, tab.value));
|
|
17
|
-
}) }), tabs.map(function (tab) {
|
|
18
|
-
var isActive = tab.value === value;
|
|
19
|
-
return (_jsx("div", { role: "tabpanel", id: "solid-tab-panel-".concat(tab.value), "aria-labelledby": "solid-tab-".concat(tab.value), hidden: !isActive, className: cx("solid-tabs-panel", panelClassName), children: isActive ? tab.content : null }, tab.value));
|
|
20
|
-
})] }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=SolidTabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SolidTabs.js","sourceRoot":"","sources":["../../../src/components/solid-ui/SolidTabs.tsx"],"names":[],"mappings":";AAiBA,SAAS,EAAE;IAAC,eAA2C;SAA3C,UAA2C,EAA3C,qBAA2C,EAA3C,IAA2C;QAA3C,0BAA2C;;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,MAAqB;IAC5C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAOT;QANnB,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,aAAa,mBAAA,EACb,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,cAAc,oBAAA;IAEd,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,aACzC,cAAK,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC,EAAE,IAAI,EAAC,SAAS,YACjE,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG;oBACZ,IAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC;oBACrC,OAAO,CACL,iBAEE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,KAAK,mBACK,QAAQ,mBACR,0BAAmB,GAAG,CAAC,KAAK,CAAE,EAC7C,EAAE,EAAE,oBAAa,GAAG,CAAC,KAAK,CAAE,EAC5B,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,QAAQ,IAAI,WAAW,CAAC,EAC5D,OAAO,EAAE,cAAM,OAAA,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAxB,CAAwB,YAEtC,GAAG,CAAC,KAAK,IATL,GAAG,CAAC,KAAK,CAUP,CACV,CAAC;gBACJ,CAAC,CAAC,GACE,EAEL,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG;gBACZ,IAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC;gBACrC,OAAO,CACL,cAEE,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,0BAAmB,GAAG,CAAC,KAAK,CAAE,qBACjB,oBAAa,GAAG,CAAC,KAAK,CAAE,EACzC,MAAM,EAAE,CAAC,QAAQ,EACjB,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,cAAc,CAAC,YAEhD,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,IAPzB,GAAG,CAAC,KAAK,CAQV,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from \"react\";\n\ntype SolidTabProps = {\n value: string;\n label: React.ReactNode;\n content: React.ReactNode;\n};\n\ntype SolidTabGroupProps = {\n tabs: SolidTabProps[];\n value: string;\n onValueChange: (value: string) => void;\n className?: string;\n listClassName?: string;\n panelClassName?: string;\n};\n\nfunction cx(...parts: Array<string | false | undefined>) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport function SolidTab(_props: SolidTabProps) {\n return null;\n}\n\nexport function SolidTabGroup({\n tabs,\n value,\n onValueChange,\n className,\n listClassName,\n panelClassName,\n}: SolidTabGroupProps) {\n return (\n <div className={cx(\"solid-tabs\", className)}>\n <div className={cx(\"solid-tabs-list\", listClassName)} role=\"tablist\">\n {tabs.map((tab) => {\n const isActive = tab.value === value;\n return (\n <button\n key={tab.value}\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n aria-controls={`solid-tab-panel-${tab.value}`}\n id={`solid-tab-${tab.value}`}\n className={cx(\"solid-tabs-trigger\", isActive && \"is-active\")}\n onClick={() => onValueChange(tab.value)}\n >\n {tab.label}\n </button>\n );\n })}\n </div>\n\n {tabs.map((tab) => {\n const isActive = tab.value === value;\n return (\n <div\n key={tab.value}\n role=\"tabpanel\"\n id={`solid-tab-panel-${tab.value}`}\n aria-labelledby={`solid-tab-${tab.value}`}\n hidden={!isActive}\n className={cx(\"solid-tabs-panel\", panelClassName)}\n >\n {isActive ? tab.content : null}\n </div>\n );\n })}\n </div>\n );\n}\n"]}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type SolidTabProps = {
|
|
4
|
-
value: string;
|
|
5
|
-
label: React.ReactNode;
|
|
6
|
-
content: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type SolidTabGroupProps = {
|
|
10
|
-
tabs: SolidTabProps[];
|
|
11
|
-
value: string;
|
|
12
|
-
onValueChange: (value: string) => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
listClassName?: string;
|
|
15
|
-
panelClassName?: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
function cx(...parts: Array<string | false | undefined>) {
|
|
19
|
-
return parts.filter(Boolean).join(" ");
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function SolidTab(_props: SolidTabProps) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function SolidTabGroup({
|
|
27
|
-
tabs,
|
|
28
|
-
value,
|
|
29
|
-
onValueChange,
|
|
30
|
-
className,
|
|
31
|
-
listClassName,
|
|
32
|
-
panelClassName,
|
|
33
|
-
}: SolidTabGroupProps) {
|
|
34
|
-
return (
|
|
35
|
-
<div className={cx("solid-tabs", className)}>
|
|
36
|
-
<div className={cx("solid-tabs-list", listClassName)} role="tablist">
|
|
37
|
-
{tabs.map((tab) => {
|
|
38
|
-
const isActive = tab.value === value;
|
|
39
|
-
return (
|
|
40
|
-
<button
|
|
41
|
-
key={tab.value}
|
|
42
|
-
type="button"
|
|
43
|
-
role="tab"
|
|
44
|
-
aria-selected={isActive}
|
|
45
|
-
aria-controls={`solid-tab-panel-${tab.value}`}
|
|
46
|
-
id={`solid-tab-${tab.value}`}
|
|
47
|
-
className={cx("solid-tabs-trigger", isActive && "is-active")}
|
|
48
|
-
onClick={() => onValueChange(tab.value)}
|
|
49
|
-
>
|
|
50
|
-
{tab.label}
|
|
51
|
-
</button>
|
|
52
|
-
);
|
|
53
|
-
})}
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
{tabs.map((tab) => {
|
|
57
|
-
const isActive = tab.value === value;
|
|
58
|
-
return (
|
|
59
|
-
<div
|
|
60
|
-
key={tab.value}
|
|
61
|
-
role="tabpanel"
|
|
62
|
-
id={`solid-tab-panel-${tab.value}`}
|
|
63
|
-
aria-labelledby={`solid-tab-${tab.value}`}
|
|
64
|
-
hidden={!isActive}
|
|
65
|
-
className={cx("solid-tabs-panel", panelClassName)}
|
|
66
|
-
>
|
|
67
|
-
{isActive ? tab.content : null}
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
})}
|
|
71
|
-
</div>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/solid-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/solid-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { SolidButton } from \"./SolidButton\";\nexport { SolidTab, SolidTabGroup } from \"./SolidTabs\";\n"]}
|