Skip to content

Commit

Permalink
feat: New Tabs (ant-design#24552)
Browse files Browse the repository at this point in the history
* init style

* support size

* editable

* add shadow

* update demo

* fix nest style

* update rtl

* update snapshot

* bump

* fix hover

* fix test case

* fix style lint

* clean up

* updat docs

* add onTabScroll

* upgrade rc-dropdown

* update snapshot

* clean snapshot

* clean up

Co-authored-by: afc163 <[email protected]>
  • Loading branch information
zombieJ and afc163 authored May 30, 2020
1 parent 75d84b2 commit 77c5adb
Show file tree
Hide file tree
Showing 25 changed files with 3,795 additions and 5,034 deletions.
415 changes: 172 additions & 243 deletions components/card/__tests__/__snapshots__/demo.test.js.snap

Large diffs are not rendered by default.

Large diffs are not rendered by default.

184 changes: 75 additions & 109 deletions components/page-header/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1175,133 +1175,99 @@ exports[`renders ./components/page-header/demo/responsive.md correctly 1`] = `
class="ant-page-header-footer"
>
<div
class="ant-tabs ant-tabs-top ant-tabs-line"
class="ant-tabs ant-tabs-top"
>
<div
class="ant-tabs-bar ant-tabs-top-bar"
class="ant-tabs-nav"
role="tablist"
tabindex="-1"
>
<div
class="ant-tabs-nav-container"
class="ant-tabs-nav-wrap"
>
<span
class="ant-tabs-tab-prev ant-tabs-tab-btn-disabled"
unselectable="unselectable"
<div
class="ant-tabs-nav-list"
style="transform:translate(0px, 0px)"
>
<span
class="ant-tabs-tab-prev-icon"
<button
aria-selected="true"
class="ant-tabs-tab ant-tabs-tab-active"
role="tab"
tabindex="0"
type="button"
>
<span
aria-label="left"
class="anticon anticon-left ant-tabs-tab-prev-icon-target"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
/>
</svg>
</span>
</span>
</span>
<span
class="ant-tabs-tab-next ant-tabs-tab-btn-disabled"
unselectable="unselectable"
>
<span
class="ant-tabs-tab-next-icon"
Details
</button>
<button
aria-selected="false"
class="ant-tabs-tab"
role="tab"
tabindex="0"
type="button"
>
<span
aria-label="right"
class="anticon anticon-right ant-tabs-tab-next-icon-target"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</span>
</span>
<div
class="ant-tabs-nav-wrap"
>
Rule
</button>
<div
class="ant-tabs-nav-scroll"
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
/>
</div>
</div>
<div
class="ant-tabs-nav-operations ant-tabs-nav-operations-hidden"
>
<button
aria-controls="null-more-popup"
aria-expanded="false"
aria-haspopup="listbox"
aria-hidden="true"
class="ant-tabs-nav-more"
id="null-more"
style="visibility:hidden;order:1"
tabindex="-1"
type="button"
>
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<div
class="ant-tabs-nav ant-tabs-nav-animated"
<svg
aria-hidden="true"
class=""
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<div>
<div
aria-controls="tabpane-1"
aria-disabled="false"
aria-selected="true"
class="ant-tabs-tab-active ant-tabs-tab"
id="tab-1"
role="tab"
tabindex="0"
>
Details
</div>
<div
aria-controls="tabpane-2"
aria-disabled="false"
aria-selected="false"
class=" ant-tabs-tab"
id="tab-2"
role="tab"
tabindex="-1"
>
Rule
</div>
</div>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</div>
</div>
</div>
</svg>
</span>
</button>
</div>
</div>
<div
class="ant-tabs-content ant-tabs-content-animated ant-tabs-top-content"
style="margin-left:0%"
class="ant-tabs-content-holder"
>
<div
aria-hidden="false"
class="ant-tabs-tabpane ant-tabs-tabpane-active"
role="tabpanel"
style="visibility:visible"
tabindex="0"
/>
<div
aria-hidden="true"
class="ant-tabs-tabpane ant-tabs-tabpane-inactive"
role="tabpanel"
style="visibility:hidden"
tabindex="-1"
/>
class="ant-tabs-content ant-tabs-content-top"
>
<div
aria-hidden="false"
class="ant-tabs-tabpane ant-tabs-tabpane-active"
role="tabpanel"
tabindex="0"
/>
<div
aria-hidden="true"
class="ant-tabs-tabpane"
role="tabpanel"
style="display:none"
tabindex="-1"
/>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
@tabs-card-horizontal-padding: (@tabs-card-height - floor(@font-size-base * @line-height-base)) / 2 -
@border-width-base @padding-md;
@tabs-card-horizontal-padding-sm: 6px @padding-md;
@tabs-card-horizontal-padding-lg: 7px @padding-md 6px;
@tabs-title-font-size: @font-size-base;
@tabs-title-font-size-lg: @font-size-lg;
@tabs-title-font-size-sm: @font-size-base;
Expand Down
91 changes: 0 additions & 91 deletions components/tabs/TabBar.tsx

This file was deleted.

Loading

0 comments on commit 77c5adb

Please sign in to comment.