@reportportal/ui-kit 0.0.1-alpha.21 → 0.0.1-alpha.210
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/README.md +29 -3
- package/dist/actionMenu-e78f9615.js +155 -0
- package/dist/actionMenu.js +30 -0
- package/dist/adaptiveTagList.js +189 -0
- package/dist/attachedFile.js +9 -0
- package/dist/autocompletes.js +873 -0
- package/dist/baseIconButton-251479f7.js +25 -0
- package/dist/baseIconButton.js +1 -1
- package/dist/breadcrumbs-5730e318.js +193 -0
- package/dist/breadcrumbs.js +14 -0
- package/dist/bubblesLoader-f3ffa240.js +28 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/bulkPanel.js +225 -0
- package/dist/button-7ab874f3.js +66 -0
- package/dist/button.js +1 -1
- package/dist/calendarArrow-44c7e60e.js +5 -0
- package/dist/checkbox-76aa8f97.js +73 -0
- package/dist/checkbox.js +1 -1
- package/dist/chevronDownDropdown-0260bb66.js +5 -0
- package/dist/chip.js +72 -0
- package/dist/clear-53660571.js +5 -0
- package/dist/close-4d480ef7.js +5 -0
- package/dist/common/constants/floatingUi.d.ts +8 -0
- package/dist/common/constants/sortable.d.ts +2 -0
- package/dist/common/hooks/index.d.ts +4 -0
- package/dist/common/hooks/useEllipsisTitle.d.ts +6 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +5 -1
- package/dist/common/hooks/useSortable.d.ts +3 -0
- package/dist/common/hooks/useTreeDropValidation.d.ts +5 -0
- package/dist/common/hooks/useTreeSortable.d.ts +3 -0
- package/dist/common/hooks.js +69 -0
- package/dist/common/types/commonTypes.d.ts +4 -0
- package/dist/common/types/index.d.ts +2 -0
- package/dist/common/types/sortableTypes.d.ts +185 -0
- package/dist/common/utils/addMiddleEllipsis.d.ts +1 -0
- package/dist/common/utils/floatingUi.d.ts +3 -0
- package/dist/common/utils/getFileExtension.d.ts +1 -0
- package/dist/common/utils/htmlAttributes.d.ts +20 -0
- package/dist/common/utils/index.d.ts +5 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/common/utils/testUtils.d.ts +3 -0
- package/dist/common.js +27 -0
- package/dist/components/actionMenu/actionMenu.d.ts +33 -0
- package/dist/components/actionMenu/constants.d.ts +3 -0
- package/dist/components/actionMenu/index.d.ts +18 -0
- package/dist/components/adaptiveTagList/adaptiveTagList.d.ts +11 -0
- package/dist/components/adaptiveTagList/constants.d.ts +6 -0
- package/dist/components/adaptiveTagList/index.d.ts +2 -0
- package/dist/components/attachedFile/attachedFile.d.ts +17 -0
- package/dist/components/attachedFile/index.d.ts +2 -0
- package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +12 -0
- package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
- package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
- package/dist/components/autocompletes/common/autocompleteOptions.d.ts +21 -0
- package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
- package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
- package/dist/components/autocompletes/common/index.d.ts +19 -0
- package/dist/components/autocompletes/constants.d.ts +2 -0
- package/dist/components/autocompletes/hooks/usePreventInitialScroll.d.ts +5 -0
- package/dist/components/autocompletes/hooks/useResizeClose.d.ts +11 -0
- package/dist/components/autocompletes/hooks/useScrollClose.d.ts +11 -0
- package/dist/components/autocompletes/index.d.ts +3 -0
- package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +55 -0
- package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
- package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +41 -0
- package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
- package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +53 -0
- package/dist/components/autocompletes/types.d.ts +8 -0
- package/dist/components/autocompletes/utils.d.ts +5 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
- package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
- package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
- package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +5 -0
- package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
- package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
- package/dist/components/breadcrumbs/types.d.ts +29 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +2 -0
- package/dist/components/bubblesLoader/index.d.ts +1 -0
- package/dist/components/bulkPanel/bulkPanel.d.ts +3 -0
- package/dist/components/bulkPanel/index.d.ts +2 -0
- package/dist/components/bulkPanel/types.d.ts +47 -0
- package/dist/components/button/button.d.ts +5 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/chip/chip.d.ts +15 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/datePicker/datePicker.d.ts +17 -7
- package/dist/components/datePicker/header/datePickerHeader.d.ts +1 -0
- package/dist/components/datePicker/header/index.d.ts +1 -0
- package/dist/components/datePicker/index.d.ts +3 -1
- package/dist/components/datePicker/utils.d.ts +2 -1
- package/dist/components/dropdown/constants.d.ts +4 -0
- package/dist/components/dropdown/dropdown.d.ts +36 -5
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/dropdown/types.d.ts +11 -0
- package/dist/components/dropdown/utils.d.ts +6 -2
- package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
- package/dist/components/fieldLabel/index.d.ts +1 -0
- package/dist/components/fieldNumber/constants.d.ts +1 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
- package/dist/components/fieldNumber/index.d.ts +1 -0
- package/dist/components/fieldText/fieldText.d.ts +12 -4
- package/dist/components/fieldText/index.d.ts +3 -1
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +5 -2
- package/dist/components/fieldTextFlex/index.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
- package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
- package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
- package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
- package/dist/components/fileDropArea/constants.d.ts +2 -0
- package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
- package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
- package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
- package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
- package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
- package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
- package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
- package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
- package/dist/components/fileDropArea/index.d.ts +6 -0
- package/dist/components/fileDropArea/types.d.ts +58 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
- package/dist/components/fileDropArea/utils/index.d.ts +2 -0
- package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
- package/dist/components/filterItem/filterItem.d.ts +18 -0
- package/dist/components/filterItem/index.d.ts +17 -0
- package/dist/components/filtersButton/filtersButton.d.ts +14 -0
- package/dist/components/filtersButton/index.d.ts +2 -0
- package/dist/components/icons/index.d.ts +69 -9
- package/dist/components/index.d.ts +32 -10
- package/dist/components/issueList/constants.d.ts +5 -0
- package/dist/components/issueList/index.d.ts +2 -0
- package/dist/components/issueList/issueList.d.ts +18 -0
- package/dist/components/maxValueDisplay/index.d.ts +4 -0
- package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
- package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
- package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +3 -1
- package/dist/components/modal/modalContent/modalContent.d.ts +3 -3
- package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -0
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +5 -2
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +6 -2
- package/dist/components/popover/index.d.ts +4 -1
- package/dist/components/popover/popover.d.ts +7 -4
- package/dist/components/radio/index.d.ts +5 -3
- package/dist/components/radio/radio.d.ts +1 -0
- package/dist/components/radio/radioGroup.d.ts +2 -2
- package/dist/components/segmentedControl/index.d.ts +17 -0
- package/dist/components/segmentedControl/segmentedControl.d.ts +4 -0
- package/dist/components/segmentedControl/types.d.ts +18 -0
- package/dist/components/selection/index.d.ts +5 -0
- package/dist/components/selection/selection.d.ts +12 -0
- package/dist/components/selection/types.d.ts +1 -0
- package/dist/components/sidePanel/index.d.ts +2 -0
- package/dist/components/sidePanel/sidePanel.d.ts +22 -0
- package/dist/components/sortable/dragLayer/dragLayer.d.ts +3 -0
- package/dist/components/sortable/dragLayer/index.d.ts +1 -0
- package/dist/components/sortable/helpers.d.ts +12 -0
- package/dist/components/sortable/index.d.ts +5 -0
- package/dist/components/sortable/sortableItem/index.d.ts +1 -0
- package/dist/components/sortable/sortableItem/sortableItem.d.ts +3 -0
- package/dist/components/sortable/sortableList/index.d.ts +1 -0
- package/dist/components/sortable/sortableList/sortableList.d.ts +5 -0
- package/dist/components/sortable/treeSortableContainer/TreeSortableContext.d.ts +11 -0
- package/dist/components/sortable/treeSortableContainer/index.d.ts +2 -0
- package/dist/components/sortable/treeSortableContainer/treeSortableContainer.d.ts +3 -0
- package/dist/components/sortable/treeSortableItem/index.d.ts +1 -0
- package/dist/components/sortable/treeSortableItem/treeSortableItem.d.ts +3 -0
- package/dist/components/spinLoader/index.d.ts +4 -0
- package/dist/components/spinLoader/spinLoader.d.ts +8 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +4 -0
- package/dist/components/systemAlert/types.d.ts +22 -0
- package/dist/components/systemMessage/index.d.ts +1 -0
- package/dist/components/systemMessage/systemMessage.d.ts +1 -0
- package/dist/components/table/constants.d.ts +6 -0
- package/dist/components/table/gradientOverlay/gradientOverlay.d.ts +19 -0
- package/dist/components/table/gradientOverlay/index.d.ts +2 -0
- package/dist/components/table/hooks/index.d.ts +8 -0
- package/dist/components/table/hooks/useCheckboxRowSync.d.ts +10 -0
- package/dist/components/table/hooks/useColumnResize.d.ts +21 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useGradientPosition.d.ts +24 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/resizeHandle/index.d.ts +1 -0
- package/dist/components/table/resizeHandle/resizeHandle.d.ts +2 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/types.d.ts +45 -9
- package/dist/components/table/utils.d.ts +10 -1
- package/dist/components/themeProvider/index.d.ts +1 -0
- package/dist/components/themeProvider/themeProvider.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/toggle.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +10 -1
- package/dist/datePicker-6085b8d0.js +222 -0
- package/dist/datePicker.js +35 -0
- package/dist/details-dbb1530b.js +5 -0
- package/dist/dropdown-0260bb66.js +5 -0
- package/dist/dropdown-0b931e15.js +633 -0
- package/dist/dropdown.js +16 -3
- package/dist/fieldLabel.js +18 -0
- package/dist/fieldNumber-dd8e6902.js +141 -0
- package/dist/fieldNumber.js +5 -2
- package/dist/fieldText-1749da7a.js +167 -0
- package/dist/fieldText.js +7 -2
- package/dist/fieldTextFlex-2f51c173.js +80 -0
- package/dist/fieldTextFlex.js +3 -1
- package/dist/fileDropArea.js +325 -0
- package/dist/filterItem.js +89 -0
- package/dist/filterOutline-819b4b0d.js +6 -0
- package/dist/filtersButton.js +77 -0
- package/dist/floatingUi-46f5b896.js +29 -0
- package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
- package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
- package/dist/icons.js +95 -0
- package/dist/index-d6e02727.js +129 -0
- package/dist/index.js +197 -242
- package/dist/isEmpty-ccacb5ff.js +38 -0
- package/dist/issueList.js +125 -0
- package/dist/maxValueDisplay-9be01a75.js +13 -0
- package/dist/maxValueDisplay.js +6 -0
- package/dist/minus-2857540f.js +5 -0
- package/dist/modal.js +179 -14
- package/dist/openEye-950159cb.js +6 -0
- package/dist/pagination-53c8a559.js +355 -0
- package/dist/pagination.js +12 -5
- package/dist/plus-199fb2a8.js +5 -0
- package/dist/popover.js +62 -71
- package/dist/prevPage-87faf576.js +6 -0
- package/dist/radio.js +3 -1
- package/dist/radioGroup-0c132c2e.js +77 -0
- package/dist/resizeColumn-46b5b30f.js +7 -0
- package/dist/segmentedControl.js +62 -0
- package/dist/selection-da1a3528.js +38 -0
- package/dist/selection.js +10 -0
- package/dist/sidePanel.js +133 -0
- package/dist/sortable.js +330 -0
- package/dist/spinLoader-c4a53718.js +11 -0
- package/dist/spinLoader.js +7 -0
- package/dist/style.css +15 -1
- package/dist/success-8fd8bd2c.js +7 -0
- package/dist/systemAlert.js +87 -0
- package/dist/systemMessage-924fdaa6.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-2994426e.js +1145 -0
- package/dist/table.js +13 -3
- package/dist/toggle-304107fa.js +59 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +95 -57
- package/dist/tree-c3dd3d45.js +6 -0
- package/dist/useEllipsisTitle-462fa254.js +22 -0
- package/dist/useOnClickOutside-8f7d68a1.js +25 -0
- package/dist/useTreeSortable-bc631689.js +208 -0
- package/dist/useWindowResize-a7e1ac92.js +16 -0
- package/dist/warning-537ead32.js +5 -0
- package/dist/xls-995781cc.js +11 -0
- package/package.json +51 -17
- package/dist/baseIconButton-b6adc843.js +0 -25
- package/dist/bubblesLoader-a7e709d4.js +0 -17
- package/dist/button-bb309472.js +0 -62
- package/dist/checkbox-6777be17.js +0 -73
- package/dist/dropdown-c21b0d67.js +0 -216
- package/dist/fieldNumber-d20f48d6.js +0 -127
- package/dist/fieldText-6eff8292.js +0 -102
- package/dist/fieldTextFlex-5bddf46a.js +0 -67
- package/dist/index-5022804a.js +0 -147
- package/dist/pagination-5e576cb2.js +0 -346
- package/dist/radio-c5fae439.js +0 -76
- package/dist/systemMessage-1ced6079.js +0 -30
- package/dist/table-7fdc18e0.js +0 -147
- package/dist/toggle-9284387b.js +0 -67
- package/dist/useOnClickOutside-c332f7d3.js +0 -16
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportportal/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.210",
|
|
4
4
|
"description": "The UI-kit library for ReportPortal Design System.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "storybook dev -p 6006",
|
|
8
8
|
"build": "tsc && vite build",
|
|
9
9
|
"build:storybook": "storybook build",
|
|
10
|
-
"
|
|
10
|
+
"type-check": "tsc --noEmit",
|
|
11
|
+
"lint": "npm run type-check && eslint \"src/**/*.{js,jsx,ts,tsx}\"",
|
|
11
12
|
"format": "npm run lint -- --fix",
|
|
12
|
-
"test": "
|
|
13
|
-
"test:coverage": "
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"test:coverage": "vitest run --coverage",
|
|
15
|
+
"test:ci": "vitest run",
|
|
16
|
+
"test:ui": "vitest --ui",
|
|
14
17
|
"prepare": "husky install"
|
|
15
18
|
},
|
|
16
19
|
"files": [
|
|
@@ -19,6 +22,24 @@
|
|
|
19
22
|
"main": "./dist/index.js",
|
|
20
23
|
"module": "./dist/index.js",
|
|
21
24
|
"types": "./dist/components/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/components/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./style.css": "./dist/style.css",
|
|
32
|
+
"./common": {
|
|
33
|
+
"types": "./dist/common/types/index.d.ts",
|
|
34
|
+
"import": "./dist/common.js",
|
|
35
|
+
"default": "./dist/common.js"
|
|
36
|
+
},
|
|
37
|
+
"./*": {
|
|
38
|
+
"types": "./dist/components/*/index.d.ts",
|
|
39
|
+
"import": "./dist/*.js",
|
|
40
|
+
"default": "./dist/*.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
22
43
|
"peerDependencies": {
|
|
23
44
|
"react": "17.x-18.x",
|
|
24
45
|
"react-dom": "17.x-18.x"
|
|
@@ -28,26 +49,37 @@
|
|
|
28
49
|
"@floating-ui/react-dom": "^2.0.1",
|
|
29
50
|
"classnames": "^2.3.2",
|
|
30
51
|
"downshift": "^6.1.12",
|
|
52
|
+
"es-toolkit": "^1.39.10",
|
|
31
53
|
"framer-motion": "^10.15.2",
|
|
32
54
|
"rc-scrollbars": "^1.1.6",
|
|
33
|
-
"react-datepicker": "^7.
|
|
55
|
+
"react-datepicker": "^7.6.0",
|
|
56
|
+
"react-dnd": "^16.0.1",
|
|
57
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
58
|
+
"react-dropzone": "^14.3.8",
|
|
59
|
+
"react-resizable": "^3.0.5"
|
|
34
60
|
},
|
|
35
61
|
"devDependencies": {
|
|
36
|
-
"@storybook/addon-essentials": "^
|
|
37
|
-
"@storybook/addon-interactions": "^
|
|
38
|
-
"@storybook/addon-links": "^
|
|
39
|
-
"@storybook/addon-onboarding": "^
|
|
40
|
-
"@storybook/blocks": "^
|
|
41
|
-
"@storybook/react": "^
|
|
42
|
-
"@storybook/react-vite": "^
|
|
43
|
-
"@storybook/testing-library": "^0.2.
|
|
62
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
63
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
64
|
+
"@storybook/addon-links": "^8.6.14",
|
|
65
|
+
"@storybook/addon-onboarding": "^8.6.14",
|
|
66
|
+
"@storybook/blocks": "^8.6.14",
|
|
67
|
+
"@storybook/react": "^8.6.14",
|
|
68
|
+
"@storybook/react-vite": "^8.6.14",
|
|
69
|
+
"@storybook/testing-library": "^0.2.2",
|
|
70
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
71
|
+
"@testing-library/react": "^16.1.0",
|
|
72
|
+
"@testing-library/user-event": "^14.5.2",
|
|
44
73
|
"@types/node": "^20.4.5",
|
|
45
74
|
"@types/react": "^18.3.3",
|
|
46
75
|
"@types/react-datepicker": "^6.2.0",
|
|
47
76
|
"@types/react-dom": "^18.2.7",
|
|
77
|
+
"@types/react-resizable": "^3.0.8",
|
|
48
78
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
49
79
|
"@typescript-eslint/parser": "^5.62.0",
|
|
50
80
|
"@vitejs/plugin-react": "^4.0.3",
|
|
81
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
82
|
+
"@vitest/ui": "^2.1.8",
|
|
51
83
|
"date-fns": "^3.6.0",
|
|
52
84
|
"eslint": "^8.46.0",
|
|
53
85
|
"eslint-config-airbnb-typescript": "^15.0.0",
|
|
@@ -58,19 +90,21 @@
|
|
|
58
90
|
"eslint-plugin-react": "^7.33.1",
|
|
59
91
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
60
92
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
61
|
-
"eslint-plugin-storybook": "^0.
|
|
93
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
62
94
|
"husky": "^8.0.3",
|
|
95
|
+
"jsdom": "^25.0.1",
|
|
63
96
|
"lint-staged": "^13.2.3",
|
|
64
97
|
"prettier": "^3.0.1",
|
|
65
98
|
"react": "18.2.0",
|
|
66
99
|
"react-dom": "18.2.0",
|
|
67
100
|
"sass": "^1.64.1",
|
|
68
|
-
"storybook": "^
|
|
101
|
+
"storybook": "^8.6.14",
|
|
69
102
|
"typescript": "^5.0.2",
|
|
70
|
-
"vite": "^4.
|
|
103
|
+
"vite": "^4.5.14",
|
|
71
104
|
"vite-plugin-dts": "^3.4.0",
|
|
72
105
|
"vite-plugin-svgr": "^3.2.0",
|
|
73
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
106
|
+
"vite-tsconfig-paths": "^4.2.0",
|
|
107
|
+
"vitest": "^2.1.8"
|
|
74
108
|
},
|
|
75
109
|
"repository": {
|
|
76
110
|
"type": "git",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "./bind-06a7ff84.js";
|
|
3
|
-
const b = "_disabled_1q88n_12", i = {
|
|
4
|
-
"base-icon-button": "_base-icon-button_1q88n_1",
|
|
5
|
-
disabled: b
|
|
6
|
-
}, r = c.bind(i), m = ({
|
|
7
|
-
children: s,
|
|
8
|
-
className: o,
|
|
9
|
-
disabled: t = !1,
|
|
10
|
-
onClick: n,
|
|
11
|
-
...a
|
|
12
|
-
}) => /* @__PURE__ */ e(
|
|
13
|
-
"button",
|
|
14
|
-
{
|
|
15
|
-
className: r("base-icon-button", o, { disabled: t }),
|
|
16
|
-
type: "button",
|
|
17
|
-
disabled: t,
|
|
18
|
-
onClick: n,
|
|
19
|
-
...a,
|
|
20
|
-
children: s
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
export {
|
|
24
|
-
m as B
|
|
25
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as a } from "./bind-06a7ff84.js";
|
|
3
|
-
const n = "_bubble_kn4ln_1", c = "_bubbles_kn4ln_1", r = {
|
|
4
|
-
"bubbles-loader": "_bubbles-loader_kn4ln_1",
|
|
5
|
-
"color-topaz": "_color-topaz_kn4ln_4",
|
|
6
|
-
bubble: n,
|
|
7
|
-
bubbles: c
|
|
8
|
-
}, s = a.bind(r), _ = 7, i = ({
|
|
9
|
-
color: b = "topaz",
|
|
10
|
-
className: o
|
|
11
|
-
}) => /* @__PURE__ */ l("div", { className: s("bubbles-loader", o, { [`color-${b}`]: b }), children: Array(_).fill(void 0).map((t, e) => (
|
|
12
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
13
|
-
/* @__PURE__ */ l("div", { className: s("bubble") }, e)
|
|
14
|
-
)) });
|
|
15
|
-
export {
|
|
16
|
-
i as B
|
|
17
|
-
};
|
package/dist/button-bb309472.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as l } from "react";
|
|
3
|
-
import { c as u } from "./bind-06a7ff84.js";
|
|
4
|
-
const w = "_button_1szj1_1", x = "_primary_1szj1_19", f = "_disabled_1szj1_24", g = "_ghost_1szj1_36", y = "_danger_1szj1_54", N = "_text_1szj1_70", B = "_icon_1szj1_116", $ = {
|
|
5
|
-
button: w,
|
|
6
|
-
primary: x,
|
|
7
|
-
disabled: f,
|
|
8
|
-
ghost: g,
|
|
9
|
-
danger: y,
|
|
10
|
-
text: N,
|
|
11
|
-
"width-wide-content": "_width-wide-content_1szj1_106",
|
|
12
|
-
"width-parent": "_width-parent_1szj1_111",
|
|
13
|
-
icon: B,
|
|
14
|
-
"icon-start": "_icon-start_1szj1_122",
|
|
15
|
-
"icon-end": "_icon-end_1szj1_126"
|
|
16
|
-
}, c = u.bind($), q = l(
|
|
17
|
-
({
|
|
18
|
-
variant: t = "primary",
|
|
19
|
-
icon: e,
|
|
20
|
-
iconPlace: s = "start",
|
|
21
|
-
adjustWidthOn: n = "content",
|
|
22
|
-
type: r = "button",
|
|
23
|
-
children: i,
|
|
24
|
-
disabled: o = !1,
|
|
25
|
-
onClick: a,
|
|
26
|
-
title: d,
|
|
27
|
-
className: m,
|
|
28
|
-
...j
|
|
29
|
-
}, z) => {
|
|
30
|
-
const b = c("button", t, m, {
|
|
31
|
-
disabled: o,
|
|
32
|
-
[`width-${n}`]: n
|
|
33
|
-
}), _ = t === "text" && e;
|
|
34
|
-
return /* @__PURE__ */ p(
|
|
35
|
-
"button",
|
|
36
|
-
{
|
|
37
|
-
ref: z,
|
|
38
|
-
type: r,
|
|
39
|
-
disabled: o,
|
|
40
|
-
className: b,
|
|
41
|
-
onClick: a,
|
|
42
|
-
title: d,
|
|
43
|
-
...j,
|
|
44
|
-
children: [
|
|
45
|
-
_ && /* @__PURE__ */ h(
|
|
46
|
-
"i",
|
|
47
|
-
{
|
|
48
|
-
className: c("icon", {
|
|
49
|
-
[`icon-${s}`]: s
|
|
50
|
-
}),
|
|
51
|
-
children: _
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
i
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
export {
|
|
61
|
-
q as B
|
|
62
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "./bind-06a7ff84.js";
|
|
3
|
-
import { useRef as f } from "react";
|
|
4
|
-
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
-
const y = "_checkbox_189ko_1", C = "_disabled_189ko_11", E = "_input_189ko_16", D = "_control_189ko_23", K = "_children_189ko_149", N = {
|
|
6
|
-
checkbox: y,
|
|
7
|
-
disabled: C,
|
|
8
|
-
input: E,
|
|
9
|
-
control: D,
|
|
10
|
-
"partially-checked": "_partially-checked_189ko_76",
|
|
11
|
-
children: K
|
|
12
|
-
}, e = m.bind(N), Y = ({
|
|
13
|
-
children: l,
|
|
14
|
-
disabled: c = !1,
|
|
15
|
-
onChange: p,
|
|
16
|
-
className: h,
|
|
17
|
-
value: r,
|
|
18
|
-
partiallyChecked: b,
|
|
19
|
-
title: s,
|
|
20
|
-
...d
|
|
21
|
-
}) => {
|
|
22
|
-
const o = f(null), u = (n) => {
|
|
23
|
-
var i, k;
|
|
24
|
-
const { keyCode: a } = n;
|
|
25
|
-
if (a === _.SPACE_KEY_CODE) {
|
|
26
|
-
n.preventDefault(), (i = o.current) == null || i.click();
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
a === _.ENTER_KEY_CODE && (n.preventDefault(), (k = o.current) == null || k.click());
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ x(
|
|
32
|
-
"label",
|
|
33
|
-
{
|
|
34
|
-
id: "rp-ui-kit-checkbox-label",
|
|
35
|
-
className: e("checkbox", h, {
|
|
36
|
-
disabled: c
|
|
37
|
-
}),
|
|
38
|
-
title: s,
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ t(
|
|
41
|
-
"input",
|
|
42
|
-
{
|
|
43
|
-
ref: o,
|
|
44
|
-
tabIndex: 0,
|
|
45
|
-
type: "checkbox",
|
|
46
|
-
onKeyDown: u,
|
|
47
|
-
className: e("input", { "partially-checked": b }),
|
|
48
|
-
disabled: c,
|
|
49
|
-
onChange: p,
|
|
50
|
-
checked: r,
|
|
51
|
-
title: s,
|
|
52
|
-
...d
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
"span",
|
|
57
|
-
{
|
|
58
|
-
"aria-labelledby": "rp-ui-kit-checkbox-label",
|
|
59
|
-
role: "checkbox",
|
|
60
|
-
"aria-checked": r,
|
|
61
|
-
className: e("control", {
|
|
62
|
-
disabled: c
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
l && /* @__PURE__ */ t("span", { className: e("children", { disabled: c }), children: l })
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
Y as C
|
|
73
|
-
};
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import { jsx as d, jsxs as L } from "react/jsx-runtime";
|
|
2
|
-
import * as R from "react";
|
|
3
|
-
import { forwardRef as B, useState as Y, useRef as ee } from "react";
|
|
4
|
-
import { c as A } from "./bind-06a7ff84.js";
|
|
5
|
-
import { useFloating as te, offset as ne, flip as oe } from "@floating-ui/react-dom";
|
|
6
|
-
import { useSelect as N } from "downshift";
|
|
7
|
-
import { Scrollbars as se } from "rc-scrollbars";
|
|
8
|
-
import { u as ae } from "./useOnClickOutside-c332f7d3.js";
|
|
9
|
-
import { K as h } from "./keyCodes-f63c0e11.js";
|
|
10
|
-
import { B as de } from "./baseIconButton-b6adc843.js";
|
|
11
|
-
const le = (t) => /* @__PURE__ */ R.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ R.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" })), re = "_disabled_f4c9h_11", ie = "_hidden_f4c9h_15", ce = "_selected_f4c9h_21", _e = "_hover_f4c9h_24", he = {
|
|
12
|
-
"dropdown-option": "_dropdown-option_f4c9h_1",
|
|
13
|
-
disabled: re,
|
|
14
|
-
hidden: ie,
|
|
15
|
-
selected: ce,
|
|
16
|
-
hover: _e,
|
|
17
|
-
"single-option": "_single-option_f4c9h_37",
|
|
18
|
-
"sub-option": "_sub-option_f4c9h_45"
|
|
19
|
-
}, P = A.bind(he), fe = B(
|
|
20
|
-
(t, n) => {
|
|
21
|
-
const {
|
|
22
|
-
option: { value: a, disabled: f, hidden: w, label: l, title: o, groupRef: O },
|
|
23
|
-
selected: b,
|
|
24
|
-
onChange: g,
|
|
25
|
-
render: p,
|
|
26
|
-
highlightHovered: E,
|
|
27
|
-
onMouseEnter: m
|
|
28
|
-
} = t, D = () => {
|
|
29
|
-
g && g(a);
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */ d(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: P("dropdown-option", {
|
|
35
|
-
selected: b,
|
|
36
|
-
disabled: f,
|
|
37
|
-
hidden: w,
|
|
38
|
-
hover: E
|
|
39
|
-
}),
|
|
40
|
-
title: o,
|
|
41
|
-
onClick: D,
|
|
42
|
-
ref: n,
|
|
43
|
-
onMouseEnter: m,
|
|
44
|
-
children: /* @__PURE__ */ d("div", { className: P("single-option", { "sub-option": !!O }), children: p ? p(t) : l })
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
), pe = [
|
|
49
|
-
h.ENTER_KEY_CODE,
|
|
50
|
-
h.SPACE_KEY_CODE,
|
|
51
|
-
h.ARROW_DOWN_KEY_CODE
|
|
52
|
-
], ge = [h.ESCAPE_KEY_CODE, h.TAB_KEY_CODE];
|
|
53
|
-
var _ = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(_ || {});
|
|
54
|
-
const me = (t, n) => t.map(({ value: a }) => a).indexOf(n), ue = (t, n) => (t % n + n) % n, K = (t, n = 0, a = 1) => {
|
|
55
|
-
if (!t[n].disabled)
|
|
56
|
-
return n;
|
|
57
|
-
const f = t.length;
|
|
58
|
-
return K(
|
|
59
|
-
t,
|
|
60
|
-
ue(n + a, f),
|
|
61
|
-
a
|
|
62
|
-
);
|
|
63
|
-
}, ve = (t, n) => K(t, n), Ce = (t, n) => K(t, n, -1), we = "_container_vh03o_1", Oe = "_icon_vh03o_7", be = "_arrow_vh03o_13", Ee = "_dropdown_vh03o_19", De = "_disabled_vh03o_36", Ne = "_value_vh03o_43", Ke = "_error_vh03o_46", ye = "_touched_vh03o_46", xe = "_opened_vh03o_50", Ie = "_placeholder_vh03o_72", ke = "_ghost_vh03o_118", Se = {
|
|
64
|
-
container: we,
|
|
65
|
-
icon: Oe,
|
|
66
|
-
arrow: be,
|
|
67
|
-
dropdown: Ee,
|
|
68
|
-
"transparent-background": "_transparent-background_vh03o_33",
|
|
69
|
-
disabled: De,
|
|
70
|
-
value: Ne,
|
|
71
|
-
error: Ke,
|
|
72
|
-
touched: ye,
|
|
73
|
-
opened: xe,
|
|
74
|
-
placeholder: Ie,
|
|
75
|
-
"mobile-disabled": "_mobile-disabled_vh03o_87",
|
|
76
|
-
"select-list": "_select-list_vh03o_92",
|
|
77
|
-
"limited-width": "_limited-width_vh03o_109",
|
|
78
|
-
"options-container": "_options-container_vh03o_113",
|
|
79
|
-
ghost: ke
|
|
80
|
-
}, i = A.bind(Se), je = ({
|
|
81
|
-
value: t = "",
|
|
82
|
-
options: n = [],
|
|
83
|
-
disabled: a = !1,
|
|
84
|
-
error: f,
|
|
85
|
-
onChange: w,
|
|
86
|
-
onFocus: l,
|
|
87
|
-
onBlur: o,
|
|
88
|
-
mobileDisabled: O,
|
|
89
|
-
title: b,
|
|
90
|
-
touched: g = !1,
|
|
91
|
-
icon: p,
|
|
92
|
-
variant: E,
|
|
93
|
-
placeholder: m = "",
|
|
94
|
-
renderOption: D,
|
|
95
|
-
transparentBackground: T = !1,
|
|
96
|
-
className: W,
|
|
97
|
-
toggleButtonClassName: H,
|
|
98
|
-
isListWidthLimited: M = !1
|
|
99
|
-
}) => {
|
|
100
|
-
const [r, c] = Y(!1), y = ee(null), [$, u] = Y(null), { refs: x, floatingStyles: j } = te({
|
|
101
|
-
middleware: [
|
|
102
|
-
ne(5),
|
|
103
|
-
oe({
|
|
104
|
-
fallbackPlacements: ["bottom", "top"]
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
});
|
|
108
|
-
ae(y, () => {
|
|
109
|
-
r && (c(!1), o == null || o());
|
|
110
|
-
});
|
|
111
|
-
const I = (e) => {
|
|
112
|
-
e.disabled || (w(e.value), c((s) => !s));
|
|
113
|
-
}, V = () => n.find(({ value: e }) => e === t), k = me(n, t), {
|
|
114
|
-
getToggleButtonProps: U,
|
|
115
|
-
getMenuProps: Z,
|
|
116
|
-
getItemProps: q,
|
|
117
|
-
setHighlightedIndex: v,
|
|
118
|
-
highlightedIndex: S,
|
|
119
|
-
selectedItem: C
|
|
120
|
-
} = N({
|
|
121
|
-
items: n,
|
|
122
|
-
itemToString: (e) => (e != null && e.label ? String(e.label) : m) || "",
|
|
123
|
-
selectedItem: V(),
|
|
124
|
-
isOpen: r,
|
|
125
|
-
circularNavigation: !0,
|
|
126
|
-
defaultHighlightedIndex: k,
|
|
127
|
-
onHighlightedIndexChange: (e) => {
|
|
128
|
-
switch (e.type) {
|
|
129
|
-
case N.stateChangeTypes.MenuKeyDownArrowUp:
|
|
130
|
-
return u(_.ON_KEY_DOWN), v(Ce(n, e.highlightedIndex)), e;
|
|
131
|
-
case N.stateChangeTypes.MenuKeyDownArrowDown:
|
|
132
|
-
return u(_.ON_KEY_DOWN), v(ve(n, e.highlightedIndex)), e;
|
|
133
|
-
default:
|
|
134
|
-
return e;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}), z = () => {
|
|
138
|
-
a || (c((e) => !e), r ? o == null || o() : l == null || l(), u(_.ON_CLICK));
|
|
139
|
-
}, G = () => {
|
|
140
|
-
if (!t && t !== !1 && t !== 0)
|
|
141
|
-
return m;
|
|
142
|
-
let e = t;
|
|
143
|
-
return n.forEach((s) => {
|
|
144
|
-
s.value === t && (e = s.label);
|
|
145
|
-
}), e;
|
|
146
|
-
}, J = (e) => {
|
|
147
|
-
const { keyCode: s } = e;
|
|
148
|
-
pe.includes(s) && !r && (e.preventDefault(), v(k), c(!0), l == null || l(), u(_.ON_KEY_DOWN));
|
|
149
|
-
}, Q = (e) => {
|
|
150
|
-
const { keyCode: s } = e;
|
|
151
|
-
if (s === h.ENTER_KEY_CODE) {
|
|
152
|
-
const F = n[S];
|
|
153
|
-
I(F), c(!1), o == null || o();
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
ge.includes(s) && (e.stopPropagation(), c(!1), o == null || o());
|
|
157
|
-
}, X = () => /* @__PURE__ */ d("div", { className: i("options-container"), children: n.map((e, s) => /* @__PURE__ */ d(
|
|
158
|
-
fe,
|
|
159
|
-
{
|
|
160
|
-
...q({
|
|
161
|
-
item: e,
|
|
162
|
-
index: s
|
|
163
|
-
}),
|
|
164
|
-
selected: e.value === ((C == null ? void 0 : C.value) ?? C),
|
|
165
|
-
option: { title: e.label, ...e },
|
|
166
|
-
highlightHovered: S === s && $ !== _.ON_CLICK,
|
|
167
|
-
render: D,
|
|
168
|
-
onChange: e.disabled ? null : () => I(e),
|
|
169
|
-
onMouseEnter: () => v(s)
|
|
170
|
-
},
|
|
171
|
-
e.value
|
|
172
|
-
)) });
|
|
173
|
-
return /* @__PURE__ */ L("div", { ref: y, className: i("container", W), title: b, children: [
|
|
174
|
-
/* @__PURE__ */ L(
|
|
175
|
-
"button",
|
|
176
|
-
{
|
|
177
|
-
disabled: a,
|
|
178
|
-
...U({
|
|
179
|
-
className: i("dropdown", E, H, {
|
|
180
|
-
"transparent-background": T,
|
|
181
|
-
opened: r,
|
|
182
|
-
disabled: a,
|
|
183
|
-
error: f,
|
|
184
|
-
touched: g,
|
|
185
|
-
"mobile-disabled": O
|
|
186
|
-
}),
|
|
187
|
-
onClick: z,
|
|
188
|
-
onKeyDown: J,
|
|
189
|
-
ref: x.setReference
|
|
190
|
-
}),
|
|
191
|
-
type: "button",
|
|
192
|
-
children: [
|
|
193
|
-
p && /* @__PURE__ */ d("span", { className: i("icon"), children: p }),
|
|
194
|
-
/* @__PURE__ */ d("span", { className: i("value", { placeholder: !t }), children: G() }),
|
|
195
|
-
/* @__PURE__ */ d(de, { className: i("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(le, {}) })
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
r && /* @__PURE__ */ d(
|
|
200
|
-
"div",
|
|
201
|
-
{
|
|
202
|
-
style: j,
|
|
203
|
-
className: i("select-list", { opened: r, "limited-width": M }),
|
|
204
|
-
...Z({
|
|
205
|
-
onKeyDown: Q,
|
|
206
|
-
ref: x.setFloating
|
|
207
|
-
}),
|
|
208
|
-
children: /* @__PURE__ */ d(se, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: X() })
|
|
209
|
-
}
|
|
210
|
-
)
|
|
211
|
-
] });
|
|
212
|
-
};
|
|
213
|
-
export {
|
|
214
|
-
je as D,
|
|
215
|
-
le as S
|
|
216
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { jsxs as K, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as d from "react";
|
|
3
|
-
import { useRef as A, useMemo as B } from "react";
|
|
4
|
-
import { c as T } from "./bind-06a7ff84.js";
|
|
5
|
-
import { K as e } from "./keyCodes-f63c0e11.js";
|
|
6
|
-
import { B as f } from "./baseIconButton-b6adc843.js";
|
|
7
|
-
const W = (t) => /* @__PURE__ */ d.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ d.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.00117 2.62046C7.63142 2.6189 7.33294 2.91738 7.3345 3.28712L7.35159 7.35159L3.28712 7.3345C2.91738 7.33295 2.6189 7.63142 2.62045 8.00117C2.62201 8.37091 2.92301 8.67191 3.29275 8.67346L7.35722 8.69056L7.37391 12.6599C7.37547 13.0296 7.67647 13.3306 8.04621 13.3322C8.41596 13.3337 8.71443 13.0352 8.71288 12.6655L8.69619 8.69619L12.6655 8.71288C13.0352 8.71444 13.3337 8.41596 13.3322 8.04621C13.3306 7.67647 13.0296 7.37547 12.6599 7.37392L8.69056 7.35722L8.67346 3.29275C8.67191 2.92301 8.37091 2.62201 8.00117 2.62046Z" })), v = (t) => /* @__PURE__ */ d.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ d.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.31082 7.31081C2.94108 7.30926 2.6426 7.60773 2.64415 7.97748C2.64571 8.34722 2.9467 8.64822 3.31645 8.64977L12.6892 8.68919C13.0589 8.69074 13.3574 8.39227 13.3559 8.02252C13.3543 7.65278 13.0533 7.35178 12.6836 7.35023L3.31082 7.31081Z" })), y = 5, h = 16, S = [
|
|
8
|
-
e.TAB_KEY_CODE,
|
|
9
|
-
e.BACKSPACE_KEY_CODE,
|
|
10
|
-
e.ARROW_LEFT_KEY_CODE,
|
|
11
|
-
e.ARROW_UP_KEY_CODE,
|
|
12
|
-
e.ARROW_RIGHT_KEY_CODE,
|
|
13
|
-
e.ARROW_DOWN_KEY_CODE,
|
|
14
|
-
e.DELETE_KEY_CODE,
|
|
15
|
-
e.NUM_LOCK_0_KEY_CODE,
|
|
16
|
-
e.NUM_LOCK_1_KEY_CODE,
|
|
17
|
-
e.NUM_LOCK_2_KEY_CODE,
|
|
18
|
-
e.NUM_LOCK_3_KEY_CODE,
|
|
19
|
-
e.NUM_LOCK_4_KEY_CODE,
|
|
20
|
-
e.NUM_LOCK_5_KEY_CODE,
|
|
21
|
-
e.NUM_LOCK_6_KEY_CODE,
|
|
22
|
-
e.NUM_LOCK_7_KEY_CODE,
|
|
23
|
-
e.NUM_LOCK_8_KEY_CODE,
|
|
24
|
-
e.NUM_LOCK_9_KEY_CODE
|
|
25
|
-
], I = "_disabled_3tc9r_6", b = "_label_3tc9r_10", k = "_sign_3tc9r_21", F = "_error_3tc9r_36", H = "_touched_3tc9r_36", V = "_filled_3tc9r_41", P = "_input_3tc9r_26", j = {
|
|
26
|
-
"field-number": "_field-number_3tc9r_1",
|
|
27
|
-
disabled: I,
|
|
28
|
-
label: b,
|
|
29
|
-
sign: k,
|
|
30
|
-
"input-container": "_input-container_3tc9r_26",
|
|
31
|
-
error: F,
|
|
32
|
-
touched: H,
|
|
33
|
-
filled: V,
|
|
34
|
-
"input-field": "_input-field_3tc9r_48",
|
|
35
|
-
input: P
|
|
36
|
-
}, r = T.bind(j), z = ({
|
|
37
|
-
value: t = "",
|
|
38
|
-
placeholder: D = "0",
|
|
39
|
-
disabled: c = !1,
|
|
40
|
-
onChange: i,
|
|
41
|
-
onFocus: a,
|
|
42
|
-
onBlur: G,
|
|
43
|
-
label: O,
|
|
44
|
-
postfix: s = "",
|
|
45
|
-
min: o = 0,
|
|
46
|
-
max: E = Number.MAX_SAFE_INTEGER,
|
|
47
|
-
title: p,
|
|
48
|
-
error: m,
|
|
49
|
-
touched: L = !1,
|
|
50
|
-
...N
|
|
51
|
-
}) => {
|
|
52
|
-
const C = A(null), R = (_) => {
|
|
53
|
-
let n = _.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
-
if (n === "") {
|
|
55
|
-
i("");
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
n = +n, n >= o && n <= E && i(n);
|
|
59
|
-
}, Y = (_) => {
|
|
60
|
-
const { keyCode: n } = _;
|
|
61
|
-
S.includes(n) || (n < e.NUMBER_START_KEY_CODE || n > e.NUMBER_END_KEY_CODE || _.shiftKey) && _.preventDefault();
|
|
62
|
-
}, w = () => {
|
|
63
|
-
const _ = +t - 1;
|
|
64
|
-
_ >= o && _ <= E && i(_);
|
|
65
|
-
}, g = () => {
|
|
66
|
-
const _ = +t + 1;
|
|
67
|
-
_ >= o && _ <= E && i(_);
|
|
68
|
-
}, u = D + s, M = B(() => {
|
|
69
|
-
let _ = (String(t) || u).length;
|
|
70
|
-
return s && !t && (_ += 1), _ > h ? `${h}ch` : `${_ || y}ch`;
|
|
71
|
-
}, [u, s, t]), U = () => {
|
|
72
|
-
C && C.current && C.current.focus(), a && a();
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */ K("div", { className: r("field-number", { disabled: c }), children: [
|
|
75
|
-
O && /* @__PURE__ */ l("span", { className: r("label"), children: O }),
|
|
76
|
-
/* @__PURE__ */ K(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: r("input-container", {
|
|
80
|
-
filled: !!t || t === 0,
|
|
81
|
-
error: m,
|
|
82
|
-
disabled: c,
|
|
83
|
-
touched: L
|
|
84
|
-
}),
|
|
85
|
-
title: p,
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ l(
|
|
88
|
-
f,
|
|
89
|
-
{
|
|
90
|
-
className: r("sign", "minus"),
|
|
91
|
-
disabled: c,
|
|
92
|
-
onClick: w,
|
|
93
|
-
children: /* @__PURE__ */ l(v, {})
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ K("span", { className: r("input-field", { disabled: c }), onClick: U, children: [
|
|
97
|
-
/* @__PURE__ */ l(
|
|
98
|
-
"input",
|
|
99
|
-
{
|
|
100
|
-
ref: C,
|
|
101
|
-
className: r("input"),
|
|
102
|
-
type: "number",
|
|
103
|
-
value: t,
|
|
104
|
-
placeholder: u,
|
|
105
|
-
disabled: c,
|
|
106
|
-
min: o,
|
|
107
|
-
max: E,
|
|
108
|
-
onKeyDown: c ? void 0 : Y,
|
|
109
|
-
onChange: c ? void 0 : R,
|
|
110
|
-
onFocus: c ? void 0 : a,
|
|
111
|
-
style: { width: M },
|
|
112
|
-
...N
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
!!s && (t === 0 || !!t) && /* @__PURE__ */ l("span", { children: s.slice(0, 1) })
|
|
116
|
-
] }),
|
|
117
|
-
/* @__PURE__ */ l(f, { className: r("sign", "plus"), disabled: c, onClick: g, children: /* @__PURE__ */ l(W, {}) })
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
] });
|
|
122
|
-
};
|
|
123
|
-
export {
|
|
124
|
-
z as F,
|
|
125
|
-
W as S,
|
|
126
|
-
v as a
|
|
127
|
-
};
|