opus-toolkit-components 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -399,7 +399,7 @@ if (true) {
|
|
|
399
399
|
|
|
400
400
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
401
401
|
// Module
|
|
402
|
-
___CSS_LOADER_EXPORT___.push([module.id,
|
|
402
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.wrapper{width:100%}.wrapper table{width:100%}.wrapper table thead th:first-of-type{border-top-left-radius:8px}.wrapper table thead th:last-of-type{border-top-right-radius:8px}.wrapper table tbody tr:last-of-type td:first-of-type{border-bottom-left-radius:8px}.wrapper table tbody tr:last-of-type td:last-of-type{border-bottom-right-radius:8px}@media(max-width: 640px){.wrapper td::before{content:attr(data-label);display:block;font-weight:600;text-transform:uppercase;margin-bottom:.25rem;color:var(--color-text-strong)}.wrapper tr{display:block}.wrapper td{display:block}.wrapper thead{display:none}.wrapper button{width:100%}}`, "",{"version":3,"sources":["webpack://./src/components/Tables/table.scss"],"names":[],"mappings":"AAAA,SACE,UAAA,CAEA,eACE,UAAA,CAII,sCACE,0BAAA,CAGF,qCACE,2BAAA,CASE,sDACE,6BAAA,CAGF,qDACE,8BAAA,CAQZ,yBACE,oBACE,wBAAA,CACA,aAAA,CACA,eAAA,CACA,wBAAA,CACA,oBAAA,CACA,8BAAA,CAGF,YACE,aAAA,CAGF,YACE,aAAA,CAGF,eACE,YAAA,CAGF,gBACE,UAAA,CAAA","sourcesContent":[".wrapper {\r\n width: 100%;\r\n\r\n table {\r\n width: 100%;\r\n\r\n thead {\r\n th {\r\n &:first-of-type {\r\n border-top-left-radius: 8px;\r\n }\r\n\r\n &:last-of-type {\r\n border-top-right-radius: 8px;\r\n }\r\n }\r\n }\r\n\r\n tbody {\r\n tr {\r\n &:last-of-type {\r\n td {\r\n &:first-of-type {\r\n border-bottom-left-radius: 8px;\r\n }\r\n\r\n &:last-of-type {\r\n border-bottom-right-radius: 8px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n @media (max-width: 640px) {\r\n td::before {\r\n content: attr(data-label);\r\n display: block;\r\n font-weight: 600;\r\n text-transform: uppercase;\r\n margin-bottom: 0.25rem;\r\n color: var(--color-text-strong);\r\n }\r\n\r\n tr {\r\n display: block;\r\n }\r\n\r\n td {\r\n display: block;\r\n }\r\n\r\n thead {\r\n display: none;\r\n }\r\n\r\n button {\r\n width: 100%;\r\n }\r\n }\r\n}"],"sourceRoot":""}]);
|
|
403
403
|
// Exports
|
|
404
404
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
405
405
|
|
|
@@ -4289,24 +4289,24 @@ function Table(_ref) {
|
|
|
4289
4289
|
rowKeyExtractor = (row, index) => index
|
|
4290
4290
|
} = _ref;
|
|
4291
4291
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
4292
|
-
className: "
|
|
4292
|
+
className: "wrapper w-full ".concat(className)
|
|
4293
4293
|
}, /*#__PURE__*/external_react_default().createElement("table", {
|
|
4294
|
-
className: "min-w-full
|
|
4294
|
+
className: " min-w-full table-auto text-left border-collapse table"
|
|
4295
4295
|
}, /*#__PURE__*/external_react_default().createElement("thead", {
|
|
4296
4296
|
className: "hidden sm:table-header-group"
|
|
4297
4297
|
}, /*#__PURE__*/external_react_default().createElement("tr", {
|
|
4298
4298
|
className: "bg-[--color-table-head-bg] ".concat(headRowClassName)
|
|
4299
4299
|
}, data.map(column => /*#__PURE__*/external_react_default().createElement("th", {
|
|
4300
4300
|
key: column.key,
|
|
4301
|
-
className: "border-b border-[--color-stroke] py-2 px-4 text-sm font-normal text-[--color-table-head-txt] ".concat(headCellClassName)
|
|
4301
|
+
className: "\n border-b border-[--color-stroke] \n py-2 px-4 \n text-sm font-normal text-[--color-table-head-txt] ".concat(headCellClassName)
|
|
4302
4302
|
}, column.header)))), /*#__PURE__*/external_react_default().createElement("tbody", null, rows.map((row, index) => {
|
|
4303
4303
|
const backgroundClass = index % 2 === 0 ? 'bg-[--color-table-row-bg-even]' : 'bg-[--color-table-row-bg-odd]';
|
|
4304
4304
|
return /*#__PURE__*/external_react_default().createElement("tr", {
|
|
4305
4305
|
key: rowKeyExtractor(row, index),
|
|
4306
|
-
className: "block sm:table-row mb-4 sm:mb-0 rounded-lg sm:rounded-none border sm:border-0 border-[--color-stroke] p-4 sm:p-0 shadow-sm sm:shadow-none hover:bg-[--color-table-row-bg-hover] ".concat(backgroundClass, " ").concat(rowClassName)
|
|
4306
|
+
className: "block \n sm:table-row \n mb-4 sm:mb-0 \n rounded-lg sm:rounded-none \n border sm:border-0 border-[--color-stroke] \n p-4 sm:p-0 \n shadow-sm sm:shadow-none \n hover:bg-[--color-table-row-bg-hover] ".concat(backgroundClass, " ").concat(rowClassName)
|
|
4307
4307
|
}, data.map(column => /*#__PURE__*/external_react_default().createElement("td", {
|
|
4308
4308
|
key: column.key,
|
|
4309
|
-
className: "block sm:table-cell lg:px-4 lg:py-2 text-sm text-[--color-text-weak] ".concat(cellClassName),
|
|
4309
|
+
className: "\n block sm:table-cell \n lg:px-4 lg:py-2 \n text-sm text-[--color-text-weak] ".concat(cellClassName),
|
|
4310
4310
|
"data-label": column.header
|
|
4311
4311
|
}, column.render ? column.render(row) : row[column.key])));
|
|
4312
4312
|
}))));
|
|
@@ -12965,6 +12965,38 @@ const Navbar = _ref => {
|
|
|
12965
12965
|
}, children)));
|
|
12966
12966
|
};
|
|
12967
12967
|
/* harmony default export */ const Navbar_Navbar = (Navbar);
|
|
12968
|
+
;// external "opus-toolkit-styles/assets/logos/c247-loader.gif"
|
|
12969
|
+
const c247_loader_gif_namespaceObject = require("opus-toolkit-styles/assets/logos/c247-loader.gif");
|
|
12970
|
+
var c247_loader_gif_default = /*#__PURE__*/__webpack_require__.n(c247_loader_gif_namespaceObject);
|
|
12971
|
+
;// ./src/components/Loader/Loader.js
|
|
12972
|
+
|
|
12973
|
+
|
|
12974
|
+
|
|
12975
|
+
// TODO: Consider refactoring Loader to remove internal isLoading logic.
|
|
12976
|
+
// It's currently responsible for both rendering logic and presentation.
|
|
12977
|
+
// In production, it's better to let the parent control rendering to keep Loader focused on UI.
|
|
12978
|
+
// This change would improve testability, flexibility, and follow React best practices.
|
|
12979
|
+
|
|
12980
|
+
function Loader(_ref) {
|
|
12981
|
+
let {
|
|
12982
|
+
isLoading,
|
|
12983
|
+
loaderText = 'loading...',
|
|
12984
|
+
customLoader,
|
|
12985
|
+
className = ''
|
|
12986
|
+
} = _ref;
|
|
12987
|
+
return isLoading && /*#__PURE__*/external_react_default().createElement("div", {
|
|
12988
|
+
role: "status",
|
|
12989
|
+
"aria-live": "polite",
|
|
12990
|
+
className: "fixed inset-0 flex flex-col items-center justify-center bg-[--color-primary-bg] bg-opacity-50 z-50 ".concat(className)
|
|
12991
|
+
}, customLoader ? customLoader : /*#__PURE__*/external_react_default().createElement("img", {
|
|
12992
|
+
src: (c247_loader_gif_default()),
|
|
12993
|
+
alt: "Loading",
|
|
12994
|
+
className: "h-60"
|
|
12995
|
+
}), /*#__PURE__*/external_react_default().createElement(Text, {
|
|
12996
|
+
variant: "h4",
|
|
12997
|
+
className: "mt-4 animate-pulse text-center"
|
|
12998
|
+
}, loaderText));
|
|
12999
|
+
}
|
|
12968
13000
|
;// ./node_modules/@heroicons/react/24/solid/esm/XMarkIcon.js
|
|
12969
13001
|
|
|
12970
13002
|
function XMarkIcon({
|
|
@@ -12994,10 +13026,13 @@ const XMarkIcon_ForwardRef = /*#__PURE__*/ external_react_.forwardRef(XMarkIcon)
|
|
|
12994
13026
|
|
|
12995
13027
|
|
|
12996
13028
|
|
|
13029
|
+
|
|
12997
13030
|
const Modal = _ref => {
|
|
12998
13031
|
let {
|
|
12999
13032
|
isOpen,
|
|
13000
13033
|
onClose,
|
|
13034
|
+
isLoading = false,
|
|
13035
|
+
loaderText = 'Loading...',
|
|
13001
13036
|
header,
|
|
13002
13037
|
body,
|
|
13003
13038
|
footer,
|
|
@@ -13025,9 +13060,15 @@ const Modal = _ref => {
|
|
|
13025
13060
|
"aria-modal": "true",
|
|
13026
13061
|
"aria-labelledby": "modal-title",
|
|
13027
13062
|
"aria-describedby": "modal-description",
|
|
13028
|
-
className: "bg-[--color-primary-bg] rounded-lg shadow-xl w-11/12 max-w-fit p-6 ".concat(className)
|
|
13029
|
-
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
13030
|
-
className: "flex justify-
|
|
13063
|
+
className: "relative bg-[--color-primary-bg] rounded-lg shadow-xl w-11/12 max-w-fit p-6 ".concat(className)
|
|
13064
|
+
}, isLoading && /*#__PURE__*/external_react_default().createElement("div", {
|
|
13065
|
+
className: "absolute inset-0 z-10 flex flex-col bg-[--color-primary-bg] items-center justify-center rounded-lg ".concat(isLoading ? 'opacity-1' : 'opacity-0 pointer-events-none')
|
|
13066
|
+
}, /*#__PURE__*/external_react_default().createElement(Loader, {
|
|
13067
|
+
isLoading: true,
|
|
13068
|
+
loaderText: loaderText,
|
|
13069
|
+
className: "relative z-20 w-[150px] h-[110px]"
|
|
13070
|
+
})), /*#__PURE__*/external_react_default().createElement("div", {
|
|
13071
|
+
className: "flex justify-end pb-3 relative z-0"
|
|
13031
13072
|
}, /*#__PURE__*/external_react_default().createElement("button", {
|
|
13032
13073
|
onClick: onClose,
|
|
13033
13074
|
className: "hover:cursor-pointer text-[--color-text-strong]",
|
|
@@ -13036,44 +13077,17 @@ const Modal = _ref => {
|
|
|
13036
13077
|
width: "24px",
|
|
13037
13078
|
className: "text-[--color-text-strong]"
|
|
13038
13079
|
}))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
13039
|
-
className: "border-b border-[--color-stroke] pb-4 text-[--color-text-strong] ".concat(headerClassName)
|
|
13080
|
+
className: "border-b border-[--color-stroke] pb-4 text-[--color-text-strong] relative z-0 ".concat(headerClassName)
|
|
13040
13081
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
13041
13082
|
id: "modal-title"
|
|
13042
13083
|
}, header)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
13043
13084
|
id: "modal-description",
|
|
13044
|
-
className: "my-4 text-[--color-text-weak]"
|
|
13085
|
+
className: "my-4 text-[--color-text-weak] relative z-0"
|
|
13045
13086
|
}, body), /*#__PURE__*/external_react_default().createElement("div", {
|
|
13046
|
-
className: "text-[--color-text-weak] ".concat(footerClassName)
|
|
13087
|
+
className: "text-[--color-text-weak] relative z-0 ".concat(footerClassName)
|
|
13047
13088
|
}, footer)));
|
|
13048
13089
|
};
|
|
13049
13090
|
/* harmony default export */ const Modals_Modal = (Modal);
|
|
13050
|
-
;// external "opus-toolkit-styles/assets/logos/c247-loader.gif"
|
|
13051
|
-
const c247_loader_gif_namespaceObject = require("opus-toolkit-styles/assets/logos/c247-loader.gif");
|
|
13052
|
-
var c247_loader_gif_default = /*#__PURE__*/__webpack_require__.n(c247_loader_gif_namespaceObject);
|
|
13053
|
-
;// ./src/components/Loader/Loader.js
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
function Loader(_ref) {
|
|
13058
|
-
let {
|
|
13059
|
-
isLoading,
|
|
13060
|
-
loaderText = 'loading...',
|
|
13061
|
-
customLoader,
|
|
13062
|
-
className = ''
|
|
13063
|
-
} = _ref;
|
|
13064
|
-
return isLoading && /*#__PURE__*/external_react_default().createElement("div", {
|
|
13065
|
-
role: "status",
|
|
13066
|
-
"aria-live": "polite",
|
|
13067
|
-
className: "fixed inset-0 flex flex-col items-center justify-center bg-greySunkenDark1000 bg-opacity-80 z-50 ".concat(className)
|
|
13068
|
-
}, customLoader ? customLoader : /*#__PURE__*/external_react_default().createElement("img", {
|
|
13069
|
-
src: (c247_loader_gif_default()),
|
|
13070
|
-
alt: "Loading",
|
|
13071
|
-
className: "h-60"
|
|
13072
|
-
}), /*#__PURE__*/external_react_default().createElement(Text, {
|
|
13073
|
-
variant: "h4",
|
|
13074
|
-
className: "mt-4 animate-pulse"
|
|
13075
|
-
}, loaderText));
|
|
13076
|
-
}
|
|
13077
13091
|
;// external "opus-toolkit-styles/assets/logos/footer-logos.svg"
|
|
13078
13092
|
const footer_logos_svg_namespaceObject = require("opus-toolkit-styles/assets/logos/footer-logos.svg");
|
|
13079
13093
|
var footer_logos_svg_default = /*#__PURE__*/__webpack_require__.n(footer_logos_svg_namespaceObject);
|