@gbmtech/aurora-ui 0.2.28 → 0.2.29

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 +1 @@
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")},"./data-table-date-filter":function(e){e.exports=require("./data-table-date-filter.cjs")},"./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")},"./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")},"./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__("./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__("./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 u=__webpack_require__("./data-table-filter-menu"),_={};for(var a in u)"default"!==a&&(_[a]=(function(e){return u[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var c=__webpack_require__("./data-table-pagination"),_={};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__("./data-table-range-filter"),_={};for(var a in b)"default"!==a&&(_[a]=(function(e){return b[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__("./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")},"./data-table-date-filter":function(e){e.exports=require("./data-table-date-filter.cjs")},"./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")},"./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__("./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__("./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__("./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,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__.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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DatePicker:()=>DatePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_namespaceObject=require("@phosphor-icons/react"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs");function DatePicker({date:e,placeholder:_,className:a,disabled:r=!1,onChange:t,...c}){let[n,s]=(0,external_react_namespaceObject.useState)(e);return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",size:"md",className:(0,utils_cjs_namespaceObject.cn)("min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50",!n&&"text-gray-400",a),disabled:r,children:[n?(0,external_date_fns_namespaceObject.format)(n,"dd/MM/yyyy"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:_||"Selecione a data"}),(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.CalendarBlank,{className:"ml-4 size-4 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",align:"start",children:(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{...c,mode:"single",selected:n,onSelect:e=>{s(e),t?.(e)}})})]})}for(var __webpack_i__ in exports.DatePicker=__webpack_exports__.DatePicker,__webpack_exports__)-1===["DatePicker"].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,_)=>{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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DatePicker:()=>DatePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_namespaceObject=require("@phosphor-icons/react"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs");function DatePicker({date:e,defaultValue:_,placeholder:a,className:r,disabled:t=!1,onChange:c,...n}){let[s,p]=(0,external_react_namespaceObject.useState)(e);return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",size:"md",className:(0,utils_cjs_namespaceObject.cn)("min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50",!s&&"text-gray-400",r),disabled:t,children:[s?(0,external_date_fns_namespaceObject.format)(s,"dd/MM/yyyy"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:a||"Selecione a data"}),(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.CalendarBlank,{className:"ml-4 size-4 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",align:"start",children:(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{...n,mode:"single",selected:s??_,onSelect:e=>{p(e),c?.(e)}})})]})}for(var __webpack_i__ in exports.DatePicker=__webpack_exports__.DatePicker,__webpack_exports__)-1===["DatePicker"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
3
  //# sourceMappingURL=date-picker.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DatePicker({\r\n date,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n onChange,\r\n ...props\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n size=\"md\"\r\n className={cn(\r\n 'min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n <CalendarBlank className=\"ml-4 size-4 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\r\n <Calendar\r\n {...props}\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DatePicker }\r\n"],"names":["DatePicker","date","placeholder","className","disabled","onChange","props","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar"],"mappings":";kvCAeA,SAASA,WAAW,CAClBC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAOJ,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,+BAAAA,QAAAA,EAA2BR,GAEjE,MACE,qCAACS,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,KAAK,KACL,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,0FACA,CAACN,GAAe,gBAChBJ,GAEF,SAAUC,E,UAETG,EACCO,GAAAA,kCAAAA,MAAAA,EAAOP,EAAa,cAEpB,oCAAC,Q,SAAML,GAAe,kB,GAExB,oCAACa,sBAAAA,aAAaA,CAAAA,CAAC,UAAU,2B,QAG7B,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,aAAa,MAAM,Q,SAC3C,oCAACC,sCAAAA,QAAQA,CAAAA,CACN,GAAGX,CAAK,CACT,KAAK,SACL,SAAUC,EACV,SAAUN,IACRO,EAAeP,GACfI,IAAWJ,EACb,C,OAKV,C"}
1
+ {"version":3,"file":"components\\date-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DatePicker({\r\n date,\r\n defaultValue,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n onChange,\r\n ...props\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n defaultValue?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n size=\"md\"\r\n className={cn(\r\n 'min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n <CalendarBlank className=\"ml-4 size-4 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\r\n <Calendar\r\n {...props}\r\n mode=\"single\"\r\n selected={currentDate ?? defaultValue}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DatePicker }\r\n"],"names":["DatePicker","date","defaultValue","placeholder","className","disabled","onChange","props","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar"],"mappings":";kvCAeA,SAASA,WAAW,CAClBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAQJ,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,+BAAAA,QAAAA,EAA2BT,GAEjE,MACE,qCAACU,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,KAAK,KACL,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,0FACA,CAACN,GAAe,gBAChBJ,GAEF,SAAUC,E,UAETG,EACCO,GAAAA,kCAAAA,MAAAA,EAAOP,EAAa,cAEpB,oCAAC,Q,SAAML,GAAe,kB,GAExB,oCAACa,sBAAAA,aAAaA,CAAAA,CAAC,UAAU,2B,QAG7B,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,aAAa,MAAM,Q,SAC3C,oCAACC,sCAAAA,QAAQA,CAAAA,CACN,GAAGX,CAAK,CACT,KAAK,SACL,SAAUC,GAAeN,EACzB,SAAUD,IACRQ,EAAeR,GACfK,IAAWL,EACb,C,OAKV,C"}
@@ -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__.d=(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__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__,{DateTimePickerWithRange:()=>DateTimePickerWithRange});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs"),external_time_picker_cjs_namespaceObject=require("./time-picker.cjs");function DateTimePickerWithRange({startDate:e,endDate:t,onChange:a,placeholder:r,className:_,disabled:c=!1}){let[s,n]=(0,external_react_namespaceObject.useState)({from:e,to:t}),i=e=>{if(!e){n(void 0),a?.(void 0);return}n({from:e.from??s?.from,to:e.to}),a?.({from:e.from??s?.from,to:e.to})};return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",className:(0,utils_cjs_namespaceObject.cn)("h-12 min-w-96 justify-between px-4 text-left font-normal",!s?.from&&!s?.to&&"text-gray-400",_),disabled:c,children:[s?.from?s.to?`${(0,external_date_fns_namespaceObject.format)(s.from,"dd/MM/yyyy HH:mm")} - ${(0,external_date_fns_namespaceObject.format)(s.to,"dd/MM/yyyy HH:mm")}`:(0,external_date_fns_namespaceObject.format)(s.from,"dd/MM/yyyy HH:mm"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:r||"Selecione o per\xedodo"}),(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",children:[(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{mode:"range",selected:s,onSelect:i,numberOfMonths:2}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex flex-col border-stroke border-t p-3",children:(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{setDate:e=>i({...s,from:e}),date:s?.from}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{setDate:e=>i({...s,to:e}),date:s?.to})]})}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex flex-1 justify-center",children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{variant:"secondary",className:"flex h-12 flex-1",onClick:()=>i(void 0),children:[(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.X,{size:12})," Clear"]})})]})]})}for(var __webpack_i__ in exports.DateTimePickerWithRange=__webpack_exports__.DateTimePickerWithRange,__webpack_exports__)-1===["DateTimePickerWithRange"].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,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__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__,{DateTimePickerWithRange:()=>DateTimePickerWithRange});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs"),external_time_picker_cjs_namespaceObject=require("./time-picker.cjs");function DateTimePickerWithRange({startDate:e,endDate:t,onChange:a,placeholder:r,className:_,disabled:c=!1}){let[n,s]=(0,external_react_namespaceObject.useState)({from:e,to:t}),i=e=>{if(!e){s(void 0),a?.(void 0);return}s({from:e.from??n?.from,to:e.to}),a?.({from:e.from??n?.from,to:e.to})};return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",className:(0,utils_cjs_namespaceObject.cn)("h-12 min-w-96 justify-between px-4 text-left font-normal",!n?.from&&!n?.to&&"text-gray-400",_),disabled:c,children:[n?.from?n.to?`${(0,external_date_fns_namespaceObject.format)(n.from,"dd/MM/yyyy HH:mm")} - ${(0,external_date_fns_namespaceObject.format)(n.to,"dd/MM/yyyy HH:mm")}`:(0,external_date_fns_namespaceObject.format)(n.from,"dd/MM/yyyy HH:mm"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:r||"Selecione o per\xedodo"}),(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",children:[(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{mode:"range",selected:n,onSelect:i,numberOfMonths:2}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex flex-col border-stroke border-t p-3",children:(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{onTimeChange:e=>i({...n,from:e}),date:n?.from}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{onTimeChange:e=>i({...n,to:e}),date:n?.to})]})}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex flex-1 justify-center",children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{variant:"secondary",className:"flex h-12 flex-1",onClick:()=>i(void 0),children:[(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.X,{size:12})," Clear"]})})]})]})}for(var __webpack_i__ in exports.DateTimePickerWithRange=__webpack_exports__.DateTimePickerWithRange,__webpack_exports__)-1===["DateTimePickerWithRange"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
3
  //# sourceMappingURL=date-time-picker-with-range.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-time-picker-with-range.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker-with-range.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank, X } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { useState } from 'react'\r\nimport { DateRange } from 'react-day-picker'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DateTimePickerWithRangeProps {\r\n startDate?: Date\r\n endDate?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: DateRange | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePickerWithRange\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePickerWithRange({\r\n startDate,\r\n endDate,\r\n onChange,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n}: DateTimePickerWithRangeProps) {\r\n const [dateRange, setDateRange] = useState<DateRange | undefined>({\r\n from: startDate,\r\n to: endDate,\r\n })\r\n\r\n const handleDateChange = (newRange: Partial<DateRange> | undefined) => {\r\n if (!newRange) {\r\n setDateRange(undefined)\r\n onChange?.(undefined)\r\n return\r\n }\r\n\r\n setDateRange({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n onChange?.({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n }\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 min-w-96 justify-between px-4 text-left font-normal',\r\n !dateRange?.from && !dateRange?.to && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {dateRange?.from ? (\r\n dateRange.to ? (\r\n `${format(dateRange.from, 'dd/MM/yyyy HH:mm')} - ${format(dateRange.to, 'dd/MM/yyyy HH:mm')}`\r\n ) : (\r\n format(dateRange.from, 'dd/MM/yyyy HH:mm')\r\n )\r\n ) : (\r\n <span>{placeholder || 'Selecione o período'}</span>\r\n )}\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"range\"\r\n selected={dateRange}\r\n onSelect={handleDateChange}\r\n numberOfMonths={2}\r\n />\r\n <div className=\"flex flex-col border-stroke border-t p-3\">\r\n <div className=\"flex justify-between gap-4\">\r\n <TimePicker\r\n setDate={date => handleDateChange({ ...dateRange, from: date })}\r\n date={dateRange?.from}\r\n />\r\n <TimePicker\r\n setDate={date => handleDateChange({ ...dateRange, to: date })}\r\n date={dateRange?.to}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"flex flex-1 justify-center\">\r\n <Button\r\n variant=\"secondary\"\r\n className=\"flex h-12 flex-1\"\r\n onClick={() => handleDateChange(undefined)}\r\n >\r\n <X size={12} /> Clear\r\n </Button>\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePickerWithRange }\r\n"],"names":["DateTimePickerWithRange","startDate","endDate","onChange","placeholder","className","disabled","dateRange","setDateRange","useState","handleDateChange","newRange","undefined","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker","date","X"],"mappings":";y1CA0BA,SAASA,wBAAwB,CAC/BC,UAAAA,CAAS,CACTC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CACa,EAC7B,GAAM,CAACC,EAAWC,EAAa,CAAGC,GAAAA,+BAAAA,QAAAA,EAAgC,CAChE,KAAMR,EACN,GAAIC,CACN,GAEMQ,EAAmB,IACvB,GAAI,CAACC,EAAU,CACbH,EAAaI,KAAAA,GACbT,IAAWS,KAAAA,GACX,MACF,CAEAJ,EAAa,CACX,KAAMG,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,GAEjBR,IAAW,CACT,KAAMQ,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,EAEnB,EAEA,MACE,qCAACE,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,2DACA,CAACT,GAAW,MAAQ,CAACA,GAAW,IAAM,gBACtCF,GAEF,SAAUC,E,UAETC,GAAW,KACVA,EAAU,EAAE,CACV,CAAC,EAAEU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAAoB,GAAG,EAAEU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,EAAE,CAAE,oBAAoB,CAAC,CAE7FU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAGzB,oCAAC,Q,SAAMH,GAAe,wB,GAExB,oCAACc,oBAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,qCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,oCAACC,sCAAAA,QAAQA,CAAAA,CACP,KAAK,QACL,SAAUb,EACV,SAAUG,EACV,eAAgB,C,GAElB,oCAAC,OAAI,UAAU,2C,SACb,qCAAC,OAAI,UAAU,6B,UACb,oCAACW,yCAAAA,UAAUA,CAAAA,CACT,QAASC,GAAQZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,KAAMe,CAAK,GAC7D,KAAMf,GAAW,I,GAEnB,oCAACc,yCAAAA,UAAUA,CAAAA,CACT,QAASC,GAAQZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,GAAIe,CAAK,GAC3D,KAAMf,GAAW,E,QAIvB,oCAAC,OAAI,UAAU,6B,SACb,qCAACQ,oCAAAA,MAAMA,CAAAA,CACL,QAAQ,YACR,UAAU,mBACV,QAAS,IAAML,EAAiBE,KAAAA,G,UAEhC,oCAACW,oBAAAA,CAACA,CAAAA,CAAC,KAAM,E,GAAM,S,UAM3B,C"}
1
+ {"version":3,"file":"components\\date-time-picker-with-range.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker-with-range.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank, X } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { useState } from 'react'\r\nimport { DateRange } from 'react-day-picker'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DateTimePickerWithRangeProps {\r\n startDate?: Date\r\n endDate?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: DateRange | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePickerWithRange\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePickerWithRange({\r\n startDate,\r\n endDate,\r\n onChange,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n}: DateTimePickerWithRangeProps) {\r\n const [dateRange, setDateRange] = useState<DateRange | undefined>({\r\n from: startDate,\r\n to: endDate,\r\n })\r\n\r\n const handleDateChange = (newRange: Partial<DateRange> | undefined) => {\r\n if (!newRange) {\r\n setDateRange(undefined)\r\n onChange?.(undefined)\r\n return\r\n }\r\n\r\n setDateRange({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n onChange?.({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n }\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 min-w-96 justify-between px-4 text-left font-normal',\r\n !dateRange?.from && !dateRange?.to && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {dateRange?.from ? (\r\n dateRange.to ? (\r\n `${format(dateRange.from, 'dd/MM/yyyy HH:mm')} - ${format(dateRange.to, 'dd/MM/yyyy HH:mm')}`\r\n ) : (\r\n format(dateRange.from, 'dd/MM/yyyy HH:mm')\r\n )\r\n ) : (\r\n <span>{placeholder || 'Selecione o período'}</span>\r\n )}\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"range\"\r\n selected={dateRange}\r\n onSelect={handleDateChange}\r\n numberOfMonths={2}\r\n />\r\n <div className=\"flex flex-col border-stroke border-t p-3\">\r\n <div className=\"flex justify-between gap-4\">\r\n <TimePicker\r\n onTimeChange={date =>\r\n handleDateChange({ ...dateRange, from: date })\r\n }\r\n date={dateRange?.from}\r\n />\r\n <TimePicker\r\n onTimeChange={date =>\r\n handleDateChange({ ...dateRange, to: date })\r\n }\r\n date={dateRange?.to}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"flex flex-1 justify-center\">\r\n <Button\r\n variant=\"secondary\"\r\n className=\"flex h-12 flex-1\"\r\n onClick={() => handleDateChange(undefined)}\r\n >\r\n <X size={12} /> Clear\r\n </Button>\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePickerWithRange }\r\n"],"names":["DateTimePickerWithRange","startDate","endDate","onChange","placeholder","className","disabled","dateRange","setDateRange","useState","handleDateChange","newRange","undefined","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker","date","X"],"mappings":";y1CA0BA,SAASA,wBAAwB,CAC/BC,UAAAA,CAAS,CACTC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CACa,EAC7B,GAAM,CAACC,EAAWC,EAAa,CAAGC,GAAAA,+BAAAA,QAAAA,EAAgC,CAChE,KAAMR,EACN,GAAIC,CACN,GAEMQ,EAAmB,IACvB,GAAI,CAACC,EAAU,CACbH,EAAaI,KAAAA,GACbT,IAAWS,KAAAA,GACX,MACF,CAEAJ,EAAa,CACX,KAAMG,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,GAEjBR,IAAW,CACT,KAAMQ,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,EAEnB,EAEA,MACE,qCAACE,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,2DACA,CAACT,GAAW,MAAQ,CAACA,GAAW,IAAM,gBACtCF,GAEF,SAAUC,E,UAETC,GAAW,KACVA,EAAU,EAAE,CACV,CAAC,EAAEU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAAoB,GAAG,EAAEU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,EAAE,CAAE,oBAAoB,CAAC,CAE7FU,GAAAA,kCAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAGzB,oCAAC,Q,SAAMH,GAAe,wB,GAExB,oCAACc,oBAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,qCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,oCAACC,sCAAAA,QAAQA,CAAAA,CACP,KAAK,QACL,SAAUb,EACV,SAAUG,EACV,eAAgB,C,GAElB,oCAAC,OAAI,UAAU,2C,SACb,qCAAC,OAAI,UAAU,6B,UACb,oCAACW,yCAAAA,UAAUA,CAAAA,CACT,aAAcC,GACZZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,KAAMe,CAAK,GAE9C,KAAMf,GAAW,I,GAEnB,oCAACc,yCAAAA,UAAUA,CAAAA,CACT,aAAcC,GACZZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,GAAIe,CAAK,GAE5C,KAAMf,GAAW,E,QAIvB,oCAAC,OAAI,UAAU,6B,SACb,qCAACQ,oCAAAA,MAAMA,CAAAA,CACL,QAAQ,YACR,UAAU,mBACV,QAAS,IAAML,EAAiBE,KAAAA,G,UAEhC,oCAACW,oBAAAA,CAACA,CAAAA,CAAC,KAAM,E,GAAM,S,UAM3B,C"}
@@ -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__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DateTimePicker:()=>DateTimePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs"),external_time_picker_cjs_namespaceObject=require("./time-picker.cjs");function DateTimePicker({date:e,placeholder:_,className:r,disabled:a,onChange:t}){let[c,s]=external_react_namespaceObject.useState(e);return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",className:(0,utils_cjs_namespaceObject.cn)("h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent",!c&&"text-gray-400",r),disabled:a,children:[c?(0,external_date_fns_namespaceObject.format)(c,"dd/MM/yyyy HH:mm"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:_||"Selecione a data"}),(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",children:[(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{mode:"single",selected:c,onSelect:e=>{s(e),t?.(e)}}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex justify-center border-stroke border-t p-3",children:(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{setDate:e=>{s(e),t?.(e)},date:c})})]})]})}for(var __webpack_i__ in exports.DateTimePicker=__webpack_exports__.DateTimePicker,__webpack_exports__)-1===["DateTimePicker"].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,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DateTimePicker:()=>DateTimePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_date_fns_namespaceObject=require("date-fns"),external_react_namespaceObject=require("react"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs"),external_calendar_cjs_namespaceObject=require("./calendar.cjs"),external_popover_cjs_namespaceObject=require("./popover.cjs"),external_time_picker_cjs_namespaceObject=require("./time-picker.cjs");function DateTimePicker({date:e,defaultValue:_,placeholder:r,className:a,disabled:t,onChange:c}){let[s,n]=(0,external_react_namespaceObject.useState)(e);return(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger,{asChild:!0,children:(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{id:"date",variant:"secondary",className:(0,utils_cjs_namespaceObject.cn)("h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent",!s&&"text-gray-400",a),disabled:t,children:[s?(0,external_date_fns_namespaceObject.format)(s,"dd/MM/yyyy HH:mm"):(0,jsx_runtime_namespaceObject.jsx)("span",{children:r||"Selecione a data"}),(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.PopoverContent,{className:"w-auto p-0",children:[(0,jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar,{mode:"single",selected:s,onSelect:e=>{n(e),c?.(e)}}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex justify-center border-stroke border-t p-3",children:(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_cjs_namespaceObject.TimePicker,{date:s,onTimeChange:e=>{n(e),c?.(e)},defaultValue:_})})]})]})}for(var __webpack_i__ in exports.DateTimePicker=__webpack_exports__.DateTimePicker,__webpack_exports__)-1===["DateTimePicker"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
3
  //# sourceMappingURL=date-time-picker.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-time-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DatePickerProps {\r\n date?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePicker({\r\n date,\r\n placeholder,\r\n className,\r\n disabled,\r\n onChange,\r\n}: DatePickerProps) {\r\n const [currentDate, setCurrentDate] = React.useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy HH:mm')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n\r\n <div className=\"flex justify-center border-stroke border-t p-3\">\r\n <TimePicker\r\n setDate={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n date={currentDate}\r\n />\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePicker }\r\n"],"names":["DateTimePicker","date","placeholder","className","disabled","onChange","currentDate","setCurrentDate","React","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker"],"mappings":";u0CAyBA,SAASA,eAAe,CACtBC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACQ,EAChB,GAAM,CAACC,EAAaC,EAAe,CAAGC,+BAAAA,QAAc,CAAmBP,GAEvE,MACE,qCAACQ,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,8EACA,CAACN,GAAe,gBAChBH,GAEF,SAAUC,E,UAETE,EACCO,GAAAA,kCAAAA,MAAAA,EAAOP,EAAa,oBAEpB,oCAAC,Q,SAAMJ,GAAe,kB,GAGxB,oCAACY,oBAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,qCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,oCAACC,sCAAAA,QAAQA,CAAAA,CACP,KAAK,SACL,SAAUV,EACV,SAAUL,IACRM,EAAeN,GACfI,IAAWJ,EACb,C,GAGF,oCAAC,OAAI,UAAU,iD,SACb,oCAACgB,yCAAAA,UAAUA,CAAAA,CACT,QAAShB,IACPM,EAAeN,GACfI,IAAWJ,EACb,EACA,KAAMK,C,UAMlB,C"}
1
+ {"version":3,"file":"components\\date-time-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePicker({\r\n date,\r\n defaultValue,\r\n placeholder,\r\n className,\r\n disabled,\r\n onChange,\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n defaultValue?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy HH:mm')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n\r\n <div className=\"flex justify-center border-stroke border-t p-3\">\r\n <TimePicker\r\n date={currentDate}\r\n onTimeChange={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n defaultValue={defaultValue}\r\n />\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePicker }\r\n"],"names":["DateTimePicker","date","defaultValue","placeholder","className","disabled","onChange","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker"],"mappings":";u0CAgBA,SAASA,eAAe,CACtBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CAQT,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,+BAAAA,QAAAA,EAA2BR,GAEjE,MACE,qCAACS,qCAAAA,OAAOA,CAAAA,C,UACN,oCAACC,qCAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,qCAACC,oCAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,8EACA,CAACN,GAAe,gBAChBH,GAEF,SAAUC,E,UAETE,EACCO,GAAAA,kCAAAA,MAAAA,EAAOP,EAAa,oBAEpB,oCAAC,Q,SAAMJ,GAAe,kB,GAGxB,oCAACY,oBAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,qCAACC,qCAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,oCAACC,sCAAAA,QAAQA,CAAAA,CACP,KAAK,SACL,SAAUV,EACV,SAAUN,IACRO,EAAeP,GACfK,IAAWL,EACb,C,GAGF,oCAAC,OAAI,UAAU,iD,SACb,oCAACiB,yCAAAA,UAAUA,CAAAA,CACT,KAAMX,EACN,aAAcN,IACZO,EAAeP,GACfK,IAAWL,EACb,EACA,aAAcC,C,UAM1B,C"}
@@ -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__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TimePicker:()=>TimePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_react_namespaceObject=require("react"),external_label_cjs_namespaceObject=require("./label.cjs"),external_time_picker_input_cjs_namespaceObject=require("./time-picker-input.cjs");function TimePicker({date:e,setDate:_}){let r=external_react_namespaceObject.useRef(null),c=external_react_namespaceObject.useRef(null),t=external_react_namespaceObject.useRef(null);return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"flex items-end gap-2",children:[(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label,{htmlFor:"hours",className:"text-xs",children:"Hours"}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_input_cjs_namespaceObject.TimePickerInput,{picker:"hours",date:e,setDate:_,ref:c,onRightFocus:()=>r.current?.focus()})]}),(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_input_cjs_namespaceObject.TimePickerInput,{picker:"minutes",date:e,setDate:_,ref:r,onLeftFocus:()=>c.current?.focus(),onRightFocus:()=>t.current?.focus()})]}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex h-12 items-center",children:(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.Clock,{size:16,className:"ml-2"})})]})}for(var __webpack_i__ in exports.TimePicker=__webpack_exports__.TimePicker,__webpack_exports__)-1===["TimePicker"].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,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__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__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TimePicker:()=>TimePicker});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),ssr_namespaceObject=require("@phosphor-icons/react/dist/ssr"),external_react_namespaceObject=require("react"),external_label_cjs_namespaceObject=require("./label.cjs"),external_time_picker_input_cjs_namespaceObject=require("./time-picker-input.cjs");function TimePicker({date:e,defaultValue:_,onTimeChange:r}){let c=(0,external_react_namespaceObject.useRef)(null),t=(0,external_react_namespaceObject.useRef)(null),a=(0,external_react_namespaceObject.useRef)(null);return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"flex items-end gap-2",children:[(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label,{htmlFor:"hours",className:"text-xs",children:"Hours"}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_input_cjs_namespaceObject.TimePickerInput,{picker:"hours",date:e??_,setDate:r,ref:t,onRightFocus:()=>c.current?.focus()})]}),(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),(0,jsx_runtime_namespaceObject.jsx)(external_time_picker_input_cjs_namespaceObject.TimePickerInput,{picker:"minutes",date:e??_,setDate:r,ref:c,onLeftFocus:()=>t.current?.focus(),onRightFocus:()=>a.current?.focus()})]}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex h-12 items-center",children:(0,jsx_runtime_namespaceObject.jsx)(ssr_namespaceObject.Clock,{size:16,className:"ml-2"})})]})}for(var __webpack_i__ in exports.TimePicker=__webpack_exports__.TimePicker,__webpack_exports__)-1===["TimePicker"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
3
  //# sourceMappingURL=time-picker.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\time-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { Clock } from '@phosphor-icons/react/dist/ssr'\r\nimport * as React from 'react'\r\n\r\nimport { Label } from './label'\r\nimport { TimePickerInput } from './time-picker-input'\r\n\r\ninterface TimePickerProps {\r\n date: Date | undefined\r\n setDate: (date: Date | undefined) => void\r\n}\r\n\r\nexport function TimePicker({ date, setDate }: TimePickerProps) {\r\n const minuteRef = React.useRef<HTMLInputElement>(null)\r\n const hourRef = React.useRef<HTMLInputElement>(null)\r\n const secondRef = React.useRef<HTMLInputElement>(null)\r\n\r\n return (\r\n <div className=\"flex items-end gap-2\">\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"hours\" className=\"text-xs\">\r\n Hours\r\n </Label>\r\n <TimePickerInput\r\n picker=\"hours\"\r\n date={date}\r\n setDate={setDate}\r\n ref={hourRef}\r\n onRightFocus={() => minuteRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"minutes\" className=\"text-xs\">\r\n Minutes\r\n </Label>\r\n <TimePickerInput\r\n picker=\"minutes\"\r\n date={date}\r\n setDate={setDate}\r\n ref={minuteRef}\r\n onLeftFocus={() => hourRef.current?.focus()}\r\n onRightFocus={() => secondRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"flex h-12 items-center\">\r\n <Clock size={16} className=\"ml-2\" />\r\n </div>\r\n </div>\r\n )\r\n}\r\n"],"names":["TimePicker","date","setDate","minuteRef","React","hourRef","secondRef","Label","TimePickerInput","Clock"],"mappings":";+lCAaO,SAASA,WAAW,CAAEC,KAAAA,CAAI,CAAEC,QAAAA,CAAO,CAAmB,EAC3D,IAAMC,EAAYC,+BAAAA,MAAY,CAAmB,MAC3CC,EAAUD,+BAAAA,MAAY,CAAmB,MACzCE,EAAYF,+BAAAA,MAAY,CAAmB,MAEjD,MACE,qCAAC,OAAI,UAAU,uB,UACb,qCAAC,OAAI,UAAU,yB,UACb,oCAACG,mCAAAA,KAAKA,CAAAA,CAAC,QAAQ,QAAQ,UAAU,U,SAAU,O,GAG3C,oCAACC,+CAAAA,eAAeA,CAAAA,CACd,OAAO,QACP,KAAMP,EACN,QAASC,EACT,IAAKG,EACL,aAAc,IAAMF,EAAU,OAAO,EAAE,O,MAI3C,qCAAC,OAAI,UAAU,yB,UACb,oCAACI,mCAAAA,KAAKA,CAAAA,CAAC,QAAQ,UAAU,UAAU,U,SAAU,S,GAG7C,oCAACC,+CAAAA,eAAeA,CAAAA,CACd,OAAO,UACP,KAAMP,EACN,QAASC,EACT,IAAKC,EACL,YAAa,IAAME,EAAQ,OAAO,EAAE,QACpC,aAAc,IAAMC,EAAU,OAAO,EAAE,O,MAI3C,oCAAC,OAAI,UAAU,yB,SACb,oCAACG,oBAAAA,KAAKA,CAAAA,CAAC,KAAM,GAAI,UAAU,M,OAInC,C"}
1
+ {"version":3,"file":"components\\time-picker.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { Clock } from '@phosphor-icons/react/dist/ssr'\r\nimport { useRef } from 'react'\r\n\r\nimport { Label } from './label'\r\nimport { TimePickerInput } from './time-picker-input'\r\n\r\ninterface TimePickerProps {\r\n date: Date | undefined\r\n defaultValue?: Date\r\n onTimeChange: (date: Date | undefined) => void\r\n}\r\n\r\nexport function TimePicker({\r\n date,\r\n defaultValue,\r\n onTimeChange,\r\n}: TimePickerProps) {\r\n const minuteRef = useRef<HTMLInputElement>(null)\r\n const hourRef = useRef<HTMLInputElement>(null)\r\n const secondRef = useRef<HTMLInputElement>(null)\r\n\r\n return (\r\n <div className=\"flex items-end gap-2\">\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"hours\" className=\"text-xs\">\r\n Hours\r\n </Label>\r\n <TimePickerInput\r\n picker=\"hours\"\r\n date={date ?? defaultValue}\r\n setDate={onTimeChange}\r\n ref={hourRef}\r\n onRightFocus={() => minuteRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"minutes\" className=\"text-xs\">\r\n Minutes\r\n </Label>\r\n <TimePickerInput\r\n picker=\"minutes\"\r\n date={date ?? defaultValue}\r\n setDate={onTimeChange}\r\n ref={minuteRef}\r\n onLeftFocus={() => hourRef.current?.focus()}\r\n onRightFocus={() => secondRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"flex h-12 items-center\">\r\n <Clock size={16} className=\"ml-2\" />\r\n </div>\r\n </div>\r\n )\r\n}\r\n"],"names":["TimePicker","date","defaultValue","onTimeChange","minuteRef","useRef","hourRef","secondRef","Label","TimePickerInput","Clock"],"mappings":";+lCAcO,SAASA,WAAW,CACzBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,aAAAA,CAAY,CACI,EAChB,IAAMC,EAAYC,GAAAA,+BAAAA,MAAAA,EAAyB,MACrCC,EAAUD,GAAAA,+BAAAA,MAAAA,EAAyB,MACnCE,EAAYF,GAAAA,+BAAAA,MAAAA,EAAyB,MAE3C,MACE,qCAAC,OAAI,UAAU,uB,UACb,qCAAC,OAAI,UAAU,yB,UACb,oCAACG,mCAAAA,KAAKA,CAAAA,CAAC,QAAQ,QAAQ,UAAU,U,SAAU,O,GAG3C,oCAACC,+CAAAA,eAAeA,CAAAA,CACd,OAAO,QACP,KAAMR,GAAQC,EACd,QAASC,EACT,IAAKG,EACL,aAAc,IAAMF,EAAU,OAAO,EAAE,O,MAI3C,qCAAC,OAAI,UAAU,yB,UACb,oCAACI,mCAAAA,KAAKA,CAAAA,CAAC,QAAQ,UAAU,UAAU,U,SAAU,S,GAG7C,oCAACC,+CAAAA,eAAeA,CAAAA,CACd,OAAO,UACP,KAAMR,GAAQC,EACd,QAASC,EACT,IAAKC,EACL,YAAa,IAAME,EAAQ,OAAO,EAAE,QACpC,aAAc,IAAMC,EAAU,OAAO,EAAE,O,MAI3C,oCAAC,OAAI,UAAU,yB,SACb,oCAACG,oBAAAA,KAAKA,CAAAA,CAAC,KAAM,GAAI,UAAU,M,OAInC,C"}
@@ -1 +1 @@
1
- import*as t from"./data-table-pagination.js";import*as a 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-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-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.js";var e={"@/components/data-table/data-table-pagination":function(a){a.exports=t},"@/components/data-table/data-table-view-options":function(t){t.exports=a}},o={};function r(t){var a=o[t];if(void 0!==a)return a.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.d=(t,a)=>{for(var e in a)r.o(a,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},r.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n);var l=r("@/components/data-table/data-table-pagination"),d={};for(var i in l)"default"!==i&&(d[i]=(function(t){return l[t]}).bind(0,i));r.d(n,d);var f=r("@/components/data-table/data-table-view-options"),d={};for(var i in f)"default"!==i&&(d[i]=(function(t){return f[t]}).bind(0,i));r.d(n,d);
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,7 +1,8 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { Calendar } from './calendar';
3
- declare function DatePicker({ date, placeholder, className, disabled, onChange, ...props }: ComponentProps<typeof Calendar> & {
3
+ declare function DatePicker({ date, defaultValue, placeholder, className, disabled, onChange, ...props }: ComponentProps<typeof Calendar> & {
4
4
  date?: Date;
5
+ defaultValue?: Date;
5
6
  placeholder?: string;
6
7
  className?: string;
7
8
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAIhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAOrC,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACnC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5C,2CAsCA;AAMD,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAIhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAOrC,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACnC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5C,2CAsCA;AAMD,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react";import*as t from"date-fns";import*as a from"react";import*as s from"../lib/utils.js";import*as o from"./button.js";import*as n from"./calendar.js";import*as i from"./popover.js";function m({date:m,placeholder:l,className:d,disabled:c=!1,onChange:p,...f}){let[x,j]=(0,a.useState)(m);return(0,e.jsxs)(i.Popover,{children:[(0,e.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(o.Button,{id:"date",variant:"secondary",size:"md",className:(0,s.cn)("min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50",!x&&"text-gray-400",d),disabled:c,children:[x?(0,t.format)(x,"dd/MM/yyyy"):(0,e.jsx)("span",{children:l||"Selecione a data"}),(0,e.jsx)(r.CalendarBlank,{className:"ml-4 size-4 text-gray-600"})]})}),(0,e.jsx)(i.PopoverContent,{className:"w-auto p-0",align:"start",children:(0,e.jsx)(n.Calendar,{...f,mode:"single",selected:x,onSelect:e=>{j(e),p?.(e)}})})]})}export{m as DatePicker};
2
+ import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react";import*as t from"date-fns";import*as a from"react";import*as s from"../lib/utils.js";import*as o from"./button.js";import*as n from"./calendar.js";import*as i from"./popover.js";function m({date:m,defaultValue:l,placeholder:d,className:c,disabled:p=!1,onChange:f,...x}){let[j,u]=(0,a.useState)(m);return(0,e.jsxs)(i.Popover,{children:[(0,e.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(o.Button,{id:"date",variant:"secondary",size:"md",className:(0,s.cn)("min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50",!j&&"text-gray-400",c),disabled:p,children:[j?(0,t.format)(j,"dd/MM/yyyy"):(0,e.jsx)("span",{children:d||"Selecione a data"}),(0,e.jsx)(r.CalendarBlank,{className:"ml-4 size-4 text-gray-600"})]})}),(0,e.jsx)(i.PopoverContent,{className:"w-auto p-0",align:"start",children:(0,e.jsx)(n.Calendar,{...x,mode:"single",selected:j??l,onSelect:e=>{u(e),f?.(e)}})})]})}export{m as DatePicker};
3
3
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DatePicker({\r\n date,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n onChange,\r\n ...props\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n size=\"md\"\r\n className={cn(\r\n 'min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n <CalendarBlank className=\"ml-4 size-4 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\r\n <Calendar\r\n {...props}\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DatePicker }\r\n"],"names":["DatePicker","date","placeholder","className","disabled","onChange","props","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar"],"mappings":";8PAeA,SAASA,EAAW,CAClBC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAOJ,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,EAAAA,QAAAA,EAA2BR,GAEjE,MACE,WAACS,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,KAAK,KACL,UAAWC,GAAAA,EAAAA,EAAAA,EACT,0FACA,CAACN,GAAe,gBAChBJ,GAEF,SAAUC,E,UAETG,EACCO,GAAAA,EAAAA,MAAAA,EAAOP,EAAa,cAEpB,UAAC,Q,SAAML,GAAe,kB,GAExB,UAACa,EAAAA,aAAaA,CAAAA,CAAC,UAAU,2B,QAG7B,UAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,aAAa,MAAM,Q,SAC3C,UAACC,EAAAA,QAAQA,CAAAA,CACN,GAAGX,CAAK,CACT,KAAK,SACL,SAAUC,EACV,SAAUN,IACRO,EAAeP,GACfI,IAAWJ,EACb,C,OAKV,Q"}
1
+ {"version":3,"file":"components\\date-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DatePicker({\r\n date,\r\n defaultValue,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n onChange,\r\n ...props\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n defaultValue?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n size=\"md\"\r\n className={cn(\r\n 'min-w-60 justify-between rounded-md px-4 text-left font-normal text-sm hover:bg-gray-50',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n <CalendarBlank className=\"ml-4 size-4 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\r\n <Calendar\r\n {...props}\r\n mode=\"single\"\r\n selected={currentDate ?? defaultValue}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DatePicker }\r\n"],"names":["DatePicker","date","defaultValue","placeholder","className","disabled","onChange","props","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar"],"mappings":";8PAeA,SAASA,EAAW,CAClBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAQJ,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,EAAAA,QAAAA,EAA2BT,GAEjE,MACE,WAACU,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,KAAK,KACL,UAAWC,GAAAA,EAAAA,EAAAA,EACT,0FACA,CAACN,GAAe,gBAChBJ,GAEF,SAAUC,E,UAETG,EACCO,GAAAA,EAAAA,MAAAA,EAAOP,EAAa,cAEpB,UAAC,Q,SAAML,GAAe,kB,GAExB,UAACa,EAAAA,aAAaA,CAAAA,CAAC,UAAU,2B,QAG7B,UAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,aAAa,MAAM,Q,SAC3C,UAACC,EAAAA,QAAQA,CAAAA,CACN,GAAGX,CAAK,CACT,KAAK,SACL,SAAUC,GAAeN,EACzB,SAAUD,IACRQ,EAAeR,GACfK,IAAWL,EACb,C,OAKV,Q"}
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-picker-with-range.d.ts","sourceRoot":"","sources":["../../../src/components/date-time-picker-with-range.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAQ5C,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAA;CACjD;AAMD,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAgB,GACjB,EAAE,4BAA4B,2CA+E9B;AAMD,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
1
+ {"version":3,"file":"date-time-picker-with-range.d.ts","sourceRoot":"","sources":["../../../src/components/date-time-picker-with-range.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAQ5C,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAA;CACjD;AAMD,iBAAS,uBAAuB,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,EACT,QAAgB,GACjB,EAAE,4BAA4B,2CAmF9B;AAMD,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react/dist/ssr";import*as o from"date-fns";import*as t from"react";import*as s from"../lib/utils.js";import*as a from"./button.js";import*as m from"./calendar.js";import*as i from"./popover.js";import*as n from"./time-picker.js";function f({startDate:f,endDate:l,onChange:d,placeholder:c,className:x,disabled:p=!1}){let[j,y]=(0,t.useState)({from:f,to:l}),h=e=>{if(!e){y(void 0),d?.(void 0);return}y({from:e.from??j?.from,to:e.to}),d?.({from:e.from??j?.from,to:e.to})};return(0,e.jsxs)(i.Popover,{children:[(0,e.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(a.Button,{id:"date",variant:"secondary",className:(0,s.cn)("h-12 min-w-96 justify-between px-4 text-left font-normal",!j?.from&&!j?.to&&"text-gray-400",x),disabled:p,children:[j?.from?j.to?`${(0,o.format)(j.from,"dd/MM/yyyy HH:mm")} - ${(0,o.format)(j.to,"dd/MM/yyyy HH:mm")}`:(0,o.format)(j.from,"dd/MM/yyyy HH:mm"):(0,e.jsx)("span",{children:c||"Selecione o per\xedodo"}),(0,e.jsx)(r.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,e.jsxs)(i.PopoverContent,{className:"w-auto p-0",children:[(0,e.jsx)(m.Calendar,{mode:"range",selected:j,onSelect:h,numberOfMonths:2}),(0,e.jsx)("div",{className:"flex flex-col border-stroke border-t p-3",children:(0,e.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,e.jsx)(n.TimePicker,{setDate:e=>h({...j,from:e}),date:j?.from}),(0,e.jsx)(n.TimePicker,{setDate:e=>h({...j,to:e}),date:j?.to})]})}),(0,e.jsx)("div",{className:"flex flex-1 justify-center",children:(0,e.jsxs)(a.Button,{variant:"secondary",className:"flex h-12 flex-1",onClick:()=>h(void 0),children:[(0,e.jsx)(r.X,{size:12})," Clear"]})})]})]})}export{f as DateTimePickerWithRange};
2
+ import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react/dist/ssr";import*as o from"date-fns";import*as t from"react";import*as s from"../lib/utils.js";import*as a from"./button.js";import*as m from"./calendar.js";import*as i from"./popover.js";import*as n from"./time-picker.js";function f({startDate:f,endDate:l,onChange:d,placeholder:c,className:x,disabled:p=!1}){let[j,y]=(0,t.useState)({from:f,to:l}),h=e=>{if(!e){y(void 0),d?.(void 0);return}y({from:e.from??j?.from,to:e.to}),d?.({from:e.from??j?.from,to:e.to})};return(0,e.jsxs)(i.Popover,{children:[(0,e.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(a.Button,{id:"date",variant:"secondary",className:(0,s.cn)("h-12 min-w-96 justify-between px-4 text-left font-normal",!j?.from&&!j?.to&&"text-gray-400",x),disabled:p,children:[j?.from?j.to?`${(0,o.format)(j.from,"dd/MM/yyyy HH:mm")} - ${(0,o.format)(j.to,"dd/MM/yyyy HH:mm")}`:(0,o.format)(j.from,"dd/MM/yyyy HH:mm"):(0,e.jsx)("span",{children:c||"Selecione o per\xedodo"}),(0,e.jsx)(r.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,e.jsxs)(i.PopoverContent,{className:"w-auto p-0",children:[(0,e.jsx)(m.Calendar,{mode:"range",selected:j,onSelect:h,numberOfMonths:2}),(0,e.jsx)("div",{className:"flex flex-col border-stroke border-t p-3",children:(0,e.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,e.jsx)(n.TimePicker,{onTimeChange:e=>h({...j,from:e}),date:j?.from}),(0,e.jsx)(n.TimePicker,{onTimeChange:e=>h({...j,to:e}),date:j?.to})]})}),(0,e.jsx)("div",{className:"flex flex-1 justify-center",children:(0,e.jsxs)(a.Button,{variant:"secondary",className:"flex h-12 flex-1",onClick:()=>h(void 0),children:[(0,e.jsx)(r.X,{size:12})," Clear"]})})]})]})}export{f as DateTimePickerWithRange};
3
3
  //# sourceMappingURL=date-time-picker-with-range.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-time-picker-with-range.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker-with-range.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank, X } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { useState } from 'react'\r\nimport { DateRange } from 'react-day-picker'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DateTimePickerWithRangeProps {\r\n startDate?: Date\r\n endDate?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: DateRange | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePickerWithRange\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePickerWithRange({\r\n startDate,\r\n endDate,\r\n onChange,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n}: DateTimePickerWithRangeProps) {\r\n const [dateRange, setDateRange] = useState<DateRange | undefined>({\r\n from: startDate,\r\n to: endDate,\r\n })\r\n\r\n const handleDateChange = (newRange: Partial<DateRange> | undefined) => {\r\n if (!newRange) {\r\n setDateRange(undefined)\r\n onChange?.(undefined)\r\n return\r\n }\r\n\r\n setDateRange({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n onChange?.({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n }\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 min-w-96 justify-between px-4 text-left font-normal',\r\n !dateRange?.from && !dateRange?.to && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {dateRange?.from ? (\r\n dateRange.to ? (\r\n `${format(dateRange.from, 'dd/MM/yyyy HH:mm')} - ${format(dateRange.to, 'dd/MM/yyyy HH:mm')}`\r\n ) : (\r\n format(dateRange.from, 'dd/MM/yyyy HH:mm')\r\n )\r\n ) : (\r\n <span>{placeholder || 'Selecione o período'}</span>\r\n )}\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"range\"\r\n selected={dateRange}\r\n onSelect={handleDateChange}\r\n numberOfMonths={2}\r\n />\r\n <div className=\"flex flex-col border-stroke border-t p-3\">\r\n <div className=\"flex justify-between gap-4\">\r\n <TimePicker\r\n setDate={date => handleDateChange({ ...dateRange, from: date })}\r\n date={dateRange?.from}\r\n />\r\n <TimePicker\r\n setDate={date => handleDateChange({ ...dateRange, to: date })}\r\n date={dateRange?.to}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"flex flex-1 justify-center\">\r\n <Button\r\n variant=\"secondary\"\r\n className=\"flex h-12 flex-1\"\r\n onClick={() => handleDateChange(undefined)}\r\n >\r\n <X size={12} /> Clear\r\n </Button>\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePickerWithRange }\r\n"],"names":["DateTimePickerWithRange","startDate","endDate","onChange","placeholder","className","disabled","dateRange","setDateRange","useState","handleDateChange","newRange","undefined","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker","date","X"],"mappings":";0SA0BA,SAASA,EAAwB,CAC/BC,UAAAA,CAAS,CACTC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CACa,EAC7B,GAAM,CAACC,EAAWC,EAAa,CAAGC,GAAAA,EAAAA,QAAAA,EAAgC,CAChE,KAAMR,EACN,GAAIC,CACN,GAEMQ,EAAmB,IACvB,GAAI,CAACC,EAAU,CACbH,EAAaI,KAAAA,GACbT,IAAWS,KAAAA,GACX,MACF,CAEAJ,EAAa,CACX,KAAMG,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,GAEjBR,IAAW,CACT,KAAMQ,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,EAEnB,EAEA,MACE,WAACE,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,EAAAA,EAAAA,EACT,2DACA,CAACT,GAAW,MAAQ,CAACA,GAAW,IAAM,gBACtCF,GAEF,SAAUC,E,UAETC,GAAW,KACVA,EAAU,EAAE,CACV,CAAC,EAAEU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAAoB,GAAG,EAAEU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,EAAE,CAAE,oBAAoB,CAAC,CAE7FU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAGzB,UAAC,Q,SAAMH,GAAe,wB,GAExB,UAACc,EAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,WAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,UAACC,EAAAA,QAAQA,CAAAA,CACP,KAAK,QACL,SAAUb,EACV,SAAUG,EACV,eAAgB,C,GAElB,UAAC,OAAI,UAAU,2C,SACb,WAAC,OAAI,UAAU,6B,UACb,UAACW,EAAAA,UAAUA,CAAAA,CACT,QAASC,GAAQZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,KAAMe,CAAK,GAC7D,KAAMf,GAAW,I,GAEnB,UAACc,EAAAA,UAAUA,CAAAA,CACT,QAASC,GAAQZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,GAAIe,CAAK,GAC3D,KAAMf,GAAW,E,QAIvB,UAAC,OAAI,UAAU,6B,SACb,WAACQ,EAAAA,MAAMA,CAAAA,CACL,QAAQ,YACR,UAAU,mBACV,QAAS,IAAML,EAAiBE,KAAAA,G,UAEhC,UAACW,EAAAA,CAACA,CAAAA,CAAC,KAAM,E,GAAM,S,UAM3B,Q"}
1
+ {"version":3,"file":"components\\date-time-picker-with-range.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker-with-range.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank, X } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { useState } from 'react'\r\nimport { DateRange } from 'react-day-picker'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DateTimePickerWithRangeProps {\r\n startDate?: Date\r\n endDate?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: DateRange | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePickerWithRange\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePickerWithRange({\r\n startDate,\r\n endDate,\r\n onChange,\r\n placeholder,\r\n className,\r\n disabled = false,\r\n}: DateTimePickerWithRangeProps) {\r\n const [dateRange, setDateRange] = useState<DateRange | undefined>({\r\n from: startDate,\r\n to: endDate,\r\n })\r\n\r\n const handleDateChange = (newRange: Partial<DateRange> | undefined) => {\r\n if (!newRange) {\r\n setDateRange(undefined)\r\n onChange?.(undefined)\r\n return\r\n }\r\n\r\n setDateRange({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n onChange?.({\r\n from: newRange.from ?? dateRange?.from,\r\n to: newRange.to,\r\n })\r\n }\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 min-w-96 justify-between px-4 text-left font-normal',\r\n !dateRange?.from && !dateRange?.to && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {dateRange?.from ? (\r\n dateRange.to ? (\r\n `${format(dateRange.from, 'dd/MM/yyyy HH:mm')} - ${format(dateRange.to, 'dd/MM/yyyy HH:mm')}`\r\n ) : (\r\n format(dateRange.from, 'dd/MM/yyyy HH:mm')\r\n )\r\n ) : (\r\n <span>{placeholder || 'Selecione o período'}</span>\r\n )}\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"range\"\r\n selected={dateRange}\r\n onSelect={handleDateChange}\r\n numberOfMonths={2}\r\n />\r\n <div className=\"flex flex-col border-stroke border-t p-3\">\r\n <div className=\"flex justify-between gap-4\">\r\n <TimePicker\r\n onTimeChange={date =>\r\n handleDateChange({ ...dateRange, from: date })\r\n }\r\n date={dateRange?.from}\r\n />\r\n <TimePicker\r\n onTimeChange={date =>\r\n handleDateChange({ ...dateRange, to: date })\r\n }\r\n date={dateRange?.to}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"flex flex-1 justify-center\">\r\n <Button\r\n variant=\"secondary\"\r\n className=\"flex h-12 flex-1\"\r\n onClick={() => handleDateChange(undefined)}\r\n >\r\n <X size={12} /> Clear\r\n </Button>\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePickerWithRange }\r\n"],"names":["DateTimePickerWithRange","startDate","endDate","onChange","placeholder","className","disabled","dateRange","setDateRange","useState","handleDateChange","newRange","undefined","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker","date","X"],"mappings":";0SA0BA,SAASA,EAAwB,CAC/BC,UAAAA,CAAS,CACTC,QAAAA,CAAO,CACPC,SAAAA,CAAQ,CACRC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,EAAW,EAAK,CACa,EAC7B,GAAM,CAACC,EAAWC,EAAa,CAAGC,GAAAA,EAAAA,QAAAA,EAAgC,CAChE,KAAMR,EACN,GAAIC,CACN,GAEMQ,EAAmB,IACvB,GAAI,CAACC,EAAU,CACbH,EAAaI,KAAAA,GACbT,IAAWS,KAAAA,GACX,MACF,CAEAJ,EAAa,CACX,KAAMG,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,GAEjBR,IAAW,CACT,KAAMQ,EAAS,IAAI,EAAIJ,GAAW,KAClC,GAAII,EAAS,EAAE,EAEnB,EAEA,MACE,WAACE,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,EAAAA,EAAAA,EACT,2DACA,CAACT,GAAW,MAAQ,CAACA,GAAW,IAAM,gBACtCF,GAEF,SAAUC,E,UAETC,GAAW,KACVA,EAAU,EAAE,CACV,CAAC,EAAEU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAAoB,GAAG,EAAEU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,EAAE,CAAE,oBAAoB,CAAC,CAE7FU,GAAAA,EAAAA,MAAAA,EAAOV,EAAU,IAAI,CAAE,oBAGzB,UAAC,Q,SAAMH,GAAe,wB,GAExB,UAACc,EAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,WAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,UAACC,EAAAA,QAAQA,CAAAA,CACP,KAAK,QACL,SAAUb,EACV,SAAUG,EACV,eAAgB,C,GAElB,UAAC,OAAI,UAAU,2C,SACb,WAAC,OAAI,UAAU,6B,UACb,UAACW,EAAAA,UAAUA,CAAAA,CACT,aAAcC,GACZZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,KAAMe,CAAK,GAE9C,KAAMf,GAAW,I,GAEnB,UAACc,EAAAA,UAAUA,CAAAA,CACT,aAAcC,GACZZ,EAAiB,CAAE,GAAGH,CAAS,CAAE,GAAIe,CAAK,GAE5C,KAAMf,GAAW,E,QAIvB,UAAC,OAAI,UAAU,6B,SACb,WAACQ,EAAAA,MAAMA,CAAAA,CACL,QAAQ,YACR,UAAU,mBACV,QAAS,IAAML,EAAiBE,KAAAA,G,UAEhC,UAACW,EAAAA,CAACA,CAAAA,CAAC,KAAM,E,GAAM,S,UAM3B,Q"}
@@ -1,10 +1,12 @@
1
- interface DatePickerProps {
1
+ import { ComponentProps } from 'react';
2
+ import { Calendar } from './calendar';
3
+ declare function DateTimePicker({ date, defaultValue, placeholder, className, disabled, onChange, }: ComponentProps<typeof Calendar> & {
2
4
  date?: Date;
5
+ defaultValue?: Date;
3
6
  placeholder?: string;
4
7
  className?: string;
5
8
  disabled?: boolean;
6
9
  onChange?: (date: Date | undefined) => void;
7
- }
8
- declare function DateTimePicker({ date, placeholder, className, disabled, onChange, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
10
+ }): import("react/jsx-runtime").JSX.Element;
9
11
  export { DateTimePicker };
10
12
  //# sourceMappingURL=date-time-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-time-picker.tsx"],"names":[],"mappings":"AAaA,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5C;AAMD,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,2CA+CjB;AAMD,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-time-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAA;AAIhD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAQrC,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACnC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC5C,2CAgDA;AAMD,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react/dist/ssr";import*as t from"date-fns";import*as s from"react";import*as a from"../lib/utils.js";import*as o from"./button.js";import*as i from"./calendar.js";import*as n from"./popover.js";import*as m from"./time-picker.js";function l({date:l,placeholder:d,className:c,disabled:p,onChange:f}){let[j,x]=s.useState(l);return(0,e.jsxs)(n.Popover,{children:[(0,e.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(o.Button,{id:"date",variant:"secondary",className:(0,a.cn)("h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent",!j&&"text-gray-400",c),disabled:p,children:[j?(0,t.format)(j,"dd/MM/yyyy HH:mm"):(0,e.jsx)("span",{children:d||"Selecione a data"}),(0,e.jsx)(r.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,e.jsxs)(n.PopoverContent,{className:"w-auto p-0",children:[(0,e.jsx)(i.Calendar,{mode:"single",selected:j,onSelect:e=>{x(e),f?.(e)}}),(0,e.jsx)("div",{className:"flex justify-center border-stroke border-t p-3",children:(0,e.jsx)(m.TimePicker,{setDate:e=>{x(e),f?.(e)},date:j})})]})]})}export{l as DateTimePicker};
2
+ import*as e from"react/jsx-runtime";import*as r from"@phosphor-icons/react/dist/ssr";import*as t from"date-fns";import*as s from"react";import*as a from"../lib/utils.js";import*as o from"./button.js";import*as i from"./calendar.js";import*as n from"./popover.js";import*as m from"./time-picker.js";function l({date:l,defaultValue:d,placeholder:c,className:p,disabled:f,onChange:j}){let[x,u]=(0,s.useState)(l);return(0,e.jsxs)(n.Popover,{children:[(0,e.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,e.jsxs)(o.Button,{id:"date",variant:"secondary",className:(0,a.cn)("h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent",!x&&"text-gray-400",p),disabled:f,children:[x?(0,t.format)(x,"dd/MM/yyyy HH:mm"):(0,e.jsx)("span",{children:c||"Selecione a data"}),(0,e.jsx)(r.CalendarBlank,{size:20,className:"ml-2 text-gray-600"})]})}),(0,e.jsxs)(n.PopoverContent,{className:"w-auto p-0",children:[(0,e.jsx)(i.Calendar,{mode:"single",selected:x,onSelect:e=>{u(e),j?.(e)}}),(0,e.jsx)("div",{className:"flex justify-center border-stroke border-t p-3",children:(0,e.jsx)(m.TimePicker,{date:x,onTimeChange:e=>{u(e),j?.(e)},defaultValue:d})})]})]})}export{l as DateTimePicker};
3
3
  //# sourceMappingURL=date-time-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\date-time-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\ninterface DatePickerProps {\r\n date?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePicker({\r\n date,\r\n placeholder,\r\n className,\r\n disabled,\r\n onChange,\r\n}: DatePickerProps) {\r\n const [currentDate, setCurrentDate] = React.useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy HH:mm')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n\r\n <div className=\"flex justify-center border-stroke border-t p-3\">\r\n <TimePicker\r\n setDate={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n date={currentDate}\r\n />\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePicker }\r\n"],"names":["DateTimePicker","date","placeholder","className","disabled","onChange","currentDate","setCurrentDate","React","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker"],"mappings":";0SAyBA,SAASA,EAAe,CACtBC,KAAAA,CAAI,CACJC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CACQ,EAChB,GAAM,CAACC,EAAaC,EAAe,CAAGC,EAAAA,QAAc,CAAmBP,GAEvE,MACE,WAACQ,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,EAAAA,EAAAA,EACT,8EACA,CAACN,GAAe,gBAChBH,GAEF,SAAUC,E,UAETE,EACCO,GAAAA,EAAAA,MAAAA,EAAOP,EAAa,oBAEpB,UAAC,Q,SAAMJ,GAAe,kB,GAGxB,UAACY,EAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,WAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,UAACC,EAAAA,QAAQA,CAAAA,CACP,KAAK,SACL,SAAUV,EACV,SAAUL,IACRM,EAAeN,GACfI,IAAWJ,EACb,C,GAGF,UAAC,OAAI,UAAU,iD,SACb,UAACgB,EAAAA,UAAUA,CAAAA,CACT,QAAShB,IACPM,EAAeN,GACfI,IAAWJ,EACb,EACA,KAAMK,C,UAMlB,Q"}
1
+ {"version":3,"file":"components\\date-time-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/date-time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { CalendarBlank } from '@phosphor-icons/react/dist/ssr'\r\nimport { format } from 'date-fns'\r\nimport { ComponentProps, useState } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Button } from './button'\r\nimport { Calendar } from './calendar'\r\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\r\nimport { TimePicker } from './time-picker'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: DateTimePicker\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction DateTimePicker({\r\n date,\r\n defaultValue,\r\n placeholder,\r\n className,\r\n disabled,\r\n onChange,\r\n}: ComponentProps<typeof Calendar> & {\r\n date?: Date\r\n defaultValue?: Date\r\n placeholder?: string\r\n className?: string\r\n disabled?: boolean\r\n onChange?: (date: Date | undefined) => void\r\n}) {\r\n const [currentDate, setCurrentDate] = useState<Date | undefined>(date)\r\n\r\n return (\r\n <Popover>\r\n <PopoverTrigger asChild>\r\n <Button\r\n id=\"date\"\r\n variant=\"secondary\"\r\n className={cn(\r\n 'h-12 w-full justify-between px-4 text-left font-normal hover:bg-transparent',\r\n !currentDate && 'text-gray-400',\r\n className\r\n )}\r\n disabled={disabled}\r\n >\r\n {currentDate ? (\r\n format(currentDate, 'dd/MM/yyyy HH:mm')\r\n ) : (\r\n <span>{placeholder || 'Selecione a data'}</span>\r\n )}\r\n\r\n <CalendarBlank size={20} className=\"ml-2 text-gray-600\" />\r\n </Button>\r\n </PopoverTrigger>\r\n <PopoverContent className=\"w-auto p-0\">\r\n <Calendar\r\n mode=\"single\"\r\n selected={currentDate}\r\n onSelect={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n />\r\n\r\n <div className=\"flex justify-center border-stroke border-t p-3\">\r\n <TimePicker\r\n date={currentDate}\r\n onTimeChange={date => {\r\n setCurrentDate(date)\r\n onChange?.(date)\r\n }}\r\n defaultValue={defaultValue}\r\n />\r\n </div>\r\n </PopoverContent>\r\n </Popover>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport { DateTimePicker }\r\n"],"names":["DateTimePicker","date","defaultValue","placeholder","className","disabled","onChange","currentDate","setCurrentDate","useState","Popover","PopoverTrigger","Button","cn","format","CalendarBlank","PopoverContent","Calendar","TimePicker"],"mappings":";0SAgBA,SAASA,EAAe,CACtBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,YAAAA,CAAW,CACXC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACRC,SAAAA,CAAQ,CAQT,EACC,GAAM,CAACC,EAAaC,EAAe,CAAGC,GAAAA,EAAAA,QAAAA,EAA2BR,GAEjE,MACE,WAACS,EAAAA,OAAOA,CAAAA,C,UACN,UAACC,EAAAA,cAAcA,CAAAA,CAAC,QAAO,G,SACrB,WAACC,EAAAA,MAAMA,CAAAA,CACL,GAAG,OACH,QAAQ,YACR,UAAWC,GAAAA,EAAAA,EAAAA,EACT,8EACA,CAACN,GAAe,gBAChBH,GAEF,SAAUC,E,UAETE,EACCO,GAAAA,EAAAA,MAAAA,EAAOP,EAAa,oBAEpB,UAAC,Q,SAAMJ,GAAe,kB,GAGxB,UAACY,EAAAA,aAAaA,CAAAA,CAAC,KAAM,GAAI,UAAU,oB,QAGvC,WAACC,EAAAA,cAAcA,CAAAA,CAAC,UAAU,a,UACxB,UAACC,EAAAA,QAAQA,CAAAA,CACP,KAAK,SACL,SAAUV,EACV,SAAUN,IACRO,EAAeP,GACfK,IAAWL,EACb,C,GAGF,UAAC,OAAI,UAAU,iD,SACb,UAACiB,EAAAA,UAAUA,CAAAA,CACT,KAAMX,EACN,aAAcN,IACZO,EAAeP,GACfK,IAAWL,EACb,EACA,aAAcC,C,UAM1B,Q"}
@@ -1,7 +1,8 @@
1
1
  interface TimePickerProps {
2
2
  date: Date | undefined;
3
- setDate: (date: Date | undefined) => void;
3
+ defaultValue?: Date;
4
+ onTimeChange: (date: Date | undefined) => void;
4
5
  }
5
- export declare function TimePicker({ date, setDate }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TimePicker({ date, defaultValue, onTimeChange, }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=time-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../src/components/time-picker.tsx"],"names":[],"mappings":"AAQA,UAAU,eAAe;IACvB,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;IACtB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC1C;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,eAAe,2CAuC5D"}
1
+ {"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../src/components/time-picker.tsx"],"names":[],"mappings":"AAQA,UAAU,eAAe;IACvB,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;IACtB,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;CAC/C;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,YAAY,GACb,EAAE,eAAe,2CAuCjB"}
@@ -1,3 +1,3 @@
1
1
  'use client'
2
- import*as e from"react/jsx-runtime";import*as s from"@phosphor-icons/react/dist/ssr";import*as r from"react";import*as t from"./label.js";import*as i from"./time-picker-input.js";function c({date:c,setDate:a}){let l=r.useRef(null),n=r.useRef(null),o=r.useRef(null);return(0,e.jsxs)("div",{className:"flex items-end gap-2",children:[(0,e.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,e.jsx)(t.Label,{htmlFor:"hours",className:"text-xs",children:"Hours"}),(0,e.jsx)(i.TimePickerInput,{picker:"hours",date:c,setDate:a,ref:n,onRightFocus:()=>l.current?.focus()})]}),(0,e.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,e.jsx)(t.Label,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),(0,e.jsx)(i.TimePickerInput,{picker:"minutes",date:c,setDate:a,ref:l,onLeftFocus:()=>n.current?.focus(),onRightFocus:()=>o.current?.focus()})]}),(0,e.jsx)("div",{className:"flex h-12 items-center",children:(0,e.jsx)(s.Clock,{size:16,className:"ml-2"})})]})}export{c as TimePicker};
2
+ import*as e from"react/jsx-runtime";import*as s from"@phosphor-icons/react/dist/ssr";import*as r from"react";import*as t from"./label.js";import*as i from"./time-picker-input.js";function c({date:c,defaultValue:a,onTimeChange:l}){let n=(0,r.useRef)(null),o=(0,r.useRef)(null),m=(0,r.useRef)(null);return(0,e.jsxs)("div",{className:"flex items-end gap-2",children:[(0,e.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,e.jsx)(t.Label,{htmlFor:"hours",className:"text-xs",children:"Hours"}),(0,e.jsx)(i.TimePickerInput,{picker:"hours",date:c??a,setDate:l,ref:o,onRightFocus:()=>n.current?.focus()})]}),(0,e.jsxs)("div",{className:"grid gap-1 text-center",children:[(0,e.jsx)(t.Label,{htmlFor:"minutes",className:"text-xs",children:"Minutes"}),(0,e.jsx)(i.TimePickerInput,{picker:"minutes",date:c??a,setDate:l,ref:n,onLeftFocus:()=>o.current?.focus(),onRightFocus:()=>m.current?.focus()})]}),(0,e.jsx)("div",{className:"flex h-12 items-center",children:(0,e.jsx)(s.Clock,{size:16,className:"ml-2"})})]})}export{c as TimePicker};
3
3
  //# sourceMappingURL=time-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\time-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { Clock } from '@phosphor-icons/react/dist/ssr'\r\nimport * as React from 'react'\r\n\r\nimport { Label } from './label'\r\nimport { TimePickerInput } from './time-picker-input'\r\n\r\ninterface TimePickerProps {\r\n date: Date | undefined\r\n setDate: (date: Date | undefined) => void\r\n}\r\n\r\nexport function TimePicker({ date, setDate }: TimePickerProps) {\r\n const minuteRef = React.useRef<HTMLInputElement>(null)\r\n const hourRef = React.useRef<HTMLInputElement>(null)\r\n const secondRef = React.useRef<HTMLInputElement>(null)\r\n\r\n return (\r\n <div className=\"flex items-end gap-2\">\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"hours\" className=\"text-xs\">\r\n Hours\r\n </Label>\r\n <TimePickerInput\r\n picker=\"hours\"\r\n date={date}\r\n setDate={setDate}\r\n ref={hourRef}\r\n onRightFocus={() => minuteRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"minutes\" className=\"text-xs\">\r\n Minutes\r\n </Label>\r\n <TimePickerInput\r\n picker=\"minutes\"\r\n date={date}\r\n setDate={setDate}\r\n ref={minuteRef}\r\n onLeftFocus={() => hourRef.current?.focus()}\r\n onRightFocus={() => secondRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"flex h-12 items-center\">\r\n <Clock size={16} className=\"ml-2\" />\r\n </div>\r\n </div>\r\n )\r\n}\r\n"],"names":["TimePicker","date","setDate","minuteRef","React","hourRef","secondRef","Label","TimePickerInput","Clock"],"mappings":";mLAaO,SAASA,EAAW,CAAEC,KAAAA,CAAI,CAAEC,QAAAA,CAAO,CAAmB,EAC3D,IAAMC,EAAYC,EAAAA,MAAY,CAAmB,MAC3CC,EAAUD,EAAAA,MAAY,CAAmB,MACzCE,EAAYF,EAAAA,MAAY,CAAmB,MAEjD,MACE,WAAC,OAAI,UAAU,uB,UACb,WAAC,OAAI,UAAU,yB,UACb,UAACG,EAAAA,KAAKA,CAAAA,CAAC,QAAQ,QAAQ,UAAU,U,SAAU,O,GAG3C,UAACC,EAAAA,eAAeA,CAAAA,CACd,OAAO,QACP,KAAMP,EACN,QAASC,EACT,IAAKG,EACL,aAAc,IAAMF,EAAU,OAAO,EAAE,O,MAI3C,WAAC,OAAI,UAAU,yB,UACb,UAACI,EAAAA,KAAKA,CAAAA,CAAC,QAAQ,UAAU,UAAU,U,SAAU,S,GAG7C,UAACC,EAAAA,eAAeA,CAAAA,CACd,OAAO,UACP,KAAMP,EACN,QAASC,EACT,IAAKC,EACL,YAAa,IAAME,EAAQ,OAAO,EAAE,QACpC,aAAc,IAAMC,EAAU,OAAO,EAAE,O,MAI3C,UAAC,OAAI,UAAU,yB,SACb,UAACG,EAAAA,KAAKA,CAAAA,CAAC,KAAM,GAAI,UAAU,M,OAInC,Q"}
