opus-toolkit-components 1.9.2 → 1.9.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/README.md +70 -70
- package/lib/components/Accordions/index.d.ts +19 -19
- package/lib/components/BarLayout/index.d.ts +8 -8
- package/lib/components/Buttons/index.d.ts +36 -36
- package/lib/components/Callout/index.d.ts +11 -11
- package/lib/components/Cards/index.d.ts +47 -47
- package/lib/components/FooterLogo/index.d.ts +6 -6
- package/lib/components/Forms/Checkbox/index.d.ts +20 -20
- package/lib/components/Forms/Dropdowns/index.d.ts +35 -98
- package/lib/components/Forms/FilterPopover/index.d.ts +38 -30
- package/lib/components/Forms/Inputs/index.d.ts +3 -3
- package/lib/components/Forms/Radios/index.d.ts +29 -29
- package/lib/components/Forms/ToggleSwitch/index.d.ts +15 -15
- package/lib/components/Header/index.d.ts +8 -8
- package/lib/components/IconButton/index.d.ts +24 -24
- package/lib/components/Link/index.js +20 -28
- package/lib/components/Link/index.js.map +1 -1
- package/lib/components/Modals/index.d.ts +16 -16
- package/lib/components/Navbar/index.d.ts +8 -8
- package/lib/components/PageTemplate/index.d.ts +23 -23
- package/lib/components/Pills/index.d.ts +23 -23
- package/lib/components/Profile/ProfileCard/index.d.ts +11 -11
- package/lib/components/Sidebar/index.d.ts +57 -57
- package/lib/components/Tables/index.d.ts +18 -18
- package/lib/components/Text/index.d.ts +25 -25
- package/lib/main.js +51691 -51788
- package/lib/main.js.map +1 -1
- package/package.json +128 -128
|
@@ -1,29 +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>;
|
|
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>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export interface ToggleSwitchProps
|
|
2
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
checked: boolean;
|
|
4
|
-
onChange?: (checked: boolean) => void;
|
|
5
|
-
onToggle?: (checked: boolean) => void;
|
|
6
|
-
leftLabel?: React.ReactNode;
|
|
7
|
-
rightLabel?: React.ReactNode;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
name?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
dataCy?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const ToggleSwitch: React.ComponentType<ToggleSwitchProps>;
|
|
1
|
+
export interface ToggleSwitchProps
|
|
2
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
|
+
onToggle?: (checked: boolean) => void;
|
|
6
|
+
leftLabel?: React.ReactNode;
|
|
7
|
+
rightLabel?: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
dataCy?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ToggleSwitch: React.ComponentType<ToggleSwitchProps>;
|
|
@@ -1,8 +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>;
|
|
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>;
|
|
@@ -1,24 +1,24 @@
|
|
|
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
|
|
11
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
-
rank?: IconButtonRank;
|
|
13
|
-
size?: IconButtonSize;
|
|
14
|
-
title?: string;
|
|
15
|
-
iconName?: string;
|
|
16
|
-
iconLibrary?: "hero" | "c247" | string;
|
|
17
|
-
icon?: React.ReactNode;
|
|
18
|
-
isFullWidth?: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
name?: string;
|
|
21
|
-
dataCy?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const IconButton: React.ComponentType<IconButtonProps>;
|
|
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
|
|
11
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
rank?: IconButtonRank;
|
|
13
|
+
size?: IconButtonSize;
|
|
14
|
+
title?: string;
|
|
15
|
+
iconName?: string;
|
|
16
|
+
iconLibrary?: "hero" | "c247" | string;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
dataCy?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const IconButton: React.ComponentType<IconButtonProps>;
|
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
6
|
-
|
|
5
|
+
/***/ 94178
|
|
6
|
+
(module) {
|
|
7
|
+
|
|
8
|
+
module.exports = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
/***/ },
|
|
11
|
+
|
|
12
|
+
/***/ 34164
|
|
13
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7
14
|
|
|
8
15
|
__webpack_require__.r(__webpack_exports__);
|
|
9
16
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -12,14 +19,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12
19
|
/* harmony export */ });
|
|
13
20
|
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
21
|
|
|
15
|
-
/***/ }
|
|
16
|
-
|
|
17
|
-
/***/ 94178:
|
|
18
|
-
/***/ ((module) => {
|
|
19
|
-
|
|
20
|
-
module.exports = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
|
-
/***/ })
|
|
22
|
+
/***/ }
|
|
23
23
|
|
|
24
24
|
/******/ });
|
|
25
25
|
/************************************************************************/
|
|
@@ -97,33 +97,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97
97
|
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34164);
|
|
98
98
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94178);
|
|
99
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
100
|
|
|
109
101
|
|
|
110
102
|
function Link(_ref) {
|
|
111
103
|
let {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
href,
|
|
105
|
+
children,
|
|
106
|
+
className,
|
|
107
|
+
newTab,
|
|
108
|
+
...props
|
|
109
|
+
} = _ref;
|
|
118
110
|
const isExternal = href.startsWith("http");
|
|
119
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",
|
|
111
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", {
|
|
120
112
|
href: href,
|
|
121
113
|
target: newTab || isExternal ? "_blank" : undefined,
|
|
122
114
|
rel: newTab || isExternal ? "noopener noreferrer" : undefined,
|
|
123
|
-
className: (0,clsx__WEBPACK_IMPORTED_MODULE_0__["default"])("text-[--color-text-strong] hover:underline", className)
|
|
124
|
-
|
|
115
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_0__["default"])("text-[--color-text-strong] hover:underline", className),
|
|
116
|
+
...props,
|
|
125
117
|
children: children
|
|
126
|
-
})
|
|
118
|
+
});
|
|
127
119
|
}
|
|
128
120
|
module.exports = __webpack_exports__;
|
|
129
121
|
/******/ })()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Link/index.js","mappings":"
|
|
1
|
+
{"version":3,"file":"components/Link/index.js","mappings":";;;;;;;AAAA,8C;;;;;;;;;;;;ACAA,cAAc,aAAa,+CAA+C,gDAAgD,eAAe,QAAQ,IAAI,0CAA0C,yCAAyC,SAAgB,gBAAgB,wCAAwC,IAAI,mDAAmD,SAAS,iEAAe,IAAI,E;;;;;;UCAnY;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;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,SAAS;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAC1E,MAAMM,UAAU,GAAGL,IAAI,CAACM,UAAU,CAAC,MAAM,CAAC;EAE1C,oBACET,sDAAA;IACEG,IAAI,EAAEA,IAAK;IACXO,MAAM,EAAEJ,MAAM,IAAIE,UAAU,GAAG,QAAQ,GAAGG,SAAU;IACpDC,GAAG,EAAEN,MAAM,IAAIE,UAAU,GAAG,qBAAqB,GAAGG,SAAU;IAC9DN,SAAS,EAAEP,gDAAI,CAAC,4CAA4C,EAAEO,SAAS,CAAE;IAAA,GACrEE,KAAK;IAAAH,QAAA,EAERA;EAAQ,CACR,CAAC;AAER,C","sources":["webpack://opus-toolkit-components/external commonjs2 \"react/jsx-runtime\"","webpack://opus-toolkit-components/./node_modules/clsx/dist/clsx.mjs","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":["module.exports = require(\"react/jsx-runtime\");","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;","// 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","isExternal","startsWith","target","undefined","rel"],"sourceRoot":""}
|
|
@@ -1,16 +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>;
|
|
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>;
|
|
@@ -1,8 +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>;
|
|
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>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { SidebarMenu, SidebarUser } from "../Sidebar";
|
|
2
|
-
|
|
3
|
-
export interface PageTemplateProps {
|
|
4
|
-
sidebarMenus?: SidebarMenu[];
|
|
5
|
-
sidebarUser?: SidebarUser;
|
|
6
|
-
sidebarActiveItem?: string | number | null;
|
|
7
|
-
onSidebarItemClick?: (key: string | number) => void;
|
|
8
|
-
sidebarLogo?: string;
|
|
9
|
-
sidebarSearchValue?: string;
|
|
10
|
-
onSidebarSearchChange?: (value: string) => void;
|
|
11
|
-
sidebarOpenGroupKey?: string | number | null;
|
|
12
|
-
onSidebarGroupToggle?: (openGroupKey: string | number | null) => void;
|
|
13
|
-
headerTitle?: string;
|
|
14
|
-
headerCenter?: React.ReactNode;
|
|
15
|
-
headerRight?: React.ReactNode;
|
|
16
|
-
footerLeft?: React.ReactNode;
|
|
17
|
-
footerCenter?: React.ReactNode;
|
|
18
|
-
footerRight?: React.ReactNode;
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const PageTemplate: React.FC<PageTemplateProps>;
|
|
1
|
+
import type { SidebarMenu, SidebarUser } from "../Sidebar";
|
|
2
|
+
|
|
3
|
+
export interface PageTemplateProps {
|
|
4
|
+
sidebarMenus?: SidebarMenu[];
|
|
5
|
+
sidebarUser?: SidebarUser;
|
|
6
|
+
sidebarActiveItem?: string | number | null;
|
|
7
|
+
onSidebarItemClick?: (key: string | number) => void;
|
|
8
|
+
sidebarLogo?: string;
|
|
9
|
+
sidebarSearchValue?: string;
|
|
10
|
+
onSidebarSearchChange?: (value: string) => void;
|
|
11
|
+
sidebarOpenGroupKey?: string | number | null;
|
|
12
|
+
onSidebarGroupToggle?: (openGroupKey: string | number | null) => void;
|
|
13
|
+
headerTitle?: string;
|
|
14
|
+
headerCenter?: React.ReactNode;
|
|
15
|
+
headerRight?: React.ReactNode;
|
|
16
|
+
footerLeft?: React.ReactNode;
|
|
17
|
+
footerCenter?: React.ReactNode;
|
|
18
|
+
footerRight?: React.ReactNode;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const PageTemplate: React.FC<PageTemplateProps>;
|
|
@@ -1,23 +1,23 @@
|
|
|
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
|
-
iconPosition?: "left" | "right";
|
|
7
|
-
onIconClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const Pill: React.FC<PillProps>;
|
|
11
|
-
|
|
12
|
-
export interface PillButtonProps
|
|
13
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
-
label: React.ReactNode;
|
|
15
|
-
active?: boolean;
|
|
16
|
-
className?: string;
|
|
17
|
-
name?: string;
|
|
18
|
-
dataCy?: string;
|
|
19
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
-
onPress?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const PillButton: React.FC<PillButtonProps>;
|
|
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
|
+
iconPosition?: "left" | "right";
|
|
7
|
+
onIconClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Pill: React.FC<PillProps>;
|
|
11
|
+
|
|
12
|
+
export interface PillButtonProps
|
|
13
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
label: React.ReactNode;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
dataCy?: string;
|
|
19
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
onPress?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const PillButton: React.FC<PillButtonProps>;
|
|
@@ -1,11 +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>;
|
|
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>;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type { IconProps } from "../Icon";
|
|
2
|
-
|
|
3
|
-
export interface SidebarMenuItem {
|
|
4
|
-
key: string | number;
|
|
5
|
-
name: string;
|
|
6
|
-
path?: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
iconProps?: IconProps;
|
|
9
|
-
onClick?: (key: string | number) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface SidebarMenuGroup {
|
|
13
|
-
key: string | number;
|
|
14
|
-
name: string;
|
|
15
|
-
iconProps?: IconProps;
|
|
16
|
-
children: SidebarMenuItem[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
|
|
20
|
-
|
|
21
|
-
export interface SidebarUser {
|
|
22
|
-
id: string | number;
|
|
23
|
-
name: string;
|
|
24
|
-
role: string;
|
|
25
|
-
avatar?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
|
-
menus: SidebarMenu[];
|
|
30
|
-
user: SidebarUser;
|
|
31
|
-
|
|
32
|
-
/** Currently selected (active) menu item */
|
|
33
|
-
activeItem?: string | number | null;
|
|
34
|
-
onItemClick?: (key: string | number) => void;
|
|
35
|
-
|
|
36
|
-
/** Optional logo override */
|
|
37
|
-
logo?: string;
|
|
38
|
-
|
|
39
|
-
/** Controlled search input state */
|
|
40
|
-
searchValue?: string;
|
|
41
|
-
onSearchChange?: (value: string) => void;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Optional controlled key of the currently expanded group.
|
|
45
|
-
* Set to `null` to collapse all groups.
|
|
46
|
-
* When omitted, the Sidebar manages expansion state internally.
|
|
47
|
-
*/
|
|
48
|
-
openGroupKey?: string | number | null;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Optional controlled change handler.
|
|
52
|
-
* Receives the NEXT openGroupKey value.
|
|
53
|
-
*/
|
|
54
|
-
onGroupToggle?: (openGroupKey: string | number | null) => void;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const Sidebar: React.FC<SidebarProps>;
|
|
1
|
+
import type { IconProps } from "../Icon";
|
|
2
|
+
|
|
3
|
+
export interface SidebarMenuItem {
|
|
4
|
+
key: string | number;
|
|
5
|
+
name: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
iconProps?: IconProps;
|
|
9
|
+
onClick?: (key: string | number) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SidebarMenuGroup {
|
|
13
|
+
key: string | number;
|
|
14
|
+
name: string;
|
|
15
|
+
iconProps?: IconProps;
|
|
16
|
+
children: SidebarMenuItem[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type SidebarMenu = SidebarMenuItem | SidebarMenuGroup;
|
|
20
|
+
|
|
21
|
+
export interface SidebarUser {
|
|
22
|
+
id: string | number;
|
|
23
|
+
name: string;
|
|
24
|
+
role: string;
|
|
25
|
+
avatar?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
menus: SidebarMenu[];
|
|
30
|
+
user: SidebarUser;
|
|
31
|
+
|
|
32
|
+
/** Currently selected (active) menu item */
|
|
33
|
+
activeItem?: string | number | null;
|
|
34
|
+
onItemClick?: (key: string | number) => void;
|
|
35
|
+
|
|
36
|
+
/** Optional logo override */
|
|
37
|
+
logo?: string;
|
|
38
|
+
|
|
39
|
+
/** Controlled search input state */
|
|
40
|
+
searchValue?: string;
|
|
41
|
+
onSearchChange?: (value: string) => void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Optional controlled key of the currently expanded group.
|
|
45
|
+
* Set to `null` to collapse all groups.
|
|
46
|
+
* When omitted, the Sidebar manages expansion state internally.
|
|
47
|
+
*/
|
|
48
|
+
openGroupKey?: string | number | null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Optional controlled change handler.
|
|
52
|
+
* Receives the NEXT openGroupKey value.
|
|
53
|
+
*/
|
|
54
|
+
onGroupToggle?: (openGroupKey: string | number | null) => void;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const Sidebar: React.FC<SidebarProps>;
|
|
@@ -1,18 +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>;
|
|
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>;
|
|
@@ -1,25 +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>;
|
|
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>;
|