Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX committed Aug 7, 2024
1 parent d69ebf0 commit 4305ccb
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions src/components/segmented/segmented.patch.less
Original file line number Diff line number Diff line change
@@ -1,64 +1,17 @@
@class-prefix-segmented: ~'adm-segmented';

.@{class-prefix-segmented} {
display: inline-block;
padding: 2px;
color: #666;
background-color: #f5f5f5;
border-radius: 2px;
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

&-group {
position: relative;
display: flex;
align-items: stretch;
justify-items: flex-start;
width: 100%;
}

// block styles
&&-block {
display: flex;
}

&&-block &-item {
flex: 1;
min-width: 0;
}

// item styles
&-item {
position: relative;
text-align: center;
cursor: pointer;
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

&-selected {
.segmented-item-selected();
color: #333;
}

&-label {
min-height: 10px;
padding: 0 11px;
line-height: 28px;
.segmented-text-ellipsis();
}

// syntactic sugar to add `icon` for Segmented Item
&-icon + * {
margin-left: 6px;
}

&-input {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
}

// disabled styles
Expand All @@ -69,44 +22,27 @@
// thumb styles
&-thumb {
.segmented-item-selected();

position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
padding: 4px 0;
}

// transition effect when `appear-active`
&-thumb-motion-appear-active {
transition:
transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
will-change: transform, width;
}
}

/* ---- mixins part starts ---- */
.segmented-disabled-item {
color: #999;
cursor: not-allowed;
}

.segmented-item-selected {
background-color: #fff;
border-radius: 2px;
box-shadow:
0 2px 8px -2px fade(#000, 5%),
0 1px 4px -1px fade(#000, 7%),
0 0 1px 0 fade(#000, 8%);
}

.segmented-text-ellipsis {
overflow: hidden;
// handle text ellipsis
white-space: nowrap;
text-overflow: ellipsis;
word-break: keep-all;
}
/* ---- mixins part ends ---- */

0 comments on commit 4305ccb

Please sign in to comment.