@ralorotech/duino-ui
Version:
UI library for Duino projects
2,372 lines (2,364 loc) • 67.5 kB
CSS
/* src/styles/index.css */
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
font-family: var(--duino-font);
color: var(--duino-color-fg);
background: var(--duino-color-bg);
}
/* src/components/Button/button.css */
.duino-btn {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--duino-gap-sm);
font-family: var(--duino-font);
font-weight: 500;
text-decoration: none;
white-space: nowrap;
line-height: 1.4;
border-radius: var(--duino-radius);
border: 1px solid transparent;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
outline: none;
}
.duino-btn:focus-visible {
outline: 2px solid var(--duino-ring);
outline-offset: 2px;
}
.duino-btn--primary {
background:
linear-gradient(
135deg,
var(--duino-brand-500),
var(--duino-brand-600));
color: white;
border-color: var(--duino-brand-600);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.duino-btn--primary:hover:not(.duino-btn--disabled) {
background:
linear-gradient(
135deg,
var(--duino-brand-600),
var(--duino-brand-700));
border-color: var(--duino-brand-700);
box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
transform: translateY(-1px);
}
.duino-btn--primary:active:not(.duino-btn--disabled) {
background:
linear-gradient(
135deg,
var(--duino-brand-700),
var(--duino-brand-800));
transform: translateY(0);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.duino-btn--secondary {
background: var(--duino-color-bg);
color: var(--duino-brand-600);
border-color: var(--duino-brand-300);
}
.duino-btn--secondary:hover:not(.duino-btn--disabled) {
background: var(--duino-brand-50);
border-color: var(--duino-brand-400);
color: var(--duino-brand-700);
box-shadow: 0 2px 8px rgba(20, 184, 166, 0.15);
}
.duino-btn--secondary:active:not(.duino-btn--disabled) {
background: var(--duino-brand-100);
border-color: var(--duino-brand-500);
}
.duino-btn--ghost {
background: transparent;
color: var(--duino-brand-600);
border-color: transparent;
}
.duino-btn--ghost:hover:not(.duino-btn--disabled) {
background: var(--duino-brand-50);
color: var(--duino-brand-700);
}
.duino-btn--ghost:active:not(.duino-btn--disabled) {
background: var(--duino-brand-100);
}
.duino-btn--text {
background: transparent;
color: var(--duino-brand-600);
border-color: transparent;
padding-left: 0;
padding-right: 0;
}
.duino-btn--text:hover:not(.duino-btn--disabled) {
color: var(--duino-brand-700);
background: transparent;
}
.duino-btn--text:active:not(.duino-btn--disabled) {
color: var(--duino-brand-800);
}
.duino-btn--danger {
background:
linear-gradient(
135deg,
var(--duino-danger-500),
#dc2626);
color: white;
border-color: #dc2626;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.duino-btn--danger:hover:not(.duino-btn--disabled) {
background:
linear-gradient(
135deg,
#dc2626,
#b91c1c);
border-color: #b91c1c;
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
transform: translateY(-1px);
}
.duino-btn--danger:active:not(.duino-btn--disabled) {
background:
linear-gradient(
135deg,
#b91c1c,
#991b1b);
transform: translateY(0);
}
.duino-btn--sm {
padding: 6px 12px;
font-size: 13px;
min-height: 28px;
}
.duino-btn--md {
padding: 8px 16px;
font-size: 14px;
min-height: 36px;
}
.duino-btn--lg {
padding: 12px 24px;
font-size: 16px;
min-height: 44px;
}
.duino-btn--round {
border-radius: 50px;
}
.duino-btn--circle {
border-radius: 50%;
width: auto;
aspect-ratio: 1;
padding: 8px;
}
.duino-btn--circle.duino-btn--sm {
padding: 6px;
min-height: 28px;
width: 28px;
}
.duino-btn--circle.duino-btn--lg {
padding: 12px;
min-height: 44px;
width: 44px;
}
.duino-btn--block {
width: 100%;
display: flex;
}
.duino-btn--loading {
cursor: wait;
pointer-events: none;
}
.duino-btn--loading .duino-btn__text {
opacity: 0.7;
}
.duino-btn--disabled {
cursor: not-allowed;
opacity: 0.6;
transform: none !important;
box-shadow: none !important;
}
.duino-btn--disabled:hover {
transform: none !important;
box-shadow: none !important;
}
.duino-btn--icon-only {
padding-left: 8px;
padding-right: 8px;
}
.duino-btn--icon-only.duino-btn--sm {
padding: 6px;
}
.duino-btn--icon-only.duino-btn--lg {
padding: 12px;
}
.duino-btn__loading {
display: flex;
align-items: center;
justify-content: center;
}
.duino-btn__spinner {
width: 14px;
height: 14px;
animation: duino-spin 1s linear infinite;
}
.duino-btn--sm .duino-btn__spinner {
width: 12px;
height: 12px;
}
.duino-btn--lg .duino-btn__spinner {
width: 16px;
height: 16px;
}
.duino-btn__spinner-circle {
stroke: currentColor;
stroke-dasharray: 50;
stroke-dashoffset: 25;
stroke-linecap: round;
animation: duino-spin-dash 1.5s ease-in-out infinite;
}
.duino-btn__icon {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.duino-btn__icon svg {
width: 1em;
height: 1em;
}
.duino-btn__text {
display: flex;
align-items: center;
}
@keyframes duino-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes duino-spin-dash {
0% {
stroke-dasharray: 1, 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -124;
}
}
@media (max-width: 640px) {
.duino-btn--lg {
padding: 10px 20px;
font-size: 15px;
min-height: 40px;
}
.duino-btn--md {
padding: 7px 14px;
font-size: 13px;
min-height: 34px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-btn {
transition: none;
}
.duino-btn__spinner {
animation: none;
}
.duino-btn__spinner-circle {
animation: none;
stroke-dasharray: none;
stroke-dashoffset: 0;
}
}
@media (prefers-contrast: high) {
.duino-btn {
border-width: 2px;
}
.duino-btn:focus-visible {
outline-width: 3px;
}
}
/* src/components/Collapse/collapse.css */
.duino-collapse {
font-family: var(--duino-font);
color: var(--duino-color-fg);
background: var(--duino-color-bg);
}
.duino-collapse--default {
border: 1px solid var(--duino-border);
border-radius: var(--duino-radius);
overflow: hidden;
}
.duino-collapse--default .duino-collapse__panel:not(:last-child) {
border-bottom: 1px solid var(--duino-border);
}
.duino-collapse--ghost {
background: transparent;
}
.duino-collapse--ghost .duino-collapse__panel {
border: none;
margin-bottom: var(--duino-gap-sm);
border-radius: var(--duino-radius);
overflow: hidden;
}
.duino-collapse--ghost .duino-collapse__header {
background: var(--duino-brand-50);
border: 1px solid var(--duino-brand-200);
}
.duino-collapse--ghost .duino-collapse__content {
border: 1px solid var(--duino-brand-200);
border-top: none;
}
.duino-collapse--bordered {
border: 2px solid var(--duino-brand-200);
border-radius: var(--duino-radius);
}
.duino-collapse--bordered .duino-collapse__panel:not(:last-child) {
border-bottom: 2px solid var(--duino-brand-200);
}
.duino-collapse--bordered .duino-collapse__header {
background:
linear-gradient(
135deg,
var(--duino-brand-50),
var(--duino-brand-100));
}
.duino-collapse--sm .duino-collapse__header {
padding: 8px 12px;
font-size: 13px;
}
.duino-collapse--sm .duino-collapse__body {
padding: 8px 12px;
font-size: 13px;
}
.duino-collapse--sm .duino-collapse__arrow {
width: 12px;
height: 12px;
}
.duino-collapse--md .duino-collapse__header {
padding: 12px 16px;
font-size: 14px;
}
.duino-collapse--md .duino-collapse__body {
padding: 12px 16px;
font-size: 14px;
}
.duino-collapse--md .duino-collapse__arrow {
width: 14px;
height: 14px;
}
.duino-collapse--lg .duino-collapse__header {
padding: 16px 20px;
font-size: 15px;
}
.duino-collapse--lg .duino-collapse__body {
padding: 16px 20px;
font-size: 15px;
}
.duino-collapse--lg .duino-collapse__arrow {
width: 16px;
height: 16px;
}
.duino-collapse__panel {
background: var(--duino-color-bg);
transition: all 0.2s ease;
}
.duino-collapse__panel--active {
}
.duino-collapse__panel--disabled {
opacity: 0.6;
cursor: not-allowed;
}
.duino-collapse__panel--animating {
}
.duino-collapse__header {
display: flex;
align-items: center;
gap: var(--duino-gap-sm);
background: var(--duino-color-bg);
border: none;
width: 100%;
text-align: left;
transition: all 0.2s ease;
position: relative;
-webkit-user-select: none;
user-select: none;
}
.duino-collapse__header--clickable {
cursor: pointer;
}
.duino-collapse__header--clickable:hover:not(.duino-collapse__panel--disabled .duino-collapse__header) {
background: var(--duino-brand-50);
}
.duino-collapse__header--clickable:focus-visible {
outline: 2px solid var(--duino-ring);
outline-offset: -2px;
}
.duino-collapse__panel--active .duino-collapse__header {
background: var(--duino-brand-100);
color: var(--duino-brand-700);
font-weight: 600;
}
.duino-collapse__header-content {
flex: 1;
font-weight: 500;
line-height: 1.4;
}
.duino-collapse__extra {
margin-left: auto;
color: var(--duino-color-muted);
font-size: 0.9em;
}
.duino-collapse__icon {
display: flex;
align-items: center;
justify-content: center;
color: var(--duino-color-muted);
transition: all 0.2s ease;
cursor: pointer;
padding: 2px;
border-radius: 4px;
}
.duino-collapse__icon:hover {
background: var(--duino-brand-100);
color: var(--duino-brand-600);
}
.duino-collapse__icon--start {
order: -1;
}
.duino-collapse__icon--end {
order: 1;
}
.duino-collapse__arrow {
transition: transform 0.2s ease;
flex-shrink: 0;
}
.duino-collapse__panel--active .duino-collapse__arrow {
transform: rotate(180deg);
}
.duino-collapse__content {
overflow: hidden;
transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
background: var(--duino-color-bg);
}
.duino-collapse__body {
padding: 12px 16px;
border-top: 1px solid var(--duino-border);
color: var(--duino-color-fg);
line-height: 1.6;
}
.duino-collapse--ghost .duino-collapse__body {
border-top: none;
background: var(--duino-color-bg);
}
.duino-collapse--accordion .duino-collapse__panel {
}
@media (max-width: 640px) {
.duino-collapse--lg .duino-collapse__header {
padding: 14px 16px;
font-size: 14px;
}
.duino-collapse--lg .duino-collapse__body {
padding: 14px 16px;
font-size: 14px;
}
.duino-collapse--md .duino-collapse__header {
padding: 10px 14px;
font-size: 13px;
}
.duino-collapse--md .duino-collapse__body {
padding: 10px 14px;
font-size: 13px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-collapse__content {
transition: none;
}
.duino-collapse__arrow {
transition: none;
}
.duino-collapse__header {
transition: none;
}
.duino-collapse__icon {
transition: none;
}
}
@media (prefers-contrast: high) {
.duino-collapse--default {
border-width: 2px;
}
.duino-collapse__panel:not(:last-child) {
border-bottom-width: 2px;
}
.duino-collapse__body {
border-top-width: 2px;
}
}
.duino-collapse__header:focus-visible {
outline: 2px solid var(--duino-ring);
outline-offset: -2px;
}
.duino-collapse__icon:focus-visible {
outline: 2px solid var(--duino-ring);
outline-offset: 1px;
}
.duino-collapse__body h1,
.duino-collapse__body h2,
.duino-collapse__body h3,
.duino-collapse__body h4,
.duino-collapse__body h5,
.duino-collapse__body h6 {
margin: 0 0 12px 0;
font-weight: 600;
line-height: 1.3;
color: var(--duino-brand-700);
}
.duino-collapse__body p {
margin: 0 0 12px 0;
line-height: 1.6;
}
.duino-collapse__body p:last-child {
margin-bottom: 0;
}
.duino-collapse__body ul,
.duino-collapse__body ol {
margin: 0 0 12px 0;
padding-left: 20px;
}
.duino-collapse__body li {
margin-bottom: 4px;
line-height: 1.5;
}
.duino-collapse__body a {
color: var(--duino-brand-500);
text-decoration: none;
}
.duino-collapse__body a:hover {
color: var(--duino-brand-600);
text-decoration: underline;
}
.duino-collapse__body code {
background: var(--duino-brand-50);
color: var(--duino-brand-700);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
font-family:
"Monaco",
"Menlo",
"Ubuntu Mono",
monospace;
}
.duino-collapse__body pre {
background: var(--duino-brand-50);
color: var(--duino-brand-700);
padding: 12px;
border-radius: 6px;
font-size: 0.9em;
font-family:
"Monaco",
"Menlo",
"Ubuntu Mono",
monospace;
overflow-x: auto;
margin: 12px 0;
border: 1px solid var(--duino-brand-200);
}
.duino-collapse__body blockquote {
margin: 12px 0;
padding: 12px 16px;
border-left: 4px solid var(--duino-brand-300);
background: var(--duino-brand-50);
border-radius: 0 6px 6px 0;
font-style: italic;
}
.duino-collapse__body hr {
border: none;
border-top: 1px solid var(--duino-border);
margin: 16px 0;
}
.duino-collapse__body .duino-btn {
margin: 4px 4px 4px 0;
}
.duino-collapse__body img {
max-width: 100%;
height: auto;
border-radius: 6px;
margin: 8px 0;
}
.duino-collapse__body table {
width: 100%;
border-collapse: collapse;
margin: 12px 0;
font-size: 0.9em;
}
.duino-collapse__body th,
.duino-collapse__body td {
padding: 8px 12px;
text-align: left;
border-bottom: 1px solid var(--duino-border);
}
.duino-collapse__body th {
font-weight: 600;
background: var(--duino-brand-50);
color: var(--duino-brand-700);
}
@media print {
.duino-collapse__content {
height: auto !important;
overflow: visible !important;
}
.duino-collapse__panel {
page-break-inside: avoid;
}
.duino-collapse__arrow {
display: none;
}
}
/* src/components/Spin/spin.css */
.duino-spin {
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--duino-gap-sm);
color: var(--duino-brand-500);
}
.duino-spin--xs {
font-size: 12px;
}
.duino-spin--xs .duino-spin__svg {
width: 12px;
height: 12px;
}
.duino-spin--sm {
font-size: 14px;
}
.duino-spin--sm .duino-spin__svg {
width: 16px;
height: 16px;
}
.duino-spin--md {
font-size: 16px;
}
.duino-spin--md .duino-spin__svg {
width: 24px;
height: 24px;
}
.duino-spin--lg {
font-size: 18px;
}
.duino-spin--lg .duino-spin__svg {
width: 32px;
height: 32px;
}
.duino-spin--xl {
font-size: 20px;
}
.duino-spin--xl .duino-spin__svg {
width: 48px;
height: 48px;
}
.duino-spin__svg {
animation: duino-spin-rotate 1s linear infinite;
}
.duino-spin__circle {
stroke: currentColor;
stroke-dasharray: 50;
stroke-dashoffset: 25;
stroke-linecap: round;
animation: duino-spin-dash 1.5s ease-in-out infinite;
}
@keyframes duino-spin-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes duino-spin-dash {
0% {
stroke-dasharray: 1, 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -124;
}
}
.duino-spin__dots {
display: flex;
gap: 4px;
align-items: center;
}
.duino-spin__dots--xs {
gap: 2px;
}
.duino-spin__dots--sm {
gap: 3px;
}
.duino-spin__dots--md {
gap: 4px;
}
.duino-spin__dots--lg {
gap: 5px;
}
.duino-spin__dots--xl {
gap: 6px;
}
.duino-spin__dot {
background: currentColor;
border-radius: 50%;
animation: duino-spin-dots 1.4s ease-in-out infinite both;
}
.duino-spin__dots--xs .duino-spin__dot {
width: 3px;
height: 3px;
}
.duino-spin__dots--sm .duino-spin__dot {
width: 4px;
height: 4px;
}
.duino-spin__dots--md .duino-spin__dot {
width: 6px;
height: 6px;
}
.duino-spin__dots--lg .duino-spin__dot {
width: 8px;
height: 8px;
}
.duino-spin__dots--xl .duino-spin__dot {
width: 10px;
height: 10px;
}
.duino-spin__dot--1 {
animation-delay: -0.32s;
}
.duino-spin__dot--2 {
animation-delay: -0.16s;
}
.duino-spin__dot--3 {
animation-delay: 0s;
}
@keyframes duino-spin-dots {
0%, 80%, 100% {
transform: scale(0);
opacity: 0.5;
}
40% {
transform: scale(1);
opacity: 1;
}
}
.duino-spin__pulse {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.duino-spin__pulse--xs {
width: 12px;
height: 12px;
}
.duino-spin__pulse--sm {
width: 16px;
height: 16px;
}
.duino-spin__pulse--md {
width: 24px;
height: 24px;
}
.duino-spin__pulse--lg {
width: 32px;
height: 32px;
}
.duino-spin__pulse--xl {
width: 48px;
height: 48px;
}
.duino-spin__pulse-ring {
position: absolute;
border: 2px solid currentColor;
border-radius: 50%;
animation: duino-spin-pulse 2s ease-in-out infinite;
}
.duino-spin__pulse-ring--1 {
width: 100%;
height: 100%;
animation-delay: 0s;
}
.duino-spin__pulse-ring--2 {
width: 80%;
height: 80%;
animation-delay: -0.4s;
}
.duino-spin__pulse-ring--3 {
width: 60%;
height: 60%;
animation-delay: -0.8s;
}
@keyframes duino-spin-pulse {
0% {
transform: scale(0);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0;
}
}
.duino-spin__bars {
display: flex;
gap: 2px;
align-items: center;
}
.duino-spin__bars--xs {
gap: 1px;
}
.duino-spin__bars--sm {
gap: 1.5px;
}
.duino-spin__bars--md {
gap: 2px;
}
.duino-spin__bars--lg {
gap: 3px;
}
.duino-spin__bars--xl {
gap: 4px;
}
.duino-spin__bar {
background: currentColor;
animation: duino-spin-bars 1s ease-in-out infinite;
}
.duino-spin__bars--xs .duino-spin__bar {
width: 2px;
height: 8px;
}
.duino-spin__bars--sm .duino-spin__bar {
width: 2px;
height: 12px;
}
.duino-spin__bars--md .duino-spin__bar {
width: 3px;
height: 16px;
}
.duino-spin__bars--lg .duino-spin__bar {
width: 4px;
height: 20px;
}
.duino-spin__bars--xl .duino-spin__bar {
width: 5px;
height: 28px;
}
.duino-spin__bar--1 {
animation-delay: -0.4s;
}
.duino-spin__bar--2 {
animation-delay: -0.3s;
}
.duino-spin__bar--3 {
animation-delay: -0.2s;
}
.duino-spin__bar--4 {
animation-delay: -0.1s;
}
.duino-spin__bar--5 {
animation-delay: 0s;
}
@keyframes duino-spin-bars {
0%, 40%, 100% {
transform: scaleY(0.4);
opacity: 0.7;
}
20% {
transform: scaleY(1);
opacity: 1;
}
}
.duino-spin__ring {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.duino-spin__ring--xs {
width: 12px;
height: 12px;
}
.duino-spin__ring--sm {
width: 16px;
height: 16px;
}
.duino-spin__ring--md {
width: 24px;
height: 24px;
}
.duino-spin__ring--lg {
width: 32px;
height: 32px;
}
.duino-spin__ring--xl {
width: 48px;
height: 48px;
}
.duino-spin__ring-segment {
position: absolute;
width: 100%;
height: 100%;
border: 2px solid transparent;
border-radius: 50%;
animation: duino-spin-ring 1.2s linear infinite;
}
.duino-spin__ring-segment--1 {
border-top-color: currentColor;
animation-delay: 0s;
}
.duino-spin__ring-segment--2 {
border-right-color: currentColor;
animation-delay: -0.3s;
}
.duino-spin__ring-segment--3 {
border-bottom-color: currentColor;
animation-delay: -0.6s;
}
.duino-spin__ring-segment--4 {
border-left-color: currentColor;
animation-delay: -0.9s;
}
@keyframes duino-spin-ring {
0% {
transform: rotate(0deg);
opacity: 1;
}
50% {
opacity: 0.3;
}
100% {
transform: rotate(360deg);
opacity: 1;
}
}
.duino-spin__wave {
display: flex;
gap: 2px;
align-items: end;
}
.duino-spin__wave--xs {
gap: 1px;
}
.duino-spin__wave--sm {
gap: 1.5px;
}
.duino-spin__wave--md {
gap: 2px;
}
.duino-spin__wave--lg {
gap: 3px;
}
.duino-spin__wave--xl {
gap: 4px;
}
.duino-spin__wave-bar {
background: currentColor;
border-radius: 1px;
animation: duino-spin-wave 1.2s ease-in-out infinite;
}
.duino-spin__wave--xs .duino-spin__wave-bar {
width: 2px;
height: 6px;
}
.duino-spin__wave--sm .duino-spin__wave-bar {
width: 2px;
height: 10px;
}
.duino-spin__wave--md .duino-spin__wave-bar {
width: 3px;
height: 14px;
}
.duino-spin__wave--lg .duino-spin__wave-bar {
width: 4px;
height: 18px;
}
.duino-spin__wave--xl .duino-spin__wave-bar {
width: 5px;
height: 24px;
}
.duino-spin__wave-bar--1 {
animation-delay: -0.4s;
}
.duino-spin__wave-bar--2 {
animation-delay: -0.3s;
}
.duino-spin__wave-bar--3 {
animation-delay: -0.2s;
}
.duino-spin__wave-bar--4 {
animation-delay: -0.1s;
}
.duino-spin__wave-bar--5 {
animation-delay: 0s;
}
@keyframes duino-spin-wave {
0%, 40%, 100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
}
}
.duino-spin__tip {
color: var(--duino-color-muted);
font-size: 0.9em;
font-weight: 500;
text-align: center;
margin-top: var(--duino-gap-sm);
line-height: 1.4;
}
.duino-spin-wrapper {
position: relative;
display: block;
}
.duino-spin-wrapper--spinning {
}
.duino-spin-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(1px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
border-radius: inherit;
}
.duino-spin-content {
transition: filter 0.2s ease;
}
.duino-spin-content--blurred {
filter: blur(0.5px);
opacity: 0.7;
pointer-events: none;
transition: all 0.2s ease;
}
@media (max-width: 640px) {
.duino-spin--xl .duino-spin__svg {
width: 40px;
height: 40px;
}
.duino-spin--lg .duino-spin__svg {
width: 28px;
height: 28px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-spin__svg,
.duino-spin__dot,
.duino-spin__pulse-ring,
.duino-spin__bar,
.duino-spin__ring-segment,
.duino-spin__wave-bar {
animation: none;
}
.duino-spin__circle {
animation: none;
stroke-dasharray: none;
stroke-dashoffset: 0;
}
.duino-spin__svg .duino-spin__circle {
stroke-dasharray: 25, 25;
}
}
@media (prefers-contrast: high) {
.duino-spin {
color: var(--duino-color-fg);
}
.duino-spin-overlay {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: none;
}
}
@media (prefers-color-scheme: dark) {
.duino-spin-overlay {
background: rgba(31, 41, 55, 0.8);
}
}
.duino-btn .duino-spin {
margin: 0;
}
.duino-btn .duino-spin__tip {
display: none;
}
.duino-input .duino-spin {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
}
.duino-card .duino-spin-overlay {
border-radius: var(--duino-radius);
}
@media print {
.duino-spin,
.duino-spin-overlay {
display: none !important;
}
.duino-spin-content--blurred {
filter: none !important;
opacity: 1 !important;
pointer-events: auto !important;
}
}
/* src/components/Image/image.css */
.duino-image {
position: relative;
display: inline-block;
overflow: hidden;
background: var(--duino-brand-50);
transition: all 0.2s ease;
}
.duino-image--square {
border-radius: 0;
}
.duino-image--rounded {
border-radius: var(--duino-radius);
}
.duino-image--circle {
border-radius: 50%;
aspect-ratio: 1;
}
.duino-image--bordered {
border: 2px solid var(--duino-border);
}
.duino-image--shadow {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.duino-image--preview {
cursor: pointer;
transition: transform 0.2s ease;
}
.duino-image--preview:hover {
transform: scale(1.02);
}
.duino-image--fill .duino-image__img {
object-fit: fill;
}
.duino-image--contain .duino-image__img {
object-fit: contain;
}
.duino-image--cover .duino-image__img {
object-fit: cover;
}
.duino-image--none .duino-image__img {
object-fit: none;
}
.duino-image--scale-down .duino-image__img {
object-fit: scale-down;
}
.duino-image__img {
width: 100%;
height: 100%;
object-fit: cover;
transition: opacity 0.3s ease;
}
.duino-image__img--loading {
opacity: 0;
}
.duino-image__img--loaded {
opacity: 1;
}
.duino-image__img--error {
opacity: 0;
}
.duino-image__loading {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
background: var(--duino-brand-50);
}
.duino-image__error {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--duino-brand-50);
color: var(--duino-color-muted);
gap: var(--duino-gap-sm);
}
.duino-image__error-icon {
width: 24px;
height: 24px;
opacity: 0.5;
}
.duino-image__error-text {
font-size: 12px;
text-align: center;
}
.duino-image__placeholder {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
background: var(--duino-brand-50);
color: var(--duino-color-muted);
}
.duino-image__placeholder-icon {
width: 32px;
height: 32px;
opacity: 0.3;
}
.duino-image__preview-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s ease;
}
.duino-image--preview:hover .duino-image__preview-overlay {
opacity: 1;
}
.duino-image__preview-icon {
width: 24px;
height: 24px;
color: white;
}
.duino-image__caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
color: white;
padding: 8px 12px;
font-size: 12px;
line-height: 1.4;
}
.duino-image__preview-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 1100;
cursor: pointer;
animation: duino-image-modal-in 0.2s ease-out;
}
@keyframes duino-image-modal-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.duino-image__preview-content {
position: relative;
max-width: 90vw;
max-height: 90vh;
cursor: default;
}
.duino-image__preview-img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: var(--duino-radius);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.duino-image__preview-close {
position: absolute;
top: -40px;
right: 0;
background: rgba(255, 255, 255, 0.9);
border: none;
border-radius: 50%;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 18px;
color: var(--duino-color-fg);
transition: background-color 0.2s ease;
}
.duino-image__preview-close:hover {
background: white;
}
.duino-image__preview-caption {
position: absolute;
bottom: -40px;
left: 0;
right: 0;
color: white;
text-align: center;
font-size: 14px;
line-height: 1.4;
}
@media (max-width: 640px) {
.duino-image__preview-content {
max-width: 95vw;
max-height: 95vh;
}
.duino-image__preview-close {
top: -35px;
width: 28px;
height: 28px;
font-size: 16px;
}
.duino-image__preview-caption {
bottom: -35px;
font-size: 13px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-image,
.duino-image__img,
.duino-image__preview-overlay {
transition: none;
}
.duino-image__preview-modal {
animation: none;
}
.duino-image--preview:hover {
transform: none;
}
}
@media (prefers-contrast: high) {
.duino-image--bordered {
border-width: 3px;
}
.duino-image__preview-overlay {
background: rgba(0, 0, 0, 0.8);
}
}
@media print {
.duino-image__preview-modal {
display: none !important;
}
.duino-image__preview-overlay {
display: none;
}
}
/* src/components/Modal/modal.css */
.is-modal-open {
overflow: hidden;
}
.duino-modal {
position: fixed;
inset: 0;
z-index: 1000;
pointer-events: none;
opacity: 0;
transition: opacity 160ms ease;
}
.duino-modal--open {
pointer-events: auto;
opacity: 1;
}
.duino-modal__mask {
position: absolute;
inset: 0;
background: rgba(19, 21, 26, 0.45);
backdrop-filter: saturate(120%) blur(2px);
}
.duino-modal__container {
position: relative;
box-sizing: border-box;
margin: 48px auto;
max-width: 90vw;
background: var(--duino-color-bg);
color: var(--duino-color-fg);
border: 1px solid var(--duino-border);
border-radius: var(--duino-radius);
box-shadow: 0 10px 20px rgba(0, 0, 0, .12), 0 6px 6px rgba(0, 0, 0, .08);
outline: none;
border-top: 4px solid var(--ximo-brand-600, var(--duino-brand-600));
}
.duino-modal--centered .duino-modal__container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
.duino-modal__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--duino-gap);
padding: calc(var(--duino-gap-lg) + 2px) var(--duino-gap-lg);
border-bottom: 1px solid var(--duino-border);
background:
linear-gradient(
180deg,
var(--duino-brand-50),
transparent 60%);
border-top-left-radius: var(--duino-radius);
border-top-right-radius: var(--duino-radius);
}
.duino-modal__title {
margin: 0;
font-family: var(--duino-font);
font-weight: 600;
font-size: 1rem;
color: var(--duino-brand-800);
}
.duino-modal__close {
appearance: none;
border: 1px solid var(--duino-border);
background: #fff;
font-size: 1.125rem;
line-height: 1;
border-radius: 8px;
width: 32px;
height: 32px;
cursor: pointer;
transition: box-shadow 120ms ease, transform 80ms ease;
}
.duino-modal__close:hover {
box-shadow: 0 0 0 3px var(--duino-brand-100);
}
.duino-modal__close:active {
transform: translateY(1px);
}
.duino-modal__body {
padding: var(--duino-gap-lg);
font-family: var(--duino-font);
color: var(--duino-color-fg);
}
.duino-modal__footer {
display: flex;
gap: var(--duino-gap);
justify-content: flex-end;
padding: var(--duino-gap-lg);
border-top: 1px solid var(--duino-border);
background: #fafafa;
border-bottom-left-radius: var(--duino-radius);
border-bottom-right-radius: var(--duino-radius);
}
.duino-btn {
font-family: var(--duino-font);
border-radius: 10px;
padding: 0.5rem 0.9rem;
border: 1px solid var(--duino-border);
background: #fff;
cursor: pointer;
transition:
box-shadow 120ms ease,
transform 80ms ease,
background 120ms ease;
}
.duino-btn:hover {
box-shadow: 0 0 0 3px var(--duino-brand-100);
}
.duino-btn:active {
transform: translateY(1px);
}
.duino-btn--primary {
background: var(--duino-brand-600);
color: #fff;
border-color: var(--duino-brand-600);
}
.duino-btn--primary:hover {
box-shadow: 0 0 0 3px var(--duino-brand-200);
}
.duino-btn--ghost {
background: #fff;
color: var(--duino-brand-800);
border-color: var(--duino-border);
}
.duino-modal--open .duino-modal__container {
animation: duino-modal-pop 160ms ease;
}
@keyframes duino-modal-pop {
from {
opacity: 0;
transform: translate(-50%, -48%) scale(0.98);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
.duino-modal--open:not(.duino-modal--centered) .duino-modal__container {
animation: duino-modal-pop-top 160ms ease;
}
@keyframes duino-modal-pop-top {
from {
opacity: 0;
transform: translateY(-4px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@media (max-width: 520px) {
.duino-modal__container {
width: calc(100vw - 24px) !important;
}
}
/* src/components/Message/Message.css */
.duino-message {
position: fixed;
z-index: 1100;
pointer-events: none;
display: flex;
gap: var(--duino-gap);
flex-direction: column;
padding: var(--duino-gap);
}
.duino-message--top-right {
top: 8px;
right: 8px;
align-items: flex-end;
}
.duino-message--top-left {
top: 8px;
left: 8px;
align-items: flex-start;
}
.duino-message--bottom-right {
bottom: 8px;
right: 8px;
align-items: flex-end;
}
.duino-message--bottom-left {
bottom: 8px;
left: 8px;
align-items: flex-start;
}
.duino-message__item {
pointer-events: auto;
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: var(--duino-gap);
min-width: 240px;
max-width: 420px;
padding: .6rem .75rem;
border: 1px solid var(--duino-border);
border-radius: var(--duino-radius);
background: var(--duino-color-bg);
color: var(--duino-color-fg);
box-shadow: 0 10px 20px rgba(0, 0, 0, .10), 0 6px 6px rgba(0, 0, 0, .05);
animation: duino-msg-in 140ms ease-out;
}
.duino-message__icon {
font-weight: 700;
width: 1.25rem;
text-align: center;
}
.duino-message__content {
font-family: var(--duino-font);
font-size: .95rem;
line-height: 1.35;
}
.duino-message__close {
appearance: none;
border: 1px solid var(--duino-border);
background: #fff;
width: 24px;
height: 24px;
border-radius: 6px;
cursor: pointer;
line-height: 1;
}
.duino-message__close:hover {
box-shadow: 0 0 0 3px var(--duino-brand-100);
}
.duino-message__item--info {
border-left: 4px solid var(--duino-brand-500);
}
.duino-message__item--success {
border-left: 4px solid var(--duino-brand-600);
background:
linear-gradient(
180deg,
var(--duino-brand-50),
transparent);
}
.duino-message__item--warning {
border-left: 4px solid #f59e0b;
background:
linear-gradient(
180deg,
#fffbeb,
transparent);
}
.duino-message__item--error {
border-left: 4px solid var(--duino-danger-500);
background:
linear-gradient(
180deg,
#fef2f2,
transparent);
}
.duino-message__item--loading {
border-left: 4px solid var(--duino-brand-400);
}
@keyframes duino-msg-in {
from {
transform: translateY(-4px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* src/components/Popover/popover.css */
.duino-popover {
position: absolute;
z-index: 1050;
font-family: var(--duino-font);
font-size: 14px;
line-height: 1.5;
transition: opacity 0.15s ease, visibility 0.15s ease;
pointer-events: auto;
}
.duino-popover__content {
position: relative;
background: var(--duino-color-bg);
border: 1px solid var(--duino-border);
border-radius: var(--duino-radius);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
max-width: 300px;
word-wrap: break-word;
animation: duino-popover-in 0.15s ease-out;
}
@keyframes duino-popover-in {
from {
opacity: 0;
transform: scale(0.95) translateY(-2px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.duino-popover__inner {
padding: 12px 16px;
}
.duino-popover__title {
font-weight: 600;
color: var(--duino-color-fg);
margin-bottom: 8px;
font-size: 14px;
line-height: 1.4;
}
.duino-popover__title:only-child {
margin-bottom: 0;
}
.duino-popover__body {
color: var(--duino-color-fg);
font-size: 13px;
line-height: 1.5;
}
.duino-popover__arrow {
position: absolute;
width: 16px;
height: 16px;
background: var(--duino-color-bg);
border: 1px solid var(--duino-border);
transform: rotate(45deg);
z-index: -1;
}
.duino-popover__hover-bridge {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -2;
}
.duino-popover__content--top,
.duino-popover__content--top-start,
.duino-popover__content--top-end {
margin-bottom: 8px;
}
.duino-popover__content--top .duino-popover__arrow,
.duino-popover__content--top-start .duino-popover__arrow,
.duino-popover__content--top-end .duino-popover__arrow {
bottom: -9px;
border-top: none;
border-left: none;
}
.duino-popover__content--top .duino-popover__arrow {
left: 50%;
margin-left: -8px;
}
.duino-popover__content--top-start .duino-popover__arrow {
left: 16px;
}
.duino-popover__content--top-end .duino-popover__arrow {
right: 16px;
}
.duino-popover__content--bottom,
.duino-popover__content--bottom-start,
.duino-popover__content--bottom-end {
margin-top: 8px;
}
.duino-popover__content--bottom .duino-popover__arrow,
.duino-popover__content--bottom-start .duino-popover__arrow,
.duino-popover__content--bottom-end .duino-popover__arrow {
top: -9px;
border-bottom: none;
border-right: none;
}
.duino-popover__content--bottom .duino-popover__arrow {
left: 50%;
margin-left: -8px;
}
.duino-popover__content--bottom-start .duino-popover__arrow {
left: 16px;
}
.duino-popover__content--bottom-end .duino-popover__arrow {
right: 16px;
}
.duino-popover__content--left,
.duino-popover__content--left-start,
.duino-popover__content--left-end {
margin-right: 8px;
}
.duino-popover__content--left .duino-popover__arrow,
.duino-popover__content--left-start .duino-popover__arrow,
.duino-popover__content--left-end .duino-popover__arrow {
right: -9px;
border-left: none;
border-bottom: none;
}
.duino-popover__content--left .duino-popover__arrow {
top: 50%;
margin-top: -8px;
}
.duino-popover__content--left-start .duino-popover__arrow {
top: 16px;
}
.duino-popover__content--left-end .duino-popover__arrow {
bottom: 16px;
}
.duino-popover__content--right,
.duino-popover__content--right-start,
.duino-popover__content--right-end {
margin-left: 8px;
}
.duino-popover__content--right .duino-popover__arrow,
.duino-popover__content--right-start .duino-popover__arrow,
.duino-popover__content--right-end .duino-popover__arrow {
left: -9px;
border-right: none;
border-top: none;
}
.duino-popover__content--right .duino-popover__arrow {
top: 50%;
margin-top: -8px;
}
.duino-popover__content--right-start .duino-popover__arrow {
top: 16px;
}
.duino-popover__content--right-end .duino-popover__arrow {
bottom: 16px;
}
@media (max-width: 640px) {
.duino-popover__content {
max-width: 280px;
font-size: 13px;
}
.duino-popover__inner {
padding: 10px 12px;
}
.duino-popover__title {
font-size: 13px;
margin-bottom: 6px;
}
.duino-popover__body {
font-size: 12px;
}
}
@media (max-width: 480px) {
.duino-popover__content {
max-width: calc(100vw - 32px);
margin: 0 16px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-popover {
transition: none;
}
.duino-popover__content {
animation: none;
}
}
@media (prefers-contrast: high) {
.duino-popover__content {
border-width: 2px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.duino-popover__arrow {
border-width: 2px;
}
}
@media (prefers-color-scheme: dark) {
.duino-popover__content {
background: #1f2937;
border-color: #374151;
color: #f9fafb;
}
.duino-popover__arrow {
background: #1f2937;
border-color: #374151;
}
.duino-popover__title {
color: #f9fafb;
}
.duino-popover__body {
color: #d1d5db;
}
}
.duino-popover__body h1,
.duino-popover__body h2,
.duino-popover__body h3,
.duino-popover__body h4,
.duino-popover__body h5,
.duino-popover__body h6 {
margin: 0 0 8px 0;
font-weight: 600;
line-height: 1.3;
}
.duino-popover__body p {
margin: 0 0 8px 0;
}
.duino-popover__body p:last-child {
margin-bottom: 0;
}
.duino-popover__body ul,
.duino-popover__body ol {
margin: 0 0 8px 0;
padding-left: 16px;
}
.duino-popover__body li {
margin-bottom: 2px;
}
.duino-popover__body a {
color: var(--duino-brand-500);
text-decoration: none;
}
.duino-popover__body a:hover {
color: var(--duino-brand-600);
text-decoration: underline;
}
.duino-popover__body code {
background: var(--duino-brand-50);
color: var(--duino-brand-700);
padding: 2px 4px;
border-radius: 3px;
font-size: 12px;
font-family:
"Monaco",
"Menlo",
"Ubuntu Mono",
monospace;
}
.duino-popover__body pre {
background: var(--duino-brand-50);
color: var(--duino-brand-700);
padding: 8px;
border-radius: 4px;
font-size: 12px;
font-family:
"Monaco",
"Menlo",
"Ubuntu Mono",
monospace;
overflow-x: auto;
margin: 8px 0;
}
.duino-popover__body hr {
border: none;
border-top: 1px solid var(--duino-border);
margin: 12px 0;
}
.duino-popover__body button {
margin: 4px 4px 4px 0;
}
.duino-popover__body .duino-btn {
font-size: 12px;
padding: 4px 8px;
min-height: 24px;
}
.duino-popover__body img {
max-width: 100%;
height: auto;
border-radius: 4px;
margin: 4px 0;
}
.duino-popover__body table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
margin: 8px 0;
}
.duino-popover__body th,
.duino-popover__body td {
padding: 4px 8px;
text-align: left;
border-bottom: 1px solid var(--duino-border);
}
.duino-popover__body th {
font-weight: 600;
background: var(--duino-brand-50);
}
@media print {
.duino-popover {
display: none !important;
}
}
/* src/components/Select/select.css */
.duino-select {
position: relative;
display: inline-block;
width: 100%;
max-width: 100%;
font-family: var(--duino-font);
color: var(--duino-color-fg);
cursor: pointer;
outline: none;
}
.duino-select--disabled {
cursor: not-allowed;
opacity: 0.6;
}
.duino-select--disabled * {
cursor: not-allowed !important;
}
.duino-select--filled .duino-select__selector {
border: 1px solid transparent;
background: var(--duino-brand-50);
}
.duino-select--filled .duino-select__selector:hover:not(.duino-select--disabled .duino-select__selector) {
background: var(--duino-brand-100);
}
.duino-select--filled:focus .duino-select__selector,
.duino-select--filled.duino-select--open .duino-select__selector {
background: var(--duino-color-bg);
border-color: var(--duino-brand-400);
}
.duino-select--borderless .duino-select__selector {
border: 1px solid transparent;
background: transparent;
padding-left: 0;
padding-right: 0;
}
.duino-select--borderless .duino-select__selector:hover:not(.duino-select--disabled .duino-select__selector) {
background: var(--duino-brand-50);
}
.duino-select--borderless:focus .duino-select__selector,
.duino-select--borderless.duino-select--open .duino-select__selector {
background: var(--duino-brand-50);
border-color: transparent;
box-shadow: none;
}
.duino-select--sm .duino-select__selector {
min-height: 28px;
padding: 4px 8px;
font-size: 13px;
}
.duino-select--sm .duino-select__arrow {
width: 12px;
height: 12px;
}
.duino-select--md .duino-select__selector {
font-size: 14px;
}
.duino-select--md .duino-select__arrow {
width: 14px;
height: 14px;
}
.duino-select--lg .duino-select__selector {
min-height: 44px;
padding: 12px 16px;
font-size: 15px;
}
.duino-select--lg .duino-select__arrow {
width: 16px;
height: 16px;
}
.duino-select:focus .duino-select__selector,
.duino-select--open .duino-select__selector {
border-color: var(--duino-brand-400);
box-shadow: 0 0 0 3px var(--duino-ring);
}
.duino-select--error .duino-select__selector {
border-color: var(--duino-danger-500);
}
.duino-select--error:focus .duino-select__selector,
.duino-select--error.duino-select--open .duino-select__selector {
border-color: var(--duino-danger-500);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--duino-danger-500) 20%, transparent);
}
.duino-select--success .duino-select__selector {
border-color: var(--duino-brand-500);
}
.duino-select--loading {
cursor: wait;
}
.duino-select--open .duino-select__arrow {
transform: rotate(180deg);
}
.duino-select__selector {
display: flex;
align-items: center;
width: 100%;
min-height: 36px;
padding: 8px 12px;
border: 1px solid var(--duino-border);
border-radius: var(--duino-radius);
background: var(--duino-color-bg);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
box-sizing: border-box;
}
.duino-select__selector:hover:not(.duino-select--disabled .duino-select__selector) {
border-color: var(--duino-brand-300);
}
.duino-select__placeholder {
color: var(--duino-color-muted);
flex: 1;
-webkit-user-select: none;
user-select: none;
}
.duino-select__single-value {
display: flex;
align-items: center;
gap: var(--duino-gap-sm);
flex: 1;
-webkit-user-select: none;
user-select: none;
}
.duino-select__tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
flex: 1;
min-width: 0;
}
.duino-select__tag {
display: inline-flex;
align-items: center;
background: var(--duino-brand-100);
color: var(--duino-brand-700);
padding: 4px 8px;
border-radius: calc(var(--duino-radius) / 2);
font-size: 12px;
font-weight: 500;
max-width: 150px;
border: 1px solid var(--duino-brand-200);
gap: 4px;
}
.duino-select__tag--more {
background: var(--duino-color-muted);
color: white;
border-color: var(--duino-color-muted);
}
.duino-select__tag-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.duino-select__tag-close {
appearance: none;
background: none;
border: none;
color: inherit;
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 0;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.15s ease;
opacity: 0.7;
}
.duino-select__tag-close:hover {
background: rgba(0, 0, 0, 0.15);
opacity: 1;
transform: scale(1.1);
}
.duino-select__actions {
display: flex;
align-items: center;
gap: 4px;
margin-left: var(--duino-gap-sm);
}
.duino-select__clear {
appearance: none;
background: none;
border: none;
color: var(--duino-color-muted);
cursor: pointer;
font-size: 16px;
line-height: 1;
padding: 2px;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.15s ease;
}
.duino-select__clear:hover {
background: var(--duino-border);
color: var(--duino-color-fg);
}
.duino-select__loading-icon {
display: flex;
align-items: center;
justify-content: center;
}
.duino-select__spinner {
width: 14px;
height: 14px;
border: 2px solid var(--duino-border);
border-top: 2px solid var(--duino-brand-500);
border-radius: 50%;
animation: duino-select-spin 1s linear infinite;
}
@keyframes duino-select-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.duino-select__arrow {
color: var(--duino-color-muted);
transition: transform 0.2s ease;
flex-shrink: 0;
}
.duino-select__dropdown {
background: var(--duino-color-bg);
border: 1px solid var(--duino-brand-200);
border-radius: var(--duino-radius);
box-shadow: 0 10px 25px rgba(20, 184, 166, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
overflow: hidden;
animation: duino-select-dropdown-in 0.15s ease-out;
min-width: 200px;
}
@keyframes duino-select-dropdown-in {
from {
opacity: 0;
transform: translateY(-4px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.duino-select__search {
padding: 8px;
border-bottom: 1px solid var(--duino-border);
}
.duino-select__search-input {
width: 100%;
padding: 6px 8px;
border: 1px solid var(--duino-border);
border-radius: calc(var(--duino-radius) / 2);
font-size: 13px;
outline: none;
transition: border-color 0.15s ease;
}
.duino-select__search-input:focus {
border-color: var(--duino-brand-400);
box-shadow: 0 0 0 2px var(--duino-ring);
}
.duino-select__options {
max-height: inherit;
overflow-y: auto;
}
.duino-select__option {
display: flex;
align-items: flex-start;
gap: var(--duino-gap-sm);
padding: 10px 12px;
cursor: pointer;
transition: all 0.15s ease;
border-bottom: 1px solid transparent;
position: relative;
}
.duino-select__option:hover:not(.duino-select__option--disabled) {
background: var(--duino-brand-50);
}
.duino-select__option--focused:not(.duino-select__option--disabled) {
background: var(--duino-brand-100);
border-left: 3px solid var(--duino-brand-400);
padding-left: 9px;
}
.duino-select__option--selected {
background: var(--duino-brand-500);
color: white;
font-weight: 500;
}
.duino-select__option--selected:hover {
background: var(--duino-brand-600);
}
.duino-select__option--disabled {
opacity: 0.5;
cursor: not-allowed;
}
.duino-select__checkbox {
width: 16px;
height: 16px;
border-radius: 3px;
border: 2px solid var(--duino-brand-300);
cursor: pointer;
accent-color: var(--duino-brand-500);
margin-top: 1px;
}
.duino-select__option-icon {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
flex-shrink: 0;
margin-top: 1px;
}
.duino-select__option-content {
flex: 1;
min-width: 0;
}
.duino-select__option-label {
display: block;
font-weight: 500;
line-height: 1.4;
}
.duino-select__option-description {
display: block;
font-size: 12px;
color: var(--duino-color-muted);
margin-top: 2px;
line-height: 1.3;
}
.duino-select__option--selected .duino-select__option-description {
color: rgba(255, 255, 255, 0.8);
}
.duino-select__group {
border-bottom: 1px solid var(--duino-border);
}
.duino-select__group:last-child {
border-bottom: none;
}
.duino-select__group-title {
padding: 10px 12px 6px;
font-size: 11px;
font-weight: 700;
color: var(--duino-brand-600);
text-transform: uppercase;
letter-spacing: 0.8px;
background:
linear-gradient(
135deg,
var(--duino-brand-50),
var(--duino-brand-100));
border-bottom: 1px solid var(--duino-brand-200);
position: sticky;
top: 0;
z-index: 1;
}
.duino-select__empty {
padding: 20px 12px;
text-align: center;
color: var(--duino-color-muted);
font-style: italic;
}
@media (max-width: 640px) {
.duino-select__dropdown {
max-width: 100vw;
margin: 0 8px;
}
.duino-select__option {
padding: 12px;
}
.duino-select__tag {
max-width: 120px;
}
}
@media (prefers-reduced-motion: reduce) {
.duino-select__selector,
.duino-select__option,
.duino-select__arrow,
.duino-select__spinner {
transition: none;
animation: none;
}
.duino-select__dropdown {
animation: none;
}
}
@media (prefers-contrast: high) {
.duino-select__selector {
border-width: 2px;
}
.duino-select__option--selected {
border: 2px solid currentColor;
}
}
.duino-select:focus-visible {
outline: 2px solid var(--duino-ring);
ou