@xjur-ui/react 2.0.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 +409 -119
- package/CHANGELOG.md +76 -0
- package/dist/chunk-2JQVYVAT.js +2 -0
- 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/{components/switch.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-4BGTC333.js +2 -0
- package/dist/chunk-4BGTC333.js.map +1 -0
- package/dist/chunk-4PTFZTVU.js +2 -0
- package/dist/chunk-4PTFZTVU.js.map +1 -0
- package/dist/chunk-6PHXO2YA.js +2 -0
- package/dist/{chunk-RWMV7APX.js.map → chunk-6PHXO2YA.js.map} +1 -1
- package/dist/chunk-7HG6Y3VV.js +2 -0
- package/dist/chunk-7HG6Y3VV.js.map +1 -0
- 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-ASZAHSU5.js +2 -0
- package/dist/chunk-ASZAHSU5.js.map +1 -0
- package/dist/chunk-BZDGWC5O.js +2 -0
- package/dist/chunk-BZDGWC5O.js.map +1 -0
- package/dist/chunk-DFXHNK5D.js +2 -0
- package/dist/chunk-DFXHNK5D.js.map +1 -0
- package/dist/chunk-DOC3XTYC.js +2 -0
- package/dist/chunk-DOC3XTYC.js.map +1 -0
- package/dist/chunk-DT44JTXB.js +2 -0
- package/dist/chunk-DT44JTXB.js.map +1 -0
- 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-EXC2XOL6.js +2 -0
- package/dist/chunk-EXC2XOL6.js.map +1 -0
- package/dist/chunk-F4DYKYWJ.js +2 -0
- package/dist/chunk-F4DYKYWJ.js.map +1 -0
- package/dist/chunk-F5ZLEQGN.js +2 -0
- package/dist/chunk-F5ZLEQGN.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-G6NSC3FL.js +2 -0
- package/dist/chunk-G6NSC3FL.js.map +1 -0
- package/dist/chunk-GKILN5HI.js +2 -0
- 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-J4X5RQTR.js +2 -0
- package/dist/chunk-J4X5RQTR.js.map +1 -0
- package/dist/chunk-JF7JKJES.js +2 -0
- package/dist/chunk-JF7JKJES.js.map +1 -0
- package/dist/chunk-JGPHBUVM.js +2 -0
- package/dist/chunk-JGPHBUVM.js.map +1 -0
- package/dist/{chunk-FASEHVMD.js → chunk-M6ZI7M3R.js} +2 -2
- package/dist/chunk-M6ZI7M3R.js.map +1 -0
- package/dist/chunk-MQ7YTZBI.js +2 -0
- package/dist/chunk-MQ7YTZBI.js.map +1 -0
- package/dist/chunk-MZSV4LNY.js +2 -0
- package/dist/chunk-MZSV4LNY.js.map +1 -0
- package/dist/chunk-O3JK6QF6.js +2 -0
- package/dist/chunk-O3JK6QF6.js.map +1 -0
- package/dist/chunk-OKSGVAQQ.js +2 -0
- 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-RGKXZJJS.js +3 -0
- package/dist/chunk-RGKXZJJS.js.map +1 -0
- package/dist/chunk-SLAAEXWI.js +2 -0
- package/dist/chunk-SLAAEXWI.js.map +1 -0
- package/dist/chunk-SSTXFHNX.js +2 -0
- package/dist/chunk-SSTXFHNX.js.map +1 -0
- package/dist/chunk-SXGSWVMZ.js +2 -0
- package/dist/chunk-SXGSWVMZ.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-WEBAXQID.js +2 -0
- package/dist/chunk-WEBAXQID.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/chunk-ZVVPUP7V.js +2 -0
- package/dist/chunk-ZVVPUP7V.js.map +1 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.js +2 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/chip.d.ts +2 -1
- package/dist/components/chip.js +1 -1
- package/dist/components/controls/button.js +2 -0
- package/dist/components/controls/calendar.js +2 -0
- package/dist/components/controls/calendar.js.map +1 -0
- package/dist/components/controls/checkbox.js +2 -0
- package/dist/components/controls/checkbox.js.map +1 -0
- package/dist/components/controls/context/field.context.d.ts +14 -0
- package/dist/components/controls/context/field.context.js +2 -0
- package/dist/components/controls/context/field.context.js.map +1 -0
- package/dist/components/controls/date-picker.d.ts +85 -0
- package/dist/components/controls/date-picker.js +2 -0
- package/dist/components/controls/date-picker.js.map +1 -0
- package/dist/components/controls/floating-label.d.ts +6 -0
- package/dist/components/controls/floating-label.js +2 -0
- package/dist/components/controls/floating-label.js.map +1 -0
- package/dist/components/controls/input.d.ts +96 -0
- package/dist/components/controls/input.js +2 -0
- package/dist/components/controls/input.js.map +1 -0
- package/dist/components/controls/otp-input.js.map +1 -0
- package/dist/components/controls/radio.js +2 -0
- package/dist/components/controls/radio.js.map +1 -0
- package/dist/components/controls/rich-editor.js +2 -0
- package/dist/components/controls/rich-editor.js.map +1 -0
- package/dist/components/{search-input.d.ts → controls/search-input.d.ts} +9 -1
- package/dist/components/controls/search-input.js +2 -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/controls/select.d.ts +95 -0
- package/dist/components/controls/select.js +2 -0
- package/dist/components/controls/select.js.map +1 -0
- package/dist/components/controls/switch.js +2 -0
- package/dist/components/controls/switch.js.map +1 -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.d.ts +51 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drag-and-drop/drag-handle.d.ts +15 -0
- package/dist/components/drag-and-drop/drag-handle.js +2 -0
- package/dist/components/drag-and-drop/drag-handle.js.map +1 -0
- package/dist/components/drag-and-drop/drag-list-item.d.ts +14 -0
- package/dist/components/drag-and-drop/drag-list-item.js +2 -0
- package/dist/components/drag-and-drop/drag-list-item.js.map +1 -0
- package/dist/components/drag-and-drop/drag-list.d.ts +14 -0
- package/dist/components/drag-and-drop/drag-list.js +2 -0
- package/dist/components/drag-and-drop/drag-list.js.map +1 -0
- package/dist/components/drag-and-drop/drag-root.d.ts +6 -0
- package/dist/components/drag-and-drop/drag-root.js +2 -0
- package/dist/components/drag-and-drop/drag-root.js.map +1 -0
- package/dist/components/drag-and-drop/index.d.ts +10 -0
- package/dist/components/drag-and-drop/index.js +2 -0
- package/dist/components/drag-and-drop/index.js.map +1 -0
- package/dist/components/drag-and-drop/types/drag-item.d.ts +9 -0
- package/dist/components/drag-and-drop/types/drag-item.js +2 -0
- package/dist/components/drag-and-drop/types/drag-item.js.map +1 -0
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/full-calendar/calendar-add-event.d.ts +9 -0
- package/dist/components/full-calendar/calendar-add-event.js +2 -0
- package/dist/components/full-calendar/calendar-add-event.js.map +1 -0
- package/dist/components/full-calendar/calendar-body.d.ts +6 -0
- package/dist/components/full-calendar/calendar-body.js +2 -0
- package/dist/components/full-calendar/calendar-body.js.map +1 -0
- package/dist/components/full-calendar/calendar-cell.d.ts +11 -0
- package/dist/components/full-calendar/calendar-cell.js +2 -0
- package/dist/components/full-calendar/calendar-cell.js.map +1 -0
- package/dist/components/full-calendar/calendar-day-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-day-view.js +2 -0
- package/dist/components/full-calendar/calendar-day-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-event.d.ts +18 -0
- package/dist/components/full-calendar/calendar-event.js +2 -0
- package/dist/components/full-calendar/calendar-event.js.map +1 -0
- package/dist/components/full-calendar/calendar-header.d.ts +6 -0
- package/dist/components/full-calendar/calendar-header.js +2 -0
- package/dist/components/full-calendar/calendar-header.js.map +1 -0
- package/dist/components/full-calendar/calendar-month-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-month-view.js +2 -0
- package/dist/components/full-calendar/calendar-month-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.d.ts +9 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.js +2 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.js.map +1 -0
- package/dist/components/full-calendar/calendar-navigator.d.ts +5 -0
- package/dist/components/full-calendar/calendar-navigator.js +2 -0
- package/dist/components/full-calendar/calendar-navigator.js.map +1 -0
- package/dist/components/full-calendar/calendar-root.d.ts +30 -0
- package/dist/components/full-calendar/calendar-root.js +2 -0
- package/dist/components/full-calendar/calendar-root.js.map +1 -0
- package/dist/components/full-calendar/calendar-today-button.d.ts +9 -0
- package/dist/components/full-calendar/calendar-today-button.js +2 -0
- package/dist/components/full-calendar/calendar-today-button.js.map +1 -0
- package/dist/components/full-calendar/calendar-toggle-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-toggle-view.js +2 -0
- package/dist/components/full-calendar/calendar-toggle-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-view-renderer.d.ts +5 -0
- package/dist/components/full-calendar/calendar-view-renderer.js +2 -0
- package/dist/components/full-calendar/calendar-view-renderer.js.map +1 -0
- package/dist/components/full-calendar/calendar-week-day.d.ts +10 -0
- package/dist/components/full-calendar/calendar-week-day.js +2 -0
- package/dist/components/full-calendar/calendar-week-day.js.map +1 -0
- package/dist/components/full-calendar/calendar-week-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-week-view.js +2 -0
- package/dist/components/full-calendar/calendar-week-view.js.map +1 -0
- package/dist/components/full-calendar/helpers/calendar.d.ts +25 -0
- package/dist/components/full-calendar/helpers/calendar.js +2 -0
- package/dist/components/full-calendar/helpers/calendar.js.map +1 -0
- package/dist/components/full-calendar/index.d.ts +18 -0
- package/dist/components/full-calendar/index.js +2 -0
- package/dist/components/full-calendar/index.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-cell.d.ts +6 -0
- package/dist/components/full-calendar/types/calendar-cell.js +2 -0
- package/dist/components/full-calendar/types/calendar-cell.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-event.d.ts +8 -0
- package/dist/components/full-calendar/types/calendar-event.js +2 -0
- package/dist/components/full-calendar/types/calendar-event.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-view.d.ts +3 -0
- package/dist/components/full-calendar/types/calendar-view.js +2 -0
- package/dist/components/full-calendar/types/calendar-view.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-week-hour.d.ts +6 -0
- package/dist/components/full-calendar/types/calendar-week-hour.js +2 -0
- package/dist/components/full-calendar/types/calendar-week-hour.js.map +1 -0
- package/dist/components/horizontal-scroll.d.ts +11 -0
- package/dist/components/horizontal-scroll.js +2 -0
- package/dist/components/horizontal-scroll.js.map +1 -0
- package/dist/components/icon.d.ts +3 -4
- package/dist/components/icon.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/selection-bar.d.ts +57 -0
- package/dist/components/selection-bar.js +2 -0
- package/dist/components/selection-bar.js.map +1 -0
- package/dist/components/sheet.d.ts +8 -8
- 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 +2 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/upload.d.ts +74 -0
- package/dist/components/upload.js +2 -0
- package/dist/components/upload.js.map +1 -0
- 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 +26 -14
- package/src/components/breadcrumb.tsx +119 -0
- package/src/components/{calendar.tsx → controls/calendar.tsx} +1 -1
- package/src/components/{checkbox.tsx → controls/checkbox.tsx} +2 -2
- package/src/components/controls/context/field.context.ts +27 -0
- package/src/components/controls/date-picker.tsx +199 -0
- package/src/components/controls/floating-label.tsx +60 -0
- package/src/components/controls/input.tsx +237 -0
- package/src/components/{radio.tsx → controls/radio.tsx} +1 -1
- package/src/components/{rich-editor.tsx → controls/rich-editor.tsx} +5 -5
- package/src/components/{search-input.tsx → controls/search-input.tsx} +46 -3
- package/src/components/controls/search-selector.tsx +98 -0
- package/src/components/controls/select.tsx +274 -0
- 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 +242 -0
- package/src/components/drag-and-drop/drag-handle.tsx +46 -0
- package/src/components/drag-and-drop/drag-list-item.tsx +91 -0
- package/src/components/drag-and-drop/drag-list.tsx +47 -0
- package/src/components/drag-and-drop/drag-root.tsx +30 -0
- package/src/components/drag-and-drop/index.ts +39 -0
- package/src/components/drag-and-drop/types/drag-item.ts +7 -0
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/full-calendar/calendar-add-event.tsx +15 -0
- package/src/components/full-calendar/calendar-body.tsx +12 -0
- package/src/components/full-calendar/calendar-cell.tsx +120 -0
- package/src/components/full-calendar/calendar-day-view.tsx +76 -0
- package/src/components/full-calendar/calendar-event.tsx +178 -0
- package/src/components/full-calendar/calendar-header.tsx +14 -0
- package/src/components/full-calendar/calendar-month-view.tsx +69 -0
- package/src/components/full-calendar/calendar-more-events-dropdown.tsx +39 -0
- package/src/components/full-calendar/calendar-navigator.tsx +86 -0
- package/src/components/full-calendar/calendar-root.tsx +165 -0
- package/src/components/full-calendar/calendar-today-button.tsx +21 -0
- package/src/components/full-calendar/calendar-toggle-view.tsx +61 -0
- package/src/components/full-calendar/calendar-view-renderer.tsx +19 -0
- package/src/components/full-calendar/calendar-week-day.tsx +49 -0
- package/src/components/full-calendar/calendar-week-view.tsx +88 -0
- package/src/components/full-calendar/helpers/calendar.ts +158 -0
- package/src/components/full-calendar/index.ts +16 -0
- package/src/components/full-calendar/types/calendar-cell.ts +4 -0
- package/src/components/full-calendar/types/calendar-event.ts +7 -0
- package/src/components/full-calendar/types/calendar-view.ts +1 -0
- package/src/components/full-calendar/types/calendar-week-hour.ts +4 -0
- package/src/components/horizontal-scroll.tsx +159 -0
- package/src/components/list.tsx +1 -1
- package/src/components/selection-bar.tsx +273 -0
- package/src/components/sheet.tsx +26 -17
- 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 +647 -0
- package/src/resources/icons.ts +5 -1
- package/dist/chunk-FASEHVMD.js.map +0 -1
- package/dist/chunk-KIFR5VIE.js +0 -2
- package/dist/chunk-NPTLORW5.js +0 -2
- package/dist/chunk-NPTLORW5.js.map +0 -1
- package/dist/chunk-RWMV7APX.js +0 -2
- package/dist/chunk-SHHXKVVR.js +0 -2
- package/dist/chunk-SHHXKVVR.js.map +0 -1
- package/dist/components/button.js +0 -2
- package/dist/components/calendar.js +0 -2
- package/dist/components/calendar.js.map +0 -1
- package/dist/components/checkbox.js +0 -2
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/date-picker.d.ts +0 -25
- package/dist/components/date-picker.js +0 -2
- package/dist/components/date-picker.js.map +0 -1
- package/dist/components/input.d.ts +0 -37
- package/dist/components/input.js +0 -2
- package/dist/components/input.js.map +0 -1
- package/dist/components/otp-input.js.map +0 -1
- package/dist/components/radio.js +0 -2
- package/dist/components/radio.js.map +0 -1
- package/dist/components/rich-editor.js +0 -2
- package/dist/components/rich-editor.js.map +0 -1
- package/dist/components/search-input.js +0 -2
- package/dist/components/select.d.ts +0 -36
- package/dist/components/select.js +0 -2
- package/dist/components/select.js.map +0 -1
- package/dist/components/switch.js.map +0 -1
- package/dist/components/table.d.ts +0 -17
- package/dist/components/table.js +0 -2
- package/dist/components/table.js.map +0 -1
- package/src/components/date-picker.tsx +0 -263
- package/src/components/input.tsx +0 -320
- package/src/components/select.tsx +0 -318
- package/src/components/table.tsx +0 -160
- /package/dist/components/{button.d.ts → controls/button.d.ts} +0 -0
- /package/dist/components/{button.js.map → controls/button.js.map} +0 -0
- /package/dist/components/{calendar.d.ts → controls/calendar.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → controls/checkbox.d.ts} +0 -0
- /package/dist/components/{otp-input.d.ts → controls/otp-input.d.ts} +0 -0
- /package/dist/components/{otp-input.js → controls/otp-input.js} +0 -0
- /package/dist/components/{radio.d.ts → controls/radio.d.ts} +0 -0
- /package/dist/components/{rich-editor.d.ts → controls/rich-editor.d.ts} +0 -0
- /package/dist/components/{search-input.js.map → controls/search-input.js.map} +0 -0
- /package/dist/components/{switch.d.ts → controls/switch.d.ts} +0 -0
- /package/src/components/{button.tsx → controls/button.tsx} +0 -0
- /package/src/components/{otp-input.tsx → controls/otp-input.tsx} +0 -0
- /package/src/components/{switch.tsx → controls/switch.tsx} +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { tv, twMerge } from '@xjur-ui/util'
|
|
2
|
+
import type { ComponentProps } from 'react'
|
|
3
|
+
import { InputMask as InputMaskComponent } from '@react-input/mask'
|
|
4
|
+
import {
|
|
5
|
+
InputNumberFormat,
|
|
6
|
+
type InputNumberFormatProps
|
|
7
|
+
} from '@react-input/number-format'
|
|
8
|
+
import { Icon, type IconType } from '../icon'
|
|
9
|
+
import { inputMask } from '../../resources/input-mask'
|
|
10
|
+
import { Divider } from '../divider'
|
|
11
|
+
import {
|
|
12
|
+
type FieldContextValue,
|
|
13
|
+
FieldContext,
|
|
14
|
+
useFieldContext
|
|
15
|
+
} from './context/field.context'
|
|
16
|
+
import { FloatingLabel } from './floating-label'
|
|
17
|
+
|
|
18
|
+
export const input = tv({
|
|
19
|
+
slots: {
|
|
20
|
+
wrapper: 'group flex w-full flex-col gap-small-2x',
|
|
21
|
+
trigger: [
|
|
22
|
+
'h-large-4x w-full relative',
|
|
23
|
+
'flex items-center gap-small rounded-small-1x',
|
|
24
|
+
'py-small_1x-alt px-small',
|
|
25
|
+
'bg-layer-2-hover border border-transparent',
|
|
26
|
+
'group-has-[div[data-slot=input-action-slot]]:rounded-r-none',
|
|
27
|
+
'transition-all duration-200'
|
|
28
|
+
],
|
|
29
|
+
content: 'flex w-full',
|
|
30
|
+
value:
|
|
31
|
+
'text-size-body-md font-normal placeholder:text-neutral-placeholder flex-1 outline-none',
|
|
32
|
+
icon: 'size-large text-icon-neutral-3 flex items-center justify-center',
|
|
33
|
+
slotText:
|
|
34
|
+
'size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder',
|
|
35
|
+
caption: '!text-size-body-sm font-normal',
|
|
36
|
+
action: 'h-large-4x overflow-hidden'
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
state: {
|
|
40
|
+
normal: {
|
|
41
|
+
trigger:
|
|
42
|
+
'hover:border-border-layer-1 focus-within:border-primary-idle focus-within:hover:border-primary-idle'
|
|
43
|
+
},
|
|
44
|
+
error: {
|
|
45
|
+
trigger:
|
|
46
|
+
'border-danger-idle hover:border-danger-idle focus-within:border-danger-idle focus-within:hover:border-danger-idle',
|
|
47
|
+
caption: 'text-danger-label-idle'
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
trigger: 'pointer-events-none border-transparent bg-layer-2-idle'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const { wrapper, trigger, content, value, icon, caption, action, slotText } =
|
|
57
|
+
input()
|
|
58
|
+
|
|
59
|
+
export function InputRoot({
|
|
60
|
+
className,
|
|
61
|
+
state = 'normal',
|
|
62
|
+
customMask,
|
|
63
|
+
variant = 'normal',
|
|
64
|
+
mask,
|
|
65
|
+
...props
|
|
66
|
+
}: ComponentProps<'div'> & FieldContextValue) {
|
|
67
|
+
return (
|
|
68
|
+
<FieldContext.Provider value={{ state, customMask, mask, variant }}>
|
|
69
|
+
<div className={wrapper({ className, state })} {...props} />
|
|
70
|
+
</FieldContext.Provider>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function InputContent({ className, ...props }: ComponentProps<'div'>) {
|
|
75
|
+
const { state } = useFieldContext()
|
|
76
|
+
return <div className={content({ className, state })} {...props} />
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function InputLabel(props: ComponentProps<typeof FloatingLabel>) {
|
|
80
|
+
return <FloatingLabel {...props} />
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function InputTrigger({ className, ...props }: ComponentProps<'div'>) {
|
|
84
|
+
const { state, variant } = useFieldContext()
|
|
85
|
+
|
|
86
|
+
const filterTrigger = tv({
|
|
87
|
+
base: ['group bg-layer-2-idle relative'],
|
|
88
|
+
variants: {
|
|
89
|
+
state: {
|
|
90
|
+
normal: [
|
|
91
|
+
'border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle'
|
|
92
|
+
],
|
|
93
|
+
error: ['border-danger-idle hover:border-danger-idle'],
|
|
94
|
+
disabled: ['border border-border-layer-2 opacity-60']
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
const mergedClassName = twMerge(
|
|
100
|
+
trigger({ state, className }),
|
|
101
|
+
variant === 'filter' && filterTrigger({ state, className })
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<div
|
|
106
|
+
aria-disabled={state === 'disabled'}
|
|
107
|
+
className={mergedClassName}
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function InputMask({
|
|
114
|
+
className,
|
|
115
|
+
placeholder,
|
|
116
|
+
...props
|
|
117
|
+
}: ComponentProps<'input'>) {
|
|
118
|
+
const { customMask, state, mask, variant } = useFieldContext()
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<InputMaskComponent
|
|
122
|
+
{...props}
|
|
123
|
+
{...(mask ? { ...inputMask(mask) } : customMask && { ...customMask })}
|
|
124
|
+
className={value({ className, state })}
|
|
125
|
+
disabled={state === 'disabled'}
|
|
126
|
+
placeholder={variant === 'filter' ? ' ' : placeholder}
|
|
127
|
+
readOnly={state === 'disabled'}
|
|
128
|
+
/>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function InputText({
|
|
133
|
+
className,
|
|
134
|
+
placeholder,
|
|
135
|
+
...props
|
|
136
|
+
}: ComponentProps<'input'>) {
|
|
137
|
+
const { state, variant } = useFieldContext()
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<input
|
|
141
|
+
{...props}
|
|
142
|
+
className={value({ className, state })}
|
|
143
|
+
disabled={state === 'disabled'}
|
|
144
|
+
placeholder={variant === 'filter' ? ' ' : placeholder}
|
|
145
|
+
readOnly={state === 'disabled'}
|
|
146
|
+
/>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function InputNumber({
|
|
151
|
+
className,
|
|
152
|
+
locales = 'pt-BR',
|
|
153
|
+
placeholder,
|
|
154
|
+
groupDisplay = false,
|
|
155
|
+
...props
|
|
156
|
+
}: InputNumberFormatProps) {
|
|
157
|
+
const { state, variant } = useFieldContext()
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<InputNumberFormat
|
|
161
|
+
{...props}
|
|
162
|
+
className={value({ className, state })}
|
|
163
|
+
disabled={state === 'disabled'}
|
|
164
|
+
groupDisplay={groupDisplay}
|
|
165
|
+
locales={locales}
|
|
166
|
+
placeholder={variant === 'filter' ? ' ' : placeholder}
|
|
167
|
+
readOnly={state === 'disabled'}
|
|
168
|
+
/>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function InputIcon({
|
|
173
|
+
className,
|
|
174
|
+
name,
|
|
175
|
+
...props
|
|
176
|
+
}: ComponentProps<'div'> & {
|
|
177
|
+
name: IconType
|
|
178
|
+
}) {
|
|
179
|
+
const { state } = useFieldContext()
|
|
180
|
+
|
|
181
|
+
return (
|
|
182
|
+
<div className={icon({ className, state })} {...props}>
|
|
183
|
+
<Icon name={name} />
|
|
184
|
+
</div>
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function InputSlot({ className, ...props }: ComponentProps<'span'>) {
|
|
189
|
+
const { state } = useFieldContext()
|
|
190
|
+
return <span className={slotText({ className, state })} {...props} />
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function InputCaption({ className, ...props }: ComponentProps<'p'>) {
|
|
194
|
+
const { state } = useFieldContext()
|
|
195
|
+
return <p className={caption({ className, state })} {...props} />
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function InputAction({ className, ...props }: ComponentProps<'div'>) {
|
|
199
|
+
const { state } = useFieldContext()
|
|
200
|
+
return (
|
|
201
|
+
<div
|
|
202
|
+
className={action({ className, state })}
|
|
203
|
+
data-slot="input-action-slot"
|
|
204
|
+
{...props}
|
|
205
|
+
/>
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function InputNumericStepper({
|
|
210
|
+
handleIncrement,
|
|
211
|
+
handleDecrement
|
|
212
|
+
}: {
|
|
213
|
+
handleIncrement: () => void
|
|
214
|
+
handleDecrement: () => void
|
|
215
|
+
}) {
|
|
216
|
+
return (
|
|
217
|
+
<InputAction className="w-large-4x border-border-layer-2 rounded-r-small-1x bg-layer-2-hover flex flex-col items-center justify-center border">
|
|
218
|
+
<button
|
|
219
|
+
className="flex h-1/2 items-center justify-center"
|
|
220
|
+
type="button"
|
|
221
|
+
onClick={handleIncrement}
|
|
222
|
+
>
|
|
223
|
+
<Icon className="text-icon-neutral-3" name="keyboard_arrow_up" />
|
|
224
|
+
</button>
|
|
225
|
+
|
|
226
|
+
<Divider />
|
|
227
|
+
|
|
228
|
+
<button
|
|
229
|
+
className="flex h-1/2 items-center justify-center"
|
|
230
|
+
type="button"
|
|
231
|
+
onClick={handleDecrement}
|
|
232
|
+
>
|
|
233
|
+
<Icon className="text-icon-neutral-3" name="keyboard_arrow_down" />
|
|
234
|
+
</button>
|
|
235
|
+
</InputAction>
|
|
236
|
+
)
|
|
237
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'
|
|
3
3
|
import { cx } from '@xjur-ui/util'
|
|
4
|
-
import { Typography } from '
|
|
4
|
+
import { Typography } from '../typography'
|
|
5
5
|
|
|
6
6
|
export function RadioGroup({
|
|
7
7
|
className,
|
|
@@ -13,8 +13,8 @@ import { StarterKit } from '@tiptap/starter-kit'
|
|
|
13
13
|
import { Heading, type Level } from '@tiptap/extension-heading'
|
|
14
14
|
// Import specific extension instead of full extensions bundle
|
|
15
15
|
import { Placeholder } from '@tiptap/extension-placeholder'
|
|
16
|
-
import { useOS } from '
|
|
17
|
-
import { Icon, type IconType } from '
|
|
16
|
+
import { useOS } from '../../hooks'
|
|
17
|
+
import { Icon, type IconType } from '../icon'
|
|
18
18
|
import { Button, type ButtonProps } from './button'
|
|
19
19
|
import {
|
|
20
20
|
DropdownMenuContent,
|
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
DropdownMenuList,
|
|
24
24
|
DropdownMenuRoot,
|
|
25
25
|
DropdownMenuTrigger
|
|
26
|
-
} from '
|
|
27
|
-
import { Tooltip, TooltipTrigger, TooltipContent } from '
|
|
28
|
-
import { Typography } from '
|
|
26
|
+
} from '../dropdown-menu'
|
|
27
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from '../tooltip'
|
|
28
|
+
import { Typography } from '../typography'
|
|
29
29
|
|
|
30
30
|
const headingClasses: Partial<Record<Level, string>> = {
|
|
31
31
|
1: 'text-size-body-md',
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { cva, cx } from '@xjur-ui/util'
|
|
2
2
|
import { createContext, type ComponentProps } from 'react'
|
|
3
|
-
import {
|
|
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'
|
|
11
|
+
import { Typography } from '../typography'
|
|
12
|
+
import { inputMask, type InputMaskType } from '../../resources/input-mask'
|
|
4
13
|
import { Button, type ButtonProps } from './button'
|
|
5
14
|
|
|
6
15
|
export type SearchInputProps = {
|
|
@@ -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
|
+
}
|