nntc-ui 0.0.76 → 0.0.78
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/.editorconfig +25 -0
- package/.gitattributes +64 -0
- package/.gitlab-ci.yml +40 -0
- package/.helm/Chart.yaml +5 -0
- package/.helm/values.yaml +12 -0
- package/.prettierignore +12 -0
- package/.prettierrc.json +19 -0
- package/.storybook/global.d.ts +4 -0
- package/.storybook/main.ts +12 -0
- package/.storybook/preview.tsx +62 -0
- package/.stylelintignore +3 -0
- package/.stylelintrc.json +5 -0
- package/.vscode/settings.json +10 -0
- package/Dockerfile +21 -0
- package/babel.config.json +23 -0
- package/cssModulesPluginTemplate.js +5 -0
- package/eslint.config.mjs +161 -0
- package/gl-container-scanning-report.json +1 -0
- package/gl-dependency-scanning-report.json +1 -0
- package/gl-sbom-report.cdx.json +1 -0
- package/nginx.conf +14 -0
- package/package.json +2 -2
- package/postcss.config.cjs +12 -0
- package/src/components/common/Button/Button.stories.tsx +46 -0
- package/src/components/common/Button/Button.tsx +47 -0
- package/src/components/common/Button/button.module.css +204 -0
- package/src/components/common/Button/button.module.css.json +1 -0
- package/src/components/common/Button/index.ts +1 -0
- package/src/components/common/ButtonsGroup/ButtonsGroup.stories.tsx +52 -0
- package/src/components/common/ButtonsGroup/ButtonsGroup.tsx +16 -0
- package/src/components/common/ButtonsGroup/buttonsGroup.module.css +25 -0
- package/src/components/common/ButtonsGroup/buttonsGroup.module.css.json +1 -0
- package/src/components/common/ButtonsGroup/index.ts +1 -0
- package/src/components/common/Checkbox/Checkbox.stories.tsx +48 -0
- package/src/components/common/Checkbox/Checkbox.tsx +97 -0
- package/src/components/common/Checkbox/checkbox.module.css +112 -0
- package/src/components/common/Checkbox/checkbox.module.css.json +1 -0
- package/src/components/common/Checkbox/index.ts +1 -0
- package/src/components/common/Checklist/Checklist.stories.tsx +138 -0
- package/src/components/common/Checklist/Checklist.tsx +151 -0
- package/src/components/common/Checklist/checklist.module.css +23 -0
- package/src/components/common/Checklist/checklist.module.css.json +1 -0
- package/src/components/common/Checklist/index.ts +4 -0
- package/src/components/common/Checklist/models/Item.ts +4 -0
- package/src/components/common/Checklist/models/SelectedItems.ts +3 -0
- package/src/components/common/Checklist/utils/filterItems.ts +18 -0
- package/src/components/common/ColorPicker/ColorPicker.stories.tsx +110 -0
- package/src/components/common/ColorPicker/ColorPicker.tsx +116 -0
- package/src/components/common/ColorPicker/colorPicker.module.css +132 -0
- package/src/components/common/ColorPicker/colorPicker.module.css.json +1 -0
- package/src/components/common/ColorPicker/index.ts +1 -0
- package/src/components/common/DateTime/DateTime.stories.tsx +155 -0
- package/src/components/common/DateTime/DateTime.tsx +142 -0
- package/src/components/common/DateTime/dateTime.module.css +96 -0
- package/src/components/common/DateTime/dateTime.module.css.json +1 -0
- package/src/components/common/DateTime/index.ts +2 -0
- package/src/components/common/DateTime/models/dayjs.ts +18 -0
- package/src/components/common/DateTime/ui/CalendarPopover/CalendarPopover.tsx +481 -0
- package/src/components/common/DateTime/ui/CalendarPopover/calendarPopover.module.css +131 -0
- package/src/components/common/DateTime/ui/CalendarPopover/calendarPopover.module.css.json +1 -0
- package/src/components/common/DateTime/ui/CalendarPopover/index.ts +1 -0
- package/src/components/common/Input/Input.stories.tsx +100 -0
- package/src/components/common/Input/Input.tsx +70 -0
- package/src/components/common/Input/index.ts +1 -0
- package/src/components/common/Input/input.module.css +72 -0
- package/src/components/common/Input/input.module.css.json +1 -0
- package/src/components/common/MultiSelect/MultiSelect.stories.tsx +259 -0
- package/src/components/common/MultiSelect/MultiSelect.tsx +226 -0
- package/src/components/common/MultiSelect/index.ts +4 -0
- package/src/components/common/MultiSelect/models/Item.ts +7 -0
- package/src/components/common/MultiSelect/models/TitleVariant.ts +1 -0
- package/src/components/common/MultiSelect/multiSelect.module.css +260 -0
- package/src/components/common/MultiSelect/multiSelect.module.css.json +1 -0
- package/src/components/common/MultiSelect/multiSelect.stories.module.css +4 -0
- package/src/components/common/MultiSelect/ui/SelectPopover/SelectPopover.tsx +70 -0
- package/src/components/common/MultiSelect/ui/SelectPopover/index.ts +1 -0
- package/src/components/common/MultiSelect/utils/getTitle.ts +16 -0
- package/src/components/common/SearchInput/SearchInput.stories.tsx +87 -0
- package/src/components/common/SearchInput/SearchInput.tsx +68 -0
- package/src/components/common/SearchInput/index.ts +1 -0
- package/src/components/common/SearchInput/searchInput.module.css +90 -0
- package/src/components/common/SearchInput/searchInput.module.css.json +1 -0
- package/src/components/common/Select/Select.stories.tsx +161 -0
- package/src/components/common/Select/Select.tsx +168 -0
- package/src/components/common/Select/index.ts +5 -0
- package/src/components/common/Select/models/Divider.ts +4 -0
- package/src/components/common/Select/models/Item.ts +15 -0
- package/src/components/common/Select/select.module.css +187 -0
- package/src/components/common/Select/select.module.css.json +1 -0
- package/src/components/common/Select/ui/SelectPopover/SelectPopover.tsx +50 -0
- package/src/components/common/Select/ui/SelectPopover/index.ts +1 -0
- package/src/components/common/WrapForLabel/WrapForLabel.stories.tsx +36 -0
- package/src/components/common/WrapForLabel/WrapForLabel.tsx +19 -0
- package/src/components/common/WrapForLabel/index.ts +1 -0
- package/src/components/common/WrapForLabel/wrapForLabel.module.css +14 -0
- package/src/components/common/WrapForLabel/wrapForLabel.module.css.json +1 -0
- package/src/components/layout/Layout/Layout.stories.tsx +44 -0
- package/src/components/layout/Layout/Layout.tsx +20 -0
- package/src/components/layout/Layout/index.ts +1 -0
- package/src/components/layout/Layout/layout.module.css +16 -0
- package/src/components/layout/Layout/layout.module.css.json +1 -0
- package/src/components/layout/Surface/Surface.stories.tsx +42 -0
- package/src/components/layout/Surface/Surface.tsx +16 -0
- package/src/components/layout/Surface/index.ts +1 -0
- package/src/components/layout/Surface/surface.module.css +24 -0
- package/src/components/layout/Surface/surface.module.css.json +1 -0
- package/src/components/navigation/Menu/Menu.stories.tsx +226 -0
- package/src/components/navigation/Menu/Menu.tsx +121 -0
- package/src/components/navigation/Menu/index.ts +4 -0
- package/src/components/navigation/Menu/menu.module.css +110 -0
- package/src/components/navigation/Menu/menu.module.css.json +1 -0
- package/src/components/navigation/Menu/models/Divider.ts +4 -0
- package/src/components/navigation/Menu/models/Item.ts +20 -0
- package/src/components/navigation/Tabs/Tabs.stories.tsx +959 -0
- package/src/components/navigation/Tabs/Tabs.tsx +163 -0
- package/src/components/navigation/Tabs/index.ts +3 -0
- package/src/components/navigation/Tabs/models/Item.ts +9 -0
- package/src/components/navigation/Tabs/tabs.module.css +179 -0
- package/src/components/navigation/Tabs/tabs.module.css.json +1 -0
- package/src/components/navigation/Tabs/tabs.stories.module.css +3 -0
- package/src/components/view/Card/Card.stories.tsx +74 -0
- package/src/components/view/Card/Card.tsx +29 -0
- package/src/components/view/Card/card.module.css +21 -0
- package/src/components/view/Card/card.module.css.json +1 -0
- package/src/components/view/Card/index.ts +1 -0
- package/src/components/view/Chip/Chip.stories.tsx +208 -0
- package/src/components/view/Chip/Chip.tsx +69 -0
- package/src/components/view/Chip/chip.module.css +152 -0
- package/src/components/view/Chip/chip.module.css.json +1 -0
- package/src/components/view/Chip/index.ts +2 -0
- package/src/components/view/Modal/Modal.stories.tsx +63 -0
- package/src/components/view/Modal/Modal.tsx +53 -0
- package/src/components/view/Modal/index.ts +1 -0
- package/src/components/view/Modal/modal.module.css +18 -0
- package/src/components/view/Modal/modal.module.css.json +1 -0
- package/src/components/view/Modal/modal.stories.module.css +18 -0
- package/src/components/view/Pairs/Pairs.stories.tsx +101 -0
- package/src/components/view/Pairs/Pairs.tsx +61 -0
- package/src/components/view/Pairs/index.ts +2 -0
- package/src/components/view/Pairs/models/Pair.ts +4 -0
- package/src/components/view/Pairs/pairs.module.css +35 -0
- package/src/components/view/Pairs/pairs.module.css.json +1 -0
- package/src/components/view/Pairs/ui/TypographyWithTooltip.tsx +31 -0
- package/src/components/view/Popover/Popover.stories.tsx +105 -0
- package/src/components/view/Popover/Popover.tsx +72 -0
- package/src/components/view/Popover/index.ts +1 -0
- package/src/components/view/Popover/popover.module.css +23 -0
- package/src/components/view/Popover/popover.module.css.json +1 -0
- package/src/components/view/Popover/ui/Arrow/Arrow.tsx +11 -0
- package/src/components/view/Popover/ui/Arrow/index.ts +1 -0
- package/src/components/view/Popover/ui/PopoverContent/PopoverContent.tsx +48 -0
- package/src/components/view/Popover/ui/PopoverContent/index.ts +1 -0
- package/src/components/view/Popover/ui/PopoverProvider/PopoverProvider.tsx +13 -0
- package/src/components/view/Popover/ui/PopoverProvider/constants/PopoverContext.ts +5 -0
- package/src/components/view/Popover/ui/PopoverProvider/hooks/usePopover.ts +71 -0
- package/src/components/view/Popover/ui/PopoverProvider/index.ts +1 -0
- package/src/components/view/Popover/ui/PopoverProvider/models/PopoverOptions.ts +12 -0
- package/src/components/view/Popover/ui/PopoverProvider/models/PopoverState.ts +7 -0
- package/src/components/view/Popover/ui/PopoverTrigger/PopoverTrigger.tsx +36 -0
- package/src/components/view/Popover/ui/PopoverTrigger/index.ts +1 -0
- package/src/components/view/Tooltip/Tooltip.stories.tsx +141 -0
- package/src/components/view/Tooltip/Tooltip.tsx +74 -0
- package/src/components/view/Tooltip/index.ts +1 -0
- package/src/components/view/Tooltip/tooltip.module.css +93 -0
- package/src/components/view/Tooltip/tooltip.module.css.json +1 -0
- package/src/components/view/Tooltip/ui/TooltipContent/TooltipContent.tsx +88 -0
- package/src/components/view/Tooltip/ui/TooltipContent/index.ts +1 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/TooltipProvider.tsx +13 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/constants/TooltipContext.ts +5 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/hooks/useTooltip.ts +76 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/index.ts +1 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/models/TooltipOptions.ts +12 -0
- package/src/components/view/Tooltip/ui/TooltipProvider/models/TooltipState.ts +3 -0
- package/src/components/view/Tooltip/ui/TooltipTrigger/TooltipTrigger.tsx +36 -0
- package/src/components/view/Tooltip/ui/TooltipTrigger/index.ts +1 -0
- package/src/components/view/TreeView/TreeView.stories.tsx +174 -0
- package/src/components/view/TreeView/TreeView.tsx +69 -0
- package/src/components/view/TreeView/index.ts +2 -0
- package/src/components/view/TreeView/models/Item.ts +7 -0
- package/src/components/view/TreeView/treeView.module.css +3 -0
- package/src/components/view/TreeView/treeView.module.css.json +1 -0
- package/src/components/view/TreeView/ui/TreeViewItem/TreeViewItem.tsx +84 -0
- package/src/components/view/TreeView/ui/TreeViewItem/index.ts +1 -0
- package/src/components/view/TreeView/ui/TreeViewItem/treeViewItem.module.css +30 -0
- package/src/components/view/TreeView/ui/TreeViewItem/treeViewItem.module.css.json +1 -0
- package/src/components/view/TreeView/utils/getFilteredTree.ts +23 -0
- package/src/components/view/Typography/Typography.stories.tsx +115 -0
- package/src/components/view/Typography/Typography.tsx +42 -0
- package/src/components/view/Typography/index.ts +1 -0
- package/src/components/view/Typography/typography.module.css +97 -0
- package/src/components/view/Typography/typography.module.css.json +1 -0
- package/src/components/view/VirtualTable/VirtualTable.stories.tsx +126 -0
- package/src/components/view/VirtualTable/VirtualTable.tsx +684 -0
- package/src/components/view/VirtualTable/constants/baseColumns.ts +39 -0
- package/src/components/view/VirtualTable/constants/bigBaseColumns.ts +35 -0
- package/src/components/view/VirtualTable/constants/bigSampleData.ts +92 -0
- package/src/components/view/VirtualTable/constants/defaultRowHeight.ts +1 -0
- package/src/components/view/VirtualTable/constants/sampleData.ts +213 -0
- package/src/components/view/VirtualTable/index.ts +14 -0
- package/src/components/view/VirtualTable/models/AdditionalButton.ts +10 -0
- package/src/components/view/VirtualTable/models/ColumnAlign.ts +1 -0
- package/src/components/view/VirtualTable/models/FilterBy.ts +5 -0
- package/src/components/view/VirtualTable/models/SortBy.ts +7 -0
- package/src/components/view/VirtualTable/models/SortType.ts +1 -0
- package/src/components/view/VirtualTable/models/TableCell.ts +5 -0
- package/src/components/view/VirtualTable/models/TableColumn.ts +26 -0
- package/src/components/view/VirtualTable/models/TableRow.ts +5 -0
- package/src/components/view/VirtualTable/models/VerticalAlign.ts +1 -0
- package/src/components/view/VirtualTable/models/VirtualTableRef.ts +4 -0
- package/src/components/view/VirtualTable/ui/DateFiltration/DateFiltration.tsx +37 -0
- package/src/components/view/VirtualTable/ui/DateFiltration/dateFiltration.module.css +6 -0
- package/src/components/view/VirtualTable/ui/DateFiltration/dateFiltration.module.css.json +1 -0
- package/src/components/view/VirtualTable/ui/DateFiltration/index.ts +1 -0
- package/src/components/view/VirtualTable/ui/DefaultColumn/DefaultColumn.tsx +130 -0
- package/src/components/view/VirtualTable/ui/DefaultColumn/index.ts +1 -0
- package/src/components/view/VirtualTable/ui/HeaderDropdown/HeaderDropdown.tsx +297 -0
- package/src/components/view/VirtualTable/ui/HeaderDropdown/headerDropdown.module.css +20 -0
- package/src/components/view/VirtualTable/ui/HeaderDropdown/headerDropdown.module.css.json +1 -0
- package/src/components/view/VirtualTable/ui/HeaderDropdown/index.ts +1 -0
- package/src/components/view/VirtualTable/ui/NumberFiltration/NumberFiltration.tsx +150 -0
- package/src/components/view/VirtualTable/ui/NumberFiltration/index.ts +1 -0
- package/src/components/view/VirtualTable/ui/NumberFiltration/numberFiltration.module.css +23 -0
- package/src/components/view/VirtualTable/ui/NumberFiltration/numberFiltration.module.css.json +1 -0
- package/src/components/view/VirtualTable/utils/alphanumericCompare.ts +29 -0
- package/src/components/view/VirtualTable/utils/getColumns.ts +38 -0
- package/src/components/view/VirtualTable/utils/getNextHorizontalHeaders.ts +21 -0
- package/src/components/view/VirtualTable/utils/getNextVerticalHeaders.ts +18 -0
- package/src/components/view/VirtualTable/utils/getPrevHorizontalHeaders.ts +19 -0
- package/src/components/view/VirtualTable/utils/getPrevVerticalHeaders.ts +22 -0
- package/src/components/view/VirtualTable/utils/recursiveFilter.ts +33 -0
- package/src/components/view/VirtualTable/utils/recursiveSort.ts +24 -0
- package/src/components/view/VirtualTable/virtualTable.module.css +263 -0
- package/src/components/view/VirtualTable/virtualTable.module.css.json +1 -0
- package/src/hooks/useTranslation.ts +15 -0
- package/src/hooks/window/hooks/useWindowSize.ts +14 -0
- package/src/hooks/window/index.ts +1 -0
- package/src/i18n/config.ts +23 -0
- package/src/i18n/locales/en.json +23 -0
- package/src/i18n/locales/ru.json +23 -0
- package/src/icons/AddIcon.tsx +9 -0
- package/src/icons/AlertIcon.tsx +13 -0
- package/src/icons/ArrowDropDownIcon.tsx +9 -0
- package/src/icons/ArrowDropUpIcon.tsx +9 -0
- package/src/icons/AttachIcon.tsx +10 -0
- package/src/icons/BarChartIcon.tsx +9 -0
- package/src/icons/BookmarkAddIcon.tsx +12 -0
- package/src/icons/BookmarkIcon.tsx +9 -0
- package/src/icons/CheckboxDeselectedIcon.tsx +9 -0
- package/src/icons/CheckboxIcon.tsx +10 -0
- package/src/icons/CheckboxSeveralIcon.tsx +10 -0
- package/src/icons/ChevronLeftIcon.tsx +9 -0
- package/src/icons/ChevronRightIcon.tsx +9 -0
- package/src/icons/CircleFilledIcon.tsx +9 -0
- package/src/icons/CloseIcon.tsx +9 -0
- package/src/icons/DateRangeIcon.tsx +10 -0
- package/src/icons/DeleteIcon.tsx +9 -0
- package/src/icons/DoneIcon.tsx +9 -0
- package/src/icons/DownloadIcon.tsx +9 -0
- package/src/icons/EditIcon.tsx +10 -0
- package/src/icons/ExportTableIcon.tsx +19 -0
- package/src/icons/FileUploadIcon.tsx +9 -0
- package/src/icons/FilterClearIcon.tsx +24 -0
- package/src/icons/FilterIcon.tsx +13 -0
- package/src/icons/FullScreenOffIcon.tsx +9 -0
- package/src/icons/FullScreenOnIcon.tsx +12 -0
- package/src/icons/Icon.tsx +27 -0
- package/src/icons/InfoIcon.tsx +12 -0
- package/src/icons/KeyboardArrowDownIcon.tsx +9 -0
- package/src/icons/ListIcon.tsx +9 -0
- package/src/icons/MoreVerticalIcon.tsx +10 -0
- package/src/icons/SearchIcon.tsx +10 -0
- package/src/icons/SettingsIcon.tsx +10 -0
- package/src/icons/SortDownIcon.tsx +9 -0
- package/src/icons/SortUpIcon.tsx +9 -0
- package/src/icons/TableChartIcon.tsx +9 -0
- package/src/icons/UploadIcon.tsx +9 -0
- package/src/icons/VisibilityIcon.tsx +18 -0
- package/src/icons/WellIcon.tsx +10 -0
- package/src/icons/index.ts +38 -0
- package/src/index.ts +61 -0
- package/src/models/Maybe.ts +1 -0
- package/src/models/UiProps.ts +3 -0
- package/{icons/index.js → src/stories/icons/Icons.stories.tsx} +40 -12
- package/src/types/global.d.ts +3 -0
- package/src/types/tanstack.d.ts +36 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/toFirstLetterLowerCase.ts +3 -0
- package/src/utils/toFirstLetterUpperCase.ts +3 -0
- package/tsconfig.json +50 -0
- package/tsup.config.ts +11 -0
- package/vite.config.ts +13 -0
- package/werf-giterminism.yaml +19 -0
- package/werf.yaml +8 -0
- package/chunk-64SOJQ5A.js +0 -292
- package/icons/index.d.ts +0 -85
- package/index.css +0 -2111
- package/index.d.ts +0 -459
- package/index.js +0 -4361
- /package/{styles → src/styles}/global.css +0 -0
- /package/{styles → src/styles}/localGlobal.css +0 -0
- /package/{styles → src/styles}/themes/dark.css +0 -0
- /package/{styles → src/styles}/themes/light.css +0 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# top-most EditorConfig file
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
### defaults
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
|
|
8
|
+
# Unix-style newlines with
|
|
9
|
+
end_of_line = lf
|
|
10
|
+
|
|
11
|
+
# 2 space indentation
|
|
12
|
+
indent_size = 2
|
|
13
|
+
indent_style = space
|
|
14
|
+
tab_width = 2
|
|
15
|
+
|
|
16
|
+
# remove any whitespace characters preceding newline characters
|
|
17
|
+
trim_trailing_whitespace = true
|
|
18
|
+
|
|
19
|
+
# newline ending every file
|
|
20
|
+
insert_final_newline = true
|
|
21
|
+
|
|
22
|
+
### custom for markdown
|
|
23
|
+
[*.md]
|
|
24
|
+
# do not remove any whitespace characters preceding newline characters
|
|
25
|
+
trim_trailing_whitespace = false
|
package/.gitattributes
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# Set default behavior to automatically normalize line endings.
|
|
3
|
+
###############################################################################
|
|
4
|
+
* text=auto
|
|
5
|
+
* eol=lf
|
|
6
|
+
|
|
7
|
+
###############################################################################
|
|
8
|
+
# Set default behavior for command prompt diff.
|
|
9
|
+
#
|
|
10
|
+
# This is need for earlier builds of msysgit that does not have it on by
|
|
11
|
+
# default for csharp files.
|
|
12
|
+
# Note: This is only used by command line
|
|
13
|
+
###############################################################################
|
|
14
|
+
#*.cs diff=csharp
|
|
15
|
+
|
|
16
|
+
###############################################################################
|
|
17
|
+
# Set the merge driver for project and solution files
|
|
18
|
+
#
|
|
19
|
+
# Merging from the command prompt will add diff markers to the files if there
|
|
20
|
+
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
|
21
|
+
# the diff markers are never inserted). Diff markers may cause the following
|
|
22
|
+
# file extensions to fail to load in VS. An alternative would be to treat
|
|
23
|
+
# these files as binary and thus will always conflict and require user
|
|
24
|
+
# intervention with every merge. To do so, just uncomment the entries below
|
|
25
|
+
###############################################################################
|
|
26
|
+
#*.sln merge=binary
|
|
27
|
+
#*.csproj merge=binary
|
|
28
|
+
#*.vbproj merge=binary
|
|
29
|
+
#*.vcxproj merge=binary
|
|
30
|
+
#*.vcproj merge=binary
|
|
31
|
+
#*.dbproj merge=binary
|
|
32
|
+
#*.fsproj merge=binary
|
|
33
|
+
#*.lsproj merge=binary
|
|
34
|
+
#*.wixproj merge=binary
|
|
35
|
+
#*.modelproj merge=binary
|
|
36
|
+
#*.sqlproj merge=binary
|
|
37
|
+
#*.wwaproj merge=binary
|
|
38
|
+
|
|
39
|
+
###############################################################################
|
|
40
|
+
# behavior for image files
|
|
41
|
+
#
|
|
42
|
+
# image files are treated as binary by default.
|
|
43
|
+
###############################################################################
|
|
44
|
+
#*.jpg binary
|
|
45
|
+
#*.png binary
|
|
46
|
+
#*.gif binary
|
|
47
|
+
|
|
48
|
+
###############################################################################
|
|
49
|
+
# diff behavior for common document formats
|
|
50
|
+
#
|
|
51
|
+
# Convert binary document formats to text before diffing them. This feature
|
|
52
|
+
# is only available from the command line. Turn it on by uncommenting the
|
|
53
|
+
# entries below.
|
|
54
|
+
###############################################################################
|
|
55
|
+
#*.doc diff=astextplain
|
|
56
|
+
#*.DOC diff=astextplain
|
|
57
|
+
#*.docx diff=astextplain
|
|
58
|
+
#*.DOCX diff=astextplain
|
|
59
|
+
#*.dot diff=astextplain
|
|
60
|
+
#*.DOT diff=astextplain
|
|
61
|
+
#*.pdf diff=astextplain
|
|
62
|
+
#*.PDF diff=astextplain
|
|
63
|
+
#*.rtf diff=astextplain
|
|
64
|
+
#*.RTF diff=astextplain
|
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
include:
|
|
2
|
+
- project: 'DevOps/templates'
|
|
3
|
+
refs: main
|
|
4
|
+
file:
|
|
5
|
+
- 'workflow/argo.yml'
|
|
6
|
+
|
|
7
|
+
variables:
|
|
8
|
+
# IMAGE_NAME: nntc-ui-kit
|
|
9
|
+
DOCKERFILE_PATH: Dockerfile
|
|
10
|
+
|
|
11
|
+
deploy_test_k8s:
|
|
12
|
+
variables:
|
|
13
|
+
NAMESPACE: iifa-test
|
|
14
|
+
|
|
15
|
+
publish_npm:
|
|
16
|
+
image: node:20
|
|
17
|
+
stage: deploy
|
|
18
|
+
rules:
|
|
19
|
+
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-stabletest$/'
|
|
20
|
+
before_script:
|
|
21
|
+
- node -v
|
|
22
|
+
- npm -v
|
|
23
|
+
- corepack enable
|
|
24
|
+
- yarn --version
|
|
25
|
+
- yarn install --frozen-lockfile
|
|
26
|
+
script:
|
|
27
|
+
- export VERSION="${CI_COMMIT_TAG%-stabletest}"
|
|
28
|
+
- echo "Publishing version $VERSION"
|
|
29
|
+
|
|
30
|
+
- node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); pkg.version=process.env.VERSION; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));"
|
|
31
|
+
|
|
32
|
+
- yarn build
|
|
33
|
+
|
|
34
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
35
|
+
|
|
36
|
+
- npm publish --access public
|
|
37
|
+
|
|
38
|
+
update_readme:
|
|
39
|
+
rules:
|
|
40
|
+
- when: never
|
package/.helm/Chart.yaml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# имя секрета, с помощью которого будет извлечен образ (лучше оставить текущее значение)
|
|
2
|
+
imagePullSecrets:
|
|
3
|
+
- name: docker
|
|
4
|
+
|
|
5
|
+
# порт для доступа к сервису (лучше оставить текущее значение)
|
|
6
|
+
service:
|
|
7
|
+
type: ClusterIP
|
|
8
|
+
port: 80
|
|
9
|
+
|
|
10
|
+
# порт, на котором приложение принимает входящие подключения (указать нужное значение)
|
|
11
|
+
container:
|
|
12
|
+
port: 80
|
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"bracketSameLine": false,
|
|
4
|
+
"bracketSpacing": true,
|
|
5
|
+
"embeddedLanguageFormatting": "auto",
|
|
6
|
+
"endOfLine": "lf",
|
|
7
|
+
"htmlWhitespaceSensitivity": "css",
|
|
8
|
+
"insertPragma": false,
|
|
9
|
+
"jsxSingleQuote": false,
|
|
10
|
+
"printWidth": 120,
|
|
11
|
+
"proseWrap": "preserve",
|
|
12
|
+
"quoteProps": "as-needed",
|
|
13
|
+
"requirePragma": false,
|
|
14
|
+
"semi": true,
|
|
15
|
+
"singleQuote": true,
|
|
16
|
+
"tabWidth": 2,
|
|
17
|
+
"trailingComma": "all",
|
|
18
|
+
"useTabs": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
5
|
+
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'],
|
|
6
|
+
framework: {
|
|
7
|
+
name: '@storybook/react-vite',
|
|
8
|
+
options: {},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default config;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Preview } from '@storybook/react';
|
|
3
|
+
import { I18nextProvider } from 'react-i18next';
|
|
4
|
+
import light from '../src/styles/themes/light.css?inline';
|
|
5
|
+
import dark from '../src/styles/themes/dark.css?inline';
|
|
6
|
+
|
|
7
|
+
import { i18n } from '../src/i18n/config';
|
|
8
|
+
|
|
9
|
+
import '../src/styles/localGlobal.css';
|
|
10
|
+
import '../src/styles/global.css';
|
|
11
|
+
|
|
12
|
+
const themes = [
|
|
13
|
+
{ name: 'light', value: '#f8f8f8', css: light },
|
|
14
|
+
{ name: 'dark', value: '#373737', css: dark },
|
|
15
|
+
];
|
|
16
|
+
const styleTagId = 'theme-style';
|
|
17
|
+
|
|
18
|
+
const preview: Preview = {
|
|
19
|
+
parameters: {
|
|
20
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
21
|
+
controls: {
|
|
22
|
+
matchers: {
|
|
23
|
+
color: /(background|color)$/i,
|
|
24
|
+
date: /Date$/,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
docs: {
|
|
28
|
+
toc: true,
|
|
29
|
+
},
|
|
30
|
+
backgrounds: {
|
|
31
|
+
values: themes,
|
|
32
|
+
default: 'light',
|
|
33
|
+
},
|
|
34
|
+
options: {
|
|
35
|
+
storySort: {
|
|
36
|
+
order: ['Components', '*'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
decorators: [
|
|
41
|
+
(Story, context) => {
|
|
42
|
+
const theme = themes?.find((t) => t.value === context?.globals?.backgrounds?.value);
|
|
43
|
+
|
|
44
|
+
let style = document.getElementById(styleTagId) as HTMLStyleElement | null;
|
|
45
|
+
|
|
46
|
+
if (!style) {
|
|
47
|
+
style = document.createElement('style');
|
|
48
|
+
style.id = styleTagId;
|
|
49
|
+
document.head.appendChild(style);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
style.innerHTML = theme?.css || themes[0].css;
|
|
53
|
+
return (
|
|
54
|
+
<I18nextProvider i18n={i18n}>
|
|
55
|
+
<Story />
|
|
56
|
+
</I18nextProvider>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default preview;
|
package/.stylelintignore
ADDED
package/Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
FROM harbor.infra.nntc.pro/docker-registry/node:22-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
COPY package.json ./
|
|
5
|
+
COPY yarn.lock ./
|
|
6
|
+
|
|
7
|
+
RUN yarn install --frozen-lockfile
|
|
8
|
+
|
|
9
|
+
COPY . .
|
|
10
|
+
|
|
11
|
+
RUN yarn build-storybook
|
|
12
|
+
|
|
13
|
+
FROM docker.nntc.pro/nginx:alpine
|
|
14
|
+
|
|
15
|
+
COPY --from=0 /app/storybook-static /usr/share/nginx/html
|
|
16
|
+
|
|
17
|
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
18
|
+
|
|
19
|
+
EXPOSE 80
|
|
20
|
+
|
|
21
|
+
CMD ["nginx", "-g", "daemon off;"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
[
|
|
4
|
+
"@babel/preset-env",
|
|
5
|
+
{
|
|
6
|
+
"useBuiltIns": "usage",
|
|
7
|
+
"corejs": 3,
|
|
8
|
+
"targets": {
|
|
9
|
+
"node": "current",
|
|
10
|
+
"browsers": [">0.2%", "not dead", "not op_mini all"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"@babel/preset-typescript",
|
|
15
|
+
[
|
|
16
|
+
"@babel/preset-react",
|
|
17
|
+
{
|
|
18
|
+
"runtime": "automatic"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
],
|
|
22
|
+
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-object-rest-spread"]
|
|
23
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
5
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
6
|
+
import js from '@eslint/js';
|
|
7
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
8
|
+
import tsParser from '@typescript-eslint/parser';
|
|
9
|
+
import _import from 'eslint-plugin-import';
|
|
10
|
+
import jsxA11Y from 'eslint-plugin-jsx-a11y';
|
|
11
|
+
import optimizeRegex from 'eslint-plugin-optimize-regex';
|
|
12
|
+
import react from 'eslint-plugin-react';
|
|
13
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
14
|
+
|
|
15
|
+
const filename = fileURLToPath(import.meta.url);
|
|
16
|
+
const dirname = path.dirname(filename);
|
|
17
|
+
const compat = new FlatCompat({
|
|
18
|
+
baseDirectory: dirname,
|
|
19
|
+
recommendedConfig: js.configs.recommended,
|
|
20
|
+
allConfig: js.configs.all,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export default [
|
|
24
|
+
{
|
|
25
|
+
ignores: [
|
|
26
|
+
'node_modules/**/*',
|
|
27
|
+
'.idea/**/*',
|
|
28
|
+
'.vscode/**/*',
|
|
29
|
+
'dist/**/*',
|
|
30
|
+
'.storybook/**/*',
|
|
31
|
+
'*.config.mjs',
|
|
32
|
+
'*.config.js',
|
|
33
|
+
'*.config.cjs',
|
|
34
|
+
'*.config.ts',
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
...compat.extends(
|
|
38
|
+
'airbnb-typescript',
|
|
39
|
+
'plugin:@typescript-eslint/recommended',
|
|
40
|
+
'plugin:prettier/recommended',
|
|
41
|
+
'plugin:jsx-a11y/recommended',
|
|
42
|
+
'plugin:optimize-regex/recommended',
|
|
43
|
+
),
|
|
44
|
+
{
|
|
45
|
+
plugins: {
|
|
46
|
+
'@typescript-eslint': typescriptEslint,
|
|
47
|
+
import: fixupPluginRules(_import),
|
|
48
|
+
'jsx-a11y': jsxA11Y,
|
|
49
|
+
react: fixupPluginRules(react),
|
|
50
|
+
'react-hooks': fixupPluginRules(reactHooks),
|
|
51
|
+
'optimize-regex': optimizeRegex,
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
languageOptions: {
|
|
55
|
+
parser: tsParser,
|
|
56
|
+
ecmaVersion: 2020,
|
|
57
|
+
sourceType: 'module',
|
|
58
|
+
|
|
59
|
+
parserOptions: {
|
|
60
|
+
ecmaFeatures: {
|
|
61
|
+
jsx: true,
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
project: './tsconfig.json',
|
|
65
|
+
tsconfigRootDir: './',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
settings: {
|
|
70
|
+
react: {
|
|
71
|
+
version: 'detect',
|
|
72
|
+
},
|
|
73
|
+
'import/resolver': {
|
|
74
|
+
typescript: {
|
|
75
|
+
project: './tsconfig.json',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
rules: {
|
|
81
|
+
'linebreak-style': ['error', 'unix'],
|
|
82
|
+
|
|
83
|
+
'max-len': [
|
|
84
|
+
'error',
|
|
85
|
+
{
|
|
86
|
+
code: 120,
|
|
87
|
+
ignoreTrailingComments: true,
|
|
88
|
+
ignoreUrls: true,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
'react/jsx-props-no-spreading': [
|
|
93
|
+
'error',
|
|
94
|
+
{
|
|
95
|
+
html: 'ignore',
|
|
96
|
+
custom: 'ignore',
|
|
97
|
+
exceptions: [''],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
|
|
101
|
+
'comma-dangle': [
|
|
102
|
+
'error',
|
|
103
|
+
{
|
|
104
|
+
arrays: 'always-multiline',
|
|
105
|
+
objects: 'always-multiline',
|
|
106
|
+
imports: 'always-multiline',
|
|
107
|
+
exports: 'always-multiline',
|
|
108
|
+
functions: 'always-multiline',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
|
|
112
|
+
'prefer-destructuring': [
|
|
113
|
+
'error',
|
|
114
|
+
{
|
|
115
|
+
object: true,
|
|
116
|
+
array: false,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
|
|
120
|
+
'no-plusplus': [
|
|
121
|
+
'warn',
|
|
122
|
+
{
|
|
123
|
+
allowForLoopAfterthoughts: true,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
|
|
127
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
128
|
+
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
129
|
+
'jsx-a11y/anchor-is-valid': 'warn',
|
|
130
|
+
'jsx-a11y/no-autofocus': 'off',
|
|
131
|
+
'jsx-a11y/click-events-have-key-events': 'off',
|
|
132
|
+
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
133
|
+
'jsx-a11y/no-static-element-interactions': 'off',
|
|
134
|
+
'no-unused-vars': 'off',
|
|
135
|
+
'no-unused-expressions': 'off',
|
|
136
|
+
|
|
137
|
+
'sort-imports': [
|
|
138
|
+
'error',
|
|
139
|
+
{
|
|
140
|
+
ignoreCase: false,
|
|
141
|
+
ignoreDeclarationSort: true,
|
|
142
|
+
ignoreMemberSort: false,
|
|
143
|
+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
144
|
+
allowSeparatedGroups: true,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
|
|
148
|
+
'import/order': [
|
|
149
|
+
'error',
|
|
150
|
+
{
|
|
151
|
+
groups: ['builtin', 'external', 'internal', ['sibling', 'parent'], 'index', 'unknown'],
|
|
152
|
+
'newlines-between': 'always',
|
|
153
|
+
alphabetize: {
|
|
154
|
+
order: 'asc',
|
|
155
|
+
caseInsensitive: true,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
];
|