Skip to content

Commit

Permalink
feat!: update @gravity-ui/uikit v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-efremoff committed Mar 4, 2024
1 parent afd11c2 commit 82689df
Show file tree
Hide file tree
Showing 8 changed files with 212 additions and 87 deletions.
258 changes: 191 additions & 67 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@gravity-ui/prettier-config": "^1.0.1",
"@gravity-ui/stylelint-config": "^2.0.0",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^5.9.1",
"@gravity-ui/uikit": "^6.1.0",
"@storybook/addon-actions": "^7.1.1",
"@storybook/addon-essentials": "^7.1.1",
"@storybook/addon-interactions": "^7.1.1",
Expand Down Expand Up @@ -89,7 +89,7 @@
"peerDependencies": {
"@bem-react/classname": "^1.6.0",
"@gravity-ui/icons": "^2.0.0",
"@gravity-ui/uikit": "^5.0.0",
"@gravity-ui/uikit": "^6.1.0",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
},
Expand Down
25 changes: 11 additions & 14 deletions src/dialog/Dialog/Dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
&_with_vertical_tabs {
border-top: 1px solid var(--g-color-line-generic);
border-bottom: 1px solid var(--g-color-line-generic);
--yc-dialog-body-padding: 0px;

padding: 0px;
}
}

Expand Down Expand Up @@ -56,8 +57,7 @@
padding-bottom: 1ex;
}

.yc-tabs {
margin-bottom: 10px;
.g-tabs {
position: relative;

&__tab {
Expand All @@ -66,14 +66,6 @@
}
}

.yc-field-wrapper {
position: relative;

&__error-text {
position: absolute;
}
}

&__error-message {
color: var(--g-color-text-danger);
margin-top: 2px;
Expand Down Expand Up @@ -193,7 +185,7 @@
padding-bottom: 8px;
border-radius: 5px;

.yc-icon {
.g-icon {
margin-right: 8px;
}
}
Expand All @@ -217,14 +209,15 @@
.df-page-dialog {
width: 720px;

--_--side-padding: 32px;

&__wrapper {
width: 100%;
display: flex;
justify-content: center;
}

&__title {
padding: var(--yc-dialog-header-padding);
line-height: 24px;
display: flex;
align-items: center;
Expand All @@ -235,7 +228,11 @@
}

&__body {
padding: var(--yc-dialog-body-padding);
flex: 1 1 100%;
}

.g-dialog-header {
padding-left: 32px;
padding-right: 32px;
}
}
2 changes: 1 addition & 1 deletion src/dialog/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ class Dialog<

componentDidUpdate(_prevProps: unknown, prevState: State<FormValues>) {
if (prevState.tabsCount !== this.state.tabsCount) {
setTimeout(() => document.querySelector('.yc-dialog__modal')?.scrollTo(0, 0), 0); // setTimeout for safari
setTimeout(() => document.querySelector('.g-dialog__modal')?.scrollTo(0, 0), 0); // setTimeout for safari
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/dialog/MultiTextControl/LabelsGroup/LabelsGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LabelsGroup extends Component<Props> {
className={block('label')}
type={onRemove && !isDefault ? 'close' : 'default'}
onClick={onLabelClick}
onClose={onRemoveClick}
onCloseClick={onRemoveClick}
size="s"
disabled={disabled}
>
Expand Down
4 changes: 4 additions & 0 deletions src/dialog/TabField/TabField.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.df-dialog-tab {
&__control {
margin-bottom: 10px;
}

&__wrapper {
display: flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/TabField/TabField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TabField extends Component<TabFieldProps> {

return (
<Tabs
className={className}
className={block('control', className)}
items={tabItems}
activeTab={activeTab}
onSelectTab={setActiveTab}
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/TabField/TabFieldVertical.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
font-size: 18px;
}

.yc-list__item {
.g-list__item {
line-height: 100%;
padding-left: 1em;
border-left: 4px solid rgba(0, 0, 0, 0);
Expand Down

0 comments on commit 82689df

Please sign in to comment.