@xjur-ui/react 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +260 -129
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-IRHU7PDO.js → chunk-2JQVYVAT.js} +2 -2
- package/dist/chunk-2JQVYVAT.js.map +1 -0
- package/dist/chunk-2JU3PFV2.js +2 -0
- package/dist/chunk-2JU3PFV2.js.map +1 -0
- package/dist/chunk-3H75F4Y2.js +2 -0
- package/dist/chunk-3H75F4Y2.js.map +1 -0
- package/dist/{chunk-Z47R2CIM.js → chunk-3L772WC6.js} +2 -2
- package/dist/chunk-3L772WC6.js.map +1 -0
- package/dist/chunk-43DUEHUA.js +2 -0
- package/dist/chunk-43DUEHUA.js.map +1 -0
- package/dist/chunk-4BGAERSD.js +2 -0
- package/dist/chunk-4BGAERSD.js.map +1 -0
- package/dist/{chunk-5WLIDYZH.js → chunk-4PTFZTVU.js} +2 -2
- package/dist/{chunk-5WLIDYZH.js.map → chunk-4PTFZTVU.js.map} +1 -1
- package/dist/chunk-6PHXO2YA.js +2 -0
- package/dist/{chunk-RWMV7APX.js.map → chunk-6PHXO2YA.js.map} +1 -1
- package/dist/{chunk-2CTBH6VI.js → chunk-7HG6Y3VV.js} +2 -2
- package/dist/{chunk-2CTBH6VI.js.map → chunk-7HG6Y3VV.js.map} +1 -1
- package/dist/chunk-7HMMMRDA.js +2 -0
- package/dist/chunk-7HMMMRDA.js.map +1 -0
- package/dist/chunk-7QGN6XFA.js +2 -0
- package/dist/chunk-7QGN6XFA.js.map +1 -0
- package/dist/chunk-AKR2BJRB.js +2 -0
- package/dist/chunk-AKR2BJRB.js.map +1 -0
- package/dist/{chunk-BK6FP63A.js → chunk-ASZAHSU5.js} +2 -2
- package/dist/{chunk-BK6FP63A.js.map → chunk-ASZAHSU5.js.map} +1 -1
- package/dist/chunk-DOC3XTYC.js +2 -0
- package/dist/chunk-DOC3XTYC.js.map +1 -0
- package/dist/{chunk-IKL6PSXU.js → chunk-DT44JTXB.js} +2 -2
- package/dist/{chunk-IKL6PSXU.js.map → chunk-DT44JTXB.js.map} +1 -1
- package/dist/chunk-DVDHTP4C.js +2 -0
- package/dist/chunk-DVDHTP4C.js.map +1 -0
- package/dist/chunk-EITO7GZX.js +2 -0
- package/dist/chunk-EITO7GZX.js.map +1 -0
- package/dist/chunk-F7ANJ4HD.js +2 -0
- package/dist/chunk-F7ANJ4HD.js.map +1 -0
- package/dist/chunk-FQTUN47L.js +2 -0
- package/dist/chunk-FQTUN47L.js.map +1 -0
- package/dist/chunk-FUHASFGU.js +2 -0
- package/dist/chunk-FUHASFGU.js.map +1 -0
- package/dist/{chunk-CI3ZXWEX.js → chunk-G6NSC3FL.js} +2 -2
- package/dist/{chunk-CI3ZXWEX.js.map → chunk-G6NSC3FL.js.map} +1 -1
- package/dist/{chunk-6AD6O6II.js → chunk-GKILN5HI.js} +2 -2
- package/dist/chunk-GKILN5HI.js.map +1 -0
- package/dist/chunk-GVKH2BG2.js +2 -0
- package/dist/chunk-GVKH2BG2.js.map +1 -0
- package/dist/chunk-JF7JKJES.js +2 -0
- package/dist/chunk-JF7JKJES.js.map +1 -0
- package/dist/{chunk-TSVURBUY.js → chunk-JGPHBUVM.js} +2 -2
- package/dist/chunk-JGPHBUVM.js.map +1 -0
- package/dist/{chunk-PKCW37CJ.js → chunk-M6ZI7M3R.js} +2 -2
- package/dist/chunk-M6ZI7M3R.js.map +1 -0
- package/dist/{chunk-UXIVZWLB.js → chunk-MQ7YTZBI.js} +2 -2
- package/dist/{chunk-UXIVZWLB.js.map → chunk-MQ7YTZBI.js.map} +1 -1
- package/dist/chunk-O3JK6QF6.js +2 -0
- package/dist/chunk-O3JK6QF6.js.map +1 -0
- package/dist/{chunk-L4ET6GIZ.js → chunk-OKSGVAQQ.js} +2 -2
- package/dist/chunk-OKSGVAQQ.js.map +1 -0
- package/dist/chunk-OLWYBKQR.js +2 -0
- package/dist/chunk-OLWYBKQR.js.map +1 -0
- package/dist/chunk-PBR7SFWY.js +2 -0
- package/dist/chunk-PBR7SFWY.js.map +1 -0
- package/dist/chunk-Q2BZSHS2.js +2 -0
- package/dist/chunk-Q2BZSHS2.js.map +1 -0
- package/dist/{chunk-OS53BV63.js → chunk-RGKXZJJS.js} +3 -3
- package/dist/{chunk-OS53BV63.js.map → chunk-RGKXZJJS.js.map} +1 -1
- package/dist/chunk-SSTXFHNX.js +2 -0
- package/dist/chunk-SSTXFHNX.js.map +1 -0
- package/dist/chunk-TORICLEW.js +2 -0
- package/dist/chunk-TORICLEW.js.map +1 -0
- package/dist/chunk-TYWCS7GS.js +2 -0
- package/dist/chunk-TYWCS7GS.js.map +1 -0
- package/dist/chunk-URDL5OKH.js +2 -0
- package/dist/chunk-URDL5OKH.js.map +1 -0
- package/dist/chunk-V2FCP4FA.js +2 -0
- package/dist/chunk-V2FCP4FA.js.map +1 -0
- package/dist/chunk-VCNKCHFF.js +2 -0
- package/dist/chunk-VCNKCHFF.js.map +1 -0
- package/dist/chunk-WEGFAS5P.js +2 -0
- package/dist/chunk-WEGFAS5P.js.map +1 -0
- package/dist/chunk-X6SOSTUN.js +2 -0
- package/dist/chunk-X6SOSTUN.js.map +1 -0
- package/dist/chunk-XGPKBYDY.js +2 -0
- package/dist/chunk-XGPKBYDY.js.map +1 -0
- package/dist/chunk-YOLTIAFT.js +2 -0
- package/dist/{chunk-KIFR5VIE.js.map → chunk-YOLTIAFT.js.map} +1 -1
- package/dist/chunk-ZPQPJJQJ.js +2 -0
- package/dist/chunk-ZPQPJJQJ.js.map +1 -0
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/chip.d.ts +1 -1
- package/dist/components/chip.js +1 -1
- package/dist/components/controls/button.js +2 -0
- package/dist/components/{form → controls}/calendar.js +1 -1
- package/dist/components/controls/calendar.js.map +1 -0
- package/dist/components/{form → controls}/checkbox.js +1 -1
- package/dist/components/controls/checkbox.js.map +1 -0
- package/dist/components/{form → controls}/context/field.context.d.ts +1 -2
- package/dist/components/controls/context/field.context.js +2 -0
- package/dist/components/{form → controls}/date-picker.d.ts +2 -1
- package/dist/components/{form → controls}/date-picker.js +1 -1
- package/dist/components/controls/date-picker.js.map +1 -0
- package/dist/components/controls/floating-label.js +2 -0
- package/dist/components/{form → controls}/input.d.ts +3 -2
- package/dist/components/controls/input.js +2 -0
- package/dist/components/controls/otp-input.js.map +1 -0
- package/dist/components/controls/radio.js.map +1 -0
- package/dist/components/{form → controls}/rich-editor.js +1 -1
- package/dist/components/controls/rich-editor.js.map +1 -0
- package/dist/components/{form → controls}/search-input.d.ts +9 -1
- package/dist/components/controls/search-input.js +2 -0
- package/dist/components/controls/search-input.js.map +1 -0
- package/dist/components/controls/search-selector.d.ts +19 -0
- package/dist/components/controls/search-selector.js +2 -0
- package/dist/components/controls/search-selector.js.map +1 -0
- package/dist/components/{form → controls}/select.d.ts +2 -1
- package/dist/components/{form → controls}/select.js +1 -1
- package/dist/components/controls/switch.js +2 -0
- package/dist/components/custom/pessoa/index.d.ts +16 -0
- package/dist/components/custom/pessoa/index.js +2 -0
- package/dist/components/custom/pessoa/index.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-add-button.d.ts +9 -0
- package/dist/components/custom/pessoa/pessoa-add-button.js +2 -0
- package/dist/components/custom/pessoa/pessoa-add-button.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-body.d.ts +8 -0
- package/dist/components/custom/pessoa/pessoa-body.js +2 -0
- package/dist/components/custom/pessoa/pessoa-body.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-close-button.d.ts +8 -0
- package/dist/components/custom/pessoa/pessoa-close-button.js +2 -0
- package/dist/components/custom/pessoa/pessoa-close-button.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-content.d.ts +8 -0
- package/dist/components/custom/pessoa/pessoa-content.js +2 -0
- package/dist/components/custom/pessoa/pessoa-content.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-footer.d.ts +8 -0
- package/dist/components/custom/pessoa/pessoa-footer.js +2 -0
- package/dist/components/custom/pessoa/pessoa-footer.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-header.d.ts +10 -0
- package/dist/components/custom/pessoa/pessoa-header.js +2 -0
- package/dist/components/custom/pessoa/pessoa-header.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa-trigger.d.ts +8 -0
- package/dist/components/custom/pessoa/pessoa-trigger.js +2 -0
- package/dist/components/custom/pessoa/pessoa-trigger.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa.context.d.ts +25 -0
- package/dist/components/custom/pessoa/pessoa.context.js +2 -0
- package/dist/components/custom/pessoa/pessoa.context.js.map +1 -0
- package/dist/components/custom/pessoa/pessoa.d.ts +11 -0
- package/dist/components/custom/pessoa/pessoa.js +2 -0
- package/dist/components/custom/pessoa/pessoa.js.map +1 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drag-and-drop/index.js +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/full-calendar/calendar-add-event.js +1 -1
- package/dist/components/full-calendar/calendar-add-event.js.map +1 -1
- package/dist/components/full-calendar/calendar-cell.js +1 -1
- package/dist/components/full-calendar/calendar-day-view.js +1 -1
- package/dist/components/full-calendar/calendar-month-view.js +1 -1
- package/dist/components/full-calendar/calendar-more-events-dropdown.js +1 -1
- package/dist/components/full-calendar/calendar-navigator.js +1 -1
- package/dist/components/full-calendar/calendar-today-button.d.ts +1 -1
- package/dist/components/full-calendar/calendar-today-button.js +1 -1
- package/dist/components/full-calendar/calendar-toggle-view.js +1 -1
- package/dist/components/full-calendar/calendar-view-renderer.js +1 -1
- package/dist/components/full-calendar/calendar-week-view.js +1 -1
- package/dist/components/full-calendar/index.d.ts +1 -1
- package/dist/components/full-calendar/index.js +1 -1
- package/dist/components/horizontal-scroll.js +1 -1
- package/dist/components/horizontal-scroll.js.map +1 -1
- package/dist/components/icon.d.ts +2 -2
- package/dist/components/icon.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/selection-bar.d.ts +1 -1
- package/dist/components/selection-bar.js +1 -1
- package/dist/components/selection-bar.js.map +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/steps/index.d.ts +11 -0
- package/dist/components/steps/index.js +2 -0
- package/dist/components/steps/index.js.map +1 -0
- package/dist/components/steps/step.d.ts +8 -0
- package/dist/components/steps/step.js +2 -0
- package/dist/components/steps/step.js.map +1 -0
- package/dist/components/steps/steps-action.d.ts +12 -0
- package/dist/components/steps/steps-action.js +2 -0
- package/dist/components/steps/steps-action.js.map +1 -0
- package/dist/components/steps/steps-content.d.ts +6 -0
- package/dist/components/steps/steps-content.js +2 -0
- package/dist/components/steps/steps-content.js.map +1 -0
- package/dist/components/steps/steps-context.d.ts +22 -0
- package/dist/components/steps/steps-context.js +2 -0
- package/dist/components/steps/steps-context.js.map +1 -0
- package/dist/components/steps/steps-navigation.d.ts +6 -0
- package/dist/components/steps/steps-navigation.js +2 -0
- package/dist/components/steps/steps-navigation.js.map +1 -0
- package/dist/components/steps/steps-root.d.ts +7 -0
- package/dist/components/steps/steps-root.js +2 -0
- package/dist/components/steps/steps-root.js.map +1 -0
- package/dist/components/table/index.d.ts +9 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table-body.d.ts +5 -0
- package/dist/components/table/table-body.js +2 -0
- package/dist/components/table/table-body.js.map +1 -0
- package/dist/components/table/table-cell.d.ts +5 -0
- package/dist/components/table/table-cell.js +2 -0
- package/dist/components/table/table-cell.js.map +1 -0
- package/dist/components/table/table-footer.d.ts +5 -0
- package/dist/components/table/table-footer.js +2 -0
- package/dist/components/table/table-footer.js.map +1 -0
- package/dist/components/table/table-head.d.ts +6 -0
- package/dist/components/table/table-head.js +2 -0
- package/dist/components/table/table-head.js.map +1 -0
- package/dist/components/table/table-header.d.ts +5 -0
- package/dist/components/table/table-header.js +2 -0
- package/dist/components/table/table-header.js.map +1 -0
- package/dist/components/table/table-row.d.ts +7 -0
- package/dist/components/table/table-row.js +2 -0
- package/dist/components/table/table-row.js.map +1 -0
- package/dist/components/table/table-sort.d.ts +7 -0
- package/dist/components/table/table-sort.js +2 -0
- package/dist/components/table/table-sort.js.map +1 -0
- package/dist/components/table/table.d.ts +5 -0
- package/dist/components/table/table.js +2 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/upload.js +1 -1
- package/dist/components/upload.js.map +1 -1
- package/dist/icons-C-hGI45d.d.ts +4 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/input-mask-DhbtCxF7.d.ts +3 -0
- package/package.json +16 -13
- package/src/components/{form → controls}/calendar.tsx +1 -1
- package/src/components/{form → controls}/input.tsx +2 -0
- package/src/components/{form → controls}/rich-editor.tsx +1 -1
- package/src/components/{form → controls}/search-input.tsx +46 -3
- package/src/components/controls/search-selector.tsx +98 -0
- package/src/components/{form → controls}/select.tsx +1 -1
- package/src/components/custom/pessoa/index.ts +9 -0
- package/src/components/custom/pessoa/pessoa-add-button.tsx +35 -0
- package/src/components/custom/pessoa/pessoa-body.tsx +22 -0
- package/src/components/custom/pessoa/pessoa-close-button.tsx +13 -0
- package/src/components/custom/pessoa/pessoa-content.tsx +25 -0
- package/src/components/custom/pessoa/pessoa-footer.tsx +15 -0
- package/src/components/custom/pessoa/pessoa-header.tsx +35 -0
- package/src/components/custom/pessoa/pessoa-trigger.tsx +25 -0
- package/src/components/custom/pessoa/pessoa.context.tsx +73 -0
- package/src/components/custom/pessoa/pessoa.tsx +35 -0
- package/src/components/dialog.tsx +1 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/full-calendar/calendar-add-event.tsx +1 -1
- package/src/components/full-calendar/calendar-cell.tsx +1 -1
- package/src/components/full-calendar/calendar-more-events-dropdown.tsx +1 -1
- package/src/components/full-calendar/calendar-navigator.tsx +1 -1
- package/src/components/full-calendar/calendar-today-button.tsx +1 -1
- package/src/components/full-calendar/calendar-toggle-view.tsx +1 -1
- package/src/components/horizontal-scroll.tsx +1 -1
- package/src/components/list.tsx +1 -1
- package/src/components/selection-bar.tsx +1 -1
- package/src/components/sheet.tsx +25 -16
- package/src/components/steps/index.ts +6 -0
- package/src/components/steps/step.tsx +23 -0
- package/src/components/steps/steps-action.tsx +65 -0
- package/src/components/steps/steps-content.tsx +12 -0
- package/src/components/steps/steps-context.tsx +121 -0
- package/src/components/steps/steps-navigation.tsx +80 -0
- package/src/components/steps/steps-root.tsx +9 -0
- package/src/components/table/index.ts +8 -0
- package/src/components/table/table-body.tsx +17 -0
- package/src/components/table/table-cell.tsx +14 -0
- package/src/components/table/table-footer.tsx +17 -0
- package/src/components/table/table-head.tsx +31 -0
- package/src/components/table/table-header.tsx +17 -0
- package/src/components/table/table-row.tsx +21 -0
- package/src/components/table/table-sort.tsx +34 -0
- package/src/components/table/table.tsx +16 -0
- package/src/components/upload.tsx +4 -4
- package/src/resources/icons.ts +1 -0
- package/dist/chunk-2CM3SFOY.js +0 -2
- package/dist/chunk-2CM3SFOY.js.map +0 -1
- package/dist/chunk-6AD6O6II.js.map +0 -1
- package/dist/chunk-AA6V5YEC.js +0 -2
- package/dist/chunk-AA6V5YEC.js.map +0 -1
- package/dist/chunk-IRHU7PDO.js.map +0 -1
- package/dist/chunk-KIFR5VIE.js +0 -2
- package/dist/chunk-L4ET6GIZ.js.map +0 -1
- package/dist/chunk-PKCW37CJ.js.map +0 -1
- package/dist/chunk-RWMV7APX.js +0 -2
- package/dist/chunk-TSVURBUY.js.map +0 -1
- package/dist/chunk-WV7QV2PU.js +0 -2
- package/dist/chunk-WV7QV2PU.js.map +0 -1
- package/dist/chunk-Z47R2CIM.js.map +0 -1
- package/dist/components/form/button.js +0 -2
- package/dist/components/form/calendar.js.map +0 -1
- package/dist/components/form/checkbox.js.map +0 -1
- package/dist/components/form/context/field.context.js +0 -2
- package/dist/components/form/date-picker.js.map +0 -1
- package/dist/components/form/floating-label.js +0 -2
- package/dist/components/form/input.js +0 -2
- package/dist/components/form/otp-input.js.map +0 -1
- package/dist/components/form/radio.js.map +0 -1
- package/dist/components/form/rich-editor.js.map +0 -1
- package/dist/components/form/search-input.js +0 -2
- package/dist/components/form/search-input.js.map +0 -1
- package/dist/components/form/switch.js +0 -2
- package/dist/components/table.d.ts +0 -17
- package/dist/components/table.js +0 -2
- package/dist/components/table.js.map +0 -1
- package/dist/icons-CmDuL0gZ.d.ts +0 -4
- package/src/components/table.tsx +0 -160
- /package/dist/components/{form → controls}/button.d.ts +0 -0
- /package/dist/components/{form → controls}/button.js.map +0 -0
- /package/dist/components/{form → controls}/calendar.d.ts +0 -0
- /package/dist/components/{form → controls}/checkbox.d.ts +0 -0
- /package/dist/components/{form → controls}/context/field.context.js.map +0 -0
- /package/dist/components/{form → controls}/floating-label.d.ts +0 -0
- /package/dist/components/{form → controls}/floating-label.js.map +0 -0
- /package/dist/components/{form → controls}/input.js.map +0 -0
- /package/dist/components/{form → controls}/otp-input.d.ts +0 -0
- /package/dist/components/{form → controls}/otp-input.js +0 -0
- /package/dist/components/{form → controls}/radio.d.ts +0 -0
- /package/dist/components/{form → controls}/radio.js +0 -0
- /package/dist/components/{form → controls}/rich-editor.d.ts +0 -0
- /package/dist/components/{form → controls}/select.js.map +0 -0
- /package/dist/components/{form → controls}/switch.d.ts +0 -0
- /package/dist/components/{form → controls}/switch.js.map +0 -0
- /package/src/components/{form → controls}/button.tsx +0 -0
- /package/src/components/{form → controls}/checkbox.tsx +0 -0
- /package/src/components/{form → controls}/context/field.context.ts +0 -0
- /package/src/components/{form → controls}/date-picker.tsx +0 -0
- /package/src/components/{form → controls}/floating-label.tsx +0 -0
- /package/src/components/{form → controls}/otp-input.tsx +0 -0
- /package/src/components/{form → controls}/radio.tsx +0 -0
- /package/src/components/{form → controls}/switch.tsx +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,a}from'./chunk-WEGFAS5P.js';import {a as a$1}from'./chunk-43DUEHUA.js';import'react';import {jsx}from'react/jsx-runtime';function R({onOpenChange:a$2,children:o,...p}){return jsx(b,{children:jsx(a.Consumer,{children:t=>jsx(a$1,{onOpenChange:P=>{t.changeCurrentView("list"),a$2?.(P);},...p,children:typeof o=="function"?o(t):o})})})}export{R as a};//# sourceMappingURL=chunk-SSTXFHNX.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-SSTXFHNX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/custom/pessoa/pessoa.tsx"],"names":["PessoaRoot","onOpenChange","children","props","jsx","PessoaProvider","PessoaContext","pessoaContext","SheetRoot","open"],"mappings":"mIAQO,SAASA,CAAAA,CAAW,CACzB,YAAA,CAAAC,GAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CACD,OACEC,GAAAA,CAACC,CAAAA,CAAA,CACC,QAAA,CAAAD,GAAAA,CAACE,CAAAA,CAAc,QAAA,CAAd,CACE,QAAA,CAAAC,GACCH,GAAAA,CAACI,GAAAA,CAAA,CACC,YAAA,CAAcC,CAAAA,EAAQ,CACpBF,EAAc,iBAAA,CAAkB,MAAM,CAAA,CACtCN,GAAAA,GAAeQ,CAAI,EACrB,EACC,GAAGN,CAAAA,CAEH,QAAA,CAAA,OAAOD,CAAAA,EAAa,UAAA,CACjBA,CAAAA,CAASK,CAAa,CAAA,CACtBL,CAAAA,CACN,CAAA,CAEJ,CAAA,CACF,CAEJ","file":"chunk-SSTXFHNX.js","sourcesContent":["import { type ComponentProps } from 'react'\nimport { SheetRoot } from '../../sheet'\nimport {\n PessoaProvider,\n PessoaContext,\n type PessoaContextValue\n} from './pessoa.context'\n\nexport function PessoaRoot({\n onOpenChange,\n children,\n ...props\n}: Omit<ComponentProps<typeof SheetRoot>, 'children'> & {\n children: React.ReactNode | ((context: PessoaContextValue) => React.ReactNode)\n}) {\n return (\n <PessoaProvider>\n <PessoaContext.Consumer>\n {pessoaContext => (\n <SheetRoot\n onOpenChange={open => {\n pessoaContext.changeCurrentView('list')\n onOpenChange?.(open)\n }}\n {...props}\n >\n {typeof children === 'function'\n ? children(pessoaContext)\n : children}\n </SheetRoot>\n )}\n </PessoaContext.Consumer>\n </PessoaProvider>\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c}from'./chunk-WEGFAS5P.js';import {g}from'./chunk-43DUEHUA.js';import {twMerge}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function i({className:t,...r}){let{currentView:p}=c();return jsx(g,{className:twMerge("gap-large-2x data-[view=form]:!px-none flex flex-col",t),"data-view":p,...r})}export{i as a};//# sourceMappingURL=chunk-TORICLEW.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-TORICLEW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/custom/pessoa/pessoa-body.tsx"],"names":["PessoaBody","className","props","currentView","usePessoaContext","jsx","SheetBody","twMerge"],"mappings":"gJAKO,SAASA,CAAAA,CAAW,CACzB,UAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAqC,CACnC,GAAM,CAAE,WAAA,CAAAC,CAAY,EAAIC,CAAAA,EAAiB,CAEzC,OACEC,GAAAA,CAACC,EAAA,CACC,SAAA,CAAWC,OAAAA,CACT,sDAAA,CACAN,CACF,CAAA,CACA,WAAA,CAAWE,CAAAA,CACV,GAAGD,EACN,CAEJ","file":"chunk-TORICLEW.js","sourcesContent":["import { twMerge } from '@xjur-ui/util'\nimport type { ComponentProps } from 'react'\nimport { SheetBody } from '../../sheet'\nimport { usePessoaContext } from './pessoa.context'\n\nexport function PessoaBody({\n className,\n ...props\n}: ComponentProps<typeof SheetBody>) {\n const { currentView } = usePessoaContext()\n\n return (\n <SheetBody\n className={twMerge(\n 'gap-large-2x data-[view=form]:!px-none flex flex-col',\n className\n )}\n data-view={currentView}\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c}from'./chunk-O3JK6QF6.js';import {b as b$1}from'./chunk-M6ZI7M3R.js';import {useCallback}from'react';import {jsx}from'react/jsx-runtime';function b({children:e="Pr\xF3ximo",type:p,onClick:t,...u}){let{handleNextStep:o,currentStepIndex:r,isLastStep:n}=c(),l=useCallback(i=>{t?t(i):(i.preventDefault(),o());},[t,o]),c$1=p||(n?"submit":"button");return jsx(b$1,{type:c$1,...c$1==="button"?{onClick:l}:{},...u,children:typeof e=="function"?e(r):e})}function x({appearance:e="ghost",children:p="Anterior",onClick:t,...u}){let{handlePreviousStep:o}=c(),r=useCallback(n=>{t?t(n):(n.preventDefault(),o());},[t,o]);return jsx(b$1,{appearance:e,onClick:r,...u,children:p})}export{b as a,x as b};//# sourceMappingURL=chunk-TYWCS7GS.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-TYWCS7GS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/steps/steps-action.tsx"],"names":["NextStep","children","type","onClick","props","handleNextStep","currentStepIndex","isLastStep","useSteps","handleClick","useCallback","event","buttonType","jsx","Button","PreviousStep","appearance","handlePreviousStep"],"mappings":"mJAIO,SAASA,CAAAA,CAAS,CACvB,QAAA,CAAAC,CAAAA,CAAW,YAAA,CACX,KAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CACD,GAAM,CAAE,cAAA,CAAAC,CAAAA,CAAgB,gBAAA,CAAAC,CAAAA,CAAkB,UAAA,CAAAC,CAAW,CAAA,CAAIC,GAAS,CAE5DC,CAAAA,CAAcC,WAAAA,CACjBC,CAAAA,EAA+C,CAC1CR,CAAAA,CACFA,CAAAA,CAAQQ,CAAK,CAAA,EAEbA,CAAAA,CAAM,cAAA,EAAe,CACrBN,CAAAA,EAAe,EAEnB,CAAA,CACA,CAACF,EAASE,CAAc,CAC1B,CAAA,CAEMO,GAAAA,CAAaV,CAAAA,GAASK,CAAAA,CAAa,QAAA,CAAW,QAAA,CAAA,CAEpD,OACEM,GAAAA,CAACC,GAAAA,CAAA,CACC,IAAA,CAAMF,GAAAA,CACL,GAAIA,GAAAA,GAAe,QAAA,CAAW,CAAE,OAAA,CAASH,CAAY,CAAA,CAAI,EAAC,CAC1D,GAAGL,CAAAA,CAEH,QAAA,CAAA,OAAOH,CAAAA,EAAa,UAAA,CAAaA,CAAAA,CAASK,CAAgB,CAAA,CAAIL,CAAAA,CACjE,CAEJ,CAEO,SAASc,CAAAA,CAAa,CAC3B,UAAA,CAAAC,CAAAA,CAAa,OAAA,CACb,QAAA,CAAAf,CAAAA,CAAW,UAAA,CACX,OAAA,CAAAE,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkC,CAChC,GAAM,CAAE,mBAAAa,CAAmB,CAAA,CAAIT,CAAAA,EAAS,CAElCC,CAAAA,CAAcC,WAAAA,CACjBC,CAAAA,EAA+C,CAC1CR,CAAAA,CACFA,CAAAA,CAAQQ,CAAK,CAAA,EAEbA,CAAAA,CAAM,cAAA,EAAe,CACrBM,CAAAA,IAEJ,CAAA,CACA,CAACd,CAAAA,CAASc,CAAkB,CAC9B,CAAA,CAEA,OACEJ,GAAAA,CAACC,IAAA,CAAO,UAAA,CAAYE,CAAAA,CAAY,OAAA,CAASP,CAAAA,CAAc,GAAGL,CAAAA,CACvD,QAAA,CAAAH,EACH,CAEJ","file":"chunk-TYWCS7GS.js","sourcesContent":["import { useCallback, type ComponentProps } from 'react'\nimport { Button } from '../controls/button'\nimport { useSteps } from './steps-context'\n\nexport function NextStep({\n children = 'Próximo',\n type,\n onClick,\n ...props\n}: Omit<ComponentProps<typeof Button>, 'children'> & {\n children?: React.ReactNode | ((stepIndex: number) => React.ReactNode)\n}) {\n const { handleNextStep, currentStepIndex, isLastStep } = useSteps()\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event)\n } else {\n event.preventDefault()\n handleNextStep()\n }\n },\n [onClick, handleNextStep]\n )\n\n const buttonType = type || (isLastStep ? 'submit' : 'button')\n\n return (\n <Button\n type={buttonType}\n {...(buttonType === 'button' ? { onClick: handleClick } : {})}\n {...props}\n >\n {typeof children === 'function' ? children(currentStepIndex) : children}\n </Button>\n )\n}\n\nexport function PreviousStep({\n appearance = 'ghost',\n children = 'Anterior',\n onClick,\n ...props\n}: ComponentProps<typeof Button>) {\n const { handlePreviousStep } = useSteps()\n\n const handleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event)\n } else {\n event.preventDefault()\n handlePreviousStep()\n }\n },\n [onClick, handlePreviousStep]\n )\n\n return (\n <Button appearance={appearance} onClick={handleClick} {...props}>\n {children}\n </Button>\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function e({className:o,...r}){return jsx("tbody",{className:cx("[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0",o),"data-slot":"table-body",...r})}export{e as a};//# sourceMappingURL=chunk-URDL5OKH.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-URDL5OKH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/table/table-body.tsx"],"names":["TableBody","className","props","jsx","cx"],"mappings":"mEAEO,SAASA,CAAAA,CAAU,CACxB,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkC,CAChC,OACEC,GAAAA,CAAC,OAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CACT,yEAAA,CACAH,CACF,CAAA,CACA,WAAA,CAAU,YAAA,CACT,GAAGC,CAAAA,CACN,CAEJ","file":"chunk-URDL5OKH.js","sourcesContent":["import { cx } from '@xjur-ui/util'\n\nexport function TableBody({\n className,\n ...props\n}: React.ComponentProps<'tbody'>) {\n return (\n <tbody\n className={cx(\n '[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0',\n className\n )}\n data-slot=\"table-body\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function n({className:e,...l}){return jsx("td",{className:cx("px-small py-none h-large-8x text-left align-middle whitespace-nowrap",e),"data-slot":"table-cell",...l})}export{n as a};//# sourceMappingURL=chunk-V2FCP4FA.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-V2FCP4FA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/table/table-cell.tsx"],"names":["TableCell","className","props","jsx","cx"],"mappings":"mEAEO,SAASA,CAAAA,CAAU,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA+B,CAC7E,OACEC,GAAAA,CAAC,IAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CACT,sEAAA,CACAH,CACF,CAAA,CACA,WAAA,CAAU,YAAA,CACT,GAAGC,CAAAA,CACN,CAEJ","file":"chunk-V2FCP4FA.js","sourcesContent":["import { cx } from '@xjur-ui/util'\n\nexport function TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n className={cx(\n 'px-small py-none h-large-8x text-left align-middle whitespace-nowrap',\n className\n )}\n data-slot=\"table-cell\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c}from'./chunk-WEGFAS5P.js';import {f}from'./chunk-43DUEHUA.js';import {twMerge}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function u({className:o,side:n="right",...r}){let{currentView:s,isFullscreen:m}=c();return jsx(f,{className:twMerge("min-w-[900px] data-[fullscreen=true]:min-w-full",o),"data-fullscreen":m,"data-view":s,side:n,...r})}export{u as a};//# sourceMappingURL=chunk-VCNKCHFF.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-VCNKCHFF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/custom/pessoa/pessoa-content.tsx"],"names":["PessoaContent","className","side","props","currentView","isFullscreen","usePessoaContext","jsx","SheetContent","twMerge"],"mappings":"gJAKO,SAASA,EAAc,CAC5B,SAAA,CAAAC,EACA,IAAA,CAAAC,CAAAA,CAAO,QACP,GAAGC,CACL,EAAwC,CACtC,GAAM,CAAE,WAAA,CAAAC,CAAAA,CAAa,aAAAC,CAAa,CAAA,CAAIC,GAAiB,CAEvD,OACEC,IAACC,CAAAA,CAAA,CACC,UAAWC,OAAAA,CACT,iDAAA,CACAR,CACF,CAAA,CACA,iBAAA,CAAiBI,EACjB,WAAA,CAAWD,CAAAA,CACX,KAAMF,CAAAA,CACL,GAAGC,EACN,CAEJ","file":"chunk-VCNKCHFF.js","sourcesContent":["import { twMerge } from '@xjur-ui/util'\nimport type { ComponentProps } from 'react'\nimport { SheetContent } from '../../sheet'\nimport { usePessoaContext } from './pessoa.context'\n\nexport function PessoaContent({\n className,\n side = 'right',\n ...props\n}: ComponentProps<typeof SheetContent>) {\n const { currentView, isFullscreen } = usePessoaContext()\n\n return (\n <SheetContent\n className={twMerge(\n 'min-w-[900px] data-[fullscreen=true]:min-w-full',\n className\n )}\n data-fullscreen={isFullscreen}\n data-view={currentView}\n side={side}\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {createContext,useState,useCallback,useMemo,useContext}from'react';import {jsx}from'react/jsx-runtime';var l=createContext({});function h({children:e}){let[o,P]=useState("list"),[n,w]=useState(false),[a,r]=useState([]),c=useCallback(s=>{P(s);},[]),u=useCallback(()=>{w(s=>!s);},[]),x=useMemo(()=>({currentView:o,changeCurrentView:c,isFullscreen:n,changeIsFullscreen:u,pessoas:a,setPessoas:r}),[o,c,n,u,a,r]);return jsx(l.Provider,{value:x,children:e})}function v(){let e=useContext(l);if(!e)throw new Error("usePessoaContext must be used within a PessoaProvider");return {...e,pessoas:e.pessoas,setPessoas:e.setPessoas}}export{l as a,h as b,v as c};//# sourceMappingURL=chunk-WEGFAS5P.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-WEGFAS5P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/custom/pessoa/pessoa.context.tsx"],"names":["PessoaContext","createContext","PessoaProvider","children","currentView","setCurrentView","useState","isFullscreen","setIsFullscreen","pessoas","setPessoas","changeCurrentView","useCallback","view","changeIsFullscreen","state","providerValue","useMemo","jsx","usePessoaContext","context","useContext"],"mappings":"8GAiBO,IAAMA,CAAAA,CAAgBC,aAAAA,CAC3B,EACF,EAEO,SAASC,EAAe,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAkC,CAC1E,GAAM,CAACC,CAAAA,CAAaC,CAAc,CAAA,CAAIC,QAAAA,CAA0B,MAAM,CAAA,CAChE,CAACC,CAAAA,CAAcC,CAAe,CAAA,CAAIF,QAAAA,CAAS,KAAK,CAAA,CAChD,CAACG,CAAAA,CAASC,CAAU,CAAA,CAAIJ,QAAAA,CAAoB,EAAE,CAAA,CAE9CK,CAAAA,CAAoBC,WAAAA,CAAaC,CAAAA,EAA0B,CAC/DR,CAAAA,CAAeQ,CAAI,EACrB,CAAA,CAAG,EAAE,CAAA,CAECC,CAAAA,CAAqBF,WAAAA,CAAY,IAAM,CAC3CJ,EAAgBO,CAAAA,EAAS,CAACA,CAAK,EACjC,CAAA,CAAG,EAAE,CAAA,CAECC,CAAAA,CAAgBC,OAAAA,CACpB,KAAO,CACL,WAAA,CAAAb,CAAAA,CACA,iBAAA,CAAAO,CAAAA,CACA,aAAAJ,CAAAA,CACA,kBAAA,CAAAO,CAAAA,CACA,OAAA,CAAAL,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CAAA,CACA,CACEN,CAAAA,CACAO,CAAAA,CACAJ,CAAAA,CACAO,CAAAA,CACAL,CAAAA,CACAC,CACF,CACF,CAAA,CAEA,OACEQ,GAAAA,CAAClB,CAAAA,CAAc,QAAA,CAAd,CAAuB,KAAA,CAAOgB,CAAAA,CAC5B,QAAA,CAAAb,CAAAA,CACH,CAEJ,CAEO,SAASgB,CAAAA,EAAgC,CAC9C,IAAMC,CAAAA,CAAUC,UAAAA,CAAWrB,CAAa,EAExC,GAAI,CAACoB,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,uDAAuD,CAAA,CAGzE,OAAO,CACL,GAAGA,CAAAA,CACH,OAAA,CAASA,CAAAA,CAAQ,OAAA,CACjB,UAAA,CAAYA,CAAAA,CAAQ,UACtB,CACF","file":"chunk-WEGFAS5P.js","sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useState,\n useMemo\n} from 'react'\n\nexport interface PessoaContextValue {\n currentView: 'list' | 'form'\n isFullscreen: boolean\n pessoas: unknown[]\n changeCurrentView: (view: PessoaContextValue['currentView']) => void\n changeIsFullscreen: () => void\n setPessoas: React.Dispatch<React.SetStateAction<unknown[]>>\n}\n\nexport const PessoaContext = createContext<PessoaContextValue>(\n {} as PessoaContextValue\n)\n\nexport function PessoaProvider({ children }: { children: React.ReactNode }) {\n const [currentView, setCurrentView] = useState<'list' | 'form'>('list')\n const [isFullscreen, setIsFullscreen] = useState(false)\n const [pessoas, setPessoas] = useState<unknown[]>([])\n\n const changeCurrentView = useCallback((view: 'list' | 'form') => {\n setCurrentView(view)\n }, [])\n\n const changeIsFullscreen = useCallback(() => {\n setIsFullscreen(state => !state)\n }, [])\n\n const providerValue = useMemo(\n () => ({\n currentView,\n changeCurrentView,\n isFullscreen,\n changeIsFullscreen,\n pessoas,\n setPessoas\n }),\n [\n currentView,\n changeCurrentView,\n isFullscreen,\n changeIsFullscreen,\n pessoas,\n setPessoas\n ]\n )\n\n return (\n <PessoaContext.Provider value={providerValue}>\n {children}\n </PessoaContext.Provider>\n )\n}\n\nexport function usePessoaContext<T = unknown>() {\n const context = useContext(PessoaContext)\n\n if (!context) {\n throw new Error('usePessoaContext must be used within a PessoaProvider')\n }\n\n return {\n ...context,\n pessoas: context.pessoas as T[],\n setPessoas: context.setPessoas as React.Dispatch<React.SetStateAction<T[]>>\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {twMerge}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function n({className:o,...t}){return jsx("div",{className:twMerge("h-full w-full",o),"data-slot":"steps-content",...t})}export{n as a};//# sourceMappingURL=chunk-X6SOSTUN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-X6SOSTUN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/steps/steps-content.tsx"],"names":["Steps","className","props","jsx","twMerge"],"mappings":"wEAGO,SAASA,CAAAA,CAAM,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA0B,CACpE,OACEC,GAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAWC,OAAAA,CAAQ,eAAA,CAAiBH,CAAS,CAAA,CAC7C,WAAA,CAAU,eAAA,CACT,GAAGC,CAAAA,CACN,CAEJ","file":"chunk-X6SOSTUN.js","sourcesContent":["import { twMerge } from '@xjur-ui/util'\nimport type { ComponentProps } from 'react'\n\nexport function Steps({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n className={twMerge('h-full w-full', className)}\n data-slot=\"steps-content\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-PBR7SFWY.js';import {b}from'./chunk-M6ZI7M3R.js';import {a}from'./chunk-EIG6CBTQ.js';import {cx,cva}from'@xjur-ui/util';import {createContext}from'react';import {InputMask}from'@react-input/mask';import {InputNumberFormat}from'@react-input/number-format';import {jsx}from'react/jsx-runtime';var i=createContext({variant:"outlined"});function C({className:e,variant:t="outlined",...o}){return jsx(i.Provider,{value:{variant:t},children:jsx("div",{className:cx("relative flex",e),...o})})}function P({className:e,...t}){let o=cva(["gap-small py-small_1x-alt px-small flex items-center w-full","h-large-4x rounded-circle","border-border-layer-2 placeholder:placeholder-neutral-placeholder text-size-body-md text-neutral-dark border font-normal","group-hover:border-border-layer-3 transition-colors duration-200","disabled:opacity-60","focus-within:border-primary-idle"],{variants:{variant:{outlined:"rounded-circle focus-within:border-primary-idle ",line:"rounded-none border-t-0 border-b-1 border-x-0",action:"rounded-tr-none rounded-br-none border-r-0"}}});return jsx(i.Consumer,{children:({variant:n})=>jsx("div",{className:cx(e,o({variant:n})),"data-variant":n,...t})})}function S({htmlFor:e,...t}){return jsx(a,{asChild:true,className:cx("absolute -top-[22px] left-0"),size:"sm",variant:"label",weight:"medium",children:jsx("label",{htmlFor:e,...t})})}function N({className:e,...t}){return jsx("input",{className:cx(e,"flex-1 outline-none"),...t})}function g({className:e,mask:t,customMask:o,...n}){return jsx(InputMask,{...t?{...a$1(t)}:o&&{...o},className:cx(e,"flex-1 outline-none"),...n})}function k({className:e,locales:t="pt-BR",groupDisplay:o=false,...n}){return jsx(InputNumberFormat,{className:cx(e,"flex-1 outline-none"),groupDisplay:o,locales:t,...n})}function M(e){return jsx("div",{...e,"data-slot":"search-input-slot"})}function R({className:e,appearance:t="ghost",variant:o="outlined",...n}){return jsx(b,{...n,appearance:t,className:cx(e,"cursor-pointer","h-large-4x rounded-tr-circle rounded-br-circle px-small py-small_1x-alt flex items-center justify-center rounded-none","text-size-body-md text-neutral-dark gap-small-1x !border-l-0"),"data-slot":"search-input-action",variant:o})}export{C as a,P as b,S as c,N as d,g as e,k as f,M as g,R as h};//# sourceMappingURL=chunk-XGPKBYDY.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-XGPKBYDY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/controls/search-input.tsx"],"names":["SearchInputRootContext","createContext","SearchInputRoot","className","variant","props","jsx","cx","SearchInputContent","contentVarians","cva","SearchInputLabel","htmlFor","Typography","SearchInputText","SearchInputMask","mask","customMask","InputMaskComponent","inputMask","SearchInputNumber","locales","groupDisplay","InputNumberFormat","SearchInputSlot","SearchInputAction","appearance","Button"],"mappings":"iUAkBA,IAAMA,CAAAA,CAAyBC,aAAAA,CAAgC,CAC7D,OAAA,CAAS,UACX,CAAC,CAAA,CAEM,SAASC,CAAAA,CAAgB,CAC9B,SAAA,CAAAC,CAAAA,CACA,QAAAC,CAAAA,CAAU,UAAA,CACV,GAAGC,CACL,CAAA,CAA6C,CAC3C,OACEC,GAAAA,CAACN,EAAuB,QAAA,CAAvB,CAAgC,KAAA,CAAO,CAAE,QAAAI,CAAQ,CAAA,CAChD,QAAA,CAAAE,GAAAA,CAAC,OAAI,SAAA,CAAWC,EAAAA,CAAG,eAAA,CAAiBJ,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAAA,CAC7D,CAEJ,CAEO,SAASG,CAAAA,CAAmB,CACjC,UAAAL,CAAAA,CACA,GAAGE,CACL,CAAA,CAA0B,CACxB,IAAMI,CAAAA,CAAiBC,GAAAA,CACrB,CACE,6DAAA,CACA,2BAAA,CACA,0HAAA,CACA,kEAAA,CACA,sBACA,kCACF,CAAA,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,QAAA,CAAU,kDAAA,CACV,KAAM,+CAAA,CACN,MAAA,CAAQ,4CACV,CACF,CACF,CACF,CAAA,CAEA,OACEJ,IAACN,CAAAA,CAAuB,QAAA,CAAvB,CACE,QAAA,CAAA,CAAC,CAAE,OAAA,CAAAI,CAAQ,CAAA,GACVE,GAAAA,CAAC,OACC,SAAA,CAAWC,EAAAA,CAAGJ,CAAAA,CAAWM,CAAAA,CAAe,CAAE,OAAA,CAAAL,CAAQ,CAAC,CAAC,CAAA,CACpD,cAAA,CAAcA,CAAAA,CACb,GAAGC,EACN,CAAA,CAEJ,CAEJ,CAEO,SAASM,EAAiB,CAC/B,OAAA,CAAAC,CAAAA,CACA,GAAGP,CACL,CAAA,CAA4B,CAC1B,OACEC,IAACO,CAAAA,CAAA,CACC,OAAA,CA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A,CAAoB,CACvD,CAEO,SAASoB,CAAAA,CAAkB,CAChC,UAAAtB,CAAAA,CACA,UAAA,CAAAuB,CAAAA,CAAa,OAAA,CACb,QAAAtB,CAAAA,CAAU,UAAA,CACV,GAAGC,CACL,EAAgB,CACd,OACEC,GAAAA,CAACqB,CAAAA,CAAA,CACE,GAAGtB,CAAAA,CACJ,UAAA,CAAYqB,CAAAA,CACZ,UAAWnB,EAAAA,CACTJ,CAAAA,CACA,gBAAA,CACA,uHAAA,CACA,8DACF,CAAA,CACA,WAAA,CAAU,qBAAA,CACV,OAAA,CAASC,EACX,CAEJ","file":"chunk-XGPKBYDY.js","sourcesContent":["import { cva, cx } from '@xjur-ui/util'\nimport { createContext, type ComponentProps } from 'react'\nimport {\n InputMask as InputMaskComponent,\n type MaskOptions\n} from '@react-input/mask'\nimport {\n InputNumberFormat,\n type InputNumberFormatProps\n} from '@react-input/number-format'\nimport { Typography } from '../typography'\nimport { inputMask, type InputMaskType } from '../../resources/input-mask'\nimport { Button, type ButtonProps } from './button'\n\nexport type SearchInputProps = {\n variant?: 'outlined' | 'line' | 'action'\n}\n\nconst SearchInputRootContext = createContext<SearchInputProps>({\n variant: 'outlined'\n})\n\nexport function SearchInputRoot({\n className,\n variant = 'outlined',\n ...props\n}: ComponentProps<'div'> & SearchInputProps) {\n return (\n <SearchInputRootContext.Provider value={{ variant }}>\n <div className={cx('relative flex', className)} {...props} />\n </SearchInputRootContext.Provider>\n )\n}\n\nexport function SearchInputContent({\n className,\n ...props\n}: ComponentProps<'div'>) {\n const contentVarians = cva(\n [\n 'gap-small py-small_1x-alt px-small flex items-center w-full',\n 'h-large-4x rounded-circle',\n 'border-border-layer-2 placeholder:placeholder-neutral-placeholder text-size-body-md text-neutral-dark border font-normal',\n 'group-hover:border-border-layer-3 transition-colors duration-200',\n 'disabled:opacity-60',\n 'focus-within:border-primary-idle'\n ],\n {\n variants: {\n variant: {\n outlined: 'rounded-circle focus-within:border-primary-idle ',\n line: 'rounded-none border-t-0 border-b-1 border-x-0',\n action: 'rounded-tr-none rounded-br-none border-r-0'\n }\n }\n }\n )\n\n return (\n <SearchInputRootContext.Consumer>\n {({ variant }) => (\n <div\n className={cx(className, contentVarians({ variant }))}\n data-variant={variant}\n {...props}\n />\n )}\n </SearchInputRootContext.Consumer>\n )\n}\n\nexport function SearchInputLabel({\n htmlFor,\n ...props\n}: ComponentProps<'label'>) {\n return (\n <Typography\n asChild={true}\n className={cx('absolute -top-[22px] left-0')}\n size=\"sm\"\n variant=\"label\"\n weight=\"medium\"\n >\n <label htmlFor={htmlFor} {...props} />\n </Typography>\n )\n}\n\nexport function SearchInputText({\n className,\n ...props\n}: ComponentProps<'input'>) {\n return <input className={cx(className, 'flex-1 outline-none')} {...props} />\n}\n\nexport function SearchInputMask({\n className,\n mask,\n customMask,\n ...props\n}: ComponentProps<'input'> & {\n mask?: InputMaskType\n customMask?: MaskOptions\n}) {\n return (\n <InputMaskComponent\n {...(mask ? { ...inputMask(mask) } : customMask && { ...customMask })}\n className={cx(className, 'flex-1 outline-none')}\n {...props}\n />\n )\n}\n\nexport function SearchInputNumber({\n className,\n locales = 'pt-BR',\n groupDisplay = false,\n ...props\n}: InputNumberFormatProps) {\n return (\n <InputNumberFormat\n className={cx(className, 'flex-1 outline-none')}\n groupDisplay={groupDisplay}\n locales={locales}\n {...props}\n />\n )\n}\n\nexport function SearchInputSlot(props: ComponentProps<'div'>) {\n return <div {...props} data-slot=\"search-input-slot\" />\n}\n\nexport function SearchInputAction({\n className,\n appearance = 'ghost',\n variant = 'outlined',\n ...props\n}: ButtonProps) {\n return (\n <Button\n {...props}\n appearance={appearance}\n className={cx(\n className,\n 'cursor-pointer',\n 'h-large-4x rounded-tr-circle rounded-br-circle px-small py-small_1x-alt flex items-center justify-center rounded-none',\n 'text-size-body-md text-neutral-dark gap-small-1x !border-l-0'\n )}\n data-slot=\"search-input-action\"\n variant={variant}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-EIG6CBTQ.js';import {Slot}from'@radix-ui/react-slot';import {cva,cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function y({className:e,asChild:o,...a}){return jsx(o?Slot:"div",{...a,className:cx(e,"rounded-small scrollbar-hide bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-y-auto border")})}function x({className:e,asChild:o,...a}){return jsx(o?Slot:"div",{...a,className:cx(e,"px-small pt-small-1x")})}function C({variant:e="label",size:o="sm",weight:a$1="medium",className:r,...i}){return jsx(a,{className:cx(r,"text-neutral-placeholder"),size:o,variant:e,weight:a$1,...i})}function h({className:e,asChild:o,...a}){return jsx(o?Slot:"ul",{...a,className:cx("gap-small-1x p-small flex flex-col",e)})}var m=cva(["py-medium px-small flex items-center gap-small rounded-small-1x","bg-layer-2-idle text-neutral-dark","hover:bg-layer-2-hover transition-colors duration-100 ease-out","active:bg-layer-2-pressed"],{variants:{size:{md:"h-large-4x",lg:"h-large-7x"},isActive:{true:"bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"}},defaultVariants:{size:"md",isActive:false}});function b({className:e,size:o,isActive:a,asChild:r,...i}){return jsx(r?Slot:"li",{...i,className:cx(m({size:o,isActive:a}),e)})}export{y as a,x as b,C as c,h as d,b as e};//# sourceMappingURL=chunk-YOLTIAFT.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-YOLTIAFT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/list.tsx"],"names":["ListRoot","className","asChild","props","jsx","Slot","cx","ListHeader","ListHeaderTitle","variant","size","weight","Typography","ListContent","variants","cva","ListItem","isActive"],"mappings":"mJAKO,SAASA,EAAS,CACvB,SAAA,CAAAC,EACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CAGD,OACEC,GAAAA,CAHWF,CAAAA,CAAUG,KAAO,KAAA,CAG3B,CACE,GAAGF,CAAAA,CACJ,SAAA,CAAWG,GACTL,CAAAA,CACA,
|
|
1
|
+
{"version":3,"sources":["../src/components/list.tsx"],"names":["ListRoot","className","asChild","props","jsx","Slot","cx","ListHeader","ListHeaderTitle","variant","size","weight","Typography","ListContent","variants","cva","ListItem","isActive"],"mappings":"mJAKO,SAASA,EAAS,CACvB,SAAA,CAAAC,EACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CAGD,OACEC,GAAAA,CAHWF,CAAAA,CAAUG,KAAO,KAAA,CAG3B,CACE,GAAGF,CAAAA,CACJ,SAAA,CAAWG,GACTL,CAAAA,CACA,6IACF,EACF,CAEJ,CAEO,SAASM,CAAAA,CAAW,CACzB,UAAAN,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAEG,CAED,OAAOC,GAAAA,CADMF,EAAUG,IAAAA,CAAO,KAAA,CACtB,CAAM,GAAGF,CAAAA,CAAO,UAAWG,EAAAA,CAAGL,CAAAA,CAAW,sBAAsB,CAAA,CAAG,CAC5E,CAEO,SAASO,CAAAA,CAAgB,CAC9B,OAAA,CAAAC,CAAAA,CAAU,OAAA,CACV,IAAA,CAAAC,CAAAA,CAAO,IAAA,CACP,OAAAC,GAAAA,CAAS,QAAA,CACT,UAAAV,CAAAA,CACA,GAAGE,CACL,CAAA,CAAoB,CAClB,OACEC,GAAAA,CAACQ,CAAAA,CAAA,CACC,SAAA,CAAWN,EAAAA,CAAGL,EAAW,0BAA0B,CAAA,CACnD,KAAMS,CAAAA,CACN,OAAA,CAASD,CAAAA,CACT,MAAA,CAAQE,GAAAA,CACP,GAAGR,EACN,CAEJ,CAEO,SAASU,CAAAA,CAAY,CAC1B,UAAAZ,CAAAA,CACA,OAAA,CAAAC,EACA,GAAGC,CACL,EAEG,CAGD,OACEC,IAHWF,CAAAA,CAAUG,IAAAA,CAAO,KAG3B,CACE,GAAGF,CAAAA,CACJ,SAAA,CAAWG,EAAAA,CAAG,oCAAA,CAAsCL,CAAS,CAAA,CAC/D,CAEJ,CAEA,IAAMa,CAAAA,CAAWC,IACf,CACE,iEAAA,CACA,oCACA,gEAAA,CACA,2BACF,EACA,CACE,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,GAAI,YAAA,CACJ,EAAA,CAAI,YACN,CAAA,CACA,QAAA,CAAU,CACR,KAAM,0GACR,CACF,EACA,eAAA,CAAiB,CACf,KAAM,IAAA,CACN,QAAA,CAAU,KACZ,CACF,CACF,EAEO,SAASC,CAAAA,CAAS,CACvB,SAAA,CAAAf,CAAAA,CACA,KAAAS,CAAAA,CACA,QAAA,CAAAO,CAAAA,CACA,OAAA,CAAAf,CAAAA,CACA,GAAGC,CACL,CAAA,CAGK,CAGH,OACEC,GAAAA,CAHWF,CAAAA,CAAUG,KAAO,IAAA,CAG3B,CAAM,GAAGF,CAAAA,CAAO,SAAA,CAAWG,GAAGQ,CAAAA,CAAS,CAAE,KAAAJ,CAAAA,CAAM,QAAA,CAAAO,CAAS,CAAC,CAAA,CAAGhB,CAAS,CAAA,CAAG,CAE7E","file":"chunk-YOLTIAFT.js","sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cx, cva, type ClassVariantProps } from '@xjur-ui/util'\nimport type { ComponentProps } from 'react'\nimport { type TypographyProps, Typography } from './typography'\n\nexport function ListRoot({\n className,\n asChild,\n ...props\n}: ComponentProps<'div'> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...props}\n className={cx(\n className,\n 'rounded-small scrollbar-hide bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-1000 max-h-[400px] list-none overflow-y-auto border'\n )}\n />\n )\n}\n\nexport function ListHeader({\n className,\n asChild,\n ...props\n}: ComponentProps<'div'> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : 'div'\n return <Comp {...props} className={cx(className, 'px-small pt-small-1x')} />\n}\n\nexport function ListHeaderTitle({\n variant = 'label',\n size = 'sm',\n weight = 'medium',\n className,\n ...props\n}: TypographyProps) {\n return (\n <Typography\n className={cx(className, 'text-neutral-placeholder')}\n size={size}\n variant={variant}\n weight={weight}\n {...props}\n />\n )\n}\n\nexport function ListContent({\n className,\n asChild,\n ...props\n}: ComponentProps<'ul'> & {\n asChild?: boolean\n}) {\n const Comp = asChild ? Slot : 'ul'\n\n return (\n <Comp\n {...props}\n className={cx('gap-small-1x p-small flex flex-col', className)}\n />\n )\n}\n\nconst variants = cva(\n [\n 'py-medium px-small flex items-center gap-small rounded-small-1x',\n 'bg-layer-2-idle text-neutral-dark',\n 'hover:bg-layer-2-hover transition-colors duration-100 ease-out',\n 'active:bg-layer-2-pressed'\n ],\n {\n variants: {\n size: {\n md: 'h-large-4x',\n lg: 'h-large-7x'\n },\n isActive: {\n true: 'bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed'\n }\n },\n defaultVariants: {\n size: 'md',\n isActive: false\n }\n }\n)\n\nexport function ListItem({\n className,\n size,\n isActive,\n asChild,\n ...props\n}: ComponentProps<'li'> &\n ClassVariantProps<typeof variants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : 'li'\n\n return (\n <Comp {...props} className={cx(variants({ size, isActive }), className)} />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c}from'./chunk-O3JK6QF6.js';import {useCallback,Fragment}from'react';import {twMerge}from'@xjur-ui/util';import {jsx,jsxs}from'react/jsx-runtime';function f({className:d,...o}){let{steps:r,currentStepIndex:s}=c(),c$1=useCallback(t=>t===r.length-1,[r]),b=useCallback(t=>{let e=t===s;return t<s?"disabled":e?"active":"normal"},[s]);return jsx("div",{className:twMerge("gap-small flex items-center",d),"data-slot":"steps-navigation",...o,children:r.map((t,e)=>{let i=b(e);return jsxs(Fragment,{children:[jsxs("div",{className:"group gap-small flex items-center","data-disabled":i==="disabled","data-slot":"step-trigger","data-state":i,...o,children:[jsx("div",{className:twMerge("size-large-4x rounded-circle border-border-layer-2 text-size-label-sm bg-layer-2-idle flex items-center justify-center border","group-data-[state=active]:border-primary-active group-data-[state=active]:bg-primary-alt-active group-data-[state=active]:text-primary-label-active","group-data-[state=disabled]:bg-layer-1-idle group-data-[state=disabled]:border-border-layer-2 group-data-[state=disabled]:text-neutral-light"),"data-slot":"step-number",children:e+1}),jsx("span",{className:"text-size-label-sm group-data-[state=active]:text-primary-label-active group-data-[state=disabled]:text-neutral-light font-medium","data-slot":"step-title",children:t})]}),!c$1(e)&&jsx("div",{className:twMerge("bg-border-layer-2 mx-2 h-px flex-1",d)})]},`${t}-${e}`)})})}export{f as a};//# sourceMappingURL=chunk-ZPQPJJQJ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-ZPQPJJQJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/steps/steps-navigation.tsx"],"names":["StepsNavigation","className","props","steps","currentStepIndex","useSteps","isLastStep","useCallback","stepIndex","stepState","isActive","jsx","twMerge","step","state","jsxs","Fragment"],"mappings":"0JAIO,SAASA,CAAAA,CAAgB,CAC9B,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAA0B,CACxB,GAAM,CAAE,KAAA,CAAAC,CAAAA,CAAO,iBAAAC,CAAiB,CAAA,CAAIC,CAAAA,EAAS,CAEvCC,IAAaC,WAAAA,CAChBC,CAAAA,EAAsBA,CAAAA,GAAcL,CAAAA,CAAM,MAAA,CAAS,CAAA,CACpD,CAACA,CAAK,CACR,CAAA,CAEMM,CAAAA,CAAYF,WAAAA,CACfC,CAAAA,EAAsB,CACrB,IAAME,CAAAA,CAAWF,CAAAA,GAAcJ,CAAAA,CAG/B,OAFiBI,CAAAA,CAAYJ,CAAAA,CAGpB,UAAA,CAGFM,CAAAA,CAAW,SAAW,QAC/B,CAAA,CACA,CAACN,CAAgB,CACnB,CAAA,CAEA,OACEO,GAAAA,CAAC,KAAA,CAAA,CACC,UAAWC,OAAAA,CAAQ,6BAAA,CAA+BX,CAAS,CAAA,CAC3D,YAAU,kBAAA,CACT,GAAGC,CAAAA,CAEH,QAAA,CAAAC,CAAAA,CAAM,GAAA,CAAI,CAACU,CAAAA,CAAML,IAAc,CAC9B,IAAMM,CAAAA,CAAQL,CAAAA,CAAUD,CAAS,CAAA,CAEjC,OACEO,IAAAA,CAACC,QAAAA,CAAA,CACC,QAAA,CAAA,CAAAD,IAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAU,oCACV,eAAA,CAAeD,CAAAA,GAAU,UAAA,CACzB,WAAA,CAAU,eACV,YAAA,CAAYA,CAAAA,CACX,GAAGZ,CAAAA,CAEJ,UAAAS,GAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAWC,OAAAA,CACT,gIACA,qJAAA,CACA,8IACF,CAAA,CACA,WAAA,CAAU,aAAA,CAET,QAAA,CAAAJ,CAAAA,CAAY,CAAA,CACf,EAEAG,GAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAU,mIAAA,CACV,YAAU,YAAA,CAET,QAAA,CAAAE,CAAAA,CACH,CAAA,CAAA,CACF,EAEC,CAACP,GAAAA,CAAWE,CAAS,CAAA,EACpBG,IAAC,KAAA,CAAA,CACC,SAAA,CAAWC,OAAAA,CACT,oCAAA,CACAX,CACF,CAAA,CACF,CAAA,CAAA,CAAA,CAjCW,CAAA,EAAGY,CAAI,IAAIL,CAAS,CAAA,CAmCnC,CAEJ,CAAC,EACH,CAEJ","file":"chunk-ZPQPJJQJ.js","sourcesContent":["import { Fragment, useCallback, type ComponentProps } from 'react'\nimport { twMerge } from '@xjur-ui/util'\nimport { useSteps } from './steps-context'\n\nexport function StepsNavigation({\n className,\n ...props\n}: ComponentProps<'div'>) {\n const { steps, currentStepIndex } = useSteps()\n\n const isLastStep = useCallback(\n (stepIndex: number) => stepIndex === steps.length - 1,\n [steps]\n )\n\n const stepState = useCallback(\n (stepIndex: number) => {\n const isActive = stepIndex === currentStepIndex\n const isPassed = stepIndex < currentStepIndex\n\n if (isPassed) {\n return 'disabled'\n }\n\n return isActive ? 'active' : 'normal'\n },\n [currentStepIndex]\n )\n\n return (\n <div\n className={twMerge('gap-small flex items-center', className)}\n data-slot=\"steps-navigation\"\n {...props}\n >\n {steps.map((step, stepIndex) => {\n const state = stepState(stepIndex)\n\n return (\n <Fragment key={`${step}-${stepIndex}`}>\n <div\n className=\"group gap-small flex items-center\"\n data-disabled={state === 'disabled'}\n data-slot=\"step-trigger\"\n data-state={state}\n {...props}\n >\n <div\n className={twMerge(\n 'size-large-4x rounded-circle border-border-layer-2 text-size-label-sm bg-layer-2-idle flex items-center justify-center border',\n 'group-data-[state=active]:border-primary-active group-data-[state=active]:bg-primary-alt-active group-data-[state=active]:text-primary-label-active',\n 'group-data-[state=disabled]:bg-layer-1-idle group-data-[state=disabled]:border-border-layer-2 group-data-[state=disabled]:text-neutral-light'\n )}\n data-slot=\"step-number\"\n >\n {stepIndex + 1}\n </div>\n\n <span\n className=\"text-size-label-sm group-data-[state=active]:text-primary-label-active group-data-[state=disabled]:text-neutral-light font-medium\"\n data-slot=\"step-title\"\n >\n {step}\n </span>\n </div>\n\n {!isLastStep(stepIndex) && (\n <div\n className={twMerge(\n 'bg-border-layer-2 mx-2 h-px flex-1',\n className\n )}\n />\n )}\n </Fragment>\n )\n })}\n </div>\n )\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'../chunk-
|
|
1
|
+
import {b}from'../chunk-DVDHTP4C.js';import {a}from'../chunk-EIG6CBTQ.js';import'react';import {Slot}from'@radix-ui/react-slot';import {cx}from'@xjur-ui/util';import {jsx,jsxs}from'react/jsx-runtime';function x({...r}){return jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...r})}function y({className:r,...e}){return jsx("ol",{className:cx("text-neutral-placeholder flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",r),"data-slot":"breadcrumb-list",...e})}function g({className:r,...e}){return jsx("li",{className:cx("inline-flex items-center gap-1.5",r),"data-slot":"breadcrumb-item",...e})}function C({asChild:r,className:e,variant:o="headline",size:n="sm",...i}){return jsx(a,{asChild:true,size:n,variant:o,children:jsx(r?Slot:"a",{className:cx("hover:text-neutral-dark transition-colors",e),"data-slot":"breadcrumb-link",...i})})}function P({variant:r="headline",size:e="sm",className:o,...n}){return jsx(a,{"aria-current":"page","aria-disabled":"true",className:cx("text-neutral-dark font-normal",o),"data-slot":"breadcrumb-page",role:"link",size:e,variant:r,...n})}function v({children:r,className:e,...o}){return jsx("li",{"aria-hidden":"true",className:cx("[&>span]:text-size-title-lg",e),"data-slot":"breadcrumb-separator",role:"presentation",...o,children:r??jsx(b,{name:"chevron_right"})})}function z({className:r,...e}){return jsxs("span",{"aria-hidden":"true",className:cx("flex size-9 items-center justify-center",r),"data-slot":"breadcrumb-ellipsis",role:"presentation",...e,children:[jsx(b,{className:"size-4",name:"more_horiz"}),jsx("span",{className:"sr-only",children:"More"})]})}export{x as Breadcrumb,z as BreadcrumbEllipsis,g as BreadcrumbItem,C as BreadcrumbLink,y as BreadcrumbList,P as BreadcrumbPage,v as BreadcrumbSeparator};//# sourceMappingURL=breadcrumb.js.map
|
|
2
2
|
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -5,7 +5,7 @@ import { ComponentProps } from 'react';
|
|
|
5
5
|
import { Typography } from './typography.js';
|
|
6
6
|
import { Icon } from './icon.js';
|
|
7
7
|
import { AvatarRoot } from './avatar.js';
|
|
8
|
-
import { I as IconType } from '../icons-
|
|
8
|
+
import { I as IconType } from '../icons-C-hGI45d.js';
|
|
9
9
|
import '@radix-ui/react-avatar';
|
|
10
10
|
|
|
11
11
|
declare const chipVariants: (props?: ({
|
package/dist/components/chip.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$1,b as b$1,c}from'../chunk-TB6KI6CL.js';import {b}from'../chunk-
|
|
1
|
+
import {a as a$1,b as b$1,c}from'../chunk-TB6KI6CL.js';import {b}from'../chunk-DVDHTP4C.js';import {a}from'../chunk-EIG6CBTQ.js';import {cva,cx}from'@xjur-ui/util';import'react';import {jsx,jsxs}from'react/jsx-runtime';var u=cva(["group/chip relative h-large-2x w-fit rounded-circle px-small py-none flex items-center gap-small_1x-alt","transition-all duration-200"],{variants:{variant:{primary:"bg-primary-alt-idle text-primary-label-idle hover:bg-primary-alt-hover",danger:"bg-danger-alt-idle text-danger-label-idle hover:bg-danger-alt-hover",neutral:"bg-layer-1-idle text-neutral-dark hover:bg-layer-1-hover"}},defaultVariants:{variant:"primary"}});function C({className:a,variant:t="primary",disabled:r=false,...o}){return jsx("div",{className:cx(u({variant:t}),a),"data-disabled":r,...o})}function P({variant:a$1="label",size:t="sm-1x",weight:r="medium",className:o,...d}){return jsx(a,{className:cx(o,"truncate"),size:t,variant:a$1,weight:r,...d})}function g({className:a,...t}){return jsx(b,{className:(cx("text-size-body-md","group-data-[variant=primary]:text-primary-label-idle","group-data-[variant=danger]:text-danger-label-idle","group-data-[variant=neutral]:text-icon-neutral-3"),a),...t})}function A({className:a,children:t=jsx(g,{name:"close"}),...r}){return jsx("button",{className:cx(a,"cursor-pointer bg-inherit","invisible items-center justify-center group-hover/chip:data-[disabled=false]:visible","absolute top-0 right-0","h-large-2x w-large-2x rounded-circle","transition-[visibility] duration-200"),type:"button",...r,children:t})}function I({size:a="xs",avatarFallback:t="CN",avatarUrl:r,...o}){return jsxs(a$1,{size:a,style:{marginLeft:"-4px"},...o,children:[r&&jsx(b$1,{src:r}),jsx(c,{children:t})]})}export{I as ChipAvatar,A as ChipClose,g as ChipIcon,C as ChipRoot,P as ChipText};//# sourceMappingURL=chip.js.map
|
|
2
2
|
//# sourceMappingURL=chip.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {e}from'../../chunk-SLAAEXWI.js';import {b}from'../../chunk-
|
|
1
|
+
import {e}from'../../chunk-SLAAEXWI.js';import {b}from'../../chunk-M6ZI7M3R.js';import {b as b$1}from'../../chunk-DVDHTP4C.js';import'react-day-picker/style.css';import {cx}from'@xjur-ui/util';import {getDefaultClassNames,DayPicker}from'react-day-picker';import {jsx,jsxs}from'react/jsx-runtime';function f(o){return o.charAt(0).toUpperCase()+o.slice(1)}function P({showOutsideDays:o=true,locale:p=e,navLayout:y="around",handleClear:n,handleToday:m,...a}){let i=getDefaultClassNames(),u={root:cx("bg-layer-2-idle shadow-elevation-2 rounded-[6px] p-small w-fit border border-border-layer-2 text-size-body-md text-neutral-dark font-inter",i.root),day:cx("rounded-circle hover:bg-layer-2-hover"),caption_label:cx("text-size-label-md text-neutral-dark font-medium",i.caption_label),outside:cx("text-neutral-placeholder",i.outside),selected:cx("text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),disabled:cx("opacity-60",i.disabled),today:cx("text-neutral-dark font-medium bg-layer-2-active hover:!bg-layer-2-active"),range_start:cx("rounded-r-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),range_end:cx("rounded-l-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),range_middle:cx("!bg-primary-alt-active !text-primary-label-active rounded-none hover:!bg-primary-alt-active")};return jsx(DayPicker,{classNames:{...u,...a.classNames},components:{Chevron:({orientation:t})=>jsx(b$1,{className:"size-large text-icon-neutral-3",name:t==="left"?"chevron_left":"chevron_right"}),...a.components},footer:(n||m)&&jsxs("div",{className:"py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t",children:[m&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:m,children:"Hoje"}),n&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:n,children:"Limpar"})]}),formatters:{formatWeekdayName:t=>{let r=t.toLocaleDateString("pt-BR",{weekday:"short"});return r.charAt(0).toUpperCase()+r.slice(1).replace(".","")},formatCaption(t){let r=t.toLocaleDateString("pt-BR",{month:"long"});return `${f(r)} ${t.getFullYear()}`},...a.formatters},locale:p,mode:a.mode??"single",navLayout:y,showOutsideDays:o,...a})}export{P as Calendar};//# sourceMappingURL=calendar.js.map
|
|
2
2
|
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/calendar.tsx"],"names":["capitalize","str","Calendar","showOutsideDays","locale","ptBR","navLayout","handleClear","handleToday","props","defaultClassNames","getDefaultClassNames","classNames","cx","jsx","DayPicker","orientation","Icon","jsxs","Button","date","weekday","month","monthName"],"mappings":"wSAYA,SAASA,CAAAA,CAAWC,CAAAA,CAAa,CAC/B,OAAOA,CAAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,EAAY,CAAIA,CAAAA,CAAI,KAAA,CAAM,CAAC,CAClD,CASO,SAASC,CAAAA,CAAS,CACvB,eAAA,CAAAC,CAAAA,CAAkB,IAAA,CAClB,MAAA,CAAAC,CAAAA,CAASC,CAAAA,CACT,SAAA,CAAAC,CAAAA,CAAY,QAAA,CACZ,WAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkB,CAChB,IAAMC,CAAAA,CAAoBC,oBAAAA,EAAqB,CAEzCC,CAAAA,CAAkC,CACtC,IAAA,CAAMC,GACJ,4IAAA,CACAH,CAAAA,CAAkB,IACpB,CAAA,CACA,GAAA,CAAKG,EAAAA,CAAG,wCAAwC,CAAA,CAChD,aAAA,CAAeA,EAAAA,CACb,kDAAA,CACAH,CAAAA,CAAkB,aACpB,CAAA,CACA,OAAA,CAASG,EAAAA,CAAG,0BAAA,CAA4BH,CAAAA,CAAkB,OAAO,CAAA,CACjE,QAAA,CAAUG,EAAAA,CACR,4GACF,CAAA,CACA,QAAA,CAAUA,EAAAA,CAAG,YAAA,CAAcH,CAAAA,CAAkB,QAAQ,CAAA,CACrD,KAAA,CAAOG,EAAAA,CACL,0EACF,CAAA,CACA,WAAA,CAAaA,EAAAA,CACX,2HACF,CAAA,CACA,SAAA,CAAWA,EAAAA,CACT,2HACF,CAAA,C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,CAAAA,CAAM,kBAAA,CAAmB,OAAA,CAAS,CAClD,KAAA,CAAO,MACT,CAAC,CAAA,CACD,OAAO,CAAA,EAAGtB,CAAAA,CAAWuB,CAAS,CAAC,CAAA,CAAA,EAAID,CAAAA,CAAM,WAAA,EAAa,CAAA,CACxD,CAAA,CACA,GAAGb,CAAAA,CAAM,UACX,CAAA,CACA,MAAA,CAAQL,CAAAA,CACR,IAAA,CAAMK,CAAAA,CAAM,IAAA,EAAQ,QAAA,CACpB,SAAA,CAAWH,CAAAA,CACX,eAAA,CAAiBH,CAAAA,CAChB,GAAGM,CAAAA,CACN,CAEJ","file":"calendar.js","sourcesContent":["import 'react-day-picker/style.css'\nimport { ptBR } from 'date-fns/locale'\nimport { cx } from '@xjur-ui/util'\nimport {\n type DayPickerProps,\n type ClassNames,\n DayPicker,\n getDefaultClassNames\n} from 'react-day-picker'\nimport { Icon, type IconType } from '../icon'\nimport { Button } from './button'\n\nfunction capitalize(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n\nexport { type DateRange } from 'react-day-picker'\n\nexport type CalendarProps = DayPickerProps & {\n handleClear?: () => void\n handleToday?: () => void\n}\n\nexport function Calendar({\n showOutsideDays = true,\n locale = ptBR,\n navLayout = 'around',\n handleClear,\n handleToday,\n ...props\n}: CalendarProps) {\n const defaultClassNames = getDefaultClassNames()\n\n const classNames: Partial<ClassNames> = {\n root: cx(\n 'bg-layer-2-idle shadow-elevation-2 rounded-[6px] p-small w-fit border border-border-layer-2 text-size-body-md text-neutral-dark font-inter',\n defaultClassNames.root\n ),\n day: cx('rounded-circle hover:bg-layer-2-hover'),\n caption_label: cx(\n 'text-size-label-md text-neutral-dark font-medium',\n defaultClassNames.caption_label\n ),\n outside: cx('text-neutral-placeholder', defaultClassNames.outside),\n selected: cx(\n 'text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n disabled: cx('opacity-60', defaultClassNames.disabled),\n today: cx(\n 'text-neutral-dark font-medium bg-layer-2-active hover:!bg-layer-2-active'\n ),\n range_start: cx(\n 'rounded-r-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n range_end: cx(\n 'rounded-l-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n range_middle: cx(\n '!bg-primary-alt-active !text-primary-label-active rounded-none hover:!bg-primary-alt-active'\n )\n }\n\n return (\n <DayPicker\n classNames={{ ...classNames, ...props.classNames }}\n components={{\n Chevron: ({ orientation }) => {\n const icon = orientation === 'left' ? 'chevron_left' : 'chevron_right'\n return (\n <Icon\n className=\"size-large text-icon-neutral-3\"\n name={icon as IconType}\n />\n )\n },\n ...props.components\n }}\n footer={\n (handleClear || handleToday) && (\n <div className=\"py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t\">\n {handleToday && (\n <Button\n appearance=\"ghost\"\n variant=\"secondary\"\n onClick={handleToday}\n >\n Hoje\n </Button>\n )}\n {handleClear && (\n <Button\n appearance=\"ghost\"\n variant=\"secondary\"\n onClick={handleClear}\n >\n Limpar\n </Button>\n )}\n </div>\n )\n }\n formatters={{\n formatWeekdayName: date => {\n const weekday = date.toLocaleDateString('pt-BR', { weekday: 'short' })\n return (\n weekday.charAt(0).toUpperCase() + weekday.slice(1).replace('.', '')\n )\n },\n formatCaption(month) {\n const monthName = month.toLocaleDateString('pt-BR', {\n month: 'long'\n })\n return `${capitalize(monthName)} ${month.getFullYear()}`\n },\n ...props.formatters\n }}\n locale={locale}\n mode={props.mode ?? 'single'}\n navLayout={navLayout}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'../../chunk-
|
|
1
|
+
import {b}from'../../chunk-DVDHTP4C.js';import {a}from'../../chunk-EIG6CBTQ.js';import*as r from'@radix-ui/react-checkbox';import {cx}from'@xjur-ui/util';import {jsxs,jsx}from'react/jsx-runtime';function y({label:o,name:i,className:l,disabled:a$1=false,...s}){let t=`field-checkbox-${i}`;return jsxs("div",{className:"group gap-small flex items-center",children:[jsx(r.Root,{disabled:a$1,...s,className:cx("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",l),id:t,name:i,children:jsx(r.Indicator,{className:"flex items-center justify-center",children:jsx(b,{className:"text-neutral-label",name:"check"})})}),!!o&&jsx(a,{asChild:true,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":a$1,weight:"medium",children:jsx("label",{htmlFor:t,children:o})})]})}export{y as Checkbox};//# sourceMappingURL=checkbox.js.map
|
|
2
2
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/checkbox.tsx"],"names":["Checkbox","label","name","className","disabled","props","fieldId","jsxs","jsx","cx","Icon","Typography"],"mappings":"mMAKO,SAASA,CAAAA,CAAS,CACvB,KAAA,CAAAC,CAAAA,CACA,KAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,GAAAA,CAAW,KAAA,CACX,GAAGC,CACL,CAAA,CAEG,CACD,IAAMC,CAAAA,CAAU,kBAAkBJ,CAAI,CAAA,CAAA,CAEtC,OACEK,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,oCACb,QAAA,CAAA,CAAAC,GAAAA,CAAkB,OAAjB,CACC,QAAA,CAAUJ,IACT,GAAGC,CAAAA,CACJ,SAAA,CAAWI,EAAAA,CAET,yJAAA,CAEA,+DAAA,CAEA,iFAEA,mFAAA,CAEA,gDAAA,CAEA,0FACAN,CACF,CAAA,CACA,GAAIG,CAAAA,CACJ,IAAA,CAAMJ,CAAAA,CAEN,QAAA,CAAAM,GAAAA,CAAkB,CAAA,CAAA,SAAA,CAAjB,CAA2B,SAAA,CAAU,kCAAA,CACpC,SAAAA,GAAAA,CAACE,CAAAA,CAAA,CAAK,SAAA,CAAU,oBAAA,CAAqB,IAAA,CAAK,OAAA,CAAQ,CAAA,CACpD,CAAA,CACF,EAEC,CAAC,CAACT,GACDO,GAAAA,CAACG,CAAAA,CAAA,CACC,OAAA,CAAS,IAAA,CACT,SAAA,CAAU,mDAAA,CACV,eAAA,CAAeP,GAAAA,CACf,OAAO,QAAA,CAEP,QAAA,CAAAI,IAAC,OAAA,CAAA,CAAM,OAAA,CAASF,EAAU,QAAA,CAAAL,CAAAA,CAAM,CAAA,CAClC,CAAA,CAAA,CAEJ,CAEJ","file":"checkbox.js","sourcesContent":["import * as CheckoxPrimitive from '@radix-ui/react-checkbox'\nimport { cx } from '@xjur-ui/util'\nimport { Icon } from '../icon'\nimport { Typography } from '../typography'\n\nexport function Checkbox({\n label,\n name,\n className,\n disabled = false,\n ...props\n}: CheckoxPrimitive.CheckboxProps & {\n label?: string\n}) {\n const fieldId = `field-checkbox-${name}`\n\n return (\n <div className=\"group gap-small flex items-center\">\n <CheckoxPrimitive.Root\n disabled={disabled}\n {...props}\n className={cx(\n // layout\n 'size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none',\n // base\n 'border-border-layer-2 bg-layer-2-idle cursor-pointer border-2',\n // hover/focus (desmarcado)\n 'hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary',\n // estado checked\n 'data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active',\n // hover quando estiver checked (opcional)\n 'data-[state=checked]:hover:border-primary-idle',\n // disabled\n 'disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]',\n className\n )}\n id={fieldId}\n name={name}\n >\n <CheckoxPrimitive.Indicator className=\"flex items-center justify-center\">\n <Icon className=\"text-neutral-label\" name=\"check\" />\n </CheckoxPrimitive.Indicator>\n </CheckoxPrimitive.Root>\n\n {!!label && (\n <Typography\n asChild={true}\n className=\"text-size-body-sm data-[disabled=true]:opacity-38\"\n data-disabled={disabled}\n weight=\"medium\"\n >\n <label htmlFor={fieldId}>{label}</label>\n </Typography>\n )}\n </div>\n )\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MaskOptions } from '@react-input/mask';
|
|
3
|
-
|
|
4
|
-
type InputMaskType = 'cpf' | 'cnpj' | 'telefone' | 'cep' | 'numero-processo' | 'custom' | 'data' | 'hora' | 'data-hora';
|
|
3
|
+
import { I as InputMaskType } from '../../../input-mask-DhbtCxF7.js';
|
|
5
4
|
|
|
6
5
|
interface FieldContextValue {
|
|
7
6
|
state?: 'normal' | 'error' | 'disabled';
|
|
@@ -2,10 +2,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as tailwind_variants from 'tailwind-variants';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
4
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
5
|
-
import { I as IconType } from '../../icons-
|
|
5
|
+
import { I as IconType } from '../../icons-C-hGI45d.js';
|
|
6
6
|
import { FieldContextValue } from './context/field.context.js';
|
|
7
7
|
import { FloatingLabel } from './floating-label.js';
|
|
8
8
|
import '@react-input/mask';
|
|
9
|
+
import '../../input-mask-DhbtCxF7.js';
|
|
9
10
|
|
|
10
11
|
declare const datePicker: tailwind_variants.TVReturnType<{
|
|
11
12
|
state: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$1}from'../../chunk-
|
|
1
|
+
import {a as a$1}from'../../chunk-JGPHBUVM.js';import {a,b}from'../../chunk-2JQVYVAT.js';import {b as b$1}from'../../chunk-DVDHTP4C.js';import {a as a$2}from'../../chunk-EIG6CBTQ.js';import {tv,twMerge,twJoin}from'@xjur-ui/util';import {useMemo}from'react';import*as i from'@radix-ui/react-popover';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var P=tv({slots:{wrapper:"group flex w-full flex-col gap-small-2x",trigger:["h-large-4x w-full cursor-pointer relative","flex items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-hover border border-transparent","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-1 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}}),{wrapper:y,trigger:h,icon:C,caption:R,slotText:k,content:w}=P();function M({className:e,state:r="normal",defaultOpen:o,variant:a$1="normal",modal:n,open:l,onOpenChange:u,...x}){return jsx(i.Root,{defaultOpen:o,modal:n,open:l,onOpenChange:u,children:jsx(a.Provider,{value:{state:r,variant:a$1},children:jsx("div",{className:y({className:e,state:r}),...x})})})}function V({className:e,...r}){let{state:o,variant:a}=b(),n=tv({base:["group bg-layer-2-idle relative"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),l=twMerge(h({state:o,className:e}),a==="filter"&&n({state:o,className:e}));return jsx(i.Trigger,{className:l,disabled:o==="disabled",...r})}function j(e){return jsx(a$1,{...e})}function J({className:e,name:r,...o}){let{state:a}=b();return jsx("div",{className:C({className:e,state:a}),...o,children:jsx(b$1,{name:r})})}function S({className:e,...r}){let{state:o}=b();return jsx("span",{className:k({className:e,state:o}),...r})}function _({className:e,displayValue:r="",value:o,...a}){let{variant:n}=b(),l=useMemo(()=>n==="filter"?r:r||a.placeholder,[r,a.placeholder,n]);return jsxs(Fragment,{children:[jsx(a$2,{className:"text-neutral-dark group-has-[div[data-slot=date-picker-left-slot]]:pl-large-1x",children:l}),jsx("input",{...a,"aria-readonly":true,className:twJoin("pointer-events-none",e),hidden:true,placeholder:" ",readOnly:true,value:o??""})]})}function q({className:e,sideOffset:r=5,side:o="bottom",align:a="start",...n}){let{state:l}=b();return jsx(i.Portal,{children:jsx(i.Content,{align:a,className:w({className:e,state:l}),side:o,sideOffset:r,...n})})}function A({className:e,...r}){let{state:o}=b();return jsx("p",{className:R({className:e,state:o}),...r})}export{A as DatePickerCaption,q as DatePickerContent,J as DatePickerIcon,j as DatePickerLabel,M as DatePickerRoot,S as DatePickerSlot,V as DatePickerTrigger,_ as DatePickerValue,P as datePicker};//# sourceMappingURL=date-picker.js.map
|
|
2
2
|
//# sourceMappingURL=date-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/date-picker.tsx"],"names":["datePicker","tv","wrapper","trigger","icon","caption","slotText","content","DatePickerRoot","className","state","defaultOpen","variant","modal","open","handleOpenChange","props","jsx","FieldContext","DatePickerTrigger","useFieldContext","filterTrigger","mergedClassName","twMerge","DatePickerLabel","FloatingLabel","DatePickerIcon","name","Icon","DatePickerSlot","DatePickerValue","displayValue","value","valueOrPlaceholder","useMemo","jsxs","Fragment","Typography","twJoin","DatePickerContent","sideOffset","side","align","DatePickerCaption"],"mappings":"6VAYO,IAAMA,CAAAA,CAAaC,EAAAA,CAAG,CAC3B,KAAA,CAAO,CACL,QAAS,yCAAA,CACT,OAAA,CAAS,CACP,2CAAA,CACA,8CAAA,CACA,0BAAA,CACA,4CAAA,CACA,6DAAA,CACA,6BACF,CAAA,CACA,OAAA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AChC,SAAA,CAAA9B,CAAAA,CACA,UAAA,CAAA+B,CAAAA,CAAa,CAAA,CACb,IAAA,CAAAC,CAAAA,CAAO,SACP,KAAA,CAAAC,CAAAA,CAAQ,OAAA,CACR,GAAG1B,CACL,CAAA,CAAgD,CAC9C,GAAM,CAAE,KAAA,CAAAN,CAAM,CAAA,CAAIU,CAAAA,EAAgB,CAElC,OACEH,GAAAA,CAAc,CAAA,CAAA,MAAA,CAAb,CACC,QAAA,CAAAA,GAAAA,CAAc,CAAA,CAAA,OAAA,CAAb,CACC,KAAA,CAAOyB,CAAAA,CACP,SAAA,CAAWnC,CAAAA,CAAQ,CAAE,SAAA,CAAAE,CAAAA,CAAW,MAAAC,CAAM,CAAC,CAAA,CACvC,IAAA,CAAM+B,CAAAA,CACN,UAAA,CAAYD,CAAAA,CACX,GAAGxB,CAAAA,CACN,CAAA,CACF,CAEJ,CAEO,SAAS2B,CAAAA,CAAkB,CAChC,SAAA,CAAAlC,CAAAA,CACA,GAAGO,CACL,CAAA,CAAwB,CACtB,GAAM,CAAE,KAAA,CAAAN,CAAM,CAAA,CAAIU,CAAAA,EAAgB,CAClC,OAAOH,IAAC,GAAA,CAAA,CAAE,SAAA,CAAWZ,CAAAA,CAAQ,CAAE,SAAA,CAAAI,CAAAA,CAAW,KAAA,CAAAC,CAAM,CAAC,CAAA,CAAI,GAAGM,CAAAA,CAAO,CACjE","file":"date-picker.js","sourcesContent":["import { tv, twJoin, twMerge } from '@xjur-ui/util'\nimport { useMemo, type ComponentProps } from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { Icon, type IconType } from '../icon'\nimport { Typography } from '../typography'\nimport {\n FieldContext,\n useFieldContext,\n type FieldContextValue\n} from './context/field.context'\nimport { FloatingLabel } from './floating-label'\n\nexport const datePicker = tv({\n slots: {\n wrapper: 'group flex w-full flex-col gap-small-2x',\n trigger: [\n 'h-large-4x w-full cursor-pointer relative',\n 'flex items-center gap-small rounded-small-1x',\n 'py-small_1x-alt px-small',\n 'bg-layer-2-hover border border-transparent',\n 'group-has-[div[data-slot=input-action-slot]]:rounded-r-none',\n 'transition-all duration-200'\n ],\n content: [\n 'group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]'\n ],\n icon: 'size-large text-icon-neutral-3 flex items-center justify-center',\n slotText:\n 'size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder',\n caption: '!text-size-body-sm font-normal'\n },\n variants: {\n state: {\n normal: {\n trigger:\n 'hover:border-border-layer-1 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle'\n },\n error: {\n trigger:\n 'border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle',\n caption: 'text-danger-label-idle'\n },\n disabled: {\n trigger: 'pointer-events-none border-transparent bg-layer-2-idle'\n }\n }\n }\n})\n\nconst { wrapper, trigger, icon, caption, slotText, content } = datePicker()\n\nexport function DatePickerRoot({\n className,\n state = 'normal',\n defaultOpen,\n variant = 'normal',\n modal,\n open,\n onOpenChange: handleOpenChange,\n ...props\n}: ComponentProps<'div'> &\n FieldContextValue &\n ComponentProps<typeof RadixPopover.Root>) {\n return (\n <RadixPopover.Root\n defaultOpen={defaultOpen}\n modal={modal}\n open={open}\n onOpenChange={handleOpenChange}\n >\n <FieldContext.Provider value={{ state, variant }}>\n <div className={wrapper({ className, state })} {...props} />\n </FieldContext.Provider>\n </RadixPopover.Root>\n )\n}\n\nexport function DatePickerTrigger({\n className,\n ...props\n}: ComponentProps<typeof RadixPopover.Trigger>) {\n const { state, variant } = useFieldContext()\n\n const filterTrigger = tv({\n base: ['group bg-layer-2-idle relative'],\n variants: {\n state: {\n normal: [\n 'border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle'\n ],\n error: ['border-danger-idle hover:border-danger-idle'],\n disabled: ['border border-border-layer-2 opacity-60']\n }\n }\n })\n\n const mergedClassName = twMerge(\n trigger({ state, className }),\n variant === 'filter' && filterTrigger({ state, className })\n )\n\n return (\n <RadixPopover.Trigger\n className={mergedClassName}\n disabled={state === 'disabled'}\n {...props}\n />\n )\n}\n\nexport function DatePickerLabel(props: ComponentProps<typeof FloatingLabel>) {\n return <FloatingLabel {...props} />\n}\n\nexport function DatePickerIcon({\n className,\n name,\n ...props\n}: ComponentProps<'div'> & {\n name: IconType\n}) {\n const { state } = useFieldContext()\n\n return (\n <div className={icon({ className, state })} {...props}>\n <Icon name={name} />\n </div>\n )\n}\n\nexport function DatePickerSlot({\n className,\n ...props\n}: ComponentProps<'span'>) {\n const { state } = useFieldContext()\n return <span className={slotText({ className, state })} {...props} />\n}\n\nexport function DatePickerValue({\n className,\n displayValue = '',\n value,\n ...props\n}: ComponentProps<'input'> & { displayValue?: string }) {\n const { variant } = useFieldContext()\n\n const valueOrPlaceholder = useMemo(() => {\n if (variant === 'filter') return displayValue\n return displayValue || props.placeholder\n }, [displayValue, props.placeholder, variant])\n\n return (\n <>\n <Typography className=\"text-neutral-dark group-has-[div[data-slot=date-picker-left-slot]]:pl-large-1x\">\n {valueOrPlaceholder}\n </Typography>\n\n <input\n {...props}\n aria-readonly={true}\n className={twJoin('pointer-events-none', className)}\n hidden={true}\n placeholder={' '}\n readOnly={true}\n value={value ?? ''}\n />\n </>\n )\n}\n\nexport function DatePickerContent({\n className,\n sideOffset = 5,\n side = 'bottom',\n align = 'start',\n ...props\n}: ComponentProps<typeof RadixPopover.Content>) {\n const { state } = useFieldContext()\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n align={align}\n className={content({ className, state })}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n </RadixPopover.Portal>\n )\n}\n\nexport function DatePickerCaption({\n className,\n ...props\n}: ComponentProps<'p'>) {\n const { state } = useFieldContext()\n return <p className={caption({ className, state })} {...props} />\n}\n"]}
|
|
@@ -2,10 +2,11 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as tailwind_variants from 'tailwind-variants';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
4
|
import { InputNumberFormatProps } from '@react-input/number-format';
|
|
5
|
-
import { I as IconType } from '../../icons-
|
|
5
|
+
import { I as IconType } from '../../icons-C-hGI45d.js';
|
|
6
6
|
import { FieldContextValue } from './context/field.context.js';
|
|
7
7
|
import { FloatingLabel } from './floating-label.js';
|
|
8
8
|
import '@react-input/mask';
|
|
9
|
+
import '../../input-mask-DhbtCxF7.js';
|
|
9
10
|
|
|
10
11
|
declare const input: tailwind_variants.TVReturnType<{
|
|
11
12
|
state: {
|
|
@@ -80,7 +81,7 @@ declare function InputLabel(props: ComponentProps<typeof FloatingLabel>): react_
|
|
|
80
81
|
declare function InputTrigger({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
81
82
|
declare function InputMask({ className, placeholder, ...props }: ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
82
83
|
declare function InputText({ className, placeholder, ...props }: ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
83
|
-
declare function InputNumber({ className, locales, placeholder, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
declare function InputNumber({ className, locales, placeholder, groupDisplay, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
|
|
84
85
|
declare function InputIcon({ className, name, ...props }: ComponentProps<'div'> & {
|
|
85
86
|
name: IconType;
|
|
86
87
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{l as InputAction,k as InputCaption,c as InputContent,i as InputIcon,d as InputLabel,f as InputMask,h as InputNumber,m as InputNumericStepper,b as InputRoot,j as InputSlot,g as InputText,e as InputTrigger,a as input}from'../../chunk-3H75F4Y2.js';import'../../chunk-PBR7SFWY.js';import'../../chunk-JGPHBUVM.js';import'../../chunk-2JQVYVAT.js';import'../../chunk-CBFC4QME.js';import'../../chunk-DVDHTP4C.js';//# sourceMappingURL=input.js.map
|
|
2
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/otp-input.tsx"],"names":["Root","children","className","props","jsx","cx","Input","HiddenInput","OTPInput"],"mappings":"6HAGA,SAASA,EAAK,CACZ,QAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAA+C,CAC7C,OACEC,IAAkB,CAAA,CAAA,IAAA,CAAjB,CACC,SAAA,CAAWC,EAAAA,CAAGH,EAAW,mCAAmC,CAAA,CAC3D,GAAGC,CAAAA,CAEH,SAAAF,CAAAA,CACH,CAEJ,CAEA,SAASK,CAAAA,CAAM,CACb,SAAA,CAAAJ,CAAAA,CACA,GAAGC,CACL,EAAoD,CAClD,OACEC,GAAAA,CAAkB,CAAA,CAAA,KAAA,CAAjB,CACC,SAAA,CAAWC,EAAAA,CACTH,CAAAA,CACA,6FAAA,CACA,sDACF,CAAA,CACC,GAAGC,EACN,CAEJ,CAEA,SAASI,CAAAA,CAAY,CACnB,GAAGJ,CACL,EAA0D,CACxD,OAAOC,IAAkB,CAAA,CAAA,WAAA,CAAjB,CAA8B,GAAGD,CAAAA,CAAO,CAClD,CAEO,IAAMK,EAAW,CACtB,IAAA,CAAAR,EACA,KAAA,CAAAM,CAAAA,CACA,YAAAC,CACF","file":"otp-input.js","sourcesContent":["import * as OTPPasswordField from '@radix-ui/react-one-time-password-field'\nimport { cx } from '@xjur-ui/util'\n\nfunction Root({\n children,\n className,\n ...props\n}: OTPPasswordField.OneTimePasswordFieldProps) {\n return (\n <OTPPasswordField.Root\n className={cx(className, 'group gap-small flex items-center')}\n {...props}\n >\n {children}\n </OTPPasswordField.Root>\n )\n}\n\nfunction Input({\n className,\n ...props\n}: OTPPasswordField.OneTimePasswordFieldInputProps) {\n return (\n <OTPPasswordField.Input\n className={cx(\n className,\n 'text-neutral-dark h-large-6x bg-layer-2-hover rounded-small-1x w-full text-center outline-0',\n 'focus-within:border-primary-idle focus-within:border'\n )}\n {...props}\n />\n )\n}\n\nfunction HiddenInput({\n ...props\n}: OTPPasswordField.OneTimePasswordFieldHiddenInputProps) {\n return <OTPPasswordField.HiddenInput {...props} />\n}\n\nexport const OTPInput = {\n Root,\n Input,\n HiddenInput\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/radio.tsx"],"names":["RadioGroup","className","orientation","props","jsx","cx","RadioItem","id","label","disabled","jsxs","Typography"],"mappings":"4KAKO,SAASA,CAAAA,CAAW,CACzB,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,UAAA,CACd,GAAGC,CACL,CAAA,CAA0D,CACxD,OACEC,GAAAA,CAAqB,CAAA,CAAA,IAAA,CAApB,CACC,SAAA,CAAWC,EAAAA,CACT,4FAAA,CACAJ,CACF,CAAA,CACA,kBAAA,CAAkBC,CAAAA,CAClB,WAAA,CAAU,aAAA,CACT,GAAGC,CAAAA,CACN,CAEJ,CAEO,SAASG,CAAAA,CAAU,CACxB,SAAA,CAAAL,CAAAA,CACA,EAAA,CAAAM,CAAAA,CACA,KAAA,CAAAC,GAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,GAAGN,CACL,CAAA,CAEG,CACD,OACEO,KAAC,KAAA,CAAA,CAAI,SAAA,CAAU,6BAAA,CACb,QAAA,CAAA,CAAAN,GAAAA,CAAqB,CAAA,CAAA,IAAA,CAApB,CACC,SAAA,CAAWC,EAAAA,CAET,uJAAA,CAEA,+DAAA,CAEA,gFAAA,CAEA,mFAAA,CAEA,gDAAA,CAEA,0FACAJ,CACF,CAAA,CACA,WAAA,CAAU,kBAAA,CACV,QAAA,CAAUQ,CAAAA,CACV,EAAA,CAAIF,CAAAA,CACH,GAAGJ,CAAAA,CAEJ,QAAA,CAAAC,GAAAA,CAAqB,CAAA,CAAA,SAAA,CAApB,CACC,UAAU,2CAAA,CACV,WAAA,CAAU,uBAAA,CACZ,CAAA,CACF,CAAA,CAEC,CAAC,CAACI,GAAAA,EACDJ,GAAAA,CAACO,CAAAA,CAAA,CACC,OAAA,CAAS,IAAA,CACT,SAAA,CAAU,mDAAA,CACV,eAAA,CAAeF,CAAAA,CACf,MAAA,CAAO,QAAA,CAEP,QAAA,CAAAL,GAAAA,CAAC,OAAA,CAAA,CAAM,OAAA,CAASG,CAAAA,CAAK,QAAA,CAAAC,GAAAA,CAAM,CAAA,CAC7B,CAAA,CAAA,CAEJ,CAEJ","file":"radio.js","sourcesContent":["import * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { cx } from '@xjur-ui/util'\nimport { Typography } from '../typography'\n\nexport function RadioGroup({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n className={cx(\n 'gap-small flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col',\n className\n )}\n data-orientation={orientation}\n data-slot=\"radio-group\"\n {...props}\n />\n )\n}\n\nexport function RadioItem({\n className,\n id,\n label,\n disabled = false,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {\n label?: string\n}) {\n return (\n <div className=\"gap-small flex items-center\">\n <RadioGroupPrimitive.Item\n className={cx(\n // layout\n 'size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none',\n // base\n 'border-border-layer-2 bg-layer-2-idle cursor-pointer border-2',\n // hover/focus (desmarcado)\n 'hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary',\n // estado checked\n 'data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active',\n // hover quando estiver checked (opcional)\n 'data-[state=checked]:hover:border-primary-idle',\n // disabled\n 'disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]',\n className\n )}\n data-slot=\"radio-group-item\"\n disabled={disabled}\n id={id}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n className=\"relative flex items-center justify-center\"\n data-slot=\"radio-group-indicator\"\n />\n </RadioGroupPrimitive.Item>\n\n {!!label && (\n <Typography\n asChild={true}\n className=\"text-size-body-sm data-[disabled=true]:opacity-38\"\n data-disabled={disabled}\n weight=\"medium\"\n >\n <label htmlFor={id}>{label}</label>\n </Typography>\n )}\n </div>\n )\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1,c as c$1,d}from'../../chunk-NELCN6E2.js';import {a as a$2,c as c$2,d as d$1,e,h,i}from'../../chunk-
|
|
1
|
+
import {b as b$1,c as c$1,d}from'../../chunk-NELCN6E2.js';import {a}from'../../chunk-KS6WGBHQ.js';import {a as a$2,c as c$2,d as d$1,e,h,i}from'../../chunk-6PHXO2YA.js';import'../../chunk-CBFC4QME.js';import'../../chunk-YOLTIAFT.js';import {b}from'../../chunk-M6ZI7M3R.js';import {b as b$2}from'../../chunk-DVDHTP4C.js';import {a as a$1}from'../../chunk-EIG6CBTQ.js';import {cx}from'@xjur-ui/util';import {useMemo,useCallback,useState}from'react';import {useEditor,EditorContext,useCurrentEditor,EditorContent,useEditorState}from'@tiptap/react';export{useCurrentEditor as useRichTextEditor,useEditorState as useRichTextEditorState}from'@tiptap/react';import {StarterKit}from'@tiptap/starter-kit';import {Heading}from'@tiptap/extension-heading';import {Placeholder}from'@tiptap/extension-placeholder';import {jsx,jsxs}from'react/jsx-runtime';var c={1:"text-size-body-md",2:"text-size-title-lg",3:"text-size-headline-lg"};function X({className:t,editorOptions:n,...r}){let i=useEditor({...n,extensions:[StarterKit.configure({bulletList:{HTMLAttributes:{class:"list-disc list-outside pl-large-1x"}},orderedList:{HTMLAttributes:{class:"list-decimal list-outside pl-large-1x"}},heading:false}),Placeholder.configure({placeholder:({node:o,editor:s})=>o.type.name==="paragraph"&&s.isEmpty?"Digite aqui\u2026":"",showOnlyWhenEditable:true,includeChildren:false,emptyNodeClass:"before:content-[attr(data-placeholder)] before:absolute before:top-0 before:left-0 before:text-neutral-placeholder first:before:float-left first:before:content-[attr(data-placeholder)] first:before:pointer-events-none"}),Heading.configure({levels:[1,2,3]}).extend({renderHTML({node:o,HTMLAttributes:s}){let u=o.attrs.level??1;return ["h",{...s,class:c[u]},0]}}),...n?.extensions??[]]}),a=useMemo(()=>({editor:i}),[i]);return jsx(EditorContext.Provider,{value:a,children:jsx("div",{className:cx("gap-small flex w-full flex-col",t),"data-slot":"text-area-root",...r})})}function j({className:t,...n}){return jsx("div",{className:cx("bg-layer-2-hover py-small_1x-alt px-small rounded-small-1x min-h-[116px] w-full border border-transparent","hover:border-border-layer-2 transition-colors duration-200","[&_ul_ul]:list-[circle]","[&_ul_ul_ul]:list-[square]","[&_ol_ol]:list-[lower-alpha]","[&_ol_ol_ol]:list-[lower-roman]","gap-small flex flex-col overflow-x-hidden overflow-y-auto",t),"data-slot":"text-area-content",...n})}function ee({className:t,...n}){return jsx("p",{...n,className:cx("text-size-body-sm text-neutral-dark font-normal",t),"data-slot":"text-area-caption"})}function te({className:t,...n}){let{editor:r}=useCurrentEditor();return jsx(EditorContent,{className:cx("text-size-body-md text-neutral-dark max-h-[116px] *:h-full *:w-full *:outline-0",t),editor:r,...n})}function oe({className:t,...n}){return jsx("div",{className:cx("h-large-4x gap-small-1x h-large-6px scrollbar-hide flex flex-nowrap items-center overflow-x-auto overflow-y-hidden",t),"data-slot":"text-area-toolbar",...n})}function $({appearance:t="ghost",variant:n="secondary",onMouseDown:r,onPointerDown:i,...a}){return jsx(b,{appearance:t,size:"icon_md",tabIndex:-1,type:"button",variant:n,onMouseDown:o=>{o.preventDefault(),r?.(o);},onPointerDown:o=>{o.preventDefault(),i?.(o);},...a})}function re({name:t,...n}){let{editor:r}=useCurrentEditor(),{shortcut:i}=a(),a$2=useEditorState({editor:r,selector:d=>d.editor?.isActive(t)??false}),o=useMemo(()=>new Map([["bold","format_bold"],["italic","format_italic"],["underline","format_underlined"],["strike","format_strikethrough"],["bulletList","format_list_bulleted"],["orderedList","format_list_numbered"],["undo","undo"],["redo","redo"]]).get(t),[t]),s=useMemo(()=>new Map([["bold",`Negrito (${i} + B)`],["italic",`It\xE1lico (${i} + I)`],["underline",`Sublinhado (${i} + U)`],["strike",`Tachado (${i} + S)`],["bulletList",`Lista (${i} + Shift + 7)`],["orderedList",`Lista numerada (${i} + Shift + 8)`],["undo",`Desfazer (${i} + Z)`],["redo",`Refazer (${i} + Y)`]]).get(t),[t,i]),u=useCallback(()=>{if(!r)throw new Error("Editor not found");new Map([["bold",()=>r.chain().focus().toggleBold().run()],["italic",()=>r.chain().focus().toggleItalic().run()],["underline",()=>r.chain().focus().toggleUnderline().run()],["strike",()=>r.chain().focus().toggleStrike().run()],["bulletList",()=>r.chain().focus().toggleBulletList().run()],["orderedList",()=>r.chain().focus().toggleOrderedList().run()],["undo",()=>r.chain().focus().undo().run()],["redo",()=>r.chain().focus().redo().run()]]).get(t)?.();},[r,t]);return jsxs(b$1,{children:[jsx(c$1,{asChild:true,children:jsx($,{onClick:u,...a$2&&{appearance:"solid"},...n,children:o&&jsx(b$2,{className:"text-icon-neutral-3",name:o})})}),jsx(d,{children:s&&jsx(a$1,{size:"sm",children:s})})]})}function ne({appearance:t="ghost",variant:n="secondary",...r}){let[i$1,a]=useState(false),{editor:o}=useCurrentEditor(),s=useEditorState({editor:o,selector:l=>l.editor?.isActive("heading")??false}),u=useCallback(l=>{if(!o)throw new Error("Editor not found");return o.isActive("heading",{level:l})},[o]),d$2=useCallback(l=>{if(!o)throw new Error("Editor not found");a(false),setTimeout(()=>{o.chain().focus().toggleHeading({level:l}).run();},0);},[o]),P=[{level:1,label:"Normal",className:c[1]},{level:2,label:"Grande",className:c[2]},{level:3,label:"Enorme",className:c[3]}];return jsxs(a$2,{open:i$1,onOpenChange:l=>a(l),children:[jsx(c$2,{asChild:true,children:jsx(b,{appearance:s?"solid":t,size:"icon_md",tabIndex:-1,type:"button",variant:n,...r,children:jsxs(b$1,{children:[jsx(c$1,{asChild:true,children:jsx(b$2,{className:"text-icon-neutral-3",name:"format_size"})}),jsx(d,{children:jsx(a$1,{size:"sm",children:"Tamanho"})})]})})}),jsx(d$1,{children:jsx(e,{children:P.map(l=>jsx(h,{isActive:u(l.level),onPointerDown:()=>d$2(l.level),children:jsx(i,{className:l.className,children:l.label})},l.level))})})]})}export{ne as HeadingButton,te as RichEditorAreaText,ee as RichEditorCaption,j as RichEditorContent,X as RichEditorRoot,oe as RichEditorToolbar,re as ToggleButton,$ as ToolbarButton};//# sourceMappingURL=rich-editor.js.map
|
|
2
2
|
//# sourceMappingURL=rich-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/controls/rich-editor.tsx"],"names":["headingClasses","RichEditorRoot","className","editorOptions","props","editor","useEditor","StarterKit","Placeholder","node","Heading","HTMLAttributes","level","value","useMemo","jsx","EditorContext","cx","RichEditorContent","RichEditorCaption","RichEditorAreaText","useRichTextEditor","EditorContent","RichEditorToolbar","ToolbarButton","appearance","variant","onMouseDown","onPointerDown","Button","e","ToggleButton","name","shortcut","useOS","isActive","useRichTextEditorState","ctx","icon","description","handleToggle","useCallback","jsxs","Tooltip","TooltipTrigger","Icon","TooltipContent","Typography","HeadingButton","isOpen","setIsOpen","useState","isLevelActive","toggleHeading","levels","DropdownMenuRoot","open","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuList","DropdownMenuItem","DropdownMenuItemText"],"mappings":"y0BA6BA,IAAMA,CAAAA,CAAiD,CACrD,CAAA,CAAG,mBAAA,CACH,CAAA,CAAG,oBAAA,CACH,CAAA,CAAG,uBACL,CAAA,CAEO,SAASC,CAAAA,CAAe,CAC7B,SAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAMG,CACD,IAAMC,CAAAA,CAASC,SAAAA,CAAU,CACvB,GAAGH,CAAAA,CACH,UAAA,CAAY,CACVI,UAAAA,CAAW,SAAA,CAAU,CACnB,UAAA,C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AczC,CAAAA,CAAM,KAAK,CAAA,CAE9C,QAAA,CAAAG,GAAAA,CAAC8C,CAAAA,CAAA,CAAqB,UAAWjD,CAAAA,CAAM,SAAA,CACpC,QAAA,CAAAA,CAAAA,CAAM,KAAA,CACT,CAAA,CAAA,CALKA,CAAAA,CAAM,KAMb,CACD,CAAA,CACH,CAAA,CACF,CAAA,CAAA,CACF,CAEJ","file":"rich-editor.js","sourcesContent":["import { cx } from '@xjur-ui/util'\nimport { useCallback, useMemo, useState, type ComponentProps } from 'react'\nimport {\n EditorContent,\n EditorContext,\n useCurrentEditor as useRichTextEditor,\n useEditorState as useRichTextEditorState,\n useEditor,\n type EditorOptions\n} from '@tiptap/react'\nimport type { Extension } from '@tiptap/core'\nimport { StarterKit } from '@tiptap/starter-kit'\nimport { Heading, type Level } from '@tiptap/extension-heading'\n// Import specific extension instead of full extensions bundle\nimport { Placeholder } from '@tiptap/extension-placeholder'\nimport { useOS } from '../../hooks'\nimport { Icon, type IconType } from '../icon'\nimport { Button, type ButtonProps } from './button'\nimport {\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuItemText,\n DropdownMenuList,\n DropdownMenuRoot,\n DropdownMenuTrigger\n} from '../dropdown-menu'\nimport { Tooltip, TooltipTrigger, TooltipContent } from '../tooltip'\nimport { Typography } from '../typography'\n\nconst headingClasses: Partial<Record<Level, string>> = {\n 1: 'text-size-body-md',\n 2: 'text-size-title-lg',\n 3: 'text-size-headline-lg'\n}\n\nexport function RichEditorRoot({\n className,\n editorOptions,\n ...props\n}: ComponentProps<'div'> & {\n editorOptions?: Partial<\n Omit<EditorOptions, 'extensions'> & {\n extensions?: Extension[]\n }\n >\n}) {\n const editor = useEditor({\n ...editorOptions,\n extensions: [\n StarterKit.configure({\n bulletList: {\n HTMLAttributes: {\n class: 'list-disc list-outside pl-large-1x'\n }\n },\n orderedList: {\n HTMLAttributes: {\n class: 'list-decimal list-outside pl-large-1x'\n }\n },\n heading: false\n }),\n Placeholder.configure({\n placeholder: ({ node, editor }) =>\n node.type.name === 'paragraph' && editor.isEmpty\n ? 'Digite aqui…'\n : '',\n showOnlyWhenEditable: true,\n includeChildren: false,\n emptyNodeClass:\n 'before:content-[attr(data-placeholder)] before:absolute before:top-0 before:left-0 before:text-neutral-placeholder first:before:float-left first:before:content-[attr(data-placeholder)] first:before:pointer-events-none'\n }),\n Heading.configure({\n levels: [1, 2, 3]\n }).extend({\n renderHTML({ node, HTMLAttributes }) {\n const level: Level = node.attrs.level ?? 1\n\n return [\n 'h',\n {\n ...HTMLAttributes,\n class: headingClasses[level]\n },\n 0\n ]\n }\n }),\n ...(editorOptions?.extensions ?? [])\n ]\n })\n\n const value = useMemo(() => ({ editor }), [editor])\n\n return (\n <EditorContext.Provider value={value}>\n <div\n className={cx('gap-small flex w-full flex-col', className)}\n data-slot=\"text-area-root\"\n {...props}\n />\n </EditorContext.Provider>\n )\n}\n\nexport function RichEditorContent({\n className,\n ...props\n}: ComponentProps<'div'>) {\n return (\n <div\n className={cx(\n 'bg-layer-2-hover py-small_1x-alt px-small rounded-small-1x min-h-[116px] w-full border border-transparent',\n 'hover:border-border-layer-2 transition-colors duration-200',\n '[&_ul_ul]:list-[circle]',\n '[&_ul_ul_ul]:list-[square]',\n '[&_ol_ol]:list-[lower-alpha]',\n '[&_ol_ol_ol]:list-[lower-roman]',\n 'gap-small flex flex-col overflow-x-hidden overflow-y-auto',\n className\n )}\n data-slot=\"text-area-content\"\n {...props}\n />\n )\n}\n\nexport function RichEditorCaption({\n className,\n ...props\n}: ComponentProps<'p'>) {\n return (\n <p\n {...props}\n className={cx(\n 'text-size-body-sm text-neutral-dark font-normal',\n className\n )}\n data-slot=\"text-area-caption\"\n />\n )\n}\n\nexport function RichEditorAreaText({\n className,\n ...props\n}: Omit<ComponentProps<typeof EditorContent>, 'editor'>) {\n const { editor } = useRichTextEditor()\n\n return (\n <EditorContent\n className={cx(\n 'text-size-body-md text-neutral-dark max-h-[116px] *:h-full *:w-full *:outline-0',\n className\n )}\n editor={editor}\n {...props}\n />\n )\n}\n\nexport function RichEditorToolbar({\n className,\n ...props\n}: ComponentProps<'div'>) {\n return (\n <div\n className={cx(\n 'h-large-4x gap-small-1x h-large-6px scrollbar-hide flex flex-nowrap items-center overflow-x-auto overflow-y-hidden',\n className\n )}\n data-slot=\"text-area-toolbar\"\n {...props}\n />\n )\n}\n\nexport function ToolbarButton({\n appearance = 'ghost',\n variant = 'secondary',\n onMouseDown,\n onPointerDown,\n ...props\n}: ButtonProps) {\n return (\n <Button\n appearance={appearance}\n size=\"icon_md\"\n tabIndex={-1}\n type=\"button\"\n variant={variant}\n onMouseDown={e => {\n e.preventDefault()\n onMouseDown?.(e)\n }}\n onPointerDown={e => {\n e.preventDefault()\n onPointerDown?.(e)\n }}\n {...props}\n />\n )\n}\n\ntype ToggleButtonName =\n | 'bold'\n | 'italic'\n | 'underline'\n | 'strike'\n | 'bulletList'\n | 'orderedList'\n | 'undo'\n | 'redo'\n\nexport function ToggleButton({\n name,\n ...props\n}: ButtonProps & { name: ToggleButtonName }) {\n const { editor } = useRichTextEditor()\n const { shortcut } = useOS()\n\n const isActive = useRichTextEditorState({\n editor,\n selector: ctx => ctx.editor?.isActive(name) ?? false\n })\n\n const icon = useMemo(() => {\n const iconsMap = new Map<ToggleButtonName, IconType>([\n ['bold', 'format_bold'],\n ['italic', 'format_italic'],\n ['underline', 'format_underlined'],\n ['strike', 'format_strikethrough'],\n ['bulletList', 'format_list_bulleted'],\n ['orderedList', 'format_list_numbered'],\n ['undo', 'undo'],\n ['redo', 'redo']\n ])\n\n return iconsMap.get(name)\n }, [name])\n\n const description = useMemo(() => {\n const descriptionsMap = new Map<ToggleButtonName, string>([\n ['bold', `Negrito (${shortcut} + B)`],\n ['italic', `Itálico (${shortcut} + I)`],\n ['underline', `Sublinhado (${shortcut} + U)`],\n ['strike', `Tachado (${shortcut} + S)`],\n ['bulletList', `Lista (${shortcut} + Shift + 7)`],\n ['orderedList', `Lista numerada (${shortcut} + Shift + 8)`],\n ['undo', `Desfazer (${shortcut} + Z)`],\n ['redo', `Refazer (${shortcut} + Y)`]\n ])\n\n return descriptionsMap.get(name)\n }, [name, shortcut])\n\n const handleToggle = useCallback(() => {\n if (!editor) throw new Error('Editor not found')\n\n const commandsMap = new Map<ToggleButtonName, () => void>([\n ['bold', () => editor.chain().focus().toggleBold().run()],\n ['italic', () => editor.chain().focus().toggleItalic().run()],\n ['underline', () => editor.chain().focus().toggleUnderline().run()],\n ['strike', () => editor.chain().focus().toggleStrike().run()],\n ['bulletList', () => editor.chain().focus().toggleBulletList().run()],\n ['orderedList', () => editor.chain().focus().toggleOrderedList().run()],\n ['undo', () => editor.chain().focus().undo().run()],\n ['redo', () => editor.chain().focus().redo().run()]\n ])\n\n commandsMap.get(name)?.()\n }, [editor, name])\n\n return (\n <Tooltip>\n <TooltipTrigger asChild={true}>\n <ToolbarButton\n onClick={handleToggle}\n {...(isActive && { appearance: 'solid' })}\n {...props}\n >\n {icon && <Icon className=\"text-icon-neutral-3\" name={icon} />}\n </ToolbarButton>\n </TooltipTrigger>\n\n <TooltipContent>\n {description && <Typography size=\"sm\">{description}</Typography>}\n </TooltipContent>\n </Tooltip>\n )\n}\n\nexport function HeadingButton({\n appearance = 'ghost',\n variant = 'secondary',\n ...props\n}: ButtonProps) {\n const [isOpen, setIsOpen] = useState(false)\n const { editor } = useRichTextEditor()\n\n const isActive = useRichTextEditorState({\n editor,\n selector: ctx => ctx.editor?.isActive('heading') ?? false\n })\n\n const isLevelActive = useCallback(\n (level: Level) => {\n if (!editor) throw new Error('Editor not found')\n return editor.isActive('heading', { level })\n },\n [editor]\n )\n\n const toggleHeading = useCallback(\n (level: Level) => {\n if (!editor) throw new Error('Editor not found')\n setIsOpen(false)\n setTimeout(() => {\n editor.chain().focus().toggleHeading({ level }).run()\n }, 0)\n },\n [editor]\n )\n\n const levels: { level: Level; label: string; className?: string }[] = [\n { level: 1, label: 'Normal', className: headingClasses[1] },\n { level: 2, label: 'Grande', className: headingClasses[2] },\n { level: 3, label: 'Enorme', className: headingClasses[3] }\n ]\n\n return (\n <DropdownMenuRoot open={isOpen} onOpenChange={open => setIsOpen(open)}>\n <DropdownMenuTrigger asChild={true}>\n <Button\n appearance={isActive ? 'solid' : appearance}\n size=\"icon_md\"\n tabIndex={-1}\n type=\"button\"\n variant={variant}\n {...props}\n >\n <Tooltip>\n <TooltipTrigger asChild={true}>\n <Icon className=\"text-icon-neutral-3\" name=\"format_size\" />\n </TooltipTrigger>\n\n <TooltipContent>\n <Typography size=\"sm\">Tamanho</Typography>\n </TooltipContent>\n </Tooltip>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuList>\n {levels.map(level => (\n <DropdownMenuItem\n isActive={isLevelActive(level.level)}\n key={level.level}\n onPointerDown={() => toggleHeading(level.level)}\n >\n <DropdownMenuItemText className={level.className}>\n {level.label}\n </DropdownMenuItemText>\n </DropdownMenuItem>\n ))}\n </DropdownMenuList>\n </DropdownMenuContent>\n </DropdownMenuRoot>\n )\n}\n\nexport { useRichTextEditorState, useRichTextEditor }\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
+
import { MaskOptions } from '@react-input/mask';
|
|
4
|
+
import { InputNumberFormatProps } from '@react-input/number-format';
|
|
5
|
+
import { I as InputMaskType } from '../../input-mask-DhbtCxF7.js';
|
|
3
6
|
import { ButtonProps } from './button.js';
|
|
4
7
|
import 'class-variance-authority/types';
|
|
5
8
|
import '@xjur-ui/util';
|
|
@@ -11,7 +14,12 @@ declare function SearchInputRoot({ className, variant, ...props }: ComponentProp
|
|
|
11
14
|
declare function SearchInputContent({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
12
15
|
declare function SearchInputLabel({ htmlFor, ...props }: ComponentProps<'label'>): react_jsx_runtime.JSX.Element;
|
|
13
16
|
declare function SearchInputText({ className, ...props }: ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function SearchInputMask({ className, mask, customMask, ...props }: ComponentProps<'input'> & {
|
|
18
|
+
mask?: InputMaskType;
|
|
19
|
+
customMask?: MaskOptions;
|
|
20
|
+
}): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function SearchInputNumber({ className, locales, groupDisplay, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
|
|
14
22
|
declare function SearchInputSlot(props: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
15
23
|
declare function SearchInputAction({ className, appearance, variant, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
16
24
|
|
|
17
|
-
export { SearchInputAction, SearchInputContent, SearchInputLabel, type SearchInputProps, SearchInputRoot, SearchInputSlot, SearchInputText };
|
|
25
|
+
export { SearchInputAction, SearchInputContent, SearchInputLabel, SearchInputMask, SearchInputNumber, type SearchInputProps, SearchInputRoot, SearchInputSlot, SearchInputText };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{h as SearchInputAction,b as SearchInputContent,c as SearchInputLabel,e as SearchInputMask,f as SearchInputNumber,a as SearchInputRoot,g as SearchInputSlot,d as SearchInputText}from'../../chunk-XGPKBYDY.js';import'../../chunk-PBR7SFWY.js';import'../../chunk-M6ZI7M3R.js';import'../../chunk-EIG6CBTQ.js';//# sourceMappingURL=search-input.js.map
|
|
2
|
+
//# sourceMappingURL=search-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"search-input.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { MaskOptions } from '@react-input/mask';
|
|
4
|
+
import { I as InputMaskType } from '../../input-mask-DhbtCxF7.js';
|
|
5
|
+
|
|
6
|
+
interface SelectorOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
interface SearchSelectorProps extends ComponentProps<'input'> {
|
|
11
|
+
options: SelectorOption[];
|
|
12
|
+
selectedSearchOption?: string;
|
|
13
|
+
mask?: InputMaskType;
|
|
14
|
+
customMask?: MaskOptions;
|
|
15
|
+
onChangeSearchOption?: (option: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function SearchSelector({ options, mask, customMask, placeholder, onChangeSearchOption, selectedSearchOption: initialSelectedSearchOption, ...props }: SearchSelectorProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { SearchSelector };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a,b,g,e,d,h}from'../../chunk-XGPKBYDY.js';import'../../chunk-PBR7SFWY.js';import {a as a$1,c,d as d$1,e as e$1,h as h$1,i}from'../../chunk-6PHXO2YA.js';import'../../chunk-CBFC4QME.js';import'../../chunk-YOLTIAFT.js';import'../../chunk-M6ZI7M3R.js';import {b as b$1}from'../../chunk-DVDHTP4C.js';import'../../chunk-EIG6CBTQ.js';import {useState,useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';function A({options:o,mask:p,customMask:c$1,placeholder:u="Pesquisar",onChangeSearchOption:g$1,selectedSearchOption:v,...s}){let[r,C]=useState(v),O=useMemo(()=>o.find(t=>t.value===r)?.label,[o,r]);return jsxs(a,{className:"w-full",variant:"action",children:[jsxs(b,{children:[jsx(g,{children:jsx(b$1,{className:"text-icon-neutral-3",name:"search"})}),p||c$1?jsx(e,{customMask:c$1,mask:p,placeholder:u,...s}):jsx(d,{placeholder:u,...s})]}),jsxs(a$1,{children:[jsx(c,{asChild:true,children:jsxs(h,{children:[O,jsx(b$1,{className:"text-icon-neutral-3",name:"keyboard_arrow_down"})]})}),jsx(d$1,{children:jsx(e$1,{children:o.map(t=>jsx(h$1,{isActive:r===t.value,onClick:()=>{C(t.value),g$1?.(t.value);},children:jsx(i,{children:t.label})},t.value))})})]})]})}export{A as SearchSelector};//# sourceMappingURL=search-selector.js.map
|
|
2
|
+
//# sourceMappingURL=search-selector.js.map
|