mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
styles separately for each component
This commit is contained in:
@ -0,0 +1,36 @@
|
|||||||
|
.categories-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.categories-container input[type="text"] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--font-color);
|
||||||
|
user-select: none;
|
||||||
|
line-height: 22px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.category::before {
|
||||||
|
content: "📁 ";
|
||||||
|
position: absolute;
|
||||||
|
left: 4px;
|
||||||
|
}
|
||||||
|
.category.selected {
|
||||||
|
background: var(--color-pad-selected);
|
||||||
|
}
|
||||||
|
.category.selected::before {
|
||||||
|
content: "✅ ";
|
||||||
|
}
|
||||||
|
.category.category-name {
|
||||||
|
display: block;
|
||||||
|
min-width: 160px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 4px 12px 4px 33px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.category.category-name:hover {
|
||||||
|
color: var(--font-color-hover);
|
||||||
|
background-color: var(--color-pad-hover);
|
||||||
|
}
|
||||||
@ -31,6 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
import "./categories-picker.css";
|
||||||
|
|
||||||
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,49 @@
|
|||||||
|
body.light {
|
||||||
|
--font-color: #323130;
|
||||||
|
--font-color-hover: #000000;
|
||||||
|
--color-pad: rgba(0, 0, 0, 0.02);
|
||||||
|
--color-pad-hover: rgba(0, 0, 0, 0.1);
|
||||||
|
--color-pad-selected: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
body.dark {
|
||||||
|
--font-color: #d9d9d9;
|
||||||
|
--font-color-hover: #ffffff;
|
||||||
|
--color-pad: rgba(255, 255, 255, 0.02);
|
||||||
|
--color-pad-hover: rgba(255, 255, 255, 0.1);
|
||||||
|
--color-pad-selected: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons-container {
|
||||||
|
height: calc(100% - 190px);
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.icons-container .icons {
|
||||||
|
height: calc(100% - 20px);
|
||||||
|
padding: 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow-y: scroll;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-content: flex-start;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
.icons-container .icons .icon {
|
||||||
|
color: var(--font-color);
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
|
||||||
|
background: var(--color-pad);
|
||||||
|
}
|
||||||
|
.icons-container .icons .icon:hover {
|
||||||
|
color: var(--font-color-hover);
|
||||||
|
background: var(--color-pad-hover);
|
||||||
|
}
|
||||||
|
.icons-container .icons .icon:focus {
|
||||||
|
box-shadow: 0 0 0 2px var(--color-pad-hover);
|
||||||
|
}
|
||||||
|
.icons-container .icons .icon.selected {
|
||||||
|
background: var(--color-pad-selected);
|
||||||
|
}
|
||||||
@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
||||||
|
|
||||||
|
import "./icon-picker.css";
|
||||||
|
|
||||||
class IconPicker {
|
class IconPicker {
|
||||||
#container;
|
#container;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
.search {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
import "./search-filter.css";
|
||||||
|
|
||||||
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
||||||
|
|
||||||
class SearchFilter {
|
class SearchFilter {
|
||||||
|
|||||||
144
sdkjs-plugins/content/icons/src/js/components/selectbox.css
Normal file
144
sdkjs-plugins/content/icons/src/js/components/selectbox.css
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
.selectbox-container {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 300px;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||||
|
sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-header {
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: white;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-header:hover {
|
||||||
|
border-color: #c0c4cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-header:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #409eff;
|
||||||
|
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-header-open {
|
||||||
|
border-color: #409eff;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-selected-text {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-arrow {
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
color: #c0c4cc;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-arrow-open {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-dropdown {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #409eff;
|
||||||
|
border-top: none;
|
||||||
|
border-radius: 0 0 4px 4px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 1000;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-search {
|
||||||
|
padding: 8px;
|
||||||
|
border-bottom: 1px solid #e4e7ed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-search-input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 6px 8px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-search-input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-options {
|
||||||
|
max-height: 150px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-option {
|
||||||
|
padding: 8px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
transition: background-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-option:hover {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-option-selected {
|
||||||
|
background-color: #f0f9ff;
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-option-selected .selectbox-option-text {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-checkbox {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-option-text {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-multiple .selectbox-selected-text {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-disabled .selectbox-header {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
cursor: not-allowed;
|
||||||
|
color: #c0c4cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectbox-disabled .selectbox-selected-text {
|
||||||
|
color: #c0c4cc;
|
||||||
|
}
|
||||||
@ -4,7 +4,6 @@ body.light {
|
|||||||
--color-pad: rgba(0, 0, 0, 0.02);
|
--color-pad: rgba(0, 0, 0, 0.02);
|
||||||
--color-pad-hover: rgba(0, 0, 0, 0.1);
|
--color-pad-hover: rgba(0, 0, 0, 0.1);
|
||||||
--color-pad-selected: rgba(0, 0, 0, 0.2);
|
--color-pad-selected: rgba(0, 0, 0, 0.2);
|
||||||
--color-summary: rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.dark {
|
body.dark {
|
||||||
@ -13,13 +12,13 @@ body.dark {
|
|||||||
--color-pad: rgba(255, 255, 255, 0.02);
|
--color-pad: rgba(255, 255, 255, 0.02);
|
||||||
--color-pad-hover: rgba(255, 255, 255, 0.1);
|
--color-pad-hover: rgba(255, 255, 255, 0.1);
|
||||||
--color-pad-selected: rgba(255, 255, 255, 0.2);
|
--color-pad-selected: rgba(255, 255, 255, 0.2);
|
||||||
--color-summary: #404040;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
|
margin: 4px 13px 11px 11px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: inherit;
|
height: inherit;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -27,95 +26,73 @@ body {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
label {
|
||||||
margin: 4px 12px;
|
display: block;
|
||||||
height: 30px;
|
padding: 13px 0 6px 0;
|
||||||
box-sizing: border-box;
|
|
||||||
input {
|
|
||||||
height: 30px;
|
|
||||||
width: calc(100% - 12px);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.categories-container {
|
|
||||||
height: calc(100% - 38px);
|
|
||||||
overflow-y: scroll;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: var(--color-pad);
|
|
||||||
}
|
|
||||||
.category {
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--font-color);
|
|
||||||
user-select: none;
|
|
||||||
line-height: 22px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: "📁 ";
|
|
||||||
position: absolute;
|
|
||||||
left: 4px;
|
|
||||||
}
|
|
||||||
&.selected {
|
|
||||||
background: var(--color-pad-selected);
|
|
||||||
&::before {
|
|
||||||
content: "✅ ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.category-name {
|
|
||||||
display: block;
|
|
||||||
min-width: 160px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 4px 12px 4px 33px;
|
|
||||||
border-radius: 3px;
|
|
||||||
&:hover {
|
|
||||||
color: var(--font-color-hover);
|
|
||||||
background-color: var(--color-pad-hover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icons-container {
|
input[type="text"] {
|
||||||
height: 100%;
|
line-height: 18px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.icons {
|
outline: none;
|
||||||
height: calc(100% - 20px);
|
}
|
||||||
padding: 12px;
|
input[readonly]::selection {
|
||||||
box-sizing: border-box;
|
background-color: transparent;
|
||||||
overflow-y: scroll;
|
}
|
||||||
display: flex;
|
.selectHolder {
|
||||||
flex-wrap: wrap;
|
position: relative;
|
||||||
justify-content: space-between;
|
}
|
||||||
align-content: flex-start;
|
.selectArrow {
|
||||||
gap: 5px;
|
cursor: pointer;
|
||||||
.icon {
|
position: absolute;
|
||||||
color: var(--font-color);
|
top: 6px;
|
||||||
width: 48px;
|
right: 11px;
|
||||||
height: 48px;
|
transform: rotate(0deg);
|
||||||
|
transition: transform 0.2s ease;
|
||||||
background: var(--color-pad);
|
}
|
||||||
&:hover {
|
.selectArrow > span {
|
||||||
color: var(--font-color-hover);
|
display: inline-block;
|
||||||
background: var(--color-pad-hover);
|
width: 4px;
|
||||||
}
|
height: 0.5px;
|
||||||
&:focus {
|
margin: 0 -1px 3px -1px;
|
||||||
box-shadow: 0 0 0 2px var(--color-pad-hover);
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
&.selected {
|
.selectArrow > span:first-of-type {
|
||||||
background: var(--color-pad-selected);
|
transform: rotateZ(45deg);
|
||||||
}
|
}
|
||||||
}
|
.selectArrow > span:last-of-type {
|
||||||
}
|
transform: rotateZ(-45deg);
|
||||||
.summary {
|
}
|
||||||
height: 20px;
|
.selectList:not(.hidden) {
|
||||||
padding: 0 12px;
|
display: flex;
|
||||||
line-height: 20px;
|
flex-direction: column;
|
||||||
text-align: right;
|
position: absolute;
|
||||||
background: var(--color-summary);
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
box-shadow: 2px 0 2px 0 var(--font-color);
|
border-radius: 4px;
|
||||||
button {
|
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
cursor: default;
|
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||||
height: 18px;
|
background: #ffffff;
|
||||||
}
|
top: 22px;
|
||||||
}
|
width: 100%;
|
||||||
|
max-height: 158px !important;
|
||||||
|
min-height: 158px !important;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.selectList > span {
|
||||||
|
padding: 5px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
.selectList > span:hover {
|
||||||
|
background-color: #d8dadc;
|
||||||
|
color: #373737;
|
||||||
|
}
|
||||||
|
.selectList > span[selected=""] {
|
||||||
|
background-color: #7d858c;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.selectList:not(.hidden) + .selectArrow {
|
||||||
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user