@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xjur-ui/react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components for XJur Design System",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./divider": "./dist/components/divider.js",
|
|
27
27
|
"./sheet": "./dist/components/sheet.js",
|
|
28
28
|
"./badge": "./dist/components/badge.js",
|
|
29
|
-
"./table": "./dist/components/table.js",
|
|
29
|
+
"./table": "./dist/components/table/index.js",
|
|
30
30
|
"./avatar-group": "./dist/components/avatar-group.js",
|
|
31
31
|
"./skeleton": "./dist/components/skeleton.js",
|
|
32
32
|
"./tooltip": "./dist/components/tooltip.js",
|
|
@@ -35,17 +35,20 @@
|
|
|
35
35
|
"./breadcrumb": "./dist/components/breadcrumb.js",
|
|
36
36
|
"./dnd": "./dist/components/drag-and-drop/index.js",
|
|
37
37
|
"./full-calendar": "./dist/components/full-calendar/index.js",
|
|
38
|
-
"./button": "./dist/components/
|
|
39
|
-
"./calendar": "./dist/components/
|
|
40
|
-
"./checkbox": "./dist/components/
|
|
41
|
-
"./date-picker": "./dist/components/
|
|
42
|
-
"./input": "./dist/components/
|
|
43
|
-
"./otp-input": "./dist/components/
|
|
44
|
-
"./radio": "./dist/components/
|
|
45
|
-
"./rich-editor": "./dist/components/
|
|
46
|
-
"./search-input": "./dist/components/
|
|
47
|
-
"./
|
|
48
|
-
"./
|
|
38
|
+
"./button": "./dist/components/controls/button.js",
|
|
39
|
+
"./calendar": "./dist/components/controls/calendar.js",
|
|
40
|
+
"./checkbox": "./dist/components/controls/checkbox.js",
|
|
41
|
+
"./date-picker": "./dist/components/controls/date-picker.js",
|
|
42
|
+
"./input": "./dist/components/controls/input.js",
|
|
43
|
+
"./otp-input": "./dist/components/controls/otp-input.js",
|
|
44
|
+
"./radio": "./dist/components/controls/radio.js",
|
|
45
|
+
"./rich-editor": "./dist/components/controls/rich-editor.js",
|
|
46
|
+
"./search-input": "./dist/components/controls/search-input.js",
|
|
47
|
+
"./search-selector": "./dist/components/controls/search-selector.js",
|
|
48
|
+
"./select": "./dist/components/controls/select.js",
|
|
49
|
+
"./switch": "./dist/components/controls/switch.js",
|
|
50
|
+
"./pessoa": "./dist/components/custom/pessoa/index.js",
|
|
51
|
+
"./steps": "./dist/components/steps/index.js"
|
|
49
52
|
},
|
|
50
53
|
"dependencies": {
|
|
51
54
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getDefaultClassNames
|
|
9
9
|
} from 'react-day-picker'
|
|
10
10
|
import { Icon, type IconType } from '../icon'
|
|
11
|
-
import { Button } from '
|
|
11
|
+
import { Button } from './button'
|
|
12
12
|
|
|
13
13
|
function capitalize(str: string) {
|
|
14
14
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
@@ -151,6 +151,7 @@ export function InputNumber({
|
|
|
151
151
|
className,
|
|
152
152
|
locales = 'pt-BR',
|
|
153
153
|
placeholder,
|
|
154
|
+
groupDisplay = false,
|
|
154
155
|
...props
|
|
155
156
|
}: InputNumberFormatProps) {
|
|
156
157
|
const { state, variant } = useFieldContext()
|
|
@@ -160,6 +161,7 @@ export function InputNumber({
|
|
|
160
161
|
{...props}
|
|
161
162
|
className={value({ className, state })}
|
|
162
163
|
disabled={state === 'disabled'}
|
|
164
|
+
groupDisplay={groupDisplay}
|
|
163
165
|
locales={locales}
|
|
164
166
|
placeholder={variant === 'filter' ? ' ' : placeholder}
|
|
165
167
|
readOnly={state === 'disabled'}
|
|
@@ -15,7 +15,7 @@ import { Heading, type Level } from '@tiptap/extension-heading'
|
|
|
15
15
|
import { Placeholder } from '@tiptap/extension-placeholder'
|
|
16
16
|
import { useOS } from '../../hooks'
|
|
17
17
|
import { Icon, type IconType } from '../icon'
|
|
18
|
-
import { Button, type ButtonProps } from '
|
|
18
|
+
import { Button, type ButtonProps } from './button'
|
|
19
19
|
import {
|
|
20
20
|
DropdownMenuContent,
|
|
21
21
|
DropdownMenuItem,
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { cva, cx } from '@xjur-ui/util'
|
|
2
2
|
import { createContext, type ComponentProps } from 'react'
|
|
3
|
+
import {
|
|
4
|
+
InputMask as InputMaskComponent,
|
|
5
|
+
type MaskOptions
|
|
6
|
+
} from '@react-input/mask'
|
|
7
|
+
import {
|
|
8
|
+
InputNumberFormat,
|
|
9
|
+
type InputNumberFormatProps
|
|
10
|
+
} from '@react-input/number-format'
|
|
3
11
|
import { Typography } from '../typography'
|
|
4
|
-
import {
|
|
12
|
+
import { inputMask, type InputMaskType } from '../../resources/input-mask'
|
|
13
|
+
import { Button, type ButtonProps } from './button'
|
|
5
14
|
|
|
6
15
|
export type SearchInputProps = {
|
|
7
16
|
variant?: 'outlined' | 'line' | 'action'
|
|
@@ -18,7 +27,7 @@ export function SearchInputRoot({
|
|
|
18
27
|
}: ComponentProps<'div'> & SearchInputProps) {
|
|
19
28
|
return (
|
|
20
29
|
<SearchInputRootContext.Provider value={{ variant }}>
|
|
21
|
-
<div className={cx(
|
|
30
|
+
<div className={cx('relative flex', className)} {...props} />
|
|
22
31
|
</SearchInputRootContext.Provider>
|
|
23
32
|
)
|
|
24
33
|
}
|
|
@@ -84,6 +93,40 @@ export function SearchInputText({
|
|
|
84
93
|
return <input className={cx(className, 'flex-1 outline-none')} {...props} />
|
|
85
94
|
}
|
|
86
95
|
|
|
96
|
+
export function SearchInputMask({
|
|
97
|
+
className,
|
|
98
|
+
mask,
|
|
99
|
+
customMask,
|
|
100
|
+
...props
|
|
101
|
+
}: ComponentProps<'input'> & {
|
|
102
|
+
mask?: InputMaskType
|
|
103
|
+
customMask?: MaskOptions
|
|
104
|
+
}) {
|
|
105
|
+
return (
|
|
106
|
+
<InputMaskComponent
|
|
107
|
+
{...(mask ? { ...inputMask(mask) } : customMask && { ...customMask })}
|
|
108
|
+
className={cx(className, 'flex-1 outline-none')}
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function SearchInputNumber({
|
|
115
|
+
className,
|
|
116
|
+
locales = 'pt-BR',
|
|
117
|
+
groupDisplay = false,
|
|
118
|
+
...props
|
|
119
|
+
}: InputNumberFormatProps) {
|
|
120
|
+
return (
|
|
121
|
+
<InputNumberFormat
|
|
122
|
+
className={cx(className, 'flex-1 outline-none')}
|
|
123
|
+
groupDisplay={groupDisplay}
|
|
124
|
+
locales={locales}
|
|
125
|
+
{...props}
|
|
126
|
+
/>
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
|
|
87
130
|
export function SearchInputSlot(props: ComponentProps<'div'>) {
|
|
88
131
|
return <div {...props} data-slot="search-input-slot" />
|
|
89
132
|
}
|
|
@@ -102,7 +145,7 @@ export function SearchInputAction({
|
|
|
102
145
|
className,
|
|
103
146
|
'cursor-pointer',
|
|
104
147
|
'h-large-4x rounded-tr-circle rounded-br-circle px-small py-small_1x-alt flex items-center justify-center rounded-none',
|
|
105
|
-
'text-size-body-md text-neutral-dark gap-small-1x'
|
|
148
|
+
'text-size-body-md text-neutral-dark gap-small-1x !border-l-0'
|
|
106
149
|
)}
|
|
107
150
|
data-slot="search-input-action"
|
|
108
151
|
variant={variant}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { useMemo, useState, type ComponentProps } from 'react'
|
|
2
|
+
import type { MaskOptions } from '@react-input/mask'
|
|
3
|
+
import type { InputMaskType } from '../../resources/input-mask'
|
|
4
|
+
import {
|
|
5
|
+
DropdownMenuRoot,
|
|
6
|
+
DropdownMenuList,
|
|
7
|
+
DropdownMenuItemText,
|
|
8
|
+
DropdownMenuContent,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
DropdownMenuTrigger
|
|
11
|
+
} from '../dropdown-menu'
|
|
12
|
+
import { Icon } from '../icon'
|
|
13
|
+
import {
|
|
14
|
+
SearchInputContent,
|
|
15
|
+
SearchInputRoot,
|
|
16
|
+
SearchInputSlot,
|
|
17
|
+
SearchInputAction,
|
|
18
|
+
SearchInputMask,
|
|
19
|
+
SearchInputText
|
|
20
|
+
} from './search-input'
|
|
21
|
+
|
|
22
|
+
interface SelectorOption {
|
|
23
|
+
label: string
|
|
24
|
+
value: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface SearchSelectorProps extends ComponentProps<'input'> {
|
|
28
|
+
options: SelectorOption[]
|
|
29
|
+
selectedSearchOption?: string
|
|
30
|
+
mask?: InputMaskType
|
|
31
|
+
customMask?: MaskOptions
|
|
32
|
+
|
|
33
|
+
onChangeSearchOption?: (option: string) => void
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function SearchSelector({
|
|
37
|
+
options,
|
|
38
|
+
mask,
|
|
39
|
+
customMask,
|
|
40
|
+
placeholder = 'Pesquisar',
|
|
41
|
+
onChangeSearchOption,
|
|
42
|
+
selectedSearchOption: initialSelectedSearchOption,
|
|
43
|
+
...props
|
|
44
|
+
}: SearchSelectorProps) {
|
|
45
|
+
const [selectedSearchOption, setSelectedSearchOption] = useState(
|
|
46
|
+
initialSelectedSearchOption
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
const selectedSearchLabel = useMemo(
|
|
50
|
+
() => options.find(option => option.value === selectedSearchOption)?.label,
|
|
51
|
+
[options, selectedSearchOption]
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<SearchInputRoot className="w-full" variant="action">
|
|
56
|
+
<SearchInputContent>
|
|
57
|
+
<SearchInputSlot>
|
|
58
|
+
<Icon className="text-icon-neutral-3" name="search" />
|
|
59
|
+
</SearchInputSlot>
|
|
60
|
+
{mask || customMask ? (
|
|
61
|
+
<SearchInputMask
|
|
62
|
+
customMask={customMask}
|
|
63
|
+
mask={mask}
|
|
64
|
+
placeholder={placeholder}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
) : (
|
|
68
|
+
<SearchInputText placeholder={placeholder} {...props} />
|
|
69
|
+
)}
|
|
70
|
+
</SearchInputContent>
|
|
71
|
+
|
|
72
|
+
<DropdownMenuRoot>
|
|
73
|
+
<DropdownMenuTrigger asChild={true}>
|
|
74
|
+
<SearchInputAction>
|
|
75
|
+
{selectedSearchLabel}
|
|
76
|
+
<Icon className="text-icon-neutral-3" name="keyboard_arrow_down" />
|
|
77
|
+
</SearchInputAction>
|
|
78
|
+
</DropdownMenuTrigger>
|
|
79
|
+
<DropdownMenuContent>
|
|
80
|
+
<DropdownMenuList>
|
|
81
|
+
{options.map(option => (
|
|
82
|
+
<DropdownMenuItem
|
|
83
|
+
isActive={selectedSearchOption === option.value}
|
|
84
|
+
key={option.value}
|
|
85
|
+
onClick={() => {
|
|
86
|
+
setSelectedSearchOption(option.value)
|
|
87
|
+
onChangeSearchOption?.(option.value)
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<DropdownMenuItemText>{option.label}</DropdownMenuItemText>
|
|
91
|
+
</DropdownMenuItem>
|
|
92
|
+
))}
|
|
93
|
+
</DropdownMenuList>
|
|
94
|
+
</DropdownMenuContent>
|
|
95
|
+
</DropdownMenuRoot>
|
|
96
|
+
</SearchInputRoot>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
@@ -29,7 +29,7 @@ export const select = tv({
|
|
|
29
29
|
'transition-all duration-200'
|
|
30
30
|
],
|
|
31
31
|
content: [
|
|
32
|
-
'group z-
|
|
32
|
+
'group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]'
|
|
33
33
|
],
|
|
34
34
|
icon: 'size-large text-icon-neutral-3 flex items-center justify-center',
|
|
35
35
|
slotText:
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './pessoa'
|
|
2
|
+
export * from './pessoa.context'
|
|
3
|
+
export * from './pessoa-add-button'
|
|
4
|
+
export * from './pessoa-body'
|
|
5
|
+
export * from './pessoa-content'
|
|
6
|
+
export * from './pessoa-footer'
|
|
7
|
+
export * from './pessoa-header'
|
|
8
|
+
export * from './pessoa-trigger'
|
|
9
|
+
export * from './pessoa-close-button'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { twMerge } from '@xjur-ui/util'
|
|
2
|
+
import { type ComponentProps, type MouseEvent, useCallback } from 'react'
|
|
3
|
+
import { Button } from '../../controls/button'
|
|
4
|
+
import { Icon } from '../../icon'
|
|
5
|
+
import { usePessoaContext } from './pessoa.context'
|
|
6
|
+
|
|
7
|
+
export function PessoaAddButton({
|
|
8
|
+
appearance = 'ghost',
|
|
9
|
+
onClick,
|
|
10
|
+
className,
|
|
11
|
+
children = 'Adicionar',
|
|
12
|
+
...props
|
|
13
|
+
}: ComponentProps<typeof Button>) {
|
|
14
|
+
const { changeCurrentView } = usePessoaContext()
|
|
15
|
+
|
|
16
|
+
const handleAddPessoaClick = useCallback(
|
|
17
|
+
(event: MouseEvent<HTMLButtonElement>) => {
|
|
18
|
+
changeCurrentView('form')
|
|
19
|
+
onClick?.(event)
|
|
20
|
+
},
|
|
21
|
+
[changeCurrentView, onClick]
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Button
|
|
26
|
+
appearance={appearance}
|
|
27
|
+
className={twMerge('w-fit', className)}
|
|
28
|
+
onClick={handleAddPessoaClick}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
<Icon name="add" />
|
|
33
|
+
</Button>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { twMerge } from '@xjur-ui/util'
|
|
2
|
+
import type { ComponentProps } from 'react'
|
|
3
|
+
import { SheetBody } from '../../sheet'
|
|
4
|
+
import { usePessoaContext } from './pessoa.context'
|
|
5
|
+
|
|
6
|
+
export function PessoaBody({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: ComponentProps<typeof SheetBody>) {
|
|
10
|
+
const { currentView } = usePessoaContext()
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<SheetBody
|
|
14
|
+
className={twMerge(
|
|
15
|
+
'gap-large-2x data-[view=form]:!px-none flex flex-col',
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
data-view={currentView}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react'
|
|
2
|
+
import { SheetClose } from '../../sheet'
|
|
3
|
+
import { Button } from '../../controls/button'
|
|
4
|
+
|
|
5
|
+
export function PessoaCloseButton({
|
|
6
|
+
...props
|
|
7
|
+
}: ComponentProps<typeof SheetClose>) {
|
|
8
|
+
return (
|
|
9
|
+
<SheetClose {...props} asChild={true}>
|
|
10
|
+
<Button appearance="ghost">Cancelar</Button>
|
|
11
|
+
</SheetClose>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { twMerge } from '@xjur-ui/util'
|
|
2
|
+
import type { ComponentProps } from 'react'
|
|
3
|
+
import { SheetContent } from '../../sheet'
|
|
4
|
+
import { usePessoaContext } from './pessoa.context'
|
|
5
|
+
|
|
6
|
+
export function PessoaContent({
|
|
7
|
+
className,
|
|
8
|
+
side = 'right',
|
|
9
|
+
...props
|
|
10
|
+
}: ComponentProps<typeof SheetContent>) {
|
|
11
|
+
const { currentView, isFullscreen } = usePessoaContext()
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<SheetContent
|
|
15
|
+
className={twMerge(
|
|
16
|
+
'min-w-[900px] data-[fullscreen=true]:min-w-full',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
data-fullscreen={isFullscreen}
|
|
20
|
+
data-view={currentView}
|
|
21
|
+
side={side}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { twMerge } from '@xjur-ui/util'
|
|
2
|
+
import type { ComponentProps } from 'react'
|
|
3
|
+
import { SheetFooter } from '../../sheet'
|
|
4
|
+
|
|
5
|
+
export function PessoaFooter({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: ComponentProps<typeof SheetFooter>) {
|
|
9
|
+
return (
|
|
10
|
+
<SheetFooter
|
|
11
|
+
className={twMerge('flex items-center justify-between', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react'
|
|
2
|
+
import { twMerge } from '@xjur-ui/util'
|
|
3
|
+
import { SheetHeader, SheetTitle, SheetClose } from '../../sheet'
|
|
4
|
+
import { Button } from '../../controls/button'
|
|
5
|
+
import { Icon } from '../../icon'
|
|
6
|
+
import { usePessoaContext } from './pessoa.context'
|
|
7
|
+
|
|
8
|
+
export function PessoaHeader({
|
|
9
|
+
title,
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: ComponentProps<typeof SheetHeader> & { title: string }) {
|
|
13
|
+
const { changeIsFullscreen } = usePessoaContext()
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<SheetHeader
|
|
17
|
+
className={twMerge('flex items-center justify-between', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<SheetTitle>{title}</SheetTitle>
|
|
21
|
+
|
|
22
|
+
<div className="gap-small flex items-center">
|
|
23
|
+
<Button
|
|
24
|
+
appearance="ghost"
|
|
25
|
+
size="icon_md"
|
|
26
|
+
variant="tertiary"
|
|
27
|
+
onClick={() => changeIsFullscreen()}
|
|
28
|
+
>
|
|
29
|
+
<Icon className="text-icon-neutral-3" name="expand_content" />
|
|
30
|
+
</Button>
|
|
31
|
+
<SheetClose />
|
|
32
|
+
</div>
|
|
33
|
+
</SheetHeader>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react'
|
|
2
|
+
import { Button } from '../../controls/button'
|
|
3
|
+
import { SheetTrigger } from '../../sheet'
|
|
4
|
+
import { Icon } from '../../icon'
|
|
5
|
+
|
|
6
|
+
export function PessoaTrigger({
|
|
7
|
+
children = (
|
|
8
|
+
<Button
|
|
9
|
+
appearance="ghost"
|
|
10
|
+
className="border-border-layer-2 border"
|
|
11
|
+
variant="secondary"
|
|
12
|
+
>
|
|
13
|
+
<Icon className="text-icon-neutral-3" name="add" />
|
|
14
|
+
Adicionar
|
|
15
|
+
</Button>
|
|
16
|
+
),
|
|
17
|
+
asChild = true,
|
|
18
|
+
...props
|
|
19
|
+
}: ComponentProps<typeof SheetTrigger>) {
|
|
20
|
+
return (
|
|
21
|
+
<SheetTrigger asChild={asChild} {...props}>
|
|
22
|
+
{children}
|
|
23
|
+
</SheetTrigger>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createContext,
|
|
3
|
+
useCallback,
|
|
4
|
+
useContext,
|
|
5
|
+
useState,
|
|
6
|
+
useMemo
|
|
7
|
+
} from 'react'
|
|
8
|
+
|
|
9
|
+
export interface PessoaContextValue {
|
|
10
|
+
currentView: 'list' | 'form'
|
|
11
|
+
isFullscreen: boolean
|
|
12
|
+
pessoas: unknown[]
|
|
13
|
+
changeCurrentView: (view: PessoaContextValue['currentView']) => void
|
|
14
|
+
changeIsFullscreen: () => void
|
|
15
|
+
setPessoas: React.Dispatch<React.SetStateAction<unknown[]>>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const PessoaContext = createContext<PessoaContextValue>(
|
|
19
|
+
{} as PessoaContextValue
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
export function PessoaProvider({ children }: { children: React.ReactNode }) {
|
|
23
|
+
const [currentView, setCurrentView] = useState<'list' | 'form'>('list')
|
|
24
|
+
const [isFullscreen, setIsFullscreen] = useState(false)
|
|
25
|
+
const [pessoas, setPessoas] = useState<unknown[]>([])
|
|
26
|
+
|
|
27
|
+
const changeCurrentView = useCallback((view: 'list' | 'form') => {
|
|
28
|
+
setCurrentView(view)
|
|
29
|
+
}, [])
|
|
30
|
+
|
|
31
|
+
const changeIsFullscreen = useCallback(() => {
|
|
32
|
+
setIsFullscreen(state => !state)
|
|
33
|
+
}, [])
|
|
34
|
+
|
|
35
|
+
const providerValue = useMemo(
|
|
36
|
+
() => ({
|
|
37
|
+
currentView,
|
|
38
|
+
changeCurrentView,
|
|
39
|
+
isFullscreen,
|
|
40
|
+
changeIsFullscreen,
|
|
41
|
+
pessoas,
|
|
42
|
+
setPessoas
|
|
43
|
+
}),
|
|
44
|
+
[
|
|
45
|
+
currentView,
|
|
46
|
+
changeCurrentView,
|
|
47
|
+
isFullscreen,
|
|
48
|
+
changeIsFullscreen,
|
|
49
|
+
pessoas,
|
|
50
|
+
setPessoas
|
|
51
|
+
]
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<PessoaContext.Provider value={providerValue}>
|
|
56
|
+
{children}
|
|
57
|
+
</PessoaContext.Provider>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function usePessoaContext<T = unknown>() {
|
|
62
|
+
const context = useContext(PessoaContext)
|
|
63
|
+
|
|
64
|
+
if (!context) {
|
|
65
|
+
throw new Error('usePessoaContext must be used within a PessoaProvider')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
...context,
|
|
70
|
+
pessoas: context.pessoas as T[],
|
|
71
|
+
setPessoas: context.setPessoas as React.Dispatch<React.SetStateAction<T[]>>
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react'
|
|
2
|
+
import { SheetRoot } from '../../sheet'
|
|
3
|
+
import {
|
|
4
|
+
PessoaProvider,
|
|
5
|
+
PessoaContext,
|
|
6
|
+
type PessoaContextValue
|
|
7
|
+
} from './pessoa.context'
|
|
8
|
+
|
|
9
|
+
export function PessoaRoot({
|
|
10
|
+
onOpenChange,
|
|
11
|
+
children,
|
|
12
|
+
...props
|
|
13
|
+
}: Omit<ComponentProps<typeof SheetRoot>, 'children'> & {
|
|
14
|
+
children: React.ReactNode | ((context: PessoaContextValue) => React.ReactNode)
|
|
15
|
+
}) {
|
|
16
|
+
return (
|
|
17
|
+
<PessoaProvider>
|
|
18
|
+
<PessoaContext.Consumer>
|
|
19
|
+
{pessoaContext => (
|
|
20
|
+
<SheetRoot
|
|
21
|
+
onOpenChange={open => {
|
|
22
|
+
pessoaContext.changeCurrentView('list')
|
|
23
|
+
onOpenChange?.(open)
|
|
24
|
+
}}
|
|
25
|
+
{...props}
|
|
26
|
+
>
|
|
27
|
+
{typeof children === 'function'
|
|
28
|
+
? children(pessoaContext)
|
|
29
|
+
: children}
|
|
30
|
+
</SheetRoot>
|
|
31
|
+
)}
|
|
32
|
+
</PessoaContext.Consumer>
|
|
33
|
+
</PessoaProvider>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
|
2
2
|
import { cva, cx, type ClassVariantProps } from '@xjur-ui/util'
|
|
3
3
|
import { forwardRef, type ComponentProps } from 'react'
|
|
4
|
-
import { Button } from './
|
|
4
|
+
import { Button } from './controls/button'
|
|
5
5
|
import { Typography } from './typography'
|
|
6
6
|
import { Icon } from './icon'
|
|
7
7
|
|
|
@@ -49,7 +49,7 @@ export function DropdownMenuContent({
|
|
|
49
49
|
<DropdownMenuPrimitive.Content
|
|
50
50
|
align={align}
|
|
51
51
|
className={cx(
|
|
52
|
-
'group z-
|
|
52
|
+
'group z-1000 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-trigger-width)] min-w-[var(--radix-popover-trigger-width)]',
|
|
53
53
|
className
|
|
54
54
|
)}
|
|
55
55
|
data-slot="dropdown-menu-content"
|
|
@@ -3,7 +3,7 @@ import { useDroppable } from '@dnd-kit/core'
|
|
|
3
3
|
import { cx, tv } from '@xjur-ui/util'
|
|
4
4
|
import { isPast } from 'date-fns'
|
|
5
5
|
import { Typography } from '../typography'
|
|
6
|
-
import { Button } from '../
|
|
6
|
+
import { Button } from '../controls/button'
|
|
7
7
|
import { Icon } from '../icon'
|
|
8
8
|
import { isToday } from './helpers/calendar'
|
|
9
9
|
import { useFullCalendar } from './calendar-root'
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { ptBR } from 'date-fns/locale'
|
|
13
13
|
import { capitalize } from '@xjur-ui/util'
|
|
14
14
|
import { Typography } from '../typography'
|
|
15
|
-
import { Button } from '../
|
|
15
|
+
import { Button } from '../controls/button'
|
|
16
16
|
import { Icon } from '../icon'
|
|
17
17
|
import { useFullCalendar } from './calendar-root'
|
|
18
18
|
import { getStartAndEndDateOfWeek } from './helpers/calendar'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react'
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
3
3
|
import { cx } from '@xjur-ui/util'
|
|
4
|
-
import { Button } from './
|
|
4
|
+
import { Button } from './controls/button'
|
|
5
5
|
import { Icon } from './icon'
|
|
6
6
|
|
|
7
7
|
export interface HorizontalScrollProps extends ComponentProps<'div'> {
|