brd-ui-kit 0.1.54 → 0.1.57
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/.githooks/pre-commit +19 -0
- package/.prettierignore +13 -0
- package/components.json +25 -0
- package/dist/brd-ui-kit.css +1 -1
- package/dist/components/app-pagination.d.ts +2 -0
- package/dist/components/app-sidebar.d.ts +2 -0
- package/dist/components/avatar-uploader.d.ts +2 -0
- package/dist/components/basic-avatar.d.ts +2 -0
- package/dist/components/basic-chart.d.ts +2 -0
- package/dist/components/basic-checkbox.d.ts +2 -0
- package/dist/components/basic-drawer.d.ts +2 -0
- package/dist/components/basic-modal.d.ts +2 -0
- package/dist/components/basic-select.d.ts +2 -0
- package/dist/components/basic-table.d.ts +2 -0
- package/dist/components/basic-tooltip.d.ts +2 -0
- package/dist/components/files-uploader/files-uploader.d.ts +6 -3
- package/dist/components/files-uploader.d.ts +2 -0
- package/dist/components/input-field.d.ts +2 -0
- package/dist/components/input-password.d.ts +2 -0
- package/dist/components/popover-modal.d.ts +2 -0
- package/dist/components/radio-button.d.ts +2 -0
- package/dist/components/select-field.d.ts +2 -0
- package/dist/components/select-groups.d.ts +2 -0
- package/dist/components/textarea-field.d.ts +2 -0
- package/dist/components/ui/avatar.d.ts +2 -0
- package/dist/components/ui/badge.d.ts +2 -0
- package/dist/components/ui/button.d.ts +2 -0
- package/dist/components/ui/card.d.ts +2 -0
- package/dist/components/ui/chart.d.ts +2 -0
- package/dist/components/ui/checkbox.d.ts +2 -0
- package/dist/components/ui/combobox.d.ts +2 -0
- package/dist/components/ui/dialog.d.ts +2 -0
- package/dist/components/ui/drawer.d.ts +2 -0
- package/dist/components/ui/field.d.ts +2 -0
- package/dist/components/ui/icon.d.ts +2 -0
- package/dist/components/ui/input-group.d.ts +2 -0
- package/dist/components/ui/input.d.ts +2 -0
- package/dist/components/ui/label.d.ts +2 -0
- package/dist/components/ui/navigation-item.d.ts +2 -0
- package/dist/components/ui/navigation-menu.d.ts +2 -0
- package/dist/components/ui/pagination.d.ts +2 -0
- package/dist/components/ui/popover.d.ts +2 -0
- package/dist/components/ui/progress.d.ts +2 -0
- package/dist/components/ui/radio-group.d.ts +2 -0
- package/dist/components/ui/select.d.ts +2 -0
- package/dist/components/ui/separator.d.ts +2 -0
- package/dist/components/ui/sonner.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +2 -0
- package/dist/components/ui/table.d.ts +2 -0
- package/dist/components/ui/tabs.d.ts +2 -0
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/tooltip.d.ts +2 -0
- package/dist/components/ui/typography.d.ts +2 -0
- package/dist/components-app-pagination-app-pagination.cjs +2 -0
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -0
- package/dist/components-app-pagination-app-pagination.styles.cjs +3 -0
- package/dist/components-app-pagination-app-pagination.styles.cjs.map +1 -0
- package/dist/components-app-pagination.cjs +2 -0
- package/dist/components-app-pagination.cjs.map +1 -0
- package/dist/components-app-sidebar-app-sidebar.cjs +2 -0
- package/dist/components-app-sidebar-app-sidebar.cjs.map +1 -0
- package/dist/components-app-sidebar-app-sidebar.styles.cjs +2 -0
- package/dist/components-app-sidebar-app-sidebar.styles.cjs.map +1 -0
- package/dist/components-app-sidebar.cjs +2 -0
- package/dist/components-app-sidebar.cjs.map +1 -0
- package/dist/components-avatar-uploader-avatar-uploader.cjs +3 -0
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -0
- package/dist/components-avatar-uploader.cjs +2 -0
- package/dist/components-avatar-uploader.cjs.map +1 -0
- package/dist/components-basic-avatar-basic-avatar.cjs +4 -0
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -0
- package/dist/components-basic-avatar.cjs +2 -0
- package/dist/components-basic-avatar.cjs.map +1 -0
- package/dist/components-basic-chart-basic-chart.cjs +2 -0
- package/dist/components-basic-chart-basic-chart.cjs.map +1 -0
- package/dist/components-basic-chart.cjs +2 -0
- package/dist/components-basic-chart.cjs.map +1 -0
- package/dist/components-basic-checkbox-basic-checkbox.cjs +2 -0
- package/dist/components-basic-checkbox-basic-checkbox.cjs.map +1 -0
- package/dist/components-basic-checkbox.cjs +2 -0
- package/dist/components-basic-checkbox.cjs.map +1 -0
- package/dist/components-basic-drawer-basic-drawer.cjs +2 -0
- package/dist/components-basic-drawer-basic-drawer.cjs.map +1 -0
- package/dist/components-basic-drawer.cjs +2 -0
- package/dist/components-basic-drawer.cjs.map +1 -0
- package/dist/components-basic-modal-basic-modal.cjs +2 -0
- package/dist/components-basic-modal-basic-modal.cjs.map +1 -0
- package/dist/components-basic-modal.cjs +2 -0
- package/dist/components-basic-modal.cjs.map +1 -0
- package/dist/components-basic-select-basic-select.cjs +2 -0
- package/dist/components-basic-select-basic-select.cjs.map +1 -0
- package/dist/components-basic-select.cjs +2 -0
- package/dist/components-basic-select.cjs.map +1 -0
- package/dist/components-basic-table-basic-table.cjs +5 -0
- package/dist/components-basic-table-basic-table.cjs.map +1 -0
- package/dist/components-basic-table.cjs +2 -0
- package/dist/components-basic-table.cjs.map +1 -0
- package/dist/components-basic-tooltip-basic-tooltip.cjs +2 -0
- package/dist/components-basic-tooltip-basic-tooltip.cjs.map +1 -0
- package/dist/components-basic-tooltip.cjs +2 -0
- package/dist/components-basic-tooltip.cjs.map +1 -0
- package/dist/components-files-uploader-files-uploader.cjs +8 -0
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -0
- package/dist/components-files-uploader.cjs +2 -0
- package/dist/components-files-uploader.cjs.map +1 -0
- package/dist/components-input-field-input-field.cjs +2 -0
- package/dist/components-input-field-input-field.cjs.map +1 -0
- package/dist/components-input-field.cjs +2 -0
- package/dist/components-input-field.cjs.map +1 -0
- package/dist/components-input-password-input-password.cjs +2 -0
- package/dist/components-input-password-input-password.cjs.map +1 -0
- package/dist/components-input-password.cjs +2 -0
- package/dist/components-input-password.cjs.map +1 -0
- package/dist/components-popover-modal-popover-modal.cjs +2 -0
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -0
- package/dist/components-popover-modal.cjs +2 -0
- package/dist/components-popover-modal.cjs.map +1 -0
- package/dist/components-radio-button-radio-button.cjs +2 -0
- package/dist/components-radio-button-radio-button.cjs.map +1 -0
- package/dist/components-radio-button.cjs +2 -0
- package/dist/components-radio-button.cjs.map +1 -0
- package/dist/components-select-field-select-field.cjs +3 -0
- package/dist/components-select-field-select-field.cjs.map +1 -0
- package/dist/components-select-field.cjs +2 -0
- package/dist/components-select-field.cjs.map +1 -0
- package/dist/components-select-groups-select-groups.cjs +2 -0
- package/dist/components-select-groups-select-groups.cjs.map +1 -0
- package/dist/components-select-groups.cjs +2 -0
- package/dist/components-select-groups.cjs.map +1 -0
- package/dist/components-textarea-field-textarea-field.cjs +2 -0
- package/dist/components-textarea-field-textarea-field.cjs.map +1 -0
- package/dist/components-textarea-field.cjs +2 -0
- package/dist/components-textarea-field.cjs.map +1 -0
- package/dist/components-ui-avatar-avatar.cjs +15 -0
- package/dist/components-ui-avatar-avatar.cjs.map +1 -0
- package/dist/components-ui-avatar.cjs +2 -0
- package/dist/components-ui-avatar.cjs.map +1 -0
- package/dist/components-ui-badge-badge.cjs +2 -0
- package/dist/components-ui-badge-badge.cjs.map +1 -0
- package/dist/components-ui-badge-badge.styles.cjs +3 -0
- package/dist/components-ui-badge-badge.styles.cjs.map +1 -0
- package/dist/components-ui-badge.cjs +2 -0
- package/dist/components-ui-badge.cjs.map +1 -0
- package/dist/components-ui-button-button.cjs +2 -0
- package/dist/components-ui-button-button.cjs.map +1 -0
- package/dist/components-ui-button-button.styles.cjs +9 -0
- package/dist/components-ui-button-button.styles.cjs.map +1 -0
- package/dist/components-ui-button.cjs +2 -0
- package/dist/components-ui-button.cjs.map +1 -0
- package/dist/components-ui-card-card.cjs +2 -0
- package/dist/components-ui-card-card.cjs.map +1 -0
- package/dist/components-ui-card-card.styles.cjs +8 -0
- package/dist/components-ui-card-card.styles.cjs.map +1 -0
- package/dist/components-ui-card.cjs +2 -0
- package/dist/components-ui-card.cjs.map +1 -0
- package/dist/components-ui-chart-chart.cjs +22 -0
- package/dist/components-ui-chart-chart.cjs.map +1 -0
- package/dist/components-ui-chart.cjs +2 -0
- package/dist/components-ui-chart.cjs.map +1 -0
- package/dist/components-ui-checkbox-checkbox.cjs +2 -0
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -0
- package/dist/components-ui-checkbox-checkbox.styles.cjs +2 -0
- package/dist/components-ui-checkbox-checkbox.styles.cjs.map +1 -0
- package/dist/components-ui-checkbox.cjs +2 -0
- package/dist/components-ui-checkbox.cjs.map +1 -0
- package/dist/components-ui-combobox-combobox.cjs +16 -0
- package/dist/components-ui-combobox-combobox.cjs.map +1 -0
- package/dist/components-ui-combobox-combobox.styles.cjs +36 -0
- package/dist/components-ui-combobox-combobox.styles.cjs.map +1 -0
- package/dist/components-ui-combobox.cjs +2 -0
- package/dist/components-ui-combobox.cjs.map +1 -0
- package/dist/components-ui-dialog-dialog.cjs +2 -0
- package/dist/components-ui-dialog-dialog.cjs.map +1 -0
- package/dist/components-ui-dialog-dialog.styles.cjs +2 -0
- package/dist/components-ui-dialog-dialog.styles.cjs.map +1 -0
- package/dist/components-ui-dialog.cjs +2 -0
- package/dist/components-ui-dialog.cjs.map +1 -0
- package/dist/components-ui-drawer-drawer.cjs +30 -0
- package/dist/components-ui-drawer-drawer.cjs.map +1 -0
- package/dist/components-ui-drawer.cjs +2 -0
- package/dist/components-ui-drawer.cjs.map +1 -0
- package/dist/components-ui-field-field.cjs +2 -0
- package/dist/components-ui-field-field.cjs.map +1 -0
- package/dist/components-ui-field-field.styles.cjs +9 -0
- package/dist/components-ui-field-field.styles.cjs.map +1 -0
- package/dist/components-ui-field.cjs +2 -0
- package/dist/components-ui-field.cjs.map +1 -0
- package/dist/components-ui-icon-icon-dictionary.cjs +2 -0
- package/dist/components-ui-icon-icon-dictionary.cjs.map +1 -0
- package/dist/components-ui-icon-icon.cjs +2 -0
- package/dist/components-ui-icon-icon.cjs.map +1 -0
- package/dist/components-ui-icon-overrides.cjs +2 -0
- package/dist/components-ui-icon-overrides.cjs.map +1 -0
- package/dist/components-ui-icon.cjs +2 -0
- package/dist/components-ui-icon.cjs.map +1 -0
- package/dist/components-ui-input-group-input-group.cjs +14 -0
- package/dist/components-ui-input-group-input-group.cjs.map +1 -0
- package/dist/components-ui-input-group-input-group.styles.cjs +8 -0
- package/dist/components-ui-input-group-input-group.styles.cjs.map +1 -0
- package/dist/components-ui-input-group.cjs +2 -0
- package/dist/components-ui-input-group.cjs.map +1 -0
- package/dist/components-ui-input-input.cjs +2 -0
- package/dist/components-ui-input-input.cjs.map +1 -0
- package/dist/components-ui-input-input.styles.cjs +8 -0
- package/dist/components-ui-input-input.styles.cjs.map +1 -0
- package/dist/components-ui-input.cjs +2 -0
- package/dist/components-ui-input.cjs.map +1 -0
- package/dist/components-ui-label-label.cjs +2 -0
- package/dist/components-ui-label-label.cjs.map +1 -0
- package/dist/components-ui-label.cjs +2 -0
- package/dist/components-ui-label.cjs.map +1 -0
- package/dist/components-ui-navigation-item-navigation-item.cjs +2 -0
- package/dist/components-ui-navigation-item-navigation-item.cjs.map +1 -0
- package/dist/components-ui-navigation-item-navigation-item.styles.cjs +3 -0
- package/dist/components-ui-navigation-item-navigation-item.styles.cjs.map +1 -0
- package/dist/components-ui-navigation-item.cjs +2 -0
- package/dist/components-ui-navigation-item.cjs.map +1 -0
- package/dist/components-ui-navigation-menu-navigation-menu.cjs +2 -0
- package/dist/components-ui-navigation-menu-navigation-menu.cjs.map +1 -0
- package/dist/components-ui-navigation-menu-navigation-menu.styles.cjs +2 -0
- package/dist/components-ui-navigation-menu-navigation-menu.styles.cjs.map +1 -0
- package/dist/components-ui-navigation-menu.cjs +2 -0
- package/dist/components-ui-navigation-menu.cjs.map +1 -0
- package/dist/components-ui-pagination-pagination.cjs +2 -0
- package/dist/components-ui-pagination-pagination.cjs.map +1 -0
- package/dist/components-ui-pagination.cjs +2 -0
- package/dist/components-ui-pagination.cjs.map +1 -0
- package/dist/components-ui-popover-popover.cjs +2 -0
- package/dist/components-ui-popover-popover.cjs.map +1 -0
- package/dist/components-ui-popover-popover.styles.cjs +7 -0
- package/dist/components-ui-popover-popover.styles.cjs.map +1 -0
- package/dist/components-ui-popover.cjs +2 -0
- package/dist/components-ui-popover.cjs.map +1 -0
- package/dist/components-ui-progress-progress.cjs +2 -0
- package/dist/components-ui-progress-progress.cjs.map +1 -0
- package/dist/components-ui-progress.cjs +2 -0
- package/dist/components-ui-progress.cjs.map +1 -0
- package/dist/components-ui-radio-group-radio-group.cjs +2 -0
- package/dist/components-ui-radio-group-radio-group.cjs.map +1 -0
- package/dist/components-ui-radio-group-radio-group.styles.cjs +2 -0
- package/dist/components-ui-radio-group-radio-group.styles.cjs.map +1 -0
- package/dist/components-ui-radio-group.cjs +2 -0
- package/dist/components-ui-radio-group.cjs.map +1 -0
- package/dist/components-ui-select-select.cjs +2 -0
- package/dist/components-ui-select-select.cjs.map +1 -0
- package/dist/components-ui-select-select.styles.cjs +31 -0
- package/dist/components-ui-select-select.styles.cjs.map +1 -0
- package/dist/components-ui-select.cjs +2 -0
- package/dist/components-ui-select.cjs.map +1 -0
- package/dist/components-ui-separator-separator.cjs +2 -0
- package/dist/components-ui-separator-separator.cjs.map +1 -0
- package/dist/components-ui-separator.cjs +2 -0
- package/dist/components-ui-separator.cjs.map +1 -0
- package/dist/components-ui-sonner-sonner.cjs +2 -0
- package/dist/components-ui-sonner-sonner.cjs.map +1 -0
- package/dist/components-ui-sonner-sonner.styles.cjs +36 -0
- package/dist/components-ui-sonner-sonner.styles.cjs.map +1 -0
- package/dist/components-ui-sonner.cjs +2 -0
- package/dist/components-ui-sonner.cjs.map +1 -0
- package/dist/components-ui-switch-switch.cjs +2 -0
- package/dist/components-ui-switch-switch.cjs.map +1 -0
- package/dist/components-ui-switch-switch.styles.cjs +2 -0
- package/dist/components-ui-switch-switch.styles.cjs.map +1 -0
- package/dist/components-ui-switch.cjs +2 -0
- package/dist/components-ui-switch.cjs.map +1 -0
- package/dist/components-ui-table-table.cjs +5 -0
- package/dist/components-ui-table-table.cjs.map +1 -0
- package/dist/components-ui-table.cjs +2 -0
- package/dist/components-ui-table.cjs.map +1 -0
- package/dist/components-ui-tabs-tabs.cjs +3 -0
- package/dist/components-ui-tabs-tabs.cjs.map +1 -0
- package/dist/components-ui-tabs-tabs.styles.cjs +2 -0
- package/dist/components-ui-tabs-tabs.styles.cjs.map +1 -0
- package/dist/components-ui-tabs.cjs +2 -0
- package/dist/components-ui-tabs.cjs.map +1 -0
- package/dist/components-ui-textarea-textarea.cjs +2 -0
- package/dist/components-ui-textarea-textarea.cjs.map +1 -0
- package/dist/components-ui-textarea-textarea.styles.cjs +5 -0
- package/dist/components-ui-textarea-textarea.styles.cjs.map +1 -0
- package/dist/components-ui-textarea.cjs +2 -0
- package/dist/components-ui-textarea.cjs.map +1 -0
- package/dist/components-ui-tooltip-tooltip.cjs +2 -0
- package/dist/components-ui-tooltip-tooltip.cjs.map +1 -0
- package/dist/components-ui-tooltip-tooltip.styles.cjs +8 -0
- package/dist/components-ui-tooltip-tooltip.styles.cjs.map +1 -0
- package/dist/components-ui-tooltip.cjs +2 -0
- package/dist/components-ui-tooltip.cjs.map +1 -0
- package/dist/components-ui-typography-typography.cjs +2 -0
- package/dist/components-ui-typography-typography.cjs.map +1 -0
- package/dist/components-ui-typography-typography.styles.cjs +2 -0
- package/dist/components-ui-typography-typography.styles.cjs.map +1 -0
- package/dist/components-ui-typography.cjs +2 -0
- package/dist/components-ui-typography.cjs.map +1 -0
- package/dist/hooks-usePopupControls.cjs +2 -0
- package/dist/hooks-usePopupControls.cjs.map +1 -0
- package/dist/index.cjs +1 -370
- package/dist/index.cjs.map +1 -1
- package/dist/lib-utils.cjs +2 -0
- package/dist/lib-utils.cjs.map +1 -0
- package/dist/types-types.cjs +2 -0
- package/dist/types-types.cjs.map +1 -0
- package/dist/utils-helpers.cjs +2 -0
- package/dist/utils-helpers.cjs.map +1 -0
- package/package.json +639 -12
- package/prettier.config.mjs +28 -0
- package/public/vite.svg +1 -0
- package/scripts/generate-exports.js +76 -0
- package/scripts/get-entry-points.ts +102 -0
- package/tsconfig.app.json +40 -0
- package/tsconfig.node.json +26 -0
- package/tsconfig.storybook.json +7 -0
- package/dist/components/app-pagination/app-pagination.stories.d.ts +0 -52
- package/dist/components/app-sidebar/app-sidebar.stories.d.ts +0 -52
- package/dist/components/avatar-uploader/avatar-uploader.stories.d.ts +0 -7
- package/dist/components/basic-avatar/basic-avatar.stories.d.ts +0 -15
- package/dist/components/basic-chart/basic-chart.stories.d.ts +0 -23
- package/dist/components/basic-checkbox/basic-checkbox.stories.d.ts +0 -37
- package/dist/components/basic-drawer/basic-drawer.stories.d.ts +0 -7
- package/dist/components/basic-modal/basic-modal.stories.d.ts +0 -57
- package/dist/components/basic-select/basic-select.stories.d.ts +0 -10
- package/dist/components/basic-table/basic-table.stories.d.ts +0 -9
- package/dist/components/files-uploader/files-uploader.stories.d.ts +0 -70
- package/dist/components/input-field/input-field.stories.d.ts +0 -48
- package/dist/components/input-password/input-password.stories.d.ts +0 -57
- package/dist/components/popover-modal/popover-modal.stories.d.ts +0 -32
- package/dist/components/radio-button/radio-button.stories.d.ts +0 -28
- package/dist/components/select-field/select-field.stories.d.ts +0 -39
- package/dist/components/select-groups/select-groups.stories.d.ts +0 -50
- package/dist/components/textarea-field/textarea-field.stories.d.ts +0 -43
- package/dist/components/ui/badge/badge.stories.d.ts +0 -29
- package/dist/components/ui/button/button.stories.d.ts +0 -30
- package/dist/components/ui/card/card.stories.d.ts +0 -38
- package/dist/components/ui/checkbox/checkbox.stories.d.ts +0 -29
- package/dist/components/ui/combobox/combobox.stories.d.ts +0 -10
- package/dist/components/ui/dialog/dialog.stories.d.ts +0 -46
- package/dist/components/ui/field/field.stories.d.ts +0 -45
- package/dist/components/ui/icon/icon.stories.d.ts +0 -28
- package/dist/components/ui/input/input.stories.d.ts +0 -40
- package/dist/components/ui/input-group/input-group.stories.d.ts +0 -46
- package/dist/components/ui/label/label.stories.d.ts +0 -26
- package/dist/components/ui/navigation-item/navigation-item.stories.d.ts +0 -57
- package/dist/components/ui/navigation-menu/navigation-menu.stories.d.ts +0 -34
- package/dist/components/ui/pagination/pagination.stories.d.ts +0 -37
- package/dist/components/ui/popover/popover.stories.d.ts +0 -9
- package/dist/components/ui/progress/progress.stories.d.ts +0 -34
- package/dist/components/ui/radio-group/radio-group.stories.d.ts +0 -27
- package/dist/components/ui/select/select.stories.d.ts +0 -38
- package/dist/components/ui/separator/separator.stories.d.ts +0 -27
- package/dist/components/ui/sonner/sonner.stories.d.ts +0 -9
- package/dist/components/ui/switch/switch.stories.d.ts +0 -23
- package/dist/components/ui/table/table.stories.d.ts +0 -68
- package/dist/components/ui/tabs/tabs.stories.d.ts +0 -32
- package/dist/components/ui/textarea/textarea.stories.d.ts +0 -30
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +0 -42
- package/dist/components/ui/typography/typography.stories.d.ts +0 -304
- package/dist/index.js +0 -47251
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-basic-tooltip.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("./lib-utils.cjs"),b=require("react"),q=require("react-dropzone"),h=require("./components-ui-icon-icon.cjs"),L=require("./components-ui-typography-typography.cjs");require("./components-ui-typography-typography.styles.cjs");const $=["B","KB","MB","GB","TB"],u=1024,B=5*u*u,P=5,C=["all"],F=800,k={image:{"image/*":[".jpg",".jpeg",".png",".webp"]},pdf:{"application/pdf":[".pdf"]},doc:{"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"]},excel:{"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"]},text:{"text/plain":[".txt"]},all:{}},O=r=>{if(r===0)return"0 B";const e=Math.floor(Math.log(r)/Math.log(u));return`${(r/Math.pow(u,e)).toFixed(2)} ${$[e]}`},z=r=>r.reduce((e,l)=>({...e,...k[l]}),{}),Z=r=>{const e=r.name.split(".").pop()?.toLowerCase();return e?["jpg","jpeg","png","webp"].includes(e)?"image":e==="pdf"?"pdf":["doc","docx"].includes(e)?"doc":["xls","xlsx"].includes(e)?"excel":e==="txt"?"text":"other":"other"},K=({value:r=null,onChange:e,multiple:l=!1,maxFiles:i=P,disabled:y=!1,className:p,maxSize:g=B,variant:m="grid",accepts:T=C,icon:U,title:j,text:v,showFiles:_=!0})=>{const[f,w]=b.useState(!1),[A,x]=b.useState(null),s=Array.isArray(r)?r:r?[r]:[],E=b.useCallback((o,n)=>{if(x(null),s.length+o.length>i){x(`Максимальное количество файлов: ${i}`);return}if(n.length>0){const c=n[0].errors[0]?.code==="file-too-large"?`Файл слишком большой. Максимальный размер: ${g/1024/1024}MB`:"Неподдерживаемый формат файла";x(c);return}w(!0),setTimeout(()=>{const a=o.map(c=>({url:URL.createObjectURL(c),name:c.name,size:O(c.size),addedAt:new Date().toISOString()}));l?e?.([...s,...a]):(s[0]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[0].url),e?.(a[0]??null)),w(!1)},F)},[s,i,g,l,e]),{getRootProps:I,getInputProps:M,isDragActive:D}=q.useDropzone({onDrop:E,accept:z(T),maxSize:g,multiple:l&&i>1,disabled:y||f,maxFiles:i-s.length}),N=o=>()=>{s[o]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[o].url);const n=s.filter((a,c)=>c!==o);e?.(l?n:n[0]||null)},R=s.length>=i,S={grid:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4",list:"grid-cols-1",compact:"grid-cols-2 sm:grid-cols-3"};return t.jsxs("div",{className:d.cn("w-full space-y-4",p?.container),children:[t.jsxs("div",{className:d.cn("grid h-full w-full gap-4",m==="list"?"grid-cols-1":S[m]),children:[_&&s.map((o,n)=>{const a=Z(o);return t.jsxs("div",{className:`group bg-primary-bg relative aspect-square h-full w-full
|
|
2
|
+
overflow-hidden rounded-lg`,children:[a==="image"?t.jsx("img",{src:o.url,alt:`Preview ${n+1}`,className:"h-full w-full object-cover"}):t.jsx("div",{className:`flex h-full w-full items-center justify-center bg-gray-100
|
|
3
|
+
text-sm font-semibold`,children:o.name.split(".").pop()?.toUpperCase()}),t.jsx("div",{className:`text-primary-bg bg-primary-inverse-bg/50 absolute inset-0 flex
|
|
4
|
+
cursor-pointer items-center justify-center rounded-lg opacity-0
|
|
5
|
+
transition-opacity hover:opacity-100`,onClick:c=>c.stopPropagation(),children:t.jsx(h.Icon,{type:"close",onClick:N(n)})})]},n)}),(!R||!_)&&t.jsxs("div",{...I(),className:d.cn(`relative flex cursor-pointer flex-col items-center justify-center
|
|
6
|
+
rounded-lg border-2 border-dashed border-gray-300 bg-gray-50
|
|
7
|
+
transition-colors hover:bg-gray-100`,D&&"border-primary bg-primary/5",(y||f)&&"cursor-not-allowed opacity-50",m==="list"?"min-h-37.5":"aspect-square",p?.blockAdd),children:[t.jsx("input",{...M()}),f?t.jsx(h.Icon,{type:"loader",className:"text-sub-label-text h-8 w-8 animate-spin"}):t.jsxs("div",{className:"flex flex-col items-center space-y-2 p-4 text-center",children:[t.jsx(h.Icon,{type:U?.type??"plus",className:d.cn("text-sub-label-text h-8 w-8",p?.icon)}),t.jsx(L.Typography,{variant:"body-md-medium",className:d.cn("text-sub-label-text",p?.title),children:l?`${j||"Добавить"} (${s.length}/${i})`:`${j||"Добавить"}`}),v&&t.jsx(L.Typography,{variant:"body-xxs-medium",className:d.cn("text-sub-label-text",p?.text),children:v})]})]})]}),A&&t.jsx("div",{className:"rounded-lg bg-red-50 p-3 text-sm text-red-600",children:A})]})};exports.FilesUploader=K;
|
|
8
|
+
//# sourceMappingURL=components-files-uploader-files-uploader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-files-uploader-files-uploader.cjs","sources":["../src/components/files-uploader/files-uploader.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { useCallback, useState } from \"react\";\nimport { type FileRejection, useDropzone } from \"react-dropzone\";\nimport { Icon, type IconProps } from \"../ui/icon\";\nimport { Typography } from \"../ui/typography\";\n\ntype Variant = \"grid\" | \"list\" | \"compact\";\ntype AcceptType = \"image\" | \"pdf\" | \"doc\" | \"excel\" | \"text\" | \"all\";\ntype UploadedFileData = {\n url: string;\n name: string;\n size: string;\n addedAt: string;\n};\ntype FilesUploaderValue = UploadedFileData | UploadedFileData[] | null;\n\ntype PropsFilesUploader = {\n value?: FilesUploaderValue;\n onChange?: (value: FilesUploaderValue) => void;\n multiple?: boolean;\n maxFiles?: number;\n disabled?: boolean;\n className?: {\n container?: string;\n blockAdd?: string;\n title?: string;\n text?: string;\n icon?: string;\n };\n displayFiles?: boolean;\n maxSize?: number;\n variant?: Variant;\n accepts?: AcceptType[];\n icon?: IconProps;\n title?: string;\n text?: string;\n showFiles?: boolean,\n \n};\nconst FILE_SIZE_UNITS = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\nconst FILE_SIZE_KB = 1024;\nconst DEFAULT_MAX_SIZE = 5 * FILE_SIZE_KB * FILE_SIZE_KB;\nconst DEFAULT_MAX_FILES = 5;\nconst DEFAULT_ACCEPT: AcceptType[] = [\"all\"];\nconst DEFAULT_TIMEOUT = 800;\n\nconst ACCEPT_MAP: Record<AcceptType, Record<string, string[]>> = {\n image: { \"image/*\": [\".jpg\", \".jpeg\", \".png\", \".webp\"] },\n pdf: { \"application/pdf\": [\".pdf\"] },\n doc: {\n \"application/msword\": [\".doc\"],\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": [\".docx\"],\n },\n excel: {\n \"application/vnd.ms-excel\": [\".xls\"],\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": [\".xlsx\"],\n },\n text: { \"text/plain\": [\".txt\"] },\n all: {},\n};\n\nconst formatFileSize = (bytes: number) => {\n if (bytes === 0) return \"0 B\";\n const i = Math.floor(Math.log(bytes) / Math.log(FILE_SIZE_KB));\n return `${(bytes / Math.pow(FILE_SIZE_KB, i)).toFixed(2)} ${FILE_SIZE_UNITS[i]}`;\n};\n\nconst fileAcceptMap = (accepts: AcceptType[]): Record<string, string[]> =>\n accepts.reduce((acc, t) => ({ ...acc, ...ACCEPT_MAP[t] }), {});\n\nconst getFileType = (file: UploadedFileData) => {\n const ext = file.name.split(\".\").pop()?.toLowerCase();\n\n if (!ext) return \"other\";\n\n if ([\"jpg\", \"jpeg\", \"png\", \"webp\"].includes(ext)) return \"image\";\n if (ext === \"pdf\") return \"pdf\";\n if ([\"doc\", \"docx\"].includes(ext)) return \"doc\";\n if ([\"xls\", \"xlsx\"].includes(ext)) return \"excel\";\n if (ext === \"txt\") return \"text\";\n\n return \"other\";\n};\n\nexport const FilesUploader = ({\n value = null,\n onChange,\n multiple = false,\n maxFiles = DEFAULT_MAX_FILES,\n disabled = false,\n className,\n maxSize = DEFAULT_MAX_SIZE,\n variant = \"grid\",\n accepts = DEFAULT_ACCEPT,\n icon,\n title,\n text,\n showFiles = true,\n}: PropsFilesUploader) => {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const files = Array.isArray(value) ? value : value ? [value] : [];\n \n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n setError(null);\n\n if (files.length + acceptedFiles.length > maxFiles) {\n setError(`Максимальное количество файлов: ${maxFiles}`);\n return;\n }\n\n if (rejectedFiles.length > 0) {\n const rejection = rejectedFiles[0];\n const errorMessage =\n rejection.errors[0]?.code === \"file-too-large\"\n ? `Файл слишком большой. Максимальный размер: ${maxSize / 1024 / 1024}MB`\n : \"Неподдерживаемый формат файла\";\n setError(errorMessage);\n return;\n }\n\n setLoading(true);\n\n setTimeout(() => {\n const newFilesData: UploadedFileData[] = acceptedFiles.map((file) => ({\n url: URL.createObjectURL(file),\n name: file.name,\n size: formatFileSize(file.size),\n addedAt: new Date().toISOString(),\n }));\n\n if (multiple) {\n onChange?.([...files, ...newFilesData]);\n } else {\n if (files[0]?.url?.startsWith(\"blob:\")) URL.revokeObjectURL(files[0].url);\n onChange?.(newFilesData[0] ?? null);\n }\n\n setLoading(false);\n }, DEFAULT_TIMEOUT);\n },\n [files, maxFiles, maxSize, multiple, onChange],\n );\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop,\n accept: fileAcceptMap(accepts),\n maxSize,\n multiple: multiple && maxFiles > 1,\n disabled: disabled || loading,\n maxFiles: maxFiles - files.length,\n });\n\n const removeImage = (index: number) => {\n return () => {\n if (files[index]?.url?.startsWith(\"blob:\")) {\n URL.revokeObjectURL(files[index].url);\n }\n const newFiles = files.filter((_, i) => i !== index);\n onChange?.(multiple ? newFiles : newFiles[0] || null);\n };\n };\n\n const isMaxFilesReached = files.length >= maxFiles;\n\n // Варианты отображения\n const gridClasses = {\n grid: \"grid-cols-2 sm:grid-cols-3 md:grid-cols-4\",\n list: \"grid-cols-1\",\n compact: \"grid-cols-2 sm:grid-cols-3\",\n };\n\n return (\n <div className={cn(\"w-full space-y-4\", className?.container)}>\n {/* Предпросмотр с возможностью добавления новых */}\n <div\n className={cn(\n \"grid h-full w-full gap-4\",\n variant === \"list\" ? \"grid-cols-1\" : gridClasses[variant],\n )}\n >\n {showFiles && files.map((file, index) => {\n const type = getFileType(file);\n\n return (\n <div\n key={index}\n className=\"group bg-primary-bg relative aspect-square h-full w-full\n overflow-hidden rounded-lg\"\n >\n {type === \"image\" ? (\n <img\n src={file.url}\n alt={`Preview ${index + 1}`}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div\n className=\"flex h-full w-full items-center justify-center bg-gray-100\n text-sm font-semibold\"\n >\n {file.name.split(\".\").pop()?.toUpperCase()}\n </div>\n )}\n\n <div\n className=\"text-primary-bg bg-primary-inverse-bg/50 absolute inset-0 flex\n cursor-pointer items-center justify-center rounded-lg opacity-0\n transition-opacity hover:opacity-100\"\n onClick={(e) => e.stopPropagation()}\n >\n <Icon\n type=\"close\"\n onClick={removeImage(index)}\n />\n </div>\n </div>\n );\n })}\n {/* Кнопка добавления нового изображения */}\n {(!isMaxFilesReached || !showFiles) && (\n <div\n {...getRootProps()}\n className={cn(\n `relative flex cursor-pointer flex-col items-center justify-center\n rounded-lg border-2 border-dashed border-gray-300 bg-gray-50\n transition-colors hover:bg-gray-100`,\n isDragActive && \"border-primary bg-primary/5\",\n (disabled || loading) && \"cursor-not-allowed opacity-50\",\n variant === \"list\" ? \"min-h-37.5\" : \"aspect-square\",\n className?.blockAdd,\n )}\n >\n <input {...getInputProps()} />\n\n {loading ? (\n <Icon\n type=\"loader\"\n className=\"text-sub-label-text h-8 w-8 animate-spin\"\n />\n ) : (\n <div className=\"flex flex-col items-center space-y-2 p-4 text-center\">\n <Icon\n type={icon?.type ?? \"plus\"}\n className={cn(\"text-sub-label-text h-8 w-8\", className?.icon)}\n />\n <Typography\n variant=\"body-md-medium\"\n className={cn(\"text-sub-label-text\", className?.title)}\n >\n {multiple\n ? `${title || \"Добавить\"} (${files.length}/${maxFiles})`\n : `${title || \"Добавить\"}`}\n </Typography>\n {text && (\n <Typography variant=\"body-xxs-medium\" className={cn(\"text-sub-label-text\", className?.text)}>\n {text}\n </Typography>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n\n {/* Информация о количестве */}\n {/* {multiple && images.length > 0 && (\n <p className=\"text-xs text-gray-500\">\n Загружено {images.length} из {maxFiles} изображений\n </p>\n )} */}\n\n {/* Ошибка */}\n {error && (\n <div className=\"rounded-lg bg-red-50 p-3 text-sm text-red-600\">{error}</div>\n )}\n </div>\n );\n};\n\nexport type { PropsFilesUploader, UploadedFileData, FilesUploaderValue };\n\n"],"names":["FILE_SIZE_UNITS","FILE_SIZE_KB","DEFAULT_MAX_SIZE","DEFAULT_MAX_FILES","DEFAULT_ACCEPT","DEFAULT_TIMEOUT","ACCEPT_MAP","formatFileSize","bytes","i","fileAcceptMap","accepts","acc","t","getFileType","file","ext","FilesUploader","value","onChange","multiple","maxFiles","disabled","className","maxSize","variant","icon","title","text","showFiles","loading","setLoading","useState","error","setError","files","onDrop","useCallback","acceptedFiles","rejectedFiles","errorMessage","newFilesData","getRootProps","getInputProps","isDragActive","useDropzone","removeImage","index","newFiles","_","isMaxFilesReached","gridClasses","cn","jsxs","type","jsx","e","Icon","Typography"],"mappings":"+VAuCA,MAAMA,EAAkB,CAAC,IAAK,KAAM,KAAM,KAAM,IAAI,EAC9CC,EAAe,KACfC,EAAmB,EAAID,EAAeA,EACtCE,EAAoB,EACpBC,EAA+B,CAAC,KAAK,EACrCC,EAAkB,IAElBC,EAA2D,CAC/D,MAAO,CAAE,UAAW,CAAC,OAAQ,QAAS,OAAQ,OAAO,CAAA,EACrD,IAAK,CAAE,kBAAmB,CAAC,MAAM,CAAA,EACjC,IAAK,CACH,qBAAsB,CAAC,MAAM,EAC7B,0EAA2E,CAAC,OAAO,CAAA,EAErF,MAAO,CACL,2BAA4B,CAAC,MAAM,EACnC,oEAAqE,CAAC,OAAO,CAAA,EAE/E,KAAM,CAAE,aAAc,CAAC,MAAM,CAAA,EAC7B,IAAK,CAAA,CACP,EAEMC,EAAkBC,GAAkB,CACxC,GAAIA,IAAU,EAAG,MAAO,MACxB,MAAMC,EAAI,KAAK,MAAM,KAAK,IAAID,CAAK,EAAI,KAAK,IAAIP,CAAY,CAAC,EAC7D,MAAO,IAAIO,EAAQ,KAAK,IAAIP,EAAcQ,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAIT,EAAgBS,CAAC,CAAC,EAChF,EAEMC,EAAiBC,GACrBA,EAAQ,OAAO,CAACC,EAAKC,KAAO,CAAE,GAAGD,EAAK,GAAGN,EAAWO,CAAC,CAAA,GAAM,CAAA,CAAE,EAEzDC,EAAeC,GAA2B,CAC9C,MAAMC,EAAMD,EAAK,KAAK,MAAM,GAAG,EAAE,IAAA,GAAO,YAAA,EAExC,OAAKC,EAED,CAAC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AAA,CAEJ,CAAA,CAAA,CAAA,CAEJ,CAAA,CAAA,EAYHK,GACCsB,EAAAA,IAAC,MAAA,CAAI,UAAU,gDAAiD,SAAAtB,CAAA,CAAM,CAAA,EAE1E,CAEJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-files-uploader.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const 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:n=!1,label:s,description:c,classes:r,ref:d,...a})=>{const t={...l===!0&&!n&&{"aria-valid":!0},...l===!1&&!n&&{"aria-invalid":!0},disabled:n};return e.jsx(i.FieldSet,{className:r?.fieldset,children:e.jsx(i.FieldGroup,{className:r?.fieldgroup,children:e.jsxs(i.Field,{className:r?.field,children:[s&&e.jsx(i.FieldLabel,{...t,children:s}),p.length>0?e.jsxs(o.InputGroup,{"data-slot":!0,children:[e.jsx(o.InputGroupInput,{ref:d,...a,...t,disabled:n}),p.map(u=>e.jsx(o.InputGroupAddon,{align:u.position,children:u.component},u.id))]}):e.jsx(j.Input,{ref:d,...a,...t,disabled:n}),c&&e.jsx(i.FieldDescription,{...t,children:c})]})})})};exports.InputField=m;
|
|
2
|
+
//# sourceMappingURL=components-input-field-input-field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import React 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: React.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 & React.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":"+RAyBaA,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-input-field.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */require("./lib-utils.cjs");require("class-variance-authority");require("react");require("./components-ui-badge-badge.styles.cjs");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 q=require("./components-ui-icon-icon.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");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-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");const o=require("./hooks-usePopupControls.cjs");require("lucide-react");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");const n=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("lodash");require("recharts");require("./components-ui-chart-chart.cjs");require("react-dropzone");require("next-themes");require("sonner");require("vaul");const t=({...i})=>{const{isOpened:e,togglePopup:u}=o.usePopupControls();return r.jsx(n.InputField,{...i,type:e?"text":"password",date:[{id:"0",position:"inline-end",component:r.jsx(q.Icon,{type:e?"eye-off":"eye",onClick:u,className:"cursor-pointer"})}]})};exports.InputPassword=t;
|
|
2
|
+
//# sourceMappingURL=components-input-password-input-password.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-input-password-input-password.cjs","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-off\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":"04DAIO,MAAMA,EAA8C,CAAC,CAAE,GAAGC,KAAW,CAC1E,KAAM,CAAE,SAAAC,EAAU,YAAAC,CAAA,EAAgBC,mBAAA,EAElC,OACEC,EAAAA,IAACC,EAAAA,WAAA,CACE,GAAGL,EACJ,KAAMC,EAAW,OAAS,WAC1B,KAAM,CACJ,CACE,GAAI,IACJ,SAAU,aACV,UACEG,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAML,EAAW,UAAY,MAC7B,QAASC,EACT,UAAU,gBAAA,CAAA,CACZ,CAEJ,CACF,CAAA,CAGN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-input-password.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./components-ui-popover-popover.cjs"),r=require("./lib-utils.cjs");require("react");function v({trigger:n,children:t,className:s,triggerClassName:i,side:c="bottom",align:u="center",open:p,setOpen:a,triggerProps:l}){return e.jsxs(o.Popover,{open:p,onOpenChange:a,children:[e.jsx(o.PopoverTrigger,{asChild:!0,...l,className:r.cn("cursor-pointer",i),children:n}),e.jsx(o.PopoverContent,{className:r.cn(s),side:c,align:u,children:t})]})}exports.PopoverBasic=v;
|
|
2
|
+
//# sourceMappingURL=components-popover-modal-popover-modal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-popover-modal-popover-modal.cjs","sources":["../src/components/popover-modal/popover-modal.tsx"],"sourcesContent":["import { Popover, PopoverContent, PopoverTrigger } from \"../ui/popover\";\nimport { cn } from \"@/lib/utils\"; // твоя утилита для объединения классов\nimport React from \"react\";\n\nexport type PopoverBasicProps = {\n trigger: React.ReactNode;\n children: React.ReactNode;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n className?: string;\n triggerClassName?: string;\n open?: boolean;\n setOpen?: (value: boolean) => void;\n triggerProps?: React.HTMLAttributes<HTMLElement>;\n};\n\nexport function PopoverBasic({\n trigger,\n children,\n className,\n triggerClassName,\n side = \"bottom\",\n align = \"center\",\n open,\n setOpen,\n triggerProps,\n}: PopoverBasicProps) {\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n asChild\n {...triggerProps}\n className={cn(\"cursor-pointer\", triggerClassName)}\n >\n {trigger}\n </PopoverTrigger>\n\n <PopoverContent\n className={cn(className)}\n side={side}\n align={align}\n >\n {children}\n </PopoverContent>\n </Popover>\n );\n}"],"names":["PopoverBasic","trigger","children","className","triggerClassName","side","align","open","setOpen","triggerProps","jsxs","Popover","jsx","PopoverTrigger","cn","PopoverContent"],"mappings":"oNAgBO,SAASA,EAAa,CAC3B,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,KAAAC,EAAO,SACP,MAAAC,EAAQ,SACR,KAAAC,EACA,QAAAC,EACA,aAAAC,CACF,EAAsB,CACpB,OACEC,EAAAA,KAACC,EAAAA,QAAA,CAAQ,KAAAJ,EAAY,aAAcC,EACjC,SAAA,CAAAI,EAAAA,IAACC,EAAAA,eAAA,CACC,QAAO,GACN,GAAGJ,EACJ,UAAWK,EAAAA,GAAG,iBAAkBV,CAAgB,EAE/C,SAAAH,CAAA,CAAA,EAGHW,EAAAA,IAACG,EAAAA,eAAA,CACC,UAAWD,EAAAA,GAAGX,CAAS,EACvB,KAAAE,EACA,MAAAC,EAEC,SAAAJ,CAAA,CAAA,CACH,EACF,CAEJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-popover-modal.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("./lib-utils.cjs"),n=require("./components-ui-label-label.cjs"),s=require("./components-ui-radio-group-radio-group.cjs");function d({classNames:e,id:t,value:u,defaultValue:m,label:i,options:c=[],...o}){return a.jsx(s.RadioGroup,{...o,defaultValue:m,className:r.cn("w-fit",e?.classNameGroup),children:c.length?c.map(l=>a.jsxs("div",{className:r.cn("flex items-center gap-3",e?.classNameContainerItem),children:[a.jsx(s.RadioGroupItem,{value:l.value,id:l.id,className:e?.classNameGroupItem}),l.label&&a.jsx(n.Label,{htmlFor:l.id,className:e?.classNameLabel,children:l.label})]},l.id)):a.jsxs("div",{className:r.cn("flex items-center gap-3",e?.classNameContainerItem),children:[a.jsx(s.RadioGroupItem,{value:u,id:t,className:e?.classNameGroupItem}),i&&a.jsx(n.Label,{htmlFor:t,className:e?.classNameLabel,children:i})]})})}exports.RadioButton=d;
|
|
2
|
+
//# sourceMappingURL=components-radio-button-radio-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-radio-button-radio-button.cjs","sources":["../src/components/radio-button/radio-button.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { Label } from \"../ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"../ui/radio-group\";\n\ntype TOptions = {\n value: string;\n label?: string;\n id?: string;\n};\n\ntype Props = {\n classNames?: {\n classNameGroup?: string;\n classNameContainerItem?: string;\n classNameGroupItem?: string;\n classNameLabel?: string;\n };\n value: string;\n id?: string;\n label?: string;\n defaultValue?: string;\n options?: TOptions[];\n} & React.ComponentPropsWithoutRef<typeof RadioGroup>;\n\nexport function RadioButton({\n classNames,\n id,\n value,\n defaultValue,\n label,\n options = [],\n ...rest\n}: Props) {\n return (\n <RadioGroup\n {...rest}\n defaultValue={defaultValue}\n className={cn(\"w-fit\", classNames?.classNameGroup)}\n >\n {options.length ? (\n options.map((option) => (\n <div\n key={option.id}\n className={cn(\"flex items-center gap-3\", classNames?.classNameContainerItem)}\n >\n <RadioGroupItem\n value={option.value}\n id={option.id}\n className={classNames?.classNameGroupItem}\n />\n {option.label && (\n <Label\n htmlFor={option.id}\n className={classNames?.classNameLabel}\n >\n {option.label}\n </Label>\n )}\n </div>\n ))\n ) : (\n <div\n className={cn(\"flex items-center gap-3\", classNames?.classNameContainerItem)}\n >\n <RadioGroupItem\n value={value}\n id={id}\n className={classNames?.classNameGroupItem}\n />\n {label && (\n <Label\n htmlFor={id}\n className={classNames?.classNameLabel}\n >\n {label}\n </Label>\n )}\n </div>\n )}\n </RadioGroup>\n );\n}\n"],"names":["RadioButton","classNames","id","value","defaultValue","label","options","rest","jsx","RadioGroup","cn","option","jsxs","RadioGroupItem","Label"],"mappings":"wPAwBO,SAASA,EAAY,CAC1B,WAAAC,EACA,GAAAC,EACA,MAAAC,EACA,aAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,CAAA,EACV,GAAGC,CACL,EAAU,CACR,OACEC,EAAAA,IAACC,EAAAA,WAAA,CACE,GAAGF,EACJ,aAAAH,EACA,UAAWM,EAAAA,GAAG,QAAST,GAAY,cAAc,EAEhD,SAAAK,EAAQ,OACPA,EAAQ,IAAKK,GACXC,EAAAA,KAAC,MAAA,CAEC,UAAWF,EAAAA,GAAG,0BAA2BT,GAAY,sBAAsB,EAE3E,SAAA,CAAAO,EAAAA,IAACK,EAAAA,eAAA,CACC,MAAOF,EAAO,MACd,GAAIA,EAAO,GACX,UAAWV,GAAY,kBAAA,CAAA,EAExBU,EAAO,OACNH,EAAAA,IAACM,EAAAA,MAAA,CACC,QAASH,EAAO,GAChB,UAAWV,GAAY,eAEtB,SAAAU,EAAO,KAAA,CAAA,CACV,CAAA,EAdGA,EAAO,EAAA,CAiBf,EAEDC,EAAAA,KAAC,MAAA,CACC,UAAWF,EAAAA,GAAG,0BAA2BT,GAAY,sBAAsB,EAE3E,SAAA,CAAAO,EAAAA,IAACK,EAAAA,eAAA,CACC,MAAAV,EACA,GAAAD,EACA,UAAWD,GAAY,kBAAA,CAAA,EAExBI,GACCG,EAAAA,IAACM,EAAAA,MAAA,CACC,QAASZ,EACT,UAAWD,GAAY,eAEtB,SAAAI,CAAA,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CAIR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-radio-button.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),j=require("react"),F=require("./components-ui-badge-badge.cjs"),z=require("./components-ui-badge-badge.styles.cjs"),r=require("./components-ui-combobox-combobox.cjs"),d=require("./components-ui-field-field.cjs"),k=require("./components-ui-typography-typography.cjs");require("./components-ui-typography-typography.styles.cjs");const c=s=>typeof s=="object",q=s=>c(s)?s.value:s,E=s=>s.every(a=>typeof a=="string")||s.every(a=>typeof a=="object")?s:s.map(a=>q(a)),f=(s,a)=>s===null||a===null||typeof s=="string"||typeof a=="string"?s===a:s.id===a.id,L=({list:s,label:a,multiple:t,disabled:l=!1,isValid:S,description:$,onChange:i,...h})=>{const[p,w]=j.useState([]),[x,g]=j.useState(null),[m,b]=j.useState(""),v=s,y=l?"opacity-50":"",u={...S===!0&&!l&&{"aria-valid":!0},...S===!1&&!l&&{"aria-invalid":!0},disabled:l},R=e=>{if(t){const n=Array.isArray(e)?e:e?[e]:[],C=n.length>p.length;w(n),i?.(E(n)),C&&b("")}else{const n=Array.isArray(e)?e[0]??null:e;f(x,n)?(g(null),i?.(null)):(g(n),i?.(n)),b("")}},N=e=>{b(e.currentTarget.value)},_=()=>{l||(g(null),i?.(null))},T=t?p:x,V=m.trim().toLowerCase(),A=v.filter(e=>q(e).toLowerCase().includes(V)),I=(e,n)=>o.jsx(r.ComboboxChip,{showRemove:n.withRemove,onClick:n.onClick,className:`${z.badgeVariants({variant:e.variant,kind:e.kind})}
|
|
2
|
+
${y} ${n.className}`,children:o.jsx(F.Badge,{variant:e.variant,classNames:{className:"px-2 py-0"},children:e.value})},String(e.id)),P=e=>o.jsxs(o.Fragment,{children:[e.map(n=>c(n)?I(n,{withRemove:!l,className:"pl-2.5"}):o.jsx("span",{className:y,children:n},n)),o.jsx(r.ComboboxChipsInput,{...h,...u,placeholder:e.length>0?"":h.placeholder,value:m,onChange:N})]}),B=e=>o.jsxs(o.Fragment,{children:[e&&(c(e)?I(e,{withRemove:!1,className:"ml-1",onClick:_}):o.jsx(k.Typography,{className:y,onClick:_,children:e})),o.jsx(r.ComboboxChipsInput,{...h,placeholder:e?"":h.placeholder,...u,value:m,onChange:N,className:"flex-1 pl-1"})]});return o.jsx(d.FieldSet,{children:o.jsx(d.FieldGroup,{children:o.jsxs(r.ComboboxField,{children:[o.jsx(d.FieldLabel,{...u,children:a}),o.jsxs(r.Combobox,{items:v,multiple:t,autoHighlight:t,value:T,onValueChange:l?void 0:R,children:[t?o.jsxs(r.ComboboxChips,{disabled:l,className:"pr-8",children:[o.jsx(r.ComboboxValue,{children:P}),o.jsx(r.ComboboxTrigger,{className:"-ml-4.5",disabled:l})]}):o.jsxs(r.ComboboxChips,{disabled:l,className:"pr-8",children:[o.jsx(r.ComboboxValue,{children:B}),o.jsx(r.ComboboxTrigger,{className:"-ml-4.5",disabled:l})]}),o.jsxs(r.ComboboxContent,{children:[o.jsx(r.ComboboxEmpty,{children:"No items found."}),o.jsx(r.ComboboxList,{children:A.map((e,n)=>{const C=t?p.some(Q=>f(Q,e)):f(x,e);return o.jsx(r.ComboboxItem,{disabled:l,value:e,className:`${C?"bg-tertiary-bg":""} ${typeof e=="string"?"py-1":"px-2 py-2"}`,children:c(e)?o.jsx(F.Badge,{dotPosition:"left",variant:e.variant,kind:e.kind,classNames:{className:"px-4 py-1.5"},children:e.value}):o.jsx(k.Typography,{className:"px-4 py-1.5",children:e})},c(e)?String(e.id):`${e}-${n}`)})})]})]}),o.jsx(d.FieldDescription,{...u,children:$})]})})})};L.displayName="SelectSearch";exports.SelectField=L;
|
|
3
|
+
//# sourceMappingURL=components-select-field-select-field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-select-field-select-field.cjs","sources":["../src/components/select-field/select-field.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport React, { useState } from \"react\";\nimport { Badge, badgeVariants } from \"../ui/badge\";\nimport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxField,\n ComboboxItem,\n ComboboxList,\n ComboboxTrigger,\n ComboboxValue,\n} from \"../ui/combobox\";\nimport { FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Typography } from \"../ui/typography\";\n\nexport type SelectList = {\n value: string;\n id: string | number;\n} & Partial<VariantProps<typeof badgeVariants>>;\n\nexport type SelectItem = SelectList | string;\nexport type SelectValue = SelectList | SelectList[] | string | string[] | null;\n\ntype SelectBaseProps = {\n list: SelectList[] | string[];\n label?: string;\n multiple?: boolean;\n disabled?: boolean;\n isValid?: boolean;\n error?: string;\n description?: string;\n onChange?: (value: SelectValue) => void;\n};\n\ntype SelectProps = SelectBaseProps &\n Omit<React.ComponentProps<typeof ComboboxChipsInput>, \"list\" | \"onChange\">;\n\nconst isSelectListItem = (item: SelectItem): item is SelectList =>\n typeof item === \"object\";\n\nconst getItemLabel = (item: SelectItem) => (isSelectListItem(item) ? item.value : item);\n\nconst toChangePayload = (items: SelectItem[]): SelectList[] | string[] => {\n if (items.every((item) => typeof item === \"string\")) {\n return items;\n }\n\n if (items.every((item) => typeof item === \"object\")) {\n return items;\n }\n\n return items.map((item) => getItemLabel(item));\n};\n\nconst isSameItem = (first: SelectItem | null, second: SelectItem | null) => {\n if (first === null || second === null) {\n return first === second;\n }\n\n if (typeof first === \"string\" || typeof second === \"string\") {\n return first === second;\n }\n\n return first.id === second.id;\n};\n\nexport const SelectField = ({\n list,\n label,\n multiple,\n disabled = false,\n isValid,\n description,\n onChange,\n ...rest\n}: SelectProps) => {\n const [selectedItems, setSelectedItems] = useState<SelectItem[]>([]);\n const [selectedItem, setSelectedItem] = useState<SelectItem | null>(null);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const normalizedList: SelectItem[] = list;\n const disabledClass = disabled ? \"opacity-50\" : \"\";\n\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n const handleChange = (value: SelectItem | SelectItem[] | null) => {\n if (multiple) {\n const items = Array.isArray(value) ? value : value ? [value] : [];\n const isAdding = items.length > selectedItems.length;\n setSelectedItems(items);\n onChange?.(toChangePayload(items));\n if (isAdding) {\n setSearchQuery(\"\");\n }\n } else {\n const item = Array.isArray(value) ? (value[0] ?? null) : value;\n if (isSameItem(selectedItem, item)) {\n setSelectedItem(null);\n onChange?.(null);\n } else {\n setSelectedItem(item);\n onChange?.(item);\n }\n setSearchQuery(\"\");\n }\n };\n\n const handleSearchChange = (event: { currentTarget: { value: string } }) => {\n setSearchQuery(event.currentTarget.value);\n };\n\n const deleteSingleElement = () => {\n if (!disabled) {\n setSelectedItem(null);\n onChange?.(null);\n }\n };\n\n const currentValue = multiple ? selectedItems : selectedItem;\n const normalizedQuery = searchQuery.trim().toLowerCase();\n const filteredList = normalizedList.filter((item) =>\n getItemLabel(item).toLowerCase().includes(normalizedQuery),\n );\n\n const renderBadgeChip = (\n item: SelectList,\n options: {\n withRemove: boolean;\n className: string;\n onClick?: () => void;\n },\n ) => (\n <ComboboxChip\n key={String(item.id)}\n showRemove={options.withRemove}\n onClick={options.onClick}\n className={`${badgeVariants({ variant: item.variant, kind: item.kind })}\n ${disabledClass} ${options.className}`}\n >\n <Badge\n variant={item.variant}\n classNames={{ className: \"px-2 py-0\" }}\n >\n {item.value}\n </Badge>\n </ComboboxChip>\n );\n\n const renderMultipleValue = (items: SelectItem[]) => (\n <>\n {items.map((item) =>\n isSelectListItem(item) ? (\n renderBadgeChip(item, { withRemove: !disabled, className: \"pl-2.5\" })\n ) : (\n <span\n key={item}\n className={disabledClass}\n >\n {item}\n </span>\n ),\n )}\n <ComboboxChipsInput\n {...rest}\n {...validationProps}\n placeholder={items.length > 0 ? \"\" : rest.placeholder}\n value={searchQuery}\n onChange={handleSearchChange}\n />\n </>\n );\n\n const renderSingleValue = (item: SelectItem | null) => (\n <>\n {item &&\n (isSelectListItem(item) ? (\n renderBadgeChip(item, {\n withRemove: false,\n className: \"ml-1\",\n onClick: deleteSingleElement,\n })\n ) : (\n <Typography\n className={disabledClass}\n onClick={deleteSingleElement}\n >\n {item}\n </Typography>\n ))}\n <ComboboxChipsInput\n {...rest}\n placeholder={item ? \"\" : rest.placeholder}\n {...validationProps}\n value={searchQuery}\n onChange={handleSearchChange}\n className=\"flex-1 pl-1\"\n />\n </>\n );\n\n return (\n <FieldSet>\n <FieldGroup>\n <ComboboxField>\n <FieldLabel {...validationProps}>{label}</FieldLabel>\n <Combobox\n items={normalizedList}\n multiple={multiple}\n autoHighlight={multiple}\n value={currentValue}\n onValueChange={disabled ? undefined : handleChange}\n >\n {multiple ? (\n <ComboboxChips\n disabled={disabled}\n className=\"pr-8\"\n >\n <ComboboxValue>{renderMultipleValue}</ComboboxValue>\n <ComboboxTrigger\n className=\"-ml-4.5\"\n disabled={disabled}\n />\n </ComboboxChips>\n ) : (\n <ComboboxChips\n disabled={disabled}\n className=\"pr-8\"\n >\n <ComboboxValue>{renderSingleValue}</ComboboxValue>\n <ComboboxTrigger\n className=\"-ml-4.5\"\n disabled={disabled}\n />\n </ComboboxChips>\n )}\n <ComboboxContent>\n <ComboboxEmpty>No items found.</ComboboxEmpty>\n <ComboboxList>\n {filteredList.map((item, index) => {\n const isSelected = multiple\n ? selectedItems.some((selected) => isSameItem(selected, item))\n : isSameItem(selectedItem, item);\n return (\n <ComboboxItem\n disabled={disabled}\n key={isSelectListItem(item) ? String(item.id) : `${item}-${index}`}\n value={item}\n className={`${isSelected ? \"bg-tertiary-bg\" : \"\"} ${\n typeof item === \"string\" ? \"py-1\" : \"px-2 py-2\"\n }`}\n >\n {isSelectListItem(item) ? (\n <Badge\n dotPosition=\"left\"\n variant={item.variant}\n kind={item.kind}\n classNames={{ className: \"px-4 py-1.5\" }}\n >\n {item.value}\n </Badge>\n ) : (\n <Typography className=\"px-4 py-1.5\">{item}</Typography>\n )}\n </ComboboxItem>\n );\n })}\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n </ComboboxField>\n </FieldGroup>\n </FieldSet>\n );\n};\n\nSelectField.displayName = \"SelectSearch\";\n\nexport type { SelectProps };\n"],"names":["isSelectListItem","item","getItemLabel","toChangePayload","items","isSameItem","first","second","SelectField","list","label","multiple","disabled","isValid","description","onChange","rest","selectedItems","setSelectedItems","useState","selectedItem","setSelectedItem","searchQuery","setSearchQuery","normalizedList","disabledClass","validationProps","handleChange","value","isAdding","handleSearchChange","event","deleteSingleElement","currentValue","normalizedQuery","filteredList","renderBadgeChip","options","jsx","ComboboxChip","badgeVariants","Badge","renderMultipleValue","jsxs","Fragment","ComboboxChipsInput","renderSingleValue","Typography","FieldSet","FieldGroup","ComboboxField","FieldLabel","Combobox","ComboboxChips","ComboboxValue","ComboboxTrigger","ComboboxContent","ComboboxEmpty","ComboboxList","index","isSelected","selected","ComboboxItem","FieldDescription"],"mappings":"4bAyCA,MAAMA,EAAoBC,GACxB,OAAOA,GAAS,SAEZC,EAAgBD,GAAsBD,EAAiBC,CAAI,EAAIA,EAAK,MAAQA,EAE5EE,EAAmBC,GACnBA,EAAM,MAAOH,GAAS,OAAOA,GAAS,QAAQ,GAI9CG,EAAM,MAAOH,GAAS,OAAOA,GAAS,QAAQ,EACzCG,EAGFA,EAAM,IAAKH,GAASC,EAAaD,CAAI,CAAC,EAGzCI,EAAa,CAACC,EAA0B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G2D,EAAa,iBAAmB,EAAE,IAC9C,OAAO3D,GAAS,SAAW,OAAS,WACtC,GAEC,SAAAD,EAAiBC,CAAI,EACpBqC,EAAAA,IAACG,EAAAA,MAAA,CACC,YAAY,OACZ,QAASxC,EAAK,QACd,KAAMA,EAAK,KACX,WAAY,CAAE,UAAW,aAAA,EAExB,SAAAA,EAAK,KAAA,CAAA,EAGRqC,EAAAA,IAACS,EAAAA,WAAA,CAAW,UAAU,cAAe,SAAA9C,CAAA,CAAK,CAAA,EAhBvCD,EAAiBC,CAAI,EAAI,OAAOA,EAAK,EAAE,EAAI,GAAGA,CAAI,IAAI0D,CAAK,EAAA,CAoBtE,CAAC,CAAA,CACH,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,EAEFrB,EAAAA,IAACyB,EAAAA,iBAAA,CAAkB,GAAGrC,EAAkB,SAAAZ,CAAA,CAAY,CAAA,CAAA,CACtD,EACF,EACF,CAEJ,EAEAN,EAAY,YAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-select-field.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("./lib-utils.cjs"),S=require("react"),c=require("./components-ui-field-field.cjs"),r=require("./components-ui-select-select.cjs"),I=({groups:n=[],label:u,description:d,disabled:i=!1,isValid:h,placeholder:x="Выбрать",value:j,defaultValue:p,onChange:f,showSeparators:_=!0,classNames:t,...g})=>{const[y,v]=S.useState(p),m=typeof j=="string",G=m?j:y,s=Array.isArray(n)?n.every(l=>typeof l=="string")?[{items:n}]:n:[n],b=s.some(l=>l.items.length>0),a={...h===!0&&!i&&{"aria-valid":!0},...h===!1&&!i&&{"aria-invalid":!0},disabled:i},F=l=>{m||v(l),f?.(l)};return e.jsx(c.FieldSet,{className:t?.fieldSet,children:e.jsx(c.FieldGroup,{className:t?.fieldGroup,children:e.jsxs(c.Field,{className:t?.field,children:[u&&e.jsx(c.FieldLabel,{...a,className:t?.fieldLabel,children:u}),e.jsxs(r.Select,{value:G,onValueChange:i?void 0:F,disabled:i,...g,children:[e.jsx(r.SelectTrigger,{...a,className:C.cn("w-full",t?.trigger),children:e.jsx(r.SelectValue,{placeholder:x})}),e.jsx(r.SelectContent,{className:t?.content,children:b?s.map((l,q)=>e.jsxs(S.Fragment,{children:[e.jsxs(r.SelectGroup,{className:t?.group,children:[l.label?e.jsx(r.SelectLabel,{className:t?.label,children:l.label}):null,l.items.map(o=>e.jsx(r.SelectItem,{value:o,className:t?.item,children:o},o))]}),_&&q<s.length-1?e.jsx(r.SelectSeparator,{className:t?.separator}):null]},`${l.label??"group"}-${l.items.join("|")}`)):e.jsx(r.SelectGroup,{className:t?.group,children:e.jsx(r.SelectItem,{value:"__empty-select-groups-item__",disabled:!0,className:t?.item,children:"Нет доступных элементов"})})})]}),d&&e.jsx(c.FieldDescription,{...a,className:t?.description,children:d})]})})})};exports.SelectGroups=I;
|
|
2
|
+
//# sourceMappingURL=components-select-groups-select-groups.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-select-groups-select-groups.cjs","sources":["../src/components/select-groups/select-groups.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { Fragment, useState } from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from \"../ui/select\";\n\nexport type SelectGroupsData = {\n label?: string;\n items: string[];\n};\n\nexport type SelectGroupsItem = SelectGroupsData | string;\n\nexport type SelectGroupsProps = {\n groups: SelectGroupsData[] | SelectGroupsData | string[];\n label?: string;\n description?: string;\n disabled?: boolean;\n isValid?: boolean;\n placeholder?: string;\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n showSeparators?: boolean;\n classNames?: {\n fieldSet?: string;\n fieldGroup?: string;\n field?: string;\n fieldLabel?: string;\n description?: string;\n trigger?: string;\n content?: string;\n group?: string;\n label?: string;\n item?: string;\n separator?: string;\n };\n} & Omit<\n React.ComponentProps<typeof Select>,\n \"value\" | \"defaultValue\" | \"onValueChange\" | \"children\"\n>;\n\nexport const SelectGroups = ({\n groups = [],\n label,\n description,\n disabled = false,\n isValid,\n placeholder = \"Выбрать\",\n value,\n defaultValue,\n onChange,\n showSeparators = true,\n classNames,\n ...rest\n}: SelectGroupsProps) => {\n const [internalValue, setInternalValue] = useState(defaultValue);\n const isControlled = typeof value === \"string\";\n const currentValue = isControlled ? value : internalValue;\n\n const normalizedGroups: SelectGroupsData[] = Array.isArray(groups)\n ? groups.every((group) => typeof group === \"string\")\n ? [{ items: groups }]\n : groups\n : [groups];\n\n const hasAnyItems = normalizedGroups.some((group) => group.items.length > 0);\n\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n const handleValueChange = (nextValue: string) => {\n if (!isControlled) {\n setInternalValue(nextValue);\n }\n\n onChange?.(nextValue);\n };\n\n return (\n <FieldSet className={classNames?.fieldSet}>\n <FieldGroup className={classNames?.fieldGroup}>\n <Field className={classNames?.field}>\n {label && (\n <FieldLabel\n {...validationProps}\n className={classNames?.fieldLabel}\n >\n {label}\n </FieldLabel>\n )}\n\n <Select\n value={currentValue}\n onValueChange={disabled ? undefined : handleValueChange}\n disabled={disabled}\n {...rest}\n >\n <SelectTrigger\n {...validationProps}\n className={cn(\"w-full\", classNames?.trigger)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n\n <SelectContent className={classNames?.content}>\n {hasAnyItems ? (\n normalizedGroups.map((group, groupIndex) => (\n <Fragment key={`${group.label ?? \"group\"}-${group.items.join(\"|\")}`}>\n <SelectGroup className={classNames?.group}>\n {group.label ? (\n <SelectLabel className={classNames?.label}>\n {group.label}\n </SelectLabel>\n ) : null}\n\n {group.items.map((item) => (\n <SelectItem\n key={item}\n value={item}\n className={classNames?.item}\n >\n {item}\n </SelectItem>\n ))}\n </SelectGroup>\n\n {showSeparators && groupIndex < normalizedGroups.length - 1 ? (\n <SelectSeparator className={classNames?.separator} />\n ) : null}\n </Fragment>\n ))\n ) : (\n <SelectGroup className={classNames?.group}>\n <SelectItem\n value=\"__empty-select-groups-item__\"\n disabled\n className={classNames?.item}\n >\n Нет доступных элементов\n </SelectItem>\n </SelectGroup>\n )}\n </SelectContent>\n </Select>\n\n {description && (\n <FieldDescription\n {...validationProps}\n className={classNames?.description}\n >\n {description}\n </FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n"],"names":["SelectGroups","groups","label","description","disabled","isValid","placeholder","value","defaultValue","onChange","showSeparators","classNames","rest","internalValue","setInternalValue","useState","isControlled","currentValue","normalizedGroups","group","hasAnyItems","validationProps","handleValueChange","nextValue","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","Select","SelectTrigger","cn","SelectValue","SelectContent","groupIndex","Fragment","SelectGroup","SelectLabel","item","SelectItem","SelectSeparator","FieldDescription"],"mappings":"iQAkDaA,EAAe,CAAC,CAC3B,OAAAC,EAAS,CAAA,EACT,MAAAC,EACA,YAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EACA,YAAAC,EAAc,UACd,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,eAAAC,EAAiB,GACjB,WAAAC,EACA,GAAGC,CACL,IAAyB,CACvB,KAAM,CAACC,EAAeC,CAAgB,EAAIC,EAAAA,SAASP,CAAY,EACzDQ,EAAe,OAAOT,GAAU,SAChCU,EAAeD,EAAeT,EAAQM,EAEtCK,EAAuC,MAAM,QAAQjB,CAAM,EAC7DA,EAAO,MAAOkB,GAAU,OAAOA,GAAU,QAAQ,EAC/C,CAAC,CAAE,MAAOlB,EAAQ,EAClBA,EACF,CAACA,CAAM,EAELmB,E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B,SAAA4B,CAAA,EAJIA,CAAA,CAMR,CAAA,EACH,EAEC7B,GAAkByB,EAAajB,EAAiB,OAAS,QACvDuB,EAAAA,gBAAA,CAAgB,UAAW9B,GAAY,SAAA,CAAW,EACjD,IAAA,GArBS,GAAGQ,EAAM,OAAS,OAAO,IAAIA,EAAM,MAAM,KAAK,GAAG,CAAC,EAsBjE,CACD,QAEAkB,EAAAA,YAAA,CAAY,UAAW1B,GAAY,MAClC,SAAAa,EAAAA,IAACgB,EAAAA,WAAA,CACC,MAAM,+BACN,SAAQ,GACR,UAAW7B,GAAY,KACxB,SAAA,yBAAA,CAAA,EAGH,CAAA,CAEJ,CAAA,CAAA,CAAA,EAGDR,GACCqB,EAAAA,IAACkB,EAAAA,iBAAA,CACE,GAAGrB,EACJ,UAAWV,GAAY,YAEtB,SAAAR,CAAA,CAAA,CACH,CAAA,CAEJ,EACF,EACF,CAEJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-select-groups.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./components-ui-field-field.cjs"),s=require("./components-ui-textarea-textarea.cjs"),o=({label:a,description:n,isValid:l,...d})=>{const{disabled:r}=d,t={...l===!0&&!r&&{"aria-valid":!0},...l===!1&&!r&&{"aria-invalid":!0},disabled:r};return e.jsx(i.FieldSet,{children:e.jsx(i.FieldGroup,{children:e.jsxs(i.Field,{children:[a&&e.jsx(i.FieldLabel,{...t,children:a}),e.jsx(s.Textarea,{...d,...t}),n&&e.jsx(i.FieldDescription,{...t,children:n})]})})})};exports.TextareaField=o;
|
|
2
|
+
//# sourceMappingURL=components-textarea-field-textarea-field.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-textarea-field-textarea-field.cjs","sources":["../src/components/textarea-field/textarea-field.tsx"],"sourcesContent":["import { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Textarea } from \"../ui/textarea\";\n\ntype BaseProps = {\n label?: string;\n description?: string;\n isValid?: boolean;\n};\n\ntype TextareaFieldProps = BaseProps & React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\n\nexport const TextareaField: React.FC<TextareaFieldProps> = ({\n label,\n description,\n isValid,\n ...rest\n}) => {\n const { disabled } = rest;\n\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>\n <FieldGroup>\n <Field>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n <Textarea\n {...rest}\n {...validationProps}\n />\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\nexport type { TextareaFieldProps };\n"],"names":["TextareaField","label","description","isValid","rest","disabled","validationProps","jsx","FieldSet","FieldGroup","Field","FieldLabel","Textarea","FieldDescription"],"mappings":"qNAYaA,EAA8C,CAAC,CAC1D,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAAM,CACJ,KAAM,CAAE,SAAAC,GAAaD,EAEfE,EAAkB,CACtB,GAAIH,IAAY,IAAQ,CAACE,GAAY,CAAE,aAAc,EAAA,EACrD,GAAIF,IAAY,IAAS,CAACE,GAAY,CAAE,eAAgB,EAAA,EACxD,SAAAA,CAAA,EAGF,OACEE,MAACC,EAAAA,SAAA,CACC,SAAAD,EAAAA,IAACE,aAAA,CACC,gBAACC,EAAAA,MAAA,CACG,SAAA,CAAAT,GAASM,EAAAA,IAACI,aAAA,CAAY,GAAGL,EAAkB,SAAAL,EAAM,EACnDM,EAAAA,IAACK,EAAAA,SAAA,CACE,GAAGR,EACH,GAAGE,CAAA,CAAA,EAELJ,GACCK,EAAAA,IAACM,EAAAA,iBAAA,CAAkB,GAAGP,EAAkB,SAAAJ,CAAA,CAAY,CAAA,CAAA,CAExD,EACF,EACF,CAEJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-textarea-field.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("@radix-ui/react-accessible-icon");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-aspect-ratio");const n=require("@radix-ui/react-avatar");require("@radix-ui/react-checkbox");require("@radix-ui/react-collapsible");require("@radix-ui/react-context-menu");require("@radix-ui/react-dialog");require("@radix-ui/react-direction");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-form");require("@radix-ui/react-hover-card");require("@radix-ui/react-label");require("@radix-ui/react-menubar");require("@radix-ui/react-navigation-menu");require("@radix-ui/react-one-time-password-field");require("@radix-ui/react-password-toggle-field");require("@radix-ui/react-popover");require("@radix-ui/react-portal");require("@radix-ui/react-progress");require("@radix-ui/react-radio-group");require("@radix-ui/react-scroll-area");require("@radix-ui/react-select");require("@radix-ui/react-separator");require("@radix-ui/react-slider");require("@radix-ui/react-slot");require("@radix-ui/react-switch");require("@radix-ui/react-tabs");require("@radix-ui/react-toast");require("@radix-ui/react-toggle");require("@radix-ui/react-toggle-group");require("@radix-ui/react-toolbar");require("@radix-ui/react-tooltip");require("@radix-ui/react-visually-hidden");require("react");const u=require("./lib-utils.cjs");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const i=o(n);function l({className:e,size:r="default",...a}){return t.jsx(i.Root,{"data-slot":"avatar","data-size":r,className:u.cn(`group/avatar relative flex size-8 shrink-0 rounded-full select-none
|
|
2
|
+
after:absolute after:inset-0 after:rounded-full after:mix-blend-darken
|
|
3
|
+
data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...a})}function d({className:e,...r}){return t.jsx(i.Image,{"data-slot":"avatar-image",className:u.cn("aspect-square size-full rounded-full object-cover",e),...r})}function g({className:e,...r}){return t.jsx(i.Fallback,{"data-slot":"avatar-fallback",className:u.cn(`bg-muted text-muted-foreground flex size-full items-center justify-center
|
|
4
|
+
rounded-full text-sm group-data-[size=sm]/avatar:text-xs`,e),...r})}function c({className:e,...r}){return t.jsx("span",{"data-slot":"avatar-badge",className:u.cn(`bg-primary text-primary-foreground absolute right-0 bottom-0 z-10 inline-flex
|
|
5
|
+
items-center justify-center rounded-full bg-blend-color ring-2 ring-transparent
|
|
6
|
+
select-none`,"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",`group-data-[size=default]/avatar:size-2.5
|
|
7
|
+
group-data-[size=default]/avatar:[&>svg]:size-2`,`translate-x-1/4 translate-y-1/4 group-data-[size=lg]/avatar:size-3
|
|
8
|
+
group-data-[size=lg]/avatar:[&>svg]:size-2`,e),...r})}function v({className:e,...r}){return t.jsx("div",{"data-slot":"avatar-group",className:u.cn(`group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2
|
|
9
|
+
*:data-[slot=avatar]:ring-2`,e),...r})}function f({className:e,...r}){return t.jsx("div",{"data-slot":"avatar-group-count",className:u.cn(`bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0
|
|
10
|
+
items-center justify-center rounded-full text-sm ring-2
|
|
11
|
+
group-has-data-[size=lg]/avatar-group:size-10
|
|
12
|
+
group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4
|
|
13
|
+
group-has-data-[size=lg]/avatar-group:[&>svg]:size-5
|
|
14
|
+
group-has-data-[size=sm]/avatar-group:[&>svg]:size-3`,e),...r})}exports.Avatar=l;exports.AvatarBadge=c;exports.AvatarFallback=g;exports.AvatarGroup=v;exports.AvatarGroupCount=f;exports.AvatarImage=d;
|
|
15
|
+
//# sourceMappingURL=components-ui-avatar-avatar.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-avatar-avatar.cjs","sources":["../src/components/ui/avatar/avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\n// TODO: вынести стили в отдельный файл\nfunction Avatar({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: \"default\" | \"sm\" | \"lg\";\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n className={cn(\n `group/avatar relative flex size-8 shrink-0 rounded-full select-none\n after:absolute after:inset-0 after:rounded-full after:mix-blend-darken\n data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full rounded-full object-cover\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n `bg-muted text-muted-foreground flex size-full items-center justify-center\n rounded-full text-sm group-data-[size=sm]/avatar:text-xs`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n `bg-primary text-primary-foreground absolute right-0 bottom-0 z-10 inline-flex\n items-center justify-center rounded-full bg-blend-color ring-2 ring-transparent\n select-none`,\n \"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden\",\n `group-data-[size=default]/avatar:size-2.5\n group-data-[size=default]/avatar:[&>svg]:size-2`,\n `translate-x-1/4 translate-y-1/4 group-data-[size=lg]/avatar:size-3\n group-data-[size=lg]/avatar:[&>svg]:size-2`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n `group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2\n *:data-[slot=avatar]:ring-2`,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarGroupCount({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n `bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0\n items-center justify-center rounded-full text-sm ring-2\n group-has-data-[size=lg]/avatar-group:size-10\n group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4\n group-has-data-[size=lg]/avatar-group:[&>svg]:size-5\n group-has-data-[size=sm]/avatar-group:[&>svg]:size-3`,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Avatar,\n AvatarBadge,\n AvatarFallback,\n AvatarGroup,\n AvatarGroupCount,\n AvatarImage,\n};\n"],"names":["Avatar","className","size","props","jsx","AvatarPrimitive","cn","AvatarImage","AvatarFallback","AvatarBadge","AvatarGroup","AvatarGroupCount"],"mappings":"uuDAMA,SAASA,EAAO,CACd,UAAAC,EACA,KAAAC,EAAO,UACP,GAAGC,CACL,EAEG,CACD,OACEC,EAAAA,IAACC,EAAgB,KAAhB,CACC,YAAU,SACV,YAAWH,EACX,UAAWI,EAAAA,GACT;AAAA;AAAA,mFAGAL,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASI,EAAY,CACnB,UAAAN,EACA,GAAGE,CACL,EAAuD,CACrD,OACEC,EAAAA,IAACC,EAAgB,MAAhB,CACC,YAAU,eACV,UAAWC,EAAAA,GAAG,oDAAqDL,CAAS,EAC3E,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASK,EAAe,CACtB,UAAAP,EACA,GAAGE,CACL,EAA0D,CACxD,OACEC,EAAAA,IAACC,EAAgB,SAAhB,CACC,YAAU,kBACV,UAAWC,EAAAA,GACT;AAAA,kEAEAL,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASM,EAAY,CAAE,UAAAR,EAAW,GAAGE,GAAuC,CAC1E,OACEC,EAAAA,IAAC,OAAA,CACC,YAAU,eACV,UAAWE,EAAAA,GACT;AAAA;AAAA,qBAGA,gFACA;AAAA,yDAEA;AAAA,oDAEAL,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASO,EAAY,CAAE,UAAAT,EAAW,GAAGE,GAAsC,CACzE,OACEC,EAAAA,IAAC,MAAA,CACC,YAAU,eACV,UAAWE,EAAAA,GACT;AAAA,qCAEAL,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAiB,CAAE,UAAAV,EAAW,GAAGE,GAAsC,CAC9E,OACEC,EAAAA,IAAC,MAAA,CACC,YAAU,qBACV,UAAWE,EAAAA,GACT;AAAA;AAAA;AAAA;AAAA;AAAA,8DAMAL,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./components-ui-avatar-avatar.cjs");exports.Avatar=a.Avatar;exports.AvatarBadge=a.AvatarBadge;exports.AvatarFallback=a.AvatarFallback;exports.AvatarGroup=a.AvatarGroup;exports.AvatarGroupCount=a.AvatarGroupCount;exports.AvatarImage=a.AvatarImage;
|
|
2
|
+
//# sourceMappingURL=components-ui-avatar.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-avatar.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("class-variance-authority");require("react");const s=require("./lib-utils.cjs"),r=require("./components-ui-badge-badge.styles.cjs");function g({variant:t,kind:a="status",dotPosition:n,classNames:l={},children:c,...i}){const u=!!n,{className:o,dotClassName:d,labelClassName:b}=l;return e.jsxs("div",{className:s.cn(r.badgeVariants({variant:t,kind:a,dotPosition:n}),o),...i,children:[u&&e.jsx("span",{className:s.cn("inline-block h-2 w-2 rounded-full bg-current",d),"aria-hidden":"true"}),e.jsx("span",{className:s.cn(r.badgeLabelVariants({kind:a}),b),children:c})]})}exports.Badge=g;
|
|
2
|
+
//# sourceMappingURL=components-ui-badge-badge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-badge-badge.cjs","sources":["../src/components/ui/badge/badge.tsx"],"sourcesContent":["import { type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { badgeLabelVariants, badgeVariants } from \"./badge.styles\";\n\nexport interface BadgeProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"className\">,\n VariantProps<typeof badgeVariants> {\n dotPosition?: \"left\" | \"right\";\n classNames?: {\n dotClassName?: string;\n labelClassName?: string;\n className?: string;\n };\n}\n\nfunction Badge({\n variant,\n kind = \"status\",\n dotPosition,\n classNames = {},\n children,\n ...props\n}: BadgeProps) {\n const showDot = Boolean(dotPosition);\n const { className, dotClassName, labelClassName } = classNames;\n\n return (\n <div\n className={cn(badgeVariants({ variant, kind, dotPosition }), className)}\n {...props}\n >\n {showDot && (\n <span\n className={cn(\"inline-block h-2 w-2 rounded-full bg-current\", dotClassName)}\n aria-hidden=\"true\"\n />\n )}\n <span\n className={cn(\n badgeLabelVariants({\n kind,\n }),\n labelClassName,\n )}\n >\n {children}\n </span>\n </div>\n );\n}\n\nexport { Badge };\n"],"names":["Badge","variant","kind","dotPosition","classNames","children","props","showDot","className","dotClassName","labelClassName","jsxs","cn","badgeVariants","jsx","badgeLabelVariants"],"mappings":"iQAkBA,SAASA,EAAM,CACb,QAAAC,EACA,KAAAC,EAAO,SACP,YAAAC,EACA,WAAAC,EAAa,CAAA,EACb,SAAAC,EACA,GAAGC,CACL,EAAe,CACb,MAAMC,EAAU,EAAQJ,EAClB,CAAE,UAAAK,EAAW,aAAAC,EAAc,eAAAC,CAAA,EAAmBN,EAEpD,OACEO,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,GAAGC,EAAAA,cAAc,CAAE,QAAAZ,EAAS,KAAAC,EAAM,YAAAC,CAAA,CAAa,EAAGK,CAAS,EACrE,GAAGF,EAEH,SAAA,CAAAC,GACCO,EAAAA,IAAC,OAAA,CACC,UAAWF,EAAAA,GAAG,+CAAgDH,CAAY,EAC1E,cAAY,MAAA,CAAA,EAGhBK,EAAAA,IAAC,OAAA,CACC,UAAWF,EAAAA,GACTG,qBAAmB,CACjB,KAAAb,CAAA,CACD,EACDQ,CAAA,EAGD,SAAAL,CAAA,CAAA,CACH,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority");require("react");require("./lib-utils.cjs");const t=require("./components-ui-typography-typography.styles.cjs"),a=e.cva(`inline-flex items-center justify-center gap-2 px-2 transition-colors
|
|
2
|
+
focus:outline-none`,{variants:{variant:{waiting:"bg-warning-bg text-warning-text",in_progress:"bg-success-bg text-success-text",negotiation:"bg-negotiation-bg text-negotiation-text",documents:"bg-invalid-bg text-invalid-text",new:"bg-info-new-bg text-info-new-text",followup:"bg-follow-up-bg text-follow-up-text",interested:"bg-warning-bg text-warning-text",proposal:"bg-proposal-bg text-proposal-text",action_required:"bg-error-bg text-error-text",contract:"bg-contract-bg text-contract-text",completed:"bg-success-bg text-success-text",invalid:"bg-invalid-bg text-invalid-text"},kind:{status:"rounded-[0.875rem] py-1",priority:"rounded py-1"},dotPosition:{left:"py-1.5",right:"flex-row-reverse py-1.5"}},defaultVariants:{variant:"waiting",kind:"status"}}),i=e.cva("tracking-normal whitespace-nowrap",{variants:{kind:{status:t.getTypographyClassName("body-xs-medium"),priority:t.getTypographyClassName("body-sm-regular")}},defaultVariants:{kind:"status"}});exports.badgeLabelVariants=i;exports.badgeVariants=a;
|
|
3
|
+
//# sourceMappingURL=components-ui-badge-badge.styles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-badge-badge.styles.cjs","sources":["../src/components/ui/badge/badge.styles.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\n\nimport { getTypographyClassName } from \"../typography\";\n\nexport const badgeVariants = cva(\n `inline-flex items-center justify-center gap-2 px-2 transition-colors\n focus:outline-none`,\n {\n variants: {\n variant: {\n waiting: \"bg-warning-bg text-warning-text\",\n in_progress: \"bg-success-bg text-success-text\",\n negotiation: \"bg-negotiation-bg text-negotiation-text\",\n documents: \"bg-invalid-bg text-invalid-text\",\n new: \"bg-info-new-bg text-info-new-text\",\n followup: \"bg-follow-up-bg text-follow-up-text\",\n interested: \"bg-warning-bg text-warning-text\",\n proposal: \"bg-proposal-bg text-proposal-text\",\n action_required: \"bg-error-bg text-error-text\",\n contract: \"bg-contract-bg text-contract-text\",\n completed: \"bg-success-bg text-success-text\",\n invalid: \"bg-invalid-bg text-invalid-text\",\n },\n kind: {\n status: \"rounded-[0.875rem] py-1\",\n priority: \"rounded py-1\",\n },\n dotPosition: {\n left: \"py-1.5\",\n right: \"flex-row-reverse py-1.5\",\n },\n },\n defaultVariants: {\n variant: \"waiting\",\n kind: \"status\",\n },\n },\n);\n\nexport const badgeLabelVariants = cva(\"tracking-normal whitespace-nowrap\", {\n variants: {\n kind: {\n status: getTypographyClassName(\"body-xs-medium\"),\n priority: getTypographyClassName(\"body-sm-regular\"),\n },\n },\n defaultVariants: {\n kind: \"status\",\n },\n});\n"],"names":["badgeVariants","cva","badgeLabelVariants","getTypographyClassName"],"mappings":"4OAIaA,EAAgBC,EAAAA,IAC3B;AAAA,sBAEA,CACE,SAAU,CACR,QAAS,CACP,QAAS,kCACT,YAAa,kCACb,YAAa,0CACb,UAAW,kCACX,IAAK,oCACL,SAAU,sCACV,WAAY,kCACZ,SAAU,oCACV,gBAAiB,8BACjB,SAAU,oCACV,UAAW,kCACX,QAAS,iCAAA,EAEX,KAAM,CACJ,OAAQ,0BACR,SAAU,cAAA,EAEZ,YAAa,CACX,KAAM,SACN,MAAO,yBAAA,CACT,EAEF,gBAAiB,CACf,QAAS,UACT,KAAM,QAAA,CACR,CAEJ,EAEaC,EAAqBD,EAAAA,IAAI,oCAAqC,CACzE,SAAU,CACR,KAAM,CACJ,OAAQE,EAAAA,uBAAuB,gBAAgB,EAC/C,SAAUA,EAAAA,uBAAuB,iBAAiB,CAAA,CACpD,EAEF,gBAAiB,CACf,KAAM,QAAA,CAEV,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components-ui-badge-badge.cjs"),a=require("./components-ui-badge-badge.styles.cjs");exports.Badge=e.Badge;exports.badgeVariants=a.badgeVariants;
|
|
2
|
+
//# sourceMappingURL=components-ui-badge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-badge.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),l=require("@radix-ui/react-slot");require("class-variance-authority");require("react");const a=require("./lib-utils.cjs"),b=require("./components-ui-button-button.styles.cjs"),t=({className:e,variant:o,size:n,asChild:r=!1,ref:u,...s})=>{const i=r?l.Slot:"button";return c.jsx(i,{className:a.cn(b.buttonVariants({variant:o,size:n,className:e})),ref:u,...s})};t.displayName="Button";exports.Button=t;
|
|
2
|
+
//# sourceMappingURL=components-ui-button-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-button-button.cjs","sources":["../src/components/ui/button/button.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"./button.styles\";\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\nconst Button = ({\n className,\n variant,\n size,\n asChild = false,\n ref,\n ...props\n}: ButtonProps) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n};\nButton.displayName = \"Button\";\n\nexport { Button };\n"],"names":["Button","className","variant","size","asChild","ref","props","Comp","Slot","jsx","cn","buttonVariants"],"mappings":"qSAeMA,EAAS,CAAC,CACd,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,IAAAC,EACA,GAAGC,CACL,IAAmB,CACjB,MAAMC,EAAOH,EAAUI,EAAAA,KAAO,SAC9B,OACEC,EAAAA,IAACF,EAAA,CACC,UAAWG,EAAAA,GAAGC,iBAAe,CAAE,QAAAT,EAAS,KAAAC,EAAM,UAAAF,CAAA,CAAW,CAAC,EAC1D,IAAAI,EACC,GAAGC,CAAA,CAAA,CAGV,EACAN,EAAO,YAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority");require("react");require("./lib-utils.cjs");const e=require("./components-ui-typography-typography.styles.cjs"),i=r.cva(["inline-flex cursor-pointer items-center justify-center rounded-xl font-medium tracking-normal whitespace-nowrap transition-colors","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:origin-center","disabled:bg-disabled-bg disabled:text-disabled-text disabled:pointer-events-none"].join(" "),{variants:{variant:{primary:`bg-primary-inverse-bg text-primary-inverse-text
|
|
2
|
+
hover:bg-primary-inverse-hover-bg`,secondary:"bg-secondary-bg text-primary-text hover:bg-primary-hover-bg",secondaryBorder:`bg-primary-bg text-primary-text hover:bg-primary-hover-bg
|
|
3
|
+
disabled:border-inp-disabled-border border`,link:"text-primary-text hover:text-secondary-text underline underline-offset-3",ghost:`hover:bg-tertiary-bg hover:text-primary-text aria-expanded:bg-tertiary-bg
|
|
4
|
+
aria-expanded:text-primary-text`,circle:"hover:bg-primary-hover-bg bg-tertiary-bg rounded-full",circleGhost:"hover:bg-primary-hover-bg rounded-full",square:"bg-tertiary-bg hover:bg-primary-hover-bg rounded"},size:{lg:`${e.getTypographyClassName("body-lg-medium")} w-fit gap-2 px-4.5 py-3
|
|
5
|
+
[&_svg]:size-[18px]`,md:`${e.getTypographyClassName("body-md-medium")} w-fit gap-2 px-4.5 py-2
|
|
6
|
+
[&_svg]:size-4`,sm:`${e.getTypographyClassName("body-sm-medium")} w-fit gap-2 px-3 py-2
|
|
7
|
+
[&_svg]:size-4`,xs:`${e.getTypographyClassName("body-xs-medium")} w-fit gap-1 px-3 py-2
|
|
8
|
+
[&_svg]:size-[14px]`,default:`${e.getTypographyClassName("body-sm-medium")} size-9 [&_svg]:size-4`,"icon-lg":"w-fit p-2","icon-md":"w-fit p-1.5","icon-sm":"w-fit p-1","icon-xs":"w-fit p-0.5"}},compoundVariants:[{variant:"link",size:"lg",className:"[&_svg]:size-5"}],defaultVariants:{variant:"primary",size:"md"}});exports.buttonVariants=i;
|
|
9
|
+
//# sourceMappingURL=components-ui-button-button.styles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-button-button.styles.cjs","sources":["../src/components/ui/button/button.styles.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport { getTypographyClassName } from \"../typography\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex cursor-pointer items-center justify-center rounded-xl font-medium tracking-normal whitespace-nowrap transition-colors\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:origin-center\",\n \"disabled:bg-disabled-bg disabled:text-disabled-text disabled:pointer-events-none\",\n ].join(\" \"),\n {\n variants: {\n variant: {\n primary: `bg-primary-inverse-bg text-primary-inverse-text\n hover:bg-primary-inverse-hover-bg`,\n secondary: \"bg-secondary-bg text-primary-text hover:bg-primary-hover-bg\",\n secondaryBorder: `bg-primary-bg text-primary-text hover:bg-primary-hover-bg\n disabled:border-inp-disabled-border border`,\n link: \"text-primary-text hover:text-secondary-text underline underline-offset-3\",\n ghost: `hover:bg-tertiary-bg hover:text-primary-text aria-expanded:bg-tertiary-bg\n aria-expanded:text-primary-text`,\n circle: \"hover:bg-primary-hover-bg bg-tertiary-bg rounded-full\",\n circleGhost: \"hover:bg-primary-hover-bg rounded-full\",\n square: \"bg-tertiary-bg hover:bg-primary-hover-bg rounded\",\n },\n size: {\n lg: `${getTypographyClassName(\"body-lg-medium\")} w-fit gap-2 px-4.5 py-3\n [&_svg]:size-[18px]`,\n md: `${getTypographyClassName(\"body-md-medium\")} w-fit gap-2 px-4.5 py-2\n [&_svg]:size-4`,\n sm: `${getTypographyClassName(\"body-sm-medium\")} w-fit gap-2 px-3 py-2\n [&_svg]:size-4`,\n xs: `${getTypographyClassName(\"body-xs-medium\")} w-fit gap-1 px-3 py-2\n [&_svg]:size-[14px]`,\n default: `${getTypographyClassName(\"body-sm-medium\")} size-9 [&_svg]:size-4`,\n \"icon-lg\": \"w-fit p-2\",\n \"icon-md\": \"w-fit p-1.5\",\n \"icon-sm\": \"w-fit p-1\",\n \"icon-xs\": \"w-fit p-0.5\",\n },\n },\n compoundVariants: [\n {\n variant: \"link\",\n size: \"lg\",\n className: \"[&_svg]:size-5\",\n },\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n },\n);\n"],"names":["buttonVariants","cva","getTypographyClassName"],"mappings":"4OAGaA,EAAiBC,EAAAA,IAC5B,CACE,oIACA,qEACA,kFAAA,EACA,KAAK,GAAG,EACV,CACE,SAAU,CACR,QAAS,CACP,QAAS;AAAA,2CAET,UAAW,8DACX,gBAAiB;AAAA,oDAEjB,KAAM,2EACN,MAAO;AAAA,yCAEP,OAAQ,wDACR,YAAa,yCACb,OAAQ,kDAAA,EAEV,KAAM,CACJ,GAAI,GAAGC,yBAAuB,gBAAgB,CAAC;AAAA,6BAE/C,GAAI,GAAGA,yBAAuB,gBAAgB,CAAC;AAAA,wBAE/C,GAAI,GAAGA,yBAAuB,gBAAgB,CAAC;AAAA,wBAE/C,GAAI,GAAGA,yBAAuB,gBAAgB,CAAC;AAAA,6BAE/C,QAAS,GAAGA,EAAAA,uBAAuB,gBAAgB,CAAC,yBACpD,UAAW,YACX,UAAW,cACX,UAAW,YACX,UAAW,aAAA,CACb,EAEF,iBAAkB,CAChB,CACE,QAAS,OACT,KAAM,KACN,UAAW,gBAAA,CACb,EAEF,gBAAiB,CACf,QAAS,UACT,KAAM,IAAA,CACR,CAEJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-ui-button-button.cjs"),n=require("./components-ui-button-button.styles.cjs");exports.Button=t.Button;exports.buttonVariants=n.buttonVariants;
|
|
2
|
+
//# sourceMappingURL=components-ui-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-button.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime");require("react");const d=require("./lib-utils.cjs"),t=require("./components-ui-card-card.styles.cjs"),i=({ref:a,className:r,variant:e,disabled:m,active:p,...N})=>s.jsx("div",{ref:a,"data-disabled":m||void 0,className:d.cn(t.cardVariants({variant:e,active:p}),r),...N});i.displayName="Card";const n=({ref:a,className:r,...e})=>s.jsx("div",{ref:a,className:d.cn(t.cardHeaderVariants(),r),...e});n.displayName="CardHeader";const c=({ref:a,className:r,...e})=>s.jsx("div",{ref:a,className:d.cn(t.cardTitleVariants(),r),...e});c.displayName="CardTitle";const o=({ref:a,className:r,...e})=>s.jsx("div",{ref:a,className:d.cn(t.cardDescriptionVariants(),r),...e});o.displayName="CardDescription";const l=({ref:a,className:r,...e})=>s.jsx("div",{ref:a,className:d.cn(t.cardContentVariants(),r),...e});l.displayName="CardContent";const C=({ref:a,className:r,...e})=>s.jsx("div",{ref:a,className:d.cn(t.cardFooterVariants(),r),...e});C.displayName="CardFooter";exports.Card=i;exports.CardContent=l;exports.CardDescription=o;exports.CardFooter=C;exports.CardHeader=n;exports.CardTitle=c;
|
|
2
|
+
//# sourceMappingURL=components-ui-card-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-card-card.cjs","sources":["../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport {\n cardContentVariants,\n cardDescriptionVariants,\n cardFooterVariants,\n cardHeaderVariants,\n cardTitleVariants,\n cardVariants,\n} from \"./card.styles\";\n\nconst Card = ({\n ref,\n className,\n variant,\n disabled,\n active,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n variant?: VariantProps<typeof cardVariants>[\"variant\"];\n disabled?: boolean;\n active?: boolean;\n}) => (\n <div\n ref={ref}\n data-disabled={disabled || undefined}\n className={cn(cardVariants({ variant, active }), className)}\n {...props}\n />\n);\nCard.displayName = \"Card\";\n\nconst CardHeader = ({\n ref,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n}) => (\n <div\n ref={ref}\n className={cn(cardHeaderVariants(), className)}\n {...props}\n />\n);\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = ({\n ref,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n}) => (\n <div\n ref={ref}\n className={cn(cardTitleVariants(), className)}\n {...props}\n />\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = ({\n ref,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n}) => (\n <div\n ref={ref}\n className={cn(cardDescriptionVariants(), className)}\n {...props}\n />\n);\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = ({\n ref,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n}) => (\n <div\n ref={ref}\n className={cn(cardContentVariants(), className)}\n {...props}\n />\n);\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = ({\n ref,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.RefObject<HTMLDivElement | null>;\n}) => (\n <div\n ref={ref}\n className={cn(cardFooterVariants(), className)}\n {...props}\n />\n);\nCardFooter.displayName = \"CardFooter\";\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"],"names":["Card","ref","className","variant","disabled","active","props","jsx","cn","cardVariants","CardHeader","cardHeaderVariants","CardTitle","cardTitleVariants","CardDescription","cardDescriptionVariants","CardContent","cardContentVariants","CardFooter","cardFooterVariants"],"mappings":"2NAYMA,EAAO,CAAC,CACZ,IAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,EACA,OAAAC,EACA,GAAGC,CACL,IAMEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,gBAAeG,GAAY,OAC3B,UAAWI,EAAAA,GAAGC,eAAa,CAAE,QAAAN,EAAS,OAAAE,CAAA,CAAQ,EAAGH,CAAS,EACzD,GAAGI,CAAA,CACN,EAEFN,EAAK,YAAc,OAEnB,MAAMU,EAAa,CAAC,CAClB,IAAAT,EACA,UAAAC,EACA,GAAGI,CACL,IAGEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,UAAWO,EAAAA,GAAGG,qBAAA,EAAsBT,CAAS,EAC5C,GAAGI,CAAA,CACN,EAEFI,EAAW,YAAc,aAEzB,MAAME,EAAY,CAAC,CACjB,IAAAX,EACA,UAAAC,EACA,GAAGI,CACL,IAGEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,UAAWO,EAAAA,GAAGK,oBAAA,EAAqBX,CAAS,EAC3C,GAAGI,CAAA,CACN,EAEFM,EAAU,YAAc,YAExB,MAAME,EAAkB,CAAC,CACvB,IAAAb,EACA,UAAAC,EACA,GAAGI,CACL,IAGEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,UAAWO,EAAAA,GAAGO,0BAAA,EAA2Bb,CAAS,EACjD,GAAGI,CAAA,CACN,EAEFQ,EAAgB,YAAc,kBAE9B,MAAME,EAAc,CAAC,CACnB,IAAAf,EACA,UAAAC,EACA,GAAGI,CACL,IAGEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,UAAWO,EAAAA,GAAGS,sBAAA,EAAuBf,CAAS,EAC7C,GAAGI,CAAA,CACN,EAEFU,EAAY,YAAc,cAE1B,MAAME,EAAa,CAAC,CAClB,IAAAjB,EACA,UAAAC,EACA,GAAGI,CACL,IAGEC,EAAAA,IAAC,MAAA,CACC,IAAAN,EACA,UAAWO,EAAAA,GAAGW,qBAAA,EAAsBjB,CAAS,EAC5C,GAAGI,CAAA,CACN,EAEFY,EAAW,YAAc"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("class-variance-authority");require("react");require("./lib-utils.cjs");const r=require("./components-ui-typography-typography.styles.cjs"),t=a.cva("group/card rounded-lg",{variants:{variant:{light:`bg-primary-bg text-primary-text border-delicate-border
|
|
2
|
+
hover:border-default-border hover:bg-secondary-bg shadow-[0_2px_6px_rgba(0,0,0,0.1)]
|
|
3
|
+
hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]`,dark:`bg-secondary-inverse-bg text-primary-inverse-text
|
|
4
|
+
hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]
|
|
5
|
+
hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`},active:{true:"",false:""}},defaultVariants:{variant:"light",active:!1},compoundVariants:[{variant:"light",active:!0,class:"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]"},{variant:"dark",active:!0,class:"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]"}]}),e=a.cva("flex flex-col space-y-1.5 p-6"),d=a.cva(`group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold
|
|
6
|
+
tracking-tight`),i=a.cva(`${r.getTypographyClassName("body-sm-regular")} text-muted-foreground
|
|
7
|
+
group-data-[disabled=true]/card:text-disabled-text`),s=a.cva("group-data-[disabled=true]/card:text-disabled-text p-6 pt-0"),o=a.cva("group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0");exports.cardContentVariants=s;exports.cardDescriptionVariants=i;exports.cardFooterVariants=o;exports.cardHeaderVariants=e;exports.cardTitleVariants=d;exports.cardVariants=t;
|
|
8
|
+
//# sourceMappingURL=components-ui-card-card.styles.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-card-card.styles.cjs","sources":["../src/components/ui/card/card.styles.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\nimport { getTypographyClassName } from \"../typography\";\n\nexport const cardVariants = cva(\"group/card rounded-lg\", {\n variants: {\n variant: {\n light: `bg-primary-bg text-primary-text border-delicate-border\n hover:border-default-border hover:bg-secondary-bg shadow-[0_2px_6px_rgba(0,0,0,0.1)]\n hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]`,\n dark: `bg-secondary-inverse-bg text-primary-inverse-text\n hover:bg-tertiary-inverse-bg border-transparent shadow-[0_1px_3px_rgba(0,0,0,0.2)]\n hover:shadow-[0_6px_16px_rgba(0,0,0,0.30)]`,\n },\n active: {\n true: \"\",\n false: \"\",\n },\n },\n defaultVariants: {\n variant: \"light\",\n active: false,\n },\n compoundVariants: [\n {\n variant: \"light\",\n active: true,\n class: \"bg-tertiary-bg border-default-border shadow-[0_2px_6px_rgba(0,0,0,0.1)]\",\n },\n {\n variant: \"dark\",\n active: true,\n class: \"bg-tertiary-inverse-bg shadow-[0_2px_6px_rgba(0,0,0,0.25)]\",\n },\n ],\n});\n\nexport const cardHeaderVariants = cva(\"flex flex-col space-y-1.5 p-6\");\nexport const cardTitleVariants = cva(\n `group-data-[disabled=true]/card:text-disabled-text leading-none font-semibold\n tracking-tight`,\n);\nexport const cardDescriptionVariants = cva(\n `${getTypographyClassName(\"body-sm-regular\")} text-muted-foreground\n group-data-[disabled=true]/card:text-disabled-text`,\n);\nexport const cardContentVariants = cva(\n \"group-data-[disabled=true]/card:text-disabled-text p-6 pt-0\",\n);\nexport const cardFooterVariants = cva(\n \"group-data-[disabled=true]/card:text-disabled-text flex items-center p-6 pt-0\",\n);\n"],"names":["cardVariants","cva","cardHeaderVariants","cardTitleVariants","cardDescriptionVariants","getTypographyClassName","cardContentVariants","cardFooterVariants"],"mappings":"4OAGaA,EAAeC,EAAAA,IAAI,wBAAyB,CACvD,SAAU,CACR,QAAS,CACP,MAAO;AAAA;AAAA,iDAGP,KAAM;AAAA;AAAA,iDAAA,EAIR,OAAQ,CACN,KAAM,GACN,MAAO,EAAA,CACT,EAEF,gBAAiB,CACf,QAAS,QACT,OAAQ,EAAA,EAEV,iBAAkB,CAChB,CACE,QAAS,QACT,OAAQ,GACR,MAAO,yEAAA,EAET,CACE,QAAS,OACT,OAAQ,GACR,MAAO,4DAAA,CACT,CAEJ,CAAC,EAEYC,EAAqBD,EAAAA,IAAI,+BAA+B,EACxDE,EAAoBF,EAAAA,IAC/B;AAAA,iBAEF,EACaG,EAA0BH,EAAAA,IACrC,GAAGI,EAAAA,uBAAuB,iBAAiB,CAAC;AAAA,qDAE9C,EACaC,EAAsBL,EAAAA,IACjC,6DACF,EACaM,EAAqBN,EAAAA,IAChC,+EACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./components-ui-card-card.cjs");exports.Card=r.Card;exports.CardContent=r.CardContent;exports.CardDescription=r.CardDescription;exports.CardFooter=r.CardFooter;exports.CardHeader=r.CardHeader;exports.CardTitle=r.CardTitle;
|
|
2
|
+
//# sourceMappingURL=components-ui-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-card.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./lib-utils.cjs"),T=require("react"),$=require("recharts");function k(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>s[r]})}}return e.default=s,Object.freeze(e)}const x=k(T),j=k($),O={light:"",dark:".dark"},w=x.createContext(null);function N(){const s=x.useContext(w);if(!s)throw new Error("useChart must be used within a <ChartContainer />");return s}function R({id:s,className:e,children:r,config:t,...a}){const d=x.useId(),c=`chart-${s||d.replace(/:/g,"")}`;return n.jsx(w.Provider,{value:{config:t},children:n.jsxs("div",{"data-slot":"chart","data-chart":c,className:i.cn(`[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground
|
|
2
|
+
[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50
|
|
3
|
+
[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border
|
|
4
|
+
[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border
|
|
5
|
+
[&_.recharts-radial-bar-background-sector]:fill-muted
|
|
6
|
+
[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted
|
|
7
|
+
[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video
|
|
8
|
+
justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent
|
|
9
|
+
[&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden
|
|
10
|
+
[&_.recharts-sector[stroke='#fff']]:stroke-transparent
|
|
11
|
+
[&_.recharts-surface]:outline-hidden`,e),...a,children:[n.jsx(L,{id:c,config:t}),n.jsx(j.ResponsiveContainer,{children:r})]})})}const L=({id:s,config:e})=>{const r=Object.entries(e).filter(([,t])=>t.theme||t.color);return r.length?n.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(O).map(([t,a])=>`
|
|
12
|
+
${a} [data-chart=${s}] {
|
|
13
|
+
${r.map(([d,c])=>{const l=c.theme?.[t]||c.color;return l?` --color-${d}: ${l};`:null}).filter(Boolean).join(`
|
|
14
|
+
`)}
|
|
15
|
+
}
|
|
16
|
+
`).join(`
|
|
17
|
+
`)}}):null},q=j.Tooltip;function M({active:s,payload:e,className:r,indicator:t="dot",hideLabel:a=!1,hideIndicator:d=!1,label:c,labelFormatter:l,labelClassName:u,formatter:C,color:P,nameKey:S,labelKey:m}){const{config:f}=N(),_=x.useMemo(()=>{if(a||!e?.length)return null;const[o]=e,p=`${m||o?.dataKey||o?.name||"value"}`,v=b(f,o,p),h=!m&&typeof c=="string"?f[c]?.label||c:v?.label;return l?n.jsx("div",{className:i.cn("font-medium",u),children:l(h,e)}):h?n.jsx("div",{className:i.cn("font-medium",u),children:h}):null},[c,l,e,a,u,f,m]);if(!s||!e?.length)return null;const g=e.length===1&&t!=="dot";return n.jsxs("div",{className:i.cn(`border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg
|
|
18
|
+
border px-2.5 py-1.5 text-xs shadow-xl`,r),children:[g?null:_,n.jsx("div",{className:"grid gap-1.5",children:e.filter(o=>o.type!=="none").map((o,p)=>{const v=`${S||o.name||o.dataKey||"value"}`,h=b(f,o,v),y=P||o.payload?.fill||o.color;return n.jsx("div",{className:i.cn(`[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2
|
|
19
|
+
[&>svg]:h-2.5 [&>svg]:w-2.5`,t==="dot"&&"items-center"),children:C&&o?.value!==void 0&&o.name?C(o.value,o.name,o,p,o.payload):n.jsxs(n.Fragment,{children:[h?.icon?n.jsx(h.icon,{}):!d&&n.jsx("div",{className:i.cn(`shrink-0 rounded-[2px] border-(--color-border)
|
|
20
|
+
bg-(--color-bg)`,{"h-2.5 w-2.5":t==="dot","w-1":t==="line","w-0 border-[1.5px] border-dashed bg-transparent":t==="dashed","my-0.5":g&&t==="dashed"}),style:{"--color-bg":y,"--color-border":y}}),n.jsxs("div",{className:i.cn("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[n.jsxs("div",{className:"grid gap-1.5",children:[g?_:null,n.jsx("span",{className:"text-muted-foreground",children:h?.label||o.name})]}),o.value&&n.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:o.value.toLocaleString()})]})]})},o.dataKey)})})]})}const I=j.Legend;function E({className:s,hideIcon:e=!1,payload:r,verticalAlign:t="bottom",nameKey:a}){const{config:d}=N();return r?.length?n.jsx("div",{className:i.cn("flex items-center justify-center gap-4",t==="top"?"pb-3":"pt-3",s),children:r.filter(c=>c.type!=="none").map(c=>{const l=`${a||c.dataKey||"value"}`,u=b(d,c,l);return n.jsxs("div",{className:`[&>svg]:text-muted-foreground flex items-center gap-1.5
|
|
21
|
+
[&>svg]:h-3 [&>svg]:w-3`,children:[u?.icon&&!e?n.jsx(u.icon,{}):n.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:c.color}}),u?.label]},c.value)})}):null}function b(s,e,r){if(typeof e!="object"||e===null)return;const t="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let a=r;return r in e&&typeof e[r]=="string"?a=e[r]:t&&r in t&&typeof t[r]=="string"&&(a=t[r]),a in s?s[a]:s[r]}exports.ChartContainer=R;exports.ChartLegend=I;exports.ChartLegendContent=E;exports.ChartStyle=L;exports.ChartTooltip=q;exports.ChartTooltipContent=M;
|
|
22
|
+
//# sourceMappingURL=components-ui-chart-chart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-chart-chart.cjs","sources":["../src/components/ui/chart/chart.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n icon?: React.ComponentType<any>; // ← исправлено\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n );\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig;\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"];\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n `[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground\n [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50\n [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border\n [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border\n [&_.recharts-radial-bar-background-sector]:fill-muted\n [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted\n [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video\n justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent\n [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden\n [&_.recharts-sector[stroke='#fff']]:stroke-transparent\n [&_.recharts-surface]:outline-hidden`,\n className,\n )}\n {...props}\n >\n <ChartStyle\n id={chartId}\n config={config}\n />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme || config.color,\n );\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\n return color ? ` --color-${key}: ${color};` : null;\n })\n .filter(Boolean)\n .join(\"\\n\")}\n}\n`,\n )\n .join(\"\\n\"),\n }}\n />\n );\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\n// TODO: поправить типы\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: \"line\" | \"dot\" | \"dashed\";\n nameKey?: string;\n labelKey?: string;\n payload?: any[];\n label?: any;\n }) {\n const { config } = useChart();\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === \"string\"\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n return (\n <div\n className={cn(\n `border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg\n border px-2.5 py-1.5 text-xs shadow-xl`,\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color || item.payload?.fill || item.color;\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n `[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2\n [&>svg]:h-2.5 [&>svg]:w-2.5`,\n indicator === \"dot\" && \"items-center\",\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n `shrink-0 rounded-[2px] border-(--color-border)\n bg-(--color-bg)`,\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n },\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\",\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value && (\n <span\n className=\"text-foreground font-mono font-medium tabular-nums\"\n >\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> &\n Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n hideIcon?: boolean;\n nameKey?: string;\n payload?: any[];\n }) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className,\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item) => {\n const key = `${nameKey || item.dataKey || \"value\"}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={item.value}\n className=\"[&>svg]:text-muted-foreground flex items-center gap-1.5\n [&>svg]:h-3 [&>svg]:w-3\"\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined;\n\n let configLabelKey: string = key;\n\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\n configLabelKey = payload[key as keyof typeof payload] as string;\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n }\n\n return configLabelKey in config\n ? config[configLabelKey]\n : config[key as keyof typeof config];\n}\n\nexport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n ChartTooltip,\n ChartTooltipContent,\n};\n"],"names":["THEMES","ChartContext","React","useChart","context","ChartContainer","id","className","children","config","props","uniqueId","chartId","jsxs","cn","jsx","ChartStyle","RechartsPrimitive","colorConfig","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","Fragment","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":"4dAKMA,EAAS,CAAE,MAAO,GAAI,KAAM,OAAA,EAgB5BC,EAAeC,EAAM,cAAwC,IAAI,EAEvE,SAASC,GAAW,CAClB,MAAMC,EAAUF,EAAM,WAAWD,CAAY,EAE7C,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,mDAAmD,EAGrE,OAAOA,CACT,CAEA,SAASC,EAAe,CACtB,GAAAC,EACA,UAAAC,EACA,SAAAC,EACA,OAAAC,EACA,GAAGC,CACL,EAKG,CACD,MAAMC,EAAWT,EAAM,MAAA,EACjBU,EAAU,SAASN,GAAMK,EAAS,QAAQ,KAAM,EAAE,CAAC,GAEzD,aACGV,EAAa,SAAb,CAAsB,MAAO,CAAE,OAAAQ,GAC9B,SAAA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AAMjB,EAAM,GAAGc,GAAWG,EAAK,SAAW,OAAO,GAC3ChB,EAAaiB,EAA4B9B,EAAQ6B,EAAMjB,CAAG,EAEhE,OACER,EAAAA,KAAC,MAAA,CAEC,UAAU;AAAA,yCAGT,SAAA,CAAAS,GAAY,MAAQ,CAACyB,QACnBzB,EAAW,KAAX,CAAA,CAAgB,EAEjBP,EAAAA,IAAC,MAAA,CACC,UAAU,iCACV,MAAO,CACL,gBAAiBuB,EAAK,KAAA,CACxB,CAAA,EAGHhB,GAAY,KAAA,CAAA,EAdRgB,EAAK,KAAA,CAiBhB,CAAC,CAAA,CAAA,EApCE,IAuCX,CAEA,SAASC,EAA4B9B,EAAqBkB,EAAkBN,EAAa,CACvF,GAAI,OAAOM,GAAY,UAAYA,IAAY,KAC7C,OAGF,MAAMsB,EACJ,YAAatB,GACb,OAAOA,EAAQ,SAAY,UAC3BA,EAAQ,UAAY,KAChBA,EAAQ,QACR,OAEN,IAAIuB,EAAyB7B,EAE7B,OAAIA,KAAOM,GAAW,OAAOA,EAAQN,CAA2B,GAAM,SACpE6B,EAAiBvB,EAAQN,CAA2B,EAEpD4B,GACA5B,KAAO4B,GACP,OAAOA,EAAe5B,CAAkC,GAAM,WAE9D6B,EAAiBD,EAAe5B,CAAkC,GAG7D6B,KAAkBzC,EACrBA,EAAOyC,CAAc,EACrBzC,EAAOY,CAA0B,CACvC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-ui-chart-chart.cjs");exports.ChartContainer=t.ChartContainer;exports.ChartLegend=t.ChartLegend;exports.ChartLegendContent=t.ChartLegendContent;exports.ChartStyle=t.ChartStyle;exports.ChartTooltip=t.ChartTooltip;exports.ChartTooltipContent=t.ChartTooltipContent;
|
|
2
|
+
//# sourceMappingURL=components-ui-chart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-ui-chart.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|