opus-toolkit-components 1.7.6 → 1.7.9

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.
@@ -0,0 +1,19 @@
1
+ // Accordion Typescript Definitions - update when new props added
2
+ export interface AccordionProps {
3
+ title: string | React.ReactNode;
4
+ handleToggle?: (index: number) => void;
5
+ activeIndex?: number;
6
+ index: number;
7
+ isPreview?: boolean;
8
+ isLocked?: boolean;
9
+ onExitPreview?: () => void;
10
+ content: React.ReactNode;
11
+ preview?: React.ReactNode;
12
+ isPill?: boolean;
13
+ pillText?: string;
14
+ pillStatus?: "success" | "warning" | "error" | "info" | string;
15
+ pillIcon?: React.ReactNode;
16
+ disabled?: boolean;
17
+ }
18
+
19
+ export const Accordion: React.ComponentType<AccordionProps>;
@@ -0,0 +1,8 @@
1
+ export interface BarLayoutProps {
2
+ left?: React.ReactNode;
3
+ center?: React.ReactNode;
4
+ right?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const BarLayout: React.ComponentType<BarLayoutProps>;
@@ -0,0 +1,36 @@
1
+ export type ButtonRank =
2
+ | "primary"
3
+ | "secondary"
4
+ | "tertiary"
5
+ | "outline"
6
+ | "destructive";
7
+
8
+ export type ButtonState = "default" | "disabled";
9
+
10
+ export type ButtonSize = "sm" | "md" | "lg" | "xl" | string;
11
+
12
+ export type IconComponent = (
13
+ props: React.SVGProps<SVGSVGElement>,
14
+ ) => JSX.Element;
15
+
16
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
17
+ type?: "button" | "submit" | "reset";
18
+ rank?: ButtonRank;
19
+ state?: ButtonState;
20
+ text?: string;
21
+ size?: ButtonSize;
22
+ name?: string;
23
+ dataCy?: string;
24
+ tabIndex?: number;
25
+ isFullWidth?: boolean;
26
+ icon?: IconComponent;
27
+ iconPosition?: "left" | "right";
28
+ isIconAnimated?: boolean;
29
+ isSaving?: boolean;
30
+ savingText?: string;
31
+ className?: string;
32
+ title?: string;
33
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
34
+ }
35
+
36
+ export const Button: React.ComponentType<ButtonProps>;
@@ -0,0 +1,16 @@
1
+ export type CardIntent =
2
+ | "default"
3
+ | "info"
4
+ | "warning"
5
+ | "success"
6
+ | "error"
7
+ | "brand"
8
+ | "brandSecondary";
9
+
10
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ intent?: CardIntent;
12
+ className?: string;
13
+ children?: React.ReactNode;
14
+ }
15
+
16
+ export const Card: React.ComponentType<CardProps>;
@@ -0,0 +1,11 @@
1
+ export interface CookieBannerProps {
2
+ logo?: string;
3
+ policyTxt?: string;
4
+ linkTxt?: string;
5
+ isVisible?: boolean;
6
+ onAccept?: () => void;
7
+ onLearnMore?: () => void;
8
+ intent?: string;
9
+ }
10
+
11
+ export const CookieBanner: React.ComponentType<CookieBannerProps>;
@@ -0,0 +1,8 @@
1
+ export interface FooterProps {
2
+ left?: React.ReactNode;
3
+ center?: React.ReactNode;
4
+ right?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const Footer: React.ComponentType<FooterProps>;
@@ -0,0 +1,20 @@
1
+ export interface CheckboxChangeEvent {
2
+ target: {
3
+ name: string;
4
+ value: boolean;
5
+ };
6
+ }
7
+
8
+ export interface CheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ label: string;
10
+ name: string;
11
+ onChange?: (event: CheckboxChangeEvent) => void;
12
+ value?: boolean;
13
+ isValid?: boolean;
14
+ errorMessage?: string;
15
+ disabled?: boolean;
16
+ title?: string;
17
+ dataCy?: string;
18
+ }
19
+
20
+ export const Checkbox: React.ComponentType<CheckboxProps>;
@@ -0,0 +1,23 @@
1
+ export interface DatePickerChangeEvent {
2
+ target: {
3
+ name: string;
4
+ value: string;
5
+ };
6
+ }
7
+
8
+ export interface DatePickerProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ initialDate?: string;
10
+ label?: string;
11
+ isValid?: boolean;
12
+ errorMessage?: string;
13
+ name?: string;
14
+ onChange?: (event: DatePickerChangeEvent) => void;
15
+ value?: string;
16
+ className?: string;
17
+ title?: string;
18
+ required?: boolean;
19
+ dataCy?: string;
20
+ disabled?: boolean;
21
+ }
22
+
23
+ export const DatePicker: React.ComponentType<DatePickerProps>;
@@ -0,0 +1,35 @@
1
+ export interface DropdownItem {
2
+ label: string;
3
+ value: string | number;
4
+ }
5
+
6
+ export interface DropdownChangeEvent {
7
+ target: {
8
+ name: string;
9
+ value: string | number;
10
+ };
11
+ }
12
+
13
+ export type IconComponent = (
14
+ props: React.SVGProps<SVGSVGElement>,
15
+ ) => JSX.Element;
16
+
17
+ export interface DropdownProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ items?: DropdownItem[];
19
+ label?: string;
20
+ isValid?: boolean;
21
+ required?: boolean;
22
+ placeholder?: string;
23
+ name?: string;
24
+ className?: string;
25
+ title?: string;
26
+ tabIndex?: string | number;
27
+ onChange?: (event: DropdownChangeEvent) => void;
28
+ value?: string | number;
29
+ Icon?: IconComponent;
30
+ errorMessage?: string;
31
+ disabled?: boolean;
32
+ dataCy?: string;
33
+ }
34
+
35
+ export const Dropdown: React.ComponentType<DropdownProps>;
@@ -0,0 +1,45 @@
1
+ export type IconComponent = (
2
+ props: React.SVGProps<SVGSVGElement>,
3
+ ) => JSX.Element;
4
+
5
+ export type CustomComponent = (props: any) => JSX.Element;
6
+
7
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
8
+ label: string;
9
+ placeholder?: string;
10
+ type?:
11
+ | "text"
12
+ | "email"
13
+ | "password"
14
+ | "number"
15
+ | "search"
16
+ | "tel"
17
+ | "url"
18
+ | "date"
19
+ | "datetime-local"
20
+ | "month"
21
+ | "time"
22
+ | "week"
23
+ | string;
24
+ tabIndex?: string | number;
25
+ title?: string;
26
+ name?: string;
27
+ isValid?: boolean;
28
+ errorMessage?: string;
29
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
30
+ className?: string;
31
+ value?: string | number;
32
+ Icon?: IconComponent;
33
+ iconPosition?: "left" | "right";
34
+ isAnimated?: boolean;
35
+ required?: boolean;
36
+ disabled?: boolean;
37
+ shouldRenderCustomComponent?: boolean;
38
+ customComponent?: CustomComponent;
39
+ customComponentProps?: Record<string, any>;
40
+ dataCy?: string;
41
+ }
42
+
43
+ export const Input: React.ForwardRefExoticComponent<
44
+ InputProps & React.RefAttributes<HTMLInputElement>
45
+ >;
@@ -0,0 +1,29 @@
1
+ export interface RadioOption {
2
+ value: string | number;
3
+ label: string;
4
+ }
5
+
6
+ export interface RadioChangeEvent {
7
+ target: {
8
+ name: string;
9
+ value: string | number;
10
+ };
11
+ }
12
+
13
+ export interface RadioButtonProps extends React.HTMLAttributes<HTMLDivElement> {
14
+ label: string;
15
+ options?: RadioOption[];
16
+ name: string;
17
+ value?: string | number;
18
+ onChange?: (event: RadioChangeEvent) => void;
19
+ className?: string;
20
+ tabIndex?: string | number;
21
+ title?: string;
22
+ isValid?: boolean;
23
+ errorMessage?: string;
24
+ required?: boolean;
25
+ dataCy?: string;
26
+ disabled?: boolean;
27
+ }
28
+
29
+ export const RadioButton: React.FC<RadioButtonProps>;
@@ -0,0 +1,8 @@
1
+ export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ title: string;
3
+ center?: React.ReactNode;
4
+ right?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const Header: React.FC<HeaderProps>;
@@ -0,0 +1,15 @@
1
+ export type HeroIconName = keyof typeof HeroIcons;
2
+ export type C247IconName = keyof typeof C247Icons;
3
+ export type IconName = HeroIconName | C247IconName;
4
+
5
+ export type IconLibrary = "hero" | "c247";
6
+
7
+ export interface IconProps extends React.SVGProps<SVGSVGElement> {
8
+ name: IconName;
9
+ library?: IconLibrary;
10
+ size?: number;
11
+ className?: string;
12
+ color?: string;
13
+ }
14
+
15
+ export const Icon: React.FC<IconProps>;
@@ -0,0 +1,22 @@
1
+ export type IconButtonRank =
2
+ | "primary"
3
+ | "secondary"
4
+ | "outline"
5
+ | "destructive"
6
+ | string;
7
+
8
+ export type IconButtonSize = "sm" | "md" | "lg" | string;
9
+
10
+ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
+ rank?: IconButtonRank;
12
+ size?: IconButtonSize;
13
+ title?: string;
14
+ iconName?: string;
15
+ iconLibrary?: "hero" | "c247" | string;
16
+ isFullWidth?: boolean;
17
+ className?: string;
18
+ name?: string;
19
+ dataCy?: string;
20
+ }
21
+
22
+ export const IconButton: React.ComponentType<IconButtonProps>;
@@ -0,0 +1,131 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ 34164:
6
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7
+
8
+ __webpack_require__.r(__webpack_exports__);
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ clsx: () => (/* binding */ clsx),
11
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12
+ /* harmony export */ });
13
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
14
+
15
+ /***/ }),
16
+
17
+ /***/ 94178:
18
+ /***/ ((module) => {
19
+
20
+ module.exports = require("react/jsx-runtime");
21
+
22
+ /***/ })
23
+
24
+ /******/ });
25
+ /************************************************************************/
26
+ /******/ // The module cache
27
+ /******/ var __webpack_module_cache__ = {};
28
+ /******/
29
+ /******/ // The require function
30
+ /******/ function __webpack_require__(moduleId) {
31
+ /******/ // Check if module is in cache
32
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
33
+ /******/ if (cachedModule !== undefined) {
34
+ /******/ return cachedModule.exports;
35
+ /******/ }
36
+ /******/ // Create a new module (and put it into the cache)
37
+ /******/ var module = __webpack_module_cache__[moduleId] = {
38
+ /******/ // no module.id needed
39
+ /******/ // no module.loaded needed
40
+ /******/ exports: {}
41
+ /******/ };
42
+ /******/
43
+ /******/ // Execute the module function
44
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
45
+ /******/
46
+ /******/ // Return the exports of the module
47
+ /******/ return module.exports;
48
+ /******/ }
49
+ /******/
50
+ /************************************************************************/
51
+ /******/ /* webpack/runtime/compat get default export */
52
+ /******/ (() => {
53
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
54
+ /******/ __webpack_require__.n = (module) => {
55
+ /******/ var getter = module && module.__esModule ?
56
+ /******/ () => (module['default']) :
57
+ /******/ () => (module);
58
+ /******/ __webpack_require__.d(getter, { a: getter });
59
+ /******/ return getter;
60
+ /******/ };
61
+ /******/ })();
62
+ /******/
63
+ /******/ /* webpack/runtime/define property getters */
64
+ /******/ (() => {
65
+ /******/ // define getter functions for harmony exports
66
+ /******/ __webpack_require__.d = (exports, definition) => {
67
+ /******/ for(var key in definition) {
68
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
69
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
70
+ /******/ }
71
+ /******/ }
72
+ /******/ };
73
+ /******/ })();
74
+ /******/
75
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
76
+ /******/ (() => {
77
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
78
+ /******/ })();
79
+ /******/
80
+ /******/ /* webpack/runtime/make namespace object */
81
+ /******/ (() => {
82
+ /******/ // define __esModule on exports
83
+ /******/ __webpack_require__.r = (exports) => {
84
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
85
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
86
+ /******/ }
87
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
88
+ /******/ };
89
+ /******/ })();
90
+ /******/
91
+ /************************************************************************/
92
+ var __webpack_exports__ = {};
93
+ __webpack_require__.r(__webpack_exports__);
94
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
95
+ /* harmony export */ "default": () => (/* binding */ Link)
96
+ /* harmony export */ });
97
+ /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34164);
98
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94178);
99
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
100
+ const _excluded = ["href", "children", "className", "newTab"];
101
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
102
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
103
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
104
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
105
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
106
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
107
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
108
+
109
+
110
+ function Link(_ref) {
111
+ let {
112
+ href,
113
+ children,
114
+ className,
115
+ newTab
116
+ } = _ref,
117
+ props = _objectWithoutProperties(_ref, _excluded);
118
+ const isExternal = href.startsWith("http");
119
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", _objectSpread(_objectSpread({
120
+ href: href,
121
+ target: newTab || isExternal ? "_blank" : undefined,
122
+ rel: newTab || isExternal ? "noopener noreferrer" : undefined,
123
+ className: (0,clsx__WEBPACK_IMPORTED_MODULE_0__["default"])("text-[--color-text-strong] hover:underline", className)
124
+ }, props), {}, {
125
+ children: children
126
+ }));
127
+ }
128
+ module.exports = __webpack_exports__;
129
+ /******/ })()
130
+ ;
131
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components/Link/index.js","mappings":";;;;;;;;;;;;AAAA,cAAc,aAAa,+CAA+C,gDAAgD,eAAe,QAAQ,IAAI,0CAA0C,yCAAyC,SAAgB,gBAAgB,wCAAwC,IAAI,mDAAmD,SAAS,iEAAe,IAAI,E;;;;;;;ACAnY,8C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;ACNwB;AAAA;AAET,SAASG,IAAIA,CAAAC,IAAA,EAAkD;EAAA,IAAjD;MAAEC,IAAI;MAAEC,QAAQ;MAAEC,SAAS;MAAEC;IAAiB,CAAC,GAAAJ,IAAA;IAAPK,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EACxE,MAAMC,UAAU,GAAGP,IAAI,CAACQ,UAAU,CAAC,MAAM,CAAC;EAE1C,oBACEX,sDAAA,MAAAY,aAAA,CAAAA,aAAA;IACET,IAAI,EAAEA,IAAK;IACXU,MAAM,EAAEP,MAAM,IAAII,UAAU,GAAG,QAAQ,GAAGI,SAAU;IACpDC,GAAG,EAAET,MAAM,IAAII,UAAU,GAAG,qBAAqB,GAAGI,SAAU;IAC9DT,SAAS,EAAEP,gDAAI,CAAC,4CAA4C,EAAEO,SAAS;EAAE,GACrEE,KAAK;IAAAH,QAAA,EAERA;EAAQ,EACR,CAAC;AAER,C","sources":["webpack://opus-toolkit-components/./node_modules/clsx/dist/clsx.mjs","webpack://opus-toolkit-components/external commonjs2 \"react/jsx-runtime\"","webpack://opus-toolkit-components/webpack/bootstrap","webpack://opus-toolkit-components/webpack/runtime/compat get default export","webpack://opus-toolkit-components/webpack/runtime/define property getters","webpack://opus-toolkit-components/webpack/runtime/hasOwnProperty shorthand","webpack://opus-toolkit-components/webpack/runtime/make namespace object","webpack://opus-toolkit-components/./src/components/Link/Link.jsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","module.exports = require(\"react/jsx-runtime\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import clsx from \"clsx\";\r\n\r\nexport default function Link({ href, children, className, newTab, ...props }) {\r\n const isExternal = href.startsWith(\"http\");\r\n\r\n return (\r\n <a\r\n href={href}\r\n target={newTab || isExternal ? \"_blank\" : undefined}\r\n rel={newTab || isExternal ? \"noopener noreferrer\" : undefined}\r\n className={clsx(\"text-[--color-text-strong] hover:underline\", className)}\r\n {...props}\r\n >\r\n {children}\r\n </a>\r\n );\r\n}\r\n"],"names":["clsx","jsx","_jsx","Link","_ref","href","children","className","newTab","props","_objectWithoutProperties","_excluded","isExternal","startsWith","_objectSpread","target","undefined","rel"],"ignoreList":[],"sourceRoot":""}
@@ -0,0 +1,8 @@
1
+ export interface LoaderProps {
2
+ isLoading: boolean;
3
+ loaderText?: string;
4
+ customLoader?: React.ReactNode;
5
+ className?: string;
6
+ }
7
+
8
+ export const Loader: React.FC<LoaderProps>;
@@ -0,0 +1,16 @@
1
+ export interface ModalProps {
2
+ isOpen: boolean;
3
+ onClose?: () => void;
4
+ isLoading?: boolean;
5
+ loaderText?: string;
6
+ header?: React.ReactNode;
7
+ hideHeader?: boolean;
8
+ body?: React.ReactNode;
9
+ footer?: React.ReactNode;
10
+ hideFooter?: boolean;
11
+ className?: string;
12
+ footerClassName?: string;
13
+ headerClassName?: string;
14
+ }
15
+
16
+ export const Modal: React.FC<ModalProps>;
@@ -0,0 +1,8 @@
1
+ export interface NavbarProps {
2
+ children?: React.ReactNode;
3
+ logo?: string;
4
+ className?: string;
5
+ maxWidth?: string;
6
+ }
7
+
8
+ export const Navbar: React.FC<NavbarProps>;
@@ -0,0 +1,12 @@
1
+ export interface PageTemplateProps {
2
+ headerTitle?: string;
3
+ headerCenter?: React.ReactNode;
4
+ headerRight?: React.ReactNode;
5
+ footerLeft?: React.ReactNode;
6
+ footerCenter?: React.ReactNode;
7
+ footerRight?: React.ReactNode;
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ }
11
+
12
+ export const PageTemplate: React.FC<PageTemplateProps>;
@@ -0,0 +1,8 @@
1
+ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
2
+ text?: string;
3
+ status?: "primary" | "danger" | "warning" | "success" | "info" | "notice";
4
+ className?: string;
5
+ icon?: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
6
+ }
7
+
8
+ export const Pill: React.FC<PillProps>;
@@ -0,0 +1,11 @@
1
+ export interface ProfileCardUser {
2
+ name: string;
3
+ role: string;
4
+ }
5
+
6
+ export interface ProfileCardProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ user: ProfileCardUser;
8
+ href?: string;
9
+ }
10
+
11
+ export const ProfileCard: React.FC<ProfileCardProps>;
@@ -0,0 +1,48 @@
1
+ export interface SidebarMenuItem {
2
+ key: string | number;
3
+ name: string;
4
+ icon?: string;
5
+ href?: string;
6
+ }
7
+
8
+ export interface SidebarMenuGroup {
9
+ key: string | number;
10
+ name: string;
11
+ children: SidebarMenuItem[];
12
+ }
13
+
14
+ export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
15
+
16
+ export interface SidebarUser {
17
+ id: string | number;
18
+ name: string;
19
+ role: string;
20
+ avatar?: string;
21
+ }
22
+
23
+ export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
24
+ menus: SidebarMenu[];
25
+ user: SidebarUser;
26
+
27
+ /** Currently selected (active) menu item */
28
+ activeItem?: string | number | null;
29
+ onItemClick?: (key: string | number) => void;
30
+
31
+ /** Optional logo override */
32
+ logo?: string;
33
+
34
+ /** Controlled search input state */
35
+ searchValue?: string;
36
+ onSearchChange?: (value: string) => void;
37
+
38
+ /** Controlled open/closed state for menu groups */
39
+ openGroupKey?: string | number | null;
40
+
41
+ /**
42
+ * Fired when the user clicks a group header.
43
+ * Use this to update `openGroupKey` in the parent.
44
+ */
45
+ onGroupToggle?: (key: string | number) => void;
46
+ }
47
+
48
+ export const Sidebar: React.FC<SidebarProps>;
@@ -0,0 +1,18 @@
1
+ export interface TableColumn {
2
+ key: string;
3
+ header: string;
4
+ render?: (row: any) => React.ReactNode;
5
+ }
6
+
7
+ export interface TableProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ data?: TableColumn[];
9
+ rows?: any[];
10
+ className?: string;
11
+ rowClassName?: string;
12
+ cellClassName?: string;
13
+ headRowClassName?: string;
14
+ headCellClassName?: string;
15
+ rowKeyExtractor?: (row: any, index: number) => string | number;
16
+ }
17
+
18
+ export const Table: React.FC<TableProps>;
@@ -0,0 +1,25 @@
1
+ export type TextVariant =
2
+ | "h1"
3
+ | "h2"
4
+ | "h3"
5
+ | "h4"
6
+ | "h5"
7
+ | "h6"
8
+ | "body"
9
+ | "small"
10
+ | "caption"
11
+ | "label";
12
+
13
+ export type TextAs = keyof JSX.IntrinsicElements | React.ComponentType<any>;
14
+
15
+ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
16
+ variant?: TextVariant;
17
+ as?: TextAs;
18
+ className?: string;
19
+ color?: string;
20
+ children?: React.ReactNode;
21
+ name?: string;
22
+ dataCy?: string;
23
+ }
24
+
25
+ export const Text: React.FC<TextProps>;