brd-ui-kit 0.1.75 → 0.1.77
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/dist/brd-ui-kit.css +1 -1
- package/dist/calendar-PqChui7l.cjs +2 -0
- package/dist/{calendar-DReGV_22.cjs.map → calendar-PqChui7l.cjs.map} +1 -1
- package/dist/{calendar-C0DXP3T-.js → calendar-XWqEaWHP.js} +267 -272
- package/dist/{calendar-C0DXP3T-.js.map → calendar-XWqEaWHP.js.map} +1 -1
- package/dist/{calendar-locale-CP2pxhFK.cjs → calendar-locale-CosU_VZY.cjs} +2 -2
- package/dist/{calendar-locale-CP2pxhFK.cjs.map → calendar-locale-CosU_VZY.cjs.map} +1 -1
- package/dist/{calendar-locale-DJf03PI9.js → calendar-locale-DqQZymBn.js} +2 -2
- package/dist/{calendar-locale-DJf03PI9.js.map → calendar-locale-DqQZymBn.js.map} +1 -1
- package/dist/chart-9H_9wEfR.cjs +63 -0
- package/dist/{chart-C69jBlXa.cjs.map → chart-9H_9wEfR.cjs.map} +1 -1
- package/dist/{chart-CAPCe8o5.js → chart-DFbmMKiQ.js} +2956 -2951
- package/dist/{chart-CAPCe8o5.js.map → chart-DFbmMKiQ.js.map} +1 -1
- package/dist/components/app-sidebar/app-sidebar.d.ts +2 -2
- package/dist/components/basic-chart/basic-chart.d.ts +1 -1
- package/dist/components/basic-table/basic-table.d.ts +5 -5
- package/dist/components/data-table/data-table-actions-column.d.ts +3 -3
- package/dist/components/data-table/data-table-bulk-actions.d.ts +3 -3
- package/dist/components/data-table/data-table-column-visibility.d.ts +2 -2
- package/dist/components/data-table/data-table-filter.d.ts +2 -2
- package/dist/components/data-table/data-table-row-actions-column.d.ts +5 -5
- package/dist/components/data-table/use-data-table-editable-rows.d.ts +5 -5
- package/dist/components/files-uploader/files-uploader.d.ts +2 -2
- package/dist/components/icons/ArrowCounterClockwise.d.ts +1 -0
- package/dist/components/icons/BoundingBox.d.ts +1 -0
- package/dist/components/icons/Briefcase.d.ts +1 -0
- package/dist/components/icons/Building.d.ts +1 -0
- package/dist/components/icons/Buildings.d.ts +1 -0
- package/dist/components/icons/CaretDown.d.ts +1 -0
- package/dist/components/icons/CaretLeft.d.ts +1 -0
- package/dist/components/icons/CaretRight.d.ts +1 -0
- package/dist/components/icons/CaretUp.d.ts +1 -0
- package/dist/components/icons/CaretUpDown.d.ts +1 -0
- package/dist/components/icons/ChartLine.d.ts +1 -0
- package/dist/components/icons/Check.d.ts +1 -0
- package/dist/components/icons/CheckCircle.d.ts +1 -0
- package/dist/components/icons/Clock.d.ts +1 -0
- package/dist/components/icons/CreditCard.d.ts +1 -0
- package/dist/components/icons/DotsThree.d.ts +1 -0
- package/dist/components/icons/DownloadSimple.d.ts +1 -0
- package/dist/components/icons/EnvelopeSimple.d.ts +1 -0
- package/dist/components/icons/Eye.d.ts +1 -0
- package/dist/components/icons/EyeSlash.d.ts +1 -0
- package/dist/components/icons/FileText.d.ts +1 -0
- package/dist/components/icons/Folder.d.ts +1 -0
- package/dist/components/icons/Funnel.d.ts +1 -0
- package/dist/components/icons/Gear.d.ts +1 -0
- package/dist/components/icons/Info.d.ts +1 -0
- package/dist/components/icons/LockKey.d.ts +1 -0
- package/dist/components/icons/MagnifyingGlass.d.ts +1 -0
- package/dist/components/icons/MaxLogo.d.ts +1 -0
- package/dist/components/icons/Package.d.ts +1 -0
- package/dist/components/icons/Pencil.d.ts +1 -0
- package/dist/components/icons/Phone.d.ts +1 -0
- package/dist/components/icons/Plus.d.ts +1 -0
- package/dist/components/icons/PresentationChart.d.ts +1 -0
- package/dist/components/icons/SpinnerGap.d.ts +1 -0
- package/dist/components/icons/TelegramLogo.d.ts +1 -0
- package/dist/components/icons/Trash.d.ts +1 -0
- package/dist/components/icons/UserCircleGear.d.ts +1 -0
- package/dist/components/icons/Users.d.ts +1 -0
- package/dist/components/icons/UsersFour.d.ts +1 -0
- package/dist/components/icons/Warning.d.ts +1 -0
- package/dist/components/icons/WarningCircle.d.ts +1 -0
- package/dist/components/icons/WhatsAppLogoFilled.d.ts +1 -0
- package/dist/components/icons/Wrench.d.ts +1 -0
- package/dist/components/icons/X.d.ts +1 -0
- package/dist/components/icons/XCircle.d.ts +1 -0
- package/dist/components/icons/index.d.ts +50 -0
- package/dist/components/icons/stroke-icon.d.ts +19 -0
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/input-field/input-field.d.ts +3 -3
- package/dist/components/input-password/input-password.d.ts +1 -1
- package/dist/components/input-phone/input-phone.d.ts +4 -4
- package/dist/components/popover-modal/popover-modal.d.ts +4 -4
- package/dist/components/select-field/select-field.d.ts +2 -2
- package/dist/components/ui/avatar/avatar.d.ts +7 -7
- package/dist/components/ui/badge/badge.d.ts +2 -2
- package/dist/components/ui/button/button.d.ts +3 -3
- package/dist/components/ui/calendar/calendar.d.ts +6 -6
- package/dist/components/ui/calendar/calendar.styles.d.ts +1 -1
- package/dist/components/ui/card/card.d.ts +13 -13
- package/dist/components/ui/chart/chart.d.ts +23 -21
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -4
- package/dist/components/ui/combobox/combobox.d.ts +6 -6
- package/dist/components/ui/dialog/dialog.d.ts +11 -11
- package/dist/components/ui/drawer/drawer.d.ts +11 -11
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +42 -42
- package/dist/components/ui/icon/icon-map.d.ts +68 -0
- package/dist/components/ui/icon/icon.d.ts +6 -6
- package/dist/components/ui/icon/index.d.ts +3 -1
- package/dist/components/ui/input/input.d.ts +2 -2
- package/dist/components/ui/input-group/input-group.d.ts +7 -7
- package/dist/components/ui/label/label.d.ts +4 -4
- package/dist/components/ui/pagination/pagination.d.ts +8 -8
- package/dist/components/ui/popover/popover.d.ts +8 -8
- package/dist/components/ui/progress/progress.d.ts +4 -4
- package/dist/components/ui/radio-group/radio-group.d.ts +7 -7
- package/dist/components/ui/select/select.d.ts +11 -11
- package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +4 -4
- package/dist/components/ui/separator/separator.d.ts +4 -4
- package/dist/components/ui/switch/switch.d.ts +4 -4
- package/dist/components/ui/table/table.d.ts +17 -17
- package/dist/components/ui/tabs/tabs.d.ts +8 -8
- package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts +8 -8
- package/dist/components/ui/typography/typography.d.ts +174 -174
- package/dist/components-app-pagination-app-pagination.cjs +1 -1
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.js +34 -32
- package/dist/components-app-pagination-app-pagination.js.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.js +33 -32
- package/dist/components-app-sidebar-app-sidebar.js.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +54 -36
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +25 -5
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-basic-chart-basic-chart.cjs +2 -2
- package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
- package/dist/components-basic-chart-basic-chart.js +106 -108
- package/dist/components-basic-chart-basic-chart.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +232 -231
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-actions-column.js +1 -1
- package/dist/components-data-table-data-table-actions-column.js.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.js +9 -9
- package/dist/components-data-table-data-table-bulk-actions.js.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.js +11 -10
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -1
- package/dist/components-data-table-data-table-filter.cjs +1 -1
- package/dist/components-data-table-data-table-filter.cjs.map +1 -1
- package/dist/components-data-table-data-table-filter.js +15 -15
- package/dist/components-data-table-data-table-filter.js.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.js +1 -1
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.js +88 -90
- package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -1
- package/dist/components-files-uploader-files-uploader.cjs +3 -3
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
- package/dist/components-files-uploader-files-uploader.js +41 -38
- package/dist/components-files-uploader-files-uploader.js.map +1 -1
- package/dist/components-icons-ArrowCounterClockwise.cjs +2 -0
- package/dist/components-icons-ArrowCounterClockwise.cjs.map +1 -0
- package/dist/components-icons-ArrowCounterClockwise.js +5 -0
- package/dist/components-icons-ArrowCounterClockwise.js.map +1 -0
- package/dist/components-icons-BoundingBox.cjs +2 -0
- package/dist/components-icons-BoundingBox.cjs.map +1 -0
- package/dist/components-icons-BoundingBox.js +5 -0
- package/dist/components-icons-BoundingBox.js.map +1 -0
- package/dist/components-icons-Briefcase.cjs +2 -0
- package/dist/components-icons-Briefcase.cjs.map +1 -0
- package/dist/components-icons-Briefcase.js +5 -0
- package/dist/components-icons-Briefcase.js.map +1 -0
- package/dist/components-icons-Building.cjs +2 -0
- package/dist/components-icons-Building.cjs.map +1 -0
- package/dist/components-icons-Building.js +5 -0
- package/dist/components-icons-Building.js.map +1 -0
- package/dist/components-icons-Buildings.cjs +2 -0
- package/dist/components-icons-Buildings.cjs.map +1 -0
- package/dist/components-icons-Buildings.js +5 -0
- package/dist/components-icons-Buildings.js.map +1 -0
- package/dist/components-icons-CaretDown.cjs +2 -0
- package/dist/components-icons-CaretDown.cjs.map +1 -0
- package/dist/components-icons-CaretDown.js +5 -0
- package/dist/components-icons-CaretDown.js.map +1 -0
- package/dist/components-icons-CaretLeft.cjs +2 -0
- package/dist/components-icons-CaretLeft.cjs.map +1 -0
- package/dist/components-icons-CaretLeft.js +5 -0
- package/dist/components-icons-CaretLeft.js.map +1 -0
- package/dist/components-icons-CaretRight.cjs +2 -0
- package/dist/components-icons-CaretRight.cjs.map +1 -0
- package/dist/components-icons-CaretRight.js +5 -0
- package/dist/components-icons-CaretRight.js.map +1 -0
- package/dist/components-icons-CaretUp.cjs +2 -0
- package/dist/components-icons-CaretUp.cjs.map +1 -0
- package/dist/components-icons-CaretUp.js +5 -0
- package/dist/components-icons-CaretUp.js.map +1 -0
- package/dist/components-icons-CaretUpDown.cjs +2 -0
- package/dist/components-icons-CaretUpDown.cjs.map +1 -0
- package/dist/components-icons-CaretUpDown.js +5 -0
- package/dist/components-icons-CaretUpDown.js.map +1 -0
- package/dist/components-icons-ChartLine.cjs +2 -0
- package/dist/components-icons-ChartLine.cjs.map +1 -0
- package/dist/components-icons-ChartLine.js +5 -0
- package/dist/components-icons-ChartLine.js.map +1 -0
- package/dist/components-icons-Check.cjs +2 -0
- package/dist/components-icons-Check.cjs.map +1 -0
- package/dist/components-icons-Check.js +5 -0
- package/dist/components-icons-Check.js.map +1 -0
- package/dist/components-icons-CheckCircle.cjs +2 -0
- package/dist/components-icons-CheckCircle.cjs.map +1 -0
- package/dist/components-icons-CheckCircle.js +5 -0
- package/dist/components-icons-CheckCircle.js.map +1 -0
- package/dist/components-icons-Clock.cjs +2 -0
- package/dist/components-icons-Clock.cjs.map +1 -0
- package/dist/components-icons-Clock.js +5 -0
- package/dist/components-icons-Clock.js.map +1 -0
- package/dist/components-icons-CreditCard.cjs +2 -0
- package/dist/components-icons-CreditCard.cjs.map +1 -0
- package/dist/components-icons-CreditCard.js +5 -0
- package/dist/components-icons-CreditCard.js.map +1 -0
- package/dist/components-icons-DotsThree.cjs +2 -0
- package/dist/components-icons-DotsThree.cjs.map +1 -0
- package/dist/components-icons-DotsThree.js +5 -0
- package/dist/components-icons-DotsThree.js.map +1 -0
- package/dist/components-icons-DownloadSimple.cjs +2 -0
- package/dist/components-icons-DownloadSimple.cjs.map +1 -0
- package/dist/components-icons-DownloadSimple.js +5 -0
- package/dist/components-icons-DownloadSimple.js.map +1 -0
- package/dist/components-icons-EnvelopeSimple.cjs +2 -0
- package/dist/components-icons-EnvelopeSimple.cjs.map +1 -0
- package/dist/components-icons-EnvelopeSimple.js +5 -0
- package/dist/components-icons-EnvelopeSimple.js.map +1 -0
- package/dist/components-icons-Eye.cjs +2 -0
- package/dist/components-icons-Eye.cjs.map +1 -0
- package/dist/components-icons-Eye.js +5 -0
- package/dist/components-icons-Eye.js.map +1 -0
- package/dist/components-icons-EyeSlash.cjs +2 -0
- package/dist/components-icons-EyeSlash.cjs.map +1 -0
- package/dist/components-icons-EyeSlash.js +5 -0
- package/dist/components-icons-EyeSlash.js.map +1 -0
- package/dist/components-icons-FileText.cjs +2 -0
- package/dist/components-icons-FileText.cjs.map +1 -0
- package/dist/components-icons-FileText.js +5 -0
- package/dist/components-icons-FileText.js.map +1 -0
- package/dist/components-icons-Folder.cjs +2 -0
- package/dist/components-icons-Folder.cjs.map +1 -0
- package/dist/components-icons-Folder.js +5 -0
- package/dist/components-icons-Folder.js.map +1 -0
- package/dist/components-icons-Funnel.cjs +2 -0
- package/dist/components-icons-Funnel.cjs.map +1 -0
- package/dist/components-icons-Funnel.js +5 -0
- package/dist/components-icons-Funnel.js.map +1 -0
- package/dist/components-icons-Gear.cjs +2 -0
- package/dist/components-icons-Gear.cjs.map +1 -0
- package/dist/components-icons-Gear.js +5 -0
- package/dist/components-icons-Gear.js.map +1 -0
- package/dist/components-icons-Info.cjs +2 -0
- package/dist/components-icons-Info.cjs.map +1 -0
- package/dist/components-icons-Info.js +5 -0
- package/dist/components-icons-Info.js.map +1 -0
- package/dist/components-icons-LockKey.cjs +2 -0
- package/dist/components-icons-LockKey.cjs.map +1 -0
- package/dist/components-icons-LockKey.js +5 -0
- package/dist/components-icons-LockKey.js.map +1 -0
- package/dist/components-icons-MagnifyingGlass.cjs +2 -0
- package/dist/components-icons-MagnifyingGlass.cjs.map +1 -0
- package/dist/components-icons-MagnifyingGlass.js +5 -0
- package/dist/components-icons-MagnifyingGlass.js.map +1 -0
- package/dist/components-icons-MaxLogo.cjs +2 -0
- package/dist/components-icons-MaxLogo.cjs.map +1 -0
- package/dist/components-icons-MaxLogo.js +5 -0
- package/dist/components-icons-MaxLogo.js.map +1 -0
- package/dist/components-icons-Package.cjs +2 -0
- package/dist/components-icons-Package.cjs.map +1 -0
- package/dist/components-icons-Package.js +5 -0
- package/dist/components-icons-Package.js.map +1 -0
- package/dist/components-icons-Pencil.cjs +2 -0
- package/dist/components-icons-Pencil.cjs.map +1 -0
- package/dist/components-icons-Pencil.js +5 -0
- package/dist/components-icons-Pencil.js.map +1 -0
- package/dist/components-icons-Phone.cjs +2 -0
- package/dist/components-icons-Phone.cjs.map +1 -0
- package/dist/components-icons-Phone.js +5 -0
- package/dist/components-icons-Phone.js.map +1 -0
- package/dist/components-icons-Plus.cjs +2 -0
- package/dist/components-icons-Plus.cjs.map +1 -0
- package/dist/components-icons-Plus.js +5 -0
- package/dist/components-icons-Plus.js.map +1 -0
- package/dist/components-icons-PresentationChart.cjs +2 -0
- package/dist/components-icons-PresentationChart.cjs.map +1 -0
- package/dist/components-icons-PresentationChart.js +5 -0
- package/dist/components-icons-PresentationChart.js.map +1 -0
- package/dist/components-icons-SpinnerGap.cjs +2 -0
- package/dist/components-icons-SpinnerGap.cjs.map +1 -0
- package/dist/components-icons-SpinnerGap.js +5 -0
- package/dist/components-icons-SpinnerGap.js.map +1 -0
- package/dist/components-icons-TelegramLogo.cjs +2 -0
- package/dist/components-icons-TelegramLogo.cjs.map +1 -0
- package/dist/components-icons-TelegramLogo.js +5 -0
- package/dist/components-icons-TelegramLogo.js.map +1 -0
- package/dist/components-icons-Trash.cjs +2 -0
- package/dist/components-icons-Trash.cjs.map +1 -0
- package/dist/components-icons-Trash.js +5 -0
- package/dist/components-icons-Trash.js.map +1 -0
- package/dist/components-icons-UserCircleGear.cjs +2 -0
- package/dist/components-icons-UserCircleGear.cjs.map +1 -0
- package/dist/components-icons-UserCircleGear.js +5 -0
- package/dist/components-icons-UserCircleGear.js.map +1 -0
- package/dist/components-icons-Users.cjs +2 -0
- package/dist/components-icons-Users.cjs.map +1 -0
- package/dist/components-icons-Users.js +5 -0
- package/dist/components-icons-Users.js.map +1 -0
- package/dist/components-icons-UsersFour.cjs +2 -0
- package/dist/components-icons-UsersFour.cjs.map +1 -0
- package/dist/components-icons-UsersFour.js +5 -0
- package/dist/components-icons-UsersFour.js.map +1 -0
- package/dist/components-icons-Warning.cjs +2 -0
- package/dist/components-icons-Warning.cjs.map +1 -0
- package/dist/components-icons-Warning.js +5 -0
- package/dist/components-icons-Warning.js.map +1 -0
- package/dist/components-icons-WarningCircle.cjs +2 -0
- package/dist/components-icons-WarningCircle.cjs.map +1 -0
- package/dist/components-icons-WarningCircle.js +5 -0
- package/dist/components-icons-WarningCircle.js.map +1 -0
- package/dist/components-icons-WhatsAppLogoFilled.cjs +2 -0
- package/dist/components-icons-WhatsAppLogoFilled.cjs.map +1 -0
- package/dist/components-icons-WhatsAppLogoFilled.js +5 -0
- package/dist/components-icons-WhatsAppLogoFilled.js.map +1 -0
- package/dist/components-icons-Wrench.cjs +2 -0
- package/dist/components-icons-Wrench.cjs.map +1 -0
- package/dist/components-icons-Wrench.js +5 -0
- package/dist/components-icons-Wrench.js.map +1 -0
- package/dist/components-icons-X.cjs +2 -0
- package/dist/components-icons-X.cjs.map +1 -0
- package/dist/components-icons-X.js +5 -0
- package/dist/components-icons-X.js.map +1 -0
- package/dist/components-icons-XCircle.cjs +2 -0
- package/dist/components-icons-XCircle.cjs.map +1 -0
- package/dist/components-icons-XCircle.js +5 -0
- package/dist/components-icons-XCircle.js.map +1 -0
- package/dist/components-icons-stroke-icon.cjs +2 -0
- package/dist/components-icons-stroke-icon.cjs.map +1 -0
- package/dist/components-icons-stroke-icon.js +39 -0
- package/dist/components-icons-stroke-icon.js.map +1 -0
- package/dist/components-icons.cjs +2 -0
- package/dist/components-icons.cjs.map +1 -0
- package/dist/components-icons.js +97 -0
- package/dist/components-icons.js.map +1 -0
- package/dist/components-input-contact-input-contact.cjs +4 -4
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +104 -75
- package/dist/components-input-contact-input-contact.js.map +1 -1
- package/dist/components-input-field-input-field.cjs +1 -1
- package/dist/components-input-field-input-field.cjs.map +1 -1
- package/dist/components-input-field-input-field.js +18 -19
- package/dist/components-input-field-input-field.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +14 -52
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-input-phone-input-phone.cjs.map +1 -1
- package/dist/components-input-phone-input-phone.js.map +1 -1
- package/dist/components-popover-modal-popover-modal.cjs +1 -1
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
- package/dist/components-popover-modal-popover-modal.js +40 -29
- package/dist/components-popover-modal-popover-modal.js.map +1 -1
- package/dist/components-select-field-select-field.cjs.map +1 -1
- package/dist/components-select-field-select-field.js.map +1 -1
- package/dist/components-ui-avatar-avatar.cjs +1 -1
- package/dist/components-ui-avatar-avatar.cjs.map +1 -1
- package/dist/components-ui-avatar-avatar.js +12 -13
- package/dist/components-ui-avatar-avatar.js.map +1 -1
- package/dist/components-ui-badge-badge.cjs +1 -1
- package/dist/components-ui-badge-badge.cjs.map +1 -1
- package/dist/components-ui-badge-badge.js +10 -11
- package/dist/components-ui-badge-badge.js.map +1 -1
- package/dist/components-ui-button-button.cjs +1 -1
- package/dist/components-ui-button-button.cjs.map +1 -1
- package/dist/components-ui-button-button.js +10 -11
- package/dist/components-ui-button-button.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +4 -4
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +4 -4
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -1
- package/dist/components-ui-calendar-calendar.js +4 -3
- package/dist/components-ui-calendar-calendar.js.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.js +1 -1
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +2 -2
- package/dist/components-ui-card-card.cjs +1 -1
- package/dist/components-ui-card-card.cjs.map +1 -1
- package/dist/components-ui-card-card.js +10 -11
- package/dist/components-ui-card-card.js.map +1 -1
- package/dist/components-ui-chart-chart.cjs +1 -1
- package/dist/components-ui-chart-chart.js +1 -1
- package/dist/components-ui-chart.cjs +1 -1
- package/dist/components-ui-chart.js +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +13 -13
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +5 -5
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +1478 -1479
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +23 -23
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-drawer-drawer.cjs +2 -2
- package/dist/components-ui-drawer-drawer.cjs.map +1 -1
- package/dist/components-ui-drawer-drawer.js +16 -19
- package/dist/components-ui-drawer-drawer.js.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -1
- package/dist/components-ui-icon-icon-map.cjs +2 -0
- package/dist/components-ui-icon-icon-map.cjs.map +1 -0
- package/dist/components-ui-icon-icon-map.js +71 -0
- package/dist/components-ui-icon-icon-map.js.map +1 -0
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +29 -61735
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-icon.cjs +1 -1
- package/dist/components-ui-icon.js +3 -1
- package/dist/components-ui-icon.js.map +1 -1
- package/dist/components-ui-input-group-input-group.cjs +1 -1
- package/dist/components-ui-input-group-input-group.cjs.map +1 -1
- package/dist/components-ui-input-group-input-group.js +12 -13
- package/dist/components-ui-input-group-input-group.js.map +1 -1
- package/dist/components-ui-input-input.cjs +1 -1
- package/dist/components-ui-input-input.cjs.map +1 -1
- package/dist/components-ui-input-input.js +2 -3
- package/dist/components-ui-input-input.js.map +1 -1
- package/dist/components-ui-label-label.cjs +1 -1
- package/dist/components-ui-label-label.cjs.map +1 -1
- package/dist/components-ui-label-label.js +1 -1
- package/dist/components-ui-label-label.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +2 -2
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +48 -46
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-popover-popover.cjs +1 -1
- package/dist/components-ui-popover-popover.cjs.map +1 -1
- package/dist/components-ui-popover-popover.js +14 -19
- package/dist/components-ui-popover-popover.js.map +1 -1
- package/dist/components-ui-progress-progress.cjs +1 -1
- package/dist/components-ui-progress-progress.cjs.map +1 -1
- package/dist/components-ui-progress-progress.js +1 -1
- package/dist/components-ui-progress-progress.js.map +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs.map +1 -1
- package/dist/components-ui-radio-group-radio-group.js +0 -1
- package/dist/components-ui-radio-group-radio-group.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +54 -47
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -1
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +36 -36
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-separator-separator.cjs +1 -1
- package/dist/components-ui-separator-separator.cjs.map +1 -1
- package/dist/components-ui-separator-separator.js +11 -12
- package/dist/components-ui-separator-separator.js.map +1 -1
- package/dist/components-ui-sonner-sonner.cjs +1 -1
- package/dist/components-ui-sonner-sonner.cjs.map +1 -1
- package/dist/components-ui-sonner-sonner.js +38 -32
- package/dist/components-ui-sonner-sonner.js.map +1 -1
- package/dist/components-ui-switch-switch.cjs +1 -1
- package/dist/components-ui-switch-switch.cjs.map +1 -1
- package/dist/components-ui-switch-switch.js +6 -7
- package/dist/components-ui-switch-switch.js.map +1 -1
- package/dist/components-ui-table-table.cjs +1 -1
- package/dist/components-ui-table-table.cjs.map +1 -1
- package/dist/components-ui-table-table.js +0 -1
- package/dist/components-ui-table-table.js.map +1 -1
- package/dist/components-ui-tabs-tabs.cjs +2 -2
- package/dist/components-ui-tabs-tabs.cjs.map +1 -1
- package/dist/components-ui-tabs-tabs.js +16 -16
- package/dist/components-ui-tabs-tabs.js.map +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs.map +1 -1
- package/dist/components-ui-tooltip-tooltip.js +9 -10
- package/dist/components-ui-tooltip-tooltip.js.map +1 -1
- package/dist/components-ui-typography-typography.cjs +1 -1
- package/dist/components-ui-typography-typography.cjs.map +1 -1
- package/dist/components-ui-typography-typography.js +7 -7
- package/dist/components-ui-typography-typography.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +234 -233
- package/dist/index.js.map +1 -1
- package/package.json +10 -1
- package/dist/calendar-DReGV_22.cjs +0 -2
- package/dist/chart-C69jBlXa.cjs +0 -63
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-stroke-icon.js","sources":["../src/components/icons/stroke-icon.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport type { StrokeIconProps } from \"phosphor-strokes-icons\";\nimport type {\n ComponentType,\n DetailedHTMLProps,\n HTMLAttributes,\n SVGProps,\n} from \"react\";\nimport { iconPresets } from \"../ui/icon/icon-presets\";\nimport type { IconPreset } from \"../ui/icon/icon-presets\";\n\nexport type StrokeIconComponent = ComponentType<StrokeIconProps>;\n\ntype StrokeIconComponentProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n icon: StrokeIconComponent;\n size?: IconPreset | StrokeIconProps[\"size\"];\n strokeWidth?: StrokeIconProps[\"strokeWidth\"];\n color?: StrokeIconProps[\"color\"];\n disabled?: boolean;\n absoluteStrokeWidth?: StrokeIconProps[\"absoluteStrokeWidth\"];\n classes?: {\n wrapper?: string;\n icon?: string;\n };\n svgProps?: Omit<\n SVGProps<SVGSVGElement>,\n \"size\" | \"strokeWidth\" | \"color\" | \"className\"\n >;\n};\n\nexport const StrokeIcon = ({\n icon: IconComponent,\n size = \"medium\",\n strokeWidth,\n color,\n absoluteStrokeWidth = true,\n classes,\n className,\n svgProps,\n disabled,\n ...rest\n}: StrokeIconComponentProps) => {\n const presetConfig =\n typeof size === \"string\" && size in iconPresets\n ? iconPresets[size as IconPreset]\n : iconPresets.medium;\n const resolvedSize =\n typeof size === \"string\" && size in iconPresets ? presetConfig.size : size;\n const resolvedStrokeWidth = strokeWidth ?? presetConfig.strokeWidth;\n\n return (\n <div\n {...rest}\n className={cn(classes?.wrapper)}\n >\n <IconComponent\n {...svgProps}\n size={resolvedSize}\n strokeWidth={resolvedStrokeWidth}\n color={color}\n absoluteStrokeWidth={absoluteStrokeWidth}\n className={cn(className, classes?.icon, disabled && \"text-disabled-text\")}\n />\n </div>\n );\n};\n\nexport type { StrokeIconComponentProps };\n"],"names":["StrokeIcon","IconComponent","size","strokeWidth","color","absoluteStrokeWidth","classes","className","svgProps","disabled","rest","presetConfig","iconPresets","resolvedSize","resolvedStrokeWidth","jsx","cn"],"mappings":";;;AAiCO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAMC;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,qBAAAC,IAAsB;AAAA,EACtB,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAgC;AAC9B,QAAMC,IACJ,OAAOT,KAAS,YAAYA,KAAQU,IAChCA,EAAYV,CAAkB,IAC9BU,EAAY,QACZC,IACJ,OAAOX,KAAS,YAAYA,KAAQU,IAAcD,EAAa,OAAOT,GAClEY,IAAsBX,KAAeQ,EAAa;AAExD,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,WAAWM,EAAGV,GAAS,OAAO;AAAA,MAE9B,UAAA,gBAAAS;AAAA,QAACd;AAAA,QAAA;AAAA,UACE,GAAGO;AAAA,UACJ,MAAMK;AAAA,UACN,aAAaC;AAAA,UACb,OAAAV;AAAA,UACA,qBAAAC;AAAA,UACA,WAAWW,EAAGT,GAAWD,GAAS,MAAMG,KAAY,oBAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1E;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/ArrowCounterClockwise"),r=require("phosphor-strokes-icons/icons/BoundingBox"),t=require("phosphor-strokes-icons/icons/Briefcase"),n=require("phosphor-strokes-icons/icons/Building"),o=require("phosphor-strokes-icons/icons/Buildings"),i=require("phosphor-strokes-icons/icons/CaretDown"),u=require("phosphor-strokes-icons/icons/CaretLeft"),c=require("phosphor-strokes-icons/icons/CaretRight"),a=require("phosphor-strokes-icons/icons/CaretUp"),l=require("phosphor-strokes-icons/icons/CaretUpDown"),s=require("phosphor-strokes-icons/icons/ChartLine"),b=require("phosphor-strokes-icons/icons/Check"),g=require("phosphor-strokes-icons/icons/CheckCircle"),p=require("phosphor-strokes-icons/icons/Clock"),d=require("phosphor-strokes-icons/icons/CreditCard"),P=require("phosphor-strokes-icons/icons/DotsThree"),y=require("phosphor-strokes-icons/icons/DownloadSimple"),f=require("phosphor-strokes-icons/icons/EnvelopeSimple"),m=require("phosphor-strokes-icons/icons/Eye"),C=require("phosphor-strokes-icons/icons/EyeSlash"),q=require("phosphor-strokes-icons/icons/FileText"),j=require("phosphor-strokes-icons/icons/Folder"),O=require("phosphor-strokes-icons/icons/Funnel"),h=require("phosphor-strokes-icons/icons/Gear"),k=require("phosphor-strokes-icons/icons/Info"),L=require("phosphor-strokes-icons/icons/LockKey"),S=require("phosphor-strokes-icons/icons/MagnifyingGlass"),w=require("phosphor-strokes-icons/icons/MaxLogo"),B=require("phosphor-strokes-icons/icons/Package"),F=require("phosphor-strokes-icons/icons/Pencil"),U=require("phosphor-strokes-icons/icons/Phone"),T=require("phosphor-strokes-icons/icons/Plus"),D=require("phosphor-strokes-icons/icons/PresentationChart"),G=require("phosphor-strokes-icons/icons/SpinnerGap"),W=require("phosphor-strokes-icons/icons/TelegramLogo"),x=require("phosphor-strokes-icons/icons/Trash"),E=require("phosphor-strokes-icons/icons/UserCircleGear"),M=require("phosphor-strokes-icons/icons/Users"),A=require("phosphor-strokes-icons/icons/UsersFour"),I=require("phosphor-strokes-icons/icons/Warning"),X=require("phosphor-strokes-icons/icons/WarningCircle"),_=require("phosphor-strokes-icons/icons/WhatsAppLogoFilled"),v=require("phosphor-strokes-icons/icons/Wrench"),K=require("phosphor-strokes-icons/icons/X"),R=require("phosphor-strokes-icons/icons/XCircle"),z=require("./components-icons-stroke-icon.cjs"),H=require("./components-ui-icon-icon-presets.cjs");Object.defineProperty(exports,"ArrowCounterClockwise",{enumerable:!0,get:()=>e.ArrowCounterClockwise});Object.defineProperty(exports,"BoundingBox",{enumerable:!0,get:()=>r.BoundingBox});Object.defineProperty(exports,"Briefcase",{enumerable:!0,get:()=>t.Briefcase});Object.defineProperty(exports,"Building",{enumerable:!0,get:()=>n.Building});Object.defineProperty(exports,"Buildings",{enumerable:!0,get:()=>o.Buildings});Object.defineProperty(exports,"CaretDown",{enumerable:!0,get:()=>i.CaretDown});Object.defineProperty(exports,"CaretLeft",{enumerable:!0,get:()=>u.CaretLeft});Object.defineProperty(exports,"CaretRight",{enumerable:!0,get:()=>c.CaretRight});Object.defineProperty(exports,"CaretUp",{enumerable:!0,get:()=>a.CaretUp});Object.defineProperty(exports,"CaretUpDown",{enumerable:!0,get:()=>l.CaretUpDown});Object.defineProperty(exports,"ChartLine",{enumerable:!0,get:()=>s.ChartLine});Object.defineProperty(exports,"Check",{enumerable:!0,get:()=>b.Check});Object.defineProperty(exports,"CheckCircle",{enumerable:!0,get:()=>g.CheckCircle});Object.defineProperty(exports,"Clock",{enumerable:!0,get:()=>p.Clock});Object.defineProperty(exports,"CreditCard",{enumerable:!0,get:()=>d.CreditCard});Object.defineProperty(exports,"DotsThree",{enumerable:!0,get:()=>P.DotsThree});Object.defineProperty(exports,"DownloadSimple",{enumerable:!0,get:()=>y.DownloadSimple});Object.defineProperty(exports,"EnvelopeSimple",{enumerable:!0,get:()=>f.EnvelopeSimple});Object.defineProperty(exports,"Eye",{enumerable:!0,get:()=>m.Eye});Object.defineProperty(exports,"EyeSlash",{enumerable:!0,get:()=>C.EyeSlash});Object.defineProperty(exports,"FileText",{enumerable:!0,get:()=>q.FileText});Object.defineProperty(exports,"Folder",{enumerable:!0,get:()=>j.Folder});Object.defineProperty(exports,"Funnel",{enumerable:!0,get:()=>O.Funnel});Object.defineProperty(exports,"Gear",{enumerable:!0,get:()=>h.Gear});Object.defineProperty(exports,"Info",{enumerable:!0,get:()=>k.Info});Object.defineProperty(exports,"LockKey",{enumerable:!0,get:()=>L.LockKey});Object.defineProperty(exports,"MagnifyingGlass",{enumerable:!0,get:()=>S.MagnifyingGlass});Object.defineProperty(exports,"MaxLogo",{enumerable:!0,get:()=>w.MaxLogo});Object.defineProperty(exports,"Package",{enumerable:!0,get:()=>B.Package});Object.defineProperty(exports,"Pencil",{enumerable:!0,get:()=>F.Pencil});Object.defineProperty(exports,"Phone",{enumerable:!0,get:()=>U.Phone});Object.defineProperty(exports,"Plus",{enumerable:!0,get:()=>T.Plus});Object.defineProperty(exports,"PresentationChart",{enumerable:!0,get:()=>D.PresentationChart});Object.defineProperty(exports,"SpinnerGap",{enumerable:!0,get:()=>G.SpinnerGap});Object.defineProperty(exports,"TelegramLogo",{enumerable:!0,get:()=>W.TelegramLogo});Object.defineProperty(exports,"Trash",{enumerable:!0,get:()=>x.Trash});Object.defineProperty(exports,"UserCircleGear",{enumerable:!0,get:()=>E.UserCircleGear});Object.defineProperty(exports,"Users",{enumerable:!0,get:()=>M.Users});Object.defineProperty(exports,"UsersFour",{enumerable:!0,get:()=>A.UsersFour});Object.defineProperty(exports,"Warning",{enumerable:!0,get:()=>I.Warning});Object.defineProperty(exports,"WarningCircle",{enumerable:!0,get:()=>X.WarningCircle});Object.defineProperty(exports,"WhatsAppLogoFilled",{enumerable:!0,get:()=>_.WhatsAppLogoFilled});Object.defineProperty(exports,"Wrench",{enumerable:!0,get:()=>v.Wrench});Object.defineProperty(exports,"X",{enumerable:!0,get:()=>K.X});Object.defineProperty(exports,"XCircle",{enumerable:!0,get:()=>R.XCircle});exports.StrokeIcon=z.StrokeIcon;exports.iconPresets=H.iconPresets;
|
|
2
|
+
//# sourceMappingURL=components-icons.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ArrowCounterClockwise as e } from "phosphor-strokes-icons/icons/ArrowCounterClockwise";
|
|
2
|
+
import { BoundingBox as p } from "phosphor-strokes-icons/icons/BoundingBox";
|
|
3
|
+
import { Briefcase as m } from "phosphor-strokes-icons/icons/Briefcase";
|
|
4
|
+
import { Building as n } from "phosphor-strokes-icons/icons/Building";
|
|
5
|
+
import { Buildings as a } from "phosphor-strokes-icons/icons/Buildings";
|
|
6
|
+
import { CaretDown as s } from "phosphor-strokes-icons/icons/CaretDown";
|
|
7
|
+
import { CaretLeft as c } from "phosphor-strokes-icons/icons/CaretLeft";
|
|
8
|
+
import { CaretRight as h } from "phosphor-strokes-icons/icons/CaretRight";
|
|
9
|
+
import { CaretUp as k } from "phosphor-strokes-icons/icons/CaretUp";
|
|
10
|
+
import { CaretUpDown as L } from "phosphor-strokes-icons/icons/CaretUpDown";
|
|
11
|
+
import { ChartLine as w } from "phosphor-strokes-icons/icons/ChartLine";
|
|
12
|
+
import { Check as F } from "phosphor-strokes-icons/icons/Check";
|
|
13
|
+
import { CheckCircle as U } from "phosphor-strokes-icons/icons/CheckCircle";
|
|
14
|
+
import { Clock as D } from "phosphor-strokes-icons/icons/Clock";
|
|
15
|
+
import { CreditCard as T } from "phosphor-strokes-icons/icons/CreditCard";
|
|
16
|
+
import { DotsThree as E } from "phosphor-strokes-icons/icons/DotsThree";
|
|
17
|
+
import { DownloadSimple as I } from "phosphor-strokes-icons/icons/DownloadSimple";
|
|
18
|
+
import { EnvelopeSimple as X } from "phosphor-strokes-icons/icons/EnvelopeSimple";
|
|
19
|
+
import { Eye as K } from "phosphor-strokes-icons/icons/Eye";
|
|
20
|
+
import { EyeSlash as b } from "phosphor-strokes-icons/icons/EyeSlash";
|
|
21
|
+
import { FileText as q } from "phosphor-strokes-icons/icons/FileText";
|
|
22
|
+
import { Folder as H } from "phosphor-strokes-icons/icons/Folder";
|
|
23
|
+
import { Funnel as N } from "phosphor-strokes-icons/icons/Funnel";
|
|
24
|
+
import { Gear as Q } from "phosphor-strokes-icons/icons/Gear";
|
|
25
|
+
import { Info as Y } from "phosphor-strokes-icons/icons/Info";
|
|
26
|
+
import { LockKey as _ } from "phosphor-strokes-icons/icons/LockKey";
|
|
27
|
+
import { MagnifyingGlass as rr } from "phosphor-strokes-icons/icons/MagnifyingGlass";
|
|
28
|
+
import { MaxLogo as er } from "phosphor-strokes-icons/icons/MaxLogo";
|
|
29
|
+
import { Package as pr } from "phosphor-strokes-icons/icons/Package";
|
|
30
|
+
import { Pencil as mr } from "phosphor-strokes-icons/icons/Pencil";
|
|
31
|
+
import { Phone as nr } from "phosphor-strokes-icons/icons/Phone";
|
|
32
|
+
import { Plus as ar } from "phosphor-strokes-icons/icons/Plus";
|
|
33
|
+
import { PresentationChart as sr } from "phosphor-strokes-icons/icons/PresentationChart";
|
|
34
|
+
import { SpinnerGap as cr } from "phosphor-strokes-icons/icons/SpinnerGap";
|
|
35
|
+
import { TelegramLogo as hr } from "phosphor-strokes-icons/icons/TelegramLogo";
|
|
36
|
+
import { Trash as kr } from "phosphor-strokes-icons/icons/Trash";
|
|
37
|
+
import { UserCircleGear as Lr } from "phosphor-strokes-icons/icons/UserCircleGear";
|
|
38
|
+
import { Users as wr } from "phosphor-strokes-icons/icons/Users";
|
|
39
|
+
import { UsersFour as Fr } from "phosphor-strokes-icons/icons/UsersFour";
|
|
40
|
+
import { Warning as Ur } from "phosphor-strokes-icons/icons/Warning";
|
|
41
|
+
import { WarningCircle as Dr } from "phosphor-strokes-icons/icons/WarningCircle";
|
|
42
|
+
import { WhatsAppLogoFilled as Tr } from "phosphor-strokes-icons/icons/WhatsAppLogoFilled";
|
|
43
|
+
import { Wrench as Er } from "phosphor-strokes-icons/icons/Wrench";
|
|
44
|
+
import { X as Ir } from "phosphor-strokes-icons/icons/X";
|
|
45
|
+
import { XCircle as Xr } from "phosphor-strokes-icons/icons/XCircle";
|
|
46
|
+
import { StrokeIcon as Kr } from "./components-icons-stroke-icon.js";
|
|
47
|
+
import { iconPresets as br } from "./components-ui-icon-icon-presets.js";
|
|
48
|
+
export {
|
|
49
|
+
e as ArrowCounterClockwise,
|
|
50
|
+
p as BoundingBox,
|
|
51
|
+
m as Briefcase,
|
|
52
|
+
n as Building,
|
|
53
|
+
a as Buildings,
|
|
54
|
+
s as CaretDown,
|
|
55
|
+
c as CaretLeft,
|
|
56
|
+
h as CaretRight,
|
|
57
|
+
k as CaretUp,
|
|
58
|
+
L as CaretUpDown,
|
|
59
|
+
w as ChartLine,
|
|
60
|
+
F as Check,
|
|
61
|
+
U as CheckCircle,
|
|
62
|
+
D as Clock,
|
|
63
|
+
T as CreditCard,
|
|
64
|
+
E as DotsThree,
|
|
65
|
+
I as DownloadSimple,
|
|
66
|
+
X as EnvelopeSimple,
|
|
67
|
+
K as Eye,
|
|
68
|
+
b as EyeSlash,
|
|
69
|
+
q as FileText,
|
|
70
|
+
H as Folder,
|
|
71
|
+
N as Funnel,
|
|
72
|
+
Q as Gear,
|
|
73
|
+
Y as Info,
|
|
74
|
+
_ as LockKey,
|
|
75
|
+
rr as MagnifyingGlass,
|
|
76
|
+
er as MaxLogo,
|
|
77
|
+
pr as Package,
|
|
78
|
+
mr as Pencil,
|
|
79
|
+
nr as Phone,
|
|
80
|
+
ar as Plus,
|
|
81
|
+
sr as PresentationChart,
|
|
82
|
+
cr as SpinnerGap,
|
|
83
|
+
Kr as StrokeIcon,
|
|
84
|
+
hr as TelegramLogo,
|
|
85
|
+
kr as Trash,
|
|
86
|
+
Lr as UserCircleGear,
|
|
87
|
+
wr as Users,
|
|
88
|
+
Fr as UsersFour,
|
|
89
|
+
Ur as Warning,
|
|
90
|
+
Dr as WarningCircle,
|
|
91
|
+
Tr as WhatsAppLogoFilled,
|
|
92
|
+
Er as Wrench,
|
|
93
|
+
Ir as X,
|
|
94
|
+
Xr as XCircle,
|
|
95
|
+
br as iconPresets
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=components-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */const
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
flex-col rounded-xl border`,ref:l,children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime"),j=require("phosphor-strokes-icons/icons/CaretDown"),y=require("phosphor-strokes-icons/icons/CaretUp"),_=require("phosphor-strokes-icons/icons/EnvelopeSimple"),k=require("phosphor-strokes-icons/icons/MaxLogo"),S=require("phosphor-strokes-icons/icons/Phone"),i=require("./components-icons-stroke-icon.cjs"),T=require("phosphor-strokes-icons/icons/TelegramLogo"),L=require("phosphor-strokes-icons/icons/WhatsAppLogoFilled");;/* empty css */const C=require("./lib-utils.cjs");require("class-variance-authority");require("./components-ui-badge-badge.styles.cjs");const F=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const N=require("./hooks-usePopupControls.cjs");require("./calendar-PqChui7l.cjs");require("phosphor-strokes-icons/icons");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");const c=require("react");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-toggle-toggle.styles.cjs");require("./components-ui-toggle-group-toggle-group.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");require("phosphor-strokes-icons/icons/CaretLeft");require("phosphor-strokes-icons/icons/CaretRight");require("./components-app-pagination-app-pagination.styles.cjs");require("phosphor-strokes-icons/icons/CaretUpDown");require("./components-app-sidebar-app-sidebar.styles.cjs");require("./components-data-table-data-table.styles.cjs");require("./components-ui-dropdown-menu-dropdown-menu.styles.cjs");const z=require("./components-input-field-input-field.cjs");require("phosphor-strokes-icons/icons/Eye");require("phosphor-strokes-icons/icons/EyeSlash");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-9H_9wEfR.cjs");require("phosphor-strokes-icons/icons/CheckCircle");require("phosphor-strokes-icons/icons/Info");require("phosphor-strokes-icons/icons/SpinnerGap");require("phosphor-strokes-icons/icons/Warning");require("phosphor-strokes-icons/icons/X");require("phosphor-strokes-icons/icons/XCircle");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");require("phosphor-strokes-icons/icons/Plus");const D=require("./components-input-phone-input-phone.cjs"),E=[{label:"Мобильный",icon:"phone"},{label:"Telegram",icon:"telegram-logo"},{label:"WhatsApp",icon:"whats-app-logo-filled"},{label:"Max",icon:"max-logo"},{label:"E-mail",icon:"envelope-simple"}],h={phone:S.Phone,"telegram-logo":T.TelegramLogo,"whats-app-logo-filled":L.WhatsAppLogoFilled,"max-logo":k.MaxLogo,"envelope-simple":_.EnvelopeSimple},x=o=>{switch(o){case"max-logo":return{bgColor:"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]"};case"telegram-logo":return{bgColor:"bg-[#289AD2]"};case"whats-app-logo-filled":return{bgColor:"bg-[#00C202]",textColor:"text-[#00C202]"};default:return{}}},a=o=>({wrapper:C.cn(`flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm
|
|
2
|
+
${x(o).bgColor??"bg-primary-inverse-hover-bg"}
|
|
3
|
+
${x(o).textColor??"text-primary-inverse-text"}`),icon:"size-5 shrink-0"}),O=o=>{const{inputProps:b,inputPhoneProps:f,onTypeChange:v,...p}=o,[n,I]=c.useState("phone"),{isOpened:s,openPopup:q,closePopup:u}=N.usePopupControls(),l=c.useRef(null);c.useEffect(()=>{const e=t=>{l.current&&!l.current.contains(t.target)&&u()};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s,u]);const m=e=>{switch(e){case"phone":return"+7 (999) 999-99-99";case"telegram-logo":return"@username";case"whats-app-logo-filled":return"+7 (999) 999-99-99";case"max-logo":return"ID пользователя Max";case"envelope-simple":return"example@mail.com";default:return"Введите значение"}},w=e=>()=>{I(e),v?.(e),u()},d=h[n],g=s?y.CaretUp:j.CaretDown;return r.jsxs("div",{className:C.cn("relative",o.classes?.container),children:[["telegram-logo","max-logo","envelope-simple"].includes(n)?r.jsx(z.InputField,{...b,...p,date:[{id:"0",position:"inline-start",component:r.jsx(i.StrokeIcon,{icon:d,size:"medium",classes:a(n)})},{id:"1",position:"inline-end",component:r.jsx(i.StrokeIcon,{icon:g,size:"medium",className:"cursor-pointer",onClick:q})}],placeholder:m(n)}):r.jsx(D.InputPhone,{...f,...p,date:[{id:"0",position:"inline-start",component:r.jsx(i.StrokeIcon,{icon:d,size:"medium",classes:a(n)})},{id:"1",position:"inline-end",component:r.jsx(i.StrokeIcon,{icon:g,size:"medium",className:"cursor-pointer",onClick:q})}],placeholder:m(n)}),s&&r.jsx("div",{className:`border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
|
|
4
|
+
flex-col rounded-xl border`,ref:l,children:E.map(({label:e,icon:t})=>{const P=h[t];return r.jsxs(F.Button,{variant:"ghost",className:"flex w-full justify-start",type:"button",onClick:w(t),children:[r.jsx(i.StrokeIcon,{icon:P,size:"medium",className:"text-primary-inverse-text",classes:a(t)}),e]},e)})})]})};exports.InputContact=O;
|
|
5
5
|
//# sourceMappingURL=components-input-contact-input-contact.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":"uqEAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,eAAA,EAER,CACE,MAAO,WACP,KAAM,uBAAA,EAER,CACE,MAAO,MACP,KAAM,UAAA,EAER,CACE,MAAO,SACP,KAAM,iBAAA,CAEV,ECmBMC,EAAcC,GAAsB,CACxC,OAAQA,EAAA,CACN,IAAK,WACH,MAAO,CACL,QAAS,kEAAA,EAGb,IAAK,gBACH,MAAO,CACL,QAAS,cAAA,EAGb,IAAK,wBACH,MAAO,CACL,QAAS,eACT,UAAW,gBAAA,EAGf,QACE,MAAO,CAAA,CAAC,CAEd,EAEMC,EAAyBD,IAAuB,CACpD,QAASE,EAAAA,GACP;AAAA,MACEH,EAAWC,CAAI,EAAE,SAAW,6BAA6B;AAAA,MACzDD,EAAWC,CAAI,EAAE,WAAa,2BAA2B,EAAA,EAE7D,KAAM,iBACR,GAEaG,EAAgBC,GAAiB,CAC5C,KAAM,CAAE,WAAAC,EAAY,gBAAAC,EAAiB,aAAAC,EAAc,GAAGC,GAASJ,EAEzD,CAACK,EAAMC,CAAO,EAAIC,EAAAA,SAAsB,OAAO,EAC/C,CAAE,SAAAC,EAAU,UAAAC,EAAW,WAAAC,CAAA,EAAeC,EAAAA,iBAAA,EACtCC,EAAaC,EAAAA,OAAuB,IAAI,EAE9CC,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAsBC,GAAsB,CAC5CJ,EAAW,SAAW,CAACA,EAAW,QAAQ,SAASI,EAAM,MAAc,GACzEN,EAAA,CAEJ,EAEA,OAAIF,GACF,SAAS,iBAAiB,YAAaO,CAAkB,EAGpD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ASC,CAAA,CAAA,CACX,CAEJ,EAEF,YAAaQ,EAAeZ,CAAI,CAAA,CAAA,EAInCG,GACCY,EAAAA,IAAC,MAAA,CACC,UAAU;AAAA,wCAEV,IAAKR,EAEJ,WAAQ,IAAI,CAAC,CAAE,MAAAY,EAAO,KAAA5B,KAEnBuB,EAAAA,KAACM,EAAAA,OAAA,CAEC,QAAQ,QACR,UAAU,4BACV,KAAK,SACL,QAASP,EAAiBtB,CAAI,EAE9B,SAAA,CAAAwB,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAM1B,EACN,KAAK,SACL,UAAU,4BACV,QAASC,EAAsBD,CAAI,CAAA,CAAA,EAGpC4B,CAAA,CAAA,EAbIA,CAAA,CAgBV,CAAA,CAAA,CACH,EAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport { CaretDown } from \"@/components/icons/CaretDown\";\nimport { CaretUp } from \"@/components/icons/CaretUp\";\nimport { EnvelopeSimple } from \"@/components/icons/EnvelopeSimple\";\nimport { MaxLogo } from \"@/components/icons/MaxLogo\";\nimport { Phone } from \"@/components/icons/Phone\";\nimport { StrokeIcon, type StrokeIconComponent } from \"@/components/icons/stroke-icon\";\nimport { TelegramLogo } from \"@/components/icons/TelegramLogo\";\nimport { WhatsAppLogoFilled } from \"@/components/icons/WhatsAppLogoFilled\";\nimport {\n Button,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\nconst contactIcons: Record<TypesChange, StrokeIconComponent> = {\n phone: Phone,\n \"telegram-logo\": TelegramLogo,\n \"whats-app-logo-filled\": WhatsAppLogoFilled,\n \"max-logo\": MaxLogo,\n \"envelope-simple\": EnvelopeSimple,\n};\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n const SelectedIcon = contactIcons[type];\n const ToggleIcon = isOpened ? CaretUp : CaretDown;\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const OptionIcon = contactIcons[icon];\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <StrokeIcon\n icon={OptionIcon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","contactIcons","Phone","TelegramLogo","WhatsAppLogoFilled","MaxLogo","EnvelopeSimple","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","SelectedIcon","ToggleIcon","CaretUp","CaretDown","jsxs","jsx","InputField","StrokeIcon","InputPhone","label","OptionIcon","Button"],"mappings":"ooGAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,eAAA,EAER,CACE,MAAO,WACP,KAAM,uBAAA,EAER,CACE,MAAO,MACP,KAAM,UAAA,EAER,CACE,MAAO,SACP,KAAM,iBAAA,CAEV,ECQMC,EAAyD,CAC7D,MAAOC,EAAAA,MACP,gBAAiBC,EAAAA,aACjB,wBAAyBC,EAAAA,mBACzB,WAAYC,EAAAA,QACZ,kBAAmBC,EAAAA,cACrB,EAoBMC,EAAcC,GAAsB,CACxC,OAAQA,EAAA,CACN,IAAK,WACH,MAAO,CACL,QAAS,kEAAA,EAGb,IAAK,gBACH,MAAO,CACL,QAAS,cAAA,EAGb,IAAK,wBACH,MAAO,CACL,QAAS,eACT,UAAW,gBAAA,EAGf,QACE,MA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
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { CaretDown as k } from "phosphor-strokes-icons/icons/CaretDown";
|
|
3
|
+
import { CaretUp as N } from "phosphor-strokes-icons/icons/CaretUp";
|
|
4
|
+
import { EnvelopeSimple as T } from "phosphor-strokes-icons/icons/EnvelopeSimple";
|
|
5
|
+
import { MaxLogo as z } from "phosphor-strokes-icons/icons/MaxLogo";
|
|
6
|
+
import { Phone as S } from "phosphor-strokes-icons/icons/Phone";
|
|
7
|
+
import { StrokeIcon as n } from "./components-icons-stroke-icon.js";
|
|
8
|
+
import { TelegramLogo as D } from "phosphor-strokes-icons/icons/TelegramLogo";
|
|
9
|
+
import { WhatsAppLogoFilled as E } from "phosphor-strokes-icons/icons/WhatsAppLogoFilled";
|
|
2
10
|
import './brd-ui-kit.css';/* empty css */
|
|
3
|
-
import { cn as
|
|
11
|
+
import { cn as C } from "./lib-utils.js";
|
|
4
12
|
import "class-variance-authority";
|
|
5
|
-
import { useState as y, useRef as w, useEffect as P } from "react";
|
|
6
13
|
import "./components-ui-badge-badge.styles.js";
|
|
7
|
-
import { Button as
|
|
14
|
+
import { Button as L } from "./components-ui-button-button.js";
|
|
8
15
|
import "./components-ui-button-button.styles.js";
|
|
9
16
|
import "./components-ui-card-card.js";
|
|
10
17
|
import "./components-ui-checkbox-checkbox.js";
|
|
11
|
-
import {
|
|
12
|
-
import "./calendar-
|
|
18
|
+
import { usePopupControls as O } from "./hooks-usePopupControls.js";
|
|
19
|
+
import "./calendar-XWqEaWHP.js";
|
|
20
|
+
import "phosphor-strokes-icons/icons";
|
|
13
21
|
import "./components-ui-combobox-combobox.js";
|
|
14
22
|
import "./components-ui-dialog-dialog.js";
|
|
23
|
+
import { useState as j, useRef as F, useEffect as A } from "react";
|
|
15
24
|
import "./components-ui-label-label.js";
|
|
16
25
|
import "./components-ui-separator-separator.js";
|
|
17
26
|
import "./components-ui-field-field.styles.js";
|
|
@@ -30,19 +39,30 @@ import "./components-ui-table-table.js";
|
|
|
30
39
|
import "./components-ui-tabs-tabs.js";
|
|
31
40
|
import "./components-ui-tooltip-tooltip.js";
|
|
32
41
|
import "./components-ui-typography-typography.styles.js";
|
|
33
|
-
import
|
|
42
|
+
import "phosphor-strokes-icons/icons/CaretLeft";
|
|
43
|
+
import "phosphor-strokes-icons/icons/CaretRight";
|
|
34
44
|
import "./components-app-pagination-app-pagination.styles.js";
|
|
45
|
+
import "phosphor-strokes-icons/icons/CaretUpDown";
|
|
35
46
|
import "./components-app-sidebar-app-sidebar.styles.js";
|
|
36
47
|
import "./components-data-table-data-table.styles.js";
|
|
37
48
|
import "./components-ui-dropdown-menu-dropdown-menu.styles.js";
|
|
38
|
-
import { InputField as
|
|
49
|
+
import { InputField as M } from "./components-input-field-input-field.js";
|
|
50
|
+
import "phosphor-strokes-icons/icons/Eye";
|
|
51
|
+
import "phosphor-strokes-icons/icons/EyeSlash";
|
|
39
52
|
import "./components-select-field-select-field.js";
|
|
40
53
|
import "./lodash-FemA_LCk.js";
|
|
41
|
-
import "./chart-
|
|
54
|
+
import "./chart-DFbmMKiQ.js";
|
|
55
|
+
import "phosphor-strokes-icons/icons/CheckCircle";
|
|
56
|
+
import "phosphor-strokes-icons/icons/Info";
|
|
57
|
+
import "phosphor-strokes-icons/icons/SpinnerGap";
|
|
58
|
+
import "phosphor-strokes-icons/icons/Warning";
|
|
59
|
+
import "phosphor-strokes-icons/icons/X";
|
|
60
|
+
import "phosphor-strokes-icons/icons/XCircle";
|
|
42
61
|
import "./index-C4iHL8Gs.js";
|
|
43
62
|
import "./index-C6N9aMq_.js";
|
|
44
|
-
import
|
|
45
|
-
|
|
63
|
+
import "phosphor-strokes-icons/icons/Plus";
|
|
64
|
+
import { InputPhone as _ } from "./components-input-phone-input-phone.js";
|
|
65
|
+
const B = [
|
|
46
66
|
{
|
|
47
67
|
label: "Мобильный",
|
|
48
68
|
icon: "phone"
|
|
@@ -63,7 +83,13 @@ const T = [
|
|
|
63
83
|
label: "E-mail",
|
|
64
84
|
icon: "envelope-simple"
|
|
65
85
|
}
|
|
66
|
-
],
|
|
86
|
+
], h = {
|
|
87
|
+
phone: S,
|
|
88
|
+
"telegram-logo": D,
|
|
89
|
+
"whats-app-logo-filled": E,
|
|
90
|
+
"max-logo": z,
|
|
91
|
+
"envelope-simple": T
|
|
92
|
+
}, x = (t) => {
|
|
67
93
|
switch (t) {
|
|
68
94
|
case "max-logo":
|
|
69
95
|
return {
|
|
@@ -81,25 +107,25 @@ const T = [
|
|
|
81
107
|
default:
|
|
82
108
|
return {};
|
|
83
109
|
}
|
|
84
|
-
},
|
|
85
|
-
wrapper:
|
|
110
|
+
}, s = (t) => ({
|
|
111
|
+
wrapper: C(
|
|
86
112
|
`flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm
|
|
87
|
-
${
|
|
88
|
-
${
|
|
113
|
+
${x(t).bgColor ?? "bg-primary-inverse-hover-bg"}
|
|
114
|
+
${x(t).textColor ?? "text-primary-inverse-text"}`
|
|
89
115
|
),
|
|
90
116
|
icon: "size-5 shrink-0"
|
|
91
|
-
}),
|
|
92
|
-
const { inputProps:
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
117
|
+
}), Xo = (t) => {
|
|
118
|
+
const { inputProps: b, inputPhoneProps: v, onTypeChange: w, ...a } = t, [r, y] = j("phone"), { isOpened: m, openPopup: c, closePopup: p } = O(), l = F(null);
|
|
119
|
+
A(() => {
|
|
120
|
+
const o = (i) => {
|
|
121
|
+
l.current && !l.current.contains(i.target) && p();
|
|
96
122
|
};
|
|
97
|
-
return
|
|
98
|
-
document.removeEventListener("mousedown",
|
|
123
|
+
return m && document.addEventListener("mousedown", o), () => {
|
|
124
|
+
document.removeEventListener("mousedown", o);
|
|
99
125
|
};
|
|
100
|
-
}, [
|
|
101
|
-
const u = (
|
|
102
|
-
switch (
|
|
126
|
+
}, [m, p]);
|
|
127
|
+
const u = (o) => {
|
|
128
|
+
switch (o) {
|
|
103
129
|
case "phone":
|
|
104
130
|
return "+7 (999) 999-99-99";
|
|
105
131
|
case "telegram-logo":
|
|
@@ -113,35 +139,35 @@ const T = [
|
|
|
113
139
|
default:
|
|
114
140
|
return "Введите значение";
|
|
115
141
|
}
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
["telegram-logo", "max-logo", "envelope-simple"].includes(r) ? /* @__PURE__ */
|
|
121
|
-
|
|
142
|
+
}, I = (o) => () => {
|
|
143
|
+
y(o), w?.(o), p();
|
|
144
|
+
}, d = h[r], g = m ? N : k;
|
|
145
|
+
return /* @__PURE__ */ f("div", { className: C("relative", t.classes?.container), children: [
|
|
146
|
+
["telegram-logo", "max-logo", "envelope-simple"].includes(r) ? /* @__PURE__ */ e(
|
|
147
|
+
M,
|
|
122
148
|
{
|
|
123
|
-
...
|
|
149
|
+
...b,
|
|
124
150
|
...a,
|
|
125
151
|
date: [
|
|
126
152
|
{
|
|
127
153
|
id: "0",
|
|
128
154
|
position: "inline-start",
|
|
129
|
-
component: /* @__PURE__ */
|
|
130
|
-
|
|
155
|
+
component: /* @__PURE__ */ e(
|
|
156
|
+
n,
|
|
131
157
|
{
|
|
132
|
-
|
|
158
|
+
icon: d,
|
|
133
159
|
size: "medium",
|
|
134
|
-
classes:
|
|
160
|
+
classes: s(r)
|
|
135
161
|
}
|
|
136
162
|
)
|
|
137
163
|
},
|
|
138
164
|
{
|
|
139
165
|
id: "1",
|
|
140
166
|
position: "inline-end",
|
|
141
|
-
component: /* @__PURE__ */
|
|
142
|
-
|
|
167
|
+
component: /* @__PURE__ */ e(
|
|
168
|
+
n,
|
|
143
169
|
{
|
|
144
|
-
|
|
170
|
+
icon: g,
|
|
145
171
|
size: "medium",
|
|
146
172
|
className: "cursor-pointer",
|
|
147
173
|
onClick: c
|
|
@@ -151,31 +177,31 @@ const T = [
|
|
|
151
177
|
],
|
|
152
178
|
placeholder: u(r)
|
|
153
179
|
}
|
|
154
|
-
) : /* @__PURE__ */
|
|
155
|
-
|
|
180
|
+
) : /* @__PURE__ */ e(
|
|
181
|
+
_,
|
|
156
182
|
{
|
|
157
|
-
...
|
|
183
|
+
...v,
|
|
158
184
|
...a,
|
|
159
185
|
date: [
|
|
160
186
|
{
|
|
161
187
|
id: "0",
|
|
162
188
|
position: "inline-start",
|
|
163
|
-
component: /* @__PURE__ */
|
|
164
|
-
|
|
189
|
+
component: /* @__PURE__ */ e(
|
|
190
|
+
n,
|
|
165
191
|
{
|
|
166
|
-
|
|
192
|
+
icon: d,
|
|
167
193
|
size: "medium",
|
|
168
|
-
classes:
|
|
194
|
+
classes: s(r)
|
|
169
195
|
}
|
|
170
196
|
)
|
|
171
197
|
},
|
|
172
198
|
{
|
|
173
199
|
id: "1",
|
|
174
200
|
position: "inline-end",
|
|
175
|
-
component: /* @__PURE__ */
|
|
176
|
-
|
|
201
|
+
component: /* @__PURE__ */ e(
|
|
202
|
+
n,
|
|
177
203
|
{
|
|
178
|
-
|
|
204
|
+
icon: g,
|
|
179
205
|
size: "medium",
|
|
180
206
|
className: "cursor-pointer",
|
|
181
207
|
onClick: c
|
|
@@ -186,39 +212,42 @@ const T = [
|
|
|
186
212
|
placeholder: u(r)
|
|
187
213
|
}
|
|
188
214
|
),
|
|
189
|
-
|
|
215
|
+
m && /* @__PURE__ */ e(
|
|
190
216
|
"div",
|
|
191
217
|
{
|
|
192
218
|
className: `border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
|
|
193
219
|
flex-col rounded-xl border`,
|
|
194
|
-
ref:
|
|
195
|
-
children:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
ref: l,
|
|
221
|
+
children: B.map(({ label: o, icon: i }) => {
|
|
222
|
+
const P = h[i];
|
|
223
|
+
return /* @__PURE__ */ f(
|
|
224
|
+
L,
|
|
225
|
+
{
|
|
226
|
+
variant: "ghost",
|
|
227
|
+
className: "flex w-full justify-start",
|
|
228
|
+
type: "button",
|
|
229
|
+
onClick: I(i),
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ e(
|
|
232
|
+
n,
|
|
233
|
+
{
|
|
234
|
+
icon: P,
|
|
235
|
+
size: "medium",
|
|
236
|
+
className: "text-primary-inverse-text",
|
|
237
|
+
classes: s(i)
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
o
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
o
|
|
244
|
+
);
|
|
245
|
+
})
|
|
217
246
|
}
|
|
218
247
|
)
|
|
219
248
|
] });
|
|
220
249
|
};
|
|
221
250
|
export {
|
|
222
|
-
|
|
251
|
+
Xo as InputContact
|
|
223
252
|
};
|
|
224
253
|
//# sourceMappingURL=components-input-contact-input-contact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-contact-input-contact.js","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,IAAqB;AAAA,EAChC;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAEV,GCmBMC,IAAa,CAACC,MAAsB;AACxC,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAGb,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAGb,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,MAAA;AAAA,IAGf;AACE,aAAO,CAAA;AAAA,EAAC;AAEd,GAEMC,IAAwB,CAACD,OAAuB;AAAA,EACpD,SAASE;AAAA,IACP;AAAA,MACEH,EAAWC,CAAI,EAAE,WAAW,6BAA6B;AAAA,MACzDD,EAAWC,CAAI,EAAE,aAAa,2BAA2B;AAAA,EAAA;AAAA,EAE7D,MAAM;AACR,IAEaG,KAAe,CAACC,MAAiB;AAC5C,QAAM,EAAE,YAAAC,GAAY,iBAAAC,GAAiB,cAAAC,GAA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AAA;AAAA,kBACC,MAAM1B;AAAA,kBACN,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAASC,EAAsBD,CAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGpC4B;AAAA,YAAA;AAAA,UAAA;AAAA,UAbIA;AAAA,QAAA,CAgBV;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"components-input-contact-input-contact.js","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport { CaretDown } from \"@/components/icons/CaretDown\";\nimport { CaretUp } from \"@/components/icons/CaretUp\";\nimport { EnvelopeSimple } from \"@/components/icons/EnvelopeSimple\";\nimport { MaxLogo } from \"@/components/icons/MaxLogo\";\nimport { Phone } from \"@/components/icons/Phone\";\nimport { StrokeIcon, type StrokeIconComponent } from \"@/components/icons/stroke-icon\";\nimport { TelegramLogo } from \"@/components/icons/TelegramLogo\";\nimport { WhatsAppLogoFilled } from \"@/components/icons/WhatsAppLogoFilled\";\nimport {\n Button,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\nconst contactIcons: Record<TypesChange, StrokeIconComponent> = {\n phone: Phone,\n \"telegram-logo\": TelegramLogo,\n \"whats-app-logo-filled\": WhatsAppLogoFilled,\n \"max-logo\": MaxLogo,\n \"envelope-simple\": EnvelopeSimple,\n};\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n const SelectedIcon = contactIcons[type];\n const ToggleIcon = isOpened ? CaretUp : CaretDown;\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const OptionIcon = contactIcons[icon];\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <StrokeIcon\n icon={OptionIcon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","contactIcons","Phone","TelegramLogo","WhatsAppLogoFilled","MaxLogo","EnvelopeSimple","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","SelectedIcon","ToggleIcon","CaretUp","CaretDown","jsxs","jsx","InputField","StrokeIcon","InputPhone","label","OptionIcon","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,IAAqB;AAAA,EAChC;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAEV,GCQMC,IAAyD;AAAA,EAC7D,OAAOC;AAAA,EACP,iBAAiBC;AAAA,EACjB,yBAAyBC;AAAA,EACzB,YAAYC;AAAA,EACZ,mBAAmBC;AACrB,GAoBMC,IAAa,CAACC,MAAsB;AACxC,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAGb,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAGb,KAAK;AACH,aAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,MAAA;AAA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,IAAA;AAAA,IAInCG,KACC,gBAAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA;AAAA,QAEV,KAAKZ;AAAA,QAEJ,YAAQ,IAAI,CAAC,EAAE,OAAAgB,GAAO,MAAAhC,QAAW;AAChC,gBAAMiC,IAAaxC,EAAaO,CAAI;AAEpC,iBACE,gBAAA2B;AAAA,YAACO;AAAA,YAAA;AAAA,cAEC,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,MAAK;AAAA,cACL,SAASZ,EAAiBtB,CAAI;AAAA,cAE9B,UAAA;AAAA,gBAAA,gBAAA4B;AAAA,kBAACE;AAAA,kBAAA;AAAA,oBACC,MAAMG;AAAA,oBACN,MAAK;AAAA,oBACL,WAAU;AAAA,oBACV,SAAShC,EAAsBD,CAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGpCgC;AAAA,cAAA;AAAA,YAAA;AAAA,YAbIA;AAAA,UAAA;AAAA,QAgBX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./components-ui-field-field.cjs"),j=require("./components-ui-input-input.cjs"),o=require("./components-ui-input-group-input-group.cjs"),m=({date:p=[],isValid:l,disabled:e=!1,label:s,description:c,classes:u,ref:d,...a})=>{const t={...l===!0&&!e&&{"aria-valid":!0},...l===!1&&!e&&{"aria-invalid":!0},disabled:e};return n.jsx(i.FieldSet,{className:u?.fieldset,children:n.jsx(i.FieldGroup,{className:u?.fieldgroup,children:n.jsxs(i.Field,{className:u?.field,children:[s&&n.jsx(i.FieldLabel,{...t,children:s}),p.length>0?n.jsxs(o.InputGroup,{"data-slot":!0,children:[n.jsx(o.InputGroupInput,{ref:d,...a,...t,disabled:e}),p.map(r=>n.jsx(o.InputGroupAddon,{align:r.position,children:r.component},r.id))]}):n.jsx(j.Input,{ref:d,...a,...t,disabled:e}),c&&n.jsx(i.FieldDescription,{...t,children:c})]})})})};exports.InputField=m;
|
|
2
2
|
//# sourceMappingURL=components-input-field-input-field.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Input } from \"../ui/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"../ui/input-group\";\n\nexport type DateAddon = {\n id: string | number;\n position?: \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\" | null;\n component: ReactNode;\n};\n\ntype BaseProps = {\n date?: DateAddon[];\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n };\n};\n\ntype InputFieldProps = BaseProps & ComponentPropsWithRef<\"input\">;\n\nexport const InputField = ({\n date = [],\n isValid,\n disabled = false,\n label,\n description,\n classes,\n ref,\n ...rest\n}: InputFieldProps) => {\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n return (\n <FieldSet className={classes?.fieldset}>\n <FieldGroup className={classes?.fieldgroup}>\n <Field className={classes?.field}>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n {date.length > 0 ? (\n <InputGroup data-slot>\n <InputGroupInput\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n {date.map((e) => (\n <InputGroupAddon\n key={e.id}\n align={e.position}\n >\n {e.component}\n </InputGroupAddon>\n ))}\n </InputGroup>\n ) : (\n <Input\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n )}\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\ntype InputProps = InputFieldProps;\n\nexport type { InputFieldProps, InputProps };\n"],"names":["InputField","date","isValid","disabled","label","description","classes","ref","rest","validationProps","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","InputGroup","InputGroupInput","e","InputGroupAddon","Input","FieldDescription"],"mappings":"wQAyBaA,EAAa,CAAC,CACzB,KAAAC,EAAO,CAAA,EACP,QAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,IAAAC,EACA,GAAGC,CACL,IAAuB,CACrB,MAAMC,EAAkB,CACtB,GAAIP,IAAY,IAAQ,CAACC,GAAY,CAAE,aAAc,EAAA,EACrD,GAAID,IAAY,IAAS,CAACC,GAAY,CAAE,eAAgB,EAAA,EACxD,SAAAA,CAAA,EAGF,OACEO,EAAAA,IAACC,EAAAA,SAAA,CAAS,UAAWL,GAAS,SAC5B,SAAAI,EAAAA,IAACE,aAAA,CAAW,UAAWN,GAAS,WAC9B,SAAAO,OAACC,EAAAA,MAAA,CAAM,UAAWR,GAAS,MACxB,SAAA,CAAAF,GAASM,EAAAA,IAACK,aAAA,CAAY,GAAGN,EAAkB,SAAAL,EAAM,EACjDH,EAAK,OAAS,EACbY,EAAAA,KAACG,EAAAA,WAAA,CAAW,YAAS,GACnB,SAAA,CAAAN,EAAAA,IAACO,EAAAA,gBAAA,CACC,IAAAV,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAEDF,EAAK,IAAKiB,GACTR,EAAAA,IAACS,EAAAA,gBAAA,CAEC,MAAOD,EAAE,SAER,SAAAA,EAAE,SAAA,EAHEA,EAAE,EAAA,CAKV,CAAA,CAAA,CACH,EAEAR,EAAAA,IAACU,EAAAA,MAAA,CACC,IAAAb,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAGHE,GACCK,EAAAA,IAACW,EAAAA,iBAAA,CAAkB,GAAGZ,EAAkB,SAAAJ,CAAA,CAAY,CAAA,CAAA,CAExD,EACF,EACF,CAEJ"}
|