@c-rex/ui 0.0.1 → 0.0.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/constants/src/index.d.ts +17 -0
- package/dist/constants/src/index.d.ts.map +1 -0
- package/dist/constants/src/index.js +30 -0
- package/dist/interfaces/src/common.d.ts +36 -0
- package/dist/interfaces/src/common.d.ts.map +1 -0
- package/dist/interfaces/src/common.js +2 -0
- package/dist/interfaces/src/config.d.ts +26 -0
- package/dist/interfaces/src/config.d.ts.map +1 -0
- package/dist/interfaces/src/config.js +2 -0
- package/dist/interfaces/src/directoryNodes.d.ts +8 -0
- package/dist/interfaces/src/directoryNodes.d.ts.map +1 -0
- package/dist/interfaces/src/directoryNodes.js +2 -0
- package/dist/interfaces/src/documentTypes.d.ts +7 -0
- package/dist/interfaces/src/documentTypes.d.ts.map +1 -0
- package/dist/interfaces/src/documentTypes.js +2 -0
- package/dist/interfaces/src/index.d.ts +7 -0
- package/dist/interfaces/src/index.d.ts.map +1 -0
- package/dist/interfaces/src/index.js +22 -0
- package/dist/interfaces/src/informationUnits.d.ts +53 -0
- package/dist/interfaces/src/informationUnits.d.ts.map +1 -0
- package/dist/interfaces/src/informationUnits.js +2 -0
- package/dist/interfaces/src/treeOfContent.d.ts +8 -0
- package/dist/interfaces/src/treeOfContent.d.ts.map +1 -0
- package/dist/interfaces/src/treeOfContent.js +2 -0
- package/dist/types/src/index.d.ts +8 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/index.js +2 -0
- package/dist/ui/src/alert.d.ts +9 -0
- package/dist/ui/src/alert.d.ts.map +1 -0
- package/dist/ui/src/alert.js +60 -0
- package/dist/ui/src/breadcrumb.d.ts +20 -0
- package/dist/ui/src/breadcrumb.d.ts.map +1 -0
- package/dist/ui/src/breadcrumb.js +65 -0
- package/dist/ui/src/button.d.ts +13 -0
- package/dist/ui/src/button.d.ts.map +1 -0
- package/dist/ui/src/button.js +79 -0
- package/dist/ui/src/command.d.ts +81 -0
- package/dist/ui/src/command.d.ts.map +1 -0
- package/dist/ui/src/command.js +72 -0
- package/dist/ui/src/dialog.d.ts +20 -0
- package/dist/ui/src/dialog.d.ts.map +1 -0
- package/dist/ui/src/dialog.js +68 -0
- package/dist/ui/src/hooks/use-mobile.d.ts +2 -0
- package/dist/ui/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/ui/src/hooks/use-mobile.js +18 -0
- package/dist/ui/src/input.d.ts +4 -0
- package/dist/ui/src/input.d.ts.map +1 -0
- package/dist/ui/src/input.js +44 -0
- package/dist/ui/src/popover.d.ts +8 -0
- package/dist/ui/src/popover.d.ts.map +1 -0
- package/dist/ui/src/popover.js +49 -0
- package/dist/ui/src/select.d.ts +14 -0
- package/dist/ui/src/select.d.ts.map +1 -0
- package/dist/ui/src/select.js +71 -0
- package/dist/ui/src/separator.d.ts +5 -0
- package/dist/ui/src/separator.d.ts.map +1 -0
- package/dist/ui/src/separator.js +43 -0
- package/dist/ui/src/sheet.d.ts +26 -0
- package/dist/ui/src/sheet.d.ts.map +1 -0
- package/dist/ui/src/sheet.js +82 -0
- package/dist/ui/src/sidebar.d.ts +67 -0
- package/dist/ui/src/sidebar.d.ts.map +1 -0
- package/dist/ui/src/sidebar.js +292 -0
- package/dist/ui/src/skeleton.d.ts +3 -0
- package/dist/ui/src/skeleton.d.ts.map +1 -0
- package/dist/ui/src/skeleton.js +8 -0
- package/dist/ui/src/table.d.ts +11 -0
- package/dist/ui/src/table.d.ts.map +1 -0
- package/dist/ui/src/table.js +63 -0
- package/dist/ui/src/tooltip.d.ts +8 -0
- package/dist/ui/src/tooltip.d.ts.map +1 -0
- package/dist/ui/src/tooltip.js +49 -0
- package/dist/utils/src/breadcrumbs.d.ts +3 -0
- package/dist/utils/src/breadcrumbs.d.ts.map +1 -0
- package/dist/utils/src/breadcrumbs.js +14 -0
- package/dist/utils/src/classMerge.d.ts +3 -0
- package/dist/utils/src/classMerge.d.ts.map +1 -0
- package/dist/utils/src/classMerge.js +8 -0
- package/dist/utils/src/index.d.ts +5 -0
- package/dist/utils/src/index.d.ts.map +1 -0
- package/dist/utils/src/index.js +20 -0
- package/dist/utils/src/treeOfContent.d.ts +2 -0
- package/dist/utils/src/treeOfContent.d.ts.map +1 -0
- package/dist/utils/src/treeOfContent.js +85 -0
- package/dist/utils/src/utils.d.ts +8 -0
- package/dist/utils/src/utils.d.ts.map +1 -0
- package/dist/utils/src/utils.js +37 -0
- package/package.json +71 -19
- package/dist/index.d.mts +0 -267
- package/dist/index.d.ts +0 -267
- package/dist/index.js +0 -1747
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1615
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const ALL = "*";
|
|
2
|
+
export declare const LOG_CATEGORIES: readonly ["NoLicense", "Scenario", "Favorites", "Subscription", "Share", "Document", "Search", "History", "Notification", "UserProfile"];
|
|
3
|
+
export declare const LOG_LEVELS: {
|
|
4
|
+
readonly critical: 2;
|
|
5
|
+
readonly error: 3;
|
|
6
|
+
readonly warning: 4;
|
|
7
|
+
readonly info: 6;
|
|
8
|
+
readonly debug: 7;
|
|
9
|
+
};
|
|
10
|
+
export declare const API: {
|
|
11
|
+
MAX_RETRY: number;
|
|
12
|
+
API_TIMEOUT: number;
|
|
13
|
+
API_HEADERS: {
|
|
14
|
+
"content-Type": string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,MAAM,CAAA;AAEtB,eAAO,MAAM,cAAc,0IAWjB,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX,eAAO,MAAM,GAAG;;;;;;CAMf,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API = exports.LOG_LEVELS = exports.LOG_CATEGORIES = exports.ALL = void 0;
|
|
4
|
+
exports.ALL = "*";
|
|
5
|
+
exports.LOG_CATEGORIES = [
|
|
6
|
+
"NoLicense",
|
|
7
|
+
"Scenario",
|
|
8
|
+
"Favorites",
|
|
9
|
+
"Subscription",
|
|
10
|
+
"Share",
|
|
11
|
+
"Document",
|
|
12
|
+
"Search",
|
|
13
|
+
"History",
|
|
14
|
+
"Notification",
|
|
15
|
+
"UserProfile",
|
|
16
|
+
];
|
|
17
|
+
exports.LOG_LEVELS = {
|
|
18
|
+
critical: 2,
|
|
19
|
+
error: 3,
|
|
20
|
+
warning: 4,
|
|
21
|
+
info: 6,
|
|
22
|
+
debug: 7,
|
|
23
|
+
};
|
|
24
|
+
exports.API = {
|
|
25
|
+
MAX_RETRY: 3,
|
|
26
|
+
API_TIMEOUT: 10000,
|
|
27
|
+
API_HEADERS: {
|
|
28
|
+
"content-Type": "application/json",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface DefaultPageInfo {
|
|
2
|
+
pageNumber: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
pageCount: number;
|
|
5
|
+
totalItemCount: number;
|
|
6
|
+
firstItemOnPage: number;
|
|
7
|
+
lastItemOnPage: number;
|
|
8
|
+
hasPreviousPage: boolean;
|
|
9
|
+
hasNextPage: boolean;
|
|
10
|
+
isFirstPage: boolean;
|
|
11
|
+
isLastPage: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface idShortID {
|
|
14
|
+
id: string;
|
|
15
|
+
shortId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Labels {
|
|
18
|
+
language: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DefaultLinksRequest {
|
|
22
|
+
rel: string;
|
|
23
|
+
href: string;
|
|
24
|
+
method: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DefaultRequest<T> {
|
|
27
|
+
items: T[];
|
|
28
|
+
links: DefaultLinksRequest[];
|
|
29
|
+
pageInfo: DefaultPageInfo;
|
|
30
|
+
}
|
|
31
|
+
export interface Filters {
|
|
32
|
+
key: string;
|
|
33
|
+
value: string;
|
|
34
|
+
operator?: string;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAElB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IAEvB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IAErB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Filters } from "./common";
|
|
2
|
+
import { LogCategoriesType, LogLevelType } from "@c-rex/types";
|
|
3
|
+
export interface logInfo {
|
|
4
|
+
silent: boolean;
|
|
5
|
+
minimumLevel: LogLevelType;
|
|
6
|
+
categoriesLevel: LogCategoriesType[];
|
|
7
|
+
url: string;
|
|
8
|
+
app: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ConfigInterface {
|
|
11
|
+
projectName: string;
|
|
12
|
+
baseUrl: string;
|
|
13
|
+
search: {
|
|
14
|
+
fields: string[];
|
|
15
|
+
tags: string[];
|
|
16
|
+
restrict?: Filters[];
|
|
17
|
+
filter?: Filters[];
|
|
18
|
+
sparqlWhere?: string;
|
|
19
|
+
};
|
|
20
|
+
logs: {
|
|
21
|
+
console: logInfo;
|
|
22
|
+
graylog: logInfo;
|
|
23
|
+
matomo: logInfo;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,OAAO;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAEJ,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;QACrB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IAEF,IAAI,EAAE;QACF,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC;KACnB,CAAC;CACL"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { idShortID } from "./common";
|
|
2
|
+
import { informationUnitsDirectories } from "./informationUnits";
|
|
3
|
+
export interface DirectoryNodes extends informationUnitsDirectories {
|
|
4
|
+
childNodes: informationUnitsDirectories[];
|
|
5
|
+
parents: idShortID[];
|
|
6
|
+
informationUnits: idShortID[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=directoryNodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directoryNodes.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/directoryNodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,WAAW,cAAe,SAAQ,2BAA2B;IACjE,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAC1C,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentTypes.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/documentTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./config"), exports);
|
|
19
|
+
__exportStar(require("./directoryNodes"), exports);
|
|
20
|
+
__exportStar(require("./documentTypes"), exports);
|
|
21
|
+
__exportStar(require("./informationUnits"), exports);
|
|
22
|
+
__exportStar(require("./treeOfContent"), exports);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DirectoryNodes } from "./directoryNodes";
|
|
2
|
+
import { DefaultLinksRequest, DefaultPageInfo, idShortID, Labels } from "./common";
|
|
3
|
+
interface informationUnitsClass extends idShortID {
|
|
4
|
+
labels: Labels[];
|
|
5
|
+
}
|
|
6
|
+
export interface informationUnitsDirectories extends idShortID {
|
|
7
|
+
labels: Labels[];
|
|
8
|
+
links: DefaultLinksRequest[];
|
|
9
|
+
class: informationUnitsClass;
|
|
10
|
+
childNodes?: informationUnitsClass[];
|
|
11
|
+
}
|
|
12
|
+
export interface informationUnitsRenditions extends informationUnitsDirectories {
|
|
13
|
+
source: string;
|
|
14
|
+
format: string;
|
|
15
|
+
}
|
|
16
|
+
export interface informationUnitsItems extends idShortID {
|
|
17
|
+
directories: informationUnitsDirectories[];
|
|
18
|
+
identities: informationUnitsDirectories[];
|
|
19
|
+
class: informationUnitsClass;
|
|
20
|
+
labels: Labels[];
|
|
21
|
+
titles: Labels[];
|
|
22
|
+
links: DefaultLinksRequest[];
|
|
23
|
+
renditions: informationUnitsRenditions[];
|
|
24
|
+
iirdsVersion: {
|
|
25
|
+
value: string;
|
|
26
|
+
};
|
|
27
|
+
revision: string;
|
|
28
|
+
score: number;
|
|
29
|
+
directoryNodes: DirectoryNodes[];
|
|
30
|
+
languages: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface informationUnitsResponse extends idShortID {
|
|
33
|
+
languages: string[];
|
|
34
|
+
labels: Labels[];
|
|
35
|
+
titles: Labels[];
|
|
36
|
+
files: {
|
|
37
|
+
format: string;
|
|
38
|
+
type: string;
|
|
39
|
+
link: string;
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
export interface informationUnits {
|
|
43
|
+
items: informationUnitsItems[];
|
|
44
|
+
pageInfo: DefaultPageInfo;
|
|
45
|
+
}
|
|
46
|
+
export interface AutocompleteSuggestion {
|
|
47
|
+
suggestions: {
|
|
48
|
+
type: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}[];
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=informationUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"informationUnits.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/informationUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,MAAM,EACP,MAAM,UAAU,CAAC;AAElB,UAAU,qBAAsB,SAAQ,SAAS;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,2BAA4B,SAAQ,SAAS;IAC5D,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,0BACf,SAAQ,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC3C,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAC1C,KAAK,EAAE,qBAAqB,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,UAAU,EAAE,0BAA0B,EAAE,CAAC;IACzC,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;CACL;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeOfContent.d.ts","sourceRoot":"","sources":["../../../../interfaces/src/treeOfContent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LOG_CATEGORIES, LOG_LEVELS, ALL } from "@c-rex/constants";
|
|
2
|
+
export type QueryParams = {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
export type LogLevelType = keyof typeof LOG_LEVELS | typeof ALL;
|
|
7
|
+
export type LogCategoriesType = typeof LOG_CATEGORIES[number] | typeof ALL;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../types/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,UAAU,GAAG,OAAO,GAAG,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC,MAAM,CAAC,GAAG,OAAO,GAAG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
9
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAmBlE,QAAA,MAAM,KAAK;;sHAUT,CAAC;AAGH,QAAA,MAAM,UAAU,uHASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHASpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AlertDescription = exports.AlertTitle = exports.Alert = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
40
|
+
const utils_1 = require("@c-rex/utils");
|
|
41
|
+
const alertVariants = (0, class_variance_authority_1.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", {
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
default: "bg-background text-foreground",
|
|
45
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "default",
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, role: "alert", className: (0, utils_1.cn)(alertVariants({ variant }), className), ...props })));
|
|
53
|
+
exports.Alert = Alert;
|
|
54
|
+
Alert.displayName = "Alert";
|
|
55
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("h5", { ref: ref, className: (0, utils_1.cn)("mb-1 font-medium leading-none tracking-tight", className), ...props })));
|
|
56
|
+
exports.AlertTitle = AlertTitle;
|
|
57
|
+
AlertTitle.displayName = "AlertTitle";
|
|
58
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("text-sm [&_p]:leading-relaxed", className), ...props })));
|
|
59
|
+
exports.AlertDescription = AlertDescription;
|
|
60
|
+
AlertDescription.displayName = "AlertDescription";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const BreadcrumbSeparator: {
|
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BreadcrumbEllipsis: {
|
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
20
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,UAAU;gBAGI,KAAK,CAAC,SAAS;qCAE2C,CAAC;AAG/E,QAAA,MAAM,cAAc,2KAYlB,CAAC;AAGH,QAAA,MAAM,cAAc,kKASlB,CAAC;AAGH,QAAA,MAAM,cAAc;cAGF,OAAO;2CAYvB,CAAC;AAGH,QAAA,MAAM,cAAc,sKAYlB,CAAC;AAGH,QAAA,MAAM,mBAAmB;wCAItB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;;CAS5B,CAAC;AAGF,QAAA,MAAM,kBAAkB;8BAGrB,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;;CAU9B,CAAC;AAGF,OAAO,EACH,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACrB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.BreadcrumbEllipsis = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbList = exports.Breadcrumb = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
40
|
+
const lucide_react_1 = require("lucide-react");
|
|
41
|
+
const utils_1 = require("@c-rex/utils");
|
|
42
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => (0, jsx_runtime_1.jsx)("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
|
|
43
|
+
exports.Breadcrumb = Breadcrumb;
|
|
44
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
45
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("ol", { ref: ref, className: (0, utils_1.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
|
|
46
|
+
exports.BreadcrumbList = BreadcrumbList;
|
|
47
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
48
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("li", { ref: ref, className: (0, utils_1.cn)("inline-flex items-center gap-1.5", className), ...props })));
|
|
49
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
50
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
51
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
52
|
+
const Comp = asChild ? react_slot_1.Slot : "a";
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref, className: (0, utils_1.cn)("transition-colors hover:text-foreground", className), ...props }));
|
|
54
|
+
});
|
|
55
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
56
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
57
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: (0, utils_1.cn)("font-normal text-foreground", className), ...props })));
|
|
58
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
59
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
60
|
+
const BreadcrumbSeparator = ({ children, className, ...props }) => ((0, jsx_runtime_1.jsx)("li", { role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5", className), ...props, children: children ?? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, {}) }));
|
|
61
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
62
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
63
|
+
const BreadcrumbEllipsis = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("flex h-9 w-9 items-center justify-center", className), ...props, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MoreHorizontal, { className: "h-4 w-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "More" })] }));
|
|
64
|
+
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
65
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
rounded?: "default" | "sm" | "lg" | "xl" | "2xl" | "full" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Button, buttonVariants };
|
|
13
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;;8EAqCnB,CAAC;AAEF,MAAM,WAAW,WACb,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACrD,YAAY,CAAC,OAAO,cAAc,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.buttonVariants = exports.Button = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
40
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
41
|
+
const utils_1 = require("@c-rex/utils");
|
|
42
|
+
const buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
46
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
47
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
48
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
49
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
50
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
default: "h-9 px-4 py-2",
|
|
54
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
55
|
+
lg: "h-10 rounded-md px-8",
|
|
56
|
+
icon: "h-9 w-9",
|
|
57
|
+
},
|
|
58
|
+
rounded: {
|
|
59
|
+
default: "rounded-md",
|
|
60
|
+
sm: "rounded-sm",
|
|
61
|
+
lg: "rounded-lg",
|
|
62
|
+
xl: "rounded-xl",
|
|
63
|
+
"2xl": "rounded-2xl",
|
|
64
|
+
full: "rounded-full",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
variant: "default",
|
|
69
|
+
size: "default",
|
|
70
|
+
rounded: "default",
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
exports.buttonVariants = buttonVariants;
|
|
74
|
+
const Button = React.forwardRef(({ className, variant, size, rounded, asChild = false, ...props }, ref) => {
|
|
75
|
+
const Comp = asChild ? react_slot_1.Slot : "button";
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(Comp, { className: (0, utils_1.cn)(buttonVariants({ variant, size, rounded, className })), ref: ref, ...props }));
|
|
77
|
+
});
|
|
78
|
+
exports.Button = Button;
|
|
79
|
+
Button.displayName = "Button";
|