@gbmtech/aurora-ui 0.4.8 → 0.4.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.
@@ -1,2 +1,2 @@
1
- "use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./data-table-action-bar":function(e){e.exports=require("./data-table-action-bar.cjs")},"./data-table-advanced-toolbar":function(e){e.exports=require("./data-table-advanced-toolbar.cjs")},"./data-table-column-header":function(e){e.exports=require("./data-table-column-header.cjs")},"@/components/data-table/data-table-date-filter":function(e){e.exports=require("./data-table-date-filter.cjs")},"@/components/data-table/data-table-faceted-filter":function(e){e.exports=require("./data-table-faceted-filter.cjs")},"./data-table-filter-list":function(e){e.exports=require("./data-table-filter-list.cjs")},"./data-table-filter-menu":function(e){e.exports=require("./data-table-filter-menu.cjs")},"@/components/data-table/data-table-pagination":function(e){e.exports=require("./data-table-pagination.cjs")},"./data-table-range-filter":function(e){e.exports=require("./data-table-range-filter.cjs")},"./data-table-skeleton":function(e){e.exports=require("./data-table-skeleton.cjs")},"@/components/data-table/data-table-slider-filter":function(e){e.exports=require("./data-table-slider-filter.cjs")},"./data-table-sort-list":function(e){e.exports=require("./data-table-sort-list.cjs")},"./data-table-toolbar":function(e){e.exports=require("./data-table-toolbar.cjs")},"@/components/data-table/data-table-view-options":function(e){e.exports=require("./data-table-view-options.cjs")},"./data-table":function(e){e.exports=require("./data-table.cjs")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{__webpack_require__.r(__webpack_exports__);var e=__webpack_require__("./data-table-action-bar"),_={};for(var a in e)"default"!==a&&(_[a]=(function(_){return e[_]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var r=__webpack_require__("./data-table-advanced-toolbar"),_={};for(var a in r)"default"!==a&&(_[a]=(function(e){return r[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var t=__webpack_require__("./data-table-column-header"),_={};for(var a in t)"default"!==a&&(_[a]=(function(e){return t[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var i=__webpack_require__("@/components/data-table/data-table-date-filter"),_={};for(var a in i)"default"!==a&&(_[a]=(function(e){return i[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var n=__webpack_require__("@/components/data-table/data-table-faceted-filter"),_={};for(var a in n)"default"!==a&&(_[a]=(function(e){return n[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var o=__webpack_require__("./data-table-filter-list"),_={};for(var a in o)"default"!==a&&(_[a]=(function(e){return o[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var c=__webpack_require__("./data-table-filter-menu"),_={};for(var a in c)"default"!==a&&(_[a]=(function(e){return c[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var b=__webpack_require__("@/components/data-table/data-table-pagination"),_={};for(var a in b)"default"!==a&&(_[a]=(function(e){return b[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var u=__webpack_require__("./data-table-range-filter"),_={};for(var a in u)"default"!==a&&(_[a]=(function(e){return u[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var d=__webpack_require__("./data-table-skeleton"),_={};for(var a in d)"default"!==a&&(_[a]=(function(e){return d[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var p=__webpack_require__("@/components/data-table/data-table-slider-filter"),_={};for(var a in p)"default"!==a&&(_[a]=(function(e){return p[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var l=__webpack_require__("./data-table-sort-list"),_={};for(var a in l)"default"!==a&&(_[a]=(function(e){return l[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var f=__webpack_require__("./data-table-toolbar"),_={};for(var a in f)"default"!==a&&(_[a]=(function(e){return f[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var s=__webpack_require__("@/components/data-table/data-table-view-options"),_={};for(var a in s)"default"!==a&&(_[a]=(function(e){return s[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var w=__webpack_require__("./data-table"),_={};for(var a in w)"default"!==a&&(_[a]=(function(e){return w[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_)})(),__webpack_exports__)exports[__webpack_i__]=__webpack_exports__[__webpack_i__];Object.defineProperty(exports,"__esModule",{value:!0});
1
+ "use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./data-table-action-bar":function(e){e.exports=require("./data-table-action-bar.cjs")},"./data-table-advanced-toolbar":function(e){e.exports=require("./data-table-advanced-toolbar.cjs")},"./data-table-column-header":function(e){e.exports=require("./data-table-column-header.cjs")},"@/components/data-table/data-table-date-filter":function(e){e.exports=require("./data-table-date-filter.cjs")},"@/components/data-table/data-table-faceted-filter":function(e){e.exports=require("./data-table-faceted-filter.cjs")},"./data-table-filter-list":function(e){e.exports=require("./data-table-filter-list.cjs")},"./data-table-filter-menu":function(e){e.exports=require("./data-table-filter-menu.cjs")},"@/components/data-table/data-table-pagination":function(e){e.exports=require("./data-table-pagination.cjs")},"@/components/data-table/data-table-range-filter":function(e){e.exports=require("./data-table-range-filter.cjs")},"./data-table-skeleton":function(e){e.exports=require("./data-table-skeleton.cjs")},"@/components/data-table/data-table-slider-filter":function(e){e.exports=require("./data-table-slider-filter.cjs")},"./data-table-sort-list":function(e){e.exports=require("./data-table-sort-list.cjs")},"./data-table-toolbar":function(e){e.exports=require("./data-table-toolbar.cjs")},"@/components/data-table/data-table-view-options":function(e){e.exports=require("./data-table-view-options.cjs")},"./data-table":function(e){e.exports=require("./data-table.cjs")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{__webpack_require__.r(__webpack_exports__);var e=__webpack_require__("./data-table-action-bar"),_={};for(var a in e)"default"!==a&&(_[a]=(function(_){return e[_]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var t=__webpack_require__("./data-table-advanced-toolbar"),_={};for(var a in t)"default"!==a&&(_[a]=(function(e){return t[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var r=__webpack_require__("./data-table-column-header"),_={};for(var a in r)"default"!==a&&(_[a]=(function(e){return r[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var n=__webpack_require__("@/components/data-table/data-table-date-filter"),_={};for(var a in n)"default"!==a&&(_[a]=(function(e){return n[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var i=__webpack_require__("@/components/data-table/data-table-faceted-filter"),_={};for(var a in i)"default"!==a&&(_[a]=(function(e){return i[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var o=__webpack_require__("./data-table-filter-list"),_={};for(var a in o)"default"!==a&&(_[a]=(function(e){return o[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var c=__webpack_require__("./data-table-filter-menu"),_={};for(var a in c)"default"!==a&&(_[a]=(function(e){return c[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var b=__webpack_require__("@/components/data-table/data-table-pagination"),_={};for(var a in b)"default"!==a&&(_[a]=(function(e){return b[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var u=__webpack_require__("@/components/data-table/data-table-range-filter"),_={};for(var a in u)"default"!==a&&(_[a]=(function(e){return u[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var d=__webpack_require__("./data-table-skeleton"),_={};for(var a in d)"default"!==a&&(_[a]=(function(e){return d[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var p=__webpack_require__("@/components/data-table/data-table-slider-filter"),_={};for(var a in p)"default"!==a&&(_[a]=(function(e){return p[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var l=__webpack_require__("./data-table-sort-list"),_={};for(var a in l)"default"!==a&&(_[a]=(function(e){return l[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var f=__webpack_require__("./data-table-toolbar"),_={};for(var a in f)"default"!==a&&(_[a]=(function(e){return f[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var s=__webpack_require__("@/components/data-table/data-table-view-options"),_={};for(var a in s)"default"!==a&&(_[a]=(function(e){return s[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var w=__webpack_require__("./data-table"),_={};for(var a in w)"default"!==a&&(_[a]=(function(e){return w[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_)})(),__webpack_exports__)exports[__webpack_i__]=__webpack_exports__[__webpack_i__];Object.defineProperty(exports,"__esModule",{value:!0});
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\data-table\\index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM 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};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\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};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"s5DACAA,oBAAoB,CAAC,CAAG,AAAC,IACxB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADAA,oBAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,AAACC,IACrB,AAAkB,aAAlB,OAAOE,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}
1
+ {"version":3,"file":"components\\data-table\\index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM 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};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\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};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"46DACAA,oBAAoB,CAAC,CAAG,AAAC,IACxB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADAA,oBAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,AAACC,IACrB,AAAkB,aAAlB,OAAOE,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- "use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(a,{a:a}),a},__webpack_require__.d=(e,a)=>{for(var r in a)__webpack_require__.o(a,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ExpandableTableRowWrapper:()=>ExpandableTableRowWrapper,ExpandableTableRow:()=>ExpandableTableRow});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_slot_namespaceObject=require("@radix-ui/react-slot"),external_framer_motion_namespaceObject=require("framer-motion"),external_react_namespaceObject=require("react");var external_react_default=__webpack_require__.n(external_react_namespaceObject);let external_lucide_react_namespaceObject=require("lucide-react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),ExpandableTableRowWrapper=external_react_default().forwardRef(({children:e,contentColSpan:a,isExpanded:r,onToggleExpand:t})=>{let[_,n]=(0,external_react_namespaceObject.useState)(!1),[c,i]=e,l=void 0!==r?r:_,p=a+1;return(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[(0,jsx_runtime_namespaceObject.jsx)(react_slot_namespaceObject.Slot,{onClick:()=>{t?t():n(e=>!e)},"data-expanded":l,children:c}),(0,jsx_runtime_namespaceObject.jsx)(ExpandableTableRowContent,{colSpan:p,"aria-colspan":p,isExpanded:l,children:i})]})});ExpandableTableRowWrapper.displayName="ExpandableTableRowWrapper";let ExpandableTableRow=external_react_default().forwardRef(({className:e,children:a,showIcon:r=!0,...t},_)=>(0,jsx_runtime_namespaceObject.jsxs)("tr",{ref:_,className:(0,utils_cjs_namespaceObject.cn)("cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100",e),...t,children:[(0,jsx_runtime_namespaceObject.jsx)("td",{className:(0,utils_cjs_namespaceObject.cn)("w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0",{}),children:(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.div,{initial:{rotate:0},animate:{rotate:t["data-expanded"]?-180:0},transition:{duration:.3},className:"w-min origin-center",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown,{size:16,className:(0,utils_cjs_namespaceObject.cn)("stroke-2 text-gbm-dark",{"text-transparent":!r})})})}),a]}));ExpandableTableRow.displayName="ExpandableTableRow";let ExpandableTableRowContent=external_react_default().forwardRef(({className:e,isExpanded:a,...r},t)=>(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.AnimatePresence,{initial:!1,children:a&&(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.tr,{className:(0,utils_cjs_namespaceObject.cn)("border-y",e),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,jsx_runtime_namespaceObject.jsx)("td",{colSpan:r.colSpan,children:(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.3,ease:"linear"},opacity:{duration:.2}},className:"overflow-hidden",children:(0,jsx_runtime_namespaceObject.jsx)("div",{ref:t,children:r.children})})})},"expandable-row")}));for(var __webpack_i__ in ExpandableTableRowContent.displayName="ExpandableTableRowContent",exports.ExpandableTableRow=__webpack_exports__.ExpandableTableRow,exports.ExpandableTableRowWrapper=__webpack_exports__.ExpandableTableRowWrapper,__webpack_exports__)-1===["ExpandableTableRow","ExpandableTableRowWrapper"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
2
+ "use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ExpandableTableRowContent:()=>ExpandableTableRowContent,ExpandableTableRowWrapper:()=>ExpandableTableRowWrapper,ExpandableTableRow:()=>ExpandableTableRow});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_slot_namespaceObject=require("@radix-ui/react-slot"),external_framer_motion_namespaceObject=require("framer-motion"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs");function ExpandableTableRowWrapper({children:e,contentColSpan:a,isExpanded:t,onToggleExpand:r}){let[n,_]=(0,external_react_namespaceObject.useState)(!1),[c,i]=e,o=void 0!==t?t:n,s=a+1;return(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[(0,jsx_runtime_namespaceObject.jsx)(react_slot_namespaceObject.Slot,{onClick:()=>{r?r():_(e=>!e)},"data-expanded":o,children:c}),(0,jsx_runtime_namespaceObject.jsx)(ExpandableTableRowContent,{colSpan:s,"aria-colspan":s,isExpanded:o,children:i})]})}function ExpandableTableRow({className:e,children:a,showIcon:t=!0,...r}){return(0,jsx_runtime_namespaceObject.jsxs)("tr",{className:(0,utils_cjs_namespaceObject.cn)("cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100",e),...r,children:[(0,jsx_runtime_namespaceObject.jsx)("td",{className:(0,utils_cjs_namespaceObject.cn)("w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0"),children:(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.div,{initial:{rotate:0},animate:{rotate:r["data-expanded"]?-180:0},transition:{duration:.3},className:"w-min origin-center",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown,{size:16,className:(0,utils_cjs_namespaceObject.cn)("stroke-2 text-gbm-dark",{"text-transparent":!t})})})}),a]})}function ExpandableTableRowContent({className:e,isExpanded:a,...t}){return(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.AnimatePresence,{initial:!1,children:a&&(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.tr,{className:(0,utils_cjs_namespaceObject.cn)("border-y",e),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,jsx_runtime_namespaceObject.jsx)("td",{colSpan:t.colSpan,children:(0,jsx_runtime_namespaceObject.jsx)(external_framer_motion_namespaceObject.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.3,ease:"linear"},opacity:{duration:.2}},className:"overflow-hidden",children:(0,jsx_runtime_namespaceObject.jsx)("div",{children:t.children})})})},"expandable-row")})}for(var __webpack_i__ in exports.ExpandableTableRow=__webpack_exports__.ExpandableTableRow,exports.ExpandableTableRowContent=__webpack_exports__.ExpandableTableRowContent,exports.ExpandableTableRowWrapper=__webpack_exports__.ExpandableTableRowWrapper,__webpack_exports__)-1===["ExpandableTableRow","ExpandableTableRowContent","ExpandableTableRowWrapper"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
3
  //# sourceMappingURL=table-expandable.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\table-expandable.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/table-expandable.tsx"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM 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};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\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};","\r\n\r\nimport { Slot } from '@radix-ui/react-slot'\r\nimport { AnimatePresence, motion } from 'framer-motion'\r\nimport React, { useState } from 'react'\r\n\r\nimport { ChevronDown } from 'lucide-react'\r\nimport { cn } from '../lib/utils'\r\n\r\ntype ExpandableTableRowWrapperProps = React.HTMLAttributes<HTMLDivElement> & {\r\n children: [React.ReactNode, React.ReactNode]\r\n /**\r\n * Number of columns the content will occupy when expanded\r\n * Not counting the icon column that comes by default\r\n */\r\n contentColSpan: number\r\n isExpanded?: boolean\r\n onToggleExpand?: VoidFunction\r\n}\r\n\r\n/**\r\n * A wrapper for expandable table rows.\r\n *\r\n * @param children - The first must be of type ExpandableTableRow and the second any component, such as a div.\r\n * @param contentColSpan - Number of columns the content will occupy when expanded (excluding the default icon column).\r\n */\r\nconst ExpandableTableRowWrapper = React.forwardRef<\r\n HTMLDivElement,\r\n ExpandableTableRowWrapperProps\r\n>(({ children, contentColSpan, isExpanded, onToggleExpand }) => {\r\n const [internalIsExpanded, setInternalIsExpanded] = useState(false)\r\n const [Row, Content] = children\r\n\r\n const expanded = isExpanded !== undefined ? isExpanded : internalIsExpanded\r\n const toggleExpand = () => {\r\n if (onToggleExpand) {\r\n onToggleExpand()\r\n } else {\r\n setInternalIsExpanded(prev => !prev)\r\n }\r\n }\r\n\r\n const sumOfColspanAndIconColumn = contentColSpan + 1\r\n\r\n return (\r\n <>\r\n <Slot onClick={toggleExpand} data-expanded={expanded}>\r\n {Row}\r\n </Slot>\r\n <ExpandableTableRowContent\r\n colSpan={sumOfColspanAndIconColumn}\r\n aria-colspan={sumOfColspanAndIconColumn}\r\n isExpanded={expanded}\r\n >\r\n {Content}\r\n </ExpandableTableRowContent>\r\n </>\r\n )\r\n})\r\nExpandableTableRowWrapper.displayName = 'ExpandableTableRowWrapper'\r\n\r\ntype ExpandableTableRowProps = React.HTMLAttributes<HTMLTableRowElement> & {\r\n showIcon?: boolean\r\n 'data-expanded'?: boolean\r\n}\r\n\r\nconst ExpandableTableRow = React.forwardRef<\r\n HTMLTableRowElement,\r\n ExpandableTableRowProps\r\n>(({ className, children, showIcon = true, ...props }, ref) => (\r\n <tr\r\n ref={ref}\r\n className={cn(\r\n 'cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <td\r\n className={cn('w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0', {})}\r\n >\r\n <motion.div\r\n initial={{ rotate: 0 }}\r\n animate={{ rotate: props['data-expanded'] ? -180 : 0 }}\r\n transition={{ duration: 0.3 }}\r\n className=\"w-min origin-center\"\r\n >\r\n <ChevronDown\r\n size={16}\r\n className={cn('stroke-2 text-gbm-dark', {\r\n 'text-transparent': !showIcon,\r\n })}\r\n />\r\n </motion.div>\r\n </td>\r\n {children}\r\n </tr>\r\n))\r\nExpandableTableRow.displayName = 'ExpandableTableRow'\r\n\r\ntype ExpandableTableRowContentProps =\r\n React.TdHTMLAttributes<HTMLTableCellElement> & {\r\n isExpanded: boolean\r\n }\r\n\r\nconst ExpandableTableRowContent = React.forwardRef<\r\n HTMLTableCellElement,\r\n ExpandableTableRowContentProps\r\n>(({ className, isExpanded, ...props }, ref) => (\r\n <AnimatePresence initial={false}>\r\n {isExpanded && (\r\n <motion.tr\r\n key=\"expandable-row\"\r\n className={cn('border-y', className)}\r\n initial={{ opacity: 0 }}\r\n animate={{ opacity: 1 }}\r\n exit={{ opacity: 0 }}\r\n transition={{ duration: 0.2 }}\r\n >\r\n <td colSpan={props.colSpan}>\r\n <motion.div\r\n initial={{ height: 0, opacity: 0 }}\r\n animate={{ height: 'auto', opacity: 1 }}\r\n exit={{ height: 0, opacity: 0 }}\r\n transition={{\r\n height: { duration: 0.3, ease: 'linear' },\r\n opacity: { duration: 0.2 },\r\n }}\r\n className=\"overflow-hidden\"\r\n >\r\n <div ref={ref}>{props.children}</div>\r\n </motion.div>\r\n </td>\r\n </motion.tr>\r\n )}\r\n </AnimatePresence>\r\n))\r\nExpandableTableRowContent.displayName = 'ExpandableTableRowContent'\r\n\r\nexport {\r\n ExpandableTableRowWrapper,\r\n ExpandableTableRow,\r\n type ExpandableTableRowWrapperProps,\r\n type ExpandableTableRowProps,\r\n type ExpandableTableRowContentProps,\r\n}\r\n"],"names":["__webpack_require__","e","Object","Symbol","ExpandableTableRowWrapper","React","children","contentColSpan","isExpanded","onToggleExpand","internalIsExpanded","setInternalIsExpanded","useState","Row","Content","expanded","undefined","sumOfColspanAndIconColumn","Slot","prev","ExpandableTableRowContent","ExpandableTableRow","className","showIcon","props","ref","cn","motion","ChevronDown","AnimatePresence"],"mappings":";+PACAA,CAAAA,oBAAoB,CAAC,CAAG,IACvB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADAA,oBAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,EAGxF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,IACpB,oBAAOG,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E,soBCoBMG,0BAA4BC,yBAAAA,UAAgB,CAGhD,CAAC,CAAEC,SAAAA,CAAQ,CAAEC,eAAAA,CAAc,CAAEC,WAAAA,CAAU,CAAEC,eAAAA,CAAc,CAAE,IACzD,GAAM,CAACC,EAAoBC,EAAsB,CAAGC,GAAAA,+BAAAA,QAAAA,EAAS,IACvD,CAACC,EAAKC,EAAQ,CAAGR,EAEjBS,EAAWP,SAAAA,EAA2BA,EAAaE,EASnDO,EAA4BV,EAAiB,EAEnD,MACE,2E,UACE,oCAACW,2BAAAA,IAAIA,CAAAA,CAAC,QAZW,KACfT,EACFA,IAEAE,EAAsBQ,GAAQ,CAACA,EAEnC,EAMiC,gBAAeJ,E,SACzCF,C,GAEH,oCAACO,0BAAAA,CACC,QAASH,EACT,eAAcA,EACd,WAAYF,E,SAEXD,C,KAIT,EACAV,CAAAA,0BAA0B,WAAW,CAAG,4BAOxC,IAAMiB,mBAAqBhB,yBAAAA,UAAgB,CAGzC,CAAC,CAAEiB,UAAAA,CAAS,CAAEhB,SAAAA,CAAQ,CAAEiB,SAAAA,EAAW,EAAI,CAAE,GAAGC,EAAO,CAAEC,IACrD,qCAAC,MACC,IAAKA,EACL,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,iHACAJ,GAED,GAAGE,CAAK,C,UAET,oCAAC,MACC,UAAWE,GAAAA,0BAAAA,EAAAA,EAAG,sDAAuD,CAAC,G,SAEtE,oCAACC,uCAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,CAAE,EACrB,QAAS,CAAE,OAAQH,CAAK,CAAC,gBAAgB,CAAG,KAAO,CAAE,EACrD,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,sB,SAEV,oCAACI,sCAAAA,WAAWA,CAAAA,CACV,KAAM,GACN,UAAWF,GAAAA,0BAAAA,EAAAA,EAAG,yBAA0B,CACtC,mBAAoB,CAACH,CACvB,E,OAILjB,E,GAGLe,CAAAA,mBAAmB,WAAW,CAAG,qBAOjC,IAAMD,0BAA4Bf,yBAAAA,UAAgB,CAGhD,CAAC,CAAEiB,UAAAA,CAAS,CAAEd,WAAAA,CAAU,CAAE,GAAGgB,EAAO,CAAEC,IACtC,oCAACI,uCAAAA,eAAeA,CAAAA,CAAC,QAAS,G,SACvBrB,GACC,oCAACmB,uCAAAA,MAAAA,CAAAA,EAAS,EAER,UAAWD,GAAAA,0BAAAA,EAAAA,EAAG,WAAYJ,GAC1B,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,E,SAE5B,oCAAC,MAAG,QAASE,EAAM,OAAO,C,SACxB,oCAACG,uCAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,EAAG,QAAS,CAAE,EACjC,QAAS,CAAE,OAAQ,OAAQ,QAAS,CAAE,EACtC,KAAM,CAAE,OAAQ,EAAG,QAAS,CAAE,EAC9B,WAAY,CACV,OAAQ,CAAE,SAAU,GAAK,KAAM,QAAS,EACxC,QAAS,CAAE,SAAU,EAAI,CAC3B,EACA,UAAU,kB,SAEV,oCAAC,OAAI,IAAKF,E,SAAMD,EAAM,QAAQ,QAlB9B,iB,6BAyBZJ,0BAA0B,WAAW,CAAG,4B"}
1
+ {"version":3,"file":"components\\table-expandable.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/table-expandable.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\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};","\r\n\r\nimport { Slot } from '@radix-ui/react-slot'\r\nimport { AnimatePresence, motion } from 'framer-motion'\r\nimport { ChevronDown } from 'lucide-react'\r\nimport React, { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nfunction ExpandableTableRowWrapper({\r\n children,\r\n contentColSpan,\r\n isExpanded,\r\n onToggleExpand,\r\n}: ComponentProps<'div'> & {\r\n children: [React.ReactNode, React.ReactNode]\r\n\r\n contentColSpan: number\r\n isExpanded?: boolean\r\n onToggleExpand?: VoidFunction\r\n}) {\r\n const [internalIsExpanded, setInternalIsExpanded] = useState(false)\r\n const [Row, Content] = children\r\n\r\n const expanded = isExpanded !== undefined ? isExpanded : internalIsExpanded\r\n const toggleExpand = () => {\r\n if (onToggleExpand) {\r\n onToggleExpand()\r\n } else {\r\n setInternalIsExpanded(prev => !prev)\r\n }\r\n }\r\n\r\n const sumOfColspanAndIconColumn = contentColSpan + 1\r\n\r\n return (\r\n <>\r\n <Slot onClick={toggleExpand} data-expanded={expanded}>\r\n {Row}\r\n </Slot>\r\n <ExpandableTableRowContent\r\n colSpan={sumOfColspanAndIconColumn}\r\n aria-colspan={sumOfColspanAndIconColumn}\r\n isExpanded={expanded}\r\n >\r\n {Content}\r\n </ExpandableTableRowContent>\r\n </>\r\n )\r\n}\r\n\r\nfunction ExpandableTableRow({\r\n className,\r\n children,\r\n showIcon = true,\r\n ...props\r\n}: ComponentProps<'tr'> & {\r\n showIcon?: boolean\r\n 'data-expanded'?: boolean\r\n}) {\r\n return (\r\n <tr\r\n className={cn(\r\n 'cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <td className={cn('w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0')}>\r\n <motion.div\r\n initial={{ rotate: 0 }}\r\n animate={{ rotate: props['data-expanded'] ? -180 : 0 }}\r\n transition={{ duration: 0.3 }}\r\n className=\"w-min origin-center\"\r\n >\r\n <ChevronDown\r\n size={16}\r\n className={cn('stroke-2 text-gbm-dark', {\r\n 'text-transparent': !showIcon,\r\n })}\r\n />\r\n </motion.div>\r\n </td>\r\n {children}\r\n </tr>\r\n )\r\n}\r\n\r\nfunction ExpandableTableRowContent({\r\n className,\r\n isExpanded,\r\n ...props\r\n}: ComponentProps<'td'> & {\r\n isExpanded: boolean\r\n}) {\r\n return (\r\n <AnimatePresence initial={false}>\r\n {isExpanded && (\r\n <motion.tr\r\n key=\"expandable-row\"\r\n className={cn('border-y', className)}\r\n initial={{ opacity: 0 }}\r\n animate={{ opacity: 1 }}\r\n exit={{ opacity: 0 }}\r\n transition={{ duration: 0.2 }}\r\n >\r\n <td colSpan={props.colSpan}>\r\n <motion.div\r\n initial={{ height: 0, opacity: 0 }}\r\n animate={{ height: 'auto', opacity: 1 }}\r\n exit={{ height: 0, opacity: 0 }}\r\n transition={{\r\n height: { duration: 0.3, ease: 'linear' },\r\n opacity: { duration: 0.2 },\r\n }}\r\n className=\"overflow-hidden\"\r\n >\r\n <div>{props.children}</div>\r\n </motion.div>\r\n </td>\r\n </motion.tr>\r\n )}\r\n </AnimatePresence>\r\n )\r\n}\r\n\r\nexport {\r\n ExpandableTableRowWrapper,\r\n ExpandableTableRow,\r\n ExpandableTableRowContent,\r\n}\r\n"],"names":["__webpack_require__","e","Object","Symbol","ExpandableTableRowWrapper","children","contentColSpan","isExpanded","onToggleExpand","internalIsExpanded","setInternalIsExpanded","useState","Row","Content","expanded","undefined","sumOfColspanAndIconColumn","Slot","prev","ExpandableTableRowContent","ExpandableTableRow","className","showIcon","props","cn","motion","ChevronDown","AnimatePresence"],"mappings":";+PAAAA,CAAAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,EAGxF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,IACpB,oBAAOG,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E,ymBCGA,SAASG,0BAA0B,CACjCC,SAAAA,CAAQ,CACRC,eAAAA,CAAc,CACdC,WAAAA,CAAU,CACVC,eAAAA,CAAc,CAOf,EACC,GAAM,CAACC,EAAoBC,EAAsB,CAAGC,GAAAA,+BAAAA,QAAAA,EAAS,IACvD,CAACC,EAAKC,EAAQ,CAAGR,EAEjBS,EAAWP,SAAAA,EAA2BA,EAAaE,EASnDO,EAA4BV,EAAiB,EAEnD,MACE,2E,UACE,oCAACW,2BAAAA,IAAIA,CAAAA,CAAC,QAZW,KACfT,EACFA,IAEAE,EAAsBQ,GAAQ,CAACA,EAEnC,EAMiC,gBAAeJ,E,SACzCF,C,GAEH,oCAACO,0BAAAA,CACC,QAASH,EACT,eAAcA,EACd,WAAYF,E,SAEXD,C,KAIT,CAEA,SAASO,mBAAmB,CAC1BC,UAAAA,CAAS,CACThB,SAAAA,CAAQ,CACRiB,SAAAA,EAAW,EAAI,CACf,GAAGC,EAIJ,EACC,MACE,qCAAC,MACC,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,iHACAH,GAED,GAAGE,CAAK,C,UAET,oCAAC,MAAG,UAAWC,GAAAA,0BAAAA,EAAAA,EAAG,uD,SAChB,oCAACC,uCAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,CAAE,EACrB,QAAS,CAAE,OAAQF,CAAK,CAAC,gBAAgB,CAAG,KAAO,CAAE,EACrD,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,sB,SAEV,oCAACG,sCAAAA,WAAWA,CAAAA,CACV,KAAM,GACN,UAAWF,GAAAA,0BAAAA,EAAAA,EAAG,yBAA0B,CACtC,mBAAoB,CAACF,CACvB,E,OAILjB,E,EAGP,CAEA,SAASc,0BAA0B,CACjCE,UAAAA,CAAS,CACTd,WAAAA,CAAU,CACV,GAAGgB,EAGJ,EACC,MACE,oCAACI,uCAAAA,eAAeA,CAAAA,CAAC,QAAS,G,SACvBpB,GACC,oCAACkB,uCAAAA,MAAAA,CAAAA,EAAS,EAER,UAAWD,GAAAA,0BAAAA,EAAAA,EAAG,WAAYH,GAC1B,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,E,SAE5B,oCAAC,MAAG,QAASE,EAAM,OAAO,C,SACxB,oCAACE,uCAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,EAAG,QAAS,CAAE,EACjC,QAAS,CAAE,OAAQ,OAAQ,QAAS,CAAE,EACtC,KAAM,CAAE,OAAQ,EAAG,QAAS,CAAE,EAC9B,WAAY,CACV,OAAQ,CAAE,SAAU,GAAK,KAAM,QAAS,EACxC,QAAS,CAAE,SAAU,EAAI,CAC3B,EACA,UAAU,kB,SAEV,oCAAC,O,SAAKF,EAAM,QAAQ,QAlBpB,iB,EAyBd,C"}
@@ -1,40 +1,16 @@
1
- import React from 'react';
2
- type ExpandableTableRowWrapperProps = React.HTMLAttributes<HTMLDivElement> & {
1
+ import React, { ComponentProps } from 'react';
2
+ declare function ExpandableTableRowWrapper({ children, contentColSpan, isExpanded, onToggleExpand, }: ComponentProps<'div'> & {
3
3
  children: [React.ReactNode, React.ReactNode];
4
- /**
5
- * Number of columns the content will occupy when expanded
6
- * Not counting the icon column that comes by default
7
- */
8
4
  contentColSpan: number;
9
5
  isExpanded?: boolean;
10
6
  onToggleExpand?: VoidFunction;
11
- };
12
- /**
13
- * A wrapper for expandable table rows.
14
- *
15
- * @param children - The first must be of type ExpandableTableRow and the second any component, such as a div.
16
- * @param contentColSpan - Number of columns the content will occupy when expanded (excluding the default icon column).
17
- */
18
- declare const ExpandableTableRowWrapper: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
19
- children: [React.ReactNode, React.ReactNode];
20
- /**
21
- * Number of columns the content will occupy when expanded
22
- * Not counting the icon column that comes by default
23
- */
24
- contentColSpan: number;
25
- isExpanded?: boolean;
26
- onToggleExpand?: VoidFunction;
27
- } & React.RefAttributes<HTMLDivElement>>;
28
- type ExpandableTableRowProps = React.HTMLAttributes<HTMLTableRowElement> & {
29
- showIcon?: boolean;
30
- 'data-expanded'?: boolean;
31
- };
32
- declare const ExpandableTableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function ExpandableTableRow({ className, children, showIcon, ...props }: ComponentProps<'tr'> & {
33
9
  showIcon?: boolean;
34
10
  'data-expanded'?: boolean;
35
- } & React.RefAttributes<HTMLTableRowElement>>;
36
- type ExpandableTableRowContentProps = React.TdHTMLAttributes<HTMLTableCellElement> & {
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function ExpandableTableRowContent({ className, isExpanded, ...props }: ComponentProps<'td'> & {
37
13
  isExpanded: boolean;
38
- };
39
- export { ExpandableTableRowWrapper, ExpandableTableRow, type ExpandableTableRowWrapperProps, type ExpandableTableRowProps, type ExpandableTableRowContentProps, };
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export { ExpandableTableRowWrapper, ExpandableTableRow, ExpandableTableRowContent, };
40
16
  //# sourceMappingURL=table-expandable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-expandable.d.ts","sourceRoot":"","sources":["../../../src/components/table-expandable.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,KAAK,8BAA8B,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3E,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAC5C;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,YAAY,CAAA;CAC9B,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB;cAhBnB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5C;;;OAGG;oBACa,MAAM;iBACT,OAAO;qBACH,YAAY;wCAyC7B,CAAA;AAGF,KAAK,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,kBAAkB;eAJX,OAAO;sBACA,OAAO;6CAkCzB,CAAA;AAGF,KAAK,8BAA8B,GACjC,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG;IAC7C,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAoCH,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,CAAA"}
1
+ {"version":3,"file":"table-expandable.d.ts","sourceRoot":"","sources":["../../../src/components/table-expandable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAIvD,iBAAS,yBAAyB,CAAC,EACjC,QAAQ,EACR,cAAc,EACd,UAAU,EACV,cAAc,GACf,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAE5C,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,YAAY,CAAA;CAC9B,2CA6BA;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,QAAe,EACf,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CA2BA;AAED,iBAAS,yBAAyB,CAAC,EACjC,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IACxB,UAAU,EAAE,OAAO,CAAA;CACpB,2CA8BA;AAED,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,GAC1B,CAAA"}
@@ -1,2 +1 @@
1
- import*as t from"./data-table-date-filter.js";import*as a from"./data-table-faceted-filter.js";import*as e from"./data-table-pagination.js";import*as o from"./data-table-range-filter.js";import*as r from"./data-table-slider-filter.js";import*as n from"./data-table-view-options.js";export*from"./data-table-action-bar.js";export*from"./data-table-advanced-toolbar.js";export*from"./data-table-column-header.js";export*from"./data-table-filter-list.js";export*from"./data-table-filter-menu.js";export*from"./data-table-skeleton.js";export*from"./data-table-sort-list.js";export*from"./data-table-toolbar.js";export*from"./data-table.js";var d={"@/components/data-table/data-table-date-filter":function(a){a.exports=t},"@/components/data-table/data-table-faceted-filter":function(t){t.exports=a},"@/components/data-table/data-table-pagination":function(t){t.exports=e},"@/components/data-table/data-table-range-filter":function(t){t.exports=o},"@/components/data-table/data-table-slider-filter":function(t){t.exports=r},"@/components/data-table/data-table-view-options":function(t){t.exports=n}},l={};function i(t){var a=l[t];if(void 0!==a)return a.exports;var e=l[t]={exports:{}};return d[t](e,e.exports,i),e.exports}i.d=(t,a)=>{for(var e in a)i.o(a,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},i.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};i.r(f);var b=i("@/components/data-table/data-table-date-filter"),s={};for(var p in b)"default"!==p&&(s[p]=(function(t){return b[t]}).bind(0,p));i.d(f,s);var m=i("@/components/data-table/data-table-faceted-filter"),s={};for(var p in m)"default"!==p&&(s[p]=(function(t){return m[t]}).bind(0,p));i.d(f,s);var c=i("@/components/data-table/data-table-pagination"),s={};for(var p in c)"default"!==p&&(s[p]=(function(t){return c[t]}).bind(0,p));i.d(f,s);var u=i("@/components/data-table/data-table-range-filter"),s={};for(var p in u)"default"!==p&&(s[p]=(function(t){return u[t]}).bind(0,p));i.d(f,s);var v=i("@/components/data-table/data-table-slider-filter"),s={};for(var p in v)"default"!==p&&(s[p]=(function(t){return v[t]}).bind(0,p));i.d(f,s);var j=i("@/components/data-table/data-table-view-options"),s={};for(var p in j)"default"!==p&&(s[p]=(function(t){return j[t]}).bind(0,p));i.d(f,s);
2
- //# sourceMappingURL=index.js.map
1
+ export*from"./data-table-action-bar.js";export*from"./data-table-advanced-toolbar.js";export*from"./data-table-column-header.js";export*from"./data-table-date-filter.js";export*from"./data-table-faceted-filter.js";export*from"./data-table-filter-list.js";export*from"./data-table-filter-menu.js";export*from"./data-table-pagination.js";export*from"./data-table-range-filter.js";export*from"./data-table-skeleton.js";export*from"./data-table-slider-filter.js";export*from"./data-table-sort-list.js";export*from"./data-table-toolbar.js";export*from"./data-table-view-options.js";export*from"./data-table.js";
@@ -1,40 +1,16 @@
1
- import React from 'react';
2
- type ExpandableTableRowWrapperProps = React.HTMLAttributes<HTMLDivElement> & {
1
+ import React, { ComponentProps } from 'react';
2
+ declare function ExpandableTableRowWrapper({ children, contentColSpan, isExpanded, onToggleExpand, }: ComponentProps<'div'> & {
3
3
  children: [React.ReactNode, React.ReactNode];
4
- /**
5
- * Number of columns the content will occupy when expanded
6
- * Not counting the icon column that comes by default
7
- */
8
4
  contentColSpan: number;
9
5
  isExpanded?: boolean;
10
6
  onToggleExpand?: VoidFunction;
11
- };
12
- /**
13
- * A wrapper for expandable table rows.
14
- *
15
- * @param children - The first must be of type ExpandableTableRow and the second any component, such as a div.
16
- * @param contentColSpan - Number of columns the content will occupy when expanded (excluding the default icon column).
17
- */
18
- declare const ExpandableTableRowWrapper: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
19
- children: [React.ReactNode, React.ReactNode];
20
- /**
21
- * Number of columns the content will occupy when expanded
22
- * Not counting the icon column that comes by default
23
- */
24
- contentColSpan: number;
25
- isExpanded?: boolean;
26
- onToggleExpand?: VoidFunction;
27
- } & React.RefAttributes<HTMLDivElement>>;
28
- type ExpandableTableRowProps = React.HTMLAttributes<HTMLTableRowElement> & {
29
- showIcon?: boolean;
30
- 'data-expanded'?: boolean;
31
- };
32
- declare const ExpandableTableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function ExpandableTableRow({ className, children, showIcon, ...props }: ComponentProps<'tr'> & {
33
9
  showIcon?: boolean;
34
10
  'data-expanded'?: boolean;
35
- } & React.RefAttributes<HTMLTableRowElement>>;
36
- type ExpandableTableRowContentProps = React.TdHTMLAttributes<HTMLTableCellElement> & {
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function ExpandableTableRowContent({ className, isExpanded, ...props }: ComponentProps<'td'> & {
37
13
  isExpanded: boolean;
38
- };
39
- export { ExpandableTableRowWrapper, ExpandableTableRow, type ExpandableTableRowWrapperProps, type ExpandableTableRowProps, type ExpandableTableRowContentProps, };
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export { ExpandableTableRowWrapper, ExpandableTableRow, ExpandableTableRowContent, };
40
16
  //# sourceMappingURL=table-expandable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-expandable.d.ts","sourceRoot":"","sources":["../../../src/components/table-expandable.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAKvC,KAAK,8BAA8B,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3E,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAC5C;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,YAAY,CAAA;CAC9B,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB;cAhBnB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5C;;;OAGG;oBACa,MAAM;iBACT,OAAO;qBACH,YAAY;wCAyC7B,CAAA;AAGF,KAAK,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,GAAG;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,kBAAkB;eAJX,OAAO;sBACA,OAAO;6CAkCzB,CAAA;AAGF,KAAK,8BAA8B,GACjC,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG;IAC7C,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAoCH,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,GACpC,CAAA"}
1
+ {"version":3,"file":"table-expandable.d.ts","sourceRoot":"","sources":["../../../src/components/table-expandable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAIvD,iBAAS,yBAAyB,CAAC,EACjC,QAAQ,EACR,cAAc,EACd,UAAU,EACV,cAAc,GACf,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAE5C,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,YAAY,CAAA;CAC9B,2CA6BA;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,QAAe,EACf,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CA2BA;AAED,iBAAS,yBAAyB,CAAC,EACjC,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IACxB,UAAU,EAAE,OAAO,CAAA;CACpB,2CA8BA;AAED,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,GAC1B,CAAA"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- import*as a from"react/jsx-runtime";import*as e from"@radix-ui/react-slot";import*as t from"framer-motion";import*as i from"react";import*as r from"lucide-react";import*as o from"../lib/utils.js";let n=i.default.forwardRef(({children:t,contentColSpan:r,isExpanded:o,onToggleExpand:n})=>{let[l,d]=(0,i.useState)(!1),[c,p]=t,m=void 0!==o?o:l,x=r+1;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.Slot,{onClick:()=>{n?n():d(a=>!a)},"data-expanded":m,children:c}),(0,a.jsx)(s,{colSpan:x,"aria-colspan":x,isExpanded:m,children:p})]})});n.displayName="ExpandableTableRowWrapper";let l=i.default.forwardRef(({className:e,children:i,showIcon:n=!0,...l},s)=>(0,a.jsxs)("tr",{ref:s,className:(0,o.cn)("cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100",e),...l,children:[(0,a.jsx)("td",{className:(0,o.cn)("w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0",{}),children:(0,a.jsx)(t.motion.div,{initial:{rotate:0},animate:{rotate:l["data-expanded"]?-180:0},transition:{duration:.3},className:"w-min origin-center",children:(0,a.jsx)(r.ChevronDown,{size:16,className:(0,o.cn)("stroke-2 text-gbm-dark",{"text-transparent":!n})})})}),i]}));l.displayName="ExpandableTableRow";let s=i.default.forwardRef(({className:e,isExpanded:i,...r},n)=>(0,a.jsx)(t.AnimatePresence,{initial:!1,children:i&&(0,a.jsx)(t.motion.tr,{className:(0,o.cn)("border-y",e),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,a.jsx)("td",{colSpan:r.colSpan,children:(0,a.jsx)(t.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.3,ease:"linear"},opacity:{duration:.2}},className:"overflow-hidden",children:(0,a.jsx)("div",{ref:n,children:r.children})})})},"expandable-row")}));s.displayName="ExpandableTableRowContent";export{l as ExpandableTableRow,n as ExpandableTableRowWrapper};
2
+ import*as a from"react/jsx-runtime";import*as t from"@radix-ui/react-slot";import*as e from"framer-motion";import*as i from"lucide-react";import*as r from"react";import*as n from"../lib/utils.js";function o({children:e,contentColSpan:i,isExpanded:n,onToggleExpand:o}){let[s,l]=(0,r.useState)(!1),[d,m]=e,p=void 0!==n?n:s,x=i+1;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.Slot,{onClick:()=>{o?o():l(a=>!a)},"data-expanded":p,children:d}),(0,a.jsx)(c,{colSpan:x,"aria-colspan":x,isExpanded:p,children:m})]})}function s({className:t,children:r,showIcon:o=!0,...s}){return(0,a.jsxs)("tr",{className:(0,n.cn)("cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100",t),...s,children:[(0,a.jsx)("td",{className:(0,n.cn)("w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0"),children:(0,a.jsx)(e.motion.div,{initial:{rotate:0},animate:{rotate:s["data-expanded"]?-180:0},transition:{duration:.3},className:"w-min origin-center",children:(0,a.jsx)(i.ChevronDown,{size:16,className:(0,n.cn)("stroke-2 text-gbm-dark",{"text-transparent":!o})})})}),r]})}function c({className:t,isExpanded:i,...r}){return(0,a.jsx)(e.AnimatePresence,{initial:!1,children:i&&(0,a.jsx)(e.motion.tr,{className:(0,n.cn)("border-y",t),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,a.jsx)("td",{colSpan:r.colSpan,children:(0,a.jsx)(e.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{height:{duration:.3,ease:"linear"},opacity:{duration:.2}},className:"overflow-hidden",children:(0,a.jsx)("div",{children:r.children})})})},"expandable-row")})}export{s as ExpandableTableRow,c as ExpandableTableRowContent,o as ExpandableTableRowWrapper};
3
3
  //# sourceMappingURL=table-expandable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\table-expandable.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/table-expandable.tsx"],"sourcesContent":["\r\n\r\nimport { Slot } from '@radix-ui/react-slot'\r\nimport { AnimatePresence, motion } from 'framer-motion'\r\nimport React, { useState } from 'react'\r\n\r\nimport { ChevronDown } from 'lucide-react'\r\nimport { cn } from '../lib/utils'\r\n\r\ntype ExpandableTableRowWrapperProps = React.HTMLAttributes<HTMLDivElement> & {\r\n children: [React.ReactNode, React.ReactNode]\r\n /**\r\n * Number of columns the content will occupy when expanded\r\n * Not counting the icon column that comes by default\r\n */\r\n contentColSpan: number\r\n isExpanded?: boolean\r\n onToggleExpand?: VoidFunction\r\n}\r\n\r\n/**\r\n * A wrapper for expandable table rows.\r\n *\r\n * @param children - The first must be of type ExpandableTableRow and the second any component, such as a div.\r\n * @param contentColSpan - Number of columns the content will occupy when expanded (excluding the default icon column).\r\n */\r\nconst ExpandableTableRowWrapper = React.forwardRef<\r\n HTMLDivElement,\r\n ExpandableTableRowWrapperProps\r\n>(({ children, contentColSpan, isExpanded, onToggleExpand }) => {\r\n const [internalIsExpanded, setInternalIsExpanded] = useState(false)\r\n const [Row, Content] = children\r\n\r\n const expanded = isExpanded !== undefined ? isExpanded : internalIsExpanded\r\n const toggleExpand = () => {\r\n if (onToggleExpand) {\r\n onToggleExpand()\r\n } else {\r\n setInternalIsExpanded(prev => !prev)\r\n }\r\n }\r\n\r\n const sumOfColspanAndIconColumn = contentColSpan + 1\r\n\r\n return (\r\n <>\r\n <Slot onClick={toggleExpand} data-expanded={expanded}>\r\n {Row}\r\n </Slot>\r\n <ExpandableTableRowContent\r\n colSpan={sumOfColspanAndIconColumn}\r\n aria-colspan={sumOfColspanAndIconColumn}\r\n isExpanded={expanded}\r\n >\r\n {Content}\r\n </ExpandableTableRowContent>\r\n </>\r\n )\r\n})\r\nExpandableTableRowWrapper.displayName = 'ExpandableTableRowWrapper'\r\n\r\ntype ExpandableTableRowProps = React.HTMLAttributes<HTMLTableRowElement> & {\r\n showIcon?: boolean\r\n 'data-expanded'?: boolean\r\n}\r\n\r\nconst ExpandableTableRow = React.forwardRef<\r\n HTMLTableRowElement,\r\n ExpandableTableRowProps\r\n>(({ className, children, showIcon = true, ...props }, ref) => (\r\n <tr\r\n ref={ref}\r\n className={cn(\r\n 'cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <td\r\n className={cn('w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0', {})}\r\n >\r\n <motion.div\r\n initial={{ rotate: 0 }}\r\n animate={{ rotate: props['data-expanded'] ? -180 : 0 }}\r\n transition={{ duration: 0.3 }}\r\n className=\"w-min origin-center\"\r\n >\r\n <ChevronDown\r\n size={16}\r\n className={cn('stroke-2 text-gbm-dark', {\r\n 'text-transparent': !showIcon,\r\n })}\r\n />\r\n </motion.div>\r\n </td>\r\n {children}\r\n </tr>\r\n))\r\nExpandableTableRow.displayName = 'ExpandableTableRow'\r\n\r\ntype ExpandableTableRowContentProps =\r\n React.TdHTMLAttributes<HTMLTableCellElement> & {\r\n isExpanded: boolean\r\n }\r\n\r\nconst ExpandableTableRowContent = React.forwardRef<\r\n HTMLTableCellElement,\r\n ExpandableTableRowContentProps\r\n>(({ className, isExpanded, ...props }, ref) => (\r\n <AnimatePresence initial={false}>\r\n {isExpanded && (\r\n <motion.tr\r\n key=\"expandable-row\"\r\n className={cn('border-y', className)}\r\n initial={{ opacity: 0 }}\r\n animate={{ opacity: 1 }}\r\n exit={{ opacity: 0 }}\r\n transition={{ duration: 0.2 }}\r\n >\r\n <td colSpan={props.colSpan}>\r\n <motion.div\r\n initial={{ height: 0, opacity: 0 }}\r\n animate={{ height: 'auto', opacity: 1 }}\r\n exit={{ height: 0, opacity: 0 }}\r\n transition={{\r\n height: { duration: 0.3, ease: 'linear' },\r\n opacity: { duration: 0.2 },\r\n }}\r\n className=\"overflow-hidden\"\r\n >\r\n <div ref={ref}>{props.children}</div>\r\n </motion.div>\r\n </td>\r\n </motion.tr>\r\n )}\r\n </AnimatePresence>\r\n))\r\nExpandableTableRowContent.displayName = 'ExpandableTableRowContent'\r\n\r\nexport {\r\n ExpandableTableRowWrapper,\r\n ExpandableTableRow,\r\n type ExpandableTableRowWrapperProps,\r\n type ExpandableTableRowProps,\r\n type ExpandableTableRowContentProps,\r\n}\r\n"],"names":["ExpandableTableRowWrapper","React","children","contentColSpan","isExpanded","onToggleExpand","internalIsExpanded","setInternalIsExpanded","useState","Row","Content","expanded","undefined","sumOfColspanAndIconColumn","Slot","prev","ExpandableTableRowContent","ExpandableTableRow","className","showIcon","props","ref","cn","motion","ChevronDown","AnimatePresence"],"mappings":";oMA0BA,IAAMA,EAA4BC,EAAAA,OAAAA,CAAAA,UAAgB,CAGhD,CAAC,CAAEC,SAAAA,CAAQ,CAAEC,eAAAA,CAAc,CAAEC,WAAAA,CAAU,CAAEC,eAAAA,CAAc,CAAE,IACzD,GAAM,CAACC,EAAoBC,EAAsB,CAAGC,GAAAA,EAAAA,QAAAA,EAAS,IACvD,CAACC,EAAKC,EAAQ,CAAGR,EAEjBS,EAAWP,SAAAA,EAA2BA,EAAaE,EASnDO,EAA4BV,EAAiB,EAEnD,MACE,uB,UACE,UAACW,EAAAA,IAAIA,CAAAA,CAAC,QAZW,KACfT,EACFA,IAEAE,EAAsBQ,GAAQ,CAACA,EAEnC,EAMiC,gBAAeJ,E,SACzCF,C,GAEH,UAACO,EAAAA,CACC,QAASH,EACT,eAAcA,EACd,WAAYF,E,SAEXD,C,KAIT,EACAV,CAAAA,EAA0B,WAAW,CAAG,4BAOxC,IAAMiB,EAAqBhB,EAAAA,OAAAA,CAAAA,UAAgB,CAGzC,CAAC,CAAEiB,UAAAA,CAAS,CAAEhB,SAAAA,CAAQ,CAAEiB,SAAAA,EAAW,EAAI,CAAE,GAAGC,EAAO,CAAEC,IACrD,WAAC,MACC,IAAKA,EACL,UAAWC,GAAAA,EAAAA,EAAAA,EACT,iHACAJ,GAED,GAAGE,CAAK,C,UAET,UAAC,MACC,UAAWE,GAAAA,EAAAA,EAAAA,EAAG,sDAAuD,CAAC,G,SAEtE,UAACC,EAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,CAAE,EACrB,QAAS,CAAE,OAAQH,CAAK,CAAC,gBAAgB,CAAG,KAAO,CAAE,EACrD,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,sB,SAEV,UAACI,EAAAA,WAAWA,CAAAA,CACV,KAAM,GACN,UAAWF,GAAAA,EAAAA,EAAAA,EAAG,yBAA0B,CACtC,mBAAoB,CAACH,CACvB,E,OAILjB,E,GAGLe,CAAAA,EAAmB,WAAW,CAAG,qBAOjC,IAAMD,EAA4Bf,EAAAA,OAAAA,CAAAA,UAAgB,CAGhD,CAAC,CAAEiB,UAAAA,CAAS,CAAEd,WAAAA,CAAU,CAAE,GAAGgB,EAAO,CAAEC,IACtC,UAACI,EAAAA,eAAeA,CAAAA,CAAC,QAAS,G,SACvBrB,GACC,UAACmB,EAAAA,MAAAA,CAAAA,EAAS,EAER,UAAWD,GAAAA,EAAAA,EAAAA,EAAG,WAAYJ,GAC1B,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,E,SAE5B,UAAC,MAAG,QAASE,EAAM,OAAO,C,SACxB,UAACG,EAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,EAAG,QAAS,CAAE,EACjC,QAAS,CAAE,OAAQ,OAAQ,QAAS,CAAE,EACtC,KAAM,CAAE,OAAQ,EAAG,QAAS,CAAE,EAC9B,WAAY,CACV,OAAQ,CAAE,SAAU,GAAK,KAAM,QAAS,EACxC,QAAS,CAAE,SAAU,EAAI,CAC3B,EACA,UAAU,kB,SAEV,UAAC,OAAI,IAAKF,E,SAAMD,EAAM,QAAQ,QAlB9B,iB,GAyBZJ,CAAAA,EAA0B,WAAW,CAAG,mC"}
1
+ {"version":3,"file":"components\\table-expandable.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/table-expandable.tsx"],"sourcesContent":["\r\n\r\nimport { Slot } from '@radix-ui/react-slot'\r\nimport { AnimatePresence, motion } from 'framer-motion'\r\nimport { ChevronDown } from 'lucide-react'\r\nimport React, { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nfunction ExpandableTableRowWrapper({\r\n children,\r\n contentColSpan,\r\n isExpanded,\r\n onToggleExpand,\r\n}: ComponentProps<'div'> & {\r\n children: [React.ReactNode, React.ReactNode]\r\n\r\n contentColSpan: number\r\n isExpanded?: boolean\r\n onToggleExpand?: VoidFunction\r\n}) {\r\n const [internalIsExpanded, setInternalIsExpanded] = useState(false)\r\n const [Row, Content] = children\r\n\r\n const expanded = isExpanded !== undefined ? isExpanded : internalIsExpanded\r\n const toggleExpand = () => {\r\n if (onToggleExpand) {\r\n onToggleExpand()\r\n } else {\r\n setInternalIsExpanded(prev => !prev)\r\n }\r\n }\r\n\r\n const sumOfColspanAndIconColumn = contentColSpan + 1\r\n\r\n return (\r\n <>\r\n <Slot onClick={toggleExpand} data-expanded={expanded}>\r\n {Row}\r\n </Slot>\r\n <ExpandableTableRowContent\r\n colSpan={sumOfColspanAndIconColumn}\r\n aria-colspan={sumOfColspanAndIconColumn}\r\n isExpanded={expanded}\r\n >\r\n {Content}\r\n </ExpandableTableRowContent>\r\n </>\r\n )\r\n}\r\n\r\nfunction ExpandableTableRow({\r\n className,\r\n children,\r\n showIcon = true,\r\n ...props\r\n}: ComponentProps<'tr'> & {\r\n showIcon?: boolean\r\n 'data-expanded'?: boolean\r\n}) {\r\n return (\r\n <tr\r\n className={cn(\r\n 'cursor-pointer border-y transition-colors last:border-y-0 hover:bg-stroke/30 data-[state=selected]:bg-gray-100',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <td className={cn('w-12 p-4 align-middle [&:has([role=checkbox])]:pr-0')}>\r\n <motion.div\r\n initial={{ rotate: 0 }}\r\n animate={{ rotate: props['data-expanded'] ? -180 : 0 }}\r\n transition={{ duration: 0.3 }}\r\n className=\"w-min origin-center\"\r\n >\r\n <ChevronDown\r\n size={16}\r\n className={cn('stroke-2 text-gbm-dark', {\r\n 'text-transparent': !showIcon,\r\n })}\r\n />\r\n </motion.div>\r\n </td>\r\n {children}\r\n </tr>\r\n )\r\n}\r\n\r\nfunction ExpandableTableRowContent({\r\n className,\r\n isExpanded,\r\n ...props\r\n}: ComponentProps<'td'> & {\r\n isExpanded: boolean\r\n}) {\r\n return (\r\n <AnimatePresence initial={false}>\r\n {isExpanded && (\r\n <motion.tr\r\n key=\"expandable-row\"\r\n className={cn('border-y', className)}\r\n initial={{ opacity: 0 }}\r\n animate={{ opacity: 1 }}\r\n exit={{ opacity: 0 }}\r\n transition={{ duration: 0.2 }}\r\n >\r\n <td colSpan={props.colSpan}>\r\n <motion.div\r\n initial={{ height: 0, opacity: 0 }}\r\n animate={{ height: 'auto', opacity: 1 }}\r\n exit={{ height: 0, opacity: 0 }}\r\n transition={{\r\n height: { duration: 0.3, ease: 'linear' },\r\n opacity: { duration: 0.2 },\r\n }}\r\n className=\"overflow-hidden\"\r\n >\r\n <div>{props.children}</div>\r\n </motion.div>\r\n </td>\r\n </motion.tr>\r\n )}\r\n </AnimatePresence>\r\n )\r\n}\r\n\r\nexport {\r\n ExpandableTableRowWrapper,\r\n ExpandableTableRow,\r\n ExpandableTableRowContent,\r\n}\r\n"],"names":["ExpandableTableRowWrapper","children","contentColSpan","isExpanded","onToggleExpand","internalIsExpanded","setInternalIsExpanded","useState","Row","Content","expanded","undefined","sumOfColspanAndIconColumn","Slot","prev","ExpandableTableRowContent","ExpandableTableRow","className","showIcon","props","cn","motion","ChevronDown","AnimatePresence"],"mappings":";oMASA,SAASA,EAA0B,CACjCC,SAAAA,CAAQ,CACRC,eAAAA,CAAc,CACdC,WAAAA,CAAU,CACVC,eAAAA,CAAc,CAOf,EACC,GAAM,CAACC,EAAoBC,EAAsB,CAAGC,GAAAA,EAAAA,QAAAA,EAAS,IACvD,CAACC,EAAKC,EAAQ,CAAGR,EAEjBS,EAAWP,SAAAA,EAA2BA,EAAaE,EASnDO,EAA4BV,EAAiB,EAEnD,MACE,uB,UACE,UAACW,EAAAA,IAAIA,CAAAA,CAAC,QAZW,KACfT,EACFA,IAEAE,EAAsBQ,GAAQ,CAACA,EAEnC,EAMiC,gBAAeJ,E,SACzCF,C,GAEH,UAACO,EAAAA,CACC,QAASH,EACT,eAAcA,EACd,WAAYF,E,SAEXD,C,KAIT,CAEA,SAASO,EAAmB,CAC1BC,UAAAA,CAAS,CACThB,SAAAA,CAAQ,CACRiB,SAAAA,EAAW,EAAI,CACf,GAAGC,EAIJ,EACC,MACE,WAAC,MACC,UAAWC,GAAAA,EAAAA,EAAAA,EACT,iHACAH,GAED,GAAGE,CAAK,C,UAET,UAAC,MAAG,UAAWC,GAAAA,EAAAA,EAAAA,EAAG,uD,SAChB,UAACC,EAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,CAAE,EACrB,QAAS,CAAE,OAAQF,CAAK,CAAC,gBAAgB,CAAG,KAAO,CAAE,EACrD,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,sB,SAEV,UAACG,EAAAA,WAAWA,CAAAA,CACV,KAAM,GACN,UAAWF,GAAAA,EAAAA,EAAAA,EAAG,yBAA0B,CACtC,mBAAoB,CAACF,CACvB,E,OAILjB,E,EAGP,CAEA,SAASc,EAA0B,CACjCE,UAAAA,CAAS,CACTd,WAAAA,CAAU,CACV,GAAGgB,EAGJ,EACC,MACE,UAACI,EAAAA,eAAeA,CAAAA,CAAC,QAAS,G,SACvBpB,GACC,UAACkB,EAAAA,MAAAA,CAAAA,EAAS,EAER,UAAWD,GAAAA,EAAAA,EAAAA,EAAG,WAAYH,GAC1B,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,E,SAE5B,UAAC,MAAG,QAASE,EAAM,OAAO,C,SACxB,UAACE,EAAAA,MAAAA,CAAAA,GAAU,EACT,QAAS,CAAE,OAAQ,EAAG,QAAS,CAAE,EACjC,QAAS,CAAE,OAAQ,OAAQ,QAAS,CAAE,EACtC,KAAM,CAAE,OAAQ,EAAG,QAAS,CAAE,EAC9B,WAAY,CACV,OAAQ,CAAE,SAAU,GAAK,KAAM,QAAS,EACxC,QAAS,CAAE,SAAU,EAAI,CAC3B,EACA,UAAU,kB,SAEV,UAAC,O,SAAKF,EAAM,QAAQ,QAlBpB,iB,EAyBd,Q"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gbmtech/aurora-ui",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "main": "./dist/cjs/index.cjs",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"components\\data-table\\index.js","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\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};"],"names":["Object","Symbol"],"mappings":"gsCAAA,EAAoB,CAAC,CAAG,CAAC,EAAS,KACjC,IAAI,IAAI,KAAO,EACL,EAAoB,CAAC,CAAC,EAAY,IAAQ,CAAC,EAAoB,CAAC,CAAC,EAAS,IACzEA,OAAO,cAAc,CAAC,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNA,EAAoB,CAAC,CAAG,CAAC,EAAK,IAAUA,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClF,EAAoB,CAAC,CAAG,AAAC,IACrB,AAAkB,aAAlB,OAAOC,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAAC,EAASC,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAAC,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}