UNPKG

smartopt-ui

Version:

Modern React UI component library with scoped CSS and CSS variables

974 lines (898 loc) 25 kB
:root { --smartopt-primary: #007bff; --smartopt-secondary: #6c757d; --smartopt-success: #28a745; --smartopt-danger: #dc3545; --smartopt-warning: #ffc107; --smartopt-info: #17a2b8; --smartopt-light: #f8f9fa; --smartopt-dark: #343a40; --smartopt-brand: #1e40af; --smartopt-brand-light: #3b82f6; --smartopt-brand-dark: #1e3a8a; --smartopt-white: #ffffff; --smartopt-black: #000000; --smartopt-gray-50: #f9fafb; --smartopt-gray-100: #f3f4f6; --smartopt-gray-200: #e5e7eb; --smartopt-gray-300: #d1d5db; --smartopt-gray-400: #9ca3af; --smartopt-gray-500: #6b7280; --smartopt-gray-600: #4b5563; --smartopt-gray-700: #374151; --smartopt-gray-800: #1f2937; --smartopt-gray-900: #111827; --smartopt-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --smartopt-font-size-xs: 0.75rem; --smartopt-font-size-sm: 0.875rem; --smartopt-font-size-base: 1rem; --smartopt-font-size-lg: 1.125rem; --smartopt-font-size-xl: 1.25rem; --smartopt-font-size-2xl: 1.5rem; --smartopt-font-size-3xl: 1.875rem; --smartopt-spacing-1: 0.25rem; --smartopt-spacing-2: 0.5rem; --smartopt-spacing-3: 0.75rem; --smartopt-spacing-4: 1rem; --smartopt-spacing-5: 1.25rem; --smartopt-spacing-6: 1.5rem; --smartopt-spacing-8: 2rem; --smartopt-spacing-10: 2.5rem; --smartopt-spacing-12: 3rem; --smartopt-radius-sm: 0.125rem; --smartopt-radius-md: 0.375rem; --smartopt-radius-lg: 0.5rem; --smartopt-radius-xl: 0.75rem; --smartopt-radius-2xl: 1rem; --smartopt-radius-full: 9999px; --smartopt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --smartopt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --smartopt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --smartopt-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); --smartopt-transition-fast: 150ms ease-in-out; --smartopt-transition-normal: 200ms ease-in-out; --smartopt-transition-slow: 300ms ease-in-out; --smartopt-z-dropdown: 1000; --smartopt-z-sticky: 1020; --smartopt-z-fixed: 1030; --smartopt-z-modal-backdrop: 1040; --smartopt-z-modal: 1050; --smartopt-z-popover: 1060; --smartopt-z-tooltip: 1070; --smartopt-z-toast: 1080; } /* Button Component */ .smartopt-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px 20px; font-size: 15px; font-weight: 500; border-radius: 6px; border: none; background: #e6a800; color: #fff; cursor: pointer; transition: background 0.2s, color 0.2s; outline: none; gap: 8px; } .smartopt-button:disabled { opacity: 0.6; cursor: not-allowed; } /* Button Variants */ .smartopt-button--primary { background: #e6a800; color: #fff; border: none; } .smartopt-button--secondary { background: #23233a; color: #fff; border: none; } .smartopt-button--success { background: #22c55e; color: #fff; border: none; } .smartopt-button--danger { background: #ef4444; color: #fff; border: none; } .smartopt-button--warning { background: #f59e42; color: #fff; border: none; } .smartopt-button--info { background: #3b82f6; color: #fff; border: none; } .smartopt-button--light { background: #f3f4f6; color: #23233a; border: none; } .smartopt-button--dark { background: #23233a; color: #fff; border: none; } .smartopt-button--outline { background: transparent; border: 2px solid #e6a800; color: #e6a800; } /* Button Sizes */ .smartopt-button--sm { font-size: 13px; padding: 6px 14px; } .smartopt-button--md { font-size: 15px; padding: 8px 20px; } .smartopt-button--lg { font-size: 17px; padding: 12px 28px; } /* Input Component */ .smartopt-input { width: 100%; padding: 8px 12px; font-size: 15px; border: 1.5px solid var(--color-border-primary); border-radius: 6px; outline: none; color: var(--color-text-primary); background: var(--color-bg-primary); transition: border 0.2s; margin-top: 4px; margin-bottom: 4px; } .smartopt-input:focus { border-color: var(--color-smartopt); } .smartopt-input:disabled { background: var(--color-bg-disabled); color: var(--color-text-disabled); } .smartopt-input--error { border-color: #ef4444; } .smartopt-input--success { border-color: #22c55e; } /* Card Component */ .smartopt-card { background: var(--color-bg-primary); border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1.5px solid var(--color-border-primary); color: var(--color-text-primary); } /* Loading Component */ .smartopt-loading { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; } .smartopt-loading__spinner { width: 2rem; height: 2rem; border: 2px solid var(--smartopt-gray-200); border-top: 2px solid var(--smartopt-primary); border-radius: 50%; animation: smartopt-spin 1s linear infinite; } .smartopt-loading__dots { display: flex; gap: 0.5rem; } .smartopt-loading__dot { width: 0.5rem; height: 0.5rem; background-color: var(--smartopt-primary); border-radius: 50%; animation: smartopt-bounce 1.4s ease-in-out infinite both; } .smartopt-loading__dot:nth-child(1) { animation-delay: -0.32s; } .smartopt-loading__dot:nth-child(2) { animation-delay: -0.16s; } .smartopt-loading__dot:nth-child(3) { animation-delay: 0s; } @keyframes smartopt-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes smartopt-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } } /* Loading Sizes */ .smartopt-loading--small .smartopt-loading__spinner { width: 1rem; height: 1rem; border-width: 1px; } .smartopt-loading--small .smartopt-loading__dot { width: 0.25rem; height: 0.25rem; } .smartopt-loading--large .smartopt-loading__spinner { width: 3rem; height: 3rem; border-width: 3px; } .smartopt-loading--large .smartopt-loading__dot { width: 0.75rem; height: 0.75rem; } /* Modal Component */ .smartopt-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: var(--smartopt-z-modal); display: flex; align-items: center; justify-content: center; } .smartopt-modal__backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: var(--smartopt-z-modal-backdrop); } .smartopt-modal__content { position: relative; background-color: var(--smartopt-white); border-radius: var(--smartopt-radius-lg); box-shadow: var(--smartopt-shadow-xl); max-width: 90vw; max-height: 90vh; overflow: auto; z-index: var(--smartopt-z-modal); } /* Alert Component */ .smartopt-alert { padding: var(--smartopt-spacing-4); border-radius: var(--smartopt-radius-md); border: 1px solid; margin-bottom: var(--smartopt-spacing-4); } .smartopt-alert--success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; } .smartopt-alert--error { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; } .smartopt-alert--warning { background-color: #fff3cd; border-color: #ffeaa7; color: #856404; } .smartopt-alert--info { background-color: #d1ecf1; border-color: #bee5eb; color: #0c5460; } /* Utility Classes */ .smartopt-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .smartopt-text-center { text-align: center; } .smartopt-text-left { text-align: left; } .smartopt-text-right { text-align: right; } .smartopt-w-full { width: 100%; } .smartopt-h-full { height: 100%; } .smartopt-flex { display: flex; } .smartopt-flex-col { flex-direction: column; } .smartopt-items-center { align-items: center; } .smartopt-justify-center { justify-content: center; } .smartopt-justify-between { justify-content: space-between; } /* HEADER */ .smartopt-header, .smartopt-header__navbar { background: var(--color-navbarBg) !important; width: 100%; color: #fff; font-family: inherit; } .smartopt-header__navbar { display: flex; flex-direction: row; align-items: center; justify-content: space-between; min-height: 55px; padding: 0 32px; } .smartopt-header__nav { display: flex; align-items: center; gap: 16px; } .smartopt-header__brand-logo { display: block; height: 32px; width: auto; } .smartopt-header__brand-logo--sm { height: 20px; } .smartopt-header__brand-logo--md { height: 32px; } .smartopt-header__brand-logo--lg { height: 40px; } .smartopt-header__brand-logo--xl { height: 70px; } .smartopt-header__nav-items { display: flex; align-items: center; gap: 24px; margin-left: 24px; } .smartopt-header__nav-item-btn { background: none; border: none; color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; transition: color 0.2s; padding: 4px 8px; } .smartopt-header__nav-item-btn:hover, .smartopt-header__nav-item-btn--active { color: var(--color-smartopt); } .smartopt-header__nav-item-label { color: #fff; font-size: 15px; font-weight: 500; opacity: 0.7; padding: 4px 8px; } .smartopt-header__nav-dropdown { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); z-index: 100; } .smartopt-header__nav-dropdown-list { min-width: 180px; background: var(--color-navbarBg); border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.12); padding: 8px 0; margin-top: 4px; } .smartopt-header__nav-dropdown-btn { display: block; width: 100%; background: none; border: none; color: #fff; text-align: left; font-size: 14px; padding: 8px 20px; cursor: pointer; transition: background 0.2s, color 0.2s; } .smartopt-header__nav-dropdown-btn:hover, .smartopt-header__nav-dropdown-btn--active { background: var(--color-smartopt-bg); color: var(--color-smartopt); } .smartopt-header__actions { display: flex; align-items: center; gap: 16px; } .smartopt-header__lang-dropdown-wrapper { position: relative; } .smartopt-header__lang-dropdown-btn { display: flex; align-items: center; gap: 6px; color: #fff; background: none; border: none; font-size: 13px; border-radius: 6px; padding: 4px 10px; cursor: pointer; transition: background 0.2s, color 0.2s; } .smartopt-header__lang-dropdown-btn:hover { background: #fff2; color: var(--color-smartopt); } .smartopt-header__lang-dropdown-arrow { transition: transform 0.2s; } .smartopt-header__lang-dropdown-arrow--open { transform: rotate(180deg); } .smartopt-header__lang-dropdown-list { position: absolute; right: 0; top: 110%; min-width: 140px; background: var(--color-navbarBg); border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.12); z-index: 200; } .smartopt-header__lang-dropdown-list-inner { padding: 8px 0; } .smartopt-header__lang-dropdown-list-btn { display: flex; align-items: center; width: 100%; background: none; border: none; color: #fff; font-size: 13px; padding: 8px 18px; cursor: pointer; transition: background 0.2s, color 0.2s; } .smartopt-header__lang-dropdown-list-btn--active, .smartopt-header__lang-dropdown-list-btn:hover { background: var(--color-smartopt-bg); color: var(--color-smartopt); } .smartopt-header__lang-dropdown-flag { margin-right: 8px; } .smartopt-header__theme-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; transition: color 0.2s; } .smartopt-header__theme-btn:hover { color: var(--color-smartopt); } .smartopt-header__smartopt-logo { height: 20px; width: auto; margin-left: 8px; } /* SIDEBAR */ .smartopt-sidebar__toggle-btn { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; margin-bottom: 2px; z-index: 100; display: none; } @media (max-width: 900px) { .smartopt-header__nav-items { display: none; } .smartopt-sidebar__toggle-btn { display: block; } } .smartopt-sidebar__icon { font-size: 22px; color: #fff; transition: color 0.2s; } .smartopt-sidebar__icon:hover { color: var(--color-smartopt); } .smartopt-sidebar__logo { height: 20px; width: auto; margin-bottom: 8px; } .smartopt-sidebar__list { list-style: none; padding: 0; margin: 0; margin-top: 16px; } .smartopt-sidebar__item-btn { width: 100%; background: none; border: none; color: var(--color-text-primary); font-size: 16px; font-weight: 600; text-align: left; padding: 10px 0 10px 8px; border-radius: 6px; cursor: pointer; transition: background 0.2s, color 0.2s; } .smartopt-sidebar__item-btn:hover { background: var(--color-smartopt-bg); color: var(--color-smartopt); } /* DRAWER */ .smartopt-drawer__overlay { position: fixed; inset: 0; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s; } .smartopt-drawer__overlay--open { opacity: 1; pointer-events: auto; } .smartopt-drawer__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.1); transition: background 0.3s; } .smartopt-drawer__backdrop--open { background: rgba(0,0,0,0.45); } .smartopt-drawer__content { position: fixed; top: 0; bottom: 0; background: #fff; box-shadow: 0 0 24px rgba(0,0,0,0.12); transition: transform 0.3s; z-index: 1100; display: flex; flex-direction: column; height: 100%; } .smartopt-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px 18px; border-bottom: 1px solid #e5e7eb; } .smartopt-drawer__title { font-size: 18px; font-weight: 600; color: var(--color-text-primary); } .smartopt-drawer__close-btn { background: none; border: none; color: var(--color-text-primary); font-size: 18px; cursor: pointer; padding: 4px; border-radius: 4px; transition: background 0.2s, color 0.2s; } .smartopt-drawer__close-btn:hover { background: var(--color-smartopt-bg); color: var(--color-smartopt); } .smartopt-drawer__close-icon { width: 20px; height: 20px; } .smartopt-drawer__body { flex: 1; padding: 18px; overflow-y: auto; } /* CHECKBOX */ .smartopt-checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; user-select: none; } .smartopt-checkbox--disabled { opacity: 0.6; cursor: not-allowed; } .smartopt-checkbox__input { display: none; } .smartopt-checkbox__box { width: 18px; height: 18px; border: 2px solid var(--color-border-primary); border-radius: 4px; background: var(--color-bg-primary); display: inline-flex; align-items: center; justify-content: center; position: relative; transition: border 0.2s, background 0.2s; } .smartopt-checkbox__check-icon { position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: #fff; background: var(--color-smartopt); border-radius: 4px; } .smartopt-checkbox__indeterminate-icon { position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: #fff; background: var(--color-smartopt); border-radius: 4px; } .smartopt-checkbox__label { color: var(--color-text-primary); font-size: 15px; } /* RADIO */ .smartopt-radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; user-select: none; margin-right: 16px; } .smartopt-radio--disabled { opacity: 0.6; cursor: not-allowed; } .smartopt-radio__input { display: none; } .smartopt-radio__box { width: 18px; height: 18px; border: 2px solid var(--color-border-primary); border-radius: 50%; background: var(--color-bg-primary); display: inline-flex; align-items: center; justify-content: center; position: relative; transition: border 0.2s, background 0.2s; } .smartopt-radio__dot { width: 12px; height: 12px; background: var(--color-smartopt); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .smartopt-radio__label { color: var(--color-text-primary); font-size: 15px; } /* TOGGLE */ .smartopt-toggle { display: inline-flex; align-items: center; width: 44px; height: 24px; background: var(--color-border-primary); border-radius: 12px; position: relative; cursor: pointer; transition: background 0.2s; border: none; outline: none; } .smartopt-toggle--checked { background: var(--color-smartopt); } .smartopt-toggle--disabled { opacity: 0.6; cursor: not-allowed; } .smartopt-toggle__slider { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: left 0.2s; } .smartopt-toggle--checked .smartopt-toggle__slider { left: 22px; } /* SELECT */ .smartopt-select__wrapper { position: relative; width: 100%; } .smartopt-select { width: 100%; padding: 8px 12px; font-size: 15px; border: 1.5px solid var(--color-border-primary); border-radius: 6px; outline: none; color: var(--color-text-primary); background: var(--color-bg-primary); transition: border 0.2s; margin-top: 4px; margin-bottom: 4px; appearance: none; } .smartopt-select:focus { border-color: var(--color-smartopt); } .smartopt-select--disabled { background: var(--color-bg-disabled); color: var(--color-text-disabled); } .smartopt-select__arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; } .smartopt-select__arrow-icon { width: 18px; height: 18px; color: var(--color-smartopt); } .smartopt-select__dropdown { position: absolute; left: 0; top: 110%; width: 100%; background: var(--color-bg-primary); border: 1.5px solid var(--color-border-primary); border-radius: 6px; box-shadow: 0 4px 24px rgba(0,0,0,0.10); z-index: 100; margin-top: 2px; } .smartopt-select__option { padding: 8px 14px; font-size: 15px; color: var(--color-text-primary); cursor: pointer; transition: background 0.2s, color 0.2s; } .smartopt-select__option--selected { background: var(--color-smartopt-bg); color: var(--color-smartopt); } .smartopt-select__option--disabled { color: var(--color-text-disabled); cursor: not-allowed; } .smartopt-select__option:hover { background: var(--color-smartopt-bg); color: var(--color-smartopt); } .smartopt-select__tags { display: flex; flex-wrap: wrap; gap: 4px; } .smartopt-select__tag { background: var(--color-smartopt-bg); color: var(--color-smartopt); border-radius: 4px; padding: 2px 8px; font-size: 13px; display: flex; align-items: center; } .smartopt-select__tag-remove { background: none; border: none; color: var(--color-smartopt); margin-left: 4px; cursor: pointer; font-size: 13px; } .smartopt-select__placeholder { color: var(--color-text-disabled); } /* SPINNER */ .smartopt-spinner { display: flex; align-items: center; justify-content: center; height: 40px; } .smartopt-spinner__logo { height: 32px; width: auto; animation: spin 1.2s linear infinite; } @keyframes spin { 100% { transform: rotate(360deg); } } /* TOOLTIP */ .smartopt-tooltip { position: relative; display: inline-flex; align-items: center; } .smartopt-tooltip__content { position: fixed; z-index: 9999; display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; animation: tooltip-fade-in 0.18s ease forwards; } @keyframes tooltip-fade-in { to { opacity: 1; } } .smartopt-tooltip__text { background: #111827; color: #fff; font-size: 13px; padding: 8px 12px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); min-width: 60px; max-width: 240px; text-align: center; white-space: pre-line; position: relative; font-weight: 400; letter-spacing: 0.01em; } .smartopt-tooltip--top .smartopt-tooltip__text::after, .smartopt-tooltip--bottom .smartopt-tooltip__text::after, .smartopt-tooltip--left .smartopt-tooltip__text::after, .smartopt-tooltip--right .smartopt-tooltip__text::after { content: ''; position: absolute; width: 0; height: 0; border-style: solid; } .smartopt-tooltip--top .smartopt-tooltip__text::after { bottom: -6px; left: 50%; transform: translateX(-50%); border-width: 6px 6px 0 6px; border-color: #111827 transparent transparent transparent; } .smartopt-tooltip--bottom .smartopt-tooltip__text::after { top: -6px; left: 50%; transform: translateX(-50%); border-width: 0 6px 6px 6px; border-color: transparent transparent #111827 transparent; } .smartopt-tooltip--left .smartopt-tooltip__text::after { top: 50%; right: -6px; transform: translateY(-50%); border-width: 6px 0 6px 6px; border-color: transparent transparent transparent #111827; } .smartopt-tooltip--right .smartopt-tooltip__text::after { top: 50%; left: -6px; transform: translateY(-50%); border-width: 6px 6px 6px 0; border-color: transparent #111827 transparent transparent; } .smartopt-button:active { background: var(--color-smartopt-active, #e6a800); } .smartopt-button--outline:active { background: var(--color-smartopt-bg, #f1b63422); } /* BUTTON UTILITY CLASSES */ /* Width */ .smartopt-button--width-xs { min-width: 56px; } .smartopt-button--width-sm { min-width: 80px; } .smartopt-button--width-md { min-width: 96px; } .smartopt-button--width-lg { min-width: 128px; } .smartopt-button--width-xl { min-width: 160px; } .smartopt-button--width-full { width: 100%; } /* Height */ .smartopt-button--height-xs { height: 28px; } .smartopt-button--height-sm { height: 32px; } .smartopt-button--height-md { height: 40px; } .smartopt-button--height-lg { height: 48px; } .smartopt-button--height-xl { height: 56px; } /* Padding */ .smartopt-button--padding-xs { padding-left: 8px; padding-right: 8px; } .smartopt-button--padding-sm { padding-left: 12px; padding-right: 12px; } .smartopt-button--padding-md { padding-left: 16px; padding-right: 16px; } .smartopt-button--padding-lg { padding-left: 24px; padding-right: 24px; } .smartopt-button--padding-xl { padding-left: 32px; padding-right: 32px; } /* Text Color */ .smartopt-button--textColor-white { color: #fff; } .smartopt-button--textColor-black { color: #23233a; } .smartopt-button--textColor-primary { color: var(--color-smartopt); } .smartopt-button--textColor-danger { color: #ef4444; } .smartopt-button--textColor-success { color: #22c55e; } /* Text Size */ .smartopt-button--textSize-xs { font-size: 13px; } .smartopt-button--textSize-sm { font-size: 15px; } .smartopt-button--textSize-md { font-size: 17px; } .smartopt-button--textSize-lg { font-size: 19px; } .smartopt-button--textSize-xl { font-size: 22px; } /* Background Color */ .smartopt-button--bgColor-primary { background: var(--color-smartopt); } .smartopt-button--bgColor-secondary { background: #23233a; } .smartopt-button--bgColor-success { background: #22c55e; } .smartopt-button--bgColor-danger { background: #ef4444; } .smartopt-button--bgColor-warning { background: #f59e42; } .smartopt-button--bgColor-info { background: #3b82f6; } .smartopt-button--bgColor-light { background: #f3f4f6; } .smartopt-button--bgColor-dark { background: #23233a; } .smartopt-button--bgColor-transparent { background: transparent; } /* Hover Color */ .smartopt-button--hoverColor-primary:hover { background: #e6a800; } .smartopt-button--hoverColor-secondary:hover { background: #23233aee; } .smartopt-button--hoverColor-success:hover { background: #16a34a; } .smartopt-button--hoverColor-danger:hover { background: #dc2626; } .smartopt-button--hoverColor-warning:hover { background: #fbbf24; } .smartopt-button--hoverColor-info:hover { background: #2563eb; } .smartopt-button--hoverColor-light:hover { background: #e5e7eb; } .smartopt-button--hoverColor-dark:hover { background: #111827; } .smartopt-button--hoverColor-transparent:hover { background: rgba(0,0,0,0.04); } /* Active Color */ .smartopt-button--activeColor-primary:active { background: #d99a00; } .smartopt-button--activeColor-secondary:active { background: #1a1a2e; } .smartopt-button--activeColor-success:active { background: #15803d; } .smartopt-button--activeColor-danger:active { background: #b91c1c; } .smartopt-button--activeColor-warning:active { background: #f59e42; } .smartopt-button--activeColor-info:active { background: #1d4ed8; } .smartopt-button--activeColor-light:active { background: #d1d5db; } .smartopt-button--activeColor-dark:active { background: #23233a; } .smartopt-button--activeColor-transparent:active { background: rgba(0,0,0,0.08); } /* Active Scale */ .smartopt-button--activeScale:active { transform: scale(0.96); } /* Active Shadow */ .smartopt-button--activeShadow:active { box-shadow: 0 2px 8px rgba(0,0,0,0.10); } /* Rounded */ .smartopt-button--rounded-none { border-radius: 0; } .smartopt-button--rounded-xs { border-radius: 3px; } .smartopt-button--rounded-sm { border-radius: 6px; } .smartopt-button--rounded-md { border-radius: 10px; } .smartopt-button--rounded-lg { border-radius: 16px; } .smartopt-button--rounded-xl { border-radius: 24px; } .smartopt-button--rounded-full { border-radius: 999px; } /* Disabled */ .smartopt-button--disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }