opus-toolkit-components 1.1.0 → 1.1.1
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.
|
@@ -505,7 +505,7 @@ module.exports = insertBySelector;
|
|
|
505
505
|
|
|
506
506
|
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()));
|
|
507
507
|
// Module
|
|
508
|
-
___CSS_LOADER_EXPORT___.push([module.id, `table thead th:first-of-type{border-top-left-radius:8px}table thead th:last-of-type{border-top-right-radius:8px}table tr:last-of-type td:first-of-type{border-bottom-left-radius:8px}table tr:last-of-type td:last-of-type{border-bottom-right-radius:8px}`, "",{"version":3,"sources":["webpack://./src/components/Tables/table.scss"],"names":[],"mappings":"
|
|
508
|
+
___CSS_LOADER_EXPORT___.push([module.id, `table{width:100%}table thead th:first-of-type{border-top-left-radius:8px}table thead th:last-of-type{border-top-right-radius:8px}table tr:last-of-type td:first-of-type{border-bottom-left-radius:8px}table tr:last-of-type td:last-of-type{border-bottom-right-radius:8px}@media(max-width: 640px){.responsive-table-wrapper td::before{content:attr(data-label);display:block;font-weight:600;text-transform:uppercase;margin-bottom:.25rem;color:var(--color-text-strong)}.responsive-table-wrapper tr{display:block}.responsive-table-wrapper td{display:block;padding-left:1rem;padding-right:1rem}.responsive-table-wrapper thead{display:none}}`, "",{"version":3,"sources":["webpack://./src/components/Tables/table.scss"],"names":[],"mappings":"AAAA,MAuBI,UAAA,CApBQ,6BACI,0BAAA,CAEJ,4BACI,2BAAA,CAOA,uCACI,6BAAA,CAEJ,sCACI,8BAAA,CAQpB,yBACI,qCACE,wBAAA,CACA,aAAA,CACA,eAAA,CACA,wBAAA,CACA,oBAAA,CACA,8BAAA,CAGF,6BACE,aAAA,CAGF,6BACE,aAAA,CACA,iBAAA,CACA,kBAAA,CAGF,gCACE,YAAA,CAAA","sourcesContent":["table {\r\n thead {\r\n th {\r\n &:first-of-type {\r\n border-top-left-radius: 8px;\r\n }\r\n &:last-of-type {\r\n border-top-right-radius: 8px;\r\n }\r\n }\r\n }\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 &:last-of-type {\r\n border-bottom-right-radius: 8px;\r\n }\r\n }\r\n } \r\n }\r\n width: 100%; \r\n}\r\n\r\n@media (max-width: 640px) {\r\n .responsive-table-wrapper 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 .responsive-table-wrapper tr {\r\n display: block;\r\n }\r\n \r\n .responsive-table-wrapper td {\r\n display: block;\r\n padding-left: 1rem;\r\n padding-right: 1rem;\r\n }\r\n \r\n .responsive-table-wrapper thead {\r\n display: none;\r\n }\r\n }"],"sourceRoot":""}]);
|
|
509
509
|
// Exports
|
|
510
510
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
511
511
|
|
|
@@ -692,7 +692,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
692
692
|
Button: () => (/* reexport */ Button),
|
|
693
693
|
Card: () => (/* reexport */ Card),
|
|
694
694
|
Checkbox: () => (/* reexport */ Checkbox),
|
|
695
|
-
CookieBanner: () => (/* reexport */
|
|
695
|
+
CookieBanner: () => (/* reexport */ Cookie),
|
|
696
696
|
DatePicker: () => (/* reexport */ DatePicker),
|
|
697
697
|
Dropdown: () => (/* reexport */ Dropdown),
|
|
698
698
|
Input: () => (/* reexport */ Inputs_Input),
|
|
@@ -4180,30 +4180,36 @@ var table_update = injectStylesIntoStyleTag_default()(table/* default */.A, tabl
|
|
|
4180
4180
|
function Table(_ref) {
|
|
4181
4181
|
let {
|
|
4182
4182
|
data = [],
|
|
4183
|
-
// Array defining columns and rendering logic
|
|
4184
4183
|
rows = [],
|
|
4185
|
-
// Array defining rows
|
|
4186
4184
|
className = '',
|
|
4187
4185
|
rowClassName = '',
|
|
4188
4186
|
cellClassName = '',
|
|
4189
4187
|
headRowClassName = '',
|
|
4190
4188
|
headCellClassName = '',
|
|
4191
|
-
rowKeyExtractor = (row, index) => index
|
|
4189
|
+
rowKeyExtractor = (row, index) => index
|
|
4192
4190
|
} = _ref;
|
|
4193
|
-
return /*#__PURE__*/external_react_default().createElement("
|
|
4194
|
-
className: "
|
|
4195
|
-
}, /*#__PURE__*/external_react_default().createElement("
|
|
4191
|
+
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
4192
|
+
className: "responsive-table-wrapper w-full ".concat(className)
|
|
4193
|
+
}, /*#__PURE__*/external_react_default().createElement("table", {
|
|
4194
|
+
className: "min-w-full table-auto text-left border-collapse"
|
|
4195
|
+
}, /*#__PURE__*/external_react_default().createElement("thead", {
|
|
4196
|
+
className: "hidden sm:table-header-group"
|
|
4197
|
+
}, /*#__PURE__*/external_react_default().createElement("tr", {
|
|
4196
4198
|
className: "bg-[--color-table-head-bg] ".concat(headRowClassName)
|
|
4197
4199
|
}, data.map(column => /*#__PURE__*/external_react_default().createElement("th", {
|
|
4198
4200
|
key: column.key,
|
|
4199
|
-
className: "border-b border-[--color-stroke] py-2 px-4 text-sm font-normal text-[--color-
|
|
4200
|
-
}, column.header)))), /*#__PURE__*/external_react_default().createElement("tbody", null, rows.map((row, index) =>
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4201
|
+
className: "border-b border-[--color-stroke] py-2 px-4 text-sm font-normal text-[--color-table-head-txt] ".concat(headCellClassName)
|
|
4202
|
+
}, column.header)))), /*#__PURE__*/external_react_default().createElement("tbody", null, rows.map((row, index) => {
|
|
4203
|
+
const backgroundClass = index % 2 === 0 ? 'bg-[--color-table-row-bg-even]' : 'bg-[--color-table-row-bg-odd]';
|
|
4204
|
+
return /*#__PURE__*/external_react_default().createElement("tr", {
|
|
4205
|
+
key: rowKeyExtractor(row, index),
|
|
4206
|
+
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)
|
|
4207
|
+
}, data.map(column => /*#__PURE__*/external_react_default().createElement("td", {
|
|
4208
|
+
key: column.key,
|
|
4209
|
+
className: "block sm:table-cell px-4 py-2 text-sm text-[--color-text-weak] ".concat(cellClassName),
|
|
4210
|
+
"data-label": column.header
|
|
4211
|
+
}, column.render ? column.render(row) : row[column.key])));
|
|
4212
|
+
}))));
|
|
4207
4213
|
}
|
|
4208
4214
|
;// ./node_modules/@react-aria/utils/dist/useLayoutEffect.mjs
|
|
4209
4215
|
|
|
@@ -12911,7 +12917,7 @@ function Loader(_ref) {
|
|
|
12911
12917
|
}
|
|
12912
12918
|
;// external "opus-toolkit-styles/assets/logos/footer-logos.svg"
|
|
12913
12919
|
const footer_logos_svg_namespaceObject = require("opus-toolkit-styles/assets/logos/footer-logos.svg");
|
|
12914
|
-
;// ./src/components/
|
|
12920
|
+
;// ./src/components/Cookie/Cookie.js
|
|
12915
12921
|
|
|
12916
12922
|
|
|
12917
12923
|
|
|
@@ -12948,9 +12954,9 @@ const CookieBanner = _ref => {
|
|
|
12948
12954
|
if (!render) return null;
|
|
12949
12955
|
return /*#__PURE__*/external_react_default().createElement(Card, {
|
|
12950
12956
|
intent: "brandSecondary",
|
|
12951
|
-
className: "\n flex items-center justify-between p-4 space-x-4\n transition-all duration-300 ease-in-out\n ".concat(show ? "opacity-100 translate-y-0" : "opacity-0 translate-y-3", "\n ")
|
|
12957
|
+
className: "\n md:flex items-center justify-between p-4 space-x-4\n transition-all duration-300 ease-in-out\n ".concat(show ? "opacity-100 translate-y-0" : "opacity-0 translate-y-3", "\n ")
|
|
12952
12958
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
12953
|
-
className: "flex items-center"
|
|
12959
|
+
className: "md:flex items-center"
|
|
12954
12960
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
12955
12961
|
className: "flex-shrink-0 mr-4"
|
|
12956
12962
|
}, logo ? /*#__PURE__*/external_react_default().createElement("img", {
|
|
@@ -12978,7 +12984,7 @@ const CookieBanner = _ref => {
|
|
|
12978
12984
|
}
|
|
12979
12985
|
})));
|
|
12980
12986
|
};
|
|
12981
|
-
/* harmony default export */ const
|
|
12987
|
+
/* harmony default export */ const Cookie = (CookieBanner);
|
|
12982
12988
|
;// ./src/index.js
|
|
12983
12989
|
|
|
12984
12990
|
|
|
@@ -12998,4 +13004,4 @@ const CookieBanner = _ref => {
|
|
|
12998
13004
|
/******/ })()
|
|
12999
13005
|
;
|
|
13000
13006
|
});
|
|
13001
|
-
//# sourceMappingURL=main.
|
|
13007
|
+
//# sourceMappingURL=main.af7bdb60c408fab716fd.js.map
|