1
+ {"version":3,"file":"components\\time-picker.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/time-picker.tsx"],"sourcesContent":["\r\n\r\nimport { Clock } from '@phosphor-icons/react/dist/ssr'\r\nimport { useRef } from 'react'\r\n\r\nimport { Label } from './label'\r\nimport { TimePickerInput } from './time-picker-input'\r\n\r\ninterface TimePickerProps {\r\n date: Date | undefined\r\n defaultValue?: Date\r\n onTimeChange: (date: Date | undefined) => void\r\n}\r\n\r\nexport function TimePicker({\r\n date,\r\n defaultValue,\r\n onTimeChange,\r\n}: TimePickerProps) {\r\n const minuteRef = useRef<HTMLInputElement>(null)\r\n const hourRef = useRef<HTMLInputElement>(null)\r\n const secondRef = useRef<HTMLInputElement>(null)\r\n\r\n return (\r\n <div className=\"flex items-end gap-2\">\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"hours\" className=\"text-xs\">\r\n Hours\r\n </Label>\r\n <TimePickerInput\r\n picker=\"hours\"\r\n date={date ?? defaultValue}\r\n setDate={onTimeChange}\r\n ref={hourRef}\r\n onRightFocus={() => minuteRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"grid gap-1 text-center\">\r\n <Label htmlFor=\"minutes\" className=\"text-xs\">\r\n Minutes\r\n </Label>\r\n <TimePickerInput\r\n picker=\"minutes\"\r\n date={date ?? defaultValue}\r\n setDate={onTimeChange}\r\n ref={minuteRef}\r\n onLeftFocus={() => hourRef.current?.focus()}\r\n onRightFocus={() => secondRef.current?.focus()}\r\n />\r\n </div>\r\n\r\n <div className=\"flex h-12 items-center\">\r\n <Clock size={16} className=\"ml-2\" />\r\n </div>\r\n </div>\r\n )\r\n}\r\n"],"names":["TimePicker","date","defaultValue","onTimeChange","minuteRef","useRef","hourRef","secondRef","Label","TimePickerInput","Clock"],"mappings":";mLAcO,SAASA,EAAW,CACzBC,KAAAA,CAAI,CACJC,aAAAA,CAAY,CACZC,aAAAA,CAAY,CACI,EAChB,IAAMC,EAAYC,GAAAA,EAAAA,MAAAA,EAAyB,MACrCC,EAAUD,GAAAA,EAAAA,MAAAA,EAAyB,MACnCE,EAAYF,GAAAA,EAAAA,MAAAA,EAAyB,MAE3C,MACE,WAAC,OAAI,UAAU,uB,UACb,WAAC,OAAI,UAAU,yB,UACb,UAACG,EAAAA,KAAKA,CAAAA,CAAC,QAAQ,QAAQ,UAAU,U,SAAU,O,GAG3C,UAACC,EAAAA,eAAeA,CAAAA,CACd,OAAO,QACP,KAAMR,GAAQC,EACd,QAASC,EACT,IAAKG,EACL,aAAc,IAAMF,EAAU,OAAO,EAAE,O,MAI3C,WAAC,OAAI,UAAU,yB,UACb,UAACI,EAAAA,KAAKA,CAAAA,CAAC,QAAQ,UAAU,UAAU,U,SAAU,S,GAG7C,UAACC,EAAAA,eAAeA,CAAAA,CACd,OAAO,UACP,KAAMR,GAAQC,EACd,QAASC,EACT,IAAKC,EACL,YAAa,IAAME,EAAQ,OAAO,EAAE,QACpC,aAAc,IAAMC,EAAU,OAAO,EAAE,O,MAI3C,UAAC,OAAI,UAAU,yB,SACb,UAACG,EAAAA,KAAKA,CAAAA,CAAC,KAAM,GAAI,UAAU,M,OAInC,Q"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gbmtech/aurora-ui",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "main": "./dist/cjs/index.cjs",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",