@xjur-ui/react 2.1.0 → 2.2.0
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/CHANGELOG.md +18 -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 +22 -16
- package/.turbo/turbo-build.log +0 -288
- 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/eslint.config.js +0 -10
- package/postcss.config.js +0 -5
- package/prettier.config.js +0 -7
- package/src/components/avatar-group.tsx +0 -76
- package/src/components/avatar.tsx +0 -54
- package/src/components/badge.tsx +0 -40
- package/src/components/breadcrumb.tsx +0 -119
- package/src/components/chip.tsx +0 -117
- package/src/components/collapsible.tsx +0 -35
- package/src/components/dialog.tsx +0 -242
- package/src/components/divider.tsx +0 -24
- package/src/components/drag-and-drop/drag-handle.tsx +0 -46
- package/src/components/drag-and-drop/drag-list-item.tsx +0 -91
- package/src/components/drag-and-drop/drag-list.tsx +0 -47
- package/src/components/drag-and-drop/drag-root.tsx +0 -30
- package/src/components/drag-and-drop/index.ts +0 -39
- package/src/components/drag-and-drop/types/drag-item.ts +0 -7
- package/src/components/dropdown-menu.tsx +0 -101
- package/src/components/form/button.tsx +0 -107
- package/src/components/form/calendar.tsx +0 -124
- package/src/components/form/checkbox.tsx +0 -57
- package/src/components/form/context/field.context.ts +0 -27
- package/src/components/form/date-picker.tsx +0 -199
- package/src/components/form/floating-label.tsx +0 -60
- package/src/components/form/input.tsx +0 -235
- package/src/components/form/otp-input.tsx +0 -45
- package/src/components/form/radio.tsx +0 -74
- package/src/components/form/rich-editor.tsx +0 -372
- package/src/components/form/search-input.tsx +0 -111
- package/src/components/form/select.tsx +0 -274
- package/src/components/form/switch.tsx +0 -31
- package/src/components/full-calendar/calendar-add-event.tsx +0 -15
- package/src/components/full-calendar/calendar-body.tsx +0 -12
- package/src/components/full-calendar/calendar-cell.tsx +0 -120
- package/src/components/full-calendar/calendar-day-view.tsx +0 -76
- package/src/components/full-calendar/calendar-event.tsx +0 -178
- package/src/components/full-calendar/calendar-header.tsx +0 -14
- package/src/components/full-calendar/calendar-month-view.tsx +0 -69
- package/src/components/full-calendar/calendar-more-events-dropdown.tsx +0 -39
- package/src/components/full-calendar/calendar-navigator.tsx +0 -86
- package/src/components/full-calendar/calendar-root.tsx +0 -165
- package/src/components/full-calendar/calendar-today-button.tsx +0 -21
- package/src/components/full-calendar/calendar-toggle-view.tsx +0 -61
- package/src/components/full-calendar/calendar-view-renderer.tsx +0 -19
- package/src/components/full-calendar/calendar-week-day.tsx +0 -49
- package/src/components/full-calendar/calendar-week-view.tsx +0 -88
- package/src/components/full-calendar/helpers/calendar.ts +0 -158
- package/src/components/full-calendar/index.ts +0 -16
- package/src/components/full-calendar/types/calendar-cell.ts +0 -4
- package/src/components/full-calendar/types/calendar-event.ts +0 -7
- package/src/components/full-calendar/types/calendar-view.ts +0 -1
- package/src/components/full-calendar/types/calendar-week-hour.ts +0 -4
- package/src/components/horizontal-scroll.tsx +0 -159
- package/src/components/icon.tsx +0 -29
- package/src/components/list.tsx +0 -111
- package/src/components/logo.tsx +0 -44
- package/src/components/selection-bar.tsx +0 -273
- package/src/components/sheet.tsx +0 -141
- package/src/components/skeleton.tsx +0 -12
- package/src/components/status.tsx +0 -43
- package/src/components/table.tsx +0 -160
- package/src/components/tabs.tsx +0 -72
- package/src/components/tag.tsx +0 -99
- package/src/components/tooltip.tsx +0 -63
- package/src/components/typography.tsx +0 -85
- package/src/components/upload.tsx +0 -647
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-os.ts +0 -32
- package/src/index.css +0 -5
- package/src/resources/icons.ts +0 -153
- package/src/resources/input-mask.ts +0 -91
- package/src/resources/logo/horizontal.tsx +0 -70
- package/src/resources/logo/icon.tsx +0 -54
- package/src/resources/logo/index.tsx +0 -33
- package/src/resources/logo/vertical.tsx +0 -70
- package/src/types.d.ts +0 -4
- package/tsconfig.json +0 -4
- package/tsup.config.ts +0 -30
- /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
|
@@ -1,235 +0,0 @@
|
|
|
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
|
-
...props
|
|
155
|
-
}: InputNumberFormatProps) {
|
|
156
|
-
const { state, variant } = useFieldContext()
|
|
157
|
-
|
|
158
|
-
return (
|
|
159
|
-
<InputNumberFormat
|
|
160
|
-
{...props}
|
|
161
|
-
className={value({ className, state })}
|
|
162
|
-
disabled={state === 'disabled'}
|
|
163
|
-
locales={locales}
|
|
164
|
-
placeholder={variant === 'filter' ? ' ' : placeholder}
|
|
165
|
-
readOnly={state === 'disabled'}
|
|
166
|
-
/>
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export function InputIcon({
|
|
171
|
-
className,
|
|
172
|
-
name,
|
|
173
|
-
...props
|
|
174
|
-
}: ComponentProps<'div'> & {
|
|
175
|
-
name: IconType
|
|
176
|
-
}) {
|
|
177
|
-
const { state } = useFieldContext()
|
|
178
|
-
|
|
179
|
-
return (
|
|
180
|
-
<div className={icon({ className, state })} {...props}>
|
|
181
|
-
<Icon name={name} />
|
|
182
|
-
</div>
|
|
183
|
-
)
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export function InputSlot({ className, ...props }: ComponentProps<'span'>) {
|
|
187
|
-
const { state } = useFieldContext()
|
|
188
|
-
return <span className={slotText({ className, state })} {...props} />
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function InputCaption({ className, ...props }: ComponentProps<'p'>) {
|
|
192
|
-
const { state } = useFieldContext()
|
|
193
|
-
return <p className={caption({ className, state })} {...props} />
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export function InputAction({ className, ...props }: ComponentProps<'div'>) {
|
|
197
|
-
const { state } = useFieldContext()
|
|
198
|
-
return (
|
|
199
|
-
<div
|
|
200
|
-
className={action({ className, state })}
|
|
201
|
-
data-slot="input-action-slot"
|
|
202
|
-
{...props}
|
|
203
|
-
/>
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export function InputNumericStepper({
|
|
208
|
-
handleIncrement,
|
|
209
|
-
handleDecrement
|
|
210
|
-
}: {
|
|
211
|
-
handleIncrement: () => void
|
|
212
|
-
handleDecrement: () => void
|
|
213
|
-
}) {
|
|
214
|
-
return (
|
|
215
|
-
<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">
|
|
216
|
-
<button
|
|
217
|
-
className="flex h-1/2 items-center justify-center"
|
|
218
|
-
type="button"
|
|
219
|
-
onClick={handleIncrement}
|
|
220
|
-
>
|
|
221
|
-
<Icon className="text-icon-neutral-3" name="keyboard_arrow_up" />
|
|
222
|
-
</button>
|
|
223
|
-
|
|
224
|
-
<Divider />
|
|
225
|
-
|
|
226
|
-
<button
|
|
227
|
-
className="flex h-1/2 items-center justify-center"
|
|
228
|
-
type="button"
|
|
229
|
-
onClick={handleDecrement}
|
|
230
|
-
>
|
|
231
|
-
<Icon className="text-icon-neutral-3" name="keyboard_arrow_down" />
|
|
232
|
-
</button>
|
|
233
|
-
</InputAction>
|
|
234
|
-
)
|
|
235
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as OTPPasswordField from '@radix-ui/react-one-time-password-field'
|
|
2
|
-
import { cx } from '@xjur-ui/util'
|
|
3
|
-
|
|
4
|
-
function Root({
|
|
5
|
-
children,
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: OTPPasswordField.OneTimePasswordFieldProps) {
|
|
9
|
-
return (
|
|
10
|
-
<OTPPasswordField.Root
|
|
11
|
-
className={cx(className, 'group gap-small flex items-center')}
|
|
12
|
-
{...props}
|
|
13
|
-
>
|
|
14
|
-
{children}
|
|
15
|
-
</OTPPasswordField.Root>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function Input({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: OTPPasswordField.OneTimePasswordFieldInputProps) {
|
|
23
|
-
return (
|
|
24
|
-
<OTPPasswordField.Input
|
|
25
|
-
className={cx(
|
|
26
|
-
className,
|
|
27
|
-
'text-neutral-dark h-large-6x bg-layer-2-hover rounded-small-1x w-full text-center outline-0',
|
|
28
|
-
'focus-within:border-primary-idle focus-within:border'
|
|
29
|
-
)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function HiddenInput({
|
|
36
|
-
...props
|
|
37
|
-
}: OTPPasswordField.OneTimePasswordFieldHiddenInputProps) {
|
|
38
|
-
return <OTPPasswordField.HiddenInput {...props} />
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const OTPInput = {
|
|
42
|
-
Root,
|
|
43
|
-
Input,
|
|
44
|
-
HiddenInput
|
|
45
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'
|
|
3
|
-
import { cx } from '@xjur-ui/util'
|
|
4
|
-
import { Typography } from '../typography'
|
|
5
|
-
|
|
6
|
-
export function RadioGroup({
|
|
7
|
-
className,
|
|
8
|
-
orientation = 'vertical',
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
|
|
11
|
-
return (
|
|
12
|
-
<RadioGroupPrimitive.Root
|
|
13
|
-
className={cx(
|
|
14
|
-
'gap-small flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col',
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
data-orientation={orientation}
|
|
18
|
-
data-slot="radio-group"
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function RadioItem({
|
|
25
|
-
className,
|
|
26
|
-
id,
|
|
27
|
-
label,
|
|
28
|
-
disabled = false,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
31
|
-
label?: string
|
|
32
|
-
}) {
|
|
33
|
-
return (
|
|
34
|
-
<div className="gap-small flex items-center">
|
|
35
|
-
<RadioGroupPrimitive.Item
|
|
36
|
-
className={cx(
|
|
37
|
-
// layout
|
|
38
|
-
'size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none',
|
|
39
|
-
// base
|
|
40
|
-
'border-border-layer-2 bg-layer-2-idle cursor-pointer border-2',
|
|
41
|
-
// hover/focus (desmarcado)
|
|
42
|
-
'hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary',
|
|
43
|
-
// estado checked
|
|
44
|
-
'data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active',
|
|
45
|
-
// hover quando estiver checked (opcional)
|
|
46
|
-
'data-[state=checked]:hover:border-primary-idle',
|
|
47
|
-
// disabled
|
|
48
|
-
'disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]',
|
|
49
|
-
className
|
|
50
|
-
)}
|
|
51
|
-
data-slot="radio-group-item"
|
|
52
|
-
disabled={disabled}
|
|
53
|
-
id={id}
|
|
54
|
-
{...props}
|
|
55
|
-
>
|
|
56
|
-
<RadioGroupPrimitive.Indicator
|
|
57
|
-
className="relative flex items-center justify-center"
|
|
58
|
-
data-slot="radio-group-indicator"
|
|
59
|
-
/>
|
|
60
|
-
</RadioGroupPrimitive.Item>
|
|
61
|
-
|
|
62
|
-
{!!label && (
|
|
63
|
-
<Typography
|
|
64
|
-
asChild={true}
|
|
65
|
-
className="text-size-body-sm data-[disabled=true]:opacity-38"
|
|
66
|
-
data-disabled={disabled}
|
|
67
|
-
weight="medium"
|
|
68
|
-
>
|
|
69
|
-
<label htmlFor={id}>{label}</label>
|
|
70
|
-
</Typography>
|
|
71
|
-
)}
|
|
72
|
-
</div>
|
|
73
|
-
)
|
|
74
|
-
}
|