-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(uip-settings): new
uip-settings
tag API
- Loading branch information
Showing
13 changed files
with
300 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,5 @@ | |
.uip-plugin { | ||
&-inner { | ||
padding: 10px; | ||
|
||
@media @mobile { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
.uip-setting { | ||
display: none; | ||
} | ||
.uip-settings-container .uip-setting { | ||
display: block; | ||
width: 100%; | ||
|
||
&:not(:first-child) { | ||
margin-top: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
.uip-settings.horizontal { | ||
|
||
grid-area: settings; | ||
flex-direction: column; | ||
|
||
.uip-settings-header { | ||
padding: 2px 10px; | ||
} | ||
|
||
.uip-settings-inner { | ||
height: var(--uip-settings-height); | ||
max-height: 200px; | ||
|
||
transition: | ||
visibility 0s linear, | ||
padding-top 0.5s linear, | ||
padding-bottom 0.5s linear, | ||
max-height 0.5s linear; | ||
} | ||
|
||
&[collapsed] .uip-settings-inner { | ||
max-height: 0; | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
|
||
transition: | ||
visibility 0.5s linear, | ||
padding-top 0.5s linear, | ||
padding-bottom 0.5s linear, | ||
max-height 0.5s linear; | ||
} | ||
|
||
.uip-settings-header { | ||
width: 100%; | ||
border-top: 1px solid var(--uip-settings-divider, transparent); | ||
border-bottom: 1px solid var(--uip-settings-divider, transparent); | ||
} | ||
|
||
.uip-settings-inner { | ||
width: 100%; | ||
max-width: 100%; | ||
max-height: 300px; | ||
border-left: none; | ||
border-right: none; | ||
border-top: 1px solid @section-border; | ||
border-bottom: 1px solid @section-border; | ||
} | ||
|
||
&[collapsible] .uip-settings-header::after { | ||
content: ''; | ||
justify-self: flex-end; | ||
position: relative; | ||
margin: 5px 10px; | ||
top: -2px; | ||
width: 7px; | ||
height: 7px; | ||
z-index: 1; | ||
pointer-events: none; | ||
|
||
border-left: 2px solid currentColor; | ||
border-top: 2px solid currentColor; | ||
|
||
transform: rotate(225deg); | ||
transform-origin: center; | ||
transition: | ||
transform 0.5s ease-in-out, | ||
top 0.5s ease-in-out; | ||
} | ||
|
||
&[collapsible][collapsed] .uip-settings-header::after { | ||
top: 2px; | ||
transform: rotate(45deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* eslint-disable-file max-len */ | ||
import React from 'jsx-dom'; | ||
|
||
export const SettingsIcon = (): SVGElement => ( | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="#1f1f1f" stroke="#1f1f1f" stroke-width=".5" viewBox="0 0 24 24"> | ||
<path d="m13.302.632.645 2.424.099.358.382.1a9.53 9.53 0 0 1 4.21 2.269l.278.263.382-.102 2.551-.684 1.305 2.115-1.915 1.734-.288.26.105.358c.218.766.326 1.53.326 2.273 0 .743-.108 1.507-.326 2.273l-.105.359.288.26 1.915 1.733-1.305 2.115-2.55-.684-.383-.102-.277.263a9.53 9.53 0 0 1-4.21 2.27l-.383.099-.099.358-.645 2.424h-2.604l-.645-2.424-.099-.358-.382-.1a9.53 9.53 0 0 1-4.21-2.269l-.278-.263-.382.102-2.551.684-1.305-2.115 1.915-1.734.288-.26-.105-.358A8.326 8.326 0 0 1 2.618 12c0-.743.108-1.507.326-2.273l.105-.359-.288-.26L.846 7.376 2.15 5.26l2.55.684.383.102.277-.263a9.53 9.53 0 0 1 4.21-2.27l.383-.099.099-.358.645-2.424h2.604ZM12 17.345c3.144 0 5.702-2.398 5.702-5.345 0-2.947-2.558-5.345-5.702-5.345S6.298 9.053 6.298 12c0 2.947 2.558 5.345 5.702 5.345ZM13.828 0h-3.656l-.776 2.901c-1.73.435-3.28 1.28-4.512 2.435l-3.056-.82L0 7.484l2.295 2.079A8.901 8.901 0 0 0 1.944 12c0 .845.126 1.658.35 2.438L0 16.515l1.828 2.968 3.056-.82c1.232 1.155 2.783 2 4.512 2.435L10.172 24h3.656l.776-2.901a10.23 10.23 0 0 0 4.512-2.434l3.056.819L24 16.516l-2.295-2.078c.221-.78.351-1.593.351-2.438 0-.842-.126-1.658-.35-2.434L24 7.486l-1.828-2.97-3.056.82A10.292 10.292 0 0 0 14.604 2.9L13.828 0ZM12 16.714c-2.775 0-5.028-2.112-5.028-4.714 0-2.602 2.253-4.714 5.028-4.714 2.775 0 5.028 2.112 5.028 4.714 0 2.602-2.253 4.714-5.028 4.714Z"/> | ||
</svg> | ||
) as SVGElement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,91 @@ | ||
@import (reference) '../../common/mixins.less'; | ||
@import (reference) '../../common/variables.less'; | ||
|
||
html { | ||
--uip-settings-divider: #ccc; | ||
--uip-settings-divider-v: @section-border; | ||
--uip-settings-header-bg: #ccc; | ||
--uip-settings-header-fg: #000; | ||
} | ||
|
||
uip-settings { | ||
display: none; | ||
} | ||
.uip-settings { | ||
grid-area: settings; | ||
width: 250px; | ||
max-width: 250px; | ||
max-height: 100%; | ||
overflow: hidden; | ||
transition: | ||
max-width 0.3s ease-in-out, | ||
max-height 0s; | ||
grid-area: sidebar; | ||
|
||
display: flex; | ||
overflow: auto; | ||
accent-color: @dark-text; | ||
|
||
&-inner { | ||
flex: 1 1 auto; | ||
display: flex; | ||
position: relative; | ||
height: 100%; | ||
width: 250px; | ||
border-left: 1px solid @section-border; | ||
overflow: hidden; | ||
padding: 0; | ||
} | ||
|
||
.esl-scrollbar { | ||
padding-right: 0; | ||
} | ||
&-container { | ||
display: flex; | ||
flex: 1 1 auto; | ||
flex-direction: column; | ||
order: 0; | ||
|
||
gap: 20px; | ||
min-width: 200px; | ||
padding: 20px 10px; | ||
} | ||
|
||
.settings-list { | ||
height: 100%; | ||
padding: 0 5px; | ||
&-scrollbar { | ||
position: relative; | ||
flex: 0 0 auto; | ||
order: 1; | ||
|
||
&[inactive] { | ||
display: none; | ||
} | ||
} | ||
|
||
@media @mobile { | ||
width: 100%; | ||
max-width: 100%; | ||
max-height: 300px; | ||
transition: max-height 0.3s ease-in-out; | ||
&-header { | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
font-weight: 500; | ||
|
||
flex: 0 0 auto; | ||
|
||
color: var(--uip-settings-header-fg, #000); | ||
background: var(--uip-settings-header-bg, transparent); | ||
|
||
&-inner { | ||
&-title:not(:empty) { | ||
flex: 1 1 auto; | ||
padding: 5px; | ||
} | ||
|
||
&-trigger { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
padding: 15px 10px 20px 0; | ||
height: 100%; | ||
z-index: 1; | ||
|
||
border-left: none; | ||
border-bottom: 1px solid @section-border; | ||
background: transparent; | ||
border: none; | ||
box-shadow: none; | ||
appearance: none; | ||
} | ||
|
||
.scrollbar-expanded(); | ||
&-icon { | ||
display: inline-flex; | ||
width: 1.25rem; | ||
height: 1.25rem; | ||
margin-block: -5px; | ||
transform-origin: center center; | ||
} | ||
} | ||
} | ||
|
||
@import "./settings.vertical.less"; | ||
@import "./settings.horizontal.less"; |
Oops, something went wrong.