mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-02-10 18:05:06 +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
|
||||
import "./categories-picker.css";
|
||||
|
||||
/** @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 */
|
||||
|
||||
import "./icon-picker.css";
|
||||
|
||||
class IconPicker {
|
||||
#container;
|
||||
/**
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
.search {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@ -32,6 +32,8 @@
|
||||
|
||||
// @ts-check
|
||||
|
||||
import "./search-filter.css";
|
||||
|
||||
/** @typedef {import('../types.js').IconCategoryType} IconCategoryType */
|
||||
|
||||
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-hover: rgba(0, 0, 0, 0.1);
|
||||
--color-pad-selected: rgba(0, 0, 0, 0.2);
|
||||
--color-summary: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
body.dark {
|
||||
@ -13,13 +12,13 @@ body.dark {
|
||||
--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);
|
||||
--color-summary: #404040;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
.content {
|
||||
margin: 4px 13px 11px 11px;
|
||||
overflow-y: auto;
|
||||
height: inherit;
|
||||
display: flex;
|
||||
@ -27,95 +26,73 @@ body {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin: 4px 12px;
|
||||
height: 30px;
|
||||
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);
|
||||
}
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
padding: 13px 0 6px 0;
|
||||
}
|
||||
|
||||
.icons-container {
|
||||
height: 100%;
|
||||
input[type="text"] {
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
.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;
|
||||
.icon {
|
||||
color: var(--font-color);
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
background: var(--color-pad);
|
||||
&:hover {
|
||||
color: var(--font-color-hover);
|
||||
background: var(--color-pad-hover);
|
||||
}
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 2px var(--color-pad-hover);
|
||||
}
|
||||
&.selected {
|
||||
background: var(--color-pad-selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
.summary {
|
||||
height: 20px;
|
||||
padding: 0 12px;
|
||||
line-height: 20px;
|
||||
text-align: right;
|
||||
background: var(--color-summary);
|
||||
box-shadow: 2px 0 2px 0 var(--font-color);
|
||||
button {
|
||||
cursor: default;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
||||
outline: none;
|
||||
}
|
||||
input[readonly]::selection {
|
||||
background-color: transparent;
|
||||
}
|
||||
.selectHolder {
|
||||
position: relative;
|
||||
}
|
||||
.selectArrow {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 11px;
|
||||
transform: rotate(0deg);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
.selectArrow > span {
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 0.5px;
|
||||
margin: 0 -1px 3px -1px;
|
||||
background-color: #000000;
|
||||
}
|
||||
.selectArrow > span:first-of-type {
|
||||
transform: rotateZ(45deg);
|
||||
}
|
||||
.selectArrow > span:last-of-type {
|
||||
transform: rotateZ(-45deg);
|
||||
}
|
||||
.selectList:not(.hidden) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
